@opencx/widget 3.0.86 → 3.0.88
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/dist/designs.cjs +19 -47
- package/dist/designs.cjs.map +1 -1
- package/dist/designs.js +1297 -18475
- package/dist/designs.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +20 -18
- package/dist/react.js.map +1 -1
- package/dist/src/designs/react/hooks/useCanvas.d.ts +3 -0
- package/dist/src/designs/react/hooks/useTheme.d.ts +6 -0
- package/dist/src/designs/react/index.d.ts +3 -2
- package/dist/src/designs/react/screens/chat/ChatCanvas.d.ts +2 -0
- package/dist/src/headless/core/__tests__/test-utils.d.ts +41 -2
- package/dist/src/headless/core/api/api-caller.d.ts +41 -2
- package/dist/src/headless/core/api/schema.d.ts +179 -75
- package/dist/src/headless/core/context/message.ctx.d.ts +1 -0
- package/dist/src/headless/core/context/session.ctx.d.ts +24 -0
- package/dist/src/headless/core/context/widget.ctx.d.ts +2 -0
- package/dist/src/headless/core/index.d.ts +1 -1
- package/dist/src/headless/core/types/dtos.d.ts +3 -2
- package/dist/src/headless/core/types/widget-config.d.ts +7 -0
- package/dist/src/headless/react/WidgetProvider.d.ts +4 -1
- package/dist/src/headless/react/hooks/useMessages.d.ts +1 -0
- package/dist/src/headless/react/hooks/useModes.d.ts +15 -0
- package/dist/src/headless/react/hooks/useSessions.d.ts +27 -0
- package/dist/src/headless/react/index.d.ts +2 -0
- package/dist/src/headless/react/types/modes.components.d.ts +11 -0
- package/dist/useModes-DSFNdOy3.cjs +2 -0
- package/dist/useModes-DSFNdOy3.cjs.map +1 -0
- package/dist/useModes-DleBrdDK.js +260 -0
- package/dist/useModes-DleBrdDK.js.map +1 -0
- package/dist/widget.ctx-CC3c7FPb.js +1542 -0
- package/dist/widget.ctx-CC3c7FPb.js.map +1 -0
- package/dist/widget.ctx-HuLTTMAM.cjs +5 -0
- package/dist/widget.ctx-HuLTTMAM.cjs.map +1 -0
- package/dist-embed/script.js +83 -83
- package/dist-embed/script.js.map +1 -1
- package/package.json +113 -52
- package/dist/is-exhaustive-9o43S91P.cjs +0 -2
- package/dist/is-exhaustive-9o43S91P.cjs.map +0 -1
- package/dist/is-exhaustive-DGJzQK69.js +0 -7
- package/dist/is-exhaustive-DGJzQK69.js.map +0 -1
- package/dist/useWidgetTrigger-Bi12WVrs.js +0 -1364
- package/dist/useWidgetTrigger-Bi12WVrs.js.map +0 -1
- package/dist/useWidgetTrigger-Bplu_1C-.cjs +0 -18
- package/dist/useWidgetTrigger-Bplu_1C-.cjs.map +0 -1
- package/dist/widget.ctx-DFFwNHvy.js +0 -673
- package/dist/widget.ctx-DFFwNHvy.js.map +0 -1
- package/dist/widget.ctx-oIT8sGvJ.cjs +0 -5
- package/dist/widget.ctx-oIT8sGvJ.cjs.map +0 -1
package/dist/designs.cjs
CHANGED
|
@@ -1,52 +1,24 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),wu=require("@radix-ui/react-popover"),X=require("react"),U=require("./useWidgetTrigger-Bplu_1C-.cjs"),yu=require("@radix-ui/react-dialog"),ee=require("lucide-react"),ja=require("clsx"),pr=require("react-dom"),_u=require("@radix-ui/react-slot"),ge=require("framer-motion"),Au=require("@radix-ui/react-avatar"),Cu=require("@radix-ui/react-tooltip"),Ei=require("tinycolor2"),at=require("./is-exhaustive-9o43S91P.cjs"),ku=require("react-dropzone"),Qn=require("zod");function sn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const vn=sn(wu),Ye=sn(X),He=sn(yu),Nt=sn(Au),on=sn(Cu);function Ti(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 ke=st(/[A-Za-z]/),_e=st(/[\dA-Za-z]/),Iu=st(/[#-'*+\--9=?A-Z^-~]/);function kn(e){return e!==null&&(e<32||e===127)}const mr=st(/\d/),Su=st(/[\dA-Fa-f]/),Nu=st(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function oe(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}const Pn=st(new RegExp("\\p{P}|\\p{S}","u")),mt=st(/\s/);function st(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ou(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Mn=function(e){if(e==null)return vu;if(typeof e=="function")return Bn(e);if(typeof e=="object")return Array.isArray(e)?Lu(e):Ru(e);if(typeof e=="string")return Du(e);throw new Error("Expected function, string, or object as test")};function Lu(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Mn(e[n]);return Bn(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Ru(e){const t=e;return Bn(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Du(e){return Bn(t);function t(n){return n&&n.type===e}}function Bn(e){return t;function t(n,r,i){return!!(Pu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function vu(){return!0}function Pu(e){return e!==null&&typeof e=="object"&&"type"in e}const Ya=[],Mu=!0,gr=!1,Bu="skip";function Wa(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Mn(i),s=r?-1:1;u(e,void 0,[])();function u(l,c,d){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return g;function g(){let p=Ya,E,y,k;if((!t||a(l,c,d[d.length-1]||void 0))&&(p=Fu(n(l,d)),p[0]===gr))return p;if("children"in l&&l.children){const _=l;if(_.children&&p[0]!==Bu)for(y=(r?_.children.length:-1)+s,k=d.concat(_);y>-1&&y<_.children.length;){const N=_.children[y];if(E=u(N,y,k)(),E[0]===gr)return E;y=typeof E[1]=="number"?E[1]:y+s}}return p}}}function Fu(e){return Array.isArray(e)?e:typeof e=="number"?[Mu,e]:e==null?Ya:[e]}function Hu(e,t,n){const i=Mn((n||{}).ignore||[]),a=Uu(t);let s=-1;for(;++s<a.length;)Wa(e,"text",u);function u(c,d){let h=-1,g;for(;++h<d.length;){const p=d[h],E=g?g.children:void 0;if(i(p,E?E.indexOf(p):void 0,g))return;g=p}if(g)return l(c,d)}function l(c,d){const h=d[d.length-1],g=a[s][0],p=a[s][1];let E=0;const k=h.children.indexOf(c);let _=!1,N=[];g.lastIndex=0;let L=g.exec(c.value);for(;L;){const M=L.index,F={index:L.index,input:L.input,stack:[...d,c]};let S=p(...L,F);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?g.lastIndex=M+1:(E!==M&&N.push({type:"text",value:c.value.slice(E,M)}),Array.isArray(S)?N.push(...S):S&&N.push(S),E=M+L[0].length,_=!0),!g.global)break;L=g.exec(c.value)}return _?(E<c.value.length&&N.push({type:"text",value:c.value.slice(E)}),h.children.splice(k,1,...N)):N=[c],k+N.length}}function Uu(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([zu(i[0]),ju(i[1])])}return t}function zu(e){return typeof e=="string"?new RegExp(Ou(e),"g"):e}function ju(e){return typeof e=="function"?e:function(){return e}}const Xn="phrasing",Kn=["autolink","link","image","label"];function Yu(){return{transforms:[Ku],enter:{literalAutolink:qu,literalAutolinkEmail:$n,literalAutolinkHttp:$n,literalAutolinkWww:$n},exit:{literalAutolink:Xu,literalAutolinkEmail:Qu,literalAutolinkHttp:Vu,literalAutolinkWww:Gu}}}function Wu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Xn,notInConstruct:Kn},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Xn,notInConstruct:Kn},{character:":",before:"[ps]",after:"\\/",inConstruct:Xn,notInConstruct:Kn}]}}function qu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function $n(e){this.config.enter.autolinkProtocol.call(this,e)}function Vu(e){this.config.exit.autolinkProtocol.call(this,e)}function Gu(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Qu(e){this.config.exit.autolinkEmail.call(this,e)}function Xu(e){this.exit(e)}function Ku(e){Hu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,$u],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Ju]],{ignore:["link","linkReference"]})}function $u(e,t,n,r,i){let a="";if(!qa(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Zu(n)))return!1;const s=el(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function Ju(e,t,n,r){return!qa(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Zu(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 el(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=Ti(e,"(");let a=Ti(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 qa(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||mt(n)||Pn(n))&&(!t||n!==47)}function Fe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Va.peek=dl;function tl(){return{enter:{gfmFootnoteDefinition:rl,gfmFootnoteDefinitionLabelString:il,gfmFootnoteCall:ol,gfmFootnoteCallString:ul},exit:{gfmFootnoteDefinition:sl,gfmFootnoteDefinitionLabelString:al,gfmFootnoteCall:cl,gfmFootnoteCallString:ll}}}function nl(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:hl,footnoteReference:Va}}}function rl(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function il(){this.buffer()}function al(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Fe(this.sliceSerialize(e)).toLowerCase()}function sl(e){this.exit(e)}function ol(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ul(){this.buffer()}function ll(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Fe(this.sliceSerialize(e)).toLowerCase()}function cl(e){this.exit(e)}function Va(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),u(),s(),a+=i.move("]"),a}function dl(){return"["}function hl(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteDefinition"),u=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),u(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),fl)),s(),a}function fl(e,t,n){return t===0?e:(n?"":" ")+e}const pl=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ga.peek=Tl;function ml(){return{canContainEols:["delete"],enter:{strikethrough:bl},exit:{strikethrough:El}}}function gl(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:pl}],handlers:{delete:Ga}}}function bl(e){this.enter({type:"delete",children:[]},e)}function El(e){this.exit(e)}function Ga(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 Tl(){return"~"}function xl(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||yl,i=[],a=[],s=[],u=[];let l=0,c=-1;for(;++c<e.length;){const E=[],y=[];let k=-1;for(e[c].length>l&&(l=e[c].length);++k<e[c].length;){const _=wl(e[c][k]);if(t.alignDelimiters!==!1){const N=r(_);y[k]=N,(u[k]===void 0||N>u[k])&&(u[k]=N)}E.push(_)}a[c]=E,s[c]=y}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<l;)i[d]=xi(n[d]);else{const E=xi(n);for(;++d<l;)i[d]=E}d=-1;const h=[],g=[];for(;++d<l;){const E=i[d];let y="",k="";E===99?(y=":",k=":"):E===108?y=":":E===114&&(k=":");let _=t.alignDelimiters===!1?1:Math.max(1,u[d]-y.length-k.length);const N=y+"-".repeat(_)+k;t.alignDelimiters!==!1&&(_=y.length+_+k.length,_>u[d]&&(u[d]=_),g[d]=_),h[d]=N}a.splice(1,0,h),s.splice(1,0,g),c=-1;const p=[];for(;++c<a.length;){const E=a[c],y=s[c];d=-1;const k=[];for(;++d<l;){const _=E[d]||"";let N="",L="";if(t.alignDelimiters!==!1){const M=u[d]-(y[d]||0),F=i[d];F===114?N=" ".repeat(M):F===99?M%2?(N=" ".repeat(M/2+.5),L=" ".repeat(M/2-.5)):(N=" ".repeat(M/2),L=N):L=" ".repeat(M)}t.delimiterStart!==!1&&!d&&k.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&_==="")&&(t.delimiterStart!==!1||d)&&k.push(" "),t.alignDelimiters!==!1&&k.push(N),k.push(_),t.alignDelimiters!==!1&&k.push(L),t.padding!==!1&&k.push(" "),(t.delimiterEnd!==!1||d!==l-1)&&k.push("|")}p.push(t.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return p.join(`
|
|
2
|
-
`)}function wl(e){return e==null?"":String(e)}function yl(e){return e.length}function xi(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const wi={}.hasOwnProperty;function Qa(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&wi.call(i,e)){const l=String(i[e]);s=wi.call(u,l)?u[l]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function _l(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()),Al);return i(),s}function Al(e,t,n){return">"+(n?"":" ")+e}function Cl(e,t){return yi(e,t.inConstruct,!0)&&!yi(e,t.notInConstruct,!1)}function yi(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 _i(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
3
|
-
`&&Cl(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
4
|
-
`}function kl(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 Il(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 Sl(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 Nl(e,t,n,r){const i=Sl(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Il(e,n)){const h=n.enter("codeIndented"),g=n.indentLines(a,Ol);return h(),g}const u=n.createTracker(r),l=i.repeat(Math.max(kl(a,i)+1,3)),c=n.enter("codeFenced");let d=u.move(l);if(e.lang){const h=n.enter(`codeFencedLang${s}`);d+=u.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...u.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${s}`);d+=u.move(" "),d+=u.move(n.safe(e.meta,{before:d,after:`
|
|
5
|
-
`,encode:["`"],...u.current()})),h()}return d+=u.move(`
|
|
6
|
-
`),a&&(d+=u.move(a+`
|
|
7
|
-
`)),d+=u.move(l),c(),d}function Ol(e,t,n){return(n?"":" ")+e}function Pr(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 Ll(e,t,n,r){const i=Pr(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(u=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
8
|
-
`,...l.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),u()),s(),c}function Rl(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Xa.peek=Dl;function Xa(e,t,n,r){const i=Rl(n),a=n.enter("emphasis"),s=n.createTracker(r);let u=s.move(i);return u+=s.move(n.containerPhrasing(e,{before:u,after:i,...s.current()})),u+=s.move(i),a(),u}function Dl(e,t,n){return n.options.emphasis||"*"}function Fn(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),Wa(e,a,u,i);function u(l,c){const d=c[c.length-1],h=d?d.children.indexOf(l):void 0;return s(l,h,d)}}const vl={};function Mr(e,t){const n=vl,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ka(e,r,i)}function Ka(e,t,n){if(Pl(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 Ai(e.children,t,n)}return Array.isArray(e)?Ai(e,t,n):""}function Ai(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ka(e[i],t,n);return r.join("")}function Pl(e){return!!(e&&typeof e=="object")}function Ml(e,t){let n=!1;return Fn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,gr}),!!((!e.depth||e.depth<3)&&Mr(e)&&(t.options.setext||n))}function Bl(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Ml(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),g=n.containerPhrasing(e,{...a.current(),before:`
|
|
9
|
-
`,after:`
|
|
10
|
-
`});return h(),d(),g+`
|
|
11
|
-
`+(i===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
|
|
12
|
-
`))+1))}const s="#".repeat(i),u=n.enter("headingAtx"),l=n.enter("phrasing");a.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
13
|
-
`,...a.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),l(),u(),c}$a.peek=Fl;function $a(e){return e.value||""}function Fl(){return"<"}Ja.peek=Hl;function Ja(e,t,n,r){const i=Pr(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(u=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),u()),c+=l.move(")"),s(),c}function Hl(){return"!"}Za.peek=Ul;function Za(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("![");const c=n.safe(e.alt,{before:l,after:"]",...u.current()});l+=u.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...u.current()});return s(),n.stack=d,a(),i==="full"||!c||c!==h?l+=u.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function Ul(){return"!"}es.peek=zl;function es(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],u=n.compilePattern(s);let l;if(s.atBreak)for(;l=u.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function zl(){return"`"}function ts(e,t){const n=Mr(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))}ns.peek=jl;function ns(e,t,n,r){const i=Pr(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,l;if(ts(e,n)){const d=n.stack;n.stack=[],u=n.enter("autolink");let h=s.move("<");return h+=s.move(n.containerPhrasing(e,{before:h,after:">",...s.current()})),h+=s.move(">"),u(),n.stack=d,h}u=n.enter("link"),l=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),l()),c+=s.move(")"),u(),c}function jl(e,t,n){return ts(e,n)?"<":"["}rs.peek=Yl;function rs(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...u.current()});l+=u.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...u.current()});return s(),n.stack=d,a(),i==="full"||!c||c!==h?l+=u.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function Yl(){return"["}function Br(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 Wl(e){const t=Br(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 ql(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 is(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 Vl(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?ql(n):Br(n);const u=e.ordered?s==="."?")":".":Wl(n);let l=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),is(n)===s&&d){let h=-1;for(;++h<e.children.length;){const g=e.children[h];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=u),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function Gl(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 Ql(e,t,n,r){const i=Gl(n);let a=n.bulletCurrent||Br(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 u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),d);return l(),c;function d(h,g,p){return g?(p?"":" ".repeat(s))+h:(p?a:a+" ".repeat(s-a.length))+h}}function Xl(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const Kl=Mn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $l(e,t,n,r){return(e.children.some(function(s){return Kl(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Jl(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}as.peek=Zl;function as(e,t,n,r){const i=Jl(n),a=n.enter("strong"),s=n.createTracker(r);let u=s.move(i+i);return u+=s.move(n.containerPhrasing(e,{before:u,after:i,...s.current()})),u+=s.move(i+i),a(),u}function Zl(e,t,n){return n.options.strong||"*"}function ec(e,t,n,r){return n.safe(e.value,r)}function tc(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 nc(e,t,n){const r=(is(n)+(n.options.ruleSpaces?" ":"")).repeat(tc(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ss={blockquote:_l,break:_i,code:Nl,definition:Ll,emphasis:Xa,hardBreak:_i,heading:Bl,html:$a,image:Ja,imageReference:Za,inlineCode:es,link:ns,linkReference:rs,list:Vl,listItem:Ql,paragraph:Xl,root:$l,strong:as,text:ec,thematicBreak:nc},Ci=document.createElement("i");function Fr(e){const t="&"+e+";";Ci.innerHTML=t;const n=Ci.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function os(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 rc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ic(e){return e.replace(rc,ac)}function ac(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return os(n.slice(a?2:1),a?16:10)}return Fr(n)||e}function sc(){return{enter:{table:oc,tableData:ki,tableHeader:ki,tableRow:lc},exit:{codeText:cc,table:uc,tableData:Jn,tableHeader:Jn,tableRow:Jn}}}function oc(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 uc(e){this.exit(e),this.data.inTable=void 0}function lc(e){this.enter({type:"tableRow",children:[]},e)}function Jn(e){this.exit(e)}function ki(e){this.enter({type:"tableCell",children:[]},e)}function cc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,dc));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function dc(e,t){return t==="|"?t:e}function hc(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
14
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:s,tableCell:l,tableRow:u}};function s(p,E,y,k){return c(d(p,y,k),p.align)}function u(p,E,y,k){const _=h(p,y,k),N=c([_]);return N.slice(0,N.indexOf(`
|
|
15
|
-
`))}function l(p,E,y,k){const _=y.enter("tableCell"),N=y.enter("phrasing"),L=y.containerPhrasing(p,{...k,before:a,after:a});return N(),_(),L}function c(p,E){return xl(p,{align:E,alignDelimiters:r,padding:n,stringLength:i})}function d(p,E,y){const k=p.children;let _=-1;const N=[],L=E.enter("table");for(;++_<k.length;)N[_]=h(k[_],E,y);return L(),N}function h(p,E,y){const k=p.children;let _=-1;const N=[],L=E.enter("tableRow");for(;++_<k.length;)N[_]=l(k[_],p,E,y);return L(),N}function g(p,E,y){let k=ss.inlineCode(p,E,y);return y.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function fc(){return{exit:{taskListCheckValueChecked:Ii,taskListCheckValueUnchecked:Ii,paragraph:mc}}}function pc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:gc}}}function Ii(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function mc(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){s=u;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 gc(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let l=ss.listItem(e,t,n,{...r,...u.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(d){return d+s}}function bc(){return[Yu(),tl(),ml(),sc(),fc()]}function Ec(e){return{extensions:[Wu(),nl(),gl(),hc(e),pc()]}}function Pe(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 De(e,t){return e.length>0?(Pe(e,e.length,0,t),e):t}const Si={}.hasOwnProperty;function us(e){const t={};let n=-1;for(;++n<e.length;)Tc(t,e[n]);return t}function Tc(e,t){let n;for(n in t){const i=(Si.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){Si.call(i,s)||(i[s]=[]);const u=a[s];xc(i[s],Array.isArray(u)?u:u?[u]:[])}}}function xc(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pe(e,0,0,r)}const wc={tokenize:Ic,partial:!0},ls={tokenize:Sc,partial:!0},cs={tokenize:Nc,partial:!0},ds={tokenize:Oc,partial:!0},yc={tokenize:Lc,partial:!0},hs={name:"wwwAutolink",tokenize:Cc,previous:ps},fs={name:"protocolAutolink",tokenize:kc,previous:ms},$e={name:"emailAutolink",tokenize:Ac,previous:gs},We={};function _c(){return{text:We}}let dt=48;for(;dt<123;)We[dt]=$e,dt++,dt===58?dt=65:dt===91&&(dt=97);We[43]=$e;We[45]=$e;We[46]=$e;We[95]=$e;We[72]=[$e,fs];We[104]=[$e,fs];We[87]=[$e,hs];We[119]=[$e,hs];function Ac(e,t,n){const r=this;let i,a;return s;function s(h){return!br(h)||!gs.call(r,r.previous)||Hr(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(h))}function u(h){return br(h)?(e.consume(h),u):h===64?(e.consume(h),l):n(h)}function l(h){return h===46?e.check(yc,d,c)(h):h===45||h===95||_e(h)?(a=!0,e.consume(h),l):d(h)}function c(h){return e.consume(h),i=!0,l}function d(h){return a&&i&&ke(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function Cc(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!ps.call(r,r.previous)||Hr(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(wc,e.attempt(ls,e.attempt(cs,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function kc(e,t,n){const r=this;let i="",a=!1;return s;function s(h){return(h===72||h===104)&&ms.call(r,r.previous)&&!Hr(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),u):n(h)}function u(h){if(ke(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),u;if(h===58){const g=i.toLowerCase();if(g==="http"||g==="https")return e.consume(h),l}return n(h)}function l(h){return h===47?(e.consume(h),a?c:(a=!0,l)):n(h)}function c(h){return h===null||kn(h)||oe(h)||mt(h)||Pn(h)?n(h):e.attempt(ls,e.attempt(cs,d),n)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function Ic(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 Sc(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(ds,l,u)(c):c===null||oe(c)||mt(c)||c!==45&&Pn(c)?l(c):(a=!0,e.consume(c),s)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function l(c){return i||r||!a?n(c):t(c)}}function Nc(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(ds,t,a)(s):s===null||oe(s)||mt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function Oc(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||oe(u)||mt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||oe(u)||mt(u)?t(u):r(u)}function a(u){return ke(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):ke(u)?(e.consume(u),s):n(u)}}function Lc(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return _e(a)?n(a):t(a)}}function ps(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oe(e)}function ms(e){return!ke(e)}function gs(e){return!(e===47||br(e))}function br(e){return e===43||e===45||e===46||e===95||_e(e)}function Hr(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 Ot(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&_e(e.charCodeAt(n+1))&&_e(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 u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),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 In(e){if(e===null||oe(e)||mt(e))return 1;if(Pn(e))return 2}function Hn(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 Er={name:"attention",tokenize:Dc,resolveAll:Rc};function Rc(e,t){let n=-1,r,i,a,s,u,l,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h=Object.assign({},e[r][1].end),g=Object.assign({},e[n][1].start);Ni(h,-l),Ni(g,l),s={type:l>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[r][1].end)},u={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:g},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},u.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},u.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=De(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=De(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=De(c,Hn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=De(c,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=De(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Pe(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Dc(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=In(r);let a;return s;function s(l){return a=l,e.enter("attentionSequence"),u(l)}function u(l){if(l===a)return e.consume(l),u;const c=e.exit("attentionSequence"),d=In(l),h=!d||d===2&&i||n.includes(l),g=!i||i===2&&d||n.includes(r);return c._open=!!(a===42?h:h&&(i||!g)),c._close=!!(a===42?g:g&&(d||!h)),t(l)}}function Ni(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vc={name:"autolink",tokenize:Pc};function Pc(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return ke(p)?(e.consume(p),s):p===64?n(p):c(p)}function s(p){return p===43||p===45||p===46||_e(p)?(r=1,u(p)):c(p)}function u(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||_e(p))&&r++<32?(e.consume(p),u):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||kn(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),d):Iu(p)?(e.consume(p),c):n(p)}function d(p){return _e(p)?h(p):n(p)}function h(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):g(p)}function g(p){if((p===45||_e(p))&&r++<63){const E=p===45?g:h;return e.consume(p),E}return n(p)}}function te(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(l){return J(l)?(e.enter(n),u(l)):t(l)}function u(l){return J(l)&&a++<i?(e.consume(l),u):(e.exit(n),t(l))}}const un={tokenize:Mc,partial:!0};function Mc(e,t,n){return r;function r(a){return J(a)?te(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||W(a)?t(a):n(a)}}const bs={name:"blockQuote",tokenize:Bc,continuation:{tokenize:Fc},exit:Hc};function Bc(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return J(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Fc(e,t,n){const r=this;return i;function i(s){return J(s)?te(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(bs,t,n)(s)}}function Hc(e){e.exit("blockQuote")}const Es={name:"characterEscape",tokenize:Uc};function Uc(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 Nu(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Ts={name:"characterReference",tokenize:zc};function zc(e,t,n){const r=this;let i=0,a,s;return u;function u(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),l}function l(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=_e,d(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=Su,d):(e.enter("characterReferenceValue"),a=7,s=mr,d(h))}function d(h){if(h===59&&i){const g=e.exit("characterReferenceValue");return s===_e&&!Fr(r.sliceSerialize(g))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(h)&&i++<a?(e.consume(h),d):n(h)}}const Oi={tokenize:Yc,partial:!0},Li={name:"codeFenced",tokenize:jc,concrete:!0};function jc(e,t,n){const r=this,i={tokenize:F,partial:!0};let a=0,s=0,u;return l;function l(S){return c(S)}function c(S){const Y=r.events[r.events.length-1];return a=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,u=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(S)}function d(S){return S===u?(s++,e.consume(S),d):s<3?n(S):(e.exit("codeFencedFenceSequence"),J(S)?te(e,h,"whitespace")(S):h(S))}function h(S){return S===null||W(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(Oi,y,M)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||W(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(S)):J(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),te(e,p,"whitespace")(S)):S===96&&S===u?n(S):(e.consume(S),g)}function p(S){return S===null||W(S)?h(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(S))}function E(S){return S===null||W(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(S)):S===96&&S===u?n(S):(e.consume(S),E)}function y(S){return e.attempt(i,M,k)(S)}function k(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),_}function _(S){return a>0&&J(S)?te(e,N,"linePrefix",a+1)(S):N(S)}function N(S){return S===null||W(S)?e.check(Oi,y,M)(S):(e.enter("codeFlowValue"),L(S))}function L(S){return S===null||W(S)?(e.exit("codeFlowValue"),N(S)):(e.consume(S),L)}function M(S){return e.exit("codeFenced"),t(S)}function F(S,Y,z){let j=0;return C;function C(K){return S.enter("lineEnding"),S.consume(K),S.exit("lineEnding"),H}function H(K){return S.enter("codeFencedFence"),J(K)?te(S,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):P(K)}function P(K){return K===u?(S.enter("codeFencedFenceSequence"),ne(K)):z(K)}function ne(K){return K===u?(j++,S.consume(K),ne):j>=s?(S.exit("codeFencedFenceSequence"),J(K)?te(S,re,"whitespace")(K):re(K)):z(K)}function re(K){return K===null||W(K)?(S.exit("codeFencedFence"),Y(K)):z(K)}}}function Yc(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 Zn={name:"codeIndented",tokenize:qc},Wc={tokenize:Vc,partial:!0};function qc(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),te(e,a,"linePrefix",5)(c)}function a(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?l(c):W(c)?e.attempt(Wc,s,l)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||W(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function l(c){return e.exit("codeIndented"),t(c)}}function Vc(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):W(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):te(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):W(s)?i(s):n(s)}}const Gc={name:"codeText",tokenize:Kc,resolve:Qc,previous:Xc};function Qc(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 Xc(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Kc(e,t,n){let r=0,i,a;return s;function s(h){return e.enter("codeText"),e.enter("codeTextSequence"),u(h)}function u(h){return h===96?(e.consume(h),r++,u):(e.exit("codeTextSequence"),l(h))}function l(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),l):h===96?(a=e.enter("codeTextSequence"),i=0,d(h)):W(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||W(h)?(e.exit("codeTextData"),l(h)):(e.consume(h),c)}function d(h){return h===96?(e.consume(h),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",c(h))}}class $c{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&&Ut(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),Ut(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ut(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);Ut(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ut(this.left,n.reverse())}}}function Ut(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 xs(e){const t={};let n=-1,r,i,a,s,u,l,c;const d=new $c(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Jc(d,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(s=d.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},d.get(i)[1].start),u=d.slice(i,n),u.unshift(r),d.splice(i,n-i+1,u))}}return Pe(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!c}function Jc(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[],s=n._tokenizer||r.parser[n.contentType](n.start),u=s.events,l=[],c={};let d,h,g=-1,p=n,E=0,y=0;const k=[y];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),h&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=n;++g<u.length;)u[g][0]==="exit"&&u[g-1][0]==="enter"&&u[g][1].type===u[g-1][1].type&&u[g][1].start.line!==u[g][1].end.line&&(y=g+1,k.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):k.pop(),g=k.length;g--;){const _=u.slice(k[g],k[g+1]),N=a.pop();l.push([N,N+_.length-1]),e.splice(N,2,_)}for(l.reverse(),g=-1;++g<l.length;)c[E+l[g][0]]=E+l[g][1],E+=l[g][1]-l[g][0]-1;return c}const Zc={tokenize:nd,resolve:td},ed={tokenize:rd,partial:!0};function td(e){return xs(e),e}function nd(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):W(u)?e.check(ed,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function rd(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),te(e,a,"linePrefix")}function a(s){if(s===null||W(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function ws(e,t,n,r,i,a,s,u,l){const c=l||Number.POSITIVE_INFINITY;let d=0;return h;function h(_){return _===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(_),e.exit(a),g):_===null||_===32||_===41||kn(_)?n(_):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),y(_))}function g(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(_))}function p(_){return _===62?(e.exit("chunkString"),e.exit(u),g(_)):_===null||_===60||W(_)?n(_):(e.consume(_),_===92?E:p)}function E(_){return _===60||_===62||_===92?(e.consume(_),p):p(_)}function y(_){return!d&&(_===null||_===41||oe(_))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(_)):d<c&&_===40?(e.consume(_),d++,y):_===41?(e.consume(_),d--,y):_===null||_===32||_===40||kn(_)?n(_):(e.consume(_),_===92?k:y)}function k(_){return _===40||_===41||_===92?(e.consume(_),y):y(_)}}function ys(e,t,n,r,i,a){const s=this;let u=0,l;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),d}function d(p){return u>999||p===null||p===91||p===93&&!l||p===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):W(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||W(p)||u++>999?(e.exit("chunkString"),d(p)):(e.consume(p),l||(l=!J(p)),p===92?g:h)}function g(p){return p===91||p===92||p===93?(e.consume(p),u++,h):h(p)}}function _s(e,t,n,r,i,a){let s;return u;function u(g){return g===34||g===39||g===40?(e.enter(r),e.enter(i),e.consume(g),e.exit(i),s=g===40?41:g,l):n(g)}function l(g){return g===s?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):(e.enter(a),c(g))}function c(g){return g===s?(e.exit(a),l(s)):g===null?n(g):W(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),te(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===s||g===null||W(g)?(e.exit("chunkString"),c(g)):(e.consume(g),g===92?h:d)}function h(g){return g===s||g===92?(e.consume(g),d):d(g)}}function Gt(e,t){let n;return r;function r(i){return W(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):J(i)?te(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const id={name:"definition",tokenize:sd},ad={tokenize:od,partial:!0};function sd(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),s(p)}function s(p){return ys.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=Fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return oe(p)?Gt(e,c)(p):c(p)}function c(p){return ws(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(ad,h,h)(p)}function h(p){return J(p)?te(e,g,"whitespace")(p):g(p)}function g(p){return p===null||W(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function od(e,t,n){return r;function r(u){return oe(u)?Gt(e,i)(u):n(u)}function i(u){return _s(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return J(u)?te(e,s,"whitespace")(u):s(u)}function s(u){return u===null||W(u)?t(u):n(u)}}const ud={name:"hardBreakEscape",tokenize:ld};function ld(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return W(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const cd={name:"headingAtx",tokenize:hd,resolve:dd};function dd(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"},Pe(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function hd(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||oe(d)?(e.exit("atxHeadingSequence"),u(d)):n(d)}function u(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||W(d)?(e.exit("atxHeading"),t(d)):J(d)?te(e,u,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),u(d))}function c(d){return d===null||d===35||oe(d)?(e.exit("atxHeadingText"),u(d)):(e.consume(d),c)}}const fd=["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"],Ri=["pre","script","style","textarea"],pd={name:"htmlFlow",tokenize:Ed,resolveTo:bd,concrete:!0},md={tokenize:xd,partial:!0},gd={tokenize:Td,partial:!0};function bd(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 Ed(e,t,n){const r=this;let i,a,s,u,l;return c;function c(w){return d(w)}function d(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),h}function h(w){return w===33?(e.consume(w),g):w===47?(e.consume(w),a=!0,y):w===63?(e.consume(w),i=3,r.interrupt?t:x):ke(w)?(e.consume(w),s=String.fromCharCode(w),k):n(w)}function g(w){return w===45?(e.consume(w),i=2,p):w===91?(e.consume(w),i=5,u=0,E):ke(w)?(e.consume(w),i=4,r.interrupt?t:x):n(w)}function p(w){return w===45?(e.consume(w),r.interrupt?t:x):n(w)}function E(w){const Ne="CDATA[";return w===Ne.charCodeAt(u++)?(e.consume(w),u===Ne.length?r.interrupt?t:P:E):n(w)}function y(w){return ke(w)?(e.consume(w),s=String.fromCharCode(w),k):n(w)}function k(w){if(w===null||w===47||w===62||oe(w)){const Ne=w===47,lt=s.toLowerCase();return!Ne&&!a&&Ri.includes(lt)?(i=1,r.interrupt?t(w):P(w)):fd.includes(s.toLowerCase())?(i=6,Ne?(e.consume(w),_):r.interrupt?t(w):P(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):a?N(w):L(w))}return w===45||_e(w)?(e.consume(w),s+=String.fromCharCode(w),k):n(w)}function _(w){return w===62?(e.consume(w),r.interrupt?t:P):n(w)}function N(w){return J(w)?(e.consume(w),N):C(w)}function L(w){return w===47?(e.consume(w),C):w===58||w===95||ke(w)?(e.consume(w),M):J(w)?(e.consume(w),L):C(w)}function M(w){return w===45||w===46||w===58||w===95||_e(w)?(e.consume(w),M):F(w)}function F(w){return w===61?(e.consume(w),S):J(w)?(e.consume(w),F):L(w)}function S(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),l=w,Y):J(w)?(e.consume(w),S):z(w)}function Y(w){return w===l?(e.consume(w),l=null,j):w===null||W(w)?n(w):(e.consume(w),Y)}function z(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||oe(w)?F(w):(e.consume(w),z)}function j(w){return w===47||w===62||J(w)?L(w):n(w)}function C(w){return w===62?(e.consume(w),H):n(w)}function H(w){return w===null||W(w)?P(w):J(w)?(e.consume(w),H):n(w)}function P(w){return w===45&&i===2?(e.consume(w),ce):w===60&&i===1?(e.consume(w),fe):w===62&&i===4?(e.consume(w),de):w===63&&i===3?(e.consume(w),x):w===93&&i===5?(e.consume(w),Te):W(w)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(md,Re,ne)(w)):w===null||W(w)?(e.exit("htmlFlowData"),ne(w)):(e.consume(w),P)}function ne(w){return e.check(gd,re,Re)(w)}function re(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),K}function K(w){return w===null||W(w)?ne(w):(e.enter("htmlFlowData"),P(w))}function ce(w){return w===45?(e.consume(w),x):P(w)}function fe(w){return w===47?(e.consume(w),s="",Ee):P(w)}function Ee(w){if(w===62){const Ne=s.toLowerCase();return Ri.includes(Ne)?(e.consume(w),de):P(w)}return ke(w)&&s.length<8?(e.consume(w),s+=String.fromCharCode(w),Ee):P(w)}function Te(w){return w===93?(e.consume(w),x):P(w)}function x(w){return w===62?(e.consume(w),de):w===45&&i===2?(e.consume(w),x):P(w)}function de(w){return w===null||W(w)?(e.exit("htmlFlowData"),Re(w)):(e.consume(w),de)}function Re(w){return e.exit("htmlFlow"),t(w)}}function Td(e,t,n){const r=this;return i;function i(s){return W(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 xd(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(un,t,n)}}const wd={name:"htmlText",tokenize:yd};function yd(e,t,n){const r=this;let i,a,s;return u;function u(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),l}function l(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),F):x===63?(e.consume(x),L):ke(x)?(e.consume(x),z):n(x)}function c(x){return x===45?(e.consume(x),d):x===91?(e.consume(x),a=0,E):ke(x)?(e.consume(x),N):n(x)}function d(x){return x===45?(e.consume(x),p):n(x)}function h(x){return x===null?n(x):x===45?(e.consume(x),g):W(x)?(s=h,fe(x)):(e.consume(x),h)}function g(x){return x===45?(e.consume(x),p):h(x)}function p(x){return x===62?ce(x):x===45?g(x):h(x)}function E(x){const de="CDATA[";return x===de.charCodeAt(a++)?(e.consume(x),a===de.length?y:E):n(x)}function y(x){return x===null?n(x):x===93?(e.consume(x),k):W(x)?(s=y,fe(x)):(e.consume(x),y)}function k(x){return x===93?(e.consume(x),_):y(x)}function _(x){return x===62?ce(x):x===93?(e.consume(x),_):y(x)}function N(x){return x===null||x===62?ce(x):W(x)?(s=N,fe(x)):(e.consume(x),N)}function L(x){return x===null?n(x):x===63?(e.consume(x),M):W(x)?(s=L,fe(x)):(e.consume(x),L)}function M(x){return x===62?ce(x):L(x)}function F(x){return ke(x)?(e.consume(x),S):n(x)}function S(x){return x===45||_e(x)?(e.consume(x),S):Y(x)}function Y(x){return W(x)?(s=Y,fe(x)):J(x)?(e.consume(x),Y):ce(x)}function z(x){return x===45||_e(x)?(e.consume(x),z):x===47||x===62||oe(x)?j(x):n(x)}function j(x){return x===47?(e.consume(x),ce):x===58||x===95||ke(x)?(e.consume(x),C):W(x)?(s=j,fe(x)):J(x)?(e.consume(x),j):ce(x)}function C(x){return x===45||x===46||x===58||x===95||_e(x)?(e.consume(x),C):H(x)}function H(x){return x===61?(e.consume(x),P):W(x)?(s=H,fe(x)):J(x)?(e.consume(x),H):j(x)}function P(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,ne):W(x)?(s=P,fe(x)):J(x)?(e.consume(x),P):(e.consume(x),re)}function ne(x){return x===i?(e.consume(x),i=void 0,K):x===null?n(x):W(x)?(s=ne,fe(x)):(e.consume(x),ne)}function re(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||oe(x)?j(x):(e.consume(x),re)}function K(x){return x===47||x===62||oe(x)?j(x):n(x)}function ce(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function fe(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Ee}function Ee(x){return J(x)?te(e,Te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):Te(x)}function Te(x){return e.enter("htmlTextData"),s(x)}}const Ur={name:"labelEnd",tokenize:Sd,resolveTo:Id,resolveAll:kd},_d={tokenize:Nd},Ad={tokenize:Od},Cd={tokenize:Ld};function kd(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function Id(e,t){let n=e.length,r=0,i,a,s,u;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 l={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[s][1].end)},d={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return u=[["enter",l,t],["enter",c,t]],u=De(u,e.slice(a+1,a+r+3)),u=De(u,[["enter",d,t]]),u=De(u,Hn(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=De(u,[["exit",d,t],e[s-2],e[s-1],["exit",c,t]]),u=De(u,e.slice(s+1)),u=De(u,[["exit",l,t]]),Pe(e,a,e.length,u),e}function Sd(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 u;function u(g){return a?a._inactive?h(g):(s=r.parser.defined.includes(Fe(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),l):n(g)}function l(g){return g===40?e.attempt(_d,d,s?d:h)(g):g===91?e.attempt(Ad,d,s?c:h)(g):s?d(g):h(g)}function c(g){return e.attempt(Cd,d,h)(g)}function d(g){return t(g)}function h(g){return a._balanced=!0,n(g)}}function Nd(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return oe(h)?Gt(e,a)(h):a(h)}function a(h){return h===41?d(h):ws(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return oe(h)?Gt(e,l)(h):d(h)}function u(h){return n(h)}function l(h){return h===34||h===39||h===40?_s(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function c(h){return oe(h)?Gt(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function Od(e,t,n){const r=this;return i;function i(u){return ys.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(Fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function Ld(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 Rd={name:"labelStartImage",tokenize:Dd,resolveAll:Ur.resolveAll};function Dd(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const vd={name:"labelStartLink",tokenize:Pd,resolveAll:Ur.resolveAll};function Pd(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 er={name:"lineEnding",tokenize:Md};function Md(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),te(e,t,"linePrefix")}}const wn={name:"thematicBreak",tokenize:Bd};function Bd(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||W(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),J(c)?te(e,u,"whitespace")(c):u(c))}}const Se={name:"list",tokenize:Ud,continuation:{tokenize:zd},exit:Yd},Fd={tokenize:Wd,partial:!0},Hd={tokenize:jd,partial:!0};function Ud(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 u;function u(p){const E=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:mr(p)){if(r.containerState.type||(r.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(wn,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return mr(p)&&++s<10?(e.consume(p),l):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(un,r.interrupt?n:d,e.attempt(Fd,g,h))}function d(p){return r.containerState.initialBlankLine=!0,a++,g(p)}function h(p){return J(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),g):n(p)}function g(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function zd(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(un,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,te(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!J(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Hd,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,te(e,e.attempt(Se,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function jd(e,t,n){const r=this;return te(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 Yd(e){e.exit(this.containerState.type)}function Wd(e,t,n){const r=this;return te(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!J(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Di={name:"setextUnderline",tokenize:Vd,resolveTo:qd};function qd(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:Object.assign({},e[i][1].start),end:Object.assign({},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=Object.assign({},e[a][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function Vd(e,t,n){const r=this;let i;return a;function a(c){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),J(c)?te(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||W(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Gd={tokenize:th,partial:!0};function Qd(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Jd,continuation:{tokenize:Zd},exit:eh}},text:{91:{name:"gfmFootnoteCall",tokenize:$d},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xd,resolveTo:Kd}}}}function Xd(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return u;function u(l){if(!s||!s._balanced)return n(l);const c=Fe(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Kd(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const 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)},u=[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,...u),e}function $d(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(a>999||h===93&&!s||h===null||h===91||oe(h))return n(h);if(h===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return i.includes(Fe(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return oe(h)||(s=!0),a++,e.consume(h),h===92?d:c}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function Jd(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return l;function l(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(E)}function d(E){if(s>999||E===93&&!u||E===null||E===91||oe(E))return n(E);if(E===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return a=Fe(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return oe(E)||(u=!0),s++,e.consume(E),E===92?h:d}function h(E){return E===91||E===92||E===93?(e.consume(E),s++,d):d(E)}function g(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),i.includes(a)||i.push(a),te(e,p,"gfmFootnoteDefinitionWhitespace")):n(E)}function p(E){return t(E)}}function Zd(e,t,n){return e.check(un,t,e.attempt(Gd,t,n))}function eh(e){e.exit("gfmFootnoteDefinition")}function th(e,t,n){const r=this;return te(e,i,"gfmFootnoteDefinitionIndent",5);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 nh(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,u){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},h={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},g=[["enter",d,u],["enter",s[c][1],u],["exit",s[c][1],u],["enter",h,u]],p=u.parser.constructs.insideSpan.null;p&&Pe(g,g.length,0,Hn(p,s.slice(c+1,l),u)),Pe(g,g.length,0,[["exit",h,u],["enter",s[l][1],u],["exit",s[l][1],u],["exit",d,u]]),Pe(s,c-1,l-c+3,g),l=c+g.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function a(s,u,l){const c=this.previous,d=this.events;let h=0;return g;function g(E){return c===126&&d[d.length-1][1].type!=="characterEscape"?l(E):(s.enter("strikethroughSequenceTemporary"),p(E))}function p(E){const y=In(c);if(E===126)return h>1?l(E):(s.consume(E),h++,p);if(h<2&&!n)return l(E);const k=s.exit("strikethroughSequenceTemporary"),_=In(E);return k._open=!_||_===2&&!!y,k._close=!y||y===2&&!!_,u(E)}}}class rh{constructor(){this.map=[]}add(t,n,r){ih(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]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function ih(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 ah(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 sh(){return{flow:{null:{name:"table",tokenize:oh,resolveAll:uh}}}}function oh(e,t,n){const r=this;let i=0,a=0,s;return u;function u(C){let H=r.events.length-1;for(;H>-1;){const re=r.events[H][1].type;if(re==="lineEnding"||re==="linePrefix")H--;else break}const P=H>-1?r.events[H][1].type:null,ne=P==="tableHead"||P==="tableRow"?S:l;return ne===S&&r.parser.lazy[r.now().line]?n(C):ne(C)}function l(C){return e.enter("tableHead"),e.enter("tableRow"),c(C)}function c(C){return C===124||(s=!0,a+=1),d(C)}function d(C){return C===null?n(C):W(C)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),p):n(C):J(C)?te(e,d,"whitespace")(C):(a+=1,s&&(s=!1,i+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),h(C)))}function h(C){return C===null||C===124||oe(C)?(e.exit("data"),d(C)):(e.consume(C),C===92?g:h)}function g(C){return C===92||C===124?(e.consume(C),h):h(C)}function p(C){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(C):(e.enter("tableDelimiterRow"),s=!1,J(C)?te(e,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):E(C))}function E(C){return C===45||C===58?k(C):C===124?(s=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),y):F(C)}function y(C){return J(C)?te(e,k,"whitespace")(C):k(C)}function k(C){return C===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),_):C===45?(a+=1,_(C)):C===null||W(C)?M(C):F(C)}function _(C){return C===45?(e.enter("tableDelimiterFiller"),N(C)):F(C)}function N(C){return C===45?(e.consume(C),N):C===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(C))}function L(C){return J(C)?te(e,M,"whitespace")(C):M(C)}function M(C){return C===124?E(C):C===null||W(C)?!s||i!==a?F(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):F(C)}function F(C){return n(C)}function S(C){return e.enter("tableRow"),Y(C)}function Y(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),Y):C===null||W(C)?(e.exit("tableRow"),t(C)):J(C)?te(e,Y,"whitespace")(C):(e.enter("data"),z(C))}function z(C){return C===null||C===124||oe(C)?(e.exit("data"),Y(C)):(e.consume(C),C===92?j:z)}function j(C){return C===92||C===124?(e.consume(C),z):z(C)}}function uh(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,l=0,c,d,h;const g=new rh;for(;++n<e.length;){const p=e[n],E=p[1];p[0]==="enter"?E.type==="tableHead"?(u=!1,l!==0&&(vi(g,t,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},g.add(n,0,[["enter",c,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,h=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,d={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},g.add(n,0,[["enter",d,t]])),i=E.type==="tableDelimiterRow"?2:d?3:1):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],h=gn(g,t,a,i,void 0,h),a=[0,0,0,0]),s[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],h=gn(g,t,a,i,void 0,h)),a=s,s=[a[1],n,0,0])):E.type==="tableHead"?(u=!0,l=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(l=n,a[1]!==0?(s[0]=s[1],h=gn(g,t,a,i,n,h)):s[1]!==0&&(h=gn(g,t,s,i,n,h)),i=0):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(s[3]=n)}for(l!==0&&vi(g,t,l,c,d),g.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=ah(t.events,n))}return e}function gn(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},yt(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=yt(t.events,n[1]);if(a={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=yt(t.events,n[2]),d=yt(t.events,n[3]),h={type:u,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const g=t.events[n[2]],p=t.events[n[3]];if(g[1].end=Object.assign({},p[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,y=n[3]-n[2]-1;e.add(E,y,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(a.end=Object.assign({},yt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function vi(e,t,n,r,i){const a=[],s=yt(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 yt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const lh={name:"tasklistCheck",tokenize:dh};function ch(){return{text:{91:lh}}}function dh(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return oe(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(l)}function u(l){return W(l)?t(l):J(l)?e.check({tokenize:hh},t,n)(l):n(l)}}function hh(e,t,n){return te(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function fh(e){return us([_c(),Qd(),nh(e),sh(),ch()])}const ph={};function As(e){const t=this,n=e||ph,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(fh(n)),a.push(bc()),s.push(Ec(n))}function Pi(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 Cs(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const mh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bh={};function Mi(e,t){return(bh.jsx?gh:mh).test(e)}const Eh=/[ \t\n\f\r]/g;function Th(e){return typeof e=="object"?e.type==="text"?Bi(e.value):!1:Bi(e)}function Bi(e){return e.replace(Eh,"")===""}class ln{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ln.prototype.property={};ln.prototype.normal={};ln.prototype.space=null;function ks(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new ln(n,r,t)}function en(e){return e.toLowerCase()}class Me{constructor(t,n){this.property=t,this.attribute=n}}Me.prototype.space=null;Me.prototype.boolean=!1;Me.prototype.booleanish=!1;Me.prototype.overloadedBoolean=!1;Me.prototype.number=!1;Me.prototype.commaSeparated=!1;Me.prototype.spaceSeparated=!1;Me.prototype.commaOrSpaceSeparated=!1;Me.prototype.mustUseProperty=!1;Me.prototype.defined=!1;let xh=0;const G=gt(),me=gt(),Is=gt(),v=gt(),ue=gt(),At=gt(),Le=gt();function gt(){return 2**++xh}const Tr=Object.freeze(Object.defineProperty({__proto__:null,boolean:G,booleanish:me,commaOrSpaceSeparated:Le,commaSeparated:At,number:v,overloadedBoolean:Is,spaceSeparated:ue},Symbol.toStringTag,{value:"Module"})),tr=Object.keys(Tr);class zr extends Me{constructor(t,n,r,i){let a=-1;if(super(t,n),Fi(this,"space",i),typeof r=="number")for(;++a<tr.length;){const s=tr[a];Fi(this,tr[a],(r&Tr[s])===Tr[s])}}}zr.prototype.defined=!0;function Fi(e,t,n){n&&(e[t]=n)}const wh={}.hasOwnProperty;function Lt(e){const t={},n={};let r;for(r in e.properties)if(wh.call(e.properties,r)){const i=e.properties[r],a=new zr(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[en(r)]=r,n[en(a.attribute)]=r}return new ln(t,n,e.space)}const Ss=Lt({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Ns=Lt({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Os(e,t){return t in e?e[t]:t}function Ls(e,t){return Os(e,t.toLowerCase())}const Rs=Lt({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ls,properties:{xmlns:null,xmlnsXLink:null}}),Ds=Lt({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:me,ariaAutoComplete:null,ariaBusy:me,ariaChecked:me,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:ue,ariaCurrent:null,ariaDescribedBy:ue,ariaDetails:null,ariaDisabled:me,ariaDropEffect:ue,ariaErrorMessage:null,ariaExpanded:me,ariaFlowTo:ue,ariaGrabbed:me,ariaHasPopup:null,ariaHidden:me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ue,ariaLevel:v,ariaLive:null,ariaModal:me,ariaMultiLine:me,ariaMultiSelectable:me,ariaOrientation:null,ariaOwns:ue,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:me,ariaReadOnly:me,ariaRelevant:null,ariaRequired:me,ariaRoleDescription:ue,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:me,ariaSetSize:v,ariaSort:null,ariaValueMax:v,ariaValueMin:v,ariaValueNow:v,ariaValueText:null,role:null}}),yh=Lt({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ls,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:At,acceptCharset:ue,accessKey:ue,action:null,allow:null,allowFullScreen:G,allowPaymentRequest:G,allowUserMedia:G,alt:null,as:null,async:G,autoCapitalize:null,autoComplete:ue,autoFocus:G,autoPlay:G,blocking:ue,capture:null,charSet:null,checked:G,cite:null,className:ue,cols:v,colSpan:null,content:null,contentEditable:me,controls:G,controlsList:ue,coords:v|At,crossOrigin:null,data:null,dateTime:null,decoding:null,default:G,defer:G,dir:null,dirName:null,disabled:G,download:Is,draggable:me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:G,formTarget:null,headers:ue,height:v,hidden:G,high:v,href:null,hrefLang:null,htmlFor:ue,httpEquiv:ue,id:null,imageSizes:null,imageSrcSet:null,inert:G,inputMode:null,integrity:null,is:null,isMap:G,itemId:null,itemProp:ue,itemRef:ue,itemScope:G,itemType:ue,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:G,low:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,multiple:G,muted:G,name:null,nonce:null,noModule:G,noValidate:G,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:G,optimum:v,pattern:null,ping:ue,placeholder:null,playsInline:G,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:G,referrerPolicy:null,rel:ue,required:G,reversed:G,rows:v,rowSpan:v,sandbox:ue,scope:null,scoped:G,seamless:G,selected:G,shadowRootClonable:G,shadowRootDelegatesFocus:G,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v,step:null,style:null,tabIndex:v,target:null,title:null,translate:null,type:null,typeMustMatch:G,useMap:null,value:me,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ue,axis:null,background:null,bgColor:null,border:v,borderColor:null,bottomMargin:v,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:G,declare:G,event:null,face:null,frame:null,frameBorder:null,hSpace:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:G,noHref:G,noShade:G,noWrap:G,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:me,standby:null,summary:null,text:null,topMargin:v,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:G,disableRemotePlayback:G,prefix:null,property:null,results:v,security:null,unselectable:null}}),_h=Lt({space:"svg",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"},transform:Os,properties:{about:Le,accentHeight:v,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v,amplitude:v,arabicForm:null,ascent:v,attributeName:null,attributeType:null,azimuth:v,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v,by:null,calcMode:null,capHeight:v,className:ue,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:v,diffuseConstant:v,direction:null,display:null,dur:null,divisor:v,dominantBaseline:null,download:G,dx:null,dy:null,edgeMode:null,editable:null,elevation:v,enableBackground:null,end:null,event:null,exponent:v,externalResourcesRequired:null,fill:null,fillOpacity:v,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:At,g2:At,glyphName:At,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v,horizOriginX:v,horizOriginY:v,id:null,ideographic:v,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v,k:v,k1:v,k2:v,k3:v,k4:v,kernelMatrix:Le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v,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:v,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:v,overlineThickness:v,paintOrder:null,panose1:null,path:null,pathLength:v,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ue,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Le,rev:Le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Le,requiredFeatures:Le,requiredFonts:Le,requiredFormats:Le,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:v,specularExponent:v,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v,strikethroughThickness:v,string:null,stroke:null,strokeDashArray:Le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v,strokeOpacity:v,strokeWidth:null,style:null,surfaceScale:v,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Le,tabIndex:v,tableValues:null,target:null,targetX:v,targetY:v,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:v,underlineThickness:v,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v,values:null,vAlphabetic:v,vMathematical:v,vectorEffect:null,vHanging:v,vIdeographic:v,version:null,vertAdvY:v,vertOriginX:v,vertOriginY:v,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Ah=/^data[-\w.:]+$/i,Hi=/-[a-z]/g,Ch=/[A-Z]/g;function Un(e,t){const n=en(t);let r=t,i=Me;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ah.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Hi,Ih);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Hi.test(a)){let s=a.replace(Ch,kh);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=zr}return new i(r,t)}function kh(e){return"-"+e.toLowerCase()}function Ih(e){return e.charAt(1).toUpperCase()}const Sh={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"},cn=ks([Ns,Ss,Rs,Ds,yh],"html"),ot=ks([Ns,Ss,Rs,Ds,_h],"svg");function Ui(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function vs(e){return e.join(" ").trim()}var Ps={},zi=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Nh=/\n/g,Oh=/^\s*/,Lh=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Rh=/^:\s*/,Dh=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,vh=/^[;\s]*/,Ph=/^\s+|\s+$/g,Mh=`
|
|
16
|
-
`,ji="/",Yi="*",ht="",Bh="comment",Fh="declaration",Hh=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(E){var y=E.match(Nh);y&&(n+=y.length);var k=E.lastIndexOf(Mh);r=~k?E.length-k:r+E.length}function a(){var E={line:n,column:r};return function(y){return y.position=new s(E),c(),y}}function s(E){this.start=E,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function u(E){var y=new Error(t.source+":"+n+":"+r+": "+E);if(y.reason=E,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function l(E){var y=E.exec(e);if(y){var k=y[0];return i(k),e=e.slice(k.length),y}}function c(){l(Oh)}function d(E){var y;for(E=E||[];y=h();)y!==!1&&E.push(y);return E}function h(){var E=a();if(!(ji!=e.charAt(0)||Yi!=e.charAt(1))){for(var y=2;ht!=e.charAt(y)&&(Yi!=e.charAt(y)||ji!=e.charAt(y+1));)++y;if(y+=2,ht===e.charAt(y-1))return u("End of comment missing");var k=e.slice(2,y-2);return r+=2,i(k),e=e.slice(y),r+=2,E({type:Bh,comment:k})}}function g(){var E=a(),y=l(Lh);if(y){if(h(),!l(Rh))return u("property missing ':'");var k=l(Dh),_=E({type:Fh,property:Wi(y[0].replace(zi,ht)),value:k?Wi(k[0].replace(zi,ht)):ht});return l(vh),_}}function p(){var E=[];d(E);for(var y;y=g();)y!==!1&&(E.push(y),d(E));return E}return c(),p()};function Wi(e){return e?e.replace(Ph,ht):ht}var Uh=U.commonjsGlobal&&U.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ps,"__esModule",{value:!0});var qi=Ps.default=jh,zh=Uh(Hh);function jh(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,zh.default)(e),i=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var s=a.property,u=a.value;i?t(s,u,a):u&&(n=n||{},n[s]=u)}}),n}const Yh=qi.default||qi,zn=Ms("end"),qe=Ms("start");function Ms(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 Wh(e){const t=qe(e),n=zn(e);if(t&&n)return{start:t,end:n}}function Qt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Vi(e.position):"start"in e||"end"in e?Vi(e):"line"in e||"column"in e?xr(e):""}function xr(e){return Gi(e&&e.line)+":"+Gi(e&&e.column)}function Vi(e){return xr(e&&e.start)+"-"+xr(e&&e.end)}function Gi(e){return e&&typeof e=="number"?e:1}class Ae 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 l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const u=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=u?u.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=u?u.line:void 0,this.name=Qt(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,this.expected,this.note,this.url}}Ae.prototype.file="";Ae.prototype.name="";Ae.prototype.reason="";Ae.prototype.message="";Ae.prototype.stack="";Ae.prototype.column=void 0;Ae.prototype.line=void 0;Ae.prototype.ancestors=void 0;Ae.prototype.cause=void 0;Ae.prototype.fatal=void 0;Ae.prototype.place=void 0;Ae.prototype.ruleId=void 0;Ae.prototype.source=void 0;const jr={}.hasOwnProperty,qh=new Map,Vh=/[A-Z]/g,Gh=/-([a-z])/g,Qh=new Set(["table","tbody","thead","tfoot","tr"]),Xh=new Set(["td","th"]),Bs="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Kh(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=i0(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=r0(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"?ot:cn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Fs(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Fs(e,t,n){if(t.type==="element")return $h(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Jh(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return e0(e,t,n);if(t.type==="mdxjsEsm")return Zh(e,t);if(t.type==="root")return t0(e,t,n);if(t.type==="text")return n0(e,t)}function $h(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ot,e.schema=i),e.ancestors.push(t);const a=Us(e,t.tagName,!1),s=a0(e,t);let u=Wr(e,t);return Qh.has(t.tagName)&&(u=u.filter(function(l){return typeof l=="string"?!Th(l):!0})),Hs(e,s,a,t),Yr(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Jh(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}tn(e,t.position)}function Zh(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tn(e,t.position)}function e0(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ot,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Us(e,t.name,!0),s=s0(e,t),u=Wr(e,t);return Hs(e,s,a,t),Yr(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function t0(e,t,n){const r={};return Yr(r,Wr(e,t)),e.create(t,e.Fragment,r,n)}function n0(e,t){return t.value}function Hs(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Yr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function r0(e,t,n){return r;function r(i,a,s,u){const c=Array.isArray(s.children)?n:t;return u?c(a,s,u):c(a,s)}}function i0(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),l=qe(r);return t(i,a,s,u,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function a0(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&jr.call(t.properties,i)){const a=o0(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&Xh.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function s0(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else tn(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 u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else tn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Wr(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:qh;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const c=i.get(l)||0;s=l+"-"+c,i.set(l,c+1)}}const u=Fs(e,a,s);u!==void 0&&n.push(u)}return n}function o0(e,t,n){const r=Un(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Cs(n):vs(n)),r.property==="style"){let i=typeof n=="object"?n:u0(e,String(n));return e.stylePropertyNameCase==="css"&&(i=l0(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Sh[r.property]||r.property:r.attribute,n]}}function u0(e,t){const n={};try{Yh(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,s=new Ae("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Bs+"#cannot-parse-style-attribute",s}}return n;function r(i,a){let s=i;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(Gh,d0)),n[s]=a}}function Us(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 u=Mi(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=Mi(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return jr.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);tn(e)}function tn(e,t){const n=new Ae("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=Bs+"#cannot-handle-mdx-estrees-without-createevaluater",n}function l0(e){const t={};let n;for(n in e)jr.call(e,n)&&(t[c0(n)]=e[n]);return t}function c0(e){let t=e.replace(Vh,h0);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function d0(e,t){return t.toUpperCase()}function h0(e){return"-"+e.toLowerCase()}const nr={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},f0={tokenize:p0};function p0(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),te(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return W(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const m0={tokenize:g0},Qi={tokenize:b0};function g0(e){const t=this,n=[];let r=0,i,a,s;return u;function u(L){if(r<n.length){const M=n[r];return t.containerState=M[1],e.attempt(M[0].continuation,l,c)(L)}return c(L)}function l(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&N();const M=t.events.length;let F=M,S;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){S=t.events[F][1].end;break}_(r);let Y=M;for(;Y<t.events.length;)t.events[Y][1].end=Object.assign({},S),Y++;return Pe(t.events,F+1,0,t.events.slice(M)),t.events.length=Y,c(L)}return u(L)}function c(L){if(r===n.length){if(!i)return g(L);if(i.currentConstruct&&i.currentConstruct.concrete)return E(L);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Qi,d,h)(L)}function d(L){return i&&N(),_(r),g(L)}function h(L){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,E(L)}function g(L){return t.containerState={},e.attempt(Qi,p,E)(L)}function p(L){return r++,n.push([t.currentConstruct,t.containerState]),g(L)}function E(L){if(L===null){i&&N(),_(0),e.consume(L);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),y(L)}function y(L){if(L===null){k(e.exit("chunkFlow"),!0),_(0),e.consume(L);return}return W(L)?(e.consume(L),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(L),y)}function k(L,M){const F=t.sliceStream(L);if(M&&F.push(null),L.previous=a,a&&(a.next=L),a=L,i.defineSkip(L.start),i.write(F),t.parser.lazy[L.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;const Y=t.events.length;let z=Y,j,C;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(j){C=t.events[z][1].end;break}j=!0}for(_(r),S=Y;S<t.events.length;)t.events[S][1].end=Object.assign({},C),S++;Pe(t.events,z+1,0,t.events.slice(Y)),t.events.length=S}}function _(L){let M=n.length;for(;M-- >L;){const F=n[M];t.containerState=F[1],F[0].exit.call(t,e)}n.length=L}function N(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function b0(e,t,n){return te(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const E0={tokenize:T0};function T0(e){const t=this,n=e.attempt(un,r,e.attempt(this.parser.constructs.flowInitial,i,te(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Zc,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 x0={resolveAll:js()},w0=zs("string"),y0=zs("text");function zs(e){return{tokenize:t,resolveAll:js(e==="text"?_0:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(d){return c(d)?a(d):u(d)}function u(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),l)}function c(d){if(d===null)return!0;const h=i[d];let g=-1;if(h)for(;++g<h.length;){const p=h[g];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function js(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 _0(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,u=0,l;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(c===-2)l=!0,u++;else if(c!==-1){a++;break}}if(u){const c={type:n===e.length||l||u<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-u,offset:r.end.offset-u,_index:r.start._index+a,_bufferIndex:a?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function A0(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let s=[],u=[];const l={consume:N,enter:L,exit:M,attempt:Y(F),check:Y(S),interrupt:Y(S,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:g,now:E,defineSkip:y,write:h};let d=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function h(H){return s=De(s,H),k(),s[s.length-1]!==null?[]:(z(t,0),c.events=Hn(a,c.events,c),c.events)}function g(H,P){return k0(p(H),P)}function p(H){return C0(s,H)}function E(){const{line:H,column:P,offset:ne,_index:re,_bufferIndex:K}=r;return{line:H,column:P,offset:ne,_index:re,_bufferIndex:K}}function y(H){i[H.line]=H.column,C()}function k(){let H;for(;r._index<s.length;){const P=s[r._index];if(typeof P=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<P.length;)_(P.charCodeAt(r._bufferIndex));else _(P)}}function _(H){d=d(H)}function N(H){W(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,C()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=H}function L(H,P){const ne=P||{};return ne.type=H,ne.start=E(),c.events.push(["enter",ne,c]),u.push(ne),ne}function M(H){const P=u.pop();return P.end=E(),c.events.push(["exit",P,c]),P}function F(H,P){z(H,P.from)}function S(H,P){P.restore()}function Y(H,P){return ne;function ne(re,K,ce){let fe,Ee,Te,x;return Array.isArray(re)?Re(re):"tokenize"in re?Re([re]):de(re);function de(ye){return Bt;function Bt(Je){const Et=Je!==null&&ye[Je],Tt=Je!==null&&ye.null,mn=[...Array.isArray(Et)?Et:Et?[Et]:[],...Array.isArray(Tt)?Tt:Tt?[Tt]:[]];return Re(mn)(Je)}}function Re(ye){return fe=ye,Ee=0,ye.length===0?ce:w(ye[Ee])}function w(ye){return Bt;function Bt(Je){return x=j(),Te=ye,ye.partial||(c.currentConstruct=ye),ye.name&&c.parser.constructs.disable.null.includes(ye.name)?lt():ye.tokenize.call(P?Object.assign(Object.create(c),P):c,l,Ne,lt)(Je)}}function Ne(ye){return H(Te,x),K}function lt(ye){return x.restore(),++Ee<fe.length?w(fe[Ee]):ce}}}function z(H,P){H.resolveAll&&!a.includes(H)&&a.push(H),H.resolve&&Pe(c.events,P,c.events.length-P,H.resolve(c.events.slice(P),c)),H.resolveTo&&(c.events=H.resolveTo(c.events,c))}function j(){const H=E(),P=c.previous,ne=c.currentConstruct,re=c.events.length,K=Array.from(u);return{restore:ce,from:re};function ce(){r=H,c.previous=P,c.currentConstruct=ne,c.events.length=re,u=K,C()}}function C(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function C0(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 u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function k0(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=`
|
|
17
|
-
`;break}case-3:{s=`\r
|
|
18
|
-
`;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("")}const I0={42:Se,43:Se,45:Se,48:Se,49:Se,50:Se,51:Se,52:Se,53:Se,54:Se,55:Se,56:Se,57:Se,62:bs},S0={91:id},N0={[-2]:Zn,[-1]:Zn,32:Zn},O0={35:cd,42:wn,45:[Di,wn],60:pd,61:Di,95:wn,96:Li,126:Li},L0={38:Ts,92:Es},R0={[-5]:er,[-4]:er,[-3]:er,33:Rd,38:Ts,42:Er,60:[vc,wd],91:vd,92:[ud,Es],93:Ur,95:Er,96:Gc},D0={null:[Er,x0]},v0={null:[42,95]},P0={null:[]},M0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:v0,contentInitial:S0,disable:P0,document:I0,flow:O0,flowInitial:N0,insideSpan:D0,string:L0,text:R0},Symbol.toStringTag,{value:"Module"}));function B0(e){const n=us([M0,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(f0),document:i(m0),flow:i(E0),string:i(w0),text:i(y0)};return r;function i(a){return s;function s(u){return A0(r,a,u)}}}function F0(e){for(;!xs(e););return e}const Xi=/[\0\t\n\r]/g;function H0(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const l=[];let c,d,h,g,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),h=0,t="",n&&(a.charCodeAt(0)===65279&&h++,n=void 0);h<a.length;){if(Xi.lastIndex=h,c=Xi.exec(a),g=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(g),!c){t=a.slice(h);break}if(p===10&&h===g&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),h<g&&(l.push(a.slice(h,g)),e+=g-h),p){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}h=g+1}return u&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const Ys={}.hasOwnProperty;function U0(e,t,n){return typeof t!="string"&&(n=t,t=void 0),z0(n)(F0(B0(n).document().write(H0()(e,t,!0))))}function z0(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(gi),autolinkProtocol:j,autolinkEmail:j,atxHeading:a(fi),blockQuote:a(Tt),characterEscape:j,characterReference:j,codeFenced:a(mn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(mn,s),codeText:a(hu,s),codeTextData:j,data:j,codeFlowValue:j,definition:a(fu),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(pu),hardBreakEscape:a(pi),hardBreakTrailing:a(pi),htmlFlow:a(mi,s),htmlFlowData:j,htmlText:a(mi,s),htmlTextData:j,image:a(mu),label:s,link:a(gi),listItem:a(gu),listItemValue:g,listOrdered:a(bi,h),listUnordered:a(bi),paragraph:a(bu),reference:w,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(fi),strong:a(Eu),thematicBreak:a(xu)},exit:{atxHeading:l(),atxHeadingSequence:F,autolink:l(),autolinkEmail:Et,autolinkProtocol:Je,blockQuote:l(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:lt,characterReferenceMarkerNumeric:lt,characterReferenceValue:ye,characterReference:Bt,codeFenced:l(k),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:E,codeFlowValue:C,codeIndented:l(_),codeText:l(K),codeTextData:C,data:C,definition:l(),definitionDestinationString:M,definitionLabelString:N,definitionTitleString:L,emphasis:l(),hardBreakEscape:l(P),hardBreakTrailing:l(P),htmlFlow:l(ne),htmlFlowData:C,htmlText:l(re),htmlTextData:C,image:l(fe),label:Te,labelText:Ee,lineEnding:H,link:l(ce),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Ne,resourceDestinationString:x,resourceTitleString:de,resource:Re,setextHeading:l(z),setextHeadingLineSequence:Y,setextHeadingText:S,strong:l(),thematicBreak:l()}};Ws(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let B={type:"root",children:[]};const V={stack:[B],tokenStack:[],config:t,enter:u,exit:c,buffer:s,resume:d,data:n},Z=[];let ae=-1;for(;++ae<O.length;)if(O[ae][1].type==="listOrdered"||O[ae][1].type==="listUnordered")if(O[ae][0]==="enter")Z.push(ae);else{const Be=Z.pop();ae=i(O,Be,ae)}for(ae=-1;++ae<O.length;){const Be=t[O[ae][0]];Ys.call(Be,O[ae][1].type)&&Be[O[ae][1].type].call(Object.assign({sliceSerialize:O[ae][2].sliceSerialize},V),O[ae][1])}if(V.tokenStack.length>0){const Be=V.tokenStack[V.tokenStack.length-1];(Be[1]||Ki).call(V,void 0,Be[0])}for(B.position={start:Ze(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:Ze(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},ae=-1;++ae<t.transforms.length;)B=t.transforms[ae](B)||B;return B}function i(O,B,V){let Z=B-1,ae=-1,Be=!1,ct,Ve,Ft,Ht;for(;++Z<=V;){const Oe=O[Z];switch(Oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Oe[0]==="enter"?ae++:ae--,Ht=void 0;break}case"lineEndingBlank":{Oe[0]==="enter"&&(ct&&!Ht&&!ae&&!Ft&&(Ft=Z),Ht=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ht=void 0}if(!ae&&Oe[0]==="enter"&&Oe[1].type==="listItemPrefix"||ae===-1&&Oe[0]==="exit"&&(Oe[1].type==="listUnordered"||Oe[1].type==="listOrdered")){if(ct){let xt=Z;for(Ve=void 0;xt--;){const Ge=O[xt];if(Ge[1].type==="lineEnding"||Ge[1].type==="lineEndingBlank"){if(Ge[0]==="exit")continue;Ve&&(O[Ve][1].type="lineEndingBlank",Be=!0),Ge[1].type="lineEnding",Ve=xt}else if(!(Ge[1].type==="linePrefix"||Ge[1].type==="blockQuotePrefix"||Ge[1].type==="blockQuotePrefixWhitespace"||Ge[1].type==="blockQuoteMarker"||Ge[1].type==="listItemIndent"))break}Ft&&(!Ve||Ft<Ve)&&(ct._spread=!0),ct.end=Object.assign({},Ve?O[Ve][1].start:Oe[1].end),O.splice(Ve||Z,0,["exit",ct,Oe[2]]),Z++,V++}if(Oe[1].type==="listItemPrefix"){const xt={type:"listItem",_spread:!1,start:Object.assign({},Oe[1].start),end:void 0};ct=xt,O.splice(Z,0,["enter",xt,Oe[2]]),Z++,V++,Ft=void 0,Ht=!0}}}return O[B][1]._spread=Be,V}function a(O,B){return V;function V(Z){u.call(this,O(Z),Z),B&&B.call(this,Z)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(O,B,V){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([B,V]),O.position={start:Ze(B.start),end:void 0}}function l(O){return B;function B(V){O&&O.call(this,V),c.call(this,V)}}function c(O,B){const V=this.stack.pop(),Z=this.tokenStack.pop();if(Z)Z[0].type!==O.type&&(B?B.call(this,O,Z[0]):(Z[1]||Ki).call(this,O,Z[0]));else throw new Error("Cannot close `"+O.type+"` ("+Qt({start:O.start,end:O.end})+"): it’s not open");V.position.end=Ze(O.end)}function d(){return Mr(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function g(O){if(this.data.expectingFirstListItemValue){const B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function p(){const O=this.resume(),B=this.stack[this.stack.length-1];B.lang=O}function E(){const O=this.resume(),B=this.stack[this.stack.length-1];B.meta=O}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/(\r?\n|\r)$/g,"")}function N(O){const B=this.resume(),V=this.stack[this.stack.length-1];V.label=B,V.identifier=Fe(this.sliceSerialize(O)).toLowerCase()}function L(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function M(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function F(O){const B=this.stack[this.stack.length-1];if(!B.depth){const V=this.sliceSerialize(O).length;B.depth=V}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function Y(O){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function j(O){const V=this.stack[this.stack.length-1].children;let Z=V[V.length-1];(!Z||Z.type!=="text")&&(Z=Tu(),Z.position={start:Ze(O.start),end:void 0},V.push(Z)),this.stack.push(Z)}function C(O){const B=this.stack.pop();B.value+=this.sliceSerialize(O),B.position.end=Ze(O.end)}function H(O){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const V=B.children[B.children.length-1];V.position.end=Ze(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(B.type)&&(j.call(this,O),C.call(this,O))}function P(){this.data.atHardBreak=!0}function ne(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function re(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function K(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function ce(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function fe(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function Ee(O){const B=this.sliceSerialize(O),V=this.stack[this.stack.length-2];V.label=ic(B),V.identifier=Fe(B).toLowerCase()}function Te(){const O=this.stack[this.stack.length-1],B=this.resume(),V=this.stack[this.stack.length-1];if(this.data.inReference=!0,V.type==="link"){const Z=O.children;V.children=Z}else V.alt=B}function x(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function de(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function Re(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function Ne(O){const B=this.resume(),V=this.stack[this.stack.length-1];V.label=B,V.identifier=Fe(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function lt(O){this.data.characterReferenceType=O.type}function ye(O){const B=this.sliceSerialize(O),V=this.data.characterReferenceType;let Z;V?(Z=os(B,V==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Z=Fr(B);const ae=this.stack[this.stack.length-1];ae.value+=Z}function Bt(O){const B=this.stack.pop();B.position.end=Ze(O.end)}function Je(O){C.call(this,O);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(O)}function Et(O){C.call(this,O);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(O)}function Tt(){return{type:"blockquote",children:[]}}function mn(){return{type:"code",lang:null,meta:null,value:""}}function hu(){return{type:"inlineCode",value:""}}function fu(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function pu(){return{type:"emphasis",children:[]}}function fi(){return{type:"heading",depth:0,children:[]}}function pi(){return{type:"break"}}function mi(){return{type:"html",value:""}}function mu(){return{type:"image",title:null,url:"",alt:null}}function gi(){return{type:"link",title:null,url:"",children:[]}}function bi(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function gu(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function bu(){return{type:"paragraph",children:[]}}function Eu(){return{type:"strong",children:[]}}function Tu(){return{type:"text",value:""}}function xu(){return{type:"thematicBreak"}}}function Ze(e){return{line:e.line,column:e.column,offset:e.offset}}function Ws(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ws(e,r):j0(e,r)}}function j0(e,t){let n;for(n in t)if(Ys.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 Ki(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qt({start:t.start,end:t.end})+") is still open")}function Y0(e){const t=this;t.parser=n;function n(r){return U0(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function W0(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 q0(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
19
|
-
`}]}function V0(e,t){const n=t.value?t.value+`
|
|
20
|
-
`:"",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 G0(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Q0(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function X0(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ot(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,u+=1,e.footnoteCounts.set(r,u);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function K0(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 $0(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function qs(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 J0(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qs(e,t);const i={src:Ot(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 Z0(e,t){const n={src:Ot(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 ef(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 tf(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qs(e,t);const i={href:Ot(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 nf(e,t){const n={href:Ot(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 rf(e,t,n){const r=e.all(t),i=n?af(n):Vs(t),a={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const d=r[u];(i||u!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
|
|
21
|
-
`}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
|
|
22
|
-
`});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function af(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=Vs(n[r])}return t}function Vs(e){const t=e.spread;return t??e.children.length>1}function sf(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 of(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uf(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function lf(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cf(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)},u=qe(t.children[1]),l=zn(t.children[t.children.length-1]);u&&l&&(s.position={start:u,end:l}),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 df(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,u=s?s.length:t.children.length;let l=-1;const c=[];for(;++l<u;){const h=t.children[l],g={},p=s?s[l]:void 0;p&&(g.align=p);let E={type:"element",tagName:a,properties:g,children:[]};h&&(E.children=e.all(h),e.patch(h,E),E=e.applyData(h,E)),c.push(E)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function hf(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const $i=9,Ji=32;function ff(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Zi(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Zi(t.slice(i),i>0,!1)),a.join("")}function Zi(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===$i||a===Ji;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===$i||a===Ji;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function pf(e,t){const n={type:"text",value:ff(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function mf(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const gf={blockquote:W0,break:q0,code:V0,delete:G0,emphasis:Q0,footnoteReference:X0,heading:K0,html:$0,imageReference:J0,image:Z0,inlineCode:ef,linkReference:tf,link:nf,listItem:rf,list:sf,paragraph:of,root:uf,strong:lf,table:cf,tableCell:hf,tableRow:df,text:pf,thematicBreak:mf,toml:bn,yaml:bn,definition:bn,footnoteDefinition:bn};function bn(){}const Gs=-1,jn=0,Sn=1,Nn=2,qr=3,Vr=4,Gr=5,Qr=6,Qs=7,Xs=8,ea=typeof self=="object"?self:globalThis,bf=(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 jn:case Gs:return n(s,i);case Sn:{const u=n([],i);for(const l of s)u.push(r(l));return u}case Nn:{const u=n({},i);for(const[l,c]of s)u[r(l)]=r(c);return u}case qr:return n(new Date(s),i);case Vr:{const{source:u,flags:l}=s;return n(new RegExp(u,l),i)}case Gr:{const u=n(new Map,i);for(const[l,c]of s)u.set(r(l),r(c));return u}case Qr:{const u=n(new Set,i);for(const l of s)u.add(r(l));return u}case Qs:{const{name:u,message:l}=s;return n(new ea[u](l),i)}case Xs:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new ea[a](s),i)};return r},ta=e=>bf(new Map,e)(0),wt="",{toString:Ef}={},{keys:Tf}=Object,zt=e=>{const t=typeof e;if(t!=="object"||!e)return[jn,t];const n=Ef.call(e).slice(8,-1);switch(n){case"Array":return[Sn,wt];case"Object":return[Nn,wt];case"Date":return[qr,wt];case"RegExp":return[Vr,wt];case"Map":return[Gr,wt];case"Set":return[Qr,wt]}return n.includes("Array")?[Sn,n]:n.includes("Error")?[Qs,n]:[Nn,n]},En=([e,t])=>e===jn&&(t==="function"||t==="symbol"),xf=(e,t,n,r)=>{const i=(s,u)=>{const l=r.push(s)-1;return n.set(u,l),l},a=s=>{if(n.has(s))return n.get(s);let[u,l]=zt(s);switch(u){case jn:{let d=s;switch(l){case"bigint":u=Xs,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return i([Gs],s)}return i([u,d],s)}case Sn:{if(l)return i([l,[...s]],s);const d=[],h=i([u,d],s);for(const g of s)d.push(a(g));return h}case Nn:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],h=i([u,d],s);for(const g of Tf(s))(e||!En(zt(s[g])))&&d.push([a(g),a(s[g])]);return h}case qr:return i([u,s.toISOString()],s);case Vr:{const{source:d,flags:h}=s;return i([u,{source:d,flags:h}],s)}case Gr:{const d=[],h=i([u,d],s);for(const[g,p]of s)(e||!(En(zt(g))||En(zt(p))))&&d.push([a(g),a(p)]);return h}case Qr:{const d=[],h=i([u,d],s);for(const g of s)(e||!En(zt(g)))&&d.push(a(g));return h}}const{message:c}=s;return i([u,{name:l,message:c}],s)};return a},na=(e,{json:t,lossy:n}={})=>{const r=[];return xf(!(t||n),!!t,new Map,r)(e),r},kt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ta(na(e,t)):structuredClone(e):(e,t)=>ta(na(e,t));function wf(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 yf(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function _f(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||wf,r=e.options.footnoteBackLabel||yf,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const d=e.all(c),h=String(c.identifier).toUpperCase(),g=Ot(h.toLowerCase());let p=0;const E=[],y=e.footnoteCounts.get(h);for(;y!==void 0&&++p<=y;){E.length>0&&E.push({type:"text",value:" "});let N=typeof n=="string"?n:n(l,p);typeof N=="string"&&(N={type:"text",value:N}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const k=d[d.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const N=k.children[k.children.length-1];N&&N.type==="text"?N.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...E)}else d.push(...E);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(d,!0)};e.patch(c,_),u.push(_)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...kt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
23
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
24
|
-
`}]}}const wr={}.hasOwnProperty,Af={};function Cf(e,t){const n=t||Af,r=new Map,i=new Map,a=new Map,s={...gf,...n.handlers},u={all:c,applyData:If,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:l,options:n,patch:kf,wrap:Nf};return Fn(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:i,g=String(d.identifier).toUpperCase();h.has(g)||h.set(g,d)}}),u;function l(d,h){const g=d.type,p=u.handlers[g];if(wr.call(u.handlers,g)&&p)return p(u,d,h);if(u.options.passThrough&&u.options.passThrough.includes(g)){if("children"in d){const{children:y,...k}=d,_=kt(k);return _.children=u.all(d),_}return kt(d)}return(u.options.unknownHandler||Sf)(u,d,h)}function c(d){const h=[];if("children"in d){const g=d.children;let p=-1;for(;++p<g.length;){const E=u.one(g[p],d);if(E){if(p&&g[p-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=ra(E.value)),!Array.isArray(E)&&E.type==="element")){const y=E.children[0];y&&y.type==="text"&&(y.value=ra(y.value))}Array.isArray(E)?h.push(...E):h.push(E)}}}return h}}function kf(e,t){e.position&&(t.position=Wh(e))}function If(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,kt(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Sf(e,t){const n=t.data||{},r="value"in t&&!(wr.call(n,"hProperties")||wr.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 Nf(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
25
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
26
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
27
|
-
`}),n}function ra(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ia(e,t){const n=Cf(e,t),r=n.one(e,void 0),i=_f(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
28
|
-
`},i),a}function Of(e,t){return e&&"run"in e?async function(n,r){const i=ia(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ia(n,{file:r,...e||t})}}function aa(e){if(e)throw e}var yn=Object.prototype.hasOwnProperty,Ks=Object.prototype.toString,sa=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,ua=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Ks.call(t)==="[object Array]"},la=function(t){if(!t||Ks.call(t)!=="[object Object]")return!1;var n=yn.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&yn.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||yn.call(t,i)},ca=function(t,n){sa&&n.name==="__proto__"?sa(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},da=function(t,n){if(n==="__proto__")if(yn.call(t,n)){if(oa)return oa(t,n).value}else return;return t[n]},Lf=function e(){var t,n,r,i,a,s,u=arguments[0],l=1,c=arguments.length,d=!1;for(typeof u=="boolean"&&(d=u,u=arguments[1]||{},l=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=da(u,n),i=da(t,n),u!==i&&(d&&i&&(la(i)||(a=ua(i)))?(a?(a=!1,s=r&&ua(r)?r:[]):s=r&&la(r)?r:{},ca(u,{name:n,newValue:e(d,s,i)})):typeof i<"u"&&ca(u,{name:n,newValue:i}));return u};const rr=U.getDefaultExportFromCjs(Lf);function yr(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 Rf(){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);u(null,...i);function u(l,...c){const d=e[++a];let h=-1;if(l){s(l);return}for(;++h<i.length;)(c[h]===null||c[h]===void 0)&&(c[h]=i[h]);i=c,d?Df(d,u)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Df(e,t){let n;return r;function r(...s){const u=e.length>s.length;let l;u&&s.push(i);try{l=e.apply(this,s)}catch(c){const d=c;if(u&&n)throw d;return i(d)}u||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const ze={basename:vf,dirname:Pf,extname:Mf,join:Bf,sep:"/"};function vf(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');dn(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,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Pf(e){if(dn(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 Mf(e){dn(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===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 Bf(...e){let t=-1,n;for(;++t<e.length;)dn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Ff(n)}function Ff(e){dn(e);const t=e.codePointAt(0)===47;let n=Hf(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Hf(e,t){let n="",r=0,i=-1,a=0,s=-1,u,l;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===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(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),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 u===46&&a>-1?a++:a=-1}return n}function dn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Uf={cwd:zf};function zf(){return"/"}function _r(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function jf(e){if(typeof e=="string")e=new URL(e);else if(!_r(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 Yf(e)}function Yf(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 ir=["history","path","basename","stem","extname","dirname"];class $s{constructor(t){let n;t?_r(t)?n={path:t}:typeof t=="string"||Wf(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Uf.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ir.length;){const a=ir[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)ir.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ze.basename(this.path):void 0}set basename(t){sr(t,"basename"),ar(t,"basename"),this.path=ze.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ze.dirname(this.path):void 0}set dirname(t){ha(this.basename,"dirname"),this.path=ze.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ze.extname(this.path):void 0}set extname(t){if(ar(t,"extname"),ha(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=ze.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){_r(t)&&(t=jf(t)),sr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ze.basename(this.path,this.extname):void 0}set stem(t){sr(t,"stem"),ar(t,"stem"),this.path=ze.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 Ae(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 ar(e,t){if(e&&e.includes(ze.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ze.sep+"`")}function sr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ha(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Wf(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qf=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},Vf={}.hasOwnProperty;class Xr extends qf{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=Rf()}copy(){const t=new Xr;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(rr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(lr("data",this.frozen),this.namespace[t]=n,this):Vf.call(this.namespace,t)&&this.namespace[t]||void 0:t?(lr("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=Tn(t),r=this.parser||this.Parser;return or("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),or("process",this.parser||this.Parser),ur("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=Tn(t),l=r.parse(u);r.run(l,u,function(d,h,g){if(d||!h||!g)return c(d);const p=h,E=r.stringify(p,g);Xf(E)?g.value=E:g.result=E,c(d,g)});function c(d,h){d||!h?s(d):a?a(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),or("processSync",this.parser||this.Parser),ur("processSync",this.compiler||this.Compiler),this.process(t,i),pa("processSync","process",n),r;function i(a,s){n=!0,aa(a),r=s}}run(t,n,r){fa(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,u){const l=Tn(n);i.run(t,l,c);function c(d,h,g){const p=h||t;d?u(d):s?s(p):r(void 0,p,g)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),pa("runSync","run",r),i;function a(s,u){aa(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=Tn(n),i=this.compiler||this.Compiler;return ur("stringify",i),fa(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(lr("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...h]=c;l(d,h)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(c.plugins),c.settings&&(i.settings=rr(!0,i.settings,c.settings))}function u(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const h=c[d];a(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,d){let h=-1,g=-1;for(;++h<r.length;)if(r[h][0]===c){g=h;break}if(g===-1)r.push([c,...d]);else if(d.length>0){let[p,...E]=d;const y=r[g][1];yr(y)&&yr(p)&&(p=rr(!0,y,p)),r[g]=[c,p,...E]}}}}const Gf=new Xr().freeze();function or(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ur(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function lr(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 fa(e){if(!yr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function pa(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Tn(e){return Qf(e)?e:new $s(e)}function Qf(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Xf(e){return typeof e=="string"||Kf(e)}function Kf(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $f="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ma=[],ga={allowDangerousHtml:!0},Jf=/^(https?|ircs?|mailto|xmpp)$/i,Zf=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ep(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,s=e.disallowedElements,u=e.rehypePlugins||ma,l=e.remarkPlugins||ma,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ga}:ga,d=e.skipHtml,h=e.unwrapDisallowed,g=e.urlTransform||tp,p=Gf().use(Y0).use(l).use(Of,c).use(u),E=new $s;typeof r=="string"&&(E.value=r);for(const N of Zf)Object.hasOwn(e,N.from)&&(""+N.from+(N.to?"use `"+N.to+"` instead":"remove it")+$f+N.id,void 0);const y=p.parse(E);let k=p.runSync(y,E);return i&&(k={type:"element",tagName:"div",properties:{className:i},children:k.type==="root"?k.children:[k]}),Fn(k,_),Kh(k,{Fragment:f.Fragment,components:a,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function _(N,L,M){if(N.type==="raw"&&M&&typeof L=="number")return d?M.children.splice(L,1):M.children[L]={type:"text",value:N.value},L;if(N.type==="element"){let F;for(F in nr)if(Object.hasOwn(nr,F)&&Object.hasOwn(N.properties,F)){const S=N.properties[F],Y=nr[F];(Y===null||Y.includes(N.tagName))&&(N.properties[F]=g(String(S||""),F,N))}}if(N.type==="element"){let F=t?!t.includes(N.tagName):s?s.includes(N.tagName):!1;if(!F&&n&&typeof L=="number"&&(F=!n(N,L,M)),F&&M&&typeof L=="number")return h&&N.children?M.children.splice(L,1,...N.children):M.children.splice(L,1),L}}}function tp(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||Jf.test(e.slice(0,t))?e:""}const Js=X.memo(ep,(e,t)=>e.children===t.children&&e.className===t.className),ba=/[#.]/g;function np(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){ba.lastIndex=i;const u=ba.exec(n),l=n.slice(i,u?u.index:n.length);l&&(a?a==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:s=l,i+=l.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}const Ar={}.hasOwnProperty;function Zs(e,t,n){const r=n&&sp(n);function i(a,s,...u){let l=-1,c;if(a==null){c={type:"root",children:[]};const d=s;u.unshift(d)}else if(c=np(a,t),c.tagName=c.tagName.toLowerCase(),r&&Ar.call(r,c.tagName)&&(c.tagName=r[c.tagName]),rp(s))u.unshift(s);else{let d;for(d in s)Ar.call(s,d)&&ip(e,c.properties,d,s[d])}for(;++l<u.length;)Cr(c.children,u[l]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return i}function rp(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 ip(e,t,n,r){const i=Un(e,n);let a=-1,s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Ui(r):i.commaSeparated?s=Pi(r):i.commaOrSpaceSeparated?s=Ui(Pi(r).join(" ")):s=Ea(i,i.property,r):Array.isArray(r)?s=r.concat():s=i.property==="style"?ap(r):String(r);if(Array.isArray(s)){const u=[];for(;++a<s.length;){const l=Ea(i,i.property,s[a]);u[a]=l}s=u}if(i.property==="className"&&Array.isArray(t.className)){const u=s;s=t.className.concat(u)}t[i.property]=s}}function Cr(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)Cr(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?Cr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Ea(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||en(n)===en(t)))return!0}return n}function ap(e){const t=[];let n;for(n in e)Ar.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function sp(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const op=["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"],up=Zs(cn,"div"),lp=Zs(ot,"g",op);function cp(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 u=n[s];if(u===void 0){const l=Ta(t,n[s-1]);u=l===-1?t.length+1:l+1,n[s]=u}if(u>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 u=n[n.length-1],l=Ta(t,u),c=l===-1?t.length+1:l+1;if(u===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Ta(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
29
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const ft={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/"},eo={}.hasOwnProperty,dp=Object.prototype;function hp(e,t){const n=t||{};return Kr({file:n.file||void 0,location:!1,schema:n.space==="svg"?ot:cn,verbose:n.verbose||!1},e)}function Kr(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},_n(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:to(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=cp(a),u=s.toPoint(0),l=s.toPoint(a.length);n.position={start:u,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},_n(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},_n(e,r,n),n}default:return n=fp(e,t),n}}function to(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Kr(e,t[n]);r.push(i)}return r}function fp(e,t){const n=e.schema;e.schema=t.namespaceURI===ft.svg?ot:cn;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],l=(u.prefix?u.prefix+":":"")+u.name;eo.call(dp,l)||(i[l]=u.value)}const s=(e.schema.space==="svg"?lp:up)(t.tagName,i,to(e,t.childNodes));if(_n(e,t,s),s.tagName==="template"){const u=t,l=u.sourceCodeLocation,c=l&&l.startTag&&_t(l.startTag),d=l&&l.endTag&&_t(l.endTag),h=Kr(e,u.content);c&&d&&e.file&&(h.position={start:c.end,end:d.start}),s.content=h}return e.schema=n,s}function _n(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=pp(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function pp(e,t,n){const r=_t(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)eo.call(n.attrs,s)&&(a[Un(e.schema,s).property]=_t(n.attrs[s]));n.startTag;const u=_t(n.startTag),l=n.endTag?_t(n.endTag):void 0,c={opening:u};l&&(c.closing=l),c.properties=a,t.data={position:c}}}return r}function _t(e){const t=xa({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=xa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function xa(e){return e.line&&e.column?e:void 0}const mp={},gp={}.hasOwnProperty,no=Qa("type",{handlers:{root:Ep,element:_p,text:wp,comment:yp,doctype:xp}});function bp(e,t){const r=(t||mp).space;return no(e,r==="svg"?ot:cn)}function Ep(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=$r(e.children,n,t),Rt(e,n),n}function Tp(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=$r(e.children,n,t),Rt(e,n),n}function xp(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Rt(e,t),t}function wp(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Rt(e,t),t}function yp(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Rt(e,t),t}function _p(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ot);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&gp.call(e.properties,a)){const l=Ap(r,a,e.properties[a]);l&&i.push(l)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:ft[s],childNodes:[],parentNode:null};return u.childNodes=$r(e.children,u,r),Rt(e,u),e.tagName==="template"&&e.content&&(u.content=Tp(e.content,r)),u}function Ap(e,t,n){const r=Un(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?Cs(n):vs(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=ft[r.space]}return i}function $r(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=no(e[r],n);a.parentNode=t,i.push(a)}return i}function Rt(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Cp=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],kp=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]),he="�";var m;(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"})(m||(m={}));const Ie={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ro(e){return e>=55296&&e<=57343}function Ip(e){return e>=56320&&e<=57343}function Sp(e,t){return(e-55296)*1024+9216+t}function io(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ao(e){return e>=64976&&e<=65007||kp.has(e)}var I;(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"})(I||(I={}));const Np=65536;class Op{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=Np,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,u=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Ip(n))return this.pos++,this._addGap(),Sp(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,m.EOF;return this._err(I.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,m.EOF;const r=this.html.charCodeAt(n);return r===m.CARRIAGE_RETURN?m.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,m.EOF;let t=this.html.charCodeAt(this.pos);return t===m.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,m.LINE_FEED):t===m.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ro(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===m.LINE_FEED||t===m.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){io(t)?this._err(I.controlCharacterInInputStream):ao(t)&&this._err(I.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var $;(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"})($||($={}));function so(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 oo=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))),Lp=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var cr;const Rp=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]]),Dp=(cr=String.fromCodePoint)!==null&&cr!==void 0?cr:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function vp(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Rp.get(e))!==null&&t!==void 0?t:e}var we;(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"})(we||(we={}));const Pp=32;var it;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(it||(it={}));function kr(e){return e>=we.ZERO&&e<=we.NINE}function Mp(e){return e>=we.UPPER_A&&e<=we.UPPER_F||e>=we.LOWER_A&&e<=we.LOWER_F}function Bp(e){return e>=we.UPPER_A&&e<=we.UPPER_Z||e>=we.LOWER_A&&e<=we.LOWER_Z||kr(e)}function Fp(e){return e===we.EQUALS||Bp(e)}var xe;(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"})(xe||(xe={}));var Xe;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Xe||(Xe={}));class uo{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=xe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xe.Strict}startEntity(t){this.decodeMode=t,this.state=xe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case xe.EntityStart:return t.charCodeAt(n)===we.NUM?(this.state=xe.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=xe.NamedEntity,this.stateNamedEntity(t,n));case xe.NumericStart:return this.stateNumericStart(t,n);case xe.NumericDecimal:return this.stateNumericDecimal(t,n);case xe.NumericHex:return this.stateNumericHex(t,n);case xe.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Pp)===we.LOWER_X?(this.state=xe.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=xe.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)+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(kr(i)||Mp(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(kr(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===we.SEMI)this.consumed+=1;else if(this.decodeMode===Xe.Strict)return 0;return this.emitCodePoint(vp(this.result),this.consumed),this.errors&&(t!==we.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&it.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Hp(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Xe.Attribute&&(a===0||Fp(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&it.VALUE_LENGTH)>>14,a!==0){if(s===we.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Xe.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]&it.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]&~it.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case xe.NamedEntity:return this.result!==0&&(this.decodeMode!==Xe.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case xe.NumericDecimal:return this.emitNumericEntity(0,2);case xe.NumericHex:return this.emitNumericEntity(0,3);case xe.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case xe.EntityStart:return 0}}}function lo(e){let t="";const n=new uo(e,r=>t+=Dp(r));return function(i,a){let s=0,u=0;for(;(u=i.indexOf("&",u))>=0;){t+=i.slice(s,u),n.startEntity(a);const c=n.write(i,u+1);if(c<0){s=u+n.end();break}s=u+c,u=c===0?s+1:s}const l=t+i.slice(s);return t="",l}}function Hp(e,t,n,r){const i=(t&it.BRANCH_LENGTH)>>7,a=t&it.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const l=r-a;return l<0||l>=i?-1:e[n+l]-1}let s=n,u=s+i-1;for(;s<=u;){const l=s+u>>>1,c=e[l];if(c<r)s=l+1;else if(c>r)u=l-1;else return e[l+i]}return-1}lo(oo);lo(Lp);var R;(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/"})(R||(R={}));var pt;(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"})(pt||(pt={}));var ve;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ve||(ve={}));var A;(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"})(A||(A={}));var o;(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"})(o||(o={}));const Up=new Map([[A.A,o.A],[A.ADDRESS,o.ADDRESS],[A.ANNOTATION_XML,o.ANNOTATION_XML],[A.APPLET,o.APPLET],[A.AREA,o.AREA],[A.ARTICLE,o.ARTICLE],[A.ASIDE,o.ASIDE],[A.B,o.B],[A.BASE,o.BASE],[A.BASEFONT,o.BASEFONT],[A.BGSOUND,o.BGSOUND],[A.BIG,o.BIG],[A.BLOCKQUOTE,o.BLOCKQUOTE],[A.BODY,o.BODY],[A.BR,o.BR],[A.BUTTON,o.BUTTON],[A.CAPTION,o.CAPTION],[A.CENTER,o.CENTER],[A.CODE,o.CODE],[A.COL,o.COL],[A.COLGROUP,o.COLGROUP],[A.DD,o.DD],[A.DESC,o.DESC],[A.DETAILS,o.DETAILS],[A.DIALOG,o.DIALOG],[A.DIR,o.DIR],[A.DIV,o.DIV],[A.DL,o.DL],[A.DT,o.DT],[A.EM,o.EM],[A.EMBED,o.EMBED],[A.FIELDSET,o.FIELDSET],[A.FIGCAPTION,o.FIGCAPTION],[A.FIGURE,o.FIGURE],[A.FONT,o.FONT],[A.FOOTER,o.FOOTER],[A.FOREIGN_OBJECT,o.FOREIGN_OBJECT],[A.FORM,o.FORM],[A.FRAME,o.FRAME],[A.FRAMESET,o.FRAMESET],[A.H1,o.H1],[A.H2,o.H2],[A.H3,o.H3],[A.H4,o.H4],[A.H5,o.H5],[A.H6,o.H6],[A.HEAD,o.HEAD],[A.HEADER,o.HEADER],[A.HGROUP,o.HGROUP],[A.HR,o.HR],[A.HTML,o.HTML],[A.I,o.I],[A.IMG,o.IMG],[A.IMAGE,o.IMAGE],[A.INPUT,o.INPUT],[A.IFRAME,o.IFRAME],[A.KEYGEN,o.KEYGEN],[A.LABEL,o.LABEL],[A.LI,o.LI],[A.LINK,o.LINK],[A.LISTING,o.LISTING],[A.MAIN,o.MAIN],[A.MALIGNMARK,o.MALIGNMARK],[A.MARQUEE,o.MARQUEE],[A.MATH,o.MATH],[A.MENU,o.MENU],[A.META,o.META],[A.MGLYPH,o.MGLYPH],[A.MI,o.MI],[A.MO,o.MO],[A.MN,o.MN],[A.MS,o.MS],[A.MTEXT,o.MTEXT],[A.NAV,o.NAV],[A.NOBR,o.NOBR],[A.NOFRAMES,o.NOFRAMES],[A.NOEMBED,o.NOEMBED],[A.NOSCRIPT,o.NOSCRIPT],[A.OBJECT,o.OBJECT],[A.OL,o.OL],[A.OPTGROUP,o.OPTGROUP],[A.OPTION,o.OPTION],[A.P,o.P],[A.PARAM,o.PARAM],[A.PLAINTEXT,o.PLAINTEXT],[A.PRE,o.PRE],[A.RB,o.RB],[A.RP,o.RP],[A.RT,o.RT],[A.RTC,o.RTC],[A.RUBY,o.RUBY],[A.S,o.S],[A.SCRIPT,o.SCRIPT],[A.SEARCH,o.SEARCH],[A.SECTION,o.SECTION],[A.SELECT,o.SELECT],[A.SOURCE,o.SOURCE],[A.SMALL,o.SMALL],[A.SPAN,o.SPAN],[A.STRIKE,o.STRIKE],[A.STRONG,o.STRONG],[A.STYLE,o.STYLE],[A.SUB,o.SUB],[A.SUMMARY,o.SUMMARY],[A.SUP,o.SUP],[A.TABLE,o.TABLE],[A.TBODY,o.TBODY],[A.TEMPLATE,o.TEMPLATE],[A.TEXTAREA,o.TEXTAREA],[A.TFOOT,o.TFOOT],[A.TD,o.TD],[A.TH,o.TH],[A.THEAD,o.THEAD],[A.TITLE,o.TITLE],[A.TR,o.TR],[A.TRACK,o.TRACK],[A.TT,o.TT],[A.U,o.U],[A.UL,o.UL],[A.SVG,o.SVG],[A.VAR,o.VAR],[A.WBR,o.WBR],[A.XMP,o.XMP]]);function Dt(e){var t;return(t=Up.get(e))!==null&&t!==void 0?t:o.UNKNOWN}const D=o,zp={[R.HTML]:new Set([D.ADDRESS,D.APPLET,D.AREA,D.ARTICLE,D.ASIDE,D.BASE,D.BASEFONT,D.BGSOUND,D.BLOCKQUOTE,D.BODY,D.BR,D.BUTTON,D.CAPTION,D.CENTER,D.COL,D.COLGROUP,D.DD,D.DETAILS,D.DIR,D.DIV,D.DL,D.DT,D.EMBED,D.FIELDSET,D.FIGCAPTION,D.FIGURE,D.FOOTER,D.FORM,D.FRAME,D.FRAMESET,D.H1,D.H2,D.H3,D.H4,D.H5,D.H6,D.HEAD,D.HEADER,D.HGROUP,D.HR,D.HTML,D.IFRAME,D.IMG,D.INPUT,D.LI,D.LINK,D.LISTING,D.MAIN,D.MARQUEE,D.MENU,D.META,D.NAV,D.NOEMBED,D.NOFRAMES,D.NOSCRIPT,D.OBJECT,D.OL,D.P,D.PARAM,D.PLAINTEXT,D.PRE,D.SCRIPT,D.SECTION,D.SELECT,D.SOURCE,D.STYLE,D.SUMMARY,D.TABLE,D.TBODY,D.TD,D.TEMPLATE,D.TEXTAREA,D.TFOOT,D.TH,D.THEAD,D.TITLE,D.TR,D.TRACK,D.UL,D.WBR,D.XMP]),[R.MATHML]:new Set([D.MI,D.MO,D.MN,D.MS,D.MTEXT,D.ANNOTATION_XML]),[R.SVG]:new Set([D.TITLE,D.FOREIGN_OBJECT,D.DESC]),[R.XLINK]:new Set,[R.XML]:new Set,[R.XMLNS]:new Set},Ir=new Set([D.H1,D.H2,D.H3,D.H4,D.H5,D.H6]);A.STYLE,A.SCRIPT,A.XMP,A.IFRAME,A.NOEMBED,A.NOFRAMES,A.PLAINTEXT;var b;(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"})(b||(b={}));const pe={DATA:b.DATA,RCDATA:b.RCDATA,RAWTEXT:b.RAWTEXT,SCRIPT_DATA:b.SCRIPT_DATA,PLAINTEXT:b.PLAINTEXT,CDATA_SECTION:b.CDATA_SECTION};function jp(e){return e>=m.DIGIT_0&&e<=m.DIGIT_9}function Vt(e){return e>=m.LATIN_CAPITAL_A&&e<=m.LATIN_CAPITAL_Z}function Yp(e){return e>=m.LATIN_SMALL_A&&e<=m.LATIN_SMALL_Z}function nt(e){return Yp(e)||Vt(e)}function wa(e){return nt(e)||jp(e)}function xn(e){return e+32}function co(e){return e===m.SPACE||e===m.LINE_FEED||e===m.TABULATION||e===m.FORM_FEED}function ya(e){return co(e)||e===m.SOLIDUS||e===m.GREATER_THAN_SIGN}function Wp(e){return e===m.NULL?I.nullCharacterReference:e>1114111?I.characterReferenceOutsideUnicodeRange:ro(e)?I.surrogateCharacterReference:ao(e)?I.noncharacterCharacterReference:io(e)||e===m.CARRIAGE_RETURN?I.controlCharacterReference:null}class qp{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=b.DATA,this.returnState=b.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Op(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new uo(oo,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(I.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(I.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Wp(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:$.START_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:$.END_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:$.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:$.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(so(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(I.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=Dt(t.tagName),t.type===$.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(I.endTagWithAttributes),t.selfClosing&&this._err(I.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 $.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case $.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case $.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:$.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=co(t)?$.WHITESPACE_CHARACTER:t===m.NULL?$.NULL_CHARACTER:$.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken($.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=b.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Xe.Attribute:Xe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===b.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case b.DATA:{this._stateData(t);break}case b.RCDATA:{this._stateRcdata(t);break}case b.RAWTEXT:{this._stateRawtext(t);break}case b.SCRIPT_DATA:{this._stateScriptData(t);break}case b.PLAINTEXT:{this._statePlaintext(t);break}case b.TAG_OPEN:{this._stateTagOpen(t);break}case b.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case b.TAG_NAME:{this._stateTagName(t);break}case b.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case b.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case b.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case b.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case b.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case b.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case b.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case b.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case b.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case b.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case b.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case b.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case b.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case b.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case b.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case b.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case b.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case b.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case b.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case b.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case b.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case b.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case b.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case b.BOGUS_COMMENT:{this._stateBogusComment(t);break}case b.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case b.COMMENT_START:{this._stateCommentStart(t);break}case b.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case b.COMMENT:{this._stateComment(t);break}case b.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case b.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case b.COMMENT_END:{this._stateCommentEnd(t);break}case b.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case b.DOCTYPE:{this._stateDoctype(t);break}case b.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case b.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case b.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case b.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case b.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case b.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case b.CDATA_SECTION:{this._stateCdataSection(t);break}case b.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case b.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case b.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case b.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=b.TAG_OPEN;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitCodePoint(t);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case m.AMPERSAND:{this._startCharacterReference();break}case m.LESS_THAN_SIGN:{this.state=b.RCDATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(he);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case m.LESS_THAN_SIGN:{this.state=b.RAWTEXT_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(he);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(he);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(he);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(nt(t))this._createStartTagToken(),this.state=b.TAG_NAME,this._stateTagName(t);else switch(t){case m.EXCLAMATION_MARK:{this.state=b.MARKUP_DECLARATION_OPEN;break}case m.SOLIDUS:{this.state=b.END_TAG_OPEN;break}case m.QUESTION_MARK:{this._err(I.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t);break}case m.EOF:{this._err(I.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(I.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=b.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(nt(t))this._createEndTagToken(),this.state=b.TAG_NAME,this._stateTagName(t);else switch(t){case m.GREATER_THAN_SIGN:{this._err(I.missingEndTagName),this.state=b.DATA;break}case m.EOF:{this._err(I.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(I.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.tagName+=he;break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Vt(t)?xn(t):t)}}_stateRcdataLessThanSign(t){t===m.SOLIDUS?this.state=b.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){nt(t)?(this.state=b.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=b.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=b.BEFORE_ATTRIBUTE_NAME,!1;case m.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=b.SELF_CLOSING_START_TAG,!1;case m.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=b.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===m.SOLIDUS?this.state=b.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){nt(t)?(this.state=b.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case m.SOLIDUS:{this.state=b.SCRIPT_DATA_END_TAG_OPEN;break}case m.EXCLAMATION_MARK:{this.state=b.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=b.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){nt(t)?(this.state=b.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===m.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===m.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(he);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(he);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(he);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===m.SOLIDUS?this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:nt(t)?(this._emitChars("<"),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){nt(t)?(this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ie.SCRIPT,!1)&&ya(this.preprocessor.peek(Ie.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ie.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(he);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(he);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(he);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===m.SOLIDUS?(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ie.SCRIPT,!1)&&ya(this.preprocessor.peek(Ie.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ie.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._err(I.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=b.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this._leaveAttrName(),this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._leaveAttrName(),this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:{this._err(I.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.currentAttr.name+=he;break}default:this.currentAttr.name+=String.fromCodePoint(Vt(t)?xn(t):t)}}_stateAfterAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case m.EQUALS_SIGN:{this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{this.state=b.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this.state=b.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingAttributeValue),this.state=b.DATA,this.emitCurrentTagToken();break}default:this.state=b.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case m.QUOTATION_MARK:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.currentAttr.value+=he;break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case m.APOSTROPHE:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.currentAttr.value+=he;break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.currentAttr.value+=he;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:case m.EQUALS_SIGN:case m.GRAVE_ACCENT:{this._err(I.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this._leaveAttrValue(),this.state=b.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this._err(I.missingWhitespaceBetweenAttributes),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case m.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=b.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this._err(I.unexpectedSolidusInTag),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case m.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.data+=he;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ie.DASH_DASH,!0)?(this._createCommentToken(Ie.DASH_DASH.length+1),this.state=b.COMMENT_START):this._consumeSequenceIfMatch(Ie.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ie.DOCTYPE.length+1),this.state=b.DOCTYPE):this._consumeSequenceIfMatch(Ie.CDATA_START,!0)?this.inForeignNode?this.state=b.CDATA_SECTION:(this._err(I.cdataInHtmlContent),this._createCommentToken(Ie.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=b.BOGUS_COMMENT):this._ensureHibernation()||(this._err(I.incorrectlyOpenedComment),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.COMMENT_START_DASH;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptClosingOfEmptyComment),this.state=b.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=b.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptClosingOfEmptyComment),this.state=b.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=b.COMMENT_END_DASH;break}case m.LESS_THAN_SIGN:{n.data+="<",this.state=b.COMMENT_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.data+=he;break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case m.EXCLAMATION_MARK:{n.data+="!",this.state=b.COMMENT_LESS_THAN_SIGN_BANG;break}case m.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=b.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===m.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=b.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===m.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=b.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==m.GREATER_THAN_SIGN&&t!==m.EOF&&this._err(I.nestedComment),this.state=b.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case m.EXCLAMATION_MARK:{this.state=b.COMMENT_END_BANG;break}case m.HYPHEN_MINUS:{n.data+="-";break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=b.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{n.data+="--!",this.state=b.COMMENT_END_DASH;break}case m.GREATER_THAN_SIGN:{this._err(I.incorrectlyClosedComment),this.state=b.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=b.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case m.EOF:{this._err(I.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingWhitespaceBeforeDoctypeName),this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Vt(t))this._createDoctypeToken(String.fromCharCode(xn(t))),this.state=b.DOCTYPE_NAME;else switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.NULL:{this._err(I.unexpectedNullCharacter),this._createDoctypeToken(he),this.state=b.DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(I.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=b.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.AFTER_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.name+=he;break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Vt(t)?xn(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ie.PUBLIC,!1)?this.state=b.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ie.SYSTEM,!1)?this.state=b.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(I.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(I.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(I.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.publicId+=he;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(I.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 m.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.publicId+=he;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(I.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.QUOTATION_MARK:{this._err(I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(I.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(I.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.systemId+=he;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(I.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 m.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.systemId+=he;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(I.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.NULL:{this._err(I.unexpectedNullCharacter);break}case m.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case m.RIGHT_SQUARE_BRACKET:{this.state=b.CDATA_SECTION_BRACKET;break}case m.EOF:{this._err(I.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===m.RIGHT_SQUARE_BRACKET?this.state=b.CDATA_SECTION_END:(this._emitChars("]"),this.state=b.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case m.GREATER_THAN_SIGN:{this.state=b.DATA;break}case m.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=b.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(m.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&wa(this.preprocessor.peek(1))?b.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){wa(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===m.SEMICOLON&&this._err(I.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const ho=new Set([o.DD,o.DT,o.LI,o.OPTGROUP,o.OPTION,o.P,o.RB,o.RP,o.RT,o.RTC]),_a=new Set([...ho,o.CAPTION,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]),On=new Set([o.APPLET,o.CAPTION,o.HTML,o.MARQUEE,o.OBJECT,o.TABLE,o.TD,o.TEMPLATE,o.TH]),Vp=new Set([...On,o.OL,o.UL]),Gp=new Set([...On,o.BUTTON]),Aa=new Set([o.ANNOTATION_XML,o.MI,o.MN,o.MO,o.MS,o.MTEXT]),Ca=new Set([o.DESC,o.FOREIGN_OBJECT,o.TITLE]),Qp=new Set([o.TR,o.TEMPLATE,o.HTML]),Xp=new Set([o.TBODY,o.TFOOT,o.THEAD,o.TEMPLATE,o.HTML]),Kp=new Set([o.TABLE,o.TEMPLATE,o.HTML]),$p=new Set([o.TD,o.TH]);class Jp{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=o.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===o.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===R.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.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])!==R.HTML);this.shortenToLength(n<0?0:n)}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(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ir,R.HTML)}popUntilTableCellPopped(){this.popUntilPopped($p,R.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(Kp,R.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Xp,R.HTML)}clearBackToTableRowContext(){this.clearBackTo(Qp,R.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]===o.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]===o.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 R.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case R.SVG:{if(Ca.has(i))return!1;break}case R.MATHML:{if(Aa.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,On)}hasInListItemScope(t){return this.hasInDynamicScope(t,Vp)}hasInButtonScope(t){return this.hasInDynamicScope(t,Gp)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case R.HTML:{if(Ir.has(n))return!0;if(On.has(n))return!1;break}case R.SVG:{if(Ca.has(n))return!1;break}case R.MATHML:{if(Aa.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===R.HTML)switch(this.tagIDs[n]){case t:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===R.HTML)switch(this.tagIDs[t]){case o.TBODY:case o.THEAD:case o.TFOOT:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===R.HTML)switch(this.tagIDs[n]){case t:return!0;case o.OPTION:case o.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;ho.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;_a.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&_a.has(this.currentTagId);)this.pop()}}const dr=3;var je;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(je||(je={}));const ka={type:je.Marker};class Zp{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 u=0;u<this.entries.length;u++){const l=this.entries[u];if(l.type===je.Marker)break;const{element:c}=l;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const d=this.treeAdapter.getAttrList(c);d.length===i&&r.push({idx:u,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<dr)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<dr)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(l=>i.get(l.name)===l.value)&&(a+=1,a>=dr&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(ka)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:je.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:je.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(ka);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===je.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===je.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===je.Element&&n.element===t)}}const rt={createDocument(){return{nodeName:"#document",mode:ve.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};rt.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(rt.isTextNode(n)){n.value+=t;return}}rt.appendChild(e,rt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&rt.isTextNode(r)?r.value+=t:rt.insertBefore(e,rt.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}}},fo="html",em="about:legacy-compat",tm="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",po=["+//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//"],nm=[...po,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],rm=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),mo=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],im=[...mo,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ia(e,t){return t.some(n=>e.startsWith(n))}function am(e){return e.name===fo&&e.publicId===null&&(e.systemId===null||e.systemId===em)}function sm(e){if(e.name!==fo)return ve.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===tm)return ve.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),rm.has(n))return ve.QUIRKS;let r=t===null?nm:po;if(Ia(n,r))return ve.QUIRKS;if(r=t===null?mo:im,Ia(n,r))return ve.LIMITED_QUIRKS}return ve.NO_QUIRKS}const Sa={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},om="definitionurl",um="definitionURL",lm=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])),cm=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:R.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:R.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:R.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:R.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:R.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:R.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:R.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:R.XML}],["xml:space",{prefix:"xml",name:"space",namespace:R.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:R.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:R.XMLNS}]]),dm=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])),hm=new Set([o.B,o.BIG,o.BLOCKQUOTE,o.BODY,o.BR,o.CENTER,o.CODE,o.DD,o.DIV,o.DL,o.DT,o.EM,o.EMBED,o.H1,o.H2,o.H3,o.H4,o.H5,o.H6,o.HEAD,o.HR,o.I,o.IMG,o.LI,o.LISTING,o.MENU,o.META,o.NOBR,o.OL,o.P,o.PRE,o.RUBY,o.S,o.SMALL,o.SPAN,o.STRONG,o.STRIKE,o.SUB,o.SUP,o.TABLE,o.TT,o.U,o.UL,o.VAR]);function fm(e){const t=e.tagID;return t===o.FONT&&e.attrs.some(({name:r})=>r===pt.COLOR||r===pt.SIZE||r===pt.FACE)||hm.has(t)}function go(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===om){e.attrs[t].name=um;break}}function bo(e){for(let t=0;t<e.attrs.length;t++){const n=lm.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Jr(e){for(let t=0;t<e.attrs.length;t++){const n=cm.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 pm(e){const t=dm.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Dt(e.tagName))}function mm(e,t){return t===R.MATHML&&(e===o.MI||e===o.MO||e===o.MN||e===o.MS||e===o.MTEXT)}function gm(e,t,n){if(t===R.MATHML&&e===o.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===pt.ENCODING){const i=n[r].value.toLowerCase();return i===Sa.TEXT_HTML||i===Sa.APPLICATION_XML}}return t===R.SVG&&(e===o.FOREIGN_OBJECT||e===o.DESC||e===o.TITLE)}function bm(e,t,n,r){return(!r||r===R.HTML)&&gm(e,t,n)||(!r||r===R.MATHML)&&mm(e,t)}const Em="hidden",Tm=8,xm=3;var T;(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"})(T||(T={}));const wm={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Eo=new Set([o.TABLE,o.TBODY,o.TFOOT,o.THEAD,o.TR]),Na={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:rt,onParseError:null};class Oa{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=T.INITIAL,this.originalInsertionMode=T.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={...Na,...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 qp(this.options,this),this.activeFormattingElements=new Zp(this.treeAdapter),this.fragmentContextID=r?Dt(this.treeAdapter.getTagName(r)):o.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Jp(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={...Na,...n};t??(t=r.treeAdapter.createElement(A.TEMPLATE,R.HTML,[]));const i=r.treeAdapter.createElement("documentmock",R.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===o.TEMPLATE&&a.tmplInsertionModeStack.unshift(T.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:wm,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||this.treeAdapter.getNamespaceURI(t)===R.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,R.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=pe.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)===A.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==R.HTML))switch(this.fragmentContextID){case o.TITLE:case o.TEXTAREA:{this.tokenizer.state=pe.RCDATA;break}case o.STYLE:case o.XMP:case o.IFRAME:case o.NOEMBED:case o.NOFRAMES:case o.NOSCRIPT:{this.tokenizer.state=pe.RAWTEXT;break}case o.SCRIPT:{this.tokenizer.state=pe.SCRIPT_DATA;break}case o.PLAINTEXT:{this.tokenizer.state=pe.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(u=>this.treeAdapter.isDocumentTypeNode(u));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,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,R.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,R.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(A.HTML,R.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,o.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:l,endCol:c,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:c,endOffset:d})}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===$.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===o.SVG&&this.treeAdapter.getTagName(n)===A.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===R.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===o.MGLYPH||t.tagID===o.MALIGNMARK)&&!this._isIntegrationPoint(r,n,R.HTML)}_processToken(t){switch(t.type){case $.CHARACTER:{this.onCharacter(t);break}case $.NULL_CHARACTER:{this.onNullCharacter(t);break}case $.COMMENT:{this.onComment(t);break}case $.DOCTYPE:{this.onDoctype(t);break}case $.START_TAG:{this._processStartTag(t);break}case $.END_TAG:{this.onEndTag(t);break}case $.EOF:{this.onEof(t);break}case $.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return bm(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===je.Marker||this.openElements.contains(i.element)),r=n<0?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=T.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(o.P),this.openElements.popUntilTagNamePopped(o.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case o.TR:{this.insertionMode=T.IN_ROW;return}case o.TBODY:case o.THEAD:case o.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case o.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case o.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case o.TABLE:{this.insertionMode=T.IN_TABLE;return}case o.BODY:{this.insertionMode=T.IN_BODY;return}case o.FRAMESET:{this.insertionMode=T.IN_FRAMESET;return}case o.SELECT:{this._resetInsertionModeForSelect(t);return}case o.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case o.HTML:{this.insertionMode=this.headElement?T.AFTER_HEAD:T.BEFORE_HEAD;return}case o.TD:case o.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case o.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===o.TEMPLATE)break;if(r===o.TABLE){this.insertionMode=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return Eo.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&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 o.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===R.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case o.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 zp[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){$g(this,t);return}switch(this.insertionMode){case T.INITIAL:{jt(this,t);break}case T.BEFORE_HTML:{Xt(this,t);break}case T.BEFORE_HEAD:{Kt(this,t);break}case T.IN_HEAD:{$t(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Jt(this,t);break}case T.AFTER_HEAD:{Zt(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{xo(this,t);break}case T.TEXT:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{hr(this,t);break}case T.IN_TABLE_TEXT:{ko(this,t);break}case T.IN_COLUMN_GROUP:{Ln(this,t);break}case T.AFTER_BODY:{Rn(this,t);break}case T.AFTER_AFTER_BODY:{An(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Kg(this,t);return}switch(this.insertionMode){case T.INITIAL:{jt(this,t);break}case T.BEFORE_HTML:{Xt(this,t);break}case T.BEFORE_HEAD:{Kt(this,t);break}case T.IN_HEAD:{$t(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Jt(this,t);break}case T.AFTER_HEAD:{Zt(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{hr(this,t);break}case T.IN_COLUMN_GROUP:{Ln(this,t);break}case T.AFTER_BODY:{Rn(this,t);break}case T.AFTER_AFTER_BODY:{An(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Sr(this,t);return}switch(this.insertionMode){case T.INITIAL:case T.BEFORE_HTML:case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_TEMPLATE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{Sr(this,t);break}case T.IN_TABLE_TEXT:{Yt(this,t);break}case T.AFTER_BODY:{Sm(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Nm(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{Om(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,I.misplacedDoctype);break}case T.IN_TABLE_TEXT:{Yt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,I.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Jg(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{jt(this,t);break}case T.BEFORE_HTML:{Lm(this,t);break}case T.BEFORE_HEAD:{Dm(this,t);break}case T.IN_HEAD:{Ue(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Mm(this,t);break}case T.AFTER_HEAD:{Fm(this,t);break}case T.IN_BODY:{Ce(this,t);break}case T.IN_TABLE:{It(this,t);break}case T.IN_TABLE_TEXT:{Yt(this,t);break}case T.IN_CAPTION:{vg(this,t);break}case T.IN_COLUMN_GROUP:{ti(this,t);break}case T.IN_TABLE_BODY:{qn(this,t);break}case T.IN_ROW:{Vn(this,t);break}case T.IN_CELL:{Bg(this,t);break}case T.IN_SELECT:{No(this,t);break}case T.IN_SELECT_IN_TABLE:{Hg(this,t);break}case T.IN_TEMPLATE:{zg(this,t);break}case T.AFTER_BODY:{Yg(this,t);break}case T.IN_FRAMESET:{Wg(this,t);break}case T.AFTER_FRAMESET:{Vg(this,t);break}case T.AFTER_AFTER_BODY:{Qg(this,t);break}case T.AFTER_AFTER_FRAMESET:{Xg(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Zg(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{jt(this,t);break}case T.BEFORE_HTML:{Rm(this,t);break}case T.BEFORE_HEAD:{vm(this,t);break}case T.IN_HEAD:{Pm(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Bm(this,t);break}case T.AFTER_HEAD:{Hm(this,t);break}case T.IN_BODY:{Wn(this,t);break}case T.TEXT:{Ag(this,t);break}case T.IN_TABLE:{nn(this,t);break}case T.IN_TABLE_TEXT:{Yt(this,t);break}case T.IN_CAPTION:{Pg(this,t);break}case T.IN_COLUMN_GROUP:{Mg(this,t);break}case T.IN_TABLE_BODY:{Nr(this,t);break}case T.IN_ROW:{So(this,t);break}case T.IN_CELL:{Fg(this,t);break}case T.IN_SELECT:{Oo(this,t);break}case T.IN_SELECT_IN_TABLE:{Ug(this,t);break}case T.IN_TEMPLATE:{jg(this,t);break}case T.AFTER_BODY:{Ro(this,t);break}case T.IN_FRAMESET:{qg(this,t);break}case T.AFTER_FRAMESET:{Gg(this,t);break}case T.AFTER_AFTER_BODY:{An(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{jt(this,t);break}case T.BEFORE_HTML:{Xt(this,t);break}case T.BEFORE_HEAD:{Kt(this,t);break}case T.IN_HEAD:{$t(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Jt(this,t);break}case T.AFTER_HEAD:{Zt(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{Ao(this,t);break}case T.TEXT:{Cg(this,t);break}case T.IN_TABLE_TEXT:{Yt(this,t);break}case T.IN_TEMPLATE:{Lo(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{ei(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===m.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 T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.TEXT:case T.IN_COLUMN_GROUP:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{this._insertCharacters(t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:case T.AFTER_BODY:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{To(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{hr(this,t);break}case T.IN_TABLE_TEXT:{Co(this,t);break}}}}function ym(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):_o(e,t),n}function _m(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(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function Am(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 u=e.activeFormattingElements.getElementEntry(s),l=u&&a>=xm;!u||l?(l&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=Cm(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function Cm(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 km(e,t,n){const r=e.treeAdapter.getTagName(t),i=Dt(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===o.TEMPLATE&&a===R.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Im(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 Zr(e,t){for(let n=0;n<Tm;n++){const r=ym(e,t);if(!r)break;const i=_m(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=Am(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&km(e,s,a),Im(e,i,r)}}function Sr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Sm(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Nm(e,t){e._appendCommentNode(t,e.document)}function ei(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 Om(e,t){e._setDocumentType(t);const n=t.forceQuirks?ve.QUIRKS:sm(t);am(t)||e._err(t,I.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function jt(e,t){e._err(t,I.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ve.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function Lm(e,t){t.tagID===o.HTML?(e._insertElement(t,R.HTML),e.insertionMode=T.BEFORE_HEAD):Xt(e,t)}function Rm(e,t){const n=t.tagID;(n===o.HTML||n===o.HEAD||n===o.BODY||n===o.BR)&&Xt(e,t)}function Xt(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function Dm(e,t){switch(t.tagID){case o.HTML:{Ce(e,t);break}case o.HEAD:{e._insertElement(t,R.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:Kt(e,t)}}function vm(e,t){const n=t.tagID;n===o.HEAD||n===o.BODY||n===o.HTML||n===o.BR?Kt(e,t):e._err(t,I.endTagWithoutMatchingOpenElement)}function Kt(e,t){e._insertFakeElement(A.HEAD,o.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function Ue(e,t){switch(t.tagID){case o.HTML:{Ce(e,t);break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:{e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break}case o.TITLE:{e._switchToTextParsing(t,pe.RCDATA);break}case o.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,pe.RAWTEXT):(e._insertElement(t,R.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case o.NOFRAMES:case o.STYLE:{e._switchToTextParsing(t,pe.RAWTEXT);break}case o.SCRIPT:{e._switchToTextParsing(t,pe.SCRIPT_DATA);break}case o.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case o.HEAD:{e._err(t,I.misplacedStartTagForHeadElement);break}default:$t(e,t)}}function Pm(e,t){switch(t.tagID){case o.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case o.BODY:case o.BR:case o.HTML:{$t(e,t);break}case o.TEMPLATE:{bt(e,t);break}default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function bt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==o.TEMPLATE&&e._err(t,I.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,I.endTagWithoutMatchingOpenElement)}function $t(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function Mm(e,t){switch(t.tagID){case o.HTML:{Ce(e,t);break}case o.BASEFONT:case o.BGSOUND:case o.HEAD:case o.LINK:case o.META:case o.NOFRAMES:case o.STYLE:{Ue(e,t);break}case o.NOSCRIPT:{e._err(t,I.nestedNoscriptInHead);break}default:Jt(e,t)}}function Bm(e,t){switch(t.tagID){case o.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case o.BR:{Jt(e,t);break}default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function Jt(e,t){const n=t.type===$.EOF?I.openElementsLeftAfterEof:I.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function Fm(e,t){switch(t.tagID){case o.HTML:{Ce(e,t);break}case o.BODY:{e._insertElement(t,R.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case o.FRAMESET:{e._insertElement(t,R.HTML),e.insertionMode=T.IN_FRAMESET;break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{e._err(t,I.abandonedHeadElementChild),e.openElements.push(e.headElement,o.HEAD),Ue(e,t),e.openElements.remove(e.headElement);break}case o.HEAD:{e._err(t,I.misplacedStartTagForHeadElement);break}default:Zt(e,t)}}function Hm(e,t){switch(t.tagID){case o.BODY:case o.HTML:case o.BR:{Zt(e,t);break}case o.TEMPLATE:{bt(e,t);break}default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function Zt(e,t){e._insertFakeElement(A.BODY,o.BODY),e.insertionMode=T.IN_BODY,Yn(e,t)}function Yn(e,t){switch(t.type){case $.CHARACTER:{xo(e,t);break}case $.WHITESPACE_CHARACTER:{To(e,t);break}case $.COMMENT:{Sr(e,t);break}case $.START_TAG:{Ce(e,t);break}case $.END_TAG:{Wn(e,t);break}case $.EOF:{Ao(e,t);break}}}function To(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function xo(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Um(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function zm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function jm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,R.HTML),e.insertionMode=T.IN_FRAMESET)}function Ym(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,R.HTML)}function Wm(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),Ir.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,R.HTML)}function qm(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,R.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Vm(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,R.HTML),n||(e.formElement=e.openElements.current))}function Gm(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===o.LI&&i===o.LI||(n===o.DD||n===o.DT)&&(i===o.DD||i===o.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==o.ADDRESS&&i!==o.DIV&&i!==o.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,R.HTML)}function Qm(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,R.HTML),e.tokenizer.state=pe.PLAINTEXT}function Xm(e,t){e.openElements.hasInScope(o.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.framesetOk=!1}function Km(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(A.A);n&&(Zr(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $m(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Jm(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(o.NOBR)&&(Zr(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,R.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Zm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function eg(e,t){e.treeAdapter.getDocumentMode(e.document)!==ve.QUIRKS&&e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,R.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function wo(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,R.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function yo(e){const t=so(e,pt.TYPE);return t!=null&&t.toLowerCase()===Em}function tg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,R.HTML),yo(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function ng(e,t){e._appendElement(t,R.HTML),t.ackSelfClosing=!0}function rg(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._appendElement(t,R.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ig(e,t){t.tagName=A.IMG,t.tagID=o.IMG,wo(e,t)}function ag(e,t){e._insertElement(t,R.HTML),e.skipNextNewLine=!0,e.tokenizer.state=pe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function sg(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,pe.RAWTEXT)}function og(e,t){e.framesetOk=!1,e._switchToTextParsing(t,pe.RAWTEXT)}function La(e,t){e._switchToTextParsing(t,pe.RAWTEXT)}function ug(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===T.IN_TABLE||e.insertionMode===T.IN_CAPTION||e.insertionMode===T.IN_TABLE_BODY||e.insertionMode===T.IN_ROW||e.insertionMode===T.IN_CELL?T.IN_SELECT_IN_TABLE:T.IN_SELECT}function lg(e,t){e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML)}function cg(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,R.HTML)}function dg(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(o.RTC),e._insertElement(t,R.HTML)}function hg(e,t){e._reconstructActiveFormattingElements(),go(t),Jr(t),t.selfClosing?e._appendElement(t,R.MATHML):e._insertElement(t,R.MATHML),t.ackSelfClosing=!0}function fg(e,t){e._reconstructActiveFormattingElements(),bo(t),Jr(t),t.selfClosing?e._appendElement(t,R.SVG):e._insertElement(t,R.SVG),t.ackSelfClosing=!0}function Ra(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML)}function Ce(e,t){switch(t.tagID){case o.I:case o.S:case o.B:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.SMALL:case o.STRIKE:case o.STRONG:{$m(e,t);break}case o.A:{Km(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{Wm(e,t);break}case o.P:case o.DL:case o.OL:case o.UL:case o.DIV:case o.DIR:case o.NAV:case o.MAIN:case o.MENU:case o.ASIDE:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.DETAILS:case o.ADDRESS:case o.ARTICLE:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{Ym(e,t);break}case o.LI:case o.DD:case o.DT:{Gm(e,t);break}case o.BR:case o.IMG:case o.WBR:case o.AREA:case o.EMBED:case o.KEYGEN:{wo(e,t);break}case o.HR:{rg(e,t);break}case o.RB:case o.RTC:{cg(e,t);break}case o.RT:case o.RP:{dg(e,t);break}case o.PRE:case o.LISTING:{qm(e,t);break}case o.XMP:{sg(e,t);break}case o.SVG:{fg(e,t);break}case o.HTML:{Um(e,t);break}case o.BASE:case o.LINK:case o.META:case o.STYLE:case o.TITLE:case o.SCRIPT:case o.BGSOUND:case o.BASEFONT:case o.TEMPLATE:{Ue(e,t);break}case o.BODY:{zm(e,t);break}case o.FORM:{Vm(e,t);break}case o.NOBR:{Jm(e,t);break}case o.MATH:{hg(e,t);break}case o.TABLE:{eg(e,t);break}case o.INPUT:{tg(e,t);break}case o.PARAM:case o.TRACK:case o.SOURCE:{ng(e,t);break}case o.IMAGE:{ig(e,t);break}case o.BUTTON:{Xm(e,t);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{Zm(e,t);break}case o.IFRAME:{og(e,t);break}case o.SELECT:{ug(e,t);break}case o.OPTION:case o.OPTGROUP:{lg(e,t);break}case o.NOEMBED:case o.NOFRAMES:{La(e,t);break}case o.FRAMESET:{jm(e,t);break}case o.TEXTAREA:{ag(e,t);break}case o.NOSCRIPT:{e.options.scriptingEnabled?La(e,t):Ra(e,t);break}case o.PLAINTEXT:{Qm(e,t);break}case o.COL:case o.TH:case o.TD:case o.TR:case o.HEAD:case o.FRAME:case o.TBODY:case o.TFOOT:case o.THEAD:case o.CAPTION:case o.COLGROUP:break;default:Ra(e,t)}}function pg(e,t){if(e.openElements.hasInScope(o.BODY)&&(e.insertionMode=T.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function mg(e,t){e.openElements.hasInScope(o.BODY)&&(e.insertionMode=T.AFTER_BODY,Ro(e,t))}function gg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function bg(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(o.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(o.FORM):n&&e.openElements.remove(n))}function Eg(e){e.openElements.hasInButtonScope(o.P)||e._insertFakeElement(A.P,o.P),e._closePElement()}function Tg(e){e.openElements.hasInListItemScope(o.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(o.LI),e.openElements.popUntilTagNamePopped(o.LI))}function xg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function wg(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function yg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function _g(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(A.BR,o.BR),e.openElements.pop(),e.framesetOk=!1}function _o(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!==o.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 Wn(e,t){switch(t.tagID){case o.A:case o.B:case o.I:case o.S:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.NOBR:case o.SMALL:case o.STRIKE:case o.STRONG:{Zr(e,t);break}case o.P:{Eg(e);break}case o.DL:case o.UL:case o.OL:case o.DIR:case o.DIV:case o.NAV:case o.PRE:case o.MAIN:case o.MENU:case o.ASIDE:case o.BUTTON:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.ADDRESS:case o.ARTICLE:case o.DETAILS:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.LISTING:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{gg(e,t);break}case o.LI:{Tg(e);break}case o.DD:case o.DT:{xg(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{wg(e);break}case o.BR:{_g(e);break}case o.BODY:{pg(e,t);break}case o.HTML:{mg(e,t);break}case o.FORM:{bg(e);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{yg(e,t);break}case o.TEMPLATE:{bt(e,t);break}default:_o(e,t)}}function Ao(e,t){e.tmplInsertionModeStack.length>0?Lo(e,t):ei(e,t)}function Ag(e,t){var n;t.tagID===o.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Cg(e,t){e._err(t,I.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function hr(e,t){if(Eo.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case $.CHARACTER:{ko(e,t);break}case $.WHITESPACE_CHARACTER:{Co(e,t);break}}else hn(e,t)}function kg(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,R.HTML),e.insertionMode=T.IN_CAPTION}function Ig(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,R.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function Sg(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(A.COLGROUP,o.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,ti(e,t)}function Ng(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,R.HTML),e.insertionMode=T.IN_TABLE_BODY}function Og(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(A.TBODY,o.TBODY),e.insertionMode=T.IN_TABLE_BODY,qn(e,t)}function Lg(e,t){e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Rg(e,t){yo(t)?e._appendElement(t,R.HTML):hn(e,t),t.ackSelfClosing=!0}function Dg(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,R.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function It(e,t){switch(t.tagID){case o.TD:case o.TH:case o.TR:{Og(e,t);break}case o.STYLE:case o.SCRIPT:case o.TEMPLATE:{Ue(e,t);break}case o.COL:{Sg(e,t);break}case o.FORM:{Dg(e,t);break}case o.TABLE:{Lg(e,t);break}case o.TBODY:case o.TFOOT:case o.THEAD:{Ng(e,t);break}case o.INPUT:{Rg(e,t);break}case o.CAPTION:{kg(e,t);break}case o.COLGROUP:{Ig(e,t);break}default:hn(e,t)}}function nn(e,t){switch(t.tagID){case o.TABLE:{e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode());break}case o.TEMPLATE:{bt(e,t);break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:hn(e,t)}}function hn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Yn(e,t),e.fosterParentingEnabled=n}function Co(e,t){e.pendingCharacterTokens.push(t)}function ko(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Yt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)hn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Io=new Set([o.CAPTION,o.COL,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]);function vg(e,t){const n=t.tagID;Io.has(n)?e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,It(e,t)):Ce(e,t)}function Pg(e,t){const n=t.tagID;switch(n){case o.CAPTION:case o.TABLE:{e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,n===o.TABLE&&nn(e,t));break}case o.BODY:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:Wn(e,t)}}function ti(e,t){switch(t.tagID){case o.HTML:{Ce(e,t);break}case o.COL:{e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break}case o.TEMPLATE:{Ue(e,t);break}default:Ln(e,t)}}function Mg(e,t){switch(t.tagID){case o.COLGROUP:{e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case o.TEMPLATE:{bt(e,t);break}case o.COL:break;default:Ln(e,t)}}function Ln(e,t){e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function qn(e,t){switch(t.tagID){case o.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,R.HTML),e.insertionMode=T.IN_ROW;break}case o.TH:case o.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(A.TR,o.TR),e.insertionMode=T.IN_ROW,Vn(e,t);break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,It(e,t));break}default:It(e,t)}}function Nr(e,t){const n=t.tagID;switch(t.tagID){case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case o.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,nn(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:case o.TR:break;default:nn(e,t)}}function Vn(e,t){switch(t.tagID){case o.TH:case o.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,R.HTML),e.insertionMode=T.IN_CELL,e.activeFormattingElements.insertMarker();break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,qn(e,t));break}default:It(e,t)}}function So(e,t){switch(t.tagID){case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY);break}case o.TABLE:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Nr(e,t));break}case o.TBODY:case o.TFOOT:case o.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(o.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Nr(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:break;default:nn(e,t)}}function Bg(e,t){const n=t.tagID;Io.has(n)?(e.openElements.hasInTableScope(o.TD)||e.openElements.hasInTableScope(o.TH))&&(e._closeTableCell(),Vn(e,t)):Ce(e,t)}function Fg(e,t){const n=t.tagID;switch(n){case o.TD:case o.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_ROW);break}case o.TABLE:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),So(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:break;default:Wn(e,t)}}function No(e,t){switch(t.tagID){case o.HTML:{Ce(e,t);break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._insertElement(t,R.HTML);break}case o.OPTGROUP:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._insertElement(t,R.HTML);break}case o.HR:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break}case o.INPUT:case o.KEYGEN:case o.TEXTAREA:case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),t.tagID!==o.SELECT&&e._processStartTag(t));break}case o.SCRIPT:case o.TEMPLATE:{Ue(e,t);break}}}function Oo(e,t){switch(t.tagID){case o.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===o.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===o.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop();break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop();break}case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode());break}case o.TEMPLATE:{bt(e,t);break}}}function Hg(e,t){const n=t.tagID;n===o.CAPTION||n===o.TABLE||n===o.TBODY||n===o.TFOOT||n===o.THEAD||n===o.TR||n===o.TD||n===o.TH?(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e._processStartTag(t)):No(e,t)}function Ug(e,t){const n=t.tagID;n===o.CAPTION||n===o.TABLE||n===o.TBODY||n===o.TFOOT||n===o.THEAD||n===o.TR||n===o.TD||n===o.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Oo(e,t)}function zg(e,t){switch(t.tagID){case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{Ue(e,t);break}case o.CAPTION:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,It(e,t);break}case o.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,ti(e,t);break}case o.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,qn(e,t);break}case o.TD:case o.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,Vn(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,Ce(e,t)}}function jg(e,t){t.tagID===o.TEMPLATE&&bt(e,t)}function Lo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ei(e,t)}function Yg(e,t){t.tagID===o.HTML?Ce(e,t):Rn(e,t)}function Ro(e,t){var n;if(t.tagID===o.HTML){if(e.fragmentContext||(e.insertionMode=T.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===o.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 Rn(e,t)}function Rn(e,t){e.insertionMode=T.IN_BODY,Yn(e,t)}function Wg(e,t){switch(t.tagID){case o.HTML:{Ce(e,t);break}case o.FRAMESET:{e._insertElement(t,R.HTML);break}case o.FRAME:{e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break}case o.NOFRAMES:{Ue(e,t);break}}}function qg(e,t){t.tagID===o.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==o.FRAMESET&&(e.insertionMode=T.AFTER_FRAMESET))}function Vg(e,t){switch(t.tagID){case o.HTML:{Ce(e,t);break}case o.NOFRAMES:{Ue(e,t);break}}}function Gg(e,t){t.tagID===o.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function Qg(e,t){t.tagID===o.HTML?Ce(e,t):An(e,t)}function An(e,t){e.insertionMode=T.IN_BODY,Yn(e,t)}function Xg(e,t){switch(t.tagID){case o.HTML:{Ce(e,t);break}case o.NOFRAMES:{Ue(e,t);break}}}function Kg(e,t){t.chars=he,e._insertCharacters(t)}function $g(e,t){e._insertCharacters(t),e.framesetOk=!1}function Do(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==R.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Jg(e,t){if(fm(t))Do(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===R.MATHML?go(t):r===R.SVG&&(pm(t),bo(t)),Jr(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Zg(e,t){if(t.tagID===o.P||t.tagID===o.BR){Do(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)===R.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}A.AREA,A.BASE,A.BASEFONT,A.BGSOUND,A.BR,A.COL,A.EMBED,A.FRAME,A.HR,A.IMG,A.INPUT,A.KEYGEN,A.LINK,A.META,A.PARAM,A.SOURCE,A.TRACK,A.WBR;const e1=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,t1=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Da={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function vo(e,t){const n=d1(e),r=Qa("type",{handlers:{root:n1,element:r1,text:i1,comment:Mo,doctype:a1,raw:o1},unknown:u1}),i={parser:n?new Oa(Da):Oa.getFragmentParser(void 0,Da),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),vt(i,qe());const a=n?i.parser.document:i.parser.getFragment(),s=hp(a,{file:i.options.file});return i.stitches&&Fn(s,"comment",function(u,l,c){const d=u;if(d.value.stitch&&c&&l!==void 0){const h=c.children;return h[l]=d.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Po(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function n1(e,t){Po(e.children,t)}function r1(e,t){l1(e,t),Po(e.children,t),c1(e,t)}function i1(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:$.CHARACTER,chars:e.value,location:fn(e)};vt(t,qe(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function a1(e,t){const n={type:$.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:fn(e)};vt(t,qe(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function s1(e,t){t.stitches=!0;const n=h1(e);if("children"in e&&"children"in n){const r=vo({type:"root",children:e.children},t.options);n.children=r.children}Mo({type:"comment",value:{stitch:n}},t)}function Mo(e,t){const n=e.value,r={type:$.COMMENT,data:n,location:fn(e)};vt(t,qe(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function o1(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,Bo(t,qe(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(e1,"<$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 u1(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))s1(n,t);else{let r="";throw t1.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 vt(e,t){Bo(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=pe.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 Bo(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 l1(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===pe.PLAINTEXT)return;vt(t,qe(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:ft.html;i===ft.html&&n==="svg"&&(i=ft.svg);const a=bp({...e,children:[]},{space:i===ft.svg?"svg":"html"}),s={type:$.START_TAG,tagName:n,tagID:Dt(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:fn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function c1(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Cp.includes(n)||t.parser.tokenizer.state===pe.PLAINTEXT)return;vt(t,zn(e));const r={type:$.END_TAG,tagName:n,tagID:Dt(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:fn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===pe.RCDATA||t.parser.tokenizer.state===pe.RAWTEXT||t.parser.tokenizer.state===pe.SCRIPT_DATA)&&(t.parser.tokenizer.state=pe.DATA)}function d1(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function fn(e){const t=qe(e)||{line:void 0,column:void 0,offset:void 0},n=zn(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 h1(e){return"children"in e?kt({...e,children:[]}):kt(e)}function Fo(e){return function(t,n){return vo(t,{...e,file:n})}}const ni="-",f1=e=>{const t=m1(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const u=s.split(ni);return u[0]===""&&u.length!==1&&u.shift(),Ho(u,t)||p1(s)},getConflictingClassGroupIds:(s,u)=>{const l=n[s]||[];return u&&r[s]?[...l,...r[s]]:l}}},Ho=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Ho(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(ni);return(s=t.validators.find(({validator:u})=>u(a)))==null?void 0:s.classGroupId},va=/^\[(.+)\]$/,p1=e=>{if(va.test(e)){const t=va.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},m1=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return b1(Object.entries(e.classGroups),n).forEach(([a,s])=>{Or(s,r,a,t)}),r},Or=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:Pa(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(g1(i)){Or(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,s])=>{Or(s,Pa(t,a),n,r)})})},Pa=(e,t)=>{let n=e;return t.split(ni).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},g1=e=>e.isThemeGetter,b1=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,u])=>[t+s,u])):a);return[n,i]}):e,E1=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return i(a,s),s},set(a,s){n.has(a)?n.set(a,s):i(a,s)}}},Uo="!",T1=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,s=u=>{const l=[];let c=0,d=0,h;for(let k=0;k<u.length;k++){let _=u[k];if(c===0){if(_===i&&(r||u.slice(k,k+a)===t)){l.push(u.slice(d,k)),d=k+a;continue}if(_==="/"){h=k;continue}}_==="["?c++:_==="]"&&c--}const g=l.length===0?u:u.substring(d),p=g.startsWith(Uo),E=p?g.substring(1):g,y=h&&h>d?h-d:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:E,maybePostfixModifierPosition:y}};return n?u=>n({className:u,parseClassName:s}):s},x1=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},w1=e=>({cache:E1(e.cacheSize),parseClassName:T1(e),...f1(e)}),y1=/\s+/,_1=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],s=e.trim().split(y1);let u="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{modifiers:d,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:p}=n(c);let E=!!p,y=r(E?g.substring(0,p):g);if(!y){if(!E){u=c+(u.length>0?" "+u:u);continue}if(y=r(g),!y){u=c+(u.length>0?" "+u:u);continue}E=!1}const k=x1(d).join(":"),_=h?k+Uo:k,N=_+y;if(a.includes(N))continue;a.push(N);const L=i(y,E);for(let M=0;M<L.length;++M){const F=L[M];a.push(_+F)}u=c+(u.length>0?" "+u:u)}return u};function A1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=zo(t))&&(r&&(r+=" "),r+=n);return r}const zo=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zo(e[r]))&&(n&&(n+=" "),n+=t);return n};function C1(e,...t){let n,r,i,a=s;function s(l){const c=t.reduce((d,h)=>h(d),e());return n=w1(c),r=n.cache.get,i=n.cache.set,a=u,u(l)}function u(l){const c=r(l);if(c)return c;const d=_1(l,n);return i(l,d),d}return function(){return a(A1.apply(null,arguments))}}const le=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},jo=/^\[(?:([a-z-]+):)?(.+)\]$/i,k1=/^\d+\/\d+$/,I1=new Set(["px","full","screen"]),S1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,N1=/\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$/,O1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,L1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qe=e=>Ct(e)||I1.has(e)||k1.test(e),et=e=>Pt(e,"length",U1),Ct=e=>!!e&&!Number.isNaN(Number(e)),fr=e=>Pt(e,"number",Ct),Wt=e=>!!e&&Number.isInteger(Number(e)),D1=e=>e.endsWith("%")&&Ct(e.slice(0,-1)),Q=e=>jo.test(e),tt=e=>S1.test(e),v1=new Set(["length","size","percentage"]),P1=e=>Pt(e,v1,Yo),M1=e=>Pt(e,"position",Yo),B1=new Set(["image","url"]),F1=e=>Pt(e,B1,j1),H1=e=>Pt(e,"",z1),qt=()=>!0,Pt=(e,t,n)=>{const r=jo.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},U1=e=>N1.test(e)&&!O1.test(e),Yo=()=>!1,z1=e=>L1.test(e),j1=e=>R1.test(e),Y1=()=>{const e=le("colors"),t=le("spacing"),n=le("blur"),r=le("brightness"),i=le("borderColor"),a=le("borderRadius"),s=le("borderSpacing"),u=le("borderWidth"),l=le("contrast"),c=le("grayscale"),d=le("hueRotate"),h=le("invert"),g=le("gap"),p=le("gradientColorStops"),E=le("gradientColorStopPositions"),y=le("inset"),k=le("margin"),_=le("opacity"),N=le("padding"),L=le("saturate"),M=le("scale"),F=le("sepia"),S=le("skew"),Y=le("space"),z=le("translate"),j=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",Q,t],P=()=>[Q,t],ne=()=>["",Qe,et],re=()=>["auto",Ct,Q],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ce=()=>["solid","dashed","dotted","double","none"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>["start","end","center","between","around","evenly","stretch"],Te=()=>["","0",Q],x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],de=()=>[Ct,Q];return{cacheSize:500,separator:":",theme:{colors:[qt],spacing:[Qe,et],blur:["none","",tt,Q],brightness:de(),borderColor:[e],borderRadius:["none","","full",tt,Q],borderSpacing:P(),borderWidth:ne(),contrast:de(),grayscale:Te(),hueRotate:de(),invert:Te(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[D1,et],inset:H(),margin:H(),opacity:de(),padding:P(),saturate:de(),scale:de(),sepia:Te(),skew:de(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",Q]}],container:["container"],columns:[{columns:[tt]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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"],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:[...K(),Q]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wt,Q]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Q]}],grow:[{grow:Te()}],shrink:[{shrink:Te()}],order:[{order:["first","last","none",Wt,Q]}],"grid-cols":[{"grid-cols":[qt]}],"col-start-end":[{col:["auto",{span:["full",Wt,Q]},Q]}],"col-start":[{"col-start":re()}],"col-end":[{"col-end":re()}],"grid-rows":[{"grid-rows":[qt]}],"row-start-end":[{row:["auto",{span:[Wt,Q]},Q]}],"row-start":[{"row-start":re()}],"row-end":[{"row-end":re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Q]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...Ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[Y]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Y]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Q,t]}],"min-w":[{"min-w":[Q,t,"min","max","fit"]}],"max-w":[{"max-w":[Q,t,"none","full","min","max","fit","prose",{screen:[tt]},tt]}],h:[{h:[Q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",tt,et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",fr]}],"font-family":[{font:[qt]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Q]}],"line-clamp":[{"line-clamp":["none",Ct,fr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Qe,Q]}],"list-image":[{"list-image":["none",Q]}],"list-style-type":[{list:["none","disc","decimal",Q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Qe,et]}],"underline-offset":[{"underline-offset":["auto",Qe,Q]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),M1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",P1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},F1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...ce(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:ce()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ce()]}],"outline-offset":[{"outline-offset":[Qe,Q]}],"outline-w":[{outline:[Qe,et]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Qe,et]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",tt,H1]}],"shadow-color":[{shadow:[qt]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...fe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":fe()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",tt,Q]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[L]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Q]}],duration:[{duration:de()}],ease:[{ease:["linear","in","out","in-out",Q]}],delay:[{delay:de()}],animate:[{animate:["none","spin","ping","pulse","bounce",Q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Wt,Q]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Qe,et,fr]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},W1=C1(Y1);function q(...e){return W1(ja.clsx(e))}function Lr(){return Lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lr.apply(null,arguments)}function q1(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var Wo,qo;typeof document<"u"&&(Wo=document);typeof window<"u"&&(qo=window);var Vo=X.createContext({document:Wo,window:qo}),V1=()=>X.useContext(Vo),G1=["children","head","initialContent","src","mountTarget"],ri=X.forwardRef((e,t)=>{var{children:n,head:r,initialContent:i,src:a,mountTarget:s}=e,u=q1(e,G1),[l,c]=X.useState(!1),[d,h]=X.useState(),g=M=>{M&&h(M)};X.useImperativeHandle(t,()=>d,[d]);var p=i||"<!DOCTYPE html><html><head></head><body></body></html>",E=()=>d?d.contentDocument:null,y=()=>{var M=E();return s?M==null?void 0:M.querySelector(s):M==null?void 0:M.body},k=X.useRef(),_=X.useCallback(M=>{k.current=M;var F=()=>setInterval(()=>_(M),500);clearInterval(F()),l||c(!0)},[l]);X.useMemo(()=>{!a&&u.onLoad&&l&&u.onLoad(k.current)},[l]),X.useEffect(()=>{if(d&&!a){var M;(M=d.contentWindow)==null||M.addEventListener("DOMContentLoaded",_)}return()=>{if(d&&!a){var F;(F=d.contentWindow)==null||F.removeEventListener("DOMContentLoaded",_)}}},[d,_]);var N=()=>{var M,F=E(),S=(M=E())==null?void 0:M.head,Y=y(),z=(F==null?void 0:F.defaultView)||(F==null?void 0:F.parentView),j=f.jsx(Vo.Provider,{value:{document:F,window:z},children:n});return[S&&r&&pr.createPortal(r,S),d&&Y&&pr.createPortal(j,Y)]},L={};return a?(delete L.srcDoc,L.src=a,L.onLoad=u.onLoad):L.srcDoc=p,f.jsx("iframe",Lr({title:u.title,ref:g},u,{onLoad:_},L,{children:l&&N()}))});ri.displayName="IFrame";const Go="opencx-widget-portal";function Gn(){return null}function Q1({children:e}){var n,r;const t=(r=(n=V1())==null?void 0:n.document)==null?void 0:r.getElementById(Go);return t?pr.createPortal(e,t):(console.error("Portal container not found!"),null)}function X1(){return f.jsx("div",{id:Go,className:"absolute size-full top-0 left-0"})}Gn.Portal=Q1;Gn.Container=X1;const Ma=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Ba=ja.clsx,K1=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ba(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,s=Object.keys(i).map(c=>{const d=n==null?void 0:n[c],h=a==null?void 0:a[c];if(d===null)return null;const g=Ma(d)||Ma(h);return i[c][g]}),u=n&&Object.entries(n).reduce((c,d)=>{let[h,g]=d;return g===void 0||(c[h]=g),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:h,className:g,...p}=d;return Object.entries(p).every(E=>{let[y,k]=E;return Array.isArray(k)?k.includes({...a,...u}[y]):{...a,...u}[y]===k})?[...c,h,g]:c},[]);return Ba(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},St={x:2,y:2},Ke=X.memo(X.forwardRef(({children:e,className:t,scale:n=1.02,off:r=!1},i)=>{const[a,s]=X.useState(!1),[u,l]=X.useState({x:0,y:0});if(r||/translate/.test(e.props.className||""))return e;const d=E=>{var z,j;const{clientX:y,clientY:k}=E,_=E.currentTarget.getBoundingClientRect(),N=y-(_.left+_.width/2),L=k-(_.top+_.height/2),M=Math.max(-1,Math.min(1,N/(_.width/2))),F=Math.max(-1,Math.min(1,L/(_.height/2))),S=M*St.x,Y=F*St.y;l({x:S,y:Y}),(j=(z=e.props).onMouseMove)==null||j.call(z,E)},h=()=>{var E,y;s(!0),(y=(E=e.props).onMouseEnter)==null||y.call(E)},g=()=>{var E,y;s(!1),l({x:0,y:0}),(y=(E=e.props).onMouseLeave)==null||y.call(E)},p={"--wobble-x":a?`${u.x}px`:"0px","--wobble-y":a?`${u.y}px`:"0px","--scale":1-(n-1)};return X.cloneElement(e,{ref:i,onMouseMove:d,onMouseEnter:h,onMouseLeave:g,style:{...p,...e.props.style},className:q("translate-x-[var(--wobble-x)]","translate-y-[var(--wobble-y)]","hover:scale-[var(--scale)] active:hover:scale-[calc(var(--scale)-0.02)]",t,e.props.className,"transition-all ease-out")})}));Ke.displayName="Wobble";function ie(e){return{"data-component":e}}const $1=K1(q("inline-flex shrink-0 items-center justify-center gap-2","text-sm font-medium whitespace-nowrap","ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","active:scale-95 hover:active:scale-95","rounded-xl","transition"),{variants:{variant:{default:"bg-primary text-primary-foreground",destructive:"bg-destructive text-destructive-foreground",outline:"bg-background",secondary:"bg-secondary text-secondary-foreground",ghost:"hover:bg-secondary",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"py-2 px-3.5 text-xs",lg:"min-h-12 px-4 rounded-[20px]",icon:"h-10 w-10",fit:"size-fit p-2",free:"p-2",selfless:"p-0"}},defaultVariants:{variant:"default",size:"default"}}),be=Ye.forwardRef(({className:e,variant:t="default",size:n,asChild:r=!1,...i},a)=>{const s=r?_u.Slot:"button";return f.jsx(Ke,{ref:a,children:f.jsx(s,{...ie("ui_lib/btn"),"data-variant":t,className:q($1({variant:t,size:n,className:e})),...i})})});be.displayName="Button";const Qo=He.Root,Xo=He.Trigger,Ko=Ye.forwardRef(({className:e,...t},n)=>f.jsx(He.Overlay,{ref:n,className:q("fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ko.displayName=He.Overlay.displayName;const ii=Ye.forwardRef(({className:e,children:t,withClose:n=!1,...r},i)=>f.jsxs(Gn.Portal,{children:[f.jsx(Ko,{}),f.jsxs(He.Content,{ref:i,className:q("fixed left-[50%] top-[50%] z-50 flex flex-col space-y-4 w-full max-w-[61.8%] translate-x-[-50%] translate-y-[-50%] border bg-background p-4 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-3xl",e),...r,children:[t,n&&f.jsx(He.Close,{asChild:!0,className:"absolute right-4 top-4 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:f.jsxs(be,{size:"fit",className:"rounded-full",variant:"secondary",children:[f.jsx(ee.X,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})})]})]}));ii.displayName=He.Content.displayName;const $o=({className:e,...t})=>f.jsx("div",{className:q("flex flex-col gap-2 text-center pt-2",e),...t});$o.displayName="DialogHeader";const Jo=({className:e,...t})=>f.jsx("div",{className:q("flex flex-col gap-2 text-center",e),...t});Jo.displayName="DialogBody";const Zo=({className:e,...t})=>f.jsx("div",{className:q("flex flex-col gap-2",e),...t});Zo.displayName="DialogFooter";const ai=Ye.forwardRef(({className:e,...t},n)=>f.jsx(He.Title,{ref:n,className:q("text-lg font-semibold leading-none tracking-tight",e),...t}));ai.displayName=He.Title.displayName;const eu=Ye.forwardRef(({className:e,...t},n)=>f.jsx(He.Description,{ref:n,className:q("text-sm text-muted-foreground",e),...t}));eu.displayName=He.Description.displayName;function tu({attachment:e}){const{name:t,size:n,type:r,url:i}=e,a=r.startsWith("image/"),s=r.startsWith("video/"),u=r.startsWith("audio/");return u?f.jsx(Ke,{children:f.jsx("div",{className:"w-full shrink-0 overflow-hidden",children:f.jsxs("audio",{controls:!0,className:"w-full",children:[f.jsx("source",{src:i,type:r}),"Your browser does not support the audio tag."]})})}):s?f.jsx(Ke,{children:f.jsx("div",{className:"w-full border shrink-0 rounded-2xl overflow-hidden",children:f.jsxs("video",{controls:!0,children:[f.jsx("source",{src:i,type:r}),"Your browser does not support the video tag."]})})}):!a&&!s&&!u?f.jsx(Ke,{children:f.jsx("div",{className:"size-fit border shrink-0 rounded-2xl overflow-hidden",children:f.jsxs("div",{className:"flex items-end gap-2 p-2",children:[f.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:q("text-xs text-blue-500 line-clamp-2 underline hover:text-blue-600","break-words [word-break:break-word]"),children:t}),f.jsxs("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:[(n/1024).toFixed(2)," KB"]})]})})}):f.jsxs(Qo,{children:[f.jsx(Ke,{children:f.jsx(Xo,{children:f.jsx("div",{className:"size-fit border shrink-0 rounded-2xl overflow-hidden",children:a&&f.jsx("img",{src:i,className:"object-cover size-16",alt:t})})})}),f.jsxs(ii,{"aria-describedby":void 0,className:"size-full max-w-full rounded-3xl flex items-center justify-center bg-transparent border-none gap-0",withClose:!0,children:[f.jsx(ai,{className:"sr-only",children:"Image preview"}),a&&f.jsx("div",{className:"size-fit shrink-0 rounded-2xl overflow-hidden max-h-full",children:f.jsx("img",{src:i,className:"object-cover size-auto",alt:t})})]})]})}function Dn({data:e,id:t,type:n,attachments:r,isFirstInGroup:i,isLastInGroup:a,isAloneInGroup:s,dataComponentNames:u,classNames:l}){const{anchorTarget:c}=U.useConfig(),{message:d,variant:h="default"}=e;return h==="error"?f.jsx("div",{children:f.jsx("div",{className:"flex flex-row flex-wrap items-center justify-start",children:f.jsx("div",{className:"leading-snug text-sm text-destructive",children:d})})}):f.jsxs("div",{...ie((u==null?void 0:u.messageContainer)??"chat/agent_msg/root"),className:q("w-5/6 flex flex-col items-start gap-1",l==null?void 0:l.messageContainer),children:[r&&r.length>0&&f.jsx("div",{className:"w-full gap-1 flex flex-row flex-wrap items-center justify-start",children:r==null?void 0:r.map(g=>f.jsx(tu,{attachment:g},g.id))}),d.length>0&&f.jsx("div",{...ie((u==null?void 0:u.message)??"chat/agent_msg/msg"),"data-first":i,"data-last":a,"data-alone":s,className:q("transition-all","w-fit py-3 px-4 rounded-3xl bg-secondary text-secondary-foreground","leading-snug text-sm prose prose-sm prose-a:decoration-primary prose-a:underline","break-words [word-break:break-word]",i&&!s&&"rounded-bl-md",a&&!s&&"rounded-tl-md",!i&&!a&&!s&&"rounded-l-md",l==null?void 0:l.message),children:f.jsx(Js,{"data-type":n,"data-id":t,remarkPlugins:[As],rehypePlugins:[Fo],components:{a:({children:g,...p})=>f.jsx("a",{target:c??"_top",...p,children:g})},children:d})})]})}function J1(e){return f.jsx("div",{className:"w-full max-w-full overflow-auto shrink-0",children:f.jsx("pre",{dir:"auto",className:"text-xs leading-tight whitespace-pre-wrap break-word",children:JSON.stringify(e,null,1)})})}const si=Ye.forwardRef(({className:e,...t},n)=>f.jsx(Nt.Root,{ref:n,className:q("relative flex size-6 aspect-square shrink-0 overflow-hidden rounded-full bg-secondary",e),...t}));si.displayName=Nt.Root.displayName;const oi=Ye.forwardRef(({className:e,...t},n)=>f.jsx(Nt.Image,{ref:n,className:q("aspect-square h-full w-full",e),...t}));oi.displayName=Nt.Image.displayName;const ui=Ye.forwardRef(({className:e,...t},n)=>f.jsx(Nt.Fallback,{ref:n,className:q("flex size-full text-xs items-center justify-center rounded-lg",e),...t}));ui.displayName=Nt.Fallback.displayName;function Rr({agent:e,...t}){var n,r;return f.jsxs(si,{...t,children:[f.jsx(oi,{src:(e==null?void 0:e.avatar)??"",alt:"Agent Icon"}),(e==null?void 0:e.name)&&f.jsx(ui,{children:(r=(n=e==null?void 0:e.name)==null?void 0:n.slice(0,1))==null?void 0:r.toUpperCase()})]})}const Z1=10,eb=(e,t,n)=>({initial:{opacity:0,x:-e,...t.initial},animate:{opacity:1,x:0,...t.animate,transition:{delay:n}},exit:{opacity:0,x:e,...t.exit}}),tb=(e,t,n)=>({initial:{opacity:0,x:e,...t.initial},animate:{opacity:1,x:0,...t.animate,transition:{delay:n}},exit:{opacity:0,x:-e,...t.exit}}),nb=(e,t,n)=>({initial:{opacity:0,y:e,...t.initial},animate:{opacity:1,y:0,...t.animate,transition:{delay:n}},exit:{opacity:0,y:-e,...t.exit}}),rb=(e,t,n)=>({initial:{opacity:0,y:-e,...t.initial},animate:{opacity:1,y:0,...t.animate,transition:{delay:n}},exit:{opacity:0,y:e,...t.exit}}),ib={right:eb,left:tb,up:nb,down:rb},se=X.forwardRef(({fadeIn:e="down",distance:t=Z1,children:n,snapExit:r=!1,overrides:i={},delay:a=0,...s},u)=>{const l=e?ib[e](t,i,a):{};return r&&l.exit&&typeof l.exit=="object"&&!Array.isArray(l.exit)&&(l.exit.transition={duration:0}),f.jsx(ge.motion.div,{ref:u,...s,...l,children:n})});se.displayName="MotionDiv";function ab({agent:e}){return f.jsx(ge.AnimatePresence,{children:f.jsxs(se,{...ie("chat/bot_loading/root"),className:"flex flex-row items-end w-full gap-2 animate-pulse",children:[f.jsx(Rr,{agent:e}),f.jsxs("div",{...ie("chat/bot_loading/bouncing_dots_container"),className:q("flex items-center [&_span]:bg-secondary-foreground [&_span]:size-1 gap-1 p-2 rounded-xl bg-secondary"),children:[f.jsx(ge.motion.span,{className:"rounded-full animate-bounce [animation-delay:-0.3s]"}),f.jsx(ge.motion.span,{className:"rounded-full animate-bounce [animation-delay:-0.15s]"}),f.jsx(ge.motion.span,{className:"rounded-full animate-bounce"})]})]})})}const nu='@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..700;1,14..32,100..700&display=swap";@import"https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap";*,: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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--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: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{-ms-overflow-style:none;scrollbar-width:none}*::-webkit-scrollbar{display:none}*{border-color:hsl(var(--opencx-border))}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-inline-start:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding-top:.1428571em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-inline-start:.3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.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}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-\\[50\\%\\]{left:50%}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-4{top:1rem}.top-6{top:1.5rem}.top-\\[50\\%\\]{top:50%}.isolate{isolation:isolate}.z-10{z-index:10}.z-50{z-index:50}.m-2{margin:.5rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.ml-auto{margin-left:auto}.mt-0\\.5{margin-top:.125rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-10{width:2.5rem;height:2.5rem}.size-12{width:3rem;height:3rem}.size-16{width:4rem;height:4rem}.size-3{width:.75rem;height:.75rem}.size-3\\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-auto{width:auto;height:auto}.size-fit{width:fit-content;height:fit-content}.size-full{width:100%;height:100%}.h-10{height:2.5rem}.h-2{height:.5rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.h-px{height:1px}.max-h-16{max-height:4rem}.max-h-full{max-height:100%}.min-h-12{min-height:3rem}.w-1\\/2{width:50%}.w-10{width:2.5rem}.w-2{width:.5rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-5\\/6{width:83.333333%}.w-60{width:15rem}.w-9{width:2.25rem}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.min-w-\\[8rem\\]{min-width:8rem}.max-w-\\[61\\.8\\%\\]{max-width:61.8%}.max-w-full{max-width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.translate-x-\\[-50\\%\\]{--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))}.translate-x-\\[var\\(--wobble-x\\)\\]{--tw-translate-x: var(--wobble-x);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))}.translate-y-\\[-50\\%\\]{--tw-translate-y: -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))}.translate-y-\\[var\\(--wobble-y\\)\\]{--tw-translate-y: var(--wobble-y);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 bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-\\[1px\\]{gap:1px}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.scroll-smooth{scroll-behavior:smooth}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\\[20px\\]{border-radius:20px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-bl-md{border-bottom-left-radius:.375rem}.rounded-br-md{border-bottom-right-radius:.375rem}.rounded-tl-md{border-top-left-radius:.375rem}.rounded-tr-md{border-top-right-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-none{border-style:none}.border-transparent{border-color:transparent}.bg-\\[white\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-background{background-color:hsl(var(--opencx-background))}.bg-black\\/50{background-color:#00000080}.bg-black\\/60{background-color:#0009}.bg-destructive{background-color:hsl(var(--opencx-destructive))}.bg-muted{background-color:hsl(var(--opencx-muted))}.bg-primary{background-color:hsl(var(--opencx-primary))}.bg-secondary{background-color:hsl(var(--opencx-secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-\\[radial-gradient\\(ellipse_at_top_left\\,hsl\\(var\\(--opencx-primary\\)\\)\\,transparent\\)\\,radial-gradient\\(ellipse_at_top_right\\,hsl\\(var\\(--opencx-primary\\)\\)\\,transparent\\)\\]{background-image:radial-gradient(ellipse at top left,hsl(var(--opencx-primary)),transparent),radial-gradient(ellipse at top right,hsl(var(--opencx-primary)),transparent)}.fill-current{fill:currentColor}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.text-center{text-align:center}.text-start{text-align:start}.align-middle{vertical-align:middle}.text-\\[1\\.75rem\\]{font-size:1.75rem}.text-\\[10px\\]{font-size:10px}.text-\\[16px\\]{font-size:16px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-destructive{color:hsl(var(--opencx-destructive))}.text-destructive-foreground{color:hsl(var(--opencx-destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity))}.text-foreground{color:hsl(var(--opencx-foreground))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--opencx-muted-foreground))}.text-muted-foreground\\/70{color:hsl(var(--opencx-muted-foreground) / .7)}.text-muted-foreground\\/75{color:hsl(var(--opencx-muted-foreground) / .75)}.text-primary{color:hsl(var(--opencx-primary))}.text-primary-foreground{color:hsl(var(--opencx-primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--opencx-secondary-foreground))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-95{opacity:.95}.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-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px 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-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-8{outline-width:8px}.outline-background{outline-color:hsl(var(--opencx-background))}.ring-0{--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(0px + 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-offset-background{--tw-ring-offset-color: hsl(var(--opencx-background))}.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)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;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}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\\[animation-delay\\:-0\\.15s\\]{animation-delay:-.15s}.\\[animation-delay\\:-0\\.3s\\]{animation-delay:-.3s}.\\[field-sizing\\:content\\;\\],.\\[field-sizing\\:content\\]{field-sizing:content}.\\[word-break\\:break-word\\]{word-break:break-word}.required:after{content:" *";color:red}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-primary-foreground::file-selector-button{color:hsl(var(--opencx-primary-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--opencx-muted-foreground))}.placeholder\\:text-muted-foreground\\/75::placeholder{color:hsl(var(--opencx-muted-foreground) / .75)}.focus-within\\:border-primary:focus-within{border-color:hsl(var(--opencx-primary))}.hover\\:scale-\\[var\\(--scale\\)\\]:hover{--tw-scale-x: var(--scale);--tw-scale-y: var(--scale);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))}.hover\\:border-primary:hover{border-color:hsl(var(--opencx-primary))}.hover\\:bg-green-50\\/50:hover{background-color:#f0fdf480}.hover\\:bg-red-50\\/50:hover{background-color:#fef2f280}.hover\\:bg-secondary:hover{background-color:hsl(var(--opencx-secondary))}.hover\\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.hover\\:text-primary:hover{color:hsl(var(--opencx-primary))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.focus\\:bg-accent:focus{background-color:hsl(var(--opencx-accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--opencx-accent-foreground))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--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(2px + 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)}.focus\\:ring-ring:focus{--tw-ring-color: hsl(var(--opencx-ring))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--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(2px + 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)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--opencx-ring))}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--opencx-background))}.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))}.active\\:hover\\:scale-\\[calc\\(var\\(--scale\\)-0\\.02\\)\\]:hover:active{--tw-scale-x: calc(var(--scale) - .02);--tw-scale-y: calc(var(--scale) - .02);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))}.hover\\:active\\:scale-95:active:hover{--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))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:opacity-100{opacity:1}.group:hover .group-hover\\:active\\:scale-90:active,.group:active .group-active\\:scale-90{--tw-scale-x: .9;--tw-scale-y: .9;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))}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;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))}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;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))}.data-\\[state\\=checked\\]\\:bg-primary[data-state=checked]{background-color:hsl(var(--opencx-primary))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--opencx-accent))}.data-\\[state\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:hsl(var(--opencx-input))}.data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:hsl(var(--opencx-muted-foreground))}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\\[state\\=closed\\]\\:slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\\[state\\=closed\\]\\:slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\\[state\\=open\\]\\:slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\\[state\\=open\\]\\:slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y: -48%}.prose-a\\:underline :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-line:underline}.prose-a\\:decoration-primary :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-color:hsl(var(--opencx-primary))}.rtl\\:-scale-100:where([dir=rtl],[dir=rtl] *){--tw-scale-x: -1;--tw-scale-y: -1;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))}.rtl\\:text-right:where([dir=rtl],[dir=rtl] *){text-align:right}.rtl\\:placeholder\\:text-right:where([dir=rtl],[dir=rtl] *)::placeholder{text-align:right}.\\[\\&_span\\]\\:size-1 span{width:.25rem;height:.25rem}.\\[\\&_span\\]\\:bg-secondary-foreground span{background-color:hsl(var(--opencx-secondary-foreground))}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\]\\:text-muted-foreground\\/70 svg{color:hsl(var(--opencx-muted-foreground) / .7)}.\\[\\&_svg\\]\\:hover\\:text-primary:hover svg{color:hsl(var(--opencx-primary))}',sb=on.Provider,ob=on.Root,ub=on.Trigger,ru=Ye.forwardRef(({className:e,sideOffset:t=4,...n},r)=>f.jsx(on.Content,{ref:r,sideOffset:t,className:q("z-50 overflow-hidden max-w-xs rounded-xl bg-primary border text-primary-foreground p-2 text-center align-middle text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));ru.displayName=on.Content.displayName;function rn({children:e,content:t,side:n,align:r}){return t?f.jsxs(ob,{children:[f.jsx(ub,{asChild:!0,children:e}),f.jsx(ru,{side:n,align:r,collisionPadding:8,avoidCollisions:!0,children:t})]}):e}const Fa=450;function ut(){const[e,t]=X.useState(()=>(window.top||window).innerWidth<Fa);return X.useEffect(()=>{const n=window.top||window,r=()=>{t(n.innerWidth<Fa)};return r(),n.addEventListener("resize",r),()=>{n.removeEventListener("resize",r)}},[]),{isSmallScreen:e}}function Mt(){var s,u,l,c,d,h,g,p,E,y,k,_,N,L,M,F,S,Y,z,j,C,H,P,ne,re,K,ce,fe,Ee,Te,x,de,Re;const{isSmallScreen:e}=ut(),{theme:t}=U.useConfig(),n=(w,Ne)=>e?`100dv${w}`:Ne,r={zIndex:((s=t==null?void 0:t.widgetTrigger)==null?void 0:s.zIndex)??1e7,offset:{bottom:((l=(u=t==null?void 0:t.widgetTrigger)==null?void 0:u.offset)==null?void 0:l.bottom)??20,right:((d=(c=t==null?void 0:t.widgetTrigger)==null?void 0:c.offset)==null?void 0:d.right)??20},size:{button:((g=(h=t==null?void 0:t.widgetTrigger)==null?void 0:h.size)==null?void 0:g.button)??48,icon:((E=(p=t==null?void 0:t.widgetTrigger)==null?void 0:p.size)==null?void 0:E.icon)??24}},i={palette:(t==null?void 0:t.palette)??"stone",primaryColor:(t==null?void 0:t.primaryColor)??"hsl(0 0% 9%)",widgetTrigger:r,widgetContentContainer:{borderRadius:e?"0px":((y=t==null?void 0:t.widgetContentContainer)==null?void 0:y.borderRadius)??"32px",zIndex:((k=t==null?void 0:t.widgetContentContainer)==null?void 0:k.zIndex)??r.zIndex+1,outline:((_=t==null?void 0:t.widgetContentContainer)==null?void 0:_.outline)??"none",outlineColor:((N=t==null?void 0:t.widgetContentContainer)==null?void 0:N.outlineColor)??"hsl(0 0% 50% / .5)",boxShadow:((L=t==null?void 0:t.widgetContentContainer)==null?void 0:L.boxShadow)??"0 0px 100px 0px rgb(0 0 0 / 0.25)",transitionProperty:((M=t==null?void 0:t.widgetContentContainer)==null?void 0:M.transitionProperty)??"all",transitionTimingFunction:((F=t==null?void 0:t.widgetContentContainer)==null?void 0:F.transitionTimingFunction)??"cubic-bezier(0.16, 1, 0.3, 1)",transitionDuration:((S=t==null?void 0:t.widgetContentContainer)==null?void 0:S.transitionDuration)??"800ms",offset:{side:e?0:r.offset.bottom+r.size.button+St.y*2+(((z=(Y=t==null?void 0:t.widgetContentContainer)==null?void 0:Y.offset)==null?void 0:z.side)??10),align:e?0:r.offset.right+(((C=(j=t==null?void 0:t.widgetContentContainer)==null?void 0:j.offset)==null?void 0:C.align)??0)}},screens:{welcome:{width:n("w",((P=(H=t==null?void 0:t.screens)==null?void 0:H.welcome)==null?void 0:P.width)??"400px"),minHeight:n("h",((re=(ne=t==null?void 0:t.screens)==null?void 0:ne.welcome)==null?void 0:re.minHeight)??"1px")},sessions:{width:n("w",((ce=(K=t==null?void 0:t.screens)==null?void 0:K.sessions)==null?void 0:ce.width)??"450px"),height:n("h",((Ee=(fe=t==null?void 0:t.screens)==null?void 0:fe.sessions)==null?void 0:Ee.height)??"600px")},chat:{width:n("w",((x=(Te=t==null?void 0:t.screens)==null?void 0:Te.chat)==null?void 0:x.width)??"525px"),height:n("h",((Re=(de=t==null?void 0:t.screens)==null?void 0:de.chat)==null?void 0:Re.height)??"700px")}}},a={maxHeight:n("h",`calc(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),gt=require("@radix-ui/react-popover"),m=require("react"),l=require("./useModes-DSFNdOy3.cjs"),Le=require("remark-gfm"),mt=require("react-markdown"),Ve=require("rehype-raw"),ut=require("@radix-ui/react-dialog"),g=require("lucide-react"),wt=require("clsx"),ft=require("tailwind-merge"),xt=require("react-dom"),ae=require("@uiw/react-iframe"),vt=require("@radix-ui/react-slot"),bt=require("class-variance-authority"),k=require("framer-motion"),yt=require("@radix-ui/react-avatar"),jt=require("@radix-ui/react-tooltip"),We=require("tinycolor2"),H=require("./index.cjs"),kt=require("react-dropzone"),Ct=require("react-use/lib/useAsyncFn"),oe=require("zod");function U(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(o,s,r.get?r:{enumerable:!0,get:()=>t[s]})}}return o.default=t,Object.freeze(o)}const ee=U(gt),R=U(m),M=U(ut),L=U(yt),X=U(jt),Ye=m.memo(mt,(t,o)=>t.children===o.children&&t.className===o.className);function c(...t){return ft.twMerge(wt.clsx(t))}const $e="opencx-widget-portal";function te(){return null}function zt({children:t}){var s,r;const o=(r=(s=ae.useFrame())==null?void 0:s.document)==null?void 0:r.getElementById($e);return o?xt.createPortal(t,o):(console.error("Portal container not found!"),null)}function St(){return e.jsx("div",{id:$e,className:"absolute size-full top-0 left-0"})}te.Portal=zt;te.Container=St;const B={x:2,y:2},W=m.memo(m.forwardRef(({children:t,className:o,scale:s=1.02,off:r=!1},n)=>{const[a,i]=m.useState(!1),[d,p]=m.useState({x:0,y:0});if(r||/translate/.test(t.props.className||""))return t;const b=v=>{var f,j;const{clientX:y,clientY:I}=v,S=v.currentTarget.getBoundingClientRect(),T=y-(S.left+S.width/2),D=I-(S.top+S.height/2),O=Math.max(-1,Math.min(1,T/(S.width/2))),P=Math.max(-1,Math.min(1,D/(S.height/2))),A=O*B.x,E=P*B.y;p({x:A,y:E}),(j=(f=t.props).onMouseMove)==null||j.call(f,v)},N=()=>{var v,y;i(!0),(y=(v=t.props).onMouseEnter)==null||y.call(v)},h=()=>{var v,y;i(!1),p({x:0,y:0}),(y=(v=t.props).onMouseLeave)==null||y.call(v)},x={"--wobble-x":a?`${d.x}px`:"0px","--wobble-y":a?`${d.y}px`:"0px","--scale":1-(s-1)};return m.cloneElement(t,{ref:n,onMouseMove:b,onMouseEnter:N,onMouseLeave:h,style:{...x,...t.props.style},className:c("translate-x-[var(--wobble-x)]","translate-y-[var(--wobble-y)]","hover:scale-[var(--scale)] active:hover:scale-[calc(var(--scale)-0.02)]",o,t.props.className,"transition-all ease-out")})}));W.displayName="Wobble";function u(t){return{"data-component":t}}const Nt=bt.cva(c("inline-flex shrink-0 items-center justify-center gap-2","text-sm font-medium whitespace-nowrap","ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","active:scale-95 hover:active:scale-95","rounded-xl","transition"),{variants:{variant:{default:"bg-primary text-primary-foreground",destructive:"bg-destructive text-destructive-foreground",outline:"bg-background",secondary:"bg-secondary text-secondary-foreground",ghost:"hover:bg-secondary",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"py-2 px-3.5 text-xs",lg:"min-h-12 px-4 rounded-[20px]",icon:"h-10 w-10",fit:"size-fit p-2",free:"p-2",selfless:"p-0"}},defaultVariants:{variant:"default",size:"default"}}),C=R.forwardRef(({className:t,variant:o="default",size:s,asChild:r=!1,...n},a)=>{const i=r?vt.Slot:"button";return e.jsx(W,{ref:a,children:e.jsx(i,{...u("ui_lib/btn"),"data-variant":o,className:c(Nt({variant:o,size:s,className:t})),...n})})});C.displayName="Button";const Ue=M.Root,Xe=M.Trigger,Ke=R.forwardRef(({className:t,...o},s)=>e.jsx(M.Overlay,{ref:s,className:c("fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...o}));Ke.displayName=M.Overlay.displayName;const ie=R.forwardRef(({className:t,children:o,withClose:s=!1,...r},n)=>e.jsxs(te.Portal,{children:[e.jsx(Ke,{}),e.jsxs(M.Content,{ref:n,className:c("fixed left-[50%] top-[50%] z-50 flex flex-col space-y-4 w-full max-w-[61.8%] translate-x-[-50%] translate-y-[-50%] border bg-background p-4 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-3xl",t),...r,children:[o,s&&e.jsx(M.Close,{asChild:!0,className:"absolute right-4 top-4 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:e.jsxs(C,{size:"fit",className:"rounded-full",variant:"secondary",children:[e.jsx(g.X,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})})]})]}));ie.displayName=M.Content.displayName;const Ge=({className:t,...o})=>e.jsx("div",{className:c("flex flex-col gap-2 text-center pt-2",t),...o});Ge.displayName="DialogHeader";const Je=({className:t,...o})=>e.jsx("div",{className:c("flex flex-col gap-2 text-center",t),...o});Je.displayName="DialogBody";const Ze=({className:t,...o})=>e.jsx("div",{className:c("flex flex-col gap-2",t),...o});Ze.displayName="DialogFooter";const le=R.forwardRef(({className:t,...o},s)=>e.jsx(M.Title,{ref:s,className:c("text-lg font-semibold leading-none tracking-tight",t),...o}));le.displayName=M.Title.displayName;const Qe=R.forwardRef(({className:t,...o},s)=>e.jsx(M.Description,{ref:s,className:c("text-sm text-muted-foreground",t),...o}));Qe.displayName=M.Description.displayName;function et({attachment:t}){const{name:o,size:s,type:r,url:n}=t,a=r.startsWith("image/"),i=r.startsWith("video/"),d=r.startsWith("audio/");return d?e.jsx(W,{children:e.jsx("div",{className:"w-full shrink-0 overflow-hidden",children:e.jsxs("audio",{controls:!0,className:"w-full",children:[e.jsx("source",{src:n,type:r}),"Your browser does not support the audio tag."]})})}):i?e.jsx(W,{children:e.jsx("div",{className:"w-full border shrink-0 rounded-2xl overflow-hidden",children:e.jsxs("video",{controls:!0,children:[e.jsx("source",{src:n,type:r}),"Your browser does not support the video tag."]})})}):!a&&!i&&!d?e.jsx(W,{children:e.jsx("div",{className:"size-fit border shrink-0 rounded-2xl overflow-hidden",children:e.jsxs("div",{className:"flex items-end gap-2 p-2",children:[e.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:c("text-xs text-blue-500 line-clamp-2 underline hover:text-blue-600","break-words [word-break:break-word]"),children:o}),e.jsxs("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:[(s/1024).toFixed(2)," KB"]})]})})}):e.jsxs(Ue,{children:[e.jsx(W,{children:e.jsx(Xe,{children:e.jsx("div",{className:"size-fit border shrink-0 rounded-2xl overflow-hidden",children:a&&e.jsx("img",{src:n,className:"object-cover size-16",alt:o})})})}),e.jsxs(ie,{"aria-describedby":void 0,className:"size-full max-w-full rounded-3xl flex items-center justify-center bg-transparent border-none gap-0",withClose:!0,children:[e.jsx(le,{className:"sr-only",children:"Image preview"}),a&&e.jsx("div",{className:"size-fit shrink-0 rounded-2xl overflow-hidden max-h-full",children:e.jsx("img",{src:n,className:"object-cover size-auto",alt:o})})]})]})}function Q({data:t,id:o,type:s,attachments:r,isFirstInGroup:n,isLastInGroup:a,isAloneInGroup:i,dataComponentNames:d,classNames:p}){const{anchorTarget:z}=l.useConfig(),{message:b,variant:N="default"}=t;return N==="error"?e.jsx("div",{children:e.jsx("div",{className:"flex flex-row flex-wrap items-center justify-start",children:e.jsx("div",{className:"leading-snug text-sm text-destructive",children:b})})}):e.jsxs("div",{...u((d==null?void 0:d.messageContainer)??"chat/agent_msg/root"),className:c("w-5/6 flex flex-col items-start gap-1",p==null?void 0:p.messageContainer),children:[r&&r.length>0&&e.jsx("div",{className:"w-full gap-1 flex flex-row flex-wrap items-center justify-start",children:r==null?void 0:r.map(h=>e.jsx(et,{attachment:h},h.id))}),b.length>0&&e.jsx("div",{...u((d==null?void 0:d.message)??"chat/agent_msg/msg"),"data-first":n,"data-last":a,"data-alone":i,className:c("transition-all","w-fit py-3 px-4 rounded-3xl bg-secondary text-secondary-foreground","leading-snug text-sm prose prose-sm prose-a:decoration-primary prose-a:underline","break-words [word-break:break-word]",n&&!i&&"rounded-bl-md",a&&!i&&"rounded-tl-md",!n&&!a&&!i&&"rounded-l-md",p==null?void 0:p.message),children:e.jsx(Ye,{"data-type":s,"data-id":o,remarkPlugins:[Le],rehypePlugins:[Ve],components:{a:({children:h,...x})=>e.jsx("a",{target:z??"_top",...x,children:h})},children:b})})]})}function _t(t){return e.jsx("div",{className:"w-full max-w-full overflow-auto shrink-0",children:e.jsx("pre",{dir:"auto",className:"text-xs leading-tight whitespace-pre-wrap break-word",children:JSON.stringify(t,null,1)})})}const ce=R.forwardRef(({className:t,...o},s)=>e.jsx(L.Root,{ref:s,className:c("relative flex size-6 aspect-square shrink-0 overflow-hidden rounded-full bg-secondary",t),...o}));ce.displayName=L.Root.displayName;const de=R.forwardRef(({className:t,...o},s)=>e.jsx(L.Image,{ref:s,className:c("aspect-square h-full w-full",t),...o}));de.displayName=L.Image.displayName;const pe=R.forwardRef(({className:t,...o},s)=>e.jsx(L.Fallback,{ref:s,className:c("flex size-full text-xs items-center justify-center rounded-lg",t),...o}));pe.displayName=L.Fallback.displayName;function se({agent:t,...o}){var s,r;return e.jsxs(ce,{...o,children:[e.jsx(de,{src:(t==null?void 0:t.avatar)??"",alt:"Agent Icon"}),(t==null?void 0:t.name)&&e.jsx(pe,{children:(r=(s=t==null?void 0:t.name)==null?void 0:s.slice(0,1))==null?void 0:r.toUpperCase()})]})}const It=10,Tt=(t,o,s)=>({initial:{opacity:0,x:-t,...o.initial},animate:{opacity:1,x:0,...o.animate,transition:{delay:s}},exit:{opacity:0,x:t,...o.exit}}),Mt=(t,o,s)=>({initial:{opacity:0,x:t,...o.initial},animate:{opacity:1,x:0,...o.animate,transition:{delay:s}},exit:{opacity:0,x:-t,...o.exit}}),Et=(t,o,s)=>({initial:{opacity:0,y:t,...o.initial},animate:{opacity:1,y:0,...o.animate,transition:{delay:s}},exit:{opacity:0,y:-t,...o.exit}}),Rt=(t,o,s)=>({initial:{opacity:0,y:-t,...o.initial},animate:{opacity:1,y:0,...o.animate,transition:{delay:s}},exit:{opacity:0,y:t,...o.exit}}),Dt={right:Tt,left:Mt,up:Et,down:Rt},w=m.forwardRef(({fadeIn:t="down",distance:o=It,children:s,snapExit:r=!1,overrides:n={},delay:a=0,...i},d)=>{const p=t?Dt[t](o,n,a):{};return r&&p.exit&&typeof p.exit=="object"&&!Array.isArray(p.exit)&&(p.exit.transition={duration:0}),e.jsx(k.motion.div,{ref:d,...i,...p,children:s})});w.displayName="MotionDiv";function Ot({agent:t}){return e.jsx(k.AnimatePresence,{children:e.jsxs(w,{...u("chat/bot_loading/root"),className:"flex flex-row items-end w-full gap-2 animate-pulse",children:[e.jsx(se,{agent:t}),e.jsxs("div",{...u("chat/bot_loading/bouncing_dots_container"),className:c("flex items-center [&_span]:bg-secondary-foreground [&_span]:size-1 gap-1 p-2 rounded-xl bg-secondary"),children:[e.jsx(k.motion.span,{className:"rounded-full animate-bounce [animation-delay:-0.3s]"}),e.jsx(k.motion.span,{className:"rounded-full animate-bounce [animation-delay:-0.15s]"}),e.jsx(k.motion.span,{className:"rounded-full animate-bounce"})]})]})})}const tt='@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..700;1,14..32,100..700&display=swap";@import"https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap";*,: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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--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: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{-ms-overflow-style:none;scrollbar-width:none}*::-webkit-scrollbar{display:none}*{border-color:hsl(var(--opencx-border))}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-inline-start:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding-top:.1428571em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-inline-start:.3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.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}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-\\[50\\%\\]{left:50%}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-4{top:1rem}.top-6{top:1.5rem}.top-\\[50\\%\\]{top:50%}.isolate{isolation:isolate}.z-10{z-index:10}.z-50{z-index:50}.m-2{margin:.5rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.ml-auto{margin-left:auto}.mt-0\\.5{margin-top:.125rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-10{width:2.5rem;height:2.5rem}.size-12{width:3rem;height:3rem}.size-16{width:4rem;height:4rem}.size-3{width:.75rem;height:.75rem}.size-3\\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-auto{width:auto;height:auto}.size-fit{width:fit-content;height:fit-content}.size-full{width:100%;height:100%}.h-10{height:2.5rem}.h-2{height:.5rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.h-px{height:1px}.max-h-16{max-height:4rem}.max-h-full{max-height:100%}.min-h-12{min-height:3rem}.w-0{width:0px}.w-1\\/2{width:50%}.w-10{width:2.5rem}.w-2{width:.5rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-5\\/6{width:83.333333%}.w-60{width:15rem}.w-9{width:2.25rem}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.min-w-\\[8rem\\]{min-width:8rem}.max-w-\\[61\\.8\\%\\]{max-width:61.8%}.max-w-full{max-width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.translate-x-\\[-50\\%\\]{--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))}.translate-x-\\[var\\(--wobble-x\\)\\]{--tw-translate-x: var(--wobble-x);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))}.translate-y-\\[-50\\%\\]{--tw-translate-y: -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))}.translate-y-\\[var\\(--wobble-y\\)\\]{--tw-translate-y: var(--wobble-y);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 bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-\\[1px\\]{gap:1px}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.scroll-smooth{scroll-behavior:smooth}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\\[20px\\]{border-radius:20px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-bl-md{border-bottom-left-radius:.375rem}.rounded-br-md{border-bottom-right-radius:.375rem}.rounded-tl-md{border-top-left-radius:.375rem}.rounded-tr-md{border-top-right-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-none{border-style:none}.border-transparent{border-color:transparent}.bg-\\[white\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-background{background-color:hsl(var(--opencx-background))}.bg-black\\/50{background-color:#00000080}.bg-black\\/60{background-color:#0009}.bg-destructive{background-color:hsl(var(--opencx-destructive))}.bg-muted{background-color:hsl(var(--opencx-muted))}.bg-primary{background-color:hsl(var(--opencx-primary))}.bg-secondary{background-color:hsl(var(--opencx-secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-\\[radial-gradient\\(ellipse_at_top_left\\,hsl\\(var\\(--opencx-primary\\)\\)\\,transparent\\)\\,radial-gradient\\(ellipse_at_top_right\\,hsl\\(var\\(--opencx-primary\\)\\)\\,transparent\\)\\]{background-image:radial-gradient(ellipse at top left,hsl(var(--opencx-primary)),transparent),radial-gradient(ellipse at top right,hsl(var(--opencx-primary)),transparent)}.fill-current{fill:currentColor}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.text-center{text-align:center}.text-start{text-align:start}.align-middle{vertical-align:middle}.text-\\[1\\.75rem\\]{font-size:1.75rem}.text-\\[10px\\]{font-size:10px}.text-\\[16px\\]{font-size:16px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-destructive{color:hsl(var(--opencx-destructive))}.text-destructive-foreground{color:hsl(var(--opencx-destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity))}.text-foreground{color:hsl(var(--opencx-foreground))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--opencx-muted-foreground))}.text-muted-foreground\\/70{color:hsl(var(--opencx-muted-foreground) / .7)}.text-muted-foreground\\/75{color:hsl(var(--opencx-muted-foreground) / .75)}.text-primary{color:hsl(var(--opencx-primary))}.text-primary-foreground{color:hsl(var(--opencx-primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--opencx-secondary-foreground))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-95{opacity:.95}.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-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px 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-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-8{outline-width:8px}.outline-background{outline-color:hsl(var(--opencx-background))}.ring-0{--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(0px + 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-offset-background{--tw-ring-offset-color: hsl(var(--opencx-background))}.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)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;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}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\\[animation-delay\\:-0\\.15s\\]{animation-delay:-.15s}.\\[animation-delay\\:-0\\.3s\\]{animation-delay:-.3s}.\\[field-sizing\\:content\\;\\],.\\[field-sizing\\:content\\]{field-sizing:content}.\\[word-break\\:break-word\\]{word-break:break-word}.required:after{content:" *";color:red}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-primary-foreground::file-selector-button{color:hsl(var(--opencx-primary-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--opencx-muted-foreground))}.placeholder\\:text-muted-foreground\\/75::placeholder{color:hsl(var(--opencx-muted-foreground) / .75)}.focus-within\\:border-primary:focus-within{border-color:hsl(var(--opencx-primary))}.hover\\:scale-\\[var\\(--scale\\)\\]:hover{--tw-scale-x: var(--scale);--tw-scale-y: var(--scale);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))}.hover\\:border-primary:hover{border-color:hsl(var(--opencx-primary))}.hover\\:bg-green-50\\/50:hover{background-color:#f0fdf480}.hover\\:bg-red-50\\/50:hover{background-color:#fef2f280}.hover\\:bg-secondary:hover{background-color:hsl(var(--opencx-secondary))}.hover\\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.hover\\:text-primary:hover{color:hsl(var(--opencx-primary))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.focus\\:bg-accent:focus{background-color:hsl(var(--opencx-accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--opencx-accent-foreground))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--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(2px + 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)}.focus\\:ring-ring:focus{--tw-ring-color: hsl(var(--opencx-ring))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--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(2px + 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)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--opencx-ring))}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--opencx-background))}.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))}.active\\:hover\\:scale-\\[calc\\(var\\(--scale\\)-0\\.02\\)\\]:hover:active{--tw-scale-x: calc(var(--scale) - .02);--tw-scale-y: calc(var(--scale) - .02);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))}.hover\\:active\\:scale-95:active:hover{--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))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:opacity-100{opacity:1}.group:hover .group-hover\\:active\\:scale-90:active,.group:active .group-active\\:scale-90{--tw-scale-x: .9;--tw-scale-y: .9;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))}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;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))}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;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))}.data-\\[state\\=checked\\]\\:bg-primary[data-state=checked]{background-color:hsl(var(--opencx-primary))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--opencx-accent))}.data-\\[state\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:hsl(var(--opencx-input))}.data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:hsl(var(--opencx-muted-foreground))}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\\[state\\=closed\\]\\:slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\\[state\\=closed\\]\\:slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\\[state\\=open\\]\\:slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\\[state\\=open\\]\\:slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y: -48%}.prose-a\\:underline :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-line:underline}.prose-a\\:decoration-primary :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-color:hsl(var(--opencx-primary))}.rtl\\:-scale-100:where([dir=rtl],[dir=rtl] *){--tw-scale-x: -1;--tw-scale-y: -1;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))}.rtl\\:text-right:where([dir=rtl],[dir=rtl] *){text-align:right}.rtl\\:placeholder\\:text-right:where([dir=rtl],[dir=rtl] *)::placeholder{text-align:right}.\\[\\&_span\\]\\:size-1 span{width:.25rem;height:.25rem}.\\[\\&_span\\]\\:bg-secondary-foreground span{background-color:hsl(var(--opencx-secondary-foreground))}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\]\\:text-muted-foreground\\/70 svg{color:hsl(var(--opencx-muted-foreground) / .7)}.\\[\\&_svg\\]\\:hover\\:text-primary:hover svg{color:hsl(var(--opencx-primary))}',Pt=X.Provider,At=X.Root,Wt=X.Trigger,ot=R.forwardRef(({className:t,sideOffset:o=4,...s},r)=>e.jsx(X.Content,{ref:r,sideOffset:o,className:c("z-50 overflow-hidden max-w-xs rounded-xl bg-primary border text-primary-foreground p-2 text-center align-middle text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...s}));ot.displayName=X.Content.displayName;function Y({children:t,content:o,side:s,align:r}){return o?e.jsxs(At,{children:[e.jsx(Wt,{asChild:!0,children:t}),e.jsx(ot,{side:s,align:r,collisionPadding:8,avoidCollisions:!0,children:o})]}):t}const Fe=450;function F(){const[t,o]=m.useState(()=>(window.top||window).innerWidth<Fe);return m.useEffect(()=>{const s=window.top||window,r=()=>{o(s.innerWidth<Fe)};return r(),s.addEventListener("resize",r),()=>{s.removeEventListener("resize",r)}},[]),{isSmallScreen:t}}const J={transitionTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",transitionDuration:"1000ms"};function V(){var i,d,p,z,b,N,h,x,v,y,I,S,T,D,O,P,A,E,f,j,_,q,G,we,fe,xe,ve,be,ye,je,ke,Ce,ze,Se,Ne,_e,Ie,Te,Me,Ee,Re,De,Oe,Pe,Ae;const{isSmallScreen:t}=F(),{theme:o}=l.useConfig(),s=(pt,ht)=>t?`100dv${pt}`:ht,r={zIndex:((i=o==null?void 0:o.widgetTrigger)==null?void 0:i.zIndex)??1e7,offset:{bottom:((p=(d=o==null?void 0:o.widgetTrigger)==null?void 0:d.offset)==null?void 0:p.bottom)??20,right:((b=(z=o==null?void 0:o.widgetTrigger)==null?void 0:z.offset)==null?void 0:b.right)??20},size:{button:((h=(N=o==null?void 0:o.widgetTrigger)==null?void 0:N.size)==null?void 0:h.button)??48,icon:((v=(x=o==null?void 0:o.widgetTrigger)==null?void 0:x.size)==null?void 0:v.icon)??24}},n={palette:(o==null?void 0:o.palette)??"stone",primaryColor:(o==null?void 0:o.primaryColor)??"hsl(0 0% 9%)",widgetTrigger:r,widgetContentContainer:{borderRadius:t?"0px":((y=o==null?void 0:o.widgetContentContainer)==null?void 0:y.borderRadius)??"32px",zIndex:((I=o==null?void 0:o.widgetContentContainer)==null?void 0:I.zIndex)??r.zIndex+1,outline:((S=o==null?void 0:o.widgetContentContainer)==null?void 0:S.outline)??"none",outlineColor:((T=o==null?void 0:o.widgetContentContainer)==null?void 0:T.outlineColor)??"hsl(0 0% 50% / .5)",boxShadow:((D=o==null?void 0:o.widgetContentContainer)==null?void 0:D.boxShadow)??"0 0px 100px 0px rgb(0 0 0 / 0.25)",transitionProperty:((O=o==null?void 0:o.widgetContentContainer)==null?void 0:O.transitionProperty)??"all",transitionTimingFunction:((P=o==null?void 0:o.widgetContentContainer)==null?void 0:P.transitionTimingFunction)??J.transitionTimingFunction,transitionDuration:((A=o==null?void 0:o.widgetContentContainer)==null?void 0:A.transitionDuration)??J.transitionDuration,offset:{side:t?0:r.offset.bottom+r.size.button+B.y*2+(((f=(E=o==null?void 0:o.widgetContentContainer)==null?void 0:E.offset)==null?void 0:f.side)??10),align:t?0:r.offset.right+(((_=(j=o==null?void 0:o.widgetContentContainer)==null?void 0:j.offset)==null?void 0:_.align)??0)}},screens:{welcome:{width:s("w",((G=(q=o==null?void 0:o.screens)==null?void 0:q.welcome)==null?void 0:G.width)??"400px"),minHeight:s("h",((fe=(we=o==null?void 0:o.screens)==null?void 0:we.welcome)==null?void 0:fe.minHeight)??"1px")},sessions:{width:s("w",((ve=(xe=o==null?void 0:o.screens)==null?void 0:xe.sessions)==null?void 0:ve.width)??"450px"),height:s("h",((ye=(be=o==null?void 0:o.screens)==null?void 0:be.sessions)==null?void 0:ye.height)??"600px")},chat:{width:s("w",((ke=(je=o==null?void 0:o.screens)==null?void 0:je.chat)==null?void 0:ke.width)??"525px"),height:s("h",((ze=(Ce=o==null?void 0:o.screens)==null?void 0:Ce.chat)==null?void 0:ze.height)??"700px"),withCanvas:{width:s("w",((_e=(Ne=(Se=o==null?void 0:o.screens)==null?void 0:Se.chat)==null?void 0:Ne.withCanvas)==null?void 0:_e.width)??"min(1050px, 100vw)"),height:s("h",((Me=(Te=(Ie=o==null?void 0:o.screens)==null?void 0:Ie.chat)==null?void 0:Te.withCanvas)==null?void 0:Me.height)??"min(800px, 100vh)"),transitionTimingFunction:((De=(Re=(Ee=o==null?void 0:o.screens)==null?void 0:Ee.chat)==null?void 0:Re.withCanvas)==null?void 0:De.transitionTimingFunction)??J.transitionTimingFunction,transitionDuration:((Ae=(Pe=(Oe=o==null?void 0:o.screens)==null?void 0:Oe.chat)==null?void 0:Pe.withCanvas)==null?void 0:Ae.transitionDuration)??J.transitionDuration}}}},a={maxHeight:s("h",`calc(
|
|
30
2
|
100vh
|
|
31
|
-
- ${
|
|
32
|
-
- ${
|
|
33
|
-
- ${
|
|
34
|
-
)`),maxWidth:
|
|
3
|
+
- ${n.widgetTrigger.offset.bottom}px
|
|
4
|
+
- ${n.widgetContentContainer.offset.side}px
|
|
5
|
+
- ${B.y*2}px
|
|
6
|
+
)`),maxWidth:s("w",`calc(
|
|
35
7
|
100vw
|
|
36
|
-
- ${
|
|
37
|
-
)`),minHeight:
|
|
38
|
-
${
|
|
39
|
-
${
|
|
40
|
-
${
|
|
41
|
-
)`),minWidth:
|
|
42
|
-
${
|
|
43
|
-
${
|
|
44
|
-
${
|
|
45
|
-
)`)};return{theme:i,computed:a,cssVars:lb({palette:i.palette,primary:i.primaryColor})}}function lb({palette:e,primary:t}){const n=iu(e),r=Ei(t).toHsl(),i=Ei(t).isLight()?n[950]:n[50];return{"--opencx-primary":`${r.h} ${r.s*100}% ${r.l*100}%`,"--opencx-primary-foreground":i,"--opencx-background":n[100],"--opencx-foreground":n[950],"--opencx-destructive":"0 72.2% 50.6%","--opencx-destructive-foreground":n[50],"--opencx-accent":n[200],"--opencx-accent-foreground":"var(--opencx-foreground)","--opencx-secondary":n[200],"--opencx-secondary-foreground":"var(--opencx-foreground)","--opencx-muted":n[200],"--opencx-muted-foreground":n[500],"--opencx-input":n[300],"--opencx-border":n[300],"--opencx-ring":"var(--opencx-foreground)"}}function iu(e){const t={50:"0 0% 98%",100:"0 0% 96.1%",200:"0 0% 89.8%",300:"0 0% 83.1%",400:"0 0% 63.9%",500:"0 0% 45.1%",600:"0 0% 32.2%",700:"0 0% 25.1%",800:"0 0% 14.9%",900:"0 0% 9%",950:"0 0% 3.9%"},n={50:"60 9.1% 97.8%",100:"60 4.8% 95.9%",200:"20 5.9% 90%",300:"24 5.7% 82.9%",400:"24 5.4% 63.9%",500:"25 5.3% 44.7%",600:"33.3 5.5% 32.4%",700:"30 6.3% 25.1%",800:"12 6.5% 15.1%",900:"24 9.8% 10%",950:"20 14.3% 4.1%"},r={50:"0 0% 98%",100:"240 4.8% 95.9%",200:"240 5.9% 90%",300:"240 4.9% 83.9%",400:"240 5% 64.9%",500:"240 3.8% 46.1%",600:"240 5.2% 33.9%",700:"240 5.3% 26.1%",800:"240 3.7% 15.9%",900:"240 5.9% 10%",950:"240 10% 3.9%"},i={50:"210 40% 98%",100:"210 40% 96.1%",200:"214.3 31.8% 91.4%",300:"212.7 26.8% 83.9%",400:"215 20.2% 65.1%",500:"215.4 16.3% 46.9%",600:"215.3 19.3% 34.5%",700:"215.3 25% 26.7%",800:"217.2 32.6% 17.5%",900:"222.2 47.4% 11.2%",950:"222.2 84% 4.9%"};switch(e){case"neutral":return t;case"stone":return n;case"zinc":return r;case"slate":return i;default:return at.isExhaustive(e,iu.name),t}}const li=()=>{const[e,t]=X.useState("ltr");return X.useEffect(()=>{const n=()=>{typeof document>"u"||t(window.getComputedStyle(document.body).direction)};n();const r=new MutationObserver(n);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),r.observe(document.body,{attributes:!0,attributeFilter:["dir"]}),window.addEventListener("languagechange",n),()=>{r.disconnect(),window.removeEventListener("languagechange",n)}},[]),e},cb={ok:"حسنا",yes:"نعم",no:"لا",agree:"موافق",cancel:"إلغاء","yes-exit":"نعم، اخرج","yes-reset":"نعم، إعادة تعيين","no-cancel":"لا، إلغاء","are-you-sure":"هل أنت متأكد؟",recording:"تسجيل","thank-you":"شكرا","sorry-try-again":"عذرا، حاول مرة أخرى","error-occurred":"حدث خطأ","please-try-again":"يرجى المحاولة مرة أخرى","write-a-message":"اكتب رسالة...","send-message":"إرسال رسالة",connected:"متصل",connecting:"جاري الاتصال",reconnecting:"جاري إعادة الاتصال",reconnected:"تم إعادة الاتصال",disconnecting:"جاري قطع الاتصال",disconnected:"قطع الاتصال",error:"خطأ","persist-session":"حفظ الجلسة",settings:"إعدادات",close:"إغلاق",help:"مساعدة",chat:"محادثة",send:"إرسال",copy:"نسخ",copied:"تم النسخ","sound-effects":"التاثيرات الصوتية",language:"اللغة",select:"اختر",agent:"الوكيل",user:"المستخدم",bot:"البوت","close-widget":"إغلاق الودجة","got-any-questions":"هل لديك أي أسئلة؟ تحدث معنا!","typical-response-time":"عادة ما نرد في أقل من دقيقة واحدة","session-closed-lead":"تم حل مشكلتك!",exit:"خروج","create-new-ticket":"إنشاء تذكرة جديدة","reset-conversation":"إعادة تعيين المحادثة","new-conversation":"محادثة جديدة","welcome-title":"مرحبًا بك في دردشة الدعم الخاصة بنا","welcome-description":"نحن هنا للمساعدة! ابدأ محادثة وسنرد عليك في أقرب وقت ممكن.","your-name":"اسمك","your-email":"عنوان بريدك الإلكتروني","start-chat":"تحدث إلى الدعم","starting-chat":"جاري الاتصال...","hello-greeting":"مرحبًا! كيف يمكننا مساعدتك اليوم؟","i-need-more-help":"أحتاج المزيد من المساعدة","this-was-helpful":"كان هذا مفيدًا",optional:"اختياري","no-conversations-yet":"لا يوجد محادثات","back-to-conversations":"العودة إلى المحادثات","closed-conversations":"المحادثات المغلقة"},db={ok:"OK",yes:"Ja",no:"Nein",agree:"Zustimmen",cancel:"Stornieren","yes-exit":"Ja, beenden","yes-reset":"Ja, zurücksetzen","no-cancel":"Nein, abbrechen","are-you-sure":"Sind Sie sicher?",recording:"Aufnahme läuft","thank-you":"Vielen Dank","sorry-try-again":"Entschuldigung, bitte versuchen Sie es erneut","error-occurred":"Ein Fehler ist aufgetreten","please-try-again":"Bitte versuchen Sie es erneut","write-a-message":"Nachricht schreiben...","send-message":"Nachricht senden",connected:"Verbunden",connecting:"Verbindung wird hergestellt",reconnecting:"Verbindung wird wiederhergestellt",reconnected:"Wieder verbunden",disconnecting:"Verbindung wird getrennt",disconnected:"Verbindung getrennt",error:"Fehler","persist-session":"Sitzung beibehalten",settings:"Einstellungen",close:"Schließen",help:"Hilfe",chat:"Chat",send:"Senden",copy:"Kopieren",copied:"Kopiert","sound-effects":"Soundeffekte",language:"Sprache",select:"Auswählen",agent:"Agent",user:"Benutzer",bot:"Bot","got-any-questions":"Haben Sie Fragen? Chatten Sie mit uns!","typical-response-time":"Üblicherweise antworten wir in weniger als 1 Minute","close-widget":"Widget schließen","session-closed-lead":"Ihr Problem wurde gelöst!","create-new-ticket":"Neues Ticket erstellen",exit:"Beenden","reset-conversation":"Konversation zurücksetzen","new-conversation":"Neue Konversation","welcome-title":"Willkommen in unserem Support-Chat","welcome-description":"Wir sind hier, um zu helfen! Beginnen Sie ein Gesprách und wir werden so schnell wie mogelijk antworten.","your-name":"Ihr Name","your-email":"Ihre E-Mail-Adresse","start-chat":"Mit dem Support sprechen","starting-chat":"Verbindung wird hergestellt...","hello-greeting":"Hallo! Wie können wir Ihnen heute helfen?","i-need-more-help":"Ich brauche weitere Hilfe","this-was-helpful":"Dies war hilfreich",optional:"Optional","no-conversations-yet":"noch keine Gespräche","back-to-conversations":"Zurück zur Konversationen","closed-conversations":"Geschlossene Konversationen"},hb={ok:"OK",yes:"Yes",no:"No",agree:"Agree",cancel:"Cancel","yes-exit":"Yes, exit","yes-reset":"Yes, reset","no-cancel":"No, cancel","are-you-sure":"Are you sure?",recording:"Recording...","thank-you":"Thank you","sorry-try-again":"Sorry, please try again","error-occurred":"An error occurred","please-try-again":"Please try again","write-a-message":"Write a message...","send-message":"Send message",connected:"Connected",connecting:"Connecting",reconnecting:"Reconnecting",reconnected:"Reconnected",disconnecting:"Disconnecting",disconnected:"Disconnected",error:"Error","persist-session":"Persist session",settings:"Settings",close:"Close",help:"Help",chat:"Chat",send:"Send",copy:"Copy",copied:"Copied","sound-effects":"Sound effects",language:"Language",select:"Select",agent:"Agent",user:"User",bot:"Bot","close-widget":"Close widget","got-any-questions":"Got any questions? Chat with us!","typical-response-time":"Typically respond in less than 1 minute","session-closed-lead":"Your issue has been resolved!","create-new-ticket":"Create new ticket",exit:"Exit","reset-conversation":"Reset conversation","new-conversation":"New conversation","welcome-title":"Welcome to our support chat","welcome-description":"We're here to help! Start a conversation and we'll get back to you as soon as possible.","your-name":"Your name","your-email":"Your email address","start-chat":"Talk to support","starting-chat":"Connecting...","hello-greeting":"Hi there!","i-need-more-help":"I need more help","this-was-helpful":"This was helpful",optional:"Optional","no-conversations-yet":"No conversations yet","back-to-conversations":"Back to conversations","closed-conversations":"Closed conversations"},fb={ok:"D'accord",yes:"Oui",no:"Non",agree:"Accepter",cancel:"Annuler","yes-exit":"Oui, quitter","yes-reset":"Oui, réinitialiser","no-cancel":"Non, annuler","are-you-sure":"Êtes-vous sûr ?",recording:"Enregistrement...","thank-you":"Merci","sorry-try-again":"Désolé, veuillez réessayer","error-occurred":"Une erreur s'est produite","please-try-again":"Veuillez réessayer","write-a-message":"Écrivez un message...","send-message":"Envoyer le message",connected:"Connecté",connecting:"Connexion en cours",reconnecting:"Reconnexion en cours",reconnected:"Reconnecté",disconnecting:"Déconnexion en cours",disconnected:"Déconnecté",error:"Erreur","persist-session":"Conserver la session",settings:"Paramètres",close:"Fermer",help:"Aide",chat:"Chat",send:"Envoyer",copy:"Copier",copied:"Copié","sound-effects":"Effets sonores",language:"Langue",select:"Sélectionner",agent:"Agent",user:"Utilisateur",bot:"Bot","close-widget":"Fermer le widget","got-any-questions":"Vous avez des questions ? Chattez avec nous !","typical-response-time":"Nous répondons généralement en moins d'une minute","session-closed-lead":"Votre problème a été résolu !","create-new-ticket":"Créer un nouveau ticket",exit:"Sortie","reset-conversation":"Réinitialiser la conversation","new-conversation":"Nouvelle conversation","welcome-title":"Bienvenue dans notre chat de support","welcome-description":"Nous sommes là pour vous aider ! Commencez une conversation et nous vous répondrons dès que possible.","your-name":"Votre nom","your-email":"Votre adresse e-mail","start-chat":"Parler au support","starting-chat":"Connexion...","hello-greeting":"Bonjour ! Comment pouvons-nous vous aider aujourd'hui ?","i-need-more-help":"Je besoin d'aide plus","this-was-helpful":"C'était utile",optional:"Optionnel","no-conversations-yet":"Aucune conversation pour le moment","back-to-conversations":"Retour aux conversations","closed-conversations":"Conversations fermées"},pb={ok:"OK",yes:"Ja",no:"Nee",agree:"Akkoord",cancel:"Annuleren","yes-exit":"Ja, afsluiten","yes-reset":"Ja, resetten","no-cancel":"Nee, annuleren","are-you-sure":"Weet u het zeker?",recording:"Opname...","thank-you":"Dank u","sorry-try-again":"Sorry, probeer het opnieuw","error-occurred":"Er is een fout opgetreden","please-try-again":"Probeer het opnieuw","write-a-message":"Schrijf een bericht...","send-message":"Bericht verzenden",connected:"Verbonden",connecting:"Verbinding maken",reconnecting:"Opnieuw verbinding maken",reconnected:"Opnieuw verbonden",disconnecting:"Verbinding verbreken",disconnected:"Verbinding verbroken",error:"Fout","persist-session":"Sessie behouden",settings:"Instellingen",close:"Sluiten",help:"Help",chat:"Chat",send:"Verzenden",copy:"Kopiëren",copied:"Gekopieerd","sound-effects":"Geluidseffecten",language:"Taal",select:"Selecteren",agent:"Agent",user:"Gebruiker",bot:"Bot","close-widget":"Widget sluiten","got-any-questions":"Heeft u vragen? Chat met ons!","typical-response-time":"We reageren doorgaans binnen 1 minuut","session-closed-lead":"Uw probleem is opgelost!","create-new-ticket":"Nieuw ticket aanmaken",exit:"Afsluiten","reset-conversation":"Gesprek resetten","new-conversation":"Nieuw gesprek","welcome-title":"Welkom bij onze supportchat","welcome-description":"We zijn hier om te helpen! Begin een gesprek en we nemen zo snel mogelijk contact met u op.","your-name":"Uw naam","your-email":"Uw e-mailadres","start-chat":"Praat met ondersteuning","starting-chat":"Verbinding maken...","hello-greeting":"Hallo! Hoe kunnen we u vandaag helpen?","i-need-more-help":"Ik heb nog meer hulp nodig","this-was-helpful":"Mijn vraag is opgelost",optional:"Optioneel","no-conversations-yet":"Nog geen gesprekken","back-to-conversations":"Terug naar gesprekken","closed-conversations":"Afgesloten gesprekken"},mb={ok:"OK",yes:"Sim",no:"Não",agree:"Concordo",cancel:"Cancelar","yes-exit":"Sim, sair","yes-reset":"Sim, redefinir","no-cancel":"Não, cancelar","are-you-sure":"Você tem certeza?",recording:"Gravando...","thank-you":"Obrigado","sorry-try-again":"Desculpe, tente novamente","error-occurred":"Ocorreu um erro","please-try-again":"Por favor, tente novamente","write-a-message":"Escreva uma mensagem...","send-message":"Enviar mensagem",connected:"Conectado",connecting:"Conectando",reconnecting:"Reconectando",reconnected:"Reconectado",disconnecting:"Desconectando",disconnected:"Desconectado",error:"Erro","persist-session":"Persistir sessão",settings:"Configurações",close:"Fechar",help:"Ajuda",chat:"Bate-papo",send:"Enviar",copy:"Copiar",copied:"Copiado","sound-effects":"Efeitos sonoros",language:"Idioma",select:"Selecionar",agent:"Agente",user:"Usuário",bot:"Bot","close-widget":"Fechar widget","got-any-questions":"Tem alguma dúvida? Converse conosco!","typical-response-time":"Geralmente respondemos em menos de 1 minuto","session-closed-lead":"Seu problema foi resolvido!","create-new-ticket":"Criar novo ticket",exit:"Sair","reset-conversation":"Redefinir conversa","new-conversation":"Nova conversa","welcome-title":"Bem-vindo ao nosso chat de suporte","welcome-description":"Estamos aqui para ajudar! Inicie uma conversa e responderemos o mais rápido possível.","your-name":"Seu nome","your-email":"Seu endereço de email","start-chat":"Falar com o suporte","starting-chat":"Conectando...","hello-greeting":"Olá! Como podemos ajudar você hoje?","i-need-more-help":"preciso de mais ajuda","this-was-helpful":"Isso foi útil",optional:"Opcional","no-conversations-yet":"Nenhuma conversa ainda","back-to-conversations":"Voltar para conversas","closed-conversations":"Conversas fechadas"},gb={ok:"OK",yes:"Sí",no:"No",agree:"De acuerdo",cancel:"Cancelar","yes-exit":"Sí, salir","yes-reset":"Sí, restablecer","no-cancel":"No, cancelar","are-you-sure":"¿Estás seguro?",recording:"Grabando...","thank-you":"Gracias","sorry-try-again":"Lo sentimos, intenta de nuevo","error-occurred":"Ocurrió un error","please-try-again":"Por favor, inténtalo de nuevo","write-a-message":"Escribe un mensaje...","send-message":"Enviar mensaje",connected:"Conectado",connecting:"Conectando",reconnecting:"Reconectando",reconnected:"Reconectado",disconnecting:"Desconectando",disconnected:"Desconectado",error:"Error","persist-session":"Persistir sesión",settings:"Configuración",close:"Cerrar",help:"Ayuda",chat:"Chat",send:"Enviar",copy:"Copiar",copied:"Copiado","sound-effects":"Efectos de sonido",language:"Idioma",select:"Seleccionar",agent:"Agente",user:"Usuario",bot:"Bot","close-widget":"Cerrar widget","got-any-questions":"¿Tienes alguna pregunta? ¡Chatea con nosotros!","typical-response-time":"Normalmente respondemos en menos de 1 minuto","session-closed-lead":"¡Tu problema fue resuelto!","create-new-ticket":"Crear nuevo ticket",exit:"Salir","reset-conversation":"Restablecer conversación","new-conversation":"Nueva conversación","welcome-title":"Bienvenido a nuestro chat de soporte","welcome-description":"¡Estamos aquí para ayudarte! Inicia una conversación y responderemos lo antes posible.","your-name":"Tu nombre","your-email":"Tu correo electrónico","start-chat":"Hablar con soporte","starting-chat":"Conectando...","hello-greeting":"¡Hola! ¿Cómo podemos ayudarte hoy?","i-need-more-help":"Necesito más ayuda","this-was-helpful":"Esto fue útil",optional:"Opcional","no-conversations-yet":"Sin conversaciones aún","back-to-conversations":"Volver a conversaciones","closed-conversations":"Conversaciones cerradas"},au={en:hb,ar:cb,nl:pb,fr:fb,de:db,pt:mb,es:gb},bb=Object.keys(au),Eb=e=>bb.includes(e);function Tb(e,t){const n=au[t];return n&&n[e]||""}function pn(){const{widgetCtx:{config:e}}=U.useWidget();return X.useMemo(()=>{const n=Eb(e.language)?e.language:"en";return{get:r=>Tb(r,n),lang:n}},[e.language])}function ci({suggestion:e,className:t,...n}){const{sendMessage:r}=U.useMessages(),i=()=>{const a=e.trim();a&&r({content:a})};return f.jsx(be,{...ie("chat/suggested_reply_btn"),size:"sm",className:q("rounded-xl w-fit",t),...n,onClick:i,children:e})}function xb(){const e=pn(),t=[e.get("i-need-more-help"),e.get("this-was-helpful")];return f.jsx("div",{...ie("chat/might_solve_user_issue_suggested_replies_container"),className:"flex items-center gap-2 p-2 pb-0 flex-wrap",children:t.map(n=>f.jsx(ci,{suggestion:n,className:"flex-1"},n))})}function wb({file:{status:e,file:t,error:n},onCancel:r}){const[i,a]=X.useState(null);X.useEffect(()=>{if(!t.type.startsWith("image/"))return;const l=new FileReader;return l.onload=()=>a(l.result),l.onerror=()=>console.error("Error reading file"),l.readAsDataURL(t),()=>l.abort()},[t]);const s=()=>{switch(e){case"uploading":return f.jsx(ee.Loader2,{className:"size-4 animate-spin"});case"error":return f.jsx(ee.AlertCircle,{className:"size-4 text-destructive"});default:return null}},u=()=>{const l=t.type.split("/")[0];return l==="image"&&i?f.jsx("img",{src:typeof i=="string"?i:"",className:"object-cover bg-secondary size-full",alt:t.name}):l==="audio"?f.jsx(ee.FileAudio2Icon,{}):l==="video"?f.jsx(ee.FileVideo2Icon,{}):f.jsx(ee.FileIcon,{})};return f.jsx(rn,{side:"bottom",content:e==="error"?f.jsxs("span",{className:"text-destructive",children:["Failed to upload: ",n]}):t.name,children:f.jsxs("div",{className:q(e==="uploading"&&"opacity-50","group","size-12 border rounded-2xl overflow-hidden relative","flex items-center justify-center shrink-0"),children:[f.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:s()}),f.jsx("button",{type:"button",className:q("absolute bg-black/50 inset-0 size-full z-10 opacity-0","flex items-center justify-center","opacity-0 group-hover:opacity-100 transition"),onClick:r,children:f.jsx(ee.XIcon,{className:"size-4 text-primary-foreground"})}),f.jsx(u,{})]})})}function yb(){var Y;const{isSmallScreen:e}=ut(),t=X.useRef(null),{sendMessage:n}=U.useMessages(),{sessionState:r}=U.useSessions(),i=pn(),a=li(),[s,u]=X.useState(""),{allFiles:l,emptyTheFiles:c,handleCancelUpload:d,appendFiles:h,isUploading:g,successFiles:p}=U.useUploadFiles(),E=!!((Y=r.session)!=null&&Y.isHandedOff),{isAwaitingBotReply:y}=U.useIsAwaitingBotReply(),k=z=>{h(z)},_=!s.trim()&&p.length===0,N=async()=>{if(y||_)return;g&&console.info("please wait for the file(s) to upload");const z=s.trim();n({content:z,attachments:p.flatMap(j=>j.fileUrl?[{url:j.fileUrl,type:j.file.type,name:j.file.name,id:j.id,size:j.file.size}]:[])}),u(""),c()},{getRootProps:L,getInputProps:M,open:F}=ku.useDropzone({onDrop:k,noClick:!0,onDropRejected(){console.error("unsupported file type, or the file is too large")},maxSize:5*1024*1024,accept:E?{"text/*":[".txt"],"image/*":[".png",".jpg",".jpeg",".gif"],"application/pdf":[".pdf"]}:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"]}}),S=z=>{const j=z.clipboardData;j&&j.files.length>0&&k(Array.from(j.files))};return f.jsxs("div",{...ie("chat/input_box/root"),className:"p-2 relative space-y-1",...L(),children:[f.jsx("input",{...M()}),f.jsxs("div",{...ie("chat/input_box/inner_root"),className:q("transition-all","bg-white","relative rounded-3xl flex flex-col gap-2 p-2","hover:border-primary focus-within:border-primary"),children:[f.jsxs("div",{...ie("chat/input_box/textarea_and_attachments_container"),className:"flex flex-col gap-2",children:[l.length>0&&f.jsx("div",{...ie("chat/input_box/attachments_container"),className:"flex items-center gap-1",children:f.jsx(ge.AnimatePresence,{mode:"popLayout",children:l.map(z=>f.jsx(se,{snapExit:!0,children:f.jsx(wb,{onCancel:()=>d(z.id),file:z})},z.id))})}),f.jsx("textarea",{...ie("chat/input_box/textarea"),onPaste:S,ref:t,id:"chat-input",dir:a,value:s,rows:3,className:q("max-h-16 [field-sizing:content]","w-full resize-none px-2",l.length===0&&"pt-1","bg-transparent outline-none","placeholder:text-muted-foreground","rtl:placeholder:text-right",e?"text-[16px]":"text-sm"),onChange:z=>u(z.target.value),onKeyDown:async z=>{z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),N())},placeholder:i.get("write-a-message")})]}),f.jsxs("div",{dir:a,className:"gap-2 flex justify-between rtl:text-right",children:[f.jsx(rn,{side:"top",align:"start",content:"attach files, (maximum size 5mb)",children:f.jsx(be,{onClick:F,size:"fit",variant:"ghost",className:q("rounded-full size-8 flex items-center justify-center p-0 overflow-hidden"),children:f.jsx(ge.AnimatePresence,{mode:"wait",children:E?f.jsx(se,{children:f.jsx(ee.PaperclipIcon,{className:"size-4"})},"paper-clip"):f.jsx(se,{children:f.jsx(ee.ImageIcon,{className:"size-4"})},"image-icon")})})}),f.jsx(rn,{content:"send message",side:"top",align:"end",children:f.jsx(be,{size:"fit",onClick:N,disabled:y||g||_,className:"rounded-full size-8 flex items-center justify-center p-0",children:f.jsx(ge.AnimatePresence,{mode:"wait",children:y||g?f.jsx(se,{snapExit:!0,children:f.jsx(ee.CircleDashed,{className:"size-4 animate-spin animate-iteration-infinite"})},"loading"):f.jsx(se,{snapExit:!0,children:f.jsx(ee.ArrowUpIcon,{className:"size-4"})},"send")})})})]})]})]})}function _b(){const{widgetCtx:e}=U.useWidget(),{router:t}=U.useConfig(),{canCreateNewSession:n}=U.useSessions(),{toSessionsScreen:r}=U.useWidgetRouter(),i=pn();return f.jsx("div",{className:"p-2",children:f.jsxs("div",{className:"p-2 bg-muted rounded-3xl space-y-2",children:[f.jsxs("div",{className:"pl-2 flex items-center gap-1",children:[f.jsx(ee.CircleCheckIcon,{className:"size-4 text-emerald-600"}),f.jsx("h2",{className:"text-sm font-medium",dir:"auto",children:i.get("session-closed-lead")})]}),f.jsx("div",{children:n||t!=null&&t.chatScreenOnly?f.jsx(be,{onClick:e.resetChat,className:"rounded-2xl w-full",children:i.get("new-conversation")}):f.jsx(be,{onClick:r,className:"rounded-2xl w-full",children:i.get("back-to-conversations")})})]})})}function Ab(){var a;const{initialQuestions:e,initialQuestionsPosition:t}=U.useConfig(),{sessionState:n}=U.useSessions(),{messagesState:r}=U.useMessages(),i=r.messages.length===0;return f.jsx("footer",{children:f.jsx("div",{children:f.jsx(ge.AnimatePresence,{mode:"wait",children:n.session&&!((a=n.session)!=null&&a.isOpened)?f.jsx(se,{className:"overflow-hidden",overrides:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},children:f.jsx(_b,{})},"session-closed"):f.jsxs(se,{className:"overflow-hidden",overrides:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},children:[r.lastAIResMightSolveUserIssue&&f.jsx(xb,{}),i&&e&&t!=="below-initial-messages"&&f.jsx("div",{className:"flex items-center flex-row justify-end gap-2 flex-wrap px-2",children:e==null?void 0:e.map((s,u)=>f.jsx(ci,{suggestion:s},`${s}-${u}`))}),f.jsx(yb,{})]},"chat-input")})})})}function su(){const{contentIframeRef:e}=U.useWidget();return{setWidth:t=>{var n;(n=e==null?void 0:e.current)==null||n.style.setProperty("--opencx-widget-width",t)},setHeight:t=>{var n;(n=e==null?void 0:e.current)==null||n.style.setProperty("--opencx-widget-height",t)}}}function di({width:e,height:t}){const{isSmallScreen:n}=ut(),{setWidth:r,setHeight:i}=su();X.useEffect(()=>{e&&r(e),t&&i(t)},[n,t,e,r,i])}const Ha=ee.CircleDashedIcon;function an({name:e,className:t}){const n=(()=>{switch(e){case"Check":return ee.CheckIcon;case"CheckCheck":return ee.CheckCheckIcon;case"CircleCheck":return ee.CircleCheckIcon;case"CircleCheckBig":return ee.CircleCheckBigIcon;case"CircleX":return ee.CircleXIcon;case"Expand":return ee.ExpandIcon;case"Maximize":return ee.MaximizeIcon;case"Maximize2":return ee.Maximize2Icon;case"Minimize":return ee.MinimizeIcon;case"Minimize2":return ee.Minimize2Icon;case"Shrink":return ee.ShrinkIcon;case"SquareCheck":return ee.SquareCheckIcon;case"SquareCheckBig":return ee.SquareCheckBigIcon;case"SquareX":return ee.SquareXIcon;case"X":return ee.XIcon;case void 0:return Ha;default:return at.isExhaustive(e,an.name),Ha}})();return f.jsx(n,{className:q("size-4",t)})}function ou({className:e,...t}){return f.jsx("div",{className:q("animate-pulse rounded-md bg-secondary",e),...t})}function hi(){var i;const{data:e}=U.usePreludeData(),{routerState:{screen:t}}=U.useWidgetRouter(),{textContent:n}=U.useConfig();return(()=>{var a,s;switch(t){case"chat":return(a=n==null?void 0:n.chatScreen)==null?void 0:a.headerTitle;case"sessions":return(s=n==null?void 0:n.sessionsScreen)==null?void 0:s.headerTitle;case"welcome":return;default:at.isExhaustive(t,hi.name);return}})()??((i=e==null?void 0:e.data)==null?void 0:i.organizationName)??"Chat"}function Cb(e){switch(e){case"chat":return ie("chat/header");case"sessions":return ie("sessions/header");case"welcome":return;default:at.isExhaustive(e,hi.name);return}}function kb(){const{router:e}=U.useConfig(),{routerState:{screen:t},toSessionsScreen:n}=U.useWidgetRouter();return t!=="chat"||e!=null&&e.chatScreenOnly?null:f.jsx(be,{variant:"ghost",size:"fit",className:"rounded-full",onClick:n,children:f.jsx(ee.ChevronLeftIcon,{className:"size-4"})})}function Ib({button:e}){const{setIsOpen:t}=U.useWidgetTrigger(),{isSmallScreen:n}=ut();return n&&e.hideOnSmallScreen||!n&&e.hideOnLargeScreen?null:f.jsx(be,{variant:"ghost",size:"fit",className:"rounded-full",onClick:()=>t(!1),children:f.jsx(an,{name:e.icon})})}function Dr({button:e}){const[t,n]=X.useState(!1),{routerState:{screen:r}}=U.useWidgetRouter(),{isSmallScreen:i}=ut(),{theme:a}=Mt(),{setWidth:s,setHeight:u}=su();if(r!=="chat"&&r!=="sessions")return null;const l=(()=>{switch(r){case"chat":return a.screens.chat.height;case"sessions":return a.screens.sessions.height;default:return at.isExhaustive(r,Dr.name),a.screens.chat.height}})(),c=(()=>{switch(r){case"chat":return a.screens.chat.width;case"sessions":return a.screens.sessions.width;default:return at.isExhaustive(r,Dr.name),a.screens.chat.width}})(),d=()=>{n(h=>{const g=!h;return u(g?"100vh":l),s(g?`max(40vw, ${c})`:c),g})};return i&&e.hideOnSmallScreen||!i&&e.hideOnLargeScreen?null:f.jsx(be,{variant:"ghost",size:"fit",className:"rounded-full",onClick:d,children:f.jsx(an,{name:e.icon||(t?e.shrinkIcon:e.expandIcon)})})}function Sb({button:e}){var c,d,h;const[t,n]=X.useState(!1),{widgetCtx:r}=U.useWidget(),{setIsOpen:i}=U.useWidgetTrigger(),{resolveSession:a,sessionState:s}=U.useSessions(),{isSmallScreen:u}=ut(),l=async()=>{const{success:g,error:p}=await a();if(n(!1),!g)return console.error(p);e.onResolved==="close-widget"&&i(!1),e.onResolved==="reset-chat"&&r.resetChat(),e.onResolved==="reset-chat-and-close-widget"&&(i(!1),r.resetChat())};return u&&e.hideOnSmallScreen||!u&&e.hideOnLargeScreen?null:((c=e.confirmation)==null?void 0:c.type)==="modal"?f.jsxs(Qo,{open:t,onOpenChange:n,children:[f.jsx(Xo,{asChild:!0,children:f.jsx(be,{variant:"ghost",size:"fit",className:"rounded-full",disabled:s.isResolvingSession||!((d=s.session)!=null&&d.isOpened),children:f.jsx(an,{name:e.icon})})}),f.jsxs(ii,{children:[f.jsx($o,{children:f.jsx(ai,{children:e.confirmation.title||"Close conversation"})}),f.jsx(Jo,{children:f.jsx(eu,{children:e.confirmation.description||"Are you sure you want to close this conversation?"})}),f.jsxs(Zo,{children:[f.jsx(be,{variant:"secondary",onClick:()=>n(!1),disabled:s.isResolvingSession,children:e.confirmation.cancelButtonText||"No"}),f.jsx(be,{variant:"destructive",onClick:l,disabled:s.isResolvingSession,children:e.confirmation.confirmButtonText||"Yes"})]})]})]}):f.jsx(be,{variant:"ghost",size:"fit",className:"rounded-full",onClick:l,disabled:s.isResolvingSession||!((h=s.session)!=null&&h.isOpened),children:f.jsx(an,{name:e.icon})})}function vr({button:e}){switch(e.functionality){case"close-widget":return f.jsx(Ib,{button:e});case"expand-shrink":return f.jsx(Dr,{button:e});case"resolve-session":return f.jsx(Sb,{button:e});default:return at.isExhaustive(e,vr.name),null}}const Nb={functionality:"close-widget",hideOnLargeScreen:!0,icon:"X"};function Ob(){const{routerState:{screen:e}}=U.useWidgetRouter(),{headerButtons:t}=U.useConfig(),n=e==="chat"?t==null?void 0:t.chatScreen:e==="sessions"?t==null?void 0:t.sessionsScreen:[];return!n||n.length===0?f.jsx(vr,{button:Nb}):f.jsx(f.Fragment,{children:n.map(r=>f.jsx(vr,{button:r},`${r.functionality}-${r.icon}`))})}function uu(){const{routerState:{screen:e}}=U.useWidgetRouter(),{isLoading:t}=U.usePreludeData(),n=li(),r=Cb(e),i=hi();return f.jsx("header",{...r,className:"py-2 px-4 shrink-0",children:f.jsxs("div",{dir:n,className:"flex items-center gap-2",children:[f.jsx(kb,{}),f.jsx("div",{className:q("flex-1 h-8 flex items-center",e==="sessions"&&"pl-2"),children:f.jsx(ge.AnimatePresence,{mode:"wait",children:t?f.jsx(se,{snapExit:!0,children:f.jsx(ou,{className:"h-5 w-1/2"})},"skeleton"):f.jsx(se,{children:f.jsx("h2",{className:"font-semibold",children:i})},"organization-name")})}),f.jsx(Ob,{})]})})}function Lb({isFirstInGroup:e,isLastInGroup:t,isAloneInGroup:n,...r}){const{componentStore:i}=U.useWidget();if(r.data.action){const s=i.getComponent(r.data.action.name);if(s)return f.jsx(s,{...r,id:r.id,isFirstInGroup:e,isLastInGroup:t,isAloneInGroup:n})}const a=i.getComponent(r.component);return a?f.jsx(a,{...r,id:r.id,isFirstInGroup:e,isLastInGroup:t,isAloneInGroup:n}):f.jsx(Dn,{...r,isFirstInGroup:e,isLastInGroup:t,isAloneInGroup:n})}function Ua({messages:e,agent:t,suggestedReplies:n}){return f.jsxs("div",{...ie("chat/agent_msg_group/root"),className:q("flex items-end gap-2"),children:[f.jsx(rn,{content:t==null?void 0:t.name,side:"right",align:"end",children:f.jsx(Rr,{...ie("chat/agent_msg_group/root/avatar"),agent:t,className:"hidden"})}),f.jsxs("div",{className:q("flex-1 flex flex-col gap-2"),children:[f.jsxs("div",{...ie("chat/agent_msg_group/avatar_and_msgs/root"),className:q("flex items-end gap-2"),children:[f.jsx(rn,{content:t==null?void 0:t.name,side:"right",align:"end",children:f.jsx(Rr,{...ie("chat/agent_msg_group/avatar_and_msgs/avatar"),agent:t})}),f.jsx("div",{...ie("chat/agent_msg_group/avatar_and_msgs/msgs"),className:q("flex-1 flex flex-col gap-1"),children:e.map((r,i,a)=>f.jsx(Lb,{isFirstInGroup:i===0,isLastInGroup:i===a.length-1,isAloneInGroup:a.length===1,...r},r.id))})]}),n&&n.length>0&&f.jsx("div",{...ie("chat/agent_msg_group/suggestions"),className:q("flex flex-col gap-1 pl-8"),children:n==null?void 0:n.map((r,i)=>f.jsx(ci,{suggestion:r},`${r}-${i}`))})]})]})}function Rb({message:e,isFirstInGroup:t,isLastInGroup:n,isAloneInGroup:r}){var i;return f.jsxs("div",{...ie("chat/user_msg/root"),className:"w-5/6 flex flex-col items-end gap-1",children:[e.attachments&&e.attachments.length>0&&f.jsx("div",{className:"w-full flex gap-1 flex-wrap justify-end",children:(i=e.attachments)==null?void 0:i.map(a=>f.jsx(tu,{attachment:a},a.id))}),e.content.length>0&&f.jsx("div",{...ie("chat/user_msg/msg"),"data-first":t,"data-last":n,"data-alone":r,className:q("transition-all","w-fit py-3 px-4 rounded-3xl text-sm","bg-primary text-primary-foreground","break-words [word-break:break-word]","whitespace-pre-wrap",t&&!r&&"rounded-br-md",n&&!r&&"rounded-tr-md",!t&&!n&&!r&&"rounded-r-md"),children:e.content})]})}function Db({messages:e}){return f.jsx("div",{...ie("chat/user_msg_group/root"),className:q("group","flex flex-col gap-1 justify-end items-end"),children:e.map((t,n,r)=>f.jsx(Rb,{message:t,isFirstInGroup:n===0,isLastInGroup:n===r.length-1,isAloneInGroup:r.length===1},t.id))})}function vb(e){const t=[];let n=null;return e.forEach(r=>{var i,a,s,u;(!n||((i=n[0])==null?void 0:i.type)!==r.type)&&(n=[],t.push(n)),((a=n[0])==null?void 0:a.type)==="FROM_AGENT"&&r.type==="FROM_AGENT"&&((s=r.agent)==null?void 0:s.id)!==((u=n[0].agent)==null?void 0:u.id)&&(n=[],t.push(n)),n.push(r)}),t}function Pb(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_USER"}function Mb(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_BOT"}function Bb(e){var t;return((t=e==null?void 0:e[0])==null?void 0:t.type)==="FROM_AGENT"}function Fb(){const{messagesState:{messages:e}}=U.useMessages(),{isAwaitingBotReply:t}=U.useIsAwaitingBotReply(),{componentStore:n}=U.useWidget(),r=U.useConfig(),{initialQuestions:i,initialQuestionsPosition:a}=r,s=X.useMemo(()=>vb(e),[e]),u=r.persistentInitialMessages||[],l=!r.initialMessages||r.initialMessages.length===0?["Hello, how can I help you?"]:r.initialMessages,c=n.getComponent("loading"),d=X.useRef(null);function h(){setTimeout(()=>{const g=d.current;g&&(g.scrollTop=g.scrollHeight)},0)}return X.useEffect(()=>{h()},[e]),f.jsxs("div",{...ie("chat/msgs/root"),ref:d,className:"max-h-full scroll-smooth relative flex-1 py-2 px-4 flex flex-col gap-2 overflow-auto",children:[f.jsx("div",{...ie("chat/persistent_initial_msgs/root"),children:u.map((g,p,E)=>f.jsx(Dn,{component:"bot_message",data:{message:g},id:g,type:"FROM_BOT",timestamp:Date.now().toString(),dataComponentNames:{messageContainer:"chat/persistent_initial_msg/root",message:"chat/persistent_initial_msg/msg"},classNames:{messageContainer:q("w-full flex flex-col items-center text-center"),message:"w-full bg-transparent border-none shadow-none text-xs"},isFirstInGroup:p===0,isLastInGroup:p===E.length-1,isAloneInGroup:E.length===1},`${g}-${p}`))}),e.length===0&&f.jsx(Ua,{messages:l.map((g,p)=>({component:"bot_message",data:{message:g},id:`${g}-${p}`,type:"FROM_BOT",timestamp:Date.now().toString()})),suggestedReplies:a==="below-initial-messages"?i:void 0,agent:r.bot?{...r.bot,isAi:!0,id:null}:void 0}),s.map(g=>{var y,k,_;const p=(y=g==null?void 0:g[0])==null?void 0:y.type,E=(k=g[0])==null?void 0:k.id;if(!p||!E)return null;if(Pb(g))return f.jsx(Db,{messages:g},E);if(Mb(g)||Bb(g)){const N=(_=g[0])==null?void 0:_.agent;return f.jsx(Ua,{messages:g,agent:N},E)}return null}),t&&c&&f.jsx(c,{agent:r.bot})]})}function lu({className:e}){return f.jsx(ee.LoaderIcon,{className:q("size-4 animate-spin",e)})}function Hb(){const{messagesState:{isInitialFetchLoading:e}}=U.useMessages(),{sessionState:{session:t}}=U.useSessions(),{theme:n}=Mt();di({width:n.screens.chat.width,height:n.screens.chat.height});const r=X.useRef((t==null?void 0:t.id)||"chat").current;return f.jsx("div",{...ie("chat/root"),className:q("flex flex-col overflow-hidden"),style:{width:"100vw",maxWidth:"100vw",height:"100vh",maxHeight:"100vh"},children:f.jsxs("div",{className:"size-full justify-between flex flex-col",children:[f.jsx(uu,{}),f.jsx(ge.AnimatePresence,{mode:"wait",children:e?f.jsx(se,{className:"flex flex-col items-center justify-center w-full flex-1",children:f.jsx(lu,{})},"loading"):f.jsxs(se,{className:"flex flex-col w-full flex-1 overflow-auto",snapExit:!0,children:[f.jsx(Fb,{}),f.jsx(Ab,{})]},r)})]})})}const Cn=Ye.forwardRef(({className:e,type:t,...n},r)=>{const{isSmallScreen:i}=ut(),a=li();return f.jsx(Ke,{ref:r,children:f.jsx("input",{dir:a,type:t,className:q(i?"text-[16px]":"text-sm","flex w-full rounded-xl p-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-primary-foreground placeholder:text-muted-foreground/75 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition","rtl:placeholder:text-right","rounded-2xl px-4","border shadow-sm",e),...n})})});Cn.displayName="Input";function Ub({className:e}){return f.jsx("svg",{width:"26",height:"32",viewBox:"0 0 26 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:q("text-primary-foreground",e),children:f.jsx("path",{d:"M1.34103 25.6132H5.44245C5.74203 25.6228 6.02673 25.7462 6.23867 25.9582C6.45062 26.1703 6.5739 26.4551 6.58348 26.7548V30.8584C6.59305 31.1581 6.71634 31.443 6.92828 31.655C7.14023 31.8671 7.42492 31.9904 7.7245 32H18.2894C18.589 31.9904 18.8737 31.8671 19.0856 31.655C19.2976 31.443 19.4209 31.1581 19.4304 30.8584V26.7548C19.4401 26.4545 19.5638 26.1692 19.7765 25.957C19.9892 25.7449 20.2748 25.6219 20.5749 25.6132H24.659C24.9586 25.6036 25.2433 25.4803 25.4552 25.2682C25.6671 25.0562 25.7904 24.7713 25.8 24.4716V7.52839C25.7904 7.22865 25.6671 6.94381 25.4552 6.73176C25.2433 6.5197 24.9586 6.39635 24.659 6.38677H20.561C20.2603 6.37802 19.9742 6.25457 19.7614 6.04169C19.5487 5.82881 19.4253 5.54261 19.4165 5.24168V1.14161C19.4072 0.84419 19.2858 0.561291 19.0768 0.349589C18.8678 0.137887 18.5865 0.0130193 18.2894 0L7.7245 0C7.42492 0.00957792 7.14023 0.132929 6.92828 0.344983C6.71634 0.557036 6.59305 0.841878 6.58348 1.14161V5.24168C6.57477 5.54203 6.45187 5.82773 6.23983 6.04052C6.0278 6.25331 5.74262 6.37715 5.44245 6.38677H1.34103C1.04144 6.39635 0.756749 6.5197 0.544805 6.73176C0.332861 6.94381 0.209574 7.22865 0.200001 7.52839V24.4716C0.209574 24.7713 0.332861 25.0562 0.544805 25.2682C0.756749 25.4803 1.04144 25.6036 1.34103 25.6132ZM6.58348 24.4716V7.52839C6.59305 7.22865 6.71634 6.94381 6.92828 6.73176C7.14023 6.5197 7.42492 6.39635 7.7245 6.38677H18.2894C18.589 6.39635 18.8737 6.5197 19.0856 6.73176C19.2976 6.94381 19.4209 7.22865 19.4304 7.52839V24.4716C19.4209 24.7713 19.2976 25.0562 19.0856 25.2682C18.8737 25.4803 18.589 25.6036 18.2894 25.6132H7.7245C7.42492 25.6036 7.14023 25.4803 6.92828 25.2682C6.71634 25.0562 6.59305 24.7713 6.58348 24.4716Z",fill:"currentColor"})})}function cu({className:e}){const{token:t}=U.useConfig();return f.jsx("div",{className:q("flex items-center justify-center gap-2 p-2 pt-0",e),children:f.jsx(Ke,{children:f.jsxs("a",{href:`https://open.cx/?ref=${t}`,target:"_blank",rel:"noreferrer",className:q("text-[10px] flex items-center","text-muted-foreground/70 [&_svg]:text-muted-foreground/70","hover:text-primary [&_svg]:hover:text-primary"),children:[f.jsx("span",{children:"Powered by"}),f.jsx("span",{children:" "}),f.jsxs("span",{className:"flex items-center gap-[1px]",children:[f.jsx("span",{children:f.jsx(Ub,{className:"size-3 inline-block"})}),f.jsx("span",{className:"font-semibold",children:"open"})]})]})})})}function zb(){const{contentIframeRef:e}=U.useWidget(),t=X.useRef(null);return X.useEffect(()=>{const n=e==null?void 0:e.current;if(n&&t.current){const r=t.current;let i;const a=new ResizeObserver(()=>{i=requestAnimationFrame(()=>{const s=r.offsetHeight;n.style.setProperty("--opencx-widget-height",`${s.toFixed(1)}px`)})});return a.observe(r),()=>{cancelAnimationFrame(i),a.unobserve(r)}}},[e]),{observedElementRef:t}}const jb=Qn.z.object({name:Qn.z.string().min(2),email:Qn.z.string().email()});function Yb(){var _,N,L,M,F,S,Y,z,j;const{setIsOpen:e}=U.useWidgetTrigger(),{createUnverifiedContact:t}=U.useContact(),{isSmallScreen:n}=ut(),r=U.useConfig(),{theme:i}=Mt(),a=pn(),{data:s}=U.usePreludeData(),{observedElementRef:u}=zb();di({height:void 0,width:i.screens.welcome.width});const[l,c]=X.useState(((_=r.prefillUserData)==null?void 0:_.name)||""),[d,h]=X.useState(((N=r.prefillUserData)==null?void 0:N.email)||""),g=(r.extraDataCollectionFields||[]).filter(C=>C!=="name"&&C!=="email"&&!!C),[p,E]=X.useState({}),[y,k]=U._default(async C=>{C.preventDefault();const H=jb.safeParse({name:l,email:d});H.success&&await t({email:H.data.email,non_verified_name:H.data.name},Object.values(p).filter(Boolean).length?p:void 0)},[l,d,p]);return f.jsx("div",{style:{width:"100vw",maxWidth:"100vw",minHeight:i.screens.welcome.minHeight,height:"100vh",maxHeight:"100vh",overflowY:"auto"},children:f.jsxs("div",{ref:u,className:q("flex flex-col",n&&"h-full","bg-[radial-gradient(ellipse_at_top_left,hsl(var(--opencx-primary)),transparent),radial-gradient(ellipse_at_top_right,hsl(var(--opencx-primary)),transparent)]"),children:[f.jsxs("div",{dir:"auto",className:q("flex-1 flex flex-col px-4 py-12 text-start space-y-4 relative z-10","text-primary-foreground"),children:[n&&f.jsx(se,{className:"absolute top-6 right-6",children:f.jsx(be,{size:"selfless",onClick:()=>e(!1),children:f.jsx(ee.XIcon,{className:"size-4"})})}),f.jsx("div",{className:"flex items-center justify-between w-full mb-2",children:(L=r.assets)!=null&&L.organizationLogo?f.jsx("img",{src:(M=r.assets)==null?void 0:M.organizationLogo,alt:"Company Logo",className:"h-8 w-auto object-contain"}):f.jsx("h2",{className:"font-bold text-sm",dir:"auto",children:(F=s==null?void 0:s.data)==null?void 0:F.organizationName})}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("h1",{className:"text-[1.75rem] font-semibold tracking-tight leading-none",dir:"auto",children:((Y=(S=r.textContent)==null?void 0:S.welcomeScreen)==null?void 0:Y.title)||a.get("welcome-title")}),f.jsx("p",{className:"text-sm",dir:"auto",children:((j=(z=r.textContent)==null?void 0:z.welcomeScreen)==null?void 0:j.description)||a.get("welcome-description")})]})]}),f.jsxs("div",{className:q("z-10 m-2 px-2 pt-2 bp-0 space-y-2","bg-[white]","border shadow","rounded-3xl"),dir:"auto",children:[f.jsxs("form",{onSubmit:k,className:"space-y-2",children:[f.jsx(Cn,{value:l,onChange:C=>c(C.target.value),required:!0,placeholder:a.get("your-name"),name:"name"}),f.jsx(Cn,{required:!0,value:d,onChange:C=>h(C.target.value),type:"email",placeholder:a.get("your-email"),name:"email"}),g.map(C=>f.jsx(Cn,{value:p[C],onChange:H=>E(P=>({...P,[C]:H.target.value})),placeholder:`${C} (${a.get("optional")})`},C)),f.jsxs(be,{disabled:y.loading,className:"w-full",size:"lg",children:[y.loading?a.get("starting-chat"):a.get("start-chat"),f.jsx(ee.SendHorizontal,{className:"size-4 rtl:-scale-100"})]})]}),f.jsx(cu,{})]})]})})}function Wb({children:e}){return f.jsx("p",{className:"pl-4 text-xs text-muted-foreground/75 uppercase font-semibold tracking-tight",children:e})}function za({session:e,className:t}){const{bot:n}=U.useConfig(),{toChatScreen:r}=U.useWidgetRouter(),i=e.assignee.kind==="human"?e.assignee.name||"Support Agent":(n==null?void 0:n.name)||"AI Support Agent",a=e.assignee.kind==="human"?e.assignee.avatarUrl||"":(n==null?void 0:n.avatar)||"";return f.jsxs(be,{variant:"ghost",size:"lg",className:q("rounded-full p-2 pr-4 flex text-start justify-between w-full whitespace-normal",t),onClick:()=>r(e.id),children:[f.jsxs("div",{className:"flex-1 flex gap-2 items-center",children:[f.jsx(ge.AnimatePresence,{mode:"wait",children:f.jsx(se,{snapExit:!0,children:f.jsxs(si,{className:"size-10",children:[f.jsx(oi,{src:a,alt:"Agent Icon"}),f.jsx(ui,{children:f.jsx(ee.UserRoundIcon,{className:"size-4"})})]})})}),f.jsxs("div",{className:"flex-1",children:[f.jsx(ge.AnimatePresence,{mode:"wait",children:f.jsx(se,{snapExit:!0,children:i},i)}),f.jsx(ge.AnimatePresence,{mode:"wait",children:e.lastMessage?f.jsx(se,{snapExit:!0,children:f.jsx(Js,{remarkPlugins:[As],rehypePlugins:[Fo],className:"line-clamp-1 overflow-hidden text-ellipsis text-xs text-muted-foreground",children:e.lastMessage})},e.lastMessage||"content"):f.jsx(se,{className:"w-1/2",snapExit:!0,children:f.jsx(ou,{className:"h-4 w-full"})},"skeleton")})]})]}),f.jsx(ee.ChevronRightIcon,{className:"size-4 text-muted-foreground shrink-0"})]})}function qb(){const e=pn(),{toChatScreen:t}=U.useWidgetRouter(),{sessionsState:{data:n,isInitialFetchLoading:r},openSessions:i,closedSessions:a,canCreateNewSession:s}=U.useSessions();return f.jsx("div",{className:"flex-1 flex flex-col overflow-scroll py-2 px-2",children:f.jsx(ge.AnimatePresence,{mode:"wait",children:r?f.jsx(se,{className:"flex-1 flex items-center justify-center",children:f.jsx(lu,{})},"loading"):f.jsx(se,{className:"flex-1 flex flex-col gap-2 relative",children:n.length?f.jsxs(f.Fragment,{children:[f.jsxs(ge.AnimatePresence,{children:[i.length>0&&f.jsx(se,{fadeIn:"up",delay:.2,className:"space-y-2",snapExit:!0,children:i.map(u=>f.jsx(za,{session:u},u.id))},"open-sessions"),a.length>0&&f.jsxs(se,{className:"space-y-2",delay:.2,snapExit:!0,children:[f.jsx(Wb,{children:e.get("closed-conversations")}),a.map(u=>f.jsx(za,{session:u,className:"opacity-50 hover:opacity-100"},u.id))]},"closed-sessions")]}),s&&f.jsx("div",{className:"mt-auto w-full rounded-3xl sticky bottom-0 outline outline-8 outline-background bg-background",children:X.createElement(be,{...ie("sessions/new_conversation_btn"),size:"lg",key:"new-session",className:"w-full",onClick:()=>t()},e.get("new-conversation"))})]}):f.jsxs("div",{className:"flex-1 flex flex-col gap-2 items-center",children:[f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsx("p",{className:"text-muted-foreground",children:e.get("no-conversations-yet")})}),X.createElement(be,{...ie("sessions/new_conversation_btn"),size:"lg",key:"new-session",className:"w-full",onClick:()=>t()},e.get("new-conversation"))]})},"sessions")})})}function Vb(){const{theme:e}=Mt();return di({width:e.screens.sessions.width,height:e.screens.sessions.height}),f.jsx("div",{...ie("sessions/root"),className:q("flex flex-col overflow-hidden bg-background"),style:{width:"100vw",maxWidth:"100vw",height:"100vh",maxHeight:"100vh"},children:f.jsxs("div",{className:"size-full flex flex-col",children:[f.jsx(uu,{}),f.jsx(qb,{}),f.jsx(cu,{})]})})}function du(){U.usePreludeData();const{routerState:{screen:e}}=U.useWidgetRouter();return f.jsxs("div",{className:"relative bg-background size-full",children:[f.jsx(Gn.Container,{}),f.jsx(ge.AnimatePresence,{mode:"wait",children:(()=>{switch(e){case"welcome":return f.jsx(se,{fadeIn:"right",className:"size-full",snapExit:!0,children:f.jsx(Yb,{})},e);case"sessions":return f.jsx(se,{fadeIn:"right",className:"size-full",snapExit:!0,children:f.jsx(Vb,{})},e);case"chat":return f.jsx(se,{fadeIn:"right",className:"size-full",snapExit:!0,children:f.jsx(Hb,{})},e);default:return at.isExhaustive(e,du.name),null}})()})]})}const Gb=`<!DOCTYPE html>
|
|
8
|
+
- ${n.widgetTrigger.offset.right*2}px
|
|
9
|
+
)`),minHeight:s("h",`min(
|
|
10
|
+
${n.screens.welcome.minHeight},
|
|
11
|
+
${n.screens.sessions.height},
|
|
12
|
+
${n.screens.chat.height}
|
|
13
|
+
)`),minWidth:s("w",`min(
|
|
14
|
+
${n.screens.welcome.width},
|
|
15
|
+
${n.screens.sessions.width},
|
|
16
|
+
${n.screens.chat.width}
|
|
17
|
+
)`)};return{theme:n,computed:a,cssVars:Ft({palette:n.palette,primary:n.primaryColor})}}function Ft({palette:t,primary:o}){const s=st(t),r=We(o).toHsl(),n=We(o).isLight()?s[950]:s[50];return{"--opencx-primary":`${r.h} ${r.s*100}% ${r.l*100}%`,"--opencx-primary-foreground":n,"--opencx-background":s[100],"--opencx-foreground":s[950],"--opencx-destructive":"0 72.2% 50.6%","--opencx-destructive-foreground":s[50],"--opencx-accent":s[200],"--opencx-accent-foreground":"var(--opencx-foreground)","--opencx-secondary":s[200],"--opencx-secondary-foreground":"var(--opencx-foreground)","--opencx-muted":s[200],"--opencx-muted-foreground":s[500],"--opencx-input":s[300],"--opencx-border":s[300],"--opencx-ring":"var(--opencx-foreground)"}}function st(t){const o={50:"0 0% 98%",100:"0 0% 96.1%",200:"0 0% 89.8%",300:"0 0% 83.1%",400:"0 0% 63.9%",500:"0 0% 45.1%",600:"0 0% 32.2%",700:"0 0% 25.1%",800:"0 0% 14.9%",900:"0 0% 9%",950:"0 0% 3.9%"},s={50:"60 9.1% 97.8%",100:"60 4.8% 95.9%",200:"20 5.9% 90%",300:"24 5.7% 82.9%",400:"24 5.4% 63.9%",500:"25 5.3% 44.7%",600:"33.3 5.5% 32.4%",700:"30 6.3% 25.1%",800:"12 6.5% 15.1%",900:"24 9.8% 10%",950:"20 14.3% 4.1%"},r={50:"0 0% 98%",100:"240 4.8% 95.9%",200:"240 5.9% 90%",300:"240 4.9% 83.9%",400:"240 5% 64.9%",500:"240 3.8% 46.1%",600:"240 5.2% 33.9%",700:"240 5.3% 26.1%",800:"240 3.7% 15.9%",900:"240 5.9% 10%",950:"240 10% 3.9%"},n={50:"210 40% 98%",100:"210 40% 96.1%",200:"214.3 31.8% 91.4%",300:"212.7 26.8% 83.9%",400:"215 20.2% 65.1%",500:"215.4 16.3% 46.9%",600:"215.3 19.3% 34.5%",700:"215.3 25% 26.7%",800:"217.2 32.6% 17.5%",900:"222.2 47.4% 11.2%",950:"222.2 84% 4.9%"};switch(t){case"neutral":return o;case"stone":return s;case"zinc":return r;case"slate":return n;default:return H.isExhaustive(t,st.name),o}}const he=()=>{const[t,o]=m.useState("ltr");return m.useEffect(()=>{const s=()=>{typeof document>"u"||o(window.getComputedStyle(document.body).direction)};s();const r=new MutationObserver(s);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),r.observe(document.body,{attributes:!0,attributeFilter:["dir"]}),window.addEventListener("languagechange",s),()=>{r.disconnect(),window.removeEventListener("languagechange",s)}},[]),t},qt={ok:"حسنا",yes:"نعم",no:"لا",agree:"موافق",cancel:"إلغاء","yes-exit":"نعم، اخرج","yes-reset":"نعم، إعادة تعيين","no-cancel":"لا، إلغاء","are-you-sure":"هل أنت متأكد؟",recording:"تسجيل","thank-you":"شكرا","sorry-try-again":"عذرا، حاول مرة أخرى","error-occurred":"حدث خطأ","please-try-again":"يرجى المحاولة مرة أخرى","write-a-message":"اكتب رسالة...","send-message":"إرسال رسالة",connected:"متصل",connecting:"جاري الاتصال",reconnecting:"جاري إعادة الاتصال",reconnected:"تم إعادة الاتصال",disconnecting:"جاري قطع الاتصال",disconnected:"قطع الاتصال",error:"خطأ","persist-session":"حفظ الجلسة",settings:"إعدادات",close:"إغلاق",help:"مساعدة",chat:"محادثة",send:"إرسال",copy:"نسخ",copied:"تم النسخ","sound-effects":"التاثيرات الصوتية",language:"اللغة",select:"اختر",agent:"الوكيل",user:"المستخدم",bot:"البوت","close-widget":"إغلاق الودجة","got-any-questions":"هل لديك أي أسئلة؟ تحدث معنا!","typical-response-time":"عادة ما نرد في أقل من دقيقة واحدة","session-closed-lead":"تم حل مشكلتك!",exit:"خروج","create-new-ticket":"إنشاء تذكرة جديدة","reset-conversation":"إعادة تعيين المحادثة","new-conversation":"محادثة جديدة","welcome-title":"مرحبًا بك في دردشة الدعم الخاصة بنا","welcome-description":"نحن هنا للمساعدة! ابدأ محادثة وسنرد عليك في أقرب وقت ممكن.","your-name":"اسمك","your-email":"عنوان بريدك الإلكتروني","start-chat":"تحدث إلى الدعم","starting-chat":"جاري الاتصال...","hello-greeting":"مرحبًا! كيف يمكننا مساعدتك اليوم؟","i-need-more-help":"أحتاج المزيد من المساعدة","this-was-helpful":"كان هذا مفيدًا",optional:"اختياري","no-conversations-yet":"لا يوجد محادثات","back-to-conversations":"العودة إلى المحادثات","closed-conversations":"المحادثات المغلقة"},Ht={ok:"OK",yes:"Ja",no:"Nein",agree:"Zustimmen",cancel:"Stornieren","yes-exit":"Ja, beenden","yes-reset":"Ja, zurücksetzen","no-cancel":"Nein, abbrechen","are-you-sure":"Sind Sie sicher?",recording:"Aufnahme läuft","thank-you":"Vielen Dank","sorry-try-again":"Entschuldigung, bitte versuchen Sie es erneut","error-occurred":"Ein Fehler ist aufgetreten","please-try-again":"Bitte versuchen Sie es erneut","write-a-message":"Nachricht schreiben...","send-message":"Nachricht senden",connected:"Verbunden",connecting:"Verbindung wird hergestellt",reconnecting:"Verbindung wird wiederhergestellt",reconnected:"Wieder verbunden",disconnecting:"Verbindung wird getrennt",disconnected:"Verbindung getrennt",error:"Fehler","persist-session":"Sitzung beibehalten",settings:"Einstellungen",close:"Schließen",help:"Hilfe",chat:"Chat",send:"Senden",copy:"Kopieren",copied:"Kopiert","sound-effects":"Soundeffekte",language:"Sprache",select:"Auswählen",agent:"Agent",user:"Benutzer",bot:"Bot","got-any-questions":"Haben Sie Fragen? Chatten Sie mit uns!","typical-response-time":"Üblicherweise antworten wir in weniger als 1 Minute","close-widget":"Widget schließen","session-closed-lead":"Ihr Problem wurde gelöst!","create-new-ticket":"Neues Ticket erstellen",exit:"Beenden","reset-conversation":"Konversation zurücksetzen","new-conversation":"Neue Konversation","welcome-title":"Willkommen in unserem Support-Chat","welcome-description":"Wir sind hier, um zu helfen! Beginnen Sie ein Gesprách und wir werden so schnell wie mogelijk antworten.","your-name":"Ihr Name","your-email":"Ihre E-Mail-Adresse","start-chat":"Mit dem Support sprechen","starting-chat":"Verbindung wird hergestellt...","hello-greeting":"Hallo! Wie können wir Ihnen heute helfen?","i-need-more-help":"Ich brauche weitere Hilfe","this-was-helpful":"Dies war hilfreich",optional:"Optional","no-conversations-yet":"noch keine Gespräche","back-to-conversations":"Zurück zur Konversationen","closed-conversations":"Geschlossene Konversationen"},Bt={ok:"OK",yes:"Yes",no:"No",agree:"Agree",cancel:"Cancel","yes-exit":"Yes, exit","yes-reset":"Yes, reset","no-cancel":"No, cancel","are-you-sure":"Are you sure?",recording:"Recording...","thank-you":"Thank you","sorry-try-again":"Sorry, please try again","error-occurred":"An error occurred","please-try-again":"Please try again","write-a-message":"Write a message...","send-message":"Send message",connected:"Connected",connecting:"Connecting",reconnecting:"Reconnecting",reconnected:"Reconnected",disconnecting:"Disconnecting",disconnected:"Disconnected",error:"Error","persist-session":"Persist session",settings:"Settings",close:"Close",help:"Help",chat:"Chat",send:"Send",copy:"Copy",copied:"Copied","sound-effects":"Sound effects",language:"Language",select:"Select",agent:"Agent",user:"User",bot:"Bot","close-widget":"Close widget","got-any-questions":"Got any questions? Chat with us!","typical-response-time":"Typically respond in less than 1 minute","session-closed-lead":"Your issue has been resolved!","create-new-ticket":"Create new ticket",exit:"Exit","reset-conversation":"Reset conversation","new-conversation":"New conversation","welcome-title":"Welcome to our support chat","welcome-description":"We're here to help! Start a conversation and we'll get back to you as soon as possible.","your-name":"Your name","your-email":"Your email address","start-chat":"Talk to support","starting-chat":"Connecting...","hello-greeting":"Hi there!","i-need-more-help":"I need more help","this-was-helpful":"This was helpful",optional:"Optional","no-conversations-yet":"No conversations yet","back-to-conversations":"Back to conversations","closed-conversations":"Closed conversations"},Lt={ok:"D'accord",yes:"Oui",no:"Non",agree:"Accepter",cancel:"Annuler","yes-exit":"Oui, quitter","yes-reset":"Oui, réinitialiser","no-cancel":"Non, annuler","are-you-sure":"Êtes-vous sûr ?",recording:"Enregistrement...","thank-you":"Merci","sorry-try-again":"Désolé, veuillez réessayer","error-occurred":"Une erreur s'est produite","please-try-again":"Veuillez réessayer","write-a-message":"Écrivez un message...","send-message":"Envoyer le message",connected:"Connecté",connecting:"Connexion en cours",reconnecting:"Reconnexion en cours",reconnected:"Reconnecté",disconnecting:"Déconnexion en cours",disconnected:"Déconnecté",error:"Erreur","persist-session":"Conserver la session",settings:"Paramètres",close:"Fermer",help:"Aide",chat:"Chat",send:"Envoyer",copy:"Copier",copied:"Copié","sound-effects":"Effets sonores",language:"Langue",select:"Sélectionner",agent:"Agent",user:"Utilisateur",bot:"Bot","close-widget":"Fermer le widget","got-any-questions":"Vous avez des questions ? Chattez avec nous !","typical-response-time":"Nous répondons généralement en moins d'une minute","session-closed-lead":"Votre problème a été résolu !","create-new-ticket":"Créer un nouveau ticket",exit:"Sortie","reset-conversation":"Réinitialiser la conversation","new-conversation":"Nouvelle conversation","welcome-title":"Bienvenue dans notre chat de support","welcome-description":"Nous sommes là pour vous aider ! Commencez une conversation et nous vous répondrons dès que possible.","your-name":"Votre nom","your-email":"Votre adresse e-mail","start-chat":"Parler au support","starting-chat":"Connexion...","hello-greeting":"Bonjour ! Comment pouvons-nous vous aider aujourd'hui ?","i-need-more-help":"Je besoin d'aide plus","this-was-helpful":"C'était utile",optional:"Optionnel","no-conversations-yet":"Aucune conversation pour le moment","back-to-conversations":"Retour aux conversations","closed-conversations":"Conversations fermées"},Vt={ok:"OK",yes:"Ja",no:"Nee",agree:"Akkoord",cancel:"Annuleren","yes-exit":"Ja, afsluiten","yes-reset":"Ja, resetten","no-cancel":"Nee, annuleren","are-you-sure":"Weet u het zeker?",recording:"Opname...","thank-you":"Dank u","sorry-try-again":"Sorry, probeer het opnieuw","error-occurred":"Er is een fout opgetreden","please-try-again":"Probeer het opnieuw","write-a-message":"Schrijf een bericht...","send-message":"Bericht verzenden",connected:"Verbonden",connecting:"Verbinding maken",reconnecting:"Opnieuw verbinding maken",reconnected:"Opnieuw verbonden",disconnecting:"Verbinding verbreken",disconnected:"Verbinding verbroken",error:"Fout","persist-session":"Sessie behouden",settings:"Instellingen",close:"Sluiten",help:"Help",chat:"Chat",send:"Verzenden",copy:"Kopiëren",copied:"Gekopieerd","sound-effects":"Geluidseffecten",language:"Taal",select:"Selecteren",agent:"Agent",user:"Gebruiker",bot:"Bot","close-widget":"Widget sluiten","got-any-questions":"Heeft u vragen? Chat met ons!","typical-response-time":"We reageren doorgaans binnen 1 minuut","session-closed-lead":"Uw probleem is opgelost!","create-new-ticket":"Nieuw ticket aanmaken",exit:"Afsluiten","reset-conversation":"Gesprek resetten","new-conversation":"Nieuw gesprek","welcome-title":"Welkom bij onze supportchat","welcome-description":"We zijn hier om te helpen! Begin een gesprek en we nemen zo snel mogelijk contact met u op.","your-name":"Uw naam","your-email":"Uw e-mailadres","start-chat":"Praat met ondersteuning","starting-chat":"Verbinding maken...","hello-greeting":"Hallo! Hoe kunnen we u vandaag helpen?","i-need-more-help":"Ik heb nog meer hulp nodig","this-was-helpful":"Mijn vraag is opgelost",optional:"Optioneel","no-conversations-yet":"Nog geen gesprekken","back-to-conversations":"Terug naar gesprekken","closed-conversations":"Afgesloten gesprekken"},Yt={ok:"OK",yes:"Sim",no:"Não",agree:"Concordo",cancel:"Cancelar","yes-exit":"Sim, sair","yes-reset":"Sim, redefinir","no-cancel":"Não, cancelar","are-you-sure":"Você tem certeza?",recording:"Gravando...","thank-you":"Obrigado","sorry-try-again":"Desculpe, tente novamente","error-occurred":"Ocorreu um erro","please-try-again":"Por favor, tente novamente","write-a-message":"Escreva uma mensagem...","send-message":"Enviar mensagem",connected:"Conectado",connecting:"Conectando",reconnecting:"Reconectando",reconnected:"Reconectado",disconnecting:"Desconectando",disconnected:"Desconectado",error:"Erro","persist-session":"Persistir sessão",settings:"Configurações",close:"Fechar",help:"Ajuda",chat:"Bate-papo",send:"Enviar",copy:"Copiar",copied:"Copiado","sound-effects":"Efeitos sonoros",language:"Idioma",select:"Selecionar",agent:"Agente",user:"Usuário",bot:"Bot","close-widget":"Fechar widget","got-any-questions":"Tem alguma dúvida? Converse conosco!","typical-response-time":"Geralmente respondemos em menos de 1 minuto","session-closed-lead":"Seu problema foi resolvido!","create-new-ticket":"Criar novo ticket",exit:"Sair","reset-conversation":"Redefinir conversa","new-conversation":"Nova conversa","welcome-title":"Bem-vindo ao nosso chat de suporte","welcome-description":"Estamos aqui para ajudar! Inicie uma conversa e responderemos o mais rápido possível.","your-name":"Seu nome","your-email":"Seu endereço de email","start-chat":"Falar com o suporte","starting-chat":"Conectando...","hello-greeting":"Olá! Como podemos ajudar você hoje?","i-need-more-help":"preciso de mais ajuda","this-was-helpful":"Isso foi útil",optional:"Opcional","no-conversations-yet":"Nenhuma conversa ainda","back-to-conversations":"Voltar para conversas","closed-conversations":"Conversas fechadas"},$t={ok:"OK",yes:"Sí",no:"No",agree:"De acuerdo",cancel:"Cancelar","yes-exit":"Sí, salir","yes-reset":"Sí, restablecer","no-cancel":"No, cancelar","are-you-sure":"¿Estás seguro?",recording:"Grabando...","thank-you":"Gracias","sorry-try-again":"Lo sentimos, intenta de nuevo","error-occurred":"Ocurrió un error","please-try-again":"Por favor, inténtalo de nuevo","write-a-message":"Escribe un mensaje...","send-message":"Enviar mensaje",connected:"Conectado",connecting:"Conectando",reconnecting:"Reconectando",reconnected:"Reconectado",disconnecting:"Desconectando",disconnected:"Desconectado",error:"Error","persist-session":"Persistir sesión",settings:"Configuración",close:"Cerrar",help:"Ayuda",chat:"Chat",send:"Enviar",copy:"Copiar",copied:"Copiado","sound-effects":"Efectos de sonido",language:"Idioma",select:"Seleccionar",agent:"Agente",user:"Usuario",bot:"Bot","close-widget":"Cerrar widget","got-any-questions":"¿Tienes alguna pregunta? ¡Chatea con nosotros!","typical-response-time":"Normalmente respondemos en menos de 1 minuto","session-closed-lead":"¡Tu problema fue resuelto!","create-new-ticket":"Crear nuevo ticket",exit:"Salir","reset-conversation":"Restablecer conversación","new-conversation":"Nueva conversación","welcome-title":"Bienvenido a nuestro chat de soporte","welcome-description":"¡Estamos aquí para ayudarte! Inicia una conversación y responderemos lo antes posible.","your-name":"Tu nombre","your-email":"Tu correo electrónico","start-chat":"Hablar con soporte","starting-chat":"Conectando...","hello-greeting":"¡Hola! ¿Cómo podemos ayudarte hoy?","i-need-more-help":"Necesito más ayuda","this-was-helpful":"Esto fue útil",optional:"Opcional","no-conversations-yet":"Sin conversaciones aún","back-to-conversations":"Volver a conversaciones","closed-conversations":"Conversaciones cerradas"},rt={en:Bt,ar:qt,nl:Vt,fr:Lt,de:Ht,pt:Yt,es:$t},Ut=Object.keys(rt),Xt=t=>Ut.includes(t);function Kt(t,o){const s=rt[o];return s&&s[t]||""}function K(){const{widgetCtx:{config:t}}=l.useWidget();return m.useMemo(()=>{const s=Xt(t.language)?t.language:"en";return{get:r=>Kt(r,s),lang:s}},[t.language])}function ge({suggestion:t,className:o,...s}){const{sendMessage:r}=l.useMessages(),n=()=>{const a=t.trim();a&&r({content:a})};return e.jsx(C,{...u("chat/suggested_reply_btn"),size:"sm",className:c("rounded-xl w-fit",o),...s,onClick:n,children:t})}function Gt(){const t=K(),o=[t.get("i-need-more-help"),t.get("this-was-helpful")];return e.jsx("div",{...u("chat/might_solve_user_issue_suggested_replies_container"),className:"flex items-center gap-2 p-2 pb-0 flex-wrap",children:o.map(s=>e.jsx(ge,{suggestion:s,className:"flex-1"},s))})}function Jt({file:{status:t,file:o,error:s},onCancel:r}){const[n,a]=m.useState(null);m.useEffect(()=>{if(!o.type.startsWith("image/"))return;const p=new FileReader;return p.onload=()=>a(p.result),p.onerror=()=>console.error("Error reading file"),p.readAsDataURL(o),()=>p.abort()},[o]);const i=()=>{switch(t){case"uploading":return e.jsx(g.Loader2,{className:"size-4 animate-spin"});case"error":return e.jsx(g.AlertCircle,{className:"size-4 text-destructive"});default:return null}},d=()=>{const p=o.type.split("/")[0];return p==="image"&&n?e.jsx("img",{src:typeof n=="string"?n:"",className:"object-cover bg-secondary size-full",alt:o.name}):p==="audio"?e.jsx(g.FileAudio2Icon,{}):p==="video"?e.jsx(g.FileVideo2Icon,{}):e.jsx(g.FileIcon,{})};return e.jsx(Y,{side:"bottom",content:t==="error"?e.jsxs("span",{className:"text-destructive",children:["Failed to upload: ",s]}):o.name,children:e.jsxs("div",{className:c(t==="uploading"&&"opacity-50","group","size-12 border rounded-2xl overflow-hidden relative","flex items-center justify-center shrink-0"),children:[e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:i()}),e.jsx("button",{type:"button",className:c("absolute bg-black/50 inset-0 size-full z-10 opacity-0","flex items-center justify-center","opacity-0 group-hover:opacity-100 transition"),onClick:r,children:e.jsx(g.XIcon,{className:"size-4 text-primary-foreground"})}),e.jsx(d,{})]})})}function Zt(){var E;const{isSmallScreen:t}=F(),o=m.useRef(null),{sendMessage:s}=l.useMessages(),{sessionState:r}=l.useSessions(),n=K(),a=he(),[i,d]=m.useState(""),{allFiles:p,emptyTheFiles:z,handleCancelUpload:b,appendFiles:N,isUploading:h,successFiles:x}=l.useUploadFiles(),v=!!((E=r.session)!=null&&E.isHandedOff),{isAwaitingBotReply:y}=l.useIsAwaitingBotReply(),I=f=>{N(f)},S=!i.trim()&&x.length===0,T=async()=>{if(y||S)return;h&&console.info("please wait for the file(s) to upload");const f=i.trim();s({content:f,attachments:x.flatMap(j=>j.fileUrl?[{url:j.fileUrl,type:j.file.type,name:j.file.name,id:j.id,size:j.file.size}]:[])}),d(""),z()},{getRootProps:D,getInputProps:O,open:P}=kt.useDropzone({onDrop:I,noClick:!0,onDropRejected(){console.error("unsupported file type, or the file is too large")},maxSize:5*1024*1024,accept:v?{"text/*":[".txt"],"image/*":[".png",".jpg",".jpeg",".gif"],"application/pdf":[".pdf"]}:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"]}}),A=f=>{const j=f.clipboardData;j&&j.files.length>0&&I(Array.from(j.files))};return e.jsxs("div",{...u("chat/input_box/root"),className:"p-2 relative space-y-1",...D(),children:[e.jsx("input",{...O()}),e.jsxs("div",{...u("chat/input_box/inner_root"),className:c("transition-all","bg-white","relative rounded-3xl flex flex-col gap-2 p-2","hover:border-primary focus-within:border-primary"),children:[e.jsxs("div",{...u("chat/input_box/textarea_and_attachments_container"),className:"flex flex-col gap-2",children:[p.length>0&&e.jsx("div",{...u("chat/input_box/attachments_container"),className:"flex items-center gap-1",children:e.jsx(k.AnimatePresence,{mode:"popLayout",children:p.map(f=>e.jsx(w,{snapExit:!0,children:e.jsx(Jt,{onCancel:()=>b(f.id),file:f})},f.id))})}),e.jsx("textarea",{...u("chat/input_box/textarea"),onPaste:A,ref:o,id:"chat-input",dir:a,value:i,rows:3,className:c("max-h-16 [field-sizing:content]","w-full resize-none px-2",p.length===0&&"pt-1","bg-transparent outline-none","placeholder:text-muted-foreground","rtl:placeholder:text-right",t?"text-[16px]":"text-sm"),onChange:f=>d(f.target.value),onKeyDown:async f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),T())},placeholder:n.get("write-a-message")})]}),e.jsxs("div",{dir:a,className:"gap-2 flex justify-between rtl:text-right",children:[e.jsx(Y,{side:"top",align:"start",content:"attach files, (maximum size 5mb)",children:e.jsx(C,{onClick:P,size:"fit",variant:"ghost",className:c("rounded-full size-8 flex items-center justify-center p-0 overflow-hidden"),children:e.jsx(k.AnimatePresence,{mode:"wait",children:v?e.jsx(w,{children:e.jsx(g.PaperclipIcon,{className:"size-4"})},"paper-clip"):e.jsx(w,{children:e.jsx(g.ImageIcon,{className:"size-4"})},"image-icon")})})}),e.jsx(Y,{content:"send message",side:"top",align:"end",children:e.jsx(C,{size:"fit",onClick:T,disabled:y||h||S,className:"rounded-full size-8 flex items-center justify-center p-0",children:e.jsx(k.AnimatePresence,{mode:"wait",children:y||h?e.jsx(w,{snapExit:!0,children:e.jsx(g.CircleDashed,{className:"size-4 animate-spin animate-iteration-infinite"})},"loading"):e.jsx(w,{snapExit:!0,children:e.jsx(g.ArrowUpIcon,{className:"size-4"})},"send")})})})]})]})]})}function Qt(){const{widgetCtx:t}=l.useWidget(),{router:o}=l.useConfig(),{canCreateNewSession:s}=l.useSessions(),{toSessionsScreen:r}=l.useWidgetRouter(),n=K();return e.jsx("div",{className:"p-2",children:e.jsxs("div",{className:"p-2 bg-muted rounded-3xl space-y-2",children:[e.jsxs("div",{className:"pl-2 flex items-center gap-1",children:[e.jsx(g.CircleCheckIcon,{className:"size-4 text-emerald-600"}),e.jsx("h2",{className:"text-sm font-medium",dir:"auto",children:n.get("session-closed-lead")})]}),e.jsx("div",{children:s||o!=null&&o.chatScreenOnly?e.jsx(C,{onClick:t.resetChat,className:"rounded-2xl w-full",children:n.get("new-conversation")}):e.jsx(C,{onClick:r,className:"rounded-2xl w-full",children:n.get("back-to-conversations")})})]})})}function eo(){var a;const{initialQuestions:t,initialQuestionsPosition:o}=l.useConfig(),{sessionState:s}=l.useSessions(),{messagesState:r}=l.useMessages(),n=r.messages.length===0;return e.jsx("footer",{children:e.jsx("div",{children:e.jsx(k.AnimatePresence,{mode:"wait",children:s.session&&!((a=s.session)!=null&&a.isOpened)?e.jsx(w,{className:"overflow-hidden",overrides:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},children:e.jsx(Qt,{})},"session-closed"):e.jsxs(w,{className:"overflow-hidden",overrides:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},children:[r.lastAIResMightSolveUserIssue&&e.jsx(Gt,{}),n&&t&&o!=="below-initial-messages"&&e.jsx("div",{className:"flex items-center flex-row justify-end gap-2 flex-wrap px-2",children:t==null?void 0:t.map((i,d)=>e.jsx(ge,{suggestion:i},`${i}-${d}`))}),e.jsx(Zt,{})]},"chat-input")})})})}function nt(){const{contentIframeRef:t}=l.useWidget();return{setWidth:o=>{var s;(s=t==null?void 0:t.current)==null||s.style.setProperty("--opencx-widget-width",o)},setHeight:o=>{var s;(s=t==null?void 0:t.current)==null||s.style.setProperty("--opencx-widget-height",o)}}}function me({width:t,height:o}){const{isSmallScreen:s}=F(),{setWidth:r,setHeight:n}=nt();m.useEffect(()=>{t&&r(t),o&&n(o)},[s,o,t,r,n])}const qe=g.CircleDashedIcon;function $({name:t,className:o}){const s=(()=>{switch(t){case"Check":return g.CheckIcon;case"CheckCheck":return g.CheckCheckIcon;case"CircleCheck":return g.CircleCheckIcon;case"CircleCheckBig":return g.CircleCheckBigIcon;case"CircleX":return g.CircleXIcon;case"Expand":return g.ExpandIcon;case"Maximize":return g.MaximizeIcon;case"Maximize2":return g.Maximize2Icon;case"Minimize":return g.MinimizeIcon;case"Minimize2":return g.Minimize2Icon;case"Shrink":return g.ShrinkIcon;case"SquareCheck":return g.SquareCheckIcon;case"SquareCheckBig":return g.SquareCheckBigIcon;case"SquareX":return g.SquareXIcon;case"X":return g.XIcon;case void 0:return qe;default:return H.isExhaustive(t,$.name),qe}})();return e.jsx(s,{className:c("size-4",o)})}function at({className:t,...o}){return e.jsx("div",{className:c("animate-pulse rounded-md bg-secondary",t),...o})}function ue(){var n;const{data:t}=l.usePreludeData(),{routerState:{screen:o}}=l.useWidgetRouter(),{textContent:s}=l.useConfig();return(()=>{var a,i;switch(o){case"chat":return(a=s==null?void 0:s.chatScreen)==null?void 0:a.headerTitle;case"sessions":return(i=s==null?void 0:s.sessionsScreen)==null?void 0:i.headerTitle;case"welcome":return;default:H.isExhaustive(o,ue.name);return}})()??((n=t==null?void 0:t.data)==null?void 0:n.organizationName)??"Chat"}function to(t){switch(t){case"chat":return u("chat/header");case"sessions":return u("sessions/header");case"welcome":return;default:H.isExhaustive(t,ue.name);return}}function oo(){const{router:t}=l.useConfig(),{routerState:{screen:o},toSessionsScreen:s}=l.useWidgetRouter();return o!=="chat"||t!=null&&t.chatScreenOnly?null:e.jsx(C,{variant:"ghost",size:"fit",className:"rounded-full",onClick:s,children:e.jsx(g.ChevronLeftIcon,{className:"size-4"})})}function so({button:t}){const{setIsOpen:o}=l.useWidgetTrigger(),{isSmallScreen:s}=F();return s&&t.hideOnSmallScreen||!s&&t.hideOnLargeScreen?null:e.jsx(C,{variant:"ghost",size:"fit",className:"rounded-full",onClick:()=>o(!1),children:e.jsx($,{name:t.icon})})}function re({button:t}){const[o,s]=m.useState(!1),{routerState:{screen:r}}=l.useWidgetRouter(),{isSmallScreen:n}=F(),{theme:a}=V(),{setWidth:i,setHeight:d}=nt();if(r!=="chat"&&r!=="sessions")return null;const p=(()=>{switch(r){case"chat":return a.screens.chat.height;case"sessions":return a.screens.sessions.height;default:return H.isExhaustive(r,re.name),a.screens.chat.height}})(),z=(()=>{switch(r){case"chat":return a.screens.chat.width;case"sessions":return a.screens.sessions.width;default:return H.isExhaustive(r,re.name),a.screens.chat.width}})(),b=()=>{s(N=>{const h=!N;return d(h?"100vh":p),i(h?`max(40vw, ${z})`:z),h})};return n&&t.hideOnSmallScreen||!n&&t.hideOnLargeScreen?null:e.jsx(C,{variant:"ghost",size:"fit",className:"rounded-full",onClick:b,children:e.jsx($,{name:t.icon||(o?t.shrinkIcon:t.expandIcon)})})}function ro({button:t}){var z,b,N;const[o,s]=m.useState(!1),{widgetCtx:r}=l.useWidget(),{setIsOpen:n}=l.useWidgetTrigger(),{resolveSession:a,sessionState:i}=l.useSessions(),{isSmallScreen:d}=F(),p=async()=>{const{success:h,error:x}=await a();if(s(!1),!h)return console.error(x);t.onResolved==="close-widget"&&n(!1),t.onResolved==="reset-chat"&&r.resetChat(),t.onResolved==="reset-chat-and-close-widget"&&(n(!1),r.resetChat())};return d&&t.hideOnSmallScreen||!d&&t.hideOnLargeScreen?null:((z=t.confirmation)==null?void 0:z.type)==="modal"?e.jsxs(Ue,{open:o,onOpenChange:s,children:[e.jsx(Xe,{asChild:!0,children:e.jsx(C,{variant:"ghost",size:"fit",className:"rounded-full",disabled:i.isResolvingSession||!((b=i.session)!=null&&b.isOpened),children:e.jsx($,{name:t.icon})})}),e.jsxs(ie,{children:[e.jsx(Ge,{children:e.jsx(le,{children:t.confirmation.title||"Close conversation"})}),e.jsx(Je,{children:e.jsx(Qe,{children:t.confirmation.description||"Are you sure you want to close this conversation?"})}),e.jsxs(Ze,{children:[e.jsx(C,{variant:"secondary",onClick:()=>s(!1),disabled:i.isResolvingSession,children:t.confirmation.cancelButtonText||"No"}),e.jsx(C,{variant:"destructive",onClick:p,disabled:i.isResolvingSession,children:t.confirmation.confirmButtonText||"Yes"})]})]})]}):e.jsx(C,{variant:"ghost",size:"fit",className:"rounded-full",onClick:p,disabled:i.isResolvingSession||!((N=i.session)!=null&&N.isOpened),children:e.jsx($,{name:t.icon})})}function ne({button:t}){switch(t.functionality){case"close-widget":return e.jsx(so,{button:t});case"expand-shrink":return e.jsx(re,{button:t});case"resolve-session":return e.jsx(ro,{button:t});default:return H.isExhaustive(t,ne.name),null}}const no={functionality:"close-widget",hideOnLargeScreen:!0,icon:"X"};function ao(){const{routerState:{screen:t}}=l.useWidgetRouter(),{headerButtons:o}=l.useConfig(),s=t==="chat"?o==null?void 0:o.chatScreen:t==="sessions"?o==null?void 0:o.sessionsScreen:[];return!s||s.length===0?e.jsx(ne,{button:no}):e.jsx(e.Fragment,{children:s.map(r=>e.jsx(ne,{button:r},`${r.functionality}-${r.icon}`))})}function it(){const{routerState:{screen:t}}=l.useWidgetRouter(),{isLoading:o}=l.usePreludeData(),s=he(),r=to(t),n=ue();return e.jsx("header",{...r,className:"py-2 px-4 shrink-0",children:e.jsxs("div",{dir:s,className:"flex items-center gap-2",children:[e.jsx(oo,{}),e.jsx("div",{className:c("flex-1 h-8 flex items-center",t==="sessions"&&"pl-2"),children:e.jsx(k.AnimatePresence,{mode:"wait",children:o?e.jsx(w,{snapExit:!0,children:e.jsx(at,{className:"h-5 w-1/2"})},"skeleton"):e.jsx(w,{children:e.jsx("h2",{className:"font-semibold",children:n})},"organization-name")})}),e.jsx(ao,{})]})})}function io({isFirstInGroup:t,isLastInGroup:o,isAloneInGroup:s,...r}){const{componentStore:n}=l.useWidget();if(r.data.action){const i=n.getComponent(r.data.action.name);if(i)return e.jsx(i,{...r,id:r.id,isFirstInGroup:t,isLastInGroup:o,isAloneInGroup:s})}const a=n.getComponent(r.component);return a?e.jsx(a,{...r,id:r.id,isFirstInGroup:t,isLastInGroup:o,isAloneInGroup:s}):e.jsx(Q,{...r,isFirstInGroup:t,isLastInGroup:o,isAloneInGroup:s})}function He({messages:t,agent:o,suggestedReplies:s}){return e.jsxs("div",{...u("chat/agent_msg_group/root"),className:c("flex items-end gap-2"),children:[e.jsx(Y,{content:o==null?void 0:o.name,side:"right",align:"end",children:e.jsx(se,{...u("chat/agent_msg_group/root/avatar"),agent:o,className:"hidden"})}),e.jsxs("div",{className:c("flex-1 flex flex-col gap-2"),children:[e.jsxs("div",{...u("chat/agent_msg_group/avatar_and_msgs/root"),className:c("flex items-end gap-2"),children:[e.jsx(Y,{content:o==null?void 0:o.name,side:"right",align:"end",children:e.jsx(se,{...u("chat/agent_msg_group/avatar_and_msgs/avatar"),agent:o})}),e.jsx("div",{...u("chat/agent_msg_group/avatar_and_msgs/msgs"),className:c("flex-1 flex flex-col gap-1"),children:t.map((r,n,a)=>e.jsx(io,{isFirstInGroup:n===0,isLastInGroup:n===a.length-1,isAloneInGroup:a.length===1,...r},r.id))})]}),s&&s.length>0&&e.jsx("div",{...u("chat/agent_msg_group/suggestions"),className:c("flex flex-col gap-1 pl-8"),children:s==null?void 0:s.map((r,n)=>e.jsx(ge,{suggestion:r},`${r}-${n}`))})]})]})}function lo({message:t,isFirstInGroup:o,isLastInGroup:s,isAloneInGroup:r}){var n;return e.jsxs("div",{...u("chat/user_msg/root"),className:"w-5/6 flex flex-col items-end gap-1",children:[t.attachments&&t.attachments.length>0&&e.jsx("div",{className:"w-full flex gap-1 flex-wrap justify-end",children:(n=t.attachments)==null?void 0:n.map(a=>e.jsx(et,{attachment:a},a.id))}),t.content.length>0&&e.jsx("div",{...u("chat/user_msg/msg"),"data-first":o,"data-last":s,"data-alone":r,className:c("transition-all","w-fit py-3 px-4 rounded-3xl text-sm","bg-primary text-primary-foreground","break-words [word-break:break-word]","whitespace-pre-wrap",o&&!r&&"rounded-br-md",s&&!r&&"rounded-tr-md",!o&&!s&&!r&&"rounded-r-md"),children:t.content})]})}function co({messages:t}){return e.jsx("div",{...u("chat/user_msg_group/root"),className:c("group","flex flex-col gap-1 justify-end items-end"),children:t.map((o,s,r)=>e.jsx(lo,{message:o,isFirstInGroup:s===0,isLastInGroup:s===r.length-1,isAloneInGroup:r.length===1},o.id))})}function po(t){const o=[];let s=null;return t.forEach(r=>{var n,a,i,d;(!s||((n=s[0])==null?void 0:n.type)!==r.type)&&(s=[],o.push(s)),((a=s[0])==null?void 0:a.type)==="FROM_AGENT"&&r.type==="FROM_AGENT"&&((i=r.agent)==null?void 0:i.id)!==((d=s[0].agent)==null?void 0:d.id)&&(s=[],o.push(s)),s.push(r)}),o}function ho(t){var o;return((o=t==null?void 0:t[0])==null?void 0:o.type)==="FROM_USER"}function go(t){var o;return((o=t==null?void 0:t[0])==null?void 0:o.type)==="FROM_BOT"}function mo(t){var o;return((o=t==null?void 0:t[0])==null?void 0:o.type)==="FROM_AGENT"}function uo(){const{messagesState:{messages:t}}=l.useMessages(),{isAwaitingBotReply:o}=l.useIsAwaitingBotReply(),{componentStore:s}=l.useWidget(),r=l.useConfig(),{initialQuestions:n,initialQuestionsPosition:a}=r,i=m.useMemo(()=>po(t),[t]),d=r.persistentInitialMessages||[],p=!r.initialMessages||r.initialMessages.length===0?["Hello, how can I help you?"]:r.initialMessages,z=s.getComponent("loading"),b=m.useRef(null);function N(){setTimeout(()=>{const h=b.current;h&&(h.scrollTop=h.scrollHeight)},0)}return m.useEffect(()=>{N()},[t]),e.jsxs("div",{...u("chat/msgs/root"),ref:b,className:"max-h-full scroll-smooth relative flex-1 py-2 px-4 flex flex-col gap-2 overflow-auto",children:[e.jsx("div",{...u("chat/persistent_initial_msgs/root"),children:d.map((h,x,v)=>e.jsx(Q,{component:"bot_message",data:{message:h},id:h,type:"FROM_BOT",timestamp:Date.now().toString(),dataComponentNames:{messageContainer:"chat/persistent_initial_msg/root",message:"chat/persistent_initial_msg/msg"},classNames:{messageContainer:c("w-full flex flex-col items-center text-center"),message:"w-full bg-transparent border-none shadow-none text-xs"},isFirstInGroup:x===0,isLastInGroup:x===v.length-1,isAloneInGroup:v.length===1},`${h}-${x}`))}),t.length===0&&e.jsx(He,{messages:p.map((h,x)=>({component:"bot_message",data:{message:h},id:`${h}-${x}`,type:"FROM_BOT",timestamp:Date.now().toString()})),suggestedReplies:a==="below-initial-messages"?n:void 0,agent:r.bot?{...r.bot,isAi:!0,id:null}:void 0}),i.map(h=>{var y,I,S;const x=(y=h==null?void 0:h[0])==null?void 0:y.type,v=(I=h[0])==null?void 0:I.id;if(!x||!v)return null;if(ho(h))return e.jsx(co,{messages:h},v);if(go(h)||mo(h)){const T=(S=h[0])==null?void 0:S.agent;return e.jsx(He,{messages:h,agent:T},v)}return null}),o&&z&&e.jsx(z,{agent:r.bot})]})}function lt({className:t}){return e.jsx(g.LoaderIcon,{className:c("size-4 animate-spin",t)})}function wo(){const{activeMode:t,Component:o}=l.useModes(),{sendMessage:s}=l.useMessages(),{createStateCheckpoint:r}=l.useSessions(),[n,a]=m.useState(!1),i=async d=>{try{a(!0),await s(d)}catch(p){console.error(p)}finally{a(!1)}};return!t||!o?null:e.jsx(o,{mode:t,createStateCheckpoint:r,sendMessage:i,isSendingMessage:n})}function fo(){const{messagesState:{isInitialFetchLoading:t}}=l.useMessages(),{isSmallScreen:o}=F(),{activeMode:s,Component:r}=l.useModes();return{isCanvasOpen:!t&&!o&&!!s&&!!r}}function xo(){const{messagesState:{isInitialFetchLoading:t}}=l.useMessages(),{sessionState:{session:o}}=l.useSessions(),{isCanvasOpen:s}=fo(),{theme:r}=V();me({width:s?r.screens.chat.withCanvas.width:r.screens.chat.width,height:s?r.screens.chat.withCanvas.height:r.screens.chat.height});const n=m.useRef((o==null?void 0:o.id)||"chat").current;return e.jsx("div",{...u("chat/root"),className:c("flex flex-col overflow-hidden"),style:{width:"100vw",maxWidth:"100vw",height:"100vh",maxHeight:"100vh"},children:e.jsxs("div",{className:"size-full justify-between flex flex-col",children:[e.jsx(it,{}),e.jsx(k.AnimatePresence,{mode:"wait",children:t?e.jsx(w,{className:"flex flex-col items-center justify-center w-full flex-1",children:e.jsx(lt,{})},"loading"):e.jsxs(w,{className:"flex items-start h-full flex-1 overflow-auto",snapExit:!0,children:[e.jsxs("div",{className:c("flex flex-col h-full overflow-auto transition-all",s?"w-1/2":"w-full"),style:{transitionTimingFunction:r.screens.chat.withCanvas.transitionTimingFunction,transitionDuration:r.screens.chat.withCanvas.transitionDuration},children:[e.jsx(uo,{}),e.jsx(eo,{})]}),e.jsx("div",{className:c("h-full overflow-auto transition-all",s?"w-1/2":"w-0"),style:{transitionTimingFunction:r.screens.chat.withCanvas.transitionTimingFunction,transitionDuration:r.screens.chat.withCanvas.transitionDuration},children:e.jsx(wo,{})})]},n)})]})})}const Z=R.forwardRef(({className:t,type:o,...s},r)=>{const{isSmallScreen:n}=F(),a=he();return e.jsx(W,{ref:r,children:e.jsx("input",{dir:a,type:o,className:c(n?"text-[16px]":"text-sm","flex w-full rounded-xl p-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-primary-foreground placeholder:text-muted-foreground/75 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition","rtl:placeholder:text-right","rounded-2xl px-4","border shadow-sm",t),...s})})});Z.displayName="Input";function vo({className:t}){return e.jsx("svg",{width:"26",height:"32",viewBox:"0 0 26 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:c("text-primary-foreground",t),children:e.jsx("path",{d:"M1.34103 25.6132H5.44245C5.74203 25.6228 6.02673 25.7462 6.23867 25.9582C6.45062 26.1703 6.5739 26.4551 6.58348 26.7548V30.8584C6.59305 31.1581 6.71634 31.443 6.92828 31.655C7.14023 31.8671 7.42492 31.9904 7.7245 32H18.2894C18.589 31.9904 18.8737 31.8671 19.0856 31.655C19.2976 31.443 19.4209 31.1581 19.4304 30.8584V26.7548C19.4401 26.4545 19.5638 26.1692 19.7765 25.957C19.9892 25.7449 20.2748 25.6219 20.5749 25.6132H24.659C24.9586 25.6036 25.2433 25.4803 25.4552 25.2682C25.6671 25.0562 25.7904 24.7713 25.8 24.4716V7.52839C25.7904 7.22865 25.6671 6.94381 25.4552 6.73176C25.2433 6.5197 24.9586 6.39635 24.659 6.38677H20.561C20.2603 6.37802 19.9742 6.25457 19.7614 6.04169C19.5487 5.82881 19.4253 5.54261 19.4165 5.24168V1.14161C19.4072 0.84419 19.2858 0.561291 19.0768 0.349589C18.8678 0.137887 18.5865 0.0130193 18.2894 0L7.7245 0C7.42492 0.00957792 7.14023 0.132929 6.92828 0.344983C6.71634 0.557036 6.59305 0.841878 6.58348 1.14161V5.24168C6.57477 5.54203 6.45187 5.82773 6.23983 6.04052C6.0278 6.25331 5.74262 6.37715 5.44245 6.38677H1.34103C1.04144 6.39635 0.756749 6.5197 0.544805 6.73176C0.332861 6.94381 0.209574 7.22865 0.200001 7.52839V24.4716C0.209574 24.7713 0.332861 25.0562 0.544805 25.2682C0.756749 25.4803 1.04144 25.6036 1.34103 25.6132ZM6.58348 24.4716V7.52839C6.59305 7.22865 6.71634 6.94381 6.92828 6.73176C7.14023 6.5197 7.42492 6.39635 7.7245 6.38677H18.2894C18.589 6.39635 18.8737 6.5197 19.0856 6.73176C19.2976 6.94381 19.4209 7.22865 19.4304 7.52839V24.4716C19.4209 24.7713 19.2976 25.0562 19.0856 25.2682C18.8737 25.4803 18.589 25.6036 18.2894 25.6132H7.7245C7.42492 25.6036 7.14023 25.4803 6.92828 25.2682C6.71634 25.0562 6.59305 24.7713 6.58348 24.4716Z",fill:"currentColor"})})}function ct({className:t}){const{token:o}=l.useConfig();return e.jsx("div",{className:c("flex items-center justify-center gap-2 p-2 pt-0",t),children:e.jsx(W,{children:e.jsxs("a",{href:`https://open.cx/?ref=${o}`,target:"_blank",rel:"noreferrer",className:c("text-[10px] flex items-center","text-muted-foreground/70 [&_svg]:text-muted-foreground/70","hover:text-primary [&_svg]:hover:text-primary"),children:[e.jsx("span",{children:"Powered by"}),e.jsx("span",{children:" "}),e.jsxs("span",{className:"flex items-center gap-[1px]",children:[e.jsx("span",{children:e.jsx(vo,{className:"size-3 inline-block"})}),e.jsx("span",{className:"font-semibold",children:"open"})]})]})})})}function bo(){const{contentIframeRef:t}=l.useWidget(),o=m.useRef(null);return m.useEffect(()=>{const s=t==null?void 0:t.current;if(s&&o.current){const r=o.current;let n;const a=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{const i=r.offsetHeight;s.style.setProperty("--opencx-widget-height",`${i.toFixed(1)}px`)})});return a.observe(r),()=>{cancelAnimationFrame(n),a.unobserve(r)}}},[t]),{observedElementRef:o}}const yo=oe.z.object({name:oe.z.string().min(2),email:oe.z.string().email()});function jo(){var S,T,D,O,P,A,E,f,j;const{setIsOpen:t}=l.useWidgetTrigger(),{createUnverifiedContact:o}=l.useContact(),{isSmallScreen:s}=F(),r=l.useConfig(),{theme:n}=V(),a=K(),{data:i}=l.usePreludeData(),{observedElementRef:d}=bo();me({height:void 0,width:n.screens.welcome.width});const[p,z]=m.useState(((S=r.prefillUserData)==null?void 0:S.name)||""),[b,N]=m.useState(((T=r.prefillUserData)==null?void 0:T.email)||""),h=(r.extraDataCollectionFields||[]).filter(_=>_!=="name"&&_!=="email"&&!!_),[x,v]=m.useState({}),[y,I]=Ct(async _=>{_.preventDefault();const q=yo.safeParse({name:p,email:b});q.success&&await o({email:q.data.email,non_verified_name:q.data.name},Object.values(x).filter(Boolean).length?x:void 0)},[p,b,x]);return e.jsx("div",{style:{width:"100vw",maxWidth:"100vw",minHeight:n.screens.welcome.minHeight,height:"100vh",maxHeight:"100vh",overflowY:"auto"},children:e.jsxs("div",{ref:d,className:c("flex flex-col",s&&"h-full","bg-[radial-gradient(ellipse_at_top_left,hsl(var(--opencx-primary)),transparent),radial-gradient(ellipse_at_top_right,hsl(var(--opencx-primary)),transparent)]"),children:[e.jsxs("div",{dir:"auto",className:c("flex-1 flex flex-col px-4 py-12 text-start space-y-4 relative z-10","text-primary-foreground"),children:[s&&e.jsx(w,{className:"absolute top-6 right-6",children:e.jsx(C,{size:"selfless",onClick:()=>t(!1),children:e.jsx(g.XIcon,{className:"size-4"})})}),e.jsx("div",{className:"flex items-center justify-between w-full mb-2",children:(D=r.assets)!=null&&D.organizationLogo?e.jsx("img",{src:(O=r.assets)==null?void 0:O.organizationLogo,alt:"Company Logo",className:"h-8 w-auto object-contain"}):e.jsx("h2",{className:"font-bold text-sm",dir:"auto",children:(P=i==null?void 0:i.data)==null?void 0:P.organizationName})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-[1.75rem] font-semibold tracking-tight leading-none",dir:"auto",children:((E=(A=r.textContent)==null?void 0:A.welcomeScreen)==null?void 0:E.title)||a.get("welcome-title")}),e.jsx("p",{className:"text-sm",dir:"auto",children:((j=(f=r.textContent)==null?void 0:f.welcomeScreen)==null?void 0:j.description)||a.get("welcome-description")})]})]}),e.jsxs("div",{className:c("z-10 m-2 px-2 pt-2 bp-0 space-y-2","bg-[white]","border shadow","rounded-3xl"),dir:"auto",children:[e.jsxs("form",{onSubmit:I,className:"space-y-2",children:[e.jsx(Z,{value:p,onChange:_=>z(_.target.value),required:!0,placeholder:a.get("your-name"),name:"name"}),e.jsx(Z,{required:!0,value:b,onChange:_=>N(_.target.value),type:"email",placeholder:a.get("your-email"),name:"email"}),h.map(_=>e.jsx(Z,{value:x[_],onChange:q=>v(G=>({...G,[_]:q.target.value})),placeholder:`${_} (${a.get("optional")})`},_)),e.jsxs(C,{disabled:y.loading,className:"w-full",size:"lg",children:[y.loading?a.get("starting-chat"):a.get("start-chat"),e.jsx(g.SendHorizontal,{className:"size-4 rtl:-scale-100"})]})]}),e.jsx(ct,{})]})]})})}function ko({children:t}){return e.jsx("p",{className:"pl-4 text-xs text-muted-foreground/75 uppercase font-semibold tracking-tight",children:t})}function Be({session:t,className:o}){const{bot:s}=l.useConfig(),{toChatScreen:r}=l.useWidgetRouter(),n=t.assignee.kind==="human"?t.assignee.name||"Support Agent":(s==null?void 0:s.name)||"AI Support Agent",a=t.assignee.kind==="human"?t.assignee.avatarUrl||"":(s==null?void 0:s.avatar)||"";return e.jsxs(C,{variant:"ghost",size:"lg",className:c("rounded-full p-2 pr-4 flex text-start justify-between w-full whitespace-normal",o),onClick:()=>r(t.id),children:[e.jsxs("div",{className:"flex-1 flex gap-2 items-center",children:[e.jsx(k.AnimatePresence,{mode:"wait",children:e.jsx(w,{snapExit:!0,children:e.jsxs(ce,{className:"size-10",children:[e.jsx(de,{src:a,alt:"Agent Icon"}),e.jsx(pe,{children:e.jsx(g.UserRoundIcon,{className:"size-4"})})]})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx(k.AnimatePresence,{mode:"wait",children:e.jsx(w,{snapExit:!0,children:n},n)}),e.jsx(k.AnimatePresence,{mode:"wait",children:t.lastMessage?e.jsx(w,{snapExit:!0,children:e.jsx(Ye,{remarkPlugins:[Le],rehypePlugins:[Ve],className:"line-clamp-1 overflow-hidden text-ellipsis text-xs text-muted-foreground",children:t.lastMessage})},t.lastMessage||"content"):e.jsx(w,{className:"w-1/2",snapExit:!0,children:e.jsx(at,{className:"h-4 w-full"})},"skeleton")})]})]}),e.jsx(g.ChevronRightIcon,{className:"size-4 text-muted-foreground shrink-0"})]})}function Co(){const t=K(),{toChatScreen:o}=l.useWidgetRouter(),{sessionsState:{data:s,isInitialFetchLoading:r},openSessions:n,closedSessions:a,canCreateNewSession:i}=l.useSessions();return e.jsx("div",{className:"flex-1 flex flex-col overflow-scroll py-2 px-2",children:e.jsx(k.AnimatePresence,{mode:"wait",children:r?e.jsx(w,{className:"flex-1 flex items-center justify-center",children:e.jsx(lt,{})},"loading"):e.jsx(w,{className:"flex-1 flex flex-col gap-2 relative",children:s.length?e.jsxs(e.Fragment,{children:[e.jsxs(k.AnimatePresence,{children:[n.length>0&&e.jsx(w,{fadeIn:"up",delay:.2,className:"space-y-2",snapExit:!0,children:n.map(d=>e.jsx(Be,{session:d},d.id))},"open-sessions"),a.length>0&&e.jsxs(w,{className:"space-y-2",delay:.2,snapExit:!0,children:[e.jsx(ko,{children:t.get("closed-conversations")}),a.map(d=>e.jsx(Be,{session:d,className:"opacity-50 hover:opacity-100"},d.id))]},"closed-sessions")]}),i&&e.jsx("div",{className:"mt-auto w-full rounded-3xl sticky bottom-0 outline outline-8 outline-background bg-background",children:m.createElement(C,{...u("sessions/new_conversation_btn"),size:"lg",key:"new-session",className:"w-full",onClick:()=>o()},t.get("new-conversation"))})]}):e.jsxs("div",{className:"flex-1 flex flex-col gap-2 items-center",children:[e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx("p",{className:"text-muted-foreground",children:t.get("no-conversations-yet")})}),m.createElement(C,{...u("sessions/new_conversation_btn"),size:"lg",key:"new-session",className:"w-full",onClick:()=>o()},t.get("new-conversation"))]})},"sessions")})})}function zo(){const{theme:t}=V();return me({width:t.screens.sessions.width,height:t.screens.sessions.height}),e.jsx("div",{...u("sessions/root"),className:c("flex flex-col overflow-hidden bg-background"),style:{width:"100vw",maxWidth:"100vw",height:"100vh",maxHeight:"100vh"},children:e.jsxs("div",{className:"size-full flex flex-col",children:[e.jsx(it,{}),e.jsx(Co,{}),e.jsx(ct,{})]})})}function dt(){l.usePreludeData();const{routerState:{screen:t}}=l.useWidgetRouter();return e.jsxs("div",{className:"relative bg-background size-full",children:[e.jsx(te.Container,{}),e.jsx(k.AnimatePresence,{mode:"wait",children:(()=>{switch(t){case"welcome":return e.jsx(w,{fadeIn:"right",className:"size-full",snapExit:!0,children:e.jsx(jo,{})},t);case"sessions":return e.jsx(w,{fadeIn:"right",className:"size-full",snapExit:!0,children:e.jsx(zo,{})},t);case"chat":return e.jsx(w,{fadeIn:"right",className:"size-full",snapExit:!0,children:e.jsx(xo,{})},t);default:return H.isExhaustive(t,dt.name),null}})()})]})}const So=`<!DOCTYPE html>
|
|
46
18
|
<html>
|
|
47
19
|
<head>
|
|
48
20
|
<style>
|
|
49
|
-
${
|
|
21
|
+
${tt}
|
|
50
22
|
html, body {
|
|
51
23
|
height: 100%;
|
|
52
24
|
width: 100%;
|
|
@@ -59,11 +31,11 @@ html, body {
|
|
|
59
31
|
</head>
|
|
60
32
|
<body>
|
|
61
33
|
</body>
|
|
62
|
-
</html>`;function
|
|
34
|
+
</html>`;function No(){const{isOpen:t}=l.useWidgetTrigger(),{version:o,contentIframeRef:s}=l.useWidget(),{cssOverrides:r}=l.useConfig(),{theme:n,cssVars:a,computed:i}=V();return e.jsx(ee.Content,{onInteractOutside:d=>d.preventDefault(),forceMount:!0,style:{zIndex:n.widgetContentContainer.zIndex,fontSize:"16px"},side:"top",align:"end",sideOffset:n.widgetContentContainer.offset.side,alignOffset:n.widgetContentContainer.offset.align,avoidCollisions:!1,asChild:!0,children:e.jsx(k.motion.div,{animate:t?"visible":"hidden",initial:"hidden",variants:{hidden:{opacity:0,y:8,transitionEnd:{display:"none"},transition:{duration:.15}},visible:{opacity:1,y:0,display:"block"}},children:e.jsxs(ae,{ref:s,initialContent:So,allowFullScreen:!0,title:"OpenCX Live Chat",style:{"--opencx-widget-width":i.minWidth,"--opencx-widget-height":i.minHeight,minWidth:i.minWidth,width:"var(--opencx-widget-width)",maxWidth:i.maxWidth,minHeight:i.minHeight,height:"var(--opencx-widget-height)",maxHeight:i.maxHeight,overflow:"hidden",outline:n.widgetContentContainer.outline,outlineColor:n.widgetContentContainer.outlineColor,borderRadius:n.widgetContentContainer.borderRadius,boxShadow:n.widgetContentContainer.boxShadow,transitionProperty:n.widgetContentContainer.transitionProperty,transitionTimingFunction:n.widgetContentContainer.transitionTimingFunction,transitionDuration:n.widgetContentContainer.transitionDuration,boxSizing:"border-box",borderWidth:"0px"},children:[r&&e.jsx("style",{children:r}),e.jsx(Pt,{delayDuration:200,disableHoverableContent:!0,children:e.jsx("div",{style:{display:"contents"},children:e.jsx("div",{style:{...a},"data-version":o,className:c("antialiased font-sans size-full overflow-hidden isolate relative text-secondary-foreground"),children:e.jsx(dt,{})})})})]})})})}function _o({className:t,style:o}){return e.jsxs("svg",{width:"32",height:"30",viewBox:"0 0 32 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:c("text-primary-foreground",t),style:o,children:[e.jsx("path",{d:"M0 6.94263C0 3.62892 2.68629 0.942627 6 0.942627H26C29.3137 0.942627 32 3.62892 32 6.94263V17.9426C32 21.2563 29.3137 23.9426 26 23.9426H6C2.68629 23.9426 0 21.2563 0 17.9426V6.94263Z",fill:"currentColor"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.9945 23.8935L26.237 23.8934C26.1982 24.3557 26.1712 25.2778 26.1704 26.2318C26.1688 28.2839 26.1376 28.7041 25.974 28.868C25.583 29.2598 25.2686 29.0967 24.0616 27.8754C23.4162 27.2222 22.1141 25.9522 21.1682 25.0531L19.9945 23.8935Z",fill:"currentColor"})]})}const Io=`<!DOCTYPE html>
|
|
63
35
|
<html>
|
|
64
36
|
<head>
|
|
65
37
|
<style>
|
|
66
|
-
${
|
|
38
|
+
${tt}
|
|
67
39
|
html, body {
|
|
68
40
|
height: 100%;
|
|
69
41
|
width: 100%;
|
|
@@ -75,5 +47,5 @@ html, body {
|
|
|
75
47
|
</head>
|
|
76
48
|
<body>
|
|
77
49
|
</body>
|
|
78
|
-
</html>`;function
|
|
50
|
+
</html>`;function To(){var a,i;const{isOpen:t}=l.useWidgetTrigger(),{cssOverrides:o,assets:s}=l.useConfig(),{theme:r,cssVars:n}=V();return e.jsxs(ae,{initialContent:Io,style:{height:`calc(${r.widgetTrigger.size.button}px + ${B.x*2}px)`,width:`calc(${r.widgetTrigger.size.button}px + ${B.y*2}px)`,fontSize:"16px",position:"fixed",zIndex:r.widgetTrigger.zIndex,right:r.widgetTrigger.offset.right,bottom:r.widgetTrigger.offset.bottom,boxSizing:"border-box",borderWidth:"0px"},children:[o&&e.jsx("style",{children:o}),e.jsx("div",{style:{...n,width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(ee.PopoverTrigger,{className:c("font-sans flex items-center justify-center rounded-full"),style:{height:r.widgetTrigger.size.button,width:r.widgetTrigger.size.button},children:e.jsx(W,{children:e.jsx("div",{...u("trigger/btn"),className:c("relative size-full rounded-full","flex items-center justify-center","overflow-hidden","transition-all","bg-primary","text-primary-foreground"),children:e.jsx(k.AnimatePresence,{mode:"wait",children:t?e.jsx(w,{snapExit:!0,fadeIn:"up",overrides:{initial:{rotate:45},animate:{rotate:0}},children:(a=s==null?void 0:s.widgetTrigger)!=null&&a.closeIcon?e.jsx("img",{src:s.widgetTrigger.closeIcon,alt:"Widget trigger close icon",style:{width:r.widgetTrigger.size.icon,height:r.widgetTrigger.size.icon}}):e.jsx(g.ChevronDownIcon,{style:{width:r.widgetTrigger.size.icon,height:r.widgetTrigger.size.icon}})},"x-icon"):e.jsx(w,{snapExit:!0,overrides:{initial:{rotate:45},animate:{rotate:0}},children:(i=s==null?void 0:s.widgetTrigger)!=null&&i.openIcon?e.jsx("img",{src:s.widgetTrigger.openIcon,alt:"Widget trigger open icon",style:{width:r.widgetTrigger.size.icon,height:r.widgetTrigger.size.icon}}):e.jsx(_o,{style:{width:r.widgetTrigger.size.icon,height:r.widgetTrigger.size.icon},className:"mt-0.5 opacity-95"})},"message-icon")})})})})})]})}function Mo(){return e.jsx(ee.Anchor,{style:{position:"fixed",right:0,bottom:0}})}function Eo(){const{isOpen:t,setIsOpen:o}=l.useWidgetTrigger();return e.jsxs(ee.Root,{open:t,onOpenChange:o,children:[e.jsx(Mo,{}),e.jsx(To,{}),e.jsx(No,{})]})}const Ro=[{key:"loading",component:Ot},{key:"fallback",component:_t},{key:"bot_message",component:Q},{key:"agent_message",component:Q}],Do={get:async t=>localStorage.getItem(t),set:async(t,o)=>{localStorage.setItem(t,o)},remove:async t=>{localStorage.removeItem(t)}};function Oo({options:t,components:o=[],modesComponents:s=[],loadingComponent:r}){return e.jsx(l.WidgetProvider,{components:[...Ro,...o],modesComponents:s,options:t,storage:Do,loadingComponent:r,children:e.jsx(l.WidgetTriggerProvider,{children:e.jsx(Eo,{})})})}exports.Widget=Oo;
|
|
79
51
|
//# sourceMappingURL=designs.cjs.map
|