@cimulate/copilot-widget 1.22.1 → 1.23.0
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/cimulate-copilot-widget.d.ts +38 -0
- package/dist/cimulate-copilot-widget.es.js +6 -3
- package/dist/cimulate-copilot-widget.umd.js +1 -1
- package/dist/copilot.es.js +6 -3
- package/dist/copilot.umd.js +1 -1
- package/dist/messaging.d.ts +160 -3
- package/dist/messaging.es.js +10368 -10073
- package/dist/messaging.umd.js +36 -36
- package/package.json +1 -1
package/dist/copilot.umd.js
CHANGED
|
@@ -28,7 +28,7 @@ Error generating stack: `+b.message+`
|
|
|
28
28
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
29
29
|
`}),n}function JE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ZE(e,t){const n=kI(e,t),r=n.one(e,void 0),o=yI(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
30
30
|
`},o),a}function RI(e,t){return e&&"run"in e?function(n,r){return Je(this,null,function*(){const o=ZE(n,F({file:r},t));yield e.run(o,r)})}:function(n,r){return ZE(n,F({file:r},e||t))}}function ey(e){if(e)throw e}var rh,ty;function LI(){if(ty)return rh;ty=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var T;for(T in f);return typeof T=="undefined"||e.call(f,T)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return rh=function d(){var f,p,m,T,y,_,w=arguments[0],C=1,A=arguments.length,P=!1;for(typeof w=="boolean"&&(P=w,w=arguments[1]||{},C=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});C<A;++C)if(f=arguments[C],f!=null)for(p in f)m=c(w,p),T=c(f,p),w!==T&&(P&&T&&(a(T)||(y=o(T)))?(y?(y=!1,_=m&&o(m)?m:[]):_=m&&a(m)?m:{},u(w,{name:p,newValue:d(P,_,T)})):typeof T!="undefined"&&u(w,{name:p,newValue:T}));return w},rh}var DI=LI();const ih=Ze(DI);function oh(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 MI(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<o.length;)(f[m]===null||f[m]===void 0)&&(f[m]=o[m]);o=f,p?FI(p,c)(...f):u(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function FI(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return o(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const zr={basename:BI,dirname:UI,extname:HI,join:zI,sep:"/"};function BI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Da(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function UI(e){if(Da(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function HI(e){Da(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function zI(...e){let t=-1,n;for(;++t<e.length;)Da(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":jI(n)}function jI(e){Da(e);const t=e.codePointAt(0)===47;let n=$I(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function $I(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==u-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(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function Da(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const VI={cwd:qI};function qI(){return"/"}function sh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function YI(e){if(typeof e=="string")e=new URL(e);else if(!sh(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 WI(e)}function WI(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 o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ah=["history","path","basename","stem","extname","dirname"];class ny{constructor(t){let n;t?sh(t)?n={path:t}:typeof t=="string"||GI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":VI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ah.length;){const a=ah[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)ah.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?zr.basename(this.path):void 0}set basename(t){lh(t,"basename"),uh(t,"basename"),this.path=zr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?zr.dirname(this.path):void 0}set dirname(t){ry(this.basename,"dirname"),this.path=zr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?zr.extname(this.path):void 0}set extname(t){if(uh(t,"extname"),ry(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=zr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sh(t)&&(t=YI(t)),lh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?zr.basename(this.path,this.extname):void 0}set stem(t){lh(t,"stem"),uh(t,"stem"),this.path=zr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new bn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function uh(e,t){if(e&&e.includes(zr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+zr.sep+"`")}function lh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ry(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function GI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XI=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),KI={}.hasOwnProperty;class ch extends XI{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=MI()}copy(){const t=new ch;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ih(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(hh("data",this.frozen),this.namespace[t]=n,this):KI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(hh("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 o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Dl(t),r=this.parser||this.Parser;return dh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),dh("process",this.parser||this.Parser),fh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=Dl(t),d=r.parse(c);r.run(d,c,function(p,m,T){if(p||!m||!T)return f(p);const y=m,_=r.stringify(y,T);ZI(_)?T.value=_:T.result=_,f(p,T)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),dh("processSync",this.parser||this.Parser),fh("processSync",this.compiler||this.Compiler),this.process(t,o),oy("processSync","process",n),r;function o(a,u){n=!0,ey(a),r=u}}run(t,n,r){iy(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=Dl(n);o.run(t,d,f);function f(p,m,T){const y=m||t;p?c(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),oy("runSync","run",r),o;function a(u,c){ey(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=Dl(n),o=this.compiler||this.Compiler;return fh("stringify",o),iy(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(hh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))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");c(f.plugins),f.settings&&(o.settings=ih(!0,o.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const w=r[T][1];oh(w)&&oh(y)&&(y=ih(!0,w,y)),r[T]=[f,y,..._]}}}}const QI=new ch().freeze();function dh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function hh(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 iy(e){if(!oh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function oy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Dl(e){return JI(e)?e:new ny(e)}function JI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ZI(e){return typeof e=="string"||e3(e)}function e3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const t3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sy=[],ay={allowDangerousHtml:!0},n3=/^(https?|ircs?|mailto|xmpp)$/i,r3=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function uy(e){const t=i3(e),n=o3(e);return s3(t.runSync(t.parse(n),n),e)}function i3(e){const t=e.rehypePlugins||sy,n=e.remarkPlugins||sy,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),ay):ay;return QI().use(UO).use(n).use(RI,r).use(t)}function o3(e){const t=e.children||"",n=new ny;return typeof t=="string"&&(n.value=t),n}function s3(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||a3;for(const p of r3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+t3+p.id,void 0);return Ll(e,f),OP(e,{Fragment:x.Fragment,components:o,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in $f)if(Object.hasOwn($f,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],w=$f[y];(w===null||w.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,T)),y&&T&&typeof m=="number")return c&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function a3(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||n3.test(e.slice(0,t))?e:""}const ly=/[#.]/g;function u3(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){ly.lastIndex=o;const c=ly.exec(n),d=n.slice(o,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function cy(e,t,n){const r=n?f3(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=u3(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,l3(u))c.unshift(u);else for(const[m,T]of Object.entries(u))c3(e,d.properties,m,T)}for(const f of c)ph(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function l3(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 o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function c3(e,t,n,r){const o=Ff(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?o.spaceSeparated?a=eE(r):o.commaSeparated?a=z1(r):o.commaOrSpaceSeparated?a=eE(z1(r).join(" ")):a=dy(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?d3(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(dy(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function ph(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)ph(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?ph(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function dy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Aa(n)===Aa(t)))return!0}return n}function d3(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function f3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const h3=["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"],p3=cy(Sl,"div"),m3=cy(ns,"g",h3);function g3(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=fy(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(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 c=n[n.length-1],d=fy(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function fy(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
31
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const ho={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/"},hy={}.hasOwnProperty,E3=Object.prototype;function y3(e,t){const n=t||{};return mh({file:n.file||void 0,location:!1,schema:n.space==="svg"?ns:Sl,verbose:n.verbose||!1},e)}function mh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ml(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:py(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=g3(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Ml(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ml(e,r,n),n}default:return n=b3(e,t),n}}function py(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=mh(e,t[n]);r.push(o)}return r}function b3(e,t){const n=e.schema;e.schema=t.namespaceURI===ho.svg?ns:Sl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;hy.call(E3,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?m3:p3)(t.tagName,o,py(e,t.childNodes));if(Ml(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&as(d.startTag),p=d&&d.endTag&&as(d.endTag),m=mh(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Ml(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=T3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function T3(e,t,n){const r=as(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)hy.call(n.attrs,u)&&(a[Ff(e.schema,u).property]=as(n.attrs[u]));n.startTag;const c=as(n.startTag),d=n.endTag?as(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function as(e){const t=my({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=my({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function my(e){return e.line&&e.column?e:void 0}class Ma{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ma.prototype.property={},Ma.prototype.normal={},Ma.prototype.space=null;function gy(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Ma(n,r,t)}function gh(e){return e.toLowerCase()}class lr{constructor(t,n){this.property=t,this.attribute=n}}lr.prototype.space=null,lr.prototype.boolean=!1,lr.prototype.booleanish=!1,lr.prototype.overloadedBoolean=!1,lr.prototype.number=!1,lr.prototype.commaSeparated=!1,lr.prototype.spaceSeparated=!1,lr.prototype.commaOrSpaceSeparated=!1,lr.prototype.mustUseProperty=!1,lr.prototype.defined=!1;let _3=0;const Xe=po(),$t=po(),Ey=po(),be=po(),yt=po(),us=po(),Kn=po();function po(){return oa(2,++_3)}const Eh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Xe,booleanish:$t,commaOrSpaceSeparated:Kn,commaSeparated:us,number:be,overloadedBoolean:Ey,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),yh=Object.keys(Eh);class bh extends lr{constructor(t,n,r,o){let a=-1;if(super(t,n),yy(this,"space",o),typeof r=="number")for(;++a<yh.length;){const u=yh[a];yy(this,yh[a],(r&Eh[u])===Eh[u])}}}bh.prototype.defined=!0;function yy(e,t,n){n&&(e[t]=n)}const S3={}.hasOwnProperty;function ls(e){const t={},n={};let r;for(r in e.properties)if(S3.call(e.properties,r)){const o=e.properties[r],a=new bh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[gh(r)]=r,n[gh(a.attribute)]=r}return new Ma(t,n,e.space)}const by=ls({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}}),Ty=ls({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function _y(e,t){return t in e?e[t]:t}function Sy(e,t){return _y(e,t.toLowerCase())}const xy=ls({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Sy,properties:{xmlns:null,xmlnsXLink:null}}),wy=ls({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:$t,ariaAutoComplete:null,ariaBusy:$t,ariaChecked:$t,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:$t,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:$t,ariaFlowTo:yt,ariaGrabbed:$t,ariaHasPopup:null,ariaHidden:$t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:be,ariaLive:null,ariaModal:$t,ariaMultiLine:$t,ariaMultiSelectable:$t,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:$t,ariaReadOnly:$t,ariaRelevant:null,ariaRequired:$t,ariaRoleDescription:yt,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:$t,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null}}),x3=ls({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Sy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:us,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Xe,allowPaymentRequest:Xe,allowUserMedia:Xe,alt:null,as:null,async:Xe,autoCapitalize:null,autoComplete:yt,autoFocus:Xe,autoPlay:Xe,blocking:yt,capture:null,charSet:null,checked:Xe,cite:null,className:yt,cols:be,colSpan:null,content:null,contentEditable:$t,controls:Xe,controlsList:yt,coords:be|us,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xe,defer:Xe,dir:null,dirName:null,disabled:Xe,download:Ey,draggable:$t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xe,formTarget:null,headers:yt,height:be,hidden:Xe,high:be,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Xe,inputMode:null,integrity:null,is:null,isMap:Xe,itemId:null,itemProp:yt,itemRef:yt,itemScope:Xe,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xe,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Xe,muted:Xe,name:null,nonce:null,noModule:Xe,noValidate:Xe,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:Xe,optimum:be,pattern:null,ping:yt,placeholder:null,playsInline:Xe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xe,referrerPolicy:null,rel:yt,required:Xe,reversed:Xe,rows:be,rowSpan:be,sandbox:yt,scope:null,scoped:Xe,seamless:Xe,selected:Xe,shadowRootClonable:Xe,shadowRootDelegatesFocus:Xe,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:$t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Xe,useMap:null,value:$t,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xe,declare:Xe,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Xe,noHref:Xe,noShade:Xe,noWrap:Xe,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:$t,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Xe,disableRemotePlayback:Xe,prefix:null,property:null,results:be,security:null,unselectable:null}}),w3=ls({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:_y,properties:{about:Kn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:yt,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:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Xe,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,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:us,g2:us,glyphName:us,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:Kn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,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:be,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:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kn,rev:Kn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kn,requiredFeatures:Kn,requiredFonts:Kn,requiredFormats:Kn,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:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:Kn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),A3=/^data[-\w.:]+$/i,Ay=/-[a-z]/g,v3=/[A-Z]/g;function C3(e,t){const n=gh(t);let r=t,o=lr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&A3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ay,P3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ay.test(a)){let u=a.replace(v3,k3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=bh}return new o(r,t)}function k3(e){return"-"+e.toLowerCase()}function P3(e){return e.charAt(1).toUpperCase()}const N3=gy([Ty,by,xy,wy,x3],"html"),vy=gy([Ty,by,xy,wy,w3],"svg"),Cy={}.hasOwnProperty;function ky(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&Cy.call(o,e)){const d=String(o[e]);u=Cy.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const O3={},I3={}.hasOwnProperty,Py=ky("type",{handlers:{root:L3,element:U3,text:F3,comment:B3,doctype:M3}});function R3(e,t){const r=(t||O3).space;return Py(e,r==="svg"?vy:N3)}function L3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Th(e.children,n,t),cs(e,n),n}function D3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Th(e.children,n,t),cs(e,n),n}function M3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return cs(e,t),t}function F3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return cs(e,t),t}function B3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return cs(e,t),t}function U3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=vy);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&I3.call(e.properties,a)){const d=H3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:ho[u],childNodes:[],parentNode:null};return c.childNodes=Th(e.children,c,r),cs(e,c),e.tagName==="template"&&e.content&&(c.content=D3(e.content,r)),c}function H3(e,t,n){const r=C3(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?j1(n):tE(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=ho[r.space]}return o}function Th(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Py(e[r],n);a.parentNode=t,o.push(a)}return o}function cs(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 z3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],j3=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),vt="�";var N;(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"})(N||(N={}));const Bn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ny(e){return e>=55296&&e<=57343}function $3(e){return e>=56320&&e<=57343}function V3(e,t){return(e-55296)*1024+9216+t}function Oy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Iy(e){return e>=64976&&e<=65007||j3.has(e)}var te;(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"})(te||(te={}));const q3=65536;class Y3{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=q3,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:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_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($3(n))return this.pos++,this._addGap(),V3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(te.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,N.EOF;const r=this.html.charCodeAt(n);return r===N.CARRIAGE_RETURN?N.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,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ny(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Oy(t)?this._err(te.controlCharacterInInputStream):Iy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Qe;(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"})(Qe||(Qe={}));function Ry(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 W3=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))),G3=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function X3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=G3.get(e))!==null&&t!==void 0?t:e}var Zt;(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"})(Zt||(Zt={}));const K3=32;var Ni;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ni||(Ni={}));function _h(e){return e>=Zt.ZERO&&e<=Zt.NINE}function Q3(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_F||e>=Zt.LOWER_A&&e<=Zt.LOWER_F}function J3(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_Z||e>=Zt.LOWER_A&&e<=Zt.LOWER_Z||_h(e)}function Z3(e){return e===Zt.EQUALS||J3(e)}var en;(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"})(en||(en={}));var di;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(di||(di={}));class eR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=en.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=di.Strict}startEntity(t){this.decodeMode=t,this.state=en.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case en.EntityStart:return t.charCodeAt(n)===Zt.NUM?(this.state=en.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=en.NamedEntity,this.stateNamedEntity(t,n));case en.NumericStart:return this.stateNumericStart(t,n);case en.NumericDecimal:return this.stateNumericDecimal(t,n);case en.NumericHex:return this.stateNumericHex(t,n);case en.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|K3)===Zt.LOWER_X?(this.state=en.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=en.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(_h(o)||Q3(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(_h(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,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===Zt.SEMI)this.consumed+=1;else if(this.decodeMode===di.Strict)return 0;return this.emitCodePoint(X3(this.result),this.consumed),this.errors&&(t!==Zt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&Ni.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=tR(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===di.Attribute&&(a===0||Z3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Ni.VALUE_LENGTH)>>14,a!==0){if(u===Zt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==di.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Ni.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Ni.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case en.NamedEntity:return this.result!==0&&(this.decodeMode!==di.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case en.NumericDecimal:return this.emitNumericEntity(0,2);case en.NumericHex:return this.emitNumericEntity(0,3);case en.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case en.EntityStart:return 0}}}function tR(e,t,n,r){const o=(t&Ni.BRANCH_LENGTH)>>7,a=t&Ni.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+o]}return-1}var ue;(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/"})(ue||(ue={}));var mo;(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"})(mo||(mo={}));var cr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(cr||(cr={}));var X;(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"})(X||(X={}));var g;(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"})(g||(g={}));const nR=new Map([[X.A,g.A],[X.ADDRESS,g.ADDRESS],[X.ANNOTATION_XML,g.ANNOTATION_XML],[X.APPLET,g.APPLET],[X.AREA,g.AREA],[X.ARTICLE,g.ARTICLE],[X.ASIDE,g.ASIDE],[X.B,g.B],[X.BASE,g.BASE],[X.BASEFONT,g.BASEFONT],[X.BGSOUND,g.BGSOUND],[X.BIG,g.BIG],[X.BLOCKQUOTE,g.BLOCKQUOTE],[X.BODY,g.BODY],[X.BR,g.BR],[X.BUTTON,g.BUTTON],[X.CAPTION,g.CAPTION],[X.CENTER,g.CENTER],[X.CODE,g.CODE],[X.COL,g.COL],[X.COLGROUP,g.COLGROUP],[X.DD,g.DD],[X.DESC,g.DESC],[X.DETAILS,g.DETAILS],[X.DIALOG,g.DIALOG],[X.DIR,g.DIR],[X.DIV,g.DIV],[X.DL,g.DL],[X.DT,g.DT],[X.EM,g.EM],[X.EMBED,g.EMBED],[X.FIELDSET,g.FIELDSET],[X.FIGCAPTION,g.FIGCAPTION],[X.FIGURE,g.FIGURE],[X.FONT,g.FONT],[X.FOOTER,g.FOOTER],[X.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[X.FORM,g.FORM],[X.FRAME,g.FRAME],[X.FRAMESET,g.FRAMESET],[X.H1,g.H1],[X.H2,g.H2],[X.H3,g.H3],[X.H4,g.H4],[X.H5,g.H5],[X.H6,g.H6],[X.HEAD,g.HEAD],[X.HEADER,g.HEADER],[X.HGROUP,g.HGROUP],[X.HR,g.HR],[X.HTML,g.HTML],[X.I,g.I],[X.IMG,g.IMG],[X.IMAGE,g.IMAGE],[X.INPUT,g.INPUT],[X.IFRAME,g.IFRAME],[X.KEYGEN,g.KEYGEN],[X.LABEL,g.LABEL],[X.LI,g.LI],[X.LINK,g.LINK],[X.LISTING,g.LISTING],[X.MAIN,g.MAIN],[X.MALIGNMARK,g.MALIGNMARK],[X.MARQUEE,g.MARQUEE],[X.MATH,g.MATH],[X.MENU,g.MENU],[X.META,g.META],[X.MGLYPH,g.MGLYPH],[X.MI,g.MI],[X.MO,g.MO],[X.MN,g.MN],[X.MS,g.MS],[X.MTEXT,g.MTEXT],[X.NAV,g.NAV],[X.NOBR,g.NOBR],[X.NOFRAMES,g.NOFRAMES],[X.NOEMBED,g.NOEMBED],[X.NOSCRIPT,g.NOSCRIPT],[X.OBJECT,g.OBJECT],[X.OL,g.OL],[X.OPTGROUP,g.OPTGROUP],[X.OPTION,g.OPTION],[X.P,g.P],[X.PARAM,g.PARAM],[X.PLAINTEXT,g.PLAINTEXT],[X.PRE,g.PRE],[X.RB,g.RB],[X.RP,g.RP],[X.RT,g.RT],[X.RTC,g.RTC],[X.RUBY,g.RUBY],[X.S,g.S],[X.SCRIPT,g.SCRIPT],[X.SEARCH,g.SEARCH],[X.SECTION,g.SECTION],[X.SELECT,g.SELECT],[X.SOURCE,g.SOURCE],[X.SMALL,g.SMALL],[X.SPAN,g.SPAN],[X.STRIKE,g.STRIKE],[X.STRONG,g.STRONG],[X.STYLE,g.STYLE],[X.SUB,g.SUB],[X.SUMMARY,g.SUMMARY],[X.SUP,g.SUP],[X.TABLE,g.TABLE],[X.TBODY,g.TBODY],[X.TEMPLATE,g.TEMPLATE],[X.TEXTAREA,g.TEXTAREA],[X.TFOOT,g.TFOOT],[X.TD,g.TD],[X.TH,g.TH],[X.THEAD,g.THEAD],[X.TITLE,g.TITLE],[X.TR,g.TR],[X.TRACK,g.TRACK],[X.TT,g.TT],[X.U,g.U],[X.UL,g.UL],[X.SVG,g.SVG],[X.VAR,g.VAR],[X.WBR,g.WBR],[X.XMP,g.XMP]]);function ds(e){var t;return(t=nR.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const fe=g,rR={[ue.HTML]:new Set([fe.ADDRESS,fe.APPLET,fe.AREA,fe.ARTICLE,fe.ASIDE,fe.BASE,fe.BASEFONT,fe.BGSOUND,fe.BLOCKQUOTE,fe.BODY,fe.BR,fe.BUTTON,fe.CAPTION,fe.CENTER,fe.COL,fe.COLGROUP,fe.DD,fe.DETAILS,fe.DIR,fe.DIV,fe.DL,fe.DT,fe.EMBED,fe.FIELDSET,fe.FIGCAPTION,fe.FIGURE,fe.FOOTER,fe.FORM,fe.FRAME,fe.FRAMESET,fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6,fe.HEAD,fe.HEADER,fe.HGROUP,fe.HR,fe.HTML,fe.IFRAME,fe.IMG,fe.INPUT,fe.LI,fe.LINK,fe.LISTING,fe.MAIN,fe.MARQUEE,fe.MENU,fe.META,fe.NAV,fe.NOEMBED,fe.NOFRAMES,fe.NOSCRIPT,fe.OBJECT,fe.OL,fe.P,fe.PARAM,fe.PLAINTEXT,fe.PRE,fe.SCRIPT,fe.SECTION,fe.SELECT,fe.SOURCE,fe.STYLE,fe.SUMMARY,fe.TABLE,fe.TBODY,fe.TD,fe.TEMPLATE,fe.TEXTAREA,fe.TFOOT,fe.TH,fe.THEAD,fe.TITLE,fe.TR,fe.TRACK,fe.UL,fe.WBR,fe.XMP]),[ue.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[ue.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[ue.XLINK]:new Set,[ue.XML]:new Set,[ue.XMLNS]:new Set},Sh=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var O;(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"})(O||(O={}));const Ft={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function iR(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Fa(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function oR(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function Oi(e){return oR(e)||Fa(e)}function Ly(e){return Oi(e)||iR(e)}function Fl(e){return e+32}function Dy(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function My(e){return Dy(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function sR(e){return e===N.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:Ny(e)?te.surrogateCharacterReference:Iy(e)?te.noncharacterCharacterReference:Oy(e)||e===N.CARRIAGE_RETURN?te.controlCharacterReference:null}class aR{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=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Y3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new eR(W3,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=sR(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.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:Qe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Qe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Qe.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(Ry(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.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=ds(t.tagName),t.type===Qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.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 Qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Qe.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:Qe.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=Dy(t)?Qe.WHITESPACE_CHARACTER:t===N.NULL?Qe.NULL_CHARACTER:Qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?di.Attribute:di.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=O.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Oi(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Oi(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=O.DATA;break}case N.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=vt;break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Fa(t)?Fl(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Oi(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=O.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Oi(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Oi(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Oi(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Oi(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Bn.SCRIPT,!1)&&My(this.preprocessor.peek(Bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Bn.SCRIPT,!1)&&My(this.preprocessor.peek(Bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=vt;break}default:this.currentAttr.name+=String.fromCodePoint(Fa(t)?Fl(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.data+=vt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Bn.DASH_DASH,!0)?(this._createCommentToken(Bn.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(Bn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Bn.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(Bn.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Bn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.data+=vt;break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(te.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=O.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Fa(t))this._createDoctypeToken(String.fromCharCode(Fl(t))),this.state=O.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(vt),this.state=O.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.EOF:{this._err(te.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=O.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.name+=vt;break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Fa(t)?Fl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Bn.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Bn.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.EOF:{this._err(te.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 N.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.EOF:{this._err(te.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.EOF:{this._err(te.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 N.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.EOF:{this._err(te.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.NULL:{this._err(te.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=O.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.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(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ly(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ly(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Fy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),By=new Set([...Fy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Bl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),uR=new Set([...Bl,g.OL,g.UL]),lR=new Set([...Bl,g.BUTTON]),Uy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Hy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),cR=new Set([g.TR,g.TEMPLATE,g.HTML]),dR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),fR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),hR=new Set([g.TD,g.TH]);class pR{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=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ue.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 o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===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])!==ue.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Sh,ue.HTML)}popUntilTableCellPopped(){this.popUntilPopped(hR,ue.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(fR,ue.HTML)}clearBackToTableBodyContext(){this.clearBackTo(dR,ue.HTML)}clearBackToTableRowContext(){this.clearBackTo(cR,ue.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]===g.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]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ue.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ue.SVG:{if(Hy.has(o))return!1;break}case ue.MATHML:{if(Uy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Bl)}hasInListItemScope(t){return this.hasInDynamicScope(t,uR)}hasInButtonScope(t){return this.hasInDynamicScope(t,lR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ue.HTML:{if(Sh.has(n))return!0;if(Bl.has(n))return!1;break}case ue.SVG:{if(Hy.has(n))return!1;break}case ue.MATHML:{if(Uy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ue.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ue.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ue.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Fy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&By.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&By.has(this.currentTagId);)this.pop()}}const xh=3;var jr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(jr||(jr={}));const zy={type:jr.Marker};class mR{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===jr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<xh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<xh)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=xh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(zy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:jr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:jr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(zy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===jr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===jr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===jr.Element&&n.element===t)}}const Ii={createDocument(){return{nodeName:"#document",mode:cr.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 o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ii.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(Ii.isTextNode(n)){n.value+=t;return}}Ii.appendChild(e,Ii.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ii.isTextNode(r)?r.value+=t:Ii.insertBefore(e,Ii.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=F(F({},e.sourceCodeLocation),t)}},jy="html",gR="about:legacy-compat",ER="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",$y=["+//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//"],yR=[...$y,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],bR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Vy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],TR=[...Vy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function qy(e,t){return t.some(n=>e.startsWith(n))}function _R(e){return e.name===jy&&e.publicId===null&&(e.systemId===null||e.systemId===gR)}function SR(e){if(e.name!==jy)return cr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===ER)return cr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),bR.has(n))return cr.QUIRKS;let r=t===null?yR:$y;if(qy(n,r))return cr.QUIRKS;if(r=t===null?Vy:TR,qy(n,r))return cr.LIMITED_QUIRKS}return cr.NO_QUIRKS}const Yy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},xR="definitionurl",wR="definitionURL",AR=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])),vR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ue.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ue.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ue.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ue.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ue.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ue.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ue.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ue.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ue.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ue.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ue.XMLNS}]]),CR=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])),kR=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function PR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===mo.COLOR||r===mo.SIZE||r===mo.FACE)||kR.has(t)}function Wy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===xR){e.attrs[t].name=wR;break}}function Gy(e){for(let t=0;t<e.attrs.length;t++){const n=AR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function wh(e){for(let t=0;t<e.attrs.length;t++){const n=vR.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 NR(e){const t=CR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ds(e.tagName))}function OR(e,t){return t===ue.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function IR(e,t,n){if(t===ue.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===mo.ENCODING){const o=n[r].value.toLowerCase();return o===Yy.TEXT_HTML||o===Yy.APPLICATION_XML}}return t===ue.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function RR(e,t,n,r){return(!r||r===ue.HTML)&&IR(e,t,n)||(!r||r===ue.MATHML)&&OR(e,t)}const LR="hidden",DR=8,MR=3;var M;(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"})(M||(M={}));const FR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Xy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Ky={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ii,onParseError:null};class Qy{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.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=F(F({},Ky),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new aR(this.options,this),this.activeFormattingElements=new mR(this.treeAdapter),this.fragmentContextID=r?ds(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new pR(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=F(F({},Ky),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,ue.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ue.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.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 o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:FR,u={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(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ue.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ue.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=Ft.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)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ue.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Ft.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ft.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ft.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ft.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&pe(F({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,ue.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ue.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(X.HTML,ue.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,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,o=this.treeAdapter.getTagName(t),a=n.type===Qe.END_TAG&&o===n.tagName?{endTag:F({},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===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ue.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ue.HTML)}_processToken(t){switch(t.type){case Qe.CHARACTER:{this.onCharacter(t);break}case Qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Qe.COMMENT:{this.onComment(t);break}case Qe.DOCTYPE:{this.onDoctype(t);break}case Qe.START_TAG:{this._processStartTag(t);break}case Qe.END_TAG:{this.onEndTag(t);break}case Qe.EOF:{this.onEof(t);break}case Qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return RR(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===jr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];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=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=M.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=M.IN_TABLE;return}case g.BODY:{this.insertionMode=M.IN_BODY;return}case g.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return Xy.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ue.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.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 rR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){h6(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{Ua(this,t);break}case M.BEFORE_HEAD:{Ha(this,t);break}case M.IN_HEAD:{za(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ja(this,t);break}case M.AFTER_HEAD:{$a(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{Zy(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{kh(this,t);break}case M.IN_TABLE_TEXT:{ab(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){f6(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{Ua(this,t);break}case M.BEFORE_HEAD:{Ha(this,t);break}case M.IN_HEAD:{za(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ja(this,t);break}case M.AFTER_HEAD:{$a(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{kh(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){vh(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{vh(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.AFTER_BODY:{VR(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{qR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{YR(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?p6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{WR(this,t);break}case M.BEFORE_HEAD:{XR(this,t);break}case M.IN_HEAD:{wr(this,t);break}case M.IN_HEAD_NO_SCRIPT:{JR(this,t);break}case M.AFTER_HEAD:{eL(this,t);break}case M.IN_BODY:{_n(this,t);break}case M.IN_TABLE:{fs(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.IN_CAPTION:{KL(this,t);break}case M.IN_COLUMN_GROUP:{Ph(this,t);break}case M.IN_TABLE_BODY:{jl(this,t);break}case M.IN_ROW:{$l(this,t);break}case M.IN_CELL:{ZL(this,t);break}case M.IN_SELECT:{cb(this,t);break}case M.IN_SELECT_IN_TABLE:{t6(this,t);break}case M.IN_TEMPLATE:{r6(this,t);break}case M.AFTER_BODY:{o6(this,t);break}case M.IN_FRAMESET:{s6(this,t);break}case M.AFTER_FRAMESET:{u6(this,t);break}case M.AFTER_AFTER_BODY:{c6(this,t);break}case M.AFTER_AFTER_FRAMESET:{d6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?m6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{GR(this,t);break}case M.BEFORE_HEAD:{KR(this,t);break}case M.IN_HEAD:{QR(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ZR(this,t);break}case M.AFTER_HEAD:{tL(this,t);break}case M.IN_BODY:{Hl(this,t);break}case M.TEXT:{HL(this,t);break}case M.IN_TABLE:{Va(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.IN_CAPTION:{QL(this,t);break}case M.IN_COLUMN_GROUP:{JL(this,t);break}case M.IN_TABLE_BODY:{Nh(this,t);break}case M.IN_ROW:{lb(this,t);break}case M.IN_CELL:{e6(this,t);break}case M.IN_SELECT:{db(this,t);break}case M.IN_SELECT_IN_TABLE:{n6(this,t);break}case M.IN_TEMPLATE:{i6(this,t);break}case M.AFTER_BODY:{hb(this,t);break}case M.IN_FRAMESET:{a6(this,t);break}case M.AFTER_FRAMESET:{l6(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{Ua(this,t);break}case M.BEFORE_HEAD:{Ha(this,t);break}case M.IN_HEAD:{za(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ja(this,t);break}case M.AFTER_HEAD:{$a(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{ob(this,t);break}case M.TEXT:{zL(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.IN_TEMPLATE:{fb(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Ch(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.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 M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Jy(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{kh(this,t);break}case M.IN_TABLE_TEXT:{sb(this,t);break}}}}function BR(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):ib(e,t),n}function UR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function HR(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=MR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=zR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function zR(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 jR(e,t,n){const r=e.treeAdapter.getTagName(t),o=ds(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===ue.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function $R(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function Ah(e,t){for(let n=0;n<DR;n++){const r=BR(e,t);if(!r)break;const o=UR(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=HR(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&jR(e,u,a),$R(e,o,r)}}function vh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function VR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function qR(e,t){e._appendCommentNode(t,e.document)}function Ch(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],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function YR(e,t){e._setDocumentType(t);const n=t.forceQuirks?cr.QUIRKS:SR(t);_R(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Ba(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,cr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function WR(e,t){t.tagID===g.HTML?(e._insertElement(t,ue.HTML),e.insertionMode=M.BEFORE_HEAD):Ua(e,t)}function GR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ua(e,t)}function Ua(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function XR(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.HEAD:{e._insertElement(t,ue.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:Ha(e,t)}}function KR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Ha(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ha(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function wr(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Ft.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ft.RAWTEXT):(e._insertElement(t,ue.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ft.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ft.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:za(e,t)}}function QR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{za(e,t);break}case g.TEMPLATE:{go(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function go(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function za(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function JR(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{wr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:ja(e,t)}}function ZR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{ja(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function ja(e,t){const n=t.type===Qe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function eL(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.BODY:{e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ue.HTML),e.insertionMode=M.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),wr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:$a(e,t)}}function tL(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{$a(e,t);break}case g.TEMPLATE:{go(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function $a(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Ul(e,t)}function Ul(e,t){switch(t.type){case Qe.CHARACTER:{Zy(e,t);break}case Qe.WHITESPACE_CHARACTER:{Jy(e,t);break}case Qe.COMMENT:{vh(e,t);break}case Qe.START_TAG:{_n(e,t);break}case Qe.END_TAG:{Hl(e,t);break}case Qe.EOF:{ob(e,t);break}}}function Jy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Zy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function nL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function rL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function iL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_FRAMESET)}function oL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML)}function sL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Sh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ue.HTML)}function aL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function uL(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),n||(e.formElement=e.openElements.current))}function lL(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===g.LI&&o===g.LI||(n===g.DD||n===g.DT)&&(o===g.DD||o===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==g.ADDRESS&&o!==g.DIV&&o!==g.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML)}function cL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.tokenizer.state=Ft.PLAINTEXT}function dL(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.framesetOk=!1}function fL(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Ah(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pL(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Ah(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function gL(e,t){e.treeAdapter.getDocumentMode(e.document)!==cr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function eb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ue.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function tb(e){const t=Ry(e,mo.TYPE);return t!=null&&t.toLowerCase()===LR}function EL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ue.HTML),tb(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function yL(e,t){e._appendElement(t,ue.HTML),t.ackSelfClosing=!0}function bL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ue.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TL(e,t){t.tagName=X.IMG,t.tagID=g.IMG,eb(e,t)}function _L(e,t){e._insertElement(t,ue.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ft.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function SL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function xL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function nb(e,t){e._switchToTextParsing(t,Ft.RAWTEXT)}function wL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function AL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML)}function vL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ue.HTML)}function CL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ue.HTML)}function kL(e,t){e._reconstructActiveFormattingElements(),Wy(t),wh(t),t.selfClosing?e._appendElement(t,ue.MATHML):e._insertElement(t,ue.MATHML),t.ackSelfClosing=!0}function PL(e,t){e._reconstructActiveFormattingElements(),Gy(t),wh(t),t.selfClosing?e._appendElement(t,ue.SVG):e._insertElement(t,ue.SVG),t.ackSelfClosing=!0}function rb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML)}function _n(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{hL(e,t);break}case g.A:{fL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{sL(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{oL(e,t);break}case g.LI:case g.DD:case g.DT:{lL(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{eb(e,t);break}case g.HR:{bL(e,t);break}case g.RB:case g.RTC:{vL(e,t);break}case g.RT:case g.RP:{CL(e,t);break}case g.PRE:case g.LISTING:{aL(e,t);break}case g.XMP:{SL(e,t);break}case g.SVG:{PL(e,t);break}case g.HTML:{nL(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{wr(e,t);break}case g.BODY:{rL(e,t);break}case g.FORM:{uL(e,t);break}case g.NOBR:{pL(e,t);break}case g.MATH:{kL(e,t);break}case g.TABLE:{gL(e,t);break}case g.INPUT:{EL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{yL(e,t);break}case g.IMAGE:{TL(e,t);break}case g.BUTTON:{dL(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{mL(e,t);break}case g.IFRAME:{xL(e,t);break}case g.SELECT:{wL(e,t);break}case g.OPTION:case g.OPTGROUP:{AL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{nb(e,t);break}case g.FRAMESET:{iL(e,t);break}case g.TEXTAREA:{_L(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?nb(e,t):rb(e,t);break}case g.PLAINTEXT:{cL(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:rb(e,t)}}function NL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function OL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,hb(e,t))}function IL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function RL(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function LL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function DL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function ML(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function FL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function BL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function UL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function ib(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Hl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{Ah(e,t);break}case g.P:{LL(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{IL(e,t);break}case g.LI:{DL(e);break}case g.DD:case g.DT:{ML(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{FL(e);break}case g.BR:{UL(e);break}case g.BODY:{NL(e,t);break}case g.HTML:{OL(e,t);break}case g.FORM:{RL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{BL(e,t);break}case g.TEMPLATE:{go(e,t);break}default:ib(e,t)}}function ob(e,t){e.tmplInsertionModeStack.length>0?fb(e,t):Ch(e,t)}function HL(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function zL(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function kh(e,t){if(e.openElements.currentTagId!==void 0&&Xy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Qe.CHARACTER:{ab(e,t);break}case Qe.WHITESPACE_CHARACTER:{sb(e,t);break}}else qa(e,t)}function jL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_CAPTION}function $L(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function VL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t)}function qL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_TABLE_BODY}function YL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,jl(e,t)}function WL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function GL(e,t){tb(t)?e._appendElement(t,ue.HTML):qa(e,t),t.ackSelfClosing=!0}function XL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ue.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function fs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{YL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{wr(e,t);break}case g.COL:{VL(e,t);break}case g.FORM:{XL(e,t);break}case g.TABLE:{WL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{qL(e,t);break}case g.INPUT:{GL(e,t);break}case g.CAPTION:{jL(e,t);break}case g.COLGROUP:{$L(e,t);break}default:qa(e,t)}}function Va(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{go(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:qa(e,t)}}function qa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ul(e,t),e.fosterParentingEnabled=n}function sb(e,t){e.pendingCharacterTokens.push(t)}function ab(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ya(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)qa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ub=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function KL(e,t){const n=t.tagID;ub.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,fs(e,t)):_n(e,t)}function QL(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===g.TABLE&&Va(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Hl(e,t)}}function Ph(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.COL:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{wr(e,t);break}default:zl(e,t)}}function JL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TEMPLATE:{go(e,t);break}case g.COL:break;default:zl(e,t)}}function zl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function jl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=M.IN_ROW,$l(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,fs(e,t));break}default:fs(e,t)}}function Nh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Va(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:Va(e,t)}}function $l(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,jl(e,t));break}default:fs(e,t)}}function lb(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Nh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Nh(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Va(e,t)}}function ZL(e,t){const n=t.tagID;ub.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),$l(e,t)):_n(e,t)}function e6(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),lb(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Hl(e,t)}}function cb(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,ue.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ue.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{wr(e,t);break}}}function db(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{go(e,t);break}}}function t6(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):cb(e,t)}function n6(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):db(e,t)}function r6(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{wr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,fs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,jl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,$l(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,_n(e,t)}}function i6(e,t){t.tagID===g.TEMPLATE&&go(e,t)}function fb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ch(e,t)}function o6(e,t){t.tagID===g.HTML?_n(e,t):Vl(e,t)}function hb(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.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 Vl(e,t)}function Vl(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function s6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.FRAMESET:{e._insertElement(t,ue.HTML);break}case g.FRAME:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{wr(e,t);break}}}function a6(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function u6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.NOFRAMES:{wr(e,t);break}}}function l6(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function c6(e,t){t.tagID===g.HTML?_n(e,t):ql(e,t)}function ql(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function d6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.NOFRAMES:{wr(e,t);break}}}function f6(e,t){t.chars=vt,e._insertCharacters(t)}function h6(e,t){e._insertCharacters(t),e.framesetOk=!1}function pb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ue.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function p6(e,t){if(PR(t))pb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ue.MATHML?Wy(t):r===ue.SVG&&(NR(t),Gy(t)),wh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function m6(e,t){if(t.tagID===g.P||t.tagID===g.BR){pb(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)===ue.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const g6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,E6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),mb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function gb(e,t){const n=C6(e),r=ky("type",{handlers:{root:y6,element:b6,text:T6,comment:yb,doctype:_6,raw:x6},unknown:w6}),o={parser:n?new Qy(mb):Qy.getFragmentParser(void 0,mb),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),hs(o,Hr());const a=n?o.parser.document:o.parser.getFragment(),u=y3(a,{file:o.options.file});return o.stitches&&Ll(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Eb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function y6(e,t){Eb(e.children,t)}function b6(e,t){A6(e,t),Eb(e.children,t),v6(e,t)}function T6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Qe.CHARACTER,chars:e.value,location:Wa(e)};hs(t,Hr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function _6(e,t){const n={type:Qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Wa(e)};hs(t,Hr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function S6(e,t){t.stitches=!0;const n=k6(e);if("children"in e&&"children"in n){const r=gb({type:"root",children:e.children},t.options);n.children=r.children}yb({type:"comment",value:{stitch:n}},t)}function yb(e,t){const n=e.value,r={type:Qe.COMMENT,data:n,location:Wa(e)};hs(t,Hr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function x6(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,bb(t,Hr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(g6,"<$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 w6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))S6(n,t);else{let r="";throw E6.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 hs(e,t){bb(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=Ft.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 bb(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 A6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ft.PLAINTEXT)return;hs(t,Hr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:ho.html;o===ho.html&&n==="svg"&&(o=ho.svg);const a=R3(pe(F({},e),{children:[]}),{space:o===ho.svg?"svg":"html"}),u={type:Qe.START_TAG,tagName:n,tagID:ds(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Wa(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function v6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&z3.includes(n)||t.parser.tokenizer.state===Ft.PLAINTEXT)return;hs(t,xl(e));const r={type:Qe.END_TAG,tagName:n,tagID:ds(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Wa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ft.RCDATA||t.parser.tokenizer.state===Ft.RAWTEXT||t.parser.tokenizer.state===Ft.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ft.DATA)}function C6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Wa(e){const t=Hr(e)||{line:void 0,column:void 0,offset:void 0},n=xl(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 k6(e){return"children"in e?fo(pe(F({},e),{children:[]})):fo(e)}function Tb(e){return function(t,n){return gb(t,pe(F({},e),{file:n}))}}const Eo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],_b={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Eo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Eo],h2:[["className","sr-only"]],img:[...Eo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Eo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Eo],table:[...Eo],ul:[...Eo,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Ri={}.hasOwnProperty;function P6(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},_b),t):_b,stack:[]},o=Sb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Sb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return N6(e,n);case"doctype":return O6(e,n);case"element":return I6(e,n);case"root":return R6(e,n);case"text":return L6(e,n)}}}function N6(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Ga(a,t),a}}function O6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ga(n,t),n}}function I6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=xb(e,t.children),o=D6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Ri.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Ga(u,t),u}function R6(e,t){const r={type:"root",children:xb(e,t.children)};return Ga(r,t),r}function L6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ga(r,t),r}function xb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Sb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function D6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ri.call(r,n)?r[n]:void 0,u=r&&Ri.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ri.call(c,f)){const p=c[f];let m=wb(e,vb(a,f),f,p);m==null&&(m=wb(e,vb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Ri.call(o,n)){const p=o[n];for(f in p)Ri.call(p,f)&&!Ri.call(d,f)&&(d[f]=p[f])}return d}function wb(e,t,n,r){return t?Array.isArray(r)?M6(e,t,n,r):Ab(e,t,n,r):void 0}function M6(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Ab(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Ab(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&F6(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function F6(e,t,n){const r=e.schema.protocols&&Ri.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function Ga(e,t){const n=aE(t);t.data&&(e.data=fo(t.data)),n&&(e.position=n)}function vb(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function B6(e){return function(t){return P6(t,e)}}const Cb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return x.jsx("a",pe(F(F({className:W(e,`${z}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},U6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=rt();return!e&&!t?null:x.jsx("div",{className:W(n,`${z}-disclaimer`),children:t?x.jsx(uy,{rehypePlugins:[Tb,B6],components:{ul:({children:r})=>x.jsx("ul",{className:W(n,`${z}-ul`),children:r}),ol:({children:r})=>x.jsx("ol",{className:W(n,`${z}-ol`),children:r}),li:({children:r})=>x.jsx("li",{className:W(n,`${z}-li`),children:r}),a:({href:r,title:o,children:a})=>x.jsx(Cb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>x.jsx("img",{className:W(n,`${z}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>x.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>x.jsx("span",{className:W(n,`${z}-disclaimer-text-span`),children:r})},children:t}):x.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:e})})},Oh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=ar(),{setImageFile:u}=Qo(),{logger:c,globalClassName:d,searchConfig:f,features:p}=rt(),m=B.useRef(null),T=B.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",w=!!o||!1,C=w?"connected":"disconnected",A=t||!w,P=()=>a?new Promise((D,q)=>{const re=new FileReader;re.readAsDataURL(a),re.onload=()=>D(re.result),re.onerror=me=>q(me)}):Promise.resolve(""),v=D=>Je(null,null,function*(){var me;if(A)return;const q=10*1024*1024,re=(me=D.target.files)==null?void 0:me[0];if(re){if(re.size>q){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(re)}}),H=()=>{u(null),T.current&&(T.current.value="")},Y=D=>Je(null,null,function*(){var me;D.preventDefault();const q=(((me=m.current)==null?void 0:me.value)||"").trim();let re="";try{re=yield P()}catch(V){c==null||c.error("Error converting file to base64:",V),alert("There was an error processing the file. Please try again.");return}q&&(H(),m.current.value="",r(q,re))});return x.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&x.jsxs("div",{className:W(d,`cim-${n}-component`,`${z}-image-file-preview`),children:[x.jsx("img",{className:W(d,`cim-${n}-component`,`${z}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),x.jsx("span",{className:W(d,`cim-${n}-component`,`${z}-image-file-name`),title:_,children:_}),x.jsx(H1,{className:W(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:H})]}),x.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:Y,children:[x.jsx("span",{role:"status",className:W(`${z}-connection-status-icon`,C)}),y&&x.jsxs("div",{role:"button",className:W(d,e,`cim-${n}-component`,A&&"disabled",`${z}-image-upload-button`),"aria-disabled":A,tabIndex:0,children:[x.jsx("label",{className:W(d,e,`cim-${n}-component`,A&&"disabled",`${z}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:x.jsx(tP,{})}),x.jsx("input",{className:W(d,e,`cim-${n}-component`,`${z}-file-input`),type:"file",ref:T,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${z}-file-input`,disabled:A,onInput:v})]}),x.jsx("input",{className:W(d,e,`cim-${n}-component`,`${z}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,name:`${z}-user-input`}),x.jsx(aP,{isLoading:A}),x.jsx(iP,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:A})]}),x.jsx(U6,{})]})};function H6(e){return At({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function z6(e){return At({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const kb=B.createContext({isOpen:!1}),Ih=B.createContext(null),Pb=B.createContext(null),ps=()=>{var n,r;const e=B.useContext(Ih),t=B.useContext(Pb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Nb=({onClearChat:e,componentType:t})=>{const n=ps(),r=()=>{e(),n()};return x.jsxs("button",{className:W(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[x.jsx(z6,{}),"Clear chat"]})};function j6(e){return e==null?[]:Array.isArray(e)?e:[e]}var $6=(e,...t)=>e.concat(t),V6=(e,...t)=>e.filter(n=>!t.includes(n)),q6=e=>Array.from(new Set(e));function Ob(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function Y6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return Ob(e,t,{step:-r,loop:o})}var W6=e=>Array.isArray(e),Ib=e=>e!=null&&typeof e=="object",G6=e=>Ib(e)&&!W6(e),Yl=e=>typeof e=="string",ms=e=>typeof e=="function",X6=e=>e==null,K6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Q6=e=>Object.prototype.toString.call(e),Rb=Function.prototype.toString,J6=Rb.call(Object),Z6=e=>{if(!Ib(e)||Q6(e)!="[object Object]"||n4(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=K6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Rb.call(n)==J6},e4=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,t4=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,n4=e=>e4(e)||t4(e),r4=e=>e(),i4=()=>{},Rh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function o4(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:s4,max:a4}=Math,u4=e=>Number.isNaN(e),l4=e=>u4(e)?0:e,Lb=(e,t,n)=>s4(a4(l4(e),t),n);function Lh(e){if(!Z6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Lh(o))}return n}function Dh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function c4(e,t){if(e==null)throw new Error(t())}function d4(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var f4=Object.defineProperty,h4=(e,t,n)=>t in e?f4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mh=(e,t,n)=>h4(e,typeof t!="symbol"?t+"":t,n),Db=()=>{},Wl=e=>typeof e=="object"&&e!==null,gs=e=>e?"":void 0,Mb=e=>e?"true":void 0,p4=1,m4=9,g4=11,tn=e=>Wl(e)&&e.nodeType===p4&&typeof e.nodeName=="string",Gl=e=>Wl(e)&&e.nodeType===m4,E4=e=>Wl(e)&&e===e.window,Fb=e=>tn(e)?e.localName||"":"#document";function y4(e){return["html","body","#document"].includes(Fb(e))}var b4=e=>Wl(e)&&e.nodeType!==void 0,yo=e=>b4(e)&&e.nodeType===g4&&"host"in e,T4=e=>tn(e)&&e.localName==="input",_4=e=>tn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Xa(e){if(!e)return!1;const t=e.getRootNode();return bs(t)===e}var S4=/(textarea|select)/;function x4(e){if(e==null||!tn(e))return!1;try{return T4(e)&&e.selectionStart!=null||S4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Es(e,t){var r;if(!e||!t||!tn(e)||!tn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&yo(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function $r(e){var t;return Gl(e)?e:E4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function w4(e){return $r(e).documentElement}function ys(e){var t,n,r;return yo(e)?ys(e.host):Gl(e)?(t=e.defaultView)!=null?t:window:tn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function bs(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function A4(e){if(Fb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yo(e)&&e.host||w4(e);return yo(t)?t.host:t}function Fh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gl(t)||yo(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Bh=new WeakMap;function Ts(e){return Bh.has(e)||Bh.set(e,ys(e).getComputedStyle(e)),Bh.get(e)}var Uh=new Set(["menu","listbox","dialog","grid","tree","region"]),v4=e=>Uh.has(e),Bb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Ub(e,t){const n=new Set,r=Fh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Bb(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(m&&v4(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Hb(e,t){const n=Fh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Bb(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";m&&Uh.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function C4(e){const t=new Set;return Hb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function k4(e){const t=e.getAttribute("role");return!!(t&&Uh.has(t))}function P4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function N4(e){var t;return P4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function O4(e){if(!e.id)return!1;const t=Fh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&k4(e))}var Hh=()=>typeof document!="undefined";function I4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var zh=e=>Hh()&&e.test(I4()),R4=e=>Hh()&&e.test(navigator.vendor),zb=()=>Hh()&&!!navigator.maxTouchPoints,L4=()=>zh(/^iPhone/i),D4=()=>zh(/^iPad/i)||jh()&&navigator.maxTouchPoints>1,Xl=()=>L4()||D4(),M4=()=>jh()||Xl(),jh=()=>zh(/^Mac/i),F4=()=>M4()&&R4(/apple/i);function B4(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Ar(e){var n;const t=B4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var jb=e=>e.button===0,U4=e=>e.button===2||jh()&&e.ctrlKey&&e.button===0,H4=e=>"touches"in e&&e.touches.length>0,z4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},$b={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function j4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=z4[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in $b&&(o=$b[o]),o}function Vb(e,t="client"){const n=H4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var nn=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},qb=e=>tn(e)&&e.tagName==="IFRAME",$4=/^(audio|video|details)$/;function Yb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var V4=e=>!Number.isNaN(Yb(e)),q4=e=>Yb(e)<0;function Y4(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function Wb(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const f=Y4(d,t);if(f){const p=Array.from(f.querySelectorAll(Kl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,_)=>{u.set(y,T+_)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,T+_)})}o.push(...p)}}return r}var Kl="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",Gb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));(n==!0||n=="if-empty"&&o.length===0)&&tn(e)&&Vr(e)&&o.unshift(e);const u=[];for(const c of o)if(Vr(c)){if(qb(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Gb(d,{getShadowRoot:r}));continue}u.push(c)}return r?Wb(u,r,Vr):u};function Vr(e){return!tn(e)||e.closest("[inert]")?!1:e.matches(Kl)&&_4(e)}function _s(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));n&&bo(e)&&o.unshift(e);const a=[];for(const u of o)if(bo(u)){if(qb(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(..._s(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Wb(a,r,bo);return!u.length&&n?o:u}return!a.length&&n?o:a}function bo(e){return tn(e)&&e.tabIndex>0?!0:Vr(e)&&!q4(e)}function W4(e,t={}){const n=_s(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function G4(e,t={}){const{current:n,getShadowRoot:r}=t,o=_s(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:bs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Ka(e){return e.tabIndex<0&&($4.test(e.localName)||x4(e))&&!V4(e)?0:e.tabIndex}function Xb(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=_s(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var X4=class e2{constructor(){Mh(this,"id",null),Mh(this,"fn_cleanup"),Mh(this,"cleanup",()=>{this.cancel()})}static create(){return new e2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function Yt(e){const t=X4.create();return t.request(e),t.cleanup}function Kb(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function $h(e){const t=A4(e);return y4(t)?$r(t).body:tn(t)&&J4(t)?t:$h(t)}var K4=/auto|scroll|overlay|hidden|clip/,Q4=new Set(["inline","contents"]);function J4(e){const t=ys(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return K4.test(n+o+r)&&!Q4.has(a)}var Ss="default",Vh="",Ql=new WeakMap;function Z4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Xl()?(Ss==="default"&&(Vh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Ss="disabled"):t&&(Ql.set(t,t.style.userSelect),t.style.userSelect="none"),()=>eD({target:t,doc:r})}function eD(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Xl()){if(Ss!=="disabled")return;Ss="restoring",setTimeout(()=>{Kb(()=>{Ss==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Vh||""),Vh="",Ss="default")})},300)}else if(t&&Ql.has(t)){const a=Ql.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Ql.delete(t)}}function tD(e={}){const u=e,{defer:t,target:n}=u,r=mn(u,["defer","target"]),o=t?Yt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(Z4(pe(F({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function nD(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=Vb(c),f=Math.sqrt(oa(d.x,2)+oa(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=Vb(c);r({point:d,event:c})},u=[nn(e,"pointermove",o,!1),nn(e,"pointerup",a,!1),nn(e,"pointercancel",a,!1),nn(e,"contextmenu",a,!1),tD({doc:e})];return()=>{u.forEach(c=>c())}}function rD(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=W4(e,{includeContainer:!0,getShadowRoot:a}),y=G4(c,{current:n,getShadowRoot:a}),_=!m&&!T;f.shiftKey&&Xa(y)?(o==null||o(),p=T):f.shiftKey&&(Xa(m)||_)?p=n:!f.shiftKey&&Xa(n)?(o==null||o(),p=m):!f.shiftKey&&(Xa(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return nn(u,"keydown",d,!0)}function iD(e,t){const c=t,{defer:n,triggerElement:r}=c,o=mn(c,["defer","triggerElement"]),a=n?Yt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(rD(d,F({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function oD(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Jl(e,t){if(!e)return Db;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function sD(e,t,n){if(!e)return Db;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function aD(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),c(f))})}),()=>t.abort()]}function uD(e,t){const{timeout:n,rootNode:r}=t,o=ys(r),a=$r(r),u=new o.AbortController;return aD(new Promise(c=>{const d=e();if(d){c(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var lD=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),cD=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Qb=e=>{const t={};let n;for(;n=cD.exec(e);)t[n[1]]=n[2];return t},dD=(e,t)=>{if(Yl(e)){if(Yl(t))return`${e};${t}`;e=Qb(e)}else Yl(t)&&(t=Qb(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Wt(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Rh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=lD(t[o],n[o]);continue}if(o==="style"){t[o]=dD(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function WU(e){return e}var xs=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(xs||{}),qh="__init__";function fD(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>$r(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>bs(t()),a=u=>t().getElementById(u);return pe(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Xa,getById:a})}function hD(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ws=()=>e=>Array.from(new Set(e)),Jb=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Zl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=B.useState(t),[o,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(o);c.current=u?e().value:o;const d=B.useRef(c.current);Jb(()=>{d.current=c.current},[o,e().value]);const f=y=>{var C,A;const _=d.current,w=ms(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:w,prev:_}),u||a(w),n(w,_)||(A=(C=e()).onChange)==null||A.call(C,w,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Jo.flushSync:r4)(()=>f(y))},invoke(y,_){var w,C;(C=(w=e()).onChange)==null||C.call(w,y,_)},hash(y){var _,w,C;return(C=(w=(_=e()).hash)==null?void 0:w.call(_,y))!=null?C:String(y)}}}Zl.cleanup=e=>{B.useEffect(()=>e,[])},Zl.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function pD(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var mD=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function ec(e,t={}){var oe,ce,de,ne,Te,Pe;const n=B.useMemo(()=>{const{id:se,ids:K,getRootNode:ie}=t;return fD({id:se,ids:K,getRootNode:ie})},[t]),r=(...se)=>{e.debug&&console.log(...se)},o=(ce=(oe=e.props)==null?void 0:oe.call(e,{props:Lh(t),scope:n}))!=null?ce:t,a=gD(o),u=(de=e.context)==null?void 0:de.call(e,{prop:a,bindable:Zl,scope:n,flush:eT,getContext(){return d},getComputed(){return Y},getRefs(){return w},getEvent(){return y()}}),c=Zb(u),d={get(se){var K;return(K=c.current)==null?void 0:K[se].ref.current},set(se,K){var ie;(ie=c.current)==null||ie[se].set(K)},initial(se){var K;return(K=c.current)==null?void 0:K[se].initial},hash(se){var ie,k;const K=(ie=c.current)==null?void 0:ie[se].get();return(k=c.current)==null?void 0:k[se].hash(K)}},f=B.useRef(new Map),p=B.useRef(null),m=B.useRef(null),T=B.useRef({type:""}),y=()=>pe(F({},T.current),{current(){return T.current},previous(){return m.current}}),_=()=>pe(F({},D),{matches(...se){return se.includes(D.ref.current)},hasTag(se){var K,ie;return!!((ie=(K=e.states[D.ref.current])==null?void 0:K.tags)!=null&&ie.includes(se))}}),w=pD((Te=(ne=e.refs)==null?void 0:ne.call(e,{prop:a,context:d}))!=null?Te:{}),C=()=>({state:_(),context:d,event:y(),prop:a,send:V,action:A,guard:P,track:mD,refs:w,computed:Y,flush:eT,scope:n,choose:H}),A=se=>{const K=ms(se)?se(C()):se;if(!K)return;const ie=K.map(k=>{var ee,I;const L=(I=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:I[k];return L||Dh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),L});for(const k of ie)k==null||k(C())},P=se=>{var K,ie;return ms(se)?se(C()):(ie=(K=e.implementations)==null?void 0:K.guards)==null?void 0:ie[se](C())},v=se=>{const K=ms(se)?se(C()):se;if(!K)return;const ie=K.map(L=>{var I,Se;const ee=(Se=(I=e.implementations)==null?void 0:I.effects)==null?void 0:Se[L];return ee||Dh(`[zag-js] No implementation found for effect "${JSON.stringify(L)}"`),ee}),k=[];for(const L of ie){const ee=L==null?void 0:L(C());ee&&k.push(ee)}return()=>k.forEach(L=>L==null?void 0:L())},H=se=>j6(se).find(K=>{let ie=!K.guard;return Yl(K.guard)?ie=!!P(K.guard):ms(K.guard)&&(ie=K.guard(C())),ie}),Y=se=>{c4(e.computed,()=>"[zag-js] No computed object found on machine");const K=e.computed[se];return K({context:d,event:y(),prop:a,refs:w,scope:n,computed:Y})},D=Zl(()=>({defaultValue:e.initialState({prop:a}),onChange(se,K){var k,L,ee,I;if(K){const Se=f.current.get(K);Se==null||Se(),f.current.delete(K)}K&&A((k=e.states[K])==null?void 0:k.exit),A((L=p.current)==null?void 0:L.actions);const ie=v((ee=e.states[se])==null?void 0:ee.effects);if(ie&&f.current.set(se,ie),K===qh){A(e.entry);const Se=v(e.effects);Se&&f.current.set(qh,Se)}A((I=e.states[se])==null?void 0:I.entry)}})),q=B.useRef(void 0),re=B.useRef(xs.NotStarted);Jb(()=>{queueMicrotask(()=>{var L;const ie=re.current===xs.Started;re.current=xs.Started,r(ie?"rehydrating...":"initializing...");const k=(L=q.current)!=null?L:D.initial;D.invoke(k,ie?D.get():qh)});const se=f.current,K=D.ref.current;return()=>{r("unmounting..."),q.current=K,re.current=xs.Stopped,se.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const me=()=>"ref"in D?D.ref.current:D.get(),V=se=>{queueMicrotask(()=>{var I,Se,je,Ee,Be;if(re.current!==xs.Started)return;m.current=T.current,T.current=se;let K=me();const ie=(je=(I=e.states[K].on)==null?void 0:I[se.type])!=null?je:(Se=e.on)==null?void 0:Se[se.type],k=H(ie);if(!k)return;p.current=k;const L=(Ee=k.target)!=null?Ee:K;r("transition",se.type,k.target||K,`(${k.actions})`);const ee=L!==K;ee?Jo.flushSync(()=>D.set(L)):k.reenter&&!ee?D.invoke(K,K):A((Be=k.actions)!=null?Be:[])})};return(Pe=e.watch)==null||Pe.call(e,C()),{state:_(),send:V,context:d,prop:a,scope:n,refs:w,computed:Y,event:y(),getStatus:()=>re.current}}function Zb(e){const t=B.useRef(e);return t.current=e,t}function gD(e){const t=Zb(e);return function(r){return t.current[r]}}function eT(e){queueMicrotask(()=>{Jo.flushSync(()=>e())})}var Yh=hD(e=>e);function tc(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function ED(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Wh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=mn(f,["asChild","children"]);if(!o)return B.createElement(e,pe(F({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=ED(c);return B.cloneElement(c,pe(F({},Wt(u,c.props)),{ref:r?tc(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Sn=(()=>{const e=new Map;return new Proxy(Wh,{apply(t,n,r){return Wh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Wh(r)),e.get(r)}})})();function yD(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function To(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const m=new Error(a!=null?a:yD(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[bD,Gh]=To({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[tT,Qa]=To({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),nT=B.forwardRef((e,t)=>{const n=Gh(),r=Qa(),o=Wt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Sn.div,pe(F({},o),{ref:tc(r.ref,t)}))});nT.displayName="PopoverContent";const rT=B.forwardRef((e,t)=>{const n=Gh(),r=Qa(),o=Wt(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(Sn.div,pe(F({},o),{ref:t}))});rT.displayName="PopoverPositioner";const Ja=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},F({},e)]),iT=e=>Ja()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function TD(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var _D={props({props:e}){return pe(F({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Ts(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Yt(()=>{var c,d;const u=nc(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Yt(()=>{e.set("prevAnimationName",nc(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===o&&e.set("prevAnimationName",nc(t.get("styles")))},u=d=>{const f=nc(t.get("styles"));Ar(d)===o&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=Jl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),Kb(()=>c())}}}}};function nc(e){return(e==null?void 0:e.animationName)||"none"}ws()(["onExitComplete","present","immediate"]);function SD(e,t={}){const{sync:n=!1}=t,r=xD(e);return B.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function xD(e){const t=B.useRef(e);return t.current=e,t}const Xh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=mn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=pe(F({},a),{present:r,onExitComplete:SD(e.onExitComplete)}),d=ec(_D,c),f=TD(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var _o=(e,t=[])=>({parts:(...n)=>{if(wD(t))return _o(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>_o(e,[...t,...n]),omit:(...n)=>_o(e,t.filter(r=>!n.includes(r))),rename:n=>_o(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${As(e)}"][data-part="${As(r)}"]`,`& [data-scope="${As(e)}"][data-part="${As(r)}"]`].join(", "),attrs:{"data-scope":As(e),"data-part":As(r)}}}),{})}),As=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),wD=e=>e.length===0;const AD=["top","right","bottom","left"],Li=Math.min,Qn=Math.max,rc=Math.round,ic=Math.floor,qr=e=>({x:e,y:e}),vD={left:"right",right:"left",bottom:"top",top:"bottom"},CD={start:"end",end:"start"};function Kh(e,t,n){return Qn(e,Li(t,n))}function fi(e,t){return typeof e=="function"?e(t):e}function hi(e){return e.split("-")[0]}function vs(e){return e.split("-")[1]}function Qh(e){return e==="x"?"y":"x"}function Jh(e){return e==="y"?"height":"width"}const kD=new Set(["top","bottom"]);function Yr(e){return kD.has(hi(e))?"y":"x"}function Zh(e){return Qh(Yr(e))}function PD(e,t,n){n===void 0&&(n=!1);const r=vs(e),o=Zh(e),a=Jh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=oc(u)),[u,oc(u)]}function ND(e){const t=oc(e);return[ep(e),t,ep(t)]}function ep(e){return e.replace(/start|end/g,t=>CD[t])}const oT=["left","right"],sT=["right","left"],OD=["top","bottom"],ID=["bottom","top"];function RD(e,t,n){switch(e){case"top":case"bottom":return n?t?sT:oT:t?oT:sT;case"left":case"right":return t?OD:ID;default:return[]}}function LD(e,t,n,r){const o=vs(e);let a=RD(hi(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(ep)))),a}function oc(e){return e.replace(/left|right|bottom|top/g,t=>vD[t])}function DD(e){return F({top:0,right:0,bottom:0,left:0},e)}function aT(e){return typeof e!="number"?DD(e):{top:e,right:e,bottom:e,left:e}}function sc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function uT(e,t,n){let{reference:r,floating:o}=e;const a=Yr(t),u=Zh(t),c=Jh(u),d=hi(t),f=a==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-o.width,y:m};break;default:y={x:r.x,y:r.y}}switch(vs(t)){case"start":y[u]-=T*(n&&f?-1:1);break;case"end":y[u]+=T*(n&&f?-1:1);break}return y}const MD=(e,t,n)=>Je(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=uT(f,r,d),T=r,y={},_=0;for(let w=0;w<c.length;w++){const{name:C,fn:A}=c[w],{x:P,y:v,data:H,reset:Y}=yield A({x:p,y:m,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});p=P!=null?P:p,m=v!=null?v:m,y=pe(F({},y),{[C]:F(F({},y[C]),H)}),Y&&_<=50&&(_++,typeof Y=="object"&&(Y.placement&&(T=Y.placement),Y.rects&&(f=Y.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):Y.rects),{x:p,y:m}=uT(f,T,d)),w=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:y}});function Za(e,t){return Je(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=fi(t,e),_=aT(y),C=c[T?m==="floating"?"reference":"floating":m],A=sc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(C))==null||n?C:C.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),P=m==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,v=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),H=(yield a.isElement==null?void 0:a.isElement(v))?(yield a.getScale==null?void 0:a.getScale(v))||{x:1,y:1}:{x:1,y:1},Y=sc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:P,offsetParent:v,strategy:d}):P);return{top:(A.top-Y.top+_.top)/H.y,bottom:(Y.bottom-A.bottom+_.bottom)/H.y,left:(A.left-Y.left+_.left)/H.x,right:(Y.right-A.right+_.right)/H.x}})}const FD=e=>({name:"arrow",options:e,fn(n){return Je(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=fi(e,n)||{};if(p==null)return{};const T=aT(m),y={x:r,y:o},_=Zh(a),w=Jh(_),C=yield c.getDimensions(p),A=_==="y",P=A?"top":"left",v=A?"bottom":"right",H=A?"clientHeight":"clientWidth",Y=u.reference[w]+u.reference[_]-y[_]-u.floating[w],D=y[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let re=q?q[H]:0;(!re||!(yield c.isElement==null?void 0:c.isElement(q)))&&(re=d.floating[H]||u.floating[w]);const me=Y/2-D/2,V=re/2-C[w]/2-1,oe=Li(T[P],V),ce=Li(T[v],V),de=oe,ne=re-C[w]-ce,Te=re/2-C[w]/2+me,Pe=Kh(de,Te,ne),se=!f.arrow&&vs(a)!=null&&Te!==Pe&&u.reference[w]/2-(Te<de?oe:ce)-C[w]/2<0,K=se?Te<de?Te-de:Te-ne:0;return{[_]:y[_]+K,data:F({[_]:Pe,centerOffset:Te-Pe-K},se&&{alignmentOffset:K}),reset:se}})}}),BD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Je(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,Te=fi(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0}=Te,A=mn(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const P=hi(a),v=Yr(d),H=hi(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||(H||!C?[oc(d)]:ND(d)),q=w!=="none";!y&&q&&D.push(...LD(d,C,w,Y));const re=[d,...D],me=yield Za(n,A),V=[];let oe=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&V.push(me[P]),T){const Pe=PD(a,c,Y);V.push(me[Pe[0]],me[Pe[1]])}if(oe=[...oe,{placement:a,overflows:V}],!V.every(Pe=>Pe<=0)){var ce,de;const Pe=(((ce=u.flip)==null?void 0:ce.index)||0)+1,se=re[Pe];if(se&&(!(T==="alignment"?v!==Yr(se):!1)||oe.every(k=>Yr(k.placement)===v?k.overflows[0]>0:!0)))return{data:{index:Pe,overflows:oe},reset:{placement:se}};let K=(de=oe.filter(ie=>ie.overflows[0]<=0).sort((ie,k)=>ie.overflows[1]-k.overflows[1])[0])==null?void 0:de.placement;if(!K)switch(_){case"bestFit":{var ne;const ie=(ne=oe.filter(k=>{if(q){const L=Yr(k.placement);return L===v||L==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(L=>L>0).reduce((L,ee)=>L+ee,0)]).sort((k,L)=>k[1]-L[1])[0])==null?void 0:ne[0];ie&&(K=ie);break}case"initialPlacement":K=d;break}if(a!==K)return{reset:{placement:K}}}return{}})}}};function lT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function cT(e){return AD.some(t=>e[t]>=0)}const UD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Je(this,null,function*(){const{rects:r}=n,u=fi(e,n),{strategy:o="referenceHidden"}=u,a=mn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Za(n,pe(F({},a),{elementContext:"reference"})),d=lT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:cT(d)}}}case"escaped":{const c=yield Za(n,pe(F({},a),{altBoundary:!0})),d=lT(c,r.floating);return{data:{escapedOffsets:d,escaped:cT(d)}}}default:return{}}})}}},dT=new Set(["left","top"]);function HD(e,t){return Je(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=hi(n),c=vs(n),d=Yr(n)==="y",f=dT.has(u)?-1:1,p=a&&d?-1:1,m=fi(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const zD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Je(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield HD(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:pe(F({},f),{placement:c})}})}}},jD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Je(this,null,function*(){const{x:r,y:o,placement:a}=n,A=fi(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:P=>{let{x:v,y:H}=P;return{x:v,y:H}}}}=A,f=mn(A,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},m=yield Za(n,f),T=Yr(hi(a)),y=Qh(T);let _=p[y],w=p[T];if(u){const P=y==="y"?"top":"left",v=y==="y"?"bottom":"right",H=_+m[P],Y=_-m[v];_=Kh(H,_,Y)}if(c){const P=T==="y"?"top":"left",v=T==="y"?"bottom":"right",H=w+m[P],Y=w-m[v];w=Kh(H,w,Y)}const C=d.fn(pe(F({},n),{[y]:_,[T]:w}));return pe(F({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[y]:u,[T]:c}}})})}}},$D=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=fi(e,t),p={x:n,y:r},m=Yr(o),T=Qh(m);let y=p[T],_=p[m];const w=fi(c,t),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:F({mainAxis:0,crossAxis:0},w);if(d){const v=T==="y"?"height":"width",H=a.reference[T]-a.floating[v]+C.mainAxis,Y=a.reference[T]+a.reference[v]-C.mainAxis;y<H?y=H:y>Y&&(y=Y)}if(f){var A,P;const v=T==="y"?"width":"height",H=dT.has(hi(o)),Y=a.reference[m]-a.floating[v]+(H&&((A=u.offset)==null?void 0:A[m])||0)+(H?0:C.crossAxis),D=a.reference[m]+a.reference[v]+(H?0:((P=u.offset)==null?void 0:P[m])||0)-(H?C.crossAxis:0);_<Y?_=Y:_>D&&(_=D)}return{[T]:y,[m]:_}}}},VD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Je(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,oe=fi(e,n),{apply:f=()=>{}}=oe,p=mn(oe,["apply"]),m=yield Za(n,p),T=hi(a),y=vs(a),_=Yr(a)==="y",{width:w,height:C}=u.floating;let A,P;T==="top"||T==="bottom"?(A=T,P=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(P=T,A=y==="end"?"top":"bottom");const v=C-m.top-m.bottom,H=w-m.left-m.right,Y=Li(C-m[A],v),D=Li(w-m[P],H),q=!n.middlewareData.shift;let re=Y,me=D;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(me=H),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(re=v),q&&!y){const ce=Qn(m.left,0),de=Qn(m.right,0),ne=Qn(m.top,0),Te=Qn(m.bottom,0);_?me=w-2*(ce!==0||de!==0?ce+de:Qn(m.left,m.right)):re=C-2*(ne!==0||Te!==0?ne+Te:Qn(m.top,m.bottom))}yield f(pe(F({},n),{availableWidth:me,availableHeight:re}));const V=yield c.getDimensions(d.floating);return w!==V.width||C!==V.height?{reset:{rects:!0}}:{}})}}};function ac(){return typeof window!="undefined"}function Cs(e){return fT(e)?(e.nodeName||"").toLowerCase():"#document"}function Jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(fT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fT(e){return ac()?e instanceof Node||e instanceof Jn(e).Node:!1}function vr(e){return ac()?e instanceof Element||e instanceof Jn(e).Element:!1}function Gr(e){return ac()?e instanceof HTMLElement||e instanceof Jn(e).HTMLElement:!1}function hT(e){return!ac()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Jn(e).ShadowRoot}const qD=new Set(["inline","contents"]);function eu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!qD.has(o)}const YD=new Set(["table","td","th"]);function WD(e){return YD.has(Cs(e))}const GD=[":popover-open",":modal"];function uc(e){return GD.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const XD=["transform","translate","scale","rotate","perspective"],KD=["transform","translate","scale","rotate","perspective","filter"],QD=["paint","layout","strict","content"];function tp(e){const t=np(),n=vr(e)?Cr(e):e;return XD.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||KD.some(r=>(n.willChange||"").includes(r))||QD.some(r=>(n.contain||"").includes(r))}function JD(e){let t=Di(e);for(;Gr(t)&&!ks(t);){if(tp(t))return t;if(uc(t))return null;t=Di(t)}return null}function np(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ZD=new Set(["html","body","#document"]);function ks(e){return ZD.has(Cs(e))}function Cr(e){return Jn(e).getComputedStyle(e)}function lc(e){return vr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Di(e){if(Cs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hT(e)&&e.host||Wr(e);return hT(t)?t.host:t}function pT(e){const t=Di(e);return ks(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gr(t)&&eu(t)?t:pT(t)}function tu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=pT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Jn(o);if(a){const c=rp(u);return t.concat(u,u.visualViewport||[],eu(o)?o:[],c&&n?tu(c):[])}return t.concat(o,tu(o,[],n))}function rp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mT(e){const t=Cr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Gr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=rc(n)!==a||rc(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function ip(e){return vr(e)?e:e.contextElement}function Ps(e){const t=ip(e);if(!Gr(t))return qr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mT(t);let u=(a?rc(n.width):n.width)/r,c=(a?rc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const e5=qr(0);function gT(e){const t=Jn(e);return!np()||!t.visualViewport?e5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function t5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jn(e)?!1:t}function So(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=ip(e);let u=qr(1);t&&(r?vr(r)&&(u=Ps(r)):u=Ps(e));const c=t5(a,n,r)?gT(a):qr(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,m=o.height/u.y;if(a){const T=Jn(a),y=r&&vr(r)?Jn(r):r;let _=T,w=rp(_);for(;w&&r&&y!==_;){const C=Ps(w),A=w.getBoundingClientRect(),P=Cr(w),v=A.left+(w.clientLeft+parseFloat(P.paddingLeft))*C.x,H=A.top+(w.clientTop+parseFloat(P.paddingTop))*C.y;d*=C.x,f*=C.y,p*=C.x,m*=C.y,d+=v,f+=H,_=Jn(w),w=rp(_)}}return sc({width:p,height:m,x:d,y:f})}function cc(e,t){const n=lc(e).scrollLeft;return t?t.left+n:So(Wr(e)).left+n}function ET(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function n5(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Wr(r),c=t?uc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=qr(1);const p=qr(0),m=Gr(r);if((m||!m&&!a)&&((Cs(r)!=="body"||eu(u))&&(d=lc(r)),Gr(r))){const y=So(r);f=Ps(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?ET(u,d):qr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function r5(e){return Array.from(e.getClientRects())}function i5(e){const t=Wr(e),n=lc(e),r=e.ownerDocument.body,o=Qn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Qn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+cc(e);const c=-n.scrollTop;return Cr(r).direction==="rtl"&&(u+=Qn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const yT=25;function o5(e,t){const n=Jn(e),r=Wr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=np();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=cc(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=yT&&(a-=_)}else f<=yT&&(a+=f);return{width:a,height:u,x:c,y:d}}const s5=new Set(["absolute","fixed"]);function a5(e,t){const n=So(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Gr(e)?Ps(e):qr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function bT(e,t,n){let r;if(t==="viewport")r=o5(e,n);else if(t==="document")r=i5(Wr(e));else if(vr(t))r=a5(t,n);else{const o=gT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sc(r)}function TT(e,t){const n=Di(e);return n===t||!vr(n)||ks(n)?!1:Cr(n).position==="fixed"||TT(n,t)}function u5(e,t){const n=t.get(e);if(n)return n;let r=tu(e,[],!1).filter(c=>vr(c)&&Cs(c)!=="body"),o=null;const a=Cr(e).position==="fixed";let u=a?Di(e):e;for(;vr(u)&&!ks(u);){const c=Cr(u),d=tp(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&s5.has(o.position)||eu(u)&&!d&&TT(e,u))?r=r.filter(p=>p!==u):o=c,u=Di(u)}return t.set(e,r),r}function l5(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?uc(t)?[]:u5(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=bT(t,p,o);return f.top=Qn(m.top,f.top),f.right=Li(m.right,f.right),f.bottom=Li(m.bottom,f.bottom),f.left=Qn(m.left,f.left),f},bT(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function c5(e){const{width:t,height:n}=mT(e);return{width:t,height:n}}function d5(e,t,n){const r=Gr(t),o=Wr(t),a=n==="fixed",u=So(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=qr(0);function f(){d.x=cc(o)}if(r||!r&&!a)if((Cs(t)!=="body"||eu(o))&&(c=lc(t)),r){const y=So(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?ET(o,c):qr(0),m=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function op(e){return Cr(e).position==="static"}function _T(e,t){if(!Gr(e)||Cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wr(e)===n&&(n=n.ownerDocument.body),n}function ST(e,t){const n=Jn(e);if(uc(e))return n;if(!Gr(e)){let o=Di(e);for(;o&&!ks(o);){if(vr(o)&&!op(o))return o;o=Di(o)}return n}let r=_T(e,t);for(;r&&WD(r)&&op(r);)r=_T(r,t);return r&&ks(r)&&op(r)&&!tp(r)?n:r||JD(e)||n}const f5=function(e){return Je(this,null,function*(){const t=this.getOffsetParent||ST,n=this.getDimensions,r=yield n(e.floating);return{reference:d5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function h5(e){return Cr(e).direction==="rtl"}const p5={convertOffsetParentRelativeRectToViewportRelativeRect:n5,getDocumentElement:Wr,getClippingRect:l5,getOffsetParent:ST,getElementRects:f5,getClientRects:r5,getDimensions:c5,getScale:Ps,isElement:vr,isRTL:h5};function xT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function m5(e,t){let n=null,r;const o=Wr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(c||t(),!T||!y)return;const _=ic(m),w=ic(o.clientWidth-(p+T)),C=ic(o.clientHeight-(m+y)),A=ic(p),v={rootMargin:-_+"px "+-w+"px "+-C+"px "+-A+"px",threshold:Qn(0,Li(1,d))||1};let H=!0;function Y(D){const q=D[0].intersectionRatio;if(q!==d){if(!H)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!xT(f,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(Y,pe(F({},v),{root:o.ownerDocument}))}catch(D){n=new IntersectionObserver(Y,v)}n.observe(e)}return u(!0),a}function g5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=ip(e),p=o||a?[...f?tu(f):[],...tu(t)]:[];p.forEach(A=>{o&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const m=f&&c?m5(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(A=>{let[P]=A;P&&P.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var v;(v=y)==null||v.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,w=d?So(e):null;d&&C();function C(){const A=So(e);w&&!xT(w,A)&&n(),w=A,_=requestAnimationFrame(C)}return n(),()=>{var A;p.forEach(P=>{o&&P.removeEventListener("scroll",n),a&&P.removeEventListener("resize",n)}),m==null||m(),(A=y)==null||A.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const E5=zD,y5=jD,b5=BD,T5=VD,_5=UD,S5=FD,x5=$D,w5=(e,t,n)=>{const r=new Map,o=F({platform:p5},n),a=pe(F({},o.platform),{_c:r});return MD(e,t,pe(F({},o),{platform:a}))};function wT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return pe(F({},o),{toJSON:()=>o})}function A5(e){if(!e)return wT();const{x:t,y:n,width:r,height:o}=e;return wT(t,n,r,o)}function v5(e,t){return{contextElement:tn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?A5(r):n.getBoundingClientRect()}}}var nu=e=>({variable:e,reference:`var(${e})`}),pi={arrowSize:nu("--arrow-size"),arrowSizeHalf:nu("--arrow-size-half"),arrowBg:nu("--arrow-background"),transformOrigin:nu("--transform-origin"),arrowOffset:nu("--arrow-offset")},C5=e=>e==="top"||e==="bottom"?"y":"x";function k5(e,t){return{name:"transformOrigin",fn(n){var me,V,oe,ce,de;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=C5(d),p=((me=o.arrow)==null?void 0:me.x)||0,m=((V=o.arrow)==null?void 0:V.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+T/2,w=m+y/2,C=Math.abs(((oe=o.shift)==null?void 0:oe.y)||0),A=u.reference.height/2,P=y/2,v=(de=(ce=e.offset)==null?void 0:ce.mainAxis)!=null?de:e.gutter,H=typeof v=="number"?v+P:v!=null?v:P,Y=C>H,D={top:`${_}px calc(100% + ${H}px)`,bottom:`${_}px ${-H}px`,left:`calc(100% + ${H}px) ${w}px`,right:`${-H}px ${w}px`}[d],q=`${_}px ${u.reference.y+A-c}px`,re=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(pi.transformOrigin.variable,re?q:D),{data:{transformOrigin:re?q:D}}}}}var P5={name:"rects",fn({rects:e}){return{data:e}}},N5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${pi.arrowOffset.reference})`}),{}}}};function O5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var I5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function AT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function sp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function R5(e,t,n){const r=e||t.createElement("div");return S5({element:r,padding:n.arrowPadding})}function L5(e,t){var n;if(!X6((n=t.offset)!=null?n:t.gutter))return E5(({placement:r})=>{var p,m,T,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=O5(r),d=c?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Lh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function D5(e){if(!e.flip)return;const t=sp(e.boundary);return b5(pe(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function M5(e){if(!e.slide&&!e.overlap)return;const t=sp(e.boundary);return y5(pe(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:x5()}))}function F5(e){return T5({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function B5(e){var t;if(e.hideWhenDetached)return _5({strategy:"referenceHidden",boundary:(t=sp(e.boundary))!=null?t:"clippingAncestors"})}function U5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function H5(e,t,n={}){const r=v5(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},I5,n),a=t.querySelector("[data-part=arrow]"),u=[L5(a,o),D5(o),M5(o),R5(a,t.ownerDocument,o),N5(a),k5({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),F5(o),B5(o),P5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>Je(null,null,function*(){var H;if(!r||!t)return;const w=yield w5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(w),p==null||p({placed:!0});const C=ys(t),A=AT(C,w.x),P=AT(C,w.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${P}px`),o.hideWhenDetached&&(((H=w.middlewareData.hide)==null?void 0:H.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const v=t.firstElementChild;if(v){const Y=Ts(v);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>Je(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=U5(o.listeners),_=o.listeners?g5(r,t,T,y):i4;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function vT(e,t,n={}){const c=n,{defer:r}=c,o=mn(c,["defer"]),a=r?Yt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(H5(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var z5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function j5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:pi.arrowSize.reference,height:pi.arrowSize.reference,[pi.arrowSizeHalf.variable]:`calc(${pi.arrowSize.reference} / 2)`,[pi.arrowOffset.variable]:`calc(${pi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?z5[t.split("-")[0]]:void 0,background:pi.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var Ns=new WeakMap,dc=new WeakMap,fc={},ap=0,CT=e=>e&&(e.host||CT(e.parentNode)),$5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=CT(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),V5=new Set(["script","output","status","next-route-announcer"]),q5=e=>V5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),Y5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=$5(n,Array.isArray(e)?e:[e]);fc[r]||(fc[r]=new WeakMap);const c=fc[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&tn(y)&&Hb(y,_=>{m(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(q5(_))return;const C=_.getAttribute(o)==="true",A=(Ns.get(_)||0)+1,P=(c.get(_)||0)+1;Ns.set(_,A),c.set(_,P),d.push(_),A===1&&C&&dc.set(_,!0),P===1&&_.setAttribute(r,""),C||_.setAttribute(o,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),f.clear(),ap++,()=>{d.forEach(y=>{const _=Ns.get(y)-1,w=c.get(y)-1;Ns.set(y,_),c.set(y,w),_||(dc.has(y)||y.removeAttribute(o),dc.delete(y)),w||y.removeAttribute(r)}),ap--,ap||(Ns=new WeakMap,Ns=new WeakMap,dc=new WeakMap,fc={})}},W5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,G5=(e,t=W5(e),n="data-aria-hidden",r=!0)=>{if(t)return Y5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},X5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function kT(e,t={}){const{defer:n=!0}=t,r=n?X5:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(G5(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function K5(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function Q5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var PT="pointerdown.outside",NT="focus.outside";function J5(e){for(const t of e)if(tn(t)&&Vr(t))return!0;return!1}var OT=e=>"clientY"in e;function Z5(e,t){if(!OT(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function eM(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function IT(e,t){if(!t||!OT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return eM(u,c)?r||a:!1}function tM(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=$r(e),f=ys(e),p=K5(f),m=Q5(f);function T(v,H){if(!tn(H)||!H.isConnected||Es(e,H)||Z5(e,v)||c&&Ub(e,H))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const q=$h(Y);if(IT(v,q))return!1}const D=$h(e);return IT(v,D)?!1:!(n!=null&&n(H))}const y=new Set,_=yo(e==null?void 0:e.getRootNode());function w(v){function H(Y){var me,V;const D=u&&!zb()?Yt:oe=>oe(),q=Y!=null?Y:v,re=(V=(me=q==null?void 0:q.composedPath)==null?void 0:me.call(q))!=null?V:[q==null?void 0:q.target];D(()=>{const oe=_?re[0]:Ar(v);if(!(!e||!T(v,oe))){if(o||a){const ce=Rh(o,a);e.addEventListener(PT,ce,{once:!0})}RT(e,PT,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:U4(q),focusable:J5(re),target:oe}})}})}v.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(nn(d,"click",H,{once:!0})),y.add(m.addEventListener("click",H,{once:!0})),y.add(p.addEventListener("click",H,{once:!0}))):H()}const C=new Set,A=setTimeout(()=>{C.add(nn(d,"pointerdown",w,!0)),C.add(m.addEventListener("pointerdown",w,!0)),C.add(p.addEventListener("pointerdown",w,!0))},0);function P(v){(u?Yt:Y=>Y())(()=>{var q,re;const Y=(re=(q=v==null?void 0:v.composedPath)==null?void 0:q.call(v))!=null?re:[v==null?void 0:v.target],D=_?Y[0]:Ar(v);if(!(!e||!T(v,D))){if(r||a){const me=Rh(r,a);e.addEventListener(NT,me,{once:!0})}RT(e,NT,{bubbles:!1,cancelable:!0,detail:{originalEvent:v,contextmenu:!1,focusable:Vr(D),target:D}})}})}return zb()||(C.add(nn(d,"focusin",P,!0)),C.add(m.addEventListener("focusin",P,!0)),C.add(p.addEventListener("focusin",P,!0))),()=>{clearTimeout(A),y.forEach(v=>v()),C.forEach(v=>v())}}function nM(e,t){const{defer:n}=t,r=n?Yt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(tM(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function RT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function rM(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return nn($r(e),"keydown",n,{capture:!0})}var LT="layer:request-dismiss",dr={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Es(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Es(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>dr.dismiss(r.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];oM(e,LT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),iM(e,LT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function iM(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function oM(e,t,n){e.addEventListener(t,n,{once:!0})}var DT;function MT(){dr.layers.forEach(({node:e})=>{e.style.pointerEvents=dr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function sM(e){e.style.pointerEvents=""}function aM(e,t){const n=$r(e),r=[];return dr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(DT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=uD(()=>{const c=o();return tn(c)?c:null},{timeout:1e3});a.then(c=>r.push(Jl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{dr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=DT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function uM(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Dh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};dr.add(f),MT();function p(w){var A,P;const C=Ar(w.detail.originalEvent);dr.isBelowPointerBlockingLayer(e)||dr.isInBranch(C)||((A=t.onPointerDownOutside)==null||A.call(t,w),(P=t.onInteractOutside)==null||P.call(t,w),!w.defaultPrevented&&(c&&console.log("onPointerDownOutside:",w.detail.originalEvent),r==null||r()))}function m(w){var A,P;const C=Ar(w.detail.originalEvent);dr.isInBranch(C)||((A=t.onFocusOutside)==null||A.call(t,w),(P=t.onInteractOutside)==null||P.call(t,w),!w.defaultPrevented&&(c&&console.log("onFocusOutside:",w.detail.originalEvent),r==null||r()))}function T(w){var C;dr.isTopMost(e)&&((C=t.onEscapeKeyDown)==null||C.call(t,w),!w.defaultPrevented&&r&&(w.preventDefault(),r()))}function y(w){var v;if(!e)return!1;const C=typeof u=="function"?u():u,A=Array.isArray(C)?C:[C],P=(v=t.persistentElements)==null?void 0:v.map(H=>H()).filter(tn);return P&&A.push(...P),A.some(H=>Es(H,w))||dr.isInNestedLayer(e,w)}const _=[a?aM(e,t.persistentElements):void 0,rM(e,T),nM(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{dr.remove(e),MT(),sM(e),_.forEach(w=>w==null?void 0:w())}}function FT(e,t){const{defer:n}=t,r=n?Yt:a=>a(),o=[];return o.push(r(()=>{const a=ms(e)?e():e;o.push(uM(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var lM=Object.defineProperty,cM=(e,t,n)=>t in e?lM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>cM(e,typeof t!="symbol"?t+"":t,n),BT={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},dM=[],fM=class{constructor(e,t){Ct(this,"trapStack"),Ct(this,"config"),Ct(this,"doc"),Ct(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ct(this,"portalContainers",new Set),Ct(this,"listenerCleanups",[]),Ct(this,"handleFocus",r=>{const o=Ar(r),a=this.findContainerIndex(o,r)>=0;if(a||Gl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Ka(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Ka(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Ct(this,"handlePointerDown",r=>{const o=Ar(r);if(!(this.findContainerIndex(o,r)>=0)){if(iu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}iu(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const o=Ar(r);this.findContainerIndex(o,r)>=0||iu(this.config.clickOutsideDeactivates,r)||iu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ct(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;ru(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{hM(r)&&iu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ct(this,"_mutationObserver"),Ct(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return N4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?O4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ct(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),Ct(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Vr(r)){const o=bs(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Ct(this,"tryFocus",r=>{if(r!==!1&&r!==bs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,pM(r)&&r.select()}}),Ct(this,"deactivate",r=>{if(!this.state.active)return this;const o=F({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),BT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{UT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),Ct(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ct(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),Ct(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),Ct(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),Ct(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Ar(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Vr(u)&&!bo(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];c=Ka(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else ru(o)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Vr(u)&&!bo(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];c=Ka(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else ru(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||dM;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return ru(r)&&!r.shiftKey},isKeyBackward(r){return ru(r)&&r.shiftKey}},t);this.doc=n.document||$r(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{C4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Ub(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=_s(e,{getShadowRoot:this.config.getShadowRoot}),n=Gb(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let f=0;f<t.length;f++)if(Ka(t[f])>0){c=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(bo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(bo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return BT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?UT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(nn(this.doc,"focusin",this.handleFocus,!0),nn(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),nn(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),nn(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),nn(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),nn(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=bs(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},ru=e=>e.key==="Tab",iu=(e,...t)=>typeof e=="function"?e(...t):e,hM=e=>!e.isComposing&&e.key==="Escape",UT=e=>setTimeout(e,0),pM=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function HT(e,t={}){let n;const r=Yt(()=>{const o=typeof e=="function"?e():e;if(o){n=new fM(o,pe(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:$r(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var up="data-scroll-lock";function mM(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function zT(e){const t=Ts(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function jT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(up))return;const u=zT(r)||zT(o),c=n.innerWidth-r.clientWidth;o.setAttribute(up,"");const d=()=>sD(r,"--scrollbar-width",`${c}px`),f=mM(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Jl(o,_)},m=()=>{var Y,D;const{scrollX:_,scrollY:w,visualViewport:C}=n,A=(Y=C==null?void 0:C.offsetLeft)!=null?Y:0,P=(D=C==null?void 0:C.offsetTop)!=null?D:0,v={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(P))}px`,left:`${-(_-Math.floor(A))}px`,right:"0"};!u&&c>0&&(v[f]=`${c}px`);const H=Jl(o,v);return()=>{H==null||H(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),Xl()?m():p()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(up)}}var gM=_o("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Xr=gM.build(),$T=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},VT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},lp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},qT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},EM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},dp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},yM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},YT=e=>e.getById($T(e)),Os=e=>e.getById(VT(e)),Is=e=>e.getById(lp(e)),WT=e=>e.getById(qT(e)),bM=e=>e.getById(cp(e)),TM=e=>e.getById(dp(e));function _M(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=j5(pe(F({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(pe(F({id:EM(c)},Xr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(pe(F({},Xr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(pe(F({},Xr.anchor.attrs),{dir:u("dir"),id:$T(c)}))},getTriggerProps(){return t.button(pe(F({},Xr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:VT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":lp(c),onPointerDown(y){jb(y)&&F4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(pe(F({},Xr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(F({id:qT(c)},Xr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(pe(F({},Xr.content.attrs),{dir:u("dir"),id:lp(c),tabIndex:-1,role:"dialog","aria-modal":Mb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":gs(d),"aria-labelledby":m.title?cp(c):void 0,"aria-describedby":m.description?dp(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(pe(F({},Xr.title.attrs),{id:cp(c),dir:u("dir")}))},getDescriptionProps(){return t.element(pe(F({},Xr.description.attrs),{id:dp(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(pe(F({},Xr.closeTrigger.attrs),{dir:u("dir"),id:yM(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var SM={props({props:e}){return pe(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=YT(n))!=null?a:Os(n);return vT(r,()=>WT(n),pe(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Is(n);let o=!0;return FT(r,{type:"popover",pointerBlocking:t("modal"),exclude:Os(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:iD(()=>Is(t),{triggerElement:Os(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?kT(()=>[Is(t),Os(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return jT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?HT(()=>Is(t),{initialFocus:()=>Xb({root:Is(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=YT(n))!=null?u:Os(n);vT(o,()=>WT(n),pe(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Yt(()=>{Object.assign(e.get("renderedElements"),{title:!!bM(t),description:!!TM(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Yt(()=>{const n=Xb({root:Is(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Yt(()=>{const a=Os(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};ws()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[XU,hc]=To({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[KU,fp]=To({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),xM=e=>{const t=B.useId(),{getRootNode:n}=hc(),{dir:r}=fp(),o=F({id:t,dir:r,getRootNode:n},e),a=ec(SM,o);return _M(a,Yh)},wM=e=>{const[t,u]=iT(e),c=u,{children:n}=c,r=mn(c,["children"]),o=xM(r),a=Xh(Wt({present:o.open},t));return x.jsx(bD,{value:o,children:x.jsx(tT,{value:a,children:n})})},GT=B.forwardRef((e,t)=>{const n=Gh(),r=Qa(),o=Wt(pe(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(Sn.button,pe(F({},o),{ref:t}))});GT.displayName="PopoverTrigger";function AM(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function vM(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function CM(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function kM(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function PM(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function NM(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function hp(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function XT(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const OM=({className:e,componentType:t,children:n})=>{const[r,o]=B.useState(!1),{globalClassName:a}=rt(),u=f=>{o(f.open)},c=B.useCallback(()=>{o(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return x.jsxs(wM,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(GT,{"aria-label":`Overflow menu for ${t}`,className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(XT,{})}),x.jsx(rT,{children:x.jsx(nT,{className:W(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(Pb.Provider,{value:d,children:n})})})]})};function KT(e){return At({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function QT(e){return At({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[IM,xo]=To({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),JT=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getControlProps(),e);return x.jsx(Sn.div,pe(F(F({},r),e),{ref:t}))});JT.displayName="CarouselControl";const ZT=B.forwardRef((e,t)=>{const[n,r]=Ja()(e,["readOnly","index"]),o=xo(),a=Wt(o.getIndicatorProps(n),r);return x.jsx(Sn.button,pe(F({},a),{ref:t}))});ZT.displayName="CarouselIndicator";const e_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getIndicatorGroupProps(),e);return x.jsx(Sn.div,pe(F({},r),{ref:t}))});e_.displayName="CarouselIndicatorGroup";const t_=B.forwardRef((e,t)=>{const[n,r]=Ja()(e,["index","snapAlign"]),o=xo(),a=Wt(o.getItemProps(n),r);return x.jsx(Sn.div,pe(F({},a),{ref:t}))});t_.displayName="CarouselItem";const n_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getItemGroupProps(),e);return x.jsx(Sn.div,pe(F({},r),{ref:t}))});n_.displayName="CarouselItemGroup";const r_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getNextTriggerProps(),e);return x.jsx(Sn.button,pe(F({},r),{ref:t}))});r_.displayName="CarouselNextTrigger";const i_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getPrevTriggerProps(),e);return x.jsx(Sn.button,pe(F({},r),{ref:t}))});i_.displayName="CarouselPrevTrigger";function RM(e){const t=Ts(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(o,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function LM(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function o_(e){let t=[];for(const n of e.children)t=t.concat(n,o_(n));return t}function s_(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?o_(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const m=p.getBoundingClientRect();if(!LM(n,m,u))continue;const T=Ts(p);let[y,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const w=a==="x"?_:y,C=m[c]-n[c]+e[f];switch(w){case"none":break;case"start":r[a].start.push({node:p,position:C});break;case"center":r[a].center.push({node:p,position:C+m[d]/2});break;case"end":r[a].end.push({node:p,position:C+m[d]});break}}}return r}function a_(e){const t=e.getBoundingClientRect(),n=RM(e),r=s_(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:u_([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(l_(0,o.x))),y:u_([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(l_(0,o.y)))}}function DM(e,t,n){const r=s_(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var u_=e=>[...new Set(e)],l_=(e,t)=>n=>Math.max(e,Math.min(t,n)),MM=_o("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),mi=MM.build(),FM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},BM=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},pc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},UM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},HM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},zM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},c_=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},Un=e=>e.getById(pc(e)),d_=e=>oD(Un(e),"[data-part=item]"),jM=(e,t)=>e.getById(c_(e,t)),f_=e=>{const t=Un(e);if(!t)return;const n=_s(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function $M(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),m=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),w=c("slidesPerPage"),C=c("padding"),A=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/y.length},scrollToIndex(P,v){a({type:"INDEX.SET",index:P,instant:v})},scrollTo(P,v){a({type:"PAGE.SET",index:P,instant:v})},scrollNext(P){a({type:"PAGE.NEXT",instant:P})},scrollPrev(P){a({type:"PAGE.PREV",instant:P})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(P){return Array.from(r.get("slidesInView")).includes(P)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(pe(F({},mi.root.attrs),{id:FM(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":w,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(pe(F({},mi.itemGroup.attrs),{id:pc(u),"data-orientation":c("orientation"),"data-dragging":gs(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(P){Es(P.currentTarget,Ar(P))&&a({type:"VIEWPORT.FOCUS"})},onBlur(P){Es(P.currentTarget,P.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(P){if(P.defaultPrevented||!c("allowMouseDrag")||!jb(P))return;const v=Ar(P);Vr(v)&&v!==P.currentTarget||(P.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:o4(P=>{const v=c("orientation")==="horizontal"?"deltaX":"deltaY";P[v]<0&&!o("canScrollPrev")||P[v]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:C,[T?"paddingInline":"paddingBlock"]:C,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(P){const v=r.get("slidesInView").includes(P.index);return t.element(pe(F({},mi.item.attrs),{id:BM(u,P.index),dir:c("dir"),role:"group","data-index":P.index,"data-inview":gs(v),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":A.item(P.index,c("slideCount")),"aria-hidden":Mb(!v),style:{scrollSnapAlign:(()=>{var re;const H=(re=P.snapAlign)!=null?re:"start",Y=c("slidesPerMove"),D=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(P.index+D)%D===0?H:void 0})()}}))},getControlProps(){return t.element(pe(F({},mi.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(pe(F({},mi.prevTrigger.attrs),{id:HM(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":A.prevTrigger,"data-orientation":c("orientation"),"aria-controls":pc(u),onClick(P){P.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(pe(F({},mi.nextTrigger.attrs),{dir:c("dir"),id:UM(u),type:"button","aria-label":A.nextTrigger,"data-orientation":c("orientation"),"aria-controls":pc(u),disabled:!p,onClick(P){P.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(pe(F({},mi.indicatorGroup.attrs),{dir:c("dir"),id:zM(u),"data-orientation":c("orientation"),onKeyDown(P){if(P.defaultPrevented)return;const v="indicator",H={ArrowDown(q){T||(a({type:"PAGE.NEXT",src:v}),q.preventDefault())},ArrowUp(q){T||(a({type:"PAGE.PREV",src:v}),q.preventDefault())},ArrowRight(q){T&&(a({type:"PAGE.NEXT",src:v}),q.preventDefault())},ArrowLeft(q){T&&(a({type:"PAGE.PREV",src:v}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:v}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:v}),q.preventDefault()}},Y=j4(P,{dir:c("dir"),orientation:c("orientation")}),D=H[Y];D==null||D(P)}}))},getIndicatorProps(P){return t.button(pe(F({},mi.indicator.attrs),{dir:c("dir"),id:c_(u,P.index),type:"button","data-orientation":c("orientation"),"data-index":P.index,"data-readonly":gs(P.readOnly),"data-current":gs(P.index===_),"aria-label":A.indicator(P.index),onClick(v){v.defaultPrevented||P.readOnly||a({type:"PAGE.SET",index:P.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(pe(F({},mi.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":gs(d),"aria-label":d?A.autoplayStop:A.autoplayStart,onClick(P){P.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var VM={props({props:e}){return d4(e,["slideCount"],"carousel"),pe(F({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:F({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:qM(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return G6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Un(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Un(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),f_(e)});return f_(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!Un(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Yt(()=>{o(),Yt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return d_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Un(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?$6(d,m):V6(d,m)},n.get("slidesInView"));n.set("slidesInView",q6(c))},{root:r,threshold:t("inViewThreshold")});return d_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Un(n);return r?nn(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return nn(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return nD(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return nn(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var f;const a=t.instant?"instant":"smooth",u=Lb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=Un(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Un(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=Ob(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=Y6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=Un(r);if(!o)return;const a=DM(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=Lb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Un(n);if(!r)return;const o=a_(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=Un(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Un(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Un(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=a_(r),c=u.x.reduce((f,p)=>Math.abs(p-o)<Math.abs(f-o)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);Yt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=jM(n,e.get("page"));r&&Yt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function qM(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}ws()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),ws()(["index","readOnly"]),ws()(["index","snapAlign"]);const YM=e=>{const t=B.useId(),{getRootNode:n}=hc(),{dir:r}=fp(),o=F({id:t,dir:r,getRootNode:n},e),a=ec(VM,o);return $M(a,Yh)},h_=B.forwardRef((e,t)=>{const[n,r]=Ja()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=YM(n),a=Wt(o.getRootProps(),r);return x.jsx(IM,{value:o,children:x.jsx(Sn.div,pe(F({},a),{ref:t}))})});h_.displayName="CarouselRoot";const WM=180,GM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},XM=({globalClassName:e,className:t,itemMinWidth:n=WM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p),T=m.length,y=B.useRef(null),[_,w]=B.useState(0),{width:C}=$C();B.useLayoutEffect(()=>{y.current&&w(y.current.getBoundingClientRect().width)},[C,T]);const A=GM(r),P=n+A,v=_>0?(_+A)/P:1,H=Math.max(1,Math.floor(v));if(T===0)return null;const Y=T>H,D=Math.ceil(T/H),q=Y?Math.max(1,v):H;return x.jsxs(h_,{ref:y,className:W(e,t,`${z}-carousel`),slidesPerPage:q,slidesPerMove:H,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[x.jsx(n_,{className:W(e,`${z}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map((re,me)=>x.jsx(t_,{index:me,className:W(e,`${z}-carousel__item`),children:re},me))}),c&&Y&&x.jsxs(JT,{className:W(e,`${z}-carousel__control`),children:[x.jsx(i_,{className:W(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:x.jsx(CM,{size:"16px"})}),x.jsx(r_,{className:W(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:x.jsx(kM,{size:"16px"})})]}),u&&Y&&x.jsx(e_,{className:W(e,`${z}-carousel__indicator-group`),children:Array.from({length:D},(re,me)=>x.jsx(ZT,{index:me,className:W(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${me+1}`},me))})]})},[KM,QM]=To({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),JM=e=>Ja()(e,["lazyMount","unmountOnExit"]),[ZM,ou]=To({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),p_=B.forwardRef((e,t)=>{const n=ou(),r=QM(),o=Xh(pe(F({},r),{present:n.open})),a=Wt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:x.jsx(Sn.div,pe(F({},a),{ref:tc(o.ref,t)}))});p_.displayName="DialogBackdrop";const pp=B.forwardRef((e,t)=>{const n=ou(),r=Qa(),o=Wt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Sn.div,pe(F({},o),{ref:tc(r.ref,t)}))});pp.displayName="DialogContent";const mp=B.forwardRef((e,t)=>{const n=ou(),r=Wt(n.getDescriptionProps(),e);return x.jsx(Sn.div,pe(F({},r),{ref:t}))});mp.displayName="DialogDescription";const gp=B.forwardRef((e,t)=>{const n=ou(),r=Wt(n.getPositionerProps(),e);return Qa().unmounted?null:x.jsx(Sn.div,pe(F({},r),{ref:t}))});gp.displayName="DialogPositioner";var e8=_o("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),wo=e8.build(),m_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},g_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},E_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},yp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},bp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},y_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},mc=e=>e.getById(Ep(e)),t8=e=>e.getById(m_(e)),n8=e=>e.getById(g_(e)),r8=e=>e.getById(E_(e)),i8=e=>e.getById(yp(e)),o8=e=>e.getById(bp(e)),s8=e=>e.getById(y_(e));function a8(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(pe(F({},wo.trigger.attrs),{dir:a("dir"),id:E_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Ep(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(pe(F({},wo.backdrop.attrs),{dir:a("dir"),hidden:!d,id:g_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(F({},wo.positioner.attrs),{dir:a("dir"),id:m_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(pe(F({},wo.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Ep(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:yp(u),"aria-describedby":f.description?bp(u):void 0}))},getTitleProps(){return t.element(pe(F({},wo.title.attrs),{dir:a("dir"),id:yp(u)}))},getDescriptionProps(){return t.element(pe(F({},wo.description.attrs),{dir:a("dir"),id:bp(u)}))},getCloseTriggerProps(){return t.button(pe(F({},wo.closeTrigger.attrs),{dir:a("dir"),id:y_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var u8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>s8(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return F({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return FT(()=>mc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[r8(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return jT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?HT(()=>mc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?kT(()=>[mc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Yt(()=>{e.set("rendered",{title:!!i8(t),description:!!o8(t)})})},syncZIndex({scope:e}){Yt(()=>{const t=mc(e);if(!t)return;const n=Ts(t);[t8(e),n8(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};ws()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const l8=e=>{const t=B.useId(),{getRootNode:n}=hc(),{dir:r}=fp(),o=F({id:t,getRootNode:n,dir:r},e),a=ec(u8,o);return a8(a,Yh)},b_=e=>{const[t,c]=iT(e),d=c,{children:n}=d,r=mn(d,["children"]),[o]=JM(t),a=l8(r),u=Xh(Wt({present:a.open},t));return x.jsx(ZM,{value:a,children:x.jsx(KM,{value:o,children:x.jsx(tT,{value:u,children:n})})})},T_=B.forwardRef((e,t)=>{const n=ou(),r=Wt(n.getTitleProps(),e);return x.jsx(Sn.h2,pe(F({},r),{ref:t}))});T_.displayName="DialogTitle";const c8=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=B.useMemo(()=>({isOpen:t}),[t]);return x.jsx(Ih.Provider,{value:r,children:x.jsx(kb.Provider,{value:o,children:e})})},__=()=>B.useContext(kb),S_=()=>{const e=B.useContext(Ih);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},d8=`${z}-overflow-menu-button-trigger`,f8=({componentType:e,children:t})=>{const{isOpen:n}=__(),{closeMenu:r}=S_(),{globalClassName:o}=rt(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${d8}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?x.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:W(`${z}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},h8=({componentType:e,className:t})=>{const{toggleMenu:n}=S_(),{isOpen:r}=__(),{globalClassName:o}=rt();return x.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:x.jsx(XT,{})})},Tp=()=>{const{status:e,entryType:t}=sr(),{messages:n}=ar(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},p8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),{previousComponentType:r}=sr(),o=ps(),a=()=>{El(r||"dialog"),o()};return t?x.jsx(ci,{className:W(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:x.jsx(KT,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(KT,{}),"Show ",r||"dialog"]})},m8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),{isModalFullscreen:r}=sr(),o=ps(),a=()=>{vf(!r),o()},u=r?Zk:eP,c="Toggle Fullscreen";return t?x.jsx(ci,{ariaLabel:c,title:c,className:W(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:x.jsx(u,{}),onClick:a}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(u,{}),c]})},g8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),{dialogPosition:r}=sr(),o=ps(),a=r==="bottom-left",u=()=>{Cf(a?"bottom-right":"bottom-left"),o()},c=a?vM:AM,d=a?"Move right":"Move left";return t?x.jsx(ci,{className:W(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:x.jsx(c,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(c,{}),d]})},x_=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:o,globalClassName:a,mode:u,enableDownloadTranscript:c}=rt(),{mode:d}=sr(),f=u==="messaging"&&c&&!!r,p=d==="standalone",m=e==="modal",T=m?p8:w_,y=m?m8:g8,_=B.useMemo(()=>o?nP(o):{},[o]);return x.jsx(c8,{children:x.jsxs("div",{className:W(a,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[x.jsxs("div",{className:W(a,`${z}-${e}-header`,{standalone:p,embedded:!p}),style:_,children:[(o==null?void 0:o.logoUrl)&&x.jsx("img",{alt:"",role:"img",className:W(a,`${z}-${e}-logo`,{standalone:p,embedded:!p}),src:o.logoUrl}),x.jsx(T_,{className:W(a,`${z}-${e}-title`,{standalone:p,embedded:!p}),children:o==null?void 0:o.headerText}),x.jsxs("div",{className:W(a,`${z}-${e}-controls`),children:[x.jsx(T,{componentType:e,isIcon:!0}),x.jsx(h8,{componentType:e}),x.jsx(H1,{className:W(a,`cim-${e}-component`),onClick:n})]})]}),x.jsxs(f8,{componentType:e,children:[x.jsx(y,{componentType:e}),x.jsx(T8,{componentType:e}),x.jsx(Nb,{componentType:e,onClearChat:t}),f&&x.jsx(E8,{componentType:e,onDownloadTranscript:r})]})]})})},E8=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=rt(),r=ps(),[o,a]=B.useState(!1),u=()=>Je(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return x.jsxs("button",{className:W(`${z}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:o,children:[x.jsx(H6,{}),"Download transcript"]})},y8={sparkle:hp,plus:PM,"paper-plane":NM},_p=({icon:e,className:t})=>{const n=y8[e];return n?x.jsx(n,{className:t,"aria-hidden":"true"}):null},b8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=rt(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=o?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},T=_=>x.jsxs(x.Fragment,{children:[c&&x.jsx(_p,{icon:c,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:_})]});return x.jsx("div",{className:W(t,`${z}-suggestion-container ${f}`,e),children:n.map(_=>o?x.jsx(_l,{disabled:r,className:W(t,`${z}-suggestion-button standalone`,m),onClick:p(_),children:T(_)},_):x.jsx("button",{disabled:r,className:W(t,`${z}-suggestion-button embedded`,m),onClick:p(_),children:T(_)},_))})},T8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=rt();if(!r)return null;const o=()=>{ui(!1),gl(!0)};return t?x.jsx(ci,{className:W(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:x.jsx(B1,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(B1,{}),"Minimize"]})},w_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),r=ps(),o=()=>{El("modal"),r()};return t?x.jsx(ci,{className:W(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:x.jsx(QT,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(QT,{}),"Show modal"]})},_8=({isWidgetStandalone:e})=>{var _,w;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o}=rt(),{askCimPrompts:a,messages:u}=ar(),{isLoading:c,handleSuggestion:d}=Ur(),f=o==null?void 0:o.icon,p=(_=o==null?void 0:o.iconPosition)!=null?_:"left",m=B.useMemo(()=>{const C=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return u.some(P=>P.name==="conversation_reset")&&r||C},[u,n,r]),T=((w=a.message)==null?void 0:w.suggestions)||[],y=(C,A)=>()=>{d(C,A)};return x.jsxs("div",{className:W(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[x.jsx("p",{className:W(t,`${z}-ask-cim-entry-text`),children:m}),!!(T!=null&&T.length)&&x.jsx("div",{className:W(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:T.map(C=>{var A;return x.jsxs(_l,{disabled:c,className:W(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!f,"icon-right":!!f&&p==="right"}),onClick:y(C,((A=a.message)==null?void 0:A.eventSourceId)||""),children:[f&&x.jsx(_p,{icon:f,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:C.displayText})]},C.displayText)})})]})},S8=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=rt();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),m=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return x.jsxs("div",{className:W(r,`${z}-product-tile`,{embedded:!e,standalone:e}),children:[m?x.jsx("a",{href:`${m}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:x.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):x.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),x.jsxs("div",{className:W(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[x.jsxs("div",{className:W(r,`${z}-product-tile-content`),children:[u&&x.jsx("p",{className:`${z}-product-tile-brand`,children:u}),m?x.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:W(r,`${z}-product-tile-pdp`),href:`${m}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",x.jsx("span",{className:W(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):x.jsx("p",{className:W(r,`${z}-product-tile-name`),title:a,children:a})]}),x.jsx("div",{className:W(r,`${z}-product-tile-footer`),children:x.jsx("p",{className:W(r,`${z}-product-tile-price`),children:c})})]})]})},x8=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=rt(),o=t;return n?x.jsxs("div",{className:W(r,`${z}-display-products`),children:[x.jsx("p",{children:o.message}),o.products&&o.products.length>0&&x.jsx(XM,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:o.products.map(a=>{const u=n.getPid(a);return x.jsx(S8,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},w8=({globalClassName:e,message:t,isWidgetStandalone:n})=>x.jsx("div",{className:W(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:x.jsxs("p",{className:W(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[x.jsx(Kk,{})," ",t.message||"An error occurred while processing your request."]})}),A8=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var _;const{isLoading:a}=Ur(),{messages:u}=ar(),c=u.find(w=>w.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?vA(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=w=>{const C=n.suggestions.find(A=>A.displayText===w);C&&o(C,n.eventSourceId||n.id)};return x.jsxs("div",{className:W(e,`${z}-follow-up`),children:[x.jsx("p",{className:W(e,`${z}-text`),children:n.message}),x.jsx(b8,{suggestions:n.suggestions.map(w=>w.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function A_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function v8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function C8(e,t,n){const o=Il((n||{}).ignore||[]),a=k8(t);let u=-1;for(;++u<a.length;)QE(e,"text",c);function c(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],_=T?T.children:void 0;if(o(y,_?_.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let _=0;const C=m.children.indexOf(f);let A=!1,P=[];T.lastIndex=0;let v=T.exec(f.value);for(;v;){const H=v.index,Y={index:v.index,input:v.input,stack:[...p,f]};let D=y(...v,Y);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?T.lastIndex=H+1:(_!==H&&P.push({type:"text",value:f.value.slice(_,H)}),Array.isArray(D)?P.push(...D):D&&P.push(D),_=H+v[0].length,A=!0),!T.global)break;v=T.exec(f.value)}return A?(_<f.value.length&&P.push({type:"text",value:f.value.slice(_)}),m.children.splice(C,1,...P)):P=[f],C+P.length}}function k8(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 o=n[r];t.push([P8(o[0]),N8(o[1])])}return t}function P8(e){return typeof e=="string"?new RegExp(v8(e),"g"):e}function N8(e){return typeof e=="function"?e:function(){return e}}const Sp="phrasing",xp=["autolink","link","image","label"];function O8(){return{transforms:[B8],enter:{literalAutolink:R8,literalAutolinkEmail:wp,literalAutolinkHttp:wp,literalAutolinkWww:wp},exit:{literalAutolink:F8,literalAutolinkEmail:M8,literalAutolinkHttp:L8,literalAutolinkWww:D8}}}function I8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Sp,notInConstruct:xp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Sp,notInConstruct:xp},{character:":",before:"[ps]",after:"\\/",inConstruct:Sp,notInConstruct:xp}]}}function R8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wp(e){this.config.enter.autolinkProtocol.call(this,e)}function L8(e){this.config.exit.autolinkProtocol.call(this,e)}function D8(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 M8(e){this.config.exit.autolinkEmail.call(this,e)}function F8(e){this.exit(e)}function B8(e){C8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,U8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),H8]],{ignore:["link","linkReference"]})}function U8(e,t,n,r,o){let a="";if(!v_(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!z8(n)))return!1;const u=j8(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function H8(e,t,n,r){return!v_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function z8(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 j8(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 o=A_(e,"(");let a=A_(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function v_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||co(n)||Al(n))&&(!t||n!==47)}C_.peek=Q8;function $8(){this.buffer()}function V8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function q8(){this.buffer()}function Y8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function W8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function G8(e){this.exit(e)}function X8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function K8(e){this.exit(e)}function Q8(){return"["}function C_(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function J8(){return{enter:{gfmFootnoteCallString:$8,gfmFootnoteCall:V8,gfmFootnoteDefinitionLabelString:q8,gfmFootnoteDefinition:Y8},exit:{gfmFootnoteCallString:W8,gfmFootnoteCall:G8,gfmFootnoteDefinitionLabelString:X8,gfmFootnoteDefinition:K8}}}function Z8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:C_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
31
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const ho={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/"},hy={}.hasOwnProperty,E3=Object.prototype;function y3(e,t){const n=t||{};return mh({file:n.file||void 0,location:!1,schema:n.space==="svg"?ns:Sl,verbose:n.verbose||!1},e)}function mh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ml(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:py(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=g3(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Ml(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ml(e,r,n),n}default:return n=b3(e,t),n}}function py(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=mh(e,t[n]);r.push(o)}return r}function b3(e,t){const n=e.schema;e.schema=t.namespaceURI===ho.svg?ns:Sl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;hy.call(E3,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?m3:p3)(t.tagName,o,py(e,t.childNodes));if(Ml(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&as(d.startTag),p=d&&d.endTag&&as(d.endTag),m=mh(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Ml(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=T3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function T3(e,t,n){const r=as(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)hy.call(n.attrs,u)&&(a[Ff(e.schema,u).property]=as(n.attrs[u]));n.startTag;const c=as(n.startTag),d=n.endTag?as(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function as(e){const t=my({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=my({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function my(e){return e.line&&e.column?e:void 0}class Ma{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ma.prototype.property={},Ma.prototype.normal={},Ma.prototype.space=null;function gy(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Ma(n,r,t)}function gh(e){return e.toLowerCase()}class lr{constructor(t,n){this.property=t,this.attribute=n}}lr.prototype.space=null,lr.prototype.boolean=!1,lr.prototype.booleanish=!1,lr.prototype.overloadedBoolean=!1,lr.prototype.number=!1,lr.prototype.commaSeparated=!1,lr.prototype.spaceSeparated=!1,lr.prototype.commaOrSpaceSeparated=!1,lr.prototype.mustUseProperty=!1,lr.prototype.defined=!1;let _3=0;const Xe=po(),$t=po(),Ey=po(),be=po(),yt=po(),us=po(),Kn=po();function po(){return oa(2,++_3)}const Eh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Xe,booleanish:$t,commaOrSpaceSeparated:Kn,commaSeparated:us,number:be,overloadedBoolean:Ey,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),yh=Object.keys(Eh);class bh extends lr{constructor(t,n,r,o){let a=-1;if(super(t,n),yy(this,"space",o),typeof r=="number")for(;++a<yh.length;){const u=yh[a];yy(this,yh[a],(r&Eh[u])===Eh[u])}}}bh.prototype.defined=!0;function yy(e,t,n){n&&(e[t]=n)}const S3={}.hasOwnProperty;function ls(e){const t={},n={};let r;for(r in e.properties)if(S3.call(e.properties,r)){const o=e.properties[r],a=new bh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[gh(r)]=r,n[gh(a.attribute)]=r}return new Ma(t,n,e.space)}const by=ls({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}}),Ty=ls({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function _y(e,t){return t in e?e[t]:t}function Sy(e,t){return _y(e,t.toLowerCase())}const xy=ls({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Sy,properties:{xmlns:null,xmlnsXLink:null}}),wy=ls({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:$t,ariaAutoComplete:null,ariaBusy:$t,ariaChecked:$t,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:$t,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:$t,ariaFlowTo:yt,ariaGrabbed:$t,ariaHasPopup:null,ariaHidden:$t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:be,ariaLive:null,ariaModal:$t,ariaMultiLine:$t,ariaMultiSelectable:$t,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:$t,ariaReadOnly:$t,ariaRelevant:null,ariaRequired:$t,ariaRoleDescription:yt,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:$t,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null}}),x3=ls({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Sy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:us,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Xe,allowPaymentRequest:Xe,allowUserMedia:Xe,alt:null,as:null,async:Xe,autoCapitalize:null,autoComplete:yt,autoFocus:Xe,autoPlay:Xe,blocking:yt,capture:null,charSet:null,checked:Xe,cite:null,className:yt,cols:be,colSpan:null,content:null,contentEditable:$t,controls:Xe,controlsList:yt,coords:be|us,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xe,defer:Xe,dir:null,dirName:null,disabled:Xe,download:Ey,draggable:$t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xe,formTarget:null,headers:yt,height:be,hidden:Xe,high:be,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Xe,inputMode:null,integrity:null,is:null,isMap:Xe,itemId:null,itemProp:yt,itemRef:yt,itemScope:Xe,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xe,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Xe,muted:Xe,name:null,nonce:null,noModule:Xe,noValidate:Xe,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:Xe,optimum:be,pattern:null,ping:yt,placeholder:null,playsInline:Xe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xe,referrerPolicy:null,rel:yt,required:Xe,reversed:Xe,rows:be,rowSpan:be,sandbox:yt,scope:null,scoped:Xe,seamless:Xe,selected:Xe,shadowRootClonable:Xe,shadowRootDelegatesFocus:Xe,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:$t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Xe,useMap:null,value:$t,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xe,declare:Xe,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Xe,noHref:Xe,noShade:Xe,noWrap:Xe,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:$t,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Xe,disableRemotePlayback:Xe,prefix:null,property:null,results:be,security:null,unselectable:null}}),w3=ls({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:_y,properties:{about:Kn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:yt,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:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Xe,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,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:us,g2:us,glyphName:us,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:Kn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,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:be,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:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kn,rev:Kn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kn,requiredFeatures:Kn,requiredFonts:Kn,requiredFormats:Kn,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:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:Kn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),A3=/^data[-\w.:]+$/i,Ay=/-[a-z]/g,v3=/[A-Z]/g;function C3(e,t){const n=gh(t);let r=t,o=lr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&A3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ay,P3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ay.test(a)){let u=a.replace(v3,k3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=bh}return new o(r,t)}function k3(e){return"-"+e.toLowerCase()}function P3(e){return e.charAt(1).toUpperCase()}const N3=gy([Ty,by,xy,wy,x3],"html"),vy=gy([Ty,by,xy,wy,w3],"svg"),Cy={}.hasOwnProperty;function ky(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&Cy.call(o,e)){const d=String(o[e]);u=Cy.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const O3={},I3={}.hasOwnProperty,Py=ky("type",{handlers:{root:L3,element:U3,text:F3,comment:B3,doctype:M3}});function R3(e,t){const r=(t||O3).space;return Py(e,r==="svg"?vy:N3)}function L3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Th(e.children,n,t),cs(e,n),n}function D3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Th(e.children,n,t),cs(e,n),n}function M3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return cs(e,t),t}function F3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return cs(e,t),t}function B3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return cs(e,t),t}function U3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=vy);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&I3.call(e.properties,a)){const d=H3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:ho[u],childNodes:[],parentNode:null};return c.childNodes=Th(e.children,c,r),cs(e,c),e.tagName==="template"&&e.content&&(c.content=D3(e.content,r)),c}function H3(e,t,n){const r=C3(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?j1(n):tE(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=ho[r.space]}return o}function Th(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Py(e[r],n);a.parentNode=t,o.push(a)}return o}function cs(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 z3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],j3=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),vt="�";var N;(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"})(N||(N={}));const Bn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ny(e){return e>=55296&&e<=57343}function $3(e){return e>=56320&&e<=57343}function V3(e,t){return(e-55296)*1024+9216+t}function Oy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Iy(e){return e>=64976&&e<=65007||j3.has(e)}var te;(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"})(te||(te={}));const q3=65536;class Y3{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=q3,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:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_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($3(n))return this.pos++,this._addGap(),V3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(te.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,N.EOF;const r=this.html.charCodeAt(n);return r===N.CARRIAGE_RETURN?N.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,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ny(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Oy(t)?this._err(te.controlCharacterInInputStream):Iy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Qe;(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"})(Qe||(Qe={}));function Ry(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 W3=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))),G3=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function X3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=G3.get(e))!==null&&t!==void 0?t:e}var Zt;(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"})(Zt||(Zt={}));const K3=32;var Ni;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ni||(Ni={}));function _h(e){return e>=Zt.ZERO&&e<=Zt.NINE}function Q3(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_F||e>=Zt.LOWER_A&&e<=Zt.LOWER_F}function J3(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_Z||e>=Zt.LOWER_A&&e<=Zt.LOWER_Z||_h(e)}function Z3(e){return e===Zt.EQUALS||J3(e)}var en;(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"})(en||(en={}));var di;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(di||(di={}));class eR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=en.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=di.Strict}startEntity(t){this.decodeMode=t,this.state=en.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case en.EntityStart:return t.charCodeAt(n)===Zt.NUM?(this.state=en.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=en.NamedEntity,this.stateNamedEntity(t,n));case en.NumericStart:return this.stateNumericStart(t,n);case en.NumericDecimal:return this.stateNumericDecimal(t,n);case en.NumericHex:return this.stateNumericHex(t,n);case en.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|K3)===Zt.LOWER_X?(this.state=en.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=en.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(_h(o)||Q3(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(_h(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,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===Zt.SEMI)this.consumed+=1;else if(this.decodeMode===di.Strict)return 0;return this.emitCodePoint(X3(this.result),this.consumed),this.errors&&(t!==Zt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&Ni.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=tR(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===di.Attribute&&(a===0||Z3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Ni.VALUE_LENGTH)>>14,a!==0){if(u===Zt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==di.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Ni.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Ni.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case en.NamedEntity:return this.result!==0&&(this.decodeMode!==di.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case en.NumericDecimal:return this.emitNumericEntity(0,2);case en.NumericHex:return this.emitNumericEntity(0,3);case en.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case en.EntityStart:return 0}}}function tR(e,t,n,r){const o=(t&Ni.BRANCH_LENGTH)>>7,a=t&Ni.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+o]}return-1}var ue;(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/"})(ue||(ue={}));var mo;(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"})(mo||(mo={}));var cr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(cr||(cr={}));var X;(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"})(X||(X={}));var g;(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"})(g||(g={}));const nR=new Map([[X.A,g.A],[X.ADDRESS,g.ADDRESS],[X.ANNOTATION_XML,g.ANNOTATION_XML],[X.APPLET,g.APPLET],[X.AREA,g.AREA],[X.ARTICLE,g.ARTICLE],[X.ASIDE,g.ASIDE],[X.B,g.B],[X.BASE,g.BASE],[X.BASEFONT,g.BASEFONT],[X.BGSOUND,g.BGSOUND],[X.BIG,g.BIG],[X.BLOCKQUOTE,g.BLOCKQUOTE],[X.BODY,g.BODY],[X.BR,g.BR],[X.BUTTON,g.BUTTON],[X.CAPTION,g.CAPTION],[X.CENTER,g.CENTER],[X.CODE,g.CODE],[X.COL,g.COL],[X.COLGROUP,g.COLGROUP],[X.DD,g.DD],[X.DESC,g.DESC],[X.DETAILS,g.DETAILS],[X.DIALOG,g.DIALOG],[X.DIR,g.DIR],[X.DIV,g.DIV],[X.DL,g.DL],[X.DT,g.DT],[X.EM,g.EM],[X.EMBED,g.EMBED],[X.FIELDSET,g.FIELDSET],[X.FIGCAPTION,g.FIGCAPTION],[X.FIGURE,g.FIGURE],[X.FONT,g.FONT],[X.FOOTER,g.FOOTER],[X.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[X.FORM,g.FORM],[X.FRAME,g.FRAME],[X.FRAMESET,g.FRAMESET],[X.H1,g.H1],[X.H2,g.H2],[X.H3,g.H3],[X.H4,g.H4],[X.H5,g.H5],[X.H6,g.H6],[X.HEAD,g.HEAD],[X.HEADER,g.HEADER],[X.HGROUP,g.HGROUP],[X.HR,g.HR],[X.HTML,g.HTML],[X.I,g.I],[X.IMG,g.IMG],[X.IMAGE,g.IMAGE],[X.INPUT,g.INPUT],[X.IFRAME,g.IFRAME],[X.KEYGEN,g.KEYGEN],[X.LABEL,g.LABEL],[X.LI,g.LI],[X.LINK,g.LINK],[X.LISTING,g.LISTING],[X.MAIN,g.MAIN],[X.MALIGNMARK,g.MALIGNMARK],[X.MARQUEE,g.MARQUEE],[X.MATH,g.MATH],[X.MENU,g.MENU],[X.META,g.META],[X.MGLYPH,g.MGLYPH],[X.MI,g.MI],[X.MO,g.MO],[X.MN,g.MN],[X.MS,g.MS],[X.MTEXT,g.MTEXT],[X.NAV,g.NAV],[X.NOBR,g.NOBR],[X.NOFRAMES,g.NOFRAMES],[X.NOEMBED,g.NOEMBED],[X.NOSCRIPT,g.NOSCRIPT],[X.OBJECT,g.OBJECT],[X.OL,g.OL],[X.OPTGROUP,g.OPTGROUP],[X.OPTION,g.OPTION],[X.P,g.P],[X.PARAM,g.PARAM],[X.PLAINTEXT,g.PLAINTEXT],[X.PRE,g.PRE],[X.RB,g.RB],[X.RP,g.RP],[X.RT,g.RT],[X.RTC,g.RTC],[X.RUBY,g.RUBY],[X.S,g.S],[X.SCRIPT,g.SCRIPT],[X.SEARCH,g.SEARCH],[X.SECTION,g.SECTION],[X.SELECT,g.SELECT],[X.SOURCE,g.SOURCE],[X.SMALL,g.SMALL],[X.SPAN,g.SPAN],[X.STRIKE,g.STRIKE],[X.STRONG,g.STRONG],[X.STYLE,g.STYLE],[X.SUB,g.SUB],[X.SUMMARY,g.SUMMARY],[X.SUP,g.SUP],[X.TABLE,g.TABLE],[X.TBODY,g.TBODY],[X.TEMPLATE,g.TEMPLATE],[X.TEXTAREA,g.TEXTAREA],[X.TFOOT,g.TFOOT],[X.TD,g.TD],[X.TH,g.TH],[X.THEAD,g.THEAD],[X.TITLE,g.TITLE],[X.TR,g.TR],[X.TRACK,g.TRACK],[X.TT,g.TT],[X.U,g.U],[X.UL,g.UL],[X.SVG,g.SVG],[X.VAR,g.VAR],[X.WBR,g.WBR],[X.XMP,g.XMP]]);function ds(e){var t;return(t=nR.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const fe=g,rR={[ue.HTML]:new Set([fe.ADDRESS,fe.APPLET,fe.AREA,fe.ARTICLE,fe.ASIDE,fe.BASE,fe.BASEFONT,fe.BGSOUND,fe.BLOCKQUOTE,fe.BODY,fe.BR,fe.BUTTON,fe.CAPTION,fe.CENTER,fe.COL,fe.COLGROUP,fe.DD,fe.DETAILS,fe.DIR,fe.DIV,fe.DL,fe.DT,fe.EMBED,fe.FIELDSET,fe.FIGCAPTION,fe.FIGURE,fe.FOOTER,fe.FORM,fe.FRAME,fe.FRAMESET,fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6,fe.HEAD,fe.HEADER,fe.HGROUP,fe.HR,fe.HTML,fe.IFRAME,fe.IMG,fe.INPUT,fe.LI,fe.LINK,fe.LISTING,fe.MAIN,fe.MARQUEE,fe.MENU,fe.META,fe.NAV,fe.NOEMBED,fe.NOFRAMES,fe.NOSCRIPT,fe.OBJECT,fe.OL,fe.P,fe.PARAM,fe.PLAINTEXT,fe.PRE,fe.SCRIPT,fe.SECTION,fe.SELECT,fe.SOURCE,fe.STYLE,fe.SUMMARY,fe.TABLE,fe.TBODY,fe.TD,fe.TEMPLATE,fe.TEXTAREA,fe.TFOOT,fe.TH,fe.THEAD,fe.TITLE,fe.TR,fe.TRACK,fe.UL,fe.WBR,fe.XMP]),[ue.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[ue.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[ue.XLINK]:new Set,[ue.XML]:new Set,[ue.XMLNS]:new Set},Sh=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var O;(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"})(O||(O={}));const Ft={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function iR(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Fa(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function oR(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function Oi(e){return oR(e)||Fa(e)}function Ly(e){return Oi(e)||iR(e)}function Fl(e){return e+32}function Dy(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function My(e){return Dy(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function sR(e){return e===N.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:Ny(e)?te.surrogateCharacterReference:Iy(e)?te.noncharacterCharacterReference:Oy(e)||e===N.CARRIAGE_RETURN?te.controlCharacterReference:null}class aR{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=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Y3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new eR(W3,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=sR(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.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:Qe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Qe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Qe.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(Ry(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.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=ds(t.tagName),t.type===Qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.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 Qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Qe.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:Qe.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=Dy(t)?Qe.WHITESPACE_CHARACTER:t===N.NULL?Qe.NULL_CHARACTER:Qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?di.Attribute:di.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=O.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Oi(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Oi(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=O.DATA;break}case N.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=vt;break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Fa(t)?Fl(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Oi(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=O.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Oi(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Oi(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Oi(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Oi(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Bn.SCRIPT,!1)&&My(this.preprocessor.peek(Bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Bn.SCRIPT,!1)&&My(this.preprocessor.peek(Bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=vt;break}default:this.currentAttr.name+=String.fromCodePoint(Fa(t)?Fl(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.data+=vt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Bn.DASH_DASH,!0)?(this._createCommentToken(Bn.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(Bn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Bn.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(Bn.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Bn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.data+=vt;break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(te.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=O.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Fa(t))this._createDoctypeToken(String.fromCharCode(Fl(t))),this.state=O.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(vt),this.state=O.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.EOF:{this._err(te.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=O.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.name+=vt;break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Fa(t)?Fl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Bn.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Bn.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.EOF:{this._err(te.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 N.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.EOF:{this._err(te.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.EOF:{this._err(te.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 N.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.EOF:{this._err(te.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case N.NULL:{this._err(te.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=O.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.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(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ly(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ly(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Fy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),By=new Set([...Fy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Bl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),uR=new Set([...Bl,g.OL,g.UL]),lR=new Set([...Bl,g.BUTTON]),Uy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Hy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),cR=new Set([g.TR,g.TEMPLATE,g.HTML]),dR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),fR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),hR=new Set([g.TD,g.TH]);class pR{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=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ue.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 o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===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])!==ue.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Sh,ue.HTML)}popUntilTableCellPopped(){this.popUntilPopped(hR,ue.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(fR,ue.HTML)}clearBackToTableBodyContext(){this.clearBackTo(dR,ue.HTML)}clearBackToTableRowContext(){this.clearBackTo(cR,ue.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]===g.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]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ue.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ue.SVG:{if(Hy.has(o))return!1;break}case ue.MATHML:{if(Uy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Bl)}hasInListItemScope(t){return this.hasInDynamicScope(t,uR)}hasInButtonScope(t){return this.hasInDynamicScope(t,lR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ue.HTML:{if(Sh.has(n))return!0;if(Bl.has(n))return!1;break}case ue.SVG:{if(Hy.has(n))return!1;break}case ue.MATHML:{if(Uy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ue.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ue.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ue.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Fy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&By.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&By.has(this.currentTagId);)this.pop()}}const xh=3;var jr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(jr||(jr={}));const zy={type:jr.Marker};class mR{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===jr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<xh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<xh)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=xh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(zy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:jr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:jr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(zy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===jr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===jr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===jr.Element&&n.element===t)}}const Ii={createDocument(){return{nodeName:"#document",mode:cr.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 o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ii.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(Ii.isTextNode(n)){n.value+=t;return}}Ii.appendChild(e,Ii.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ii.isTextNode(r)?r.value+=t:Ii.insertBefore(e,Ii.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=F(F({},e.sourceCodeLocation),t)}},jy="html",gR="about:legacy-compat",ER="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",$y=["+//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//"],yR=[...$y,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],bR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Vy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],TR=[...Vy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function qy(e,t){return t.some(n=>e.startsWith(n))}function _R(e){return e.name===jy&&e.publicId===null&&(e.systemId===null||e.systemId===gR)}function SR(e){if(e.name!==jy)return cr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===ER)return cr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),bR.has(n))return cr.QUIRKS;let r=t===null?yR:$y;if(qy(n,r))return cr.QUIRKS;if(r=t===null?Vy:TR,qy(n,r))return cr.LIMITED_QUIRKS}return cr.NO_QUIRKS}const Yy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},xR="definitionurl",wR="definitionURL",AR=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])),vR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ue.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ue.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ue.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ue.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ue.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ue.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ue.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ue.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ue.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ue.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ue.XMLNS}]]),CR=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])),kR=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function PR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===mo.COLOR||r===mo.SIZE||r===mo.FACE)||kR.has(t)}function Wy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===xR){e.attrs[t].name=wR;break}}function Gy(e){for(let t=0;t<e.attrs.length;t++){const n=AR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function wh(e){for(let t=0;t<e.attrs.length;t++){const n=vR.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 NR(e){const t=CR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ds(e.tagName))}function OR(e,t){return t===ue.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function IR(e,t,n){if(t===ue.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===mo.ENCODING){const o=n[r].value.toLowerCase();return o===Yy.TEXT_HTML||o===Yy.APPLICATION_XML}}return t===ue.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function RR(e,t,n,r){return(!r||r===ue.HTML)&&IR(e,t,n)||(!r||r===ue.MATHML)&&OR(e,t)}const LR="hidden",DR=8,MR=3;var M;(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"})(M||(M={}));const FR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Xy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Ky={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ii,onParseError:null};class Qy{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.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=F(F({},Ky),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new aR(this.options,this),this.activeFormattingElements=new mR(this.treeAdapter),this.fragmentContextID=r?ds(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new pR(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=F(F({},Ky),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,ue.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ue.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.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 o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:FR,u={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(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ue.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ue.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=Ft.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)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ue.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Ft.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ft.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ft.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ft.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&pe(F({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,ue.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ue.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(X.HTML,ue.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,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,o=this.treeAdapter.getTagName(t),a=n.type===Qe.END_TAG&&o===n.tagName?{endTag:F({},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===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ue.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ue.HTML)}_processToken(t){switch(t.type){case Qe.CHARACTER:{this.onCharacter(t);break}case Qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Qe.COMMENT:{this.onComment(t);break}case Qe.DOCTYPE:{this.onDoctype(t);break}case Qe.START_TAG:{this._processStartTag(t);break}case Qe.END_TAG:{this.onEndTag(t);break}case Qe.EOF:{this.onEof(t);break}case Qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return RR(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===jr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];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=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=M.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=M.IN_TABLE;return}case g.BODY:{this.insertionMode=M.IN_BODY;return}case g.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return Xy.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ue.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.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 rR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){h6(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{Ua(this,t);break}case M.BEFORE_HEAD:{Ha(this,t);break}case M.IN_HEAD:{za(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ja(this,t);break}case M.AFTER_HEAD:{$a(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{Zy(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{kh(this,t);break}case M.IN_TABLE_TEXT:{ab(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){f6(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{Ua(this,t);break}case M.BEFORE_HEAD:{Ha(this,t);break}case M.IN_HEAD:{za(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ja(this,t);break}case M.AFTER_HEAD:{$a(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{kh(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){vh(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{vh(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.AFTER_BODY:{VR(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{qR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{YR(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?p6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{WR(this,t);break}case M.BEFORE_HEAD:{XR(this,t);break}case M.IN_HEAD:{wr(this,t);break}case M.IN_HEAD_NO_SCRIPT:{JR(this,t);break}case M.AFTER_HEAD:{eL(this,t);break}case M.IN_BODY:{_n(this,t);break}case M.IN_TABLE:{fs(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.IN_CAPTION:{KL(this,t);break}case M.IN_COLUMN_GROUP:{Ph(this,t);break}case M.IN_TABLE_BODY:{jl(this,t);break}case M.IN_ROW:{$l(this,t);break}case M.IN_CELL:{ZL(this,t);break}case M.IN_SELECT:{cb(this,t);break}case M.IN_SELECT_IN_TABLE:{t6(this,t);break}case M.IN_TEMPLATE:{r6(this,t);break}case M.AFTER_BODY:{o6(this,t);break}case M.IN_FRAMESET:{s6(this,t);break}case M.AFTER_FRAMESET:{u6(this,t);break}case M.AFTER_AFTER_BODY:{c6(this,t);break}case M.AFTER_AFTER_FRAMESET:{d6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?m6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{GR(this,t);break}case M.BEFORE_HEAD:{KR(this,t);break}case M.IN_HEAD:{QR(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ZR(this,t);break}case M.AFTER_HEAD:{tL(this,t);break}case M.IN_BODY:{Hl(this,t);break}case M.TEXT:{HL(this,t);break}case M.IN_TABLE:{Va(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.IN_CAPTION:{QL(this,t);break}case M.IN_COLUMN_GROUP:{JL(this,t);break}case M.IN_TABLE_BODY:{Nh(this,t);break}case M.IN_ROW:{lb(this,t);break}case M.IN_CELL:{e6(this,t);break}case M.IN_SELECT:{db(this,t);break}case M.IN_SELECT_IN_TABLE:{n6(this,t);break}case M.IN_TEMPLATE:{i6(this,t);break}case M.AFTER_BODY:{hb(this,t);break}case M.IN_FRAMESET:{a6(this,t);break}case M.AFTER_FRAMESET:{l6(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{Ua(this,t);break}case M.BEFORE_HEAD:{Ha(this,t);break}case M.IN_HEAD:{za(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ja(this,t);break}case M.AFTER_HEAD:{$a(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{ob(this,t);break}case M.TEXT:{zL(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.IN_TEMPLATE:{fb(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Ch(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.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 M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Jy(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{kh(this,t);break}case M.IN_TABLE_TEXT:{sb(this,t);break}}}}function BR(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):ib(e,t),n}function UR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function HR(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=MR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=zR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function zR(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 jR(e,t,n){const r=e.treeAdapter.getTagName(t),o=ds(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===ue.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function $R(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function Ah(e,t){for(let n=0;n<DR;n++){const r=BR(e,t);if(!r)break;const o=UR(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=HR(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&jR(e,u,a),$R(e,o,r)}}function vh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function VR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function qR(e,t){e._appendCommentNode(t,e.document)}function Ch(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],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function YR(e,t){e._setDocumentType(t);const n=t.forceQuirks?cr.QUIRKS:SR(t);_R(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Ba(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,cr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function WR(e,t){t.tagID===g.HTML?(e._insertElement(t,ue.HTML),e.insertionMode=M.BEFORE_HEAD):Ua(e,t)}function GR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ua(e,t)}function Ua(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function XR(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.HEAD:{e._insertElement(t,ue.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:Ha(e,t)}}function KR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Ha(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ha(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function wr(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Ft.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ft.RAWTEXT):(e._insertElement(t,ue.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ft.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ft.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:za(e,t)}}function QR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{za(e,t);break}case g.TEMPLATE:{go(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function go(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function za(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function JR(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{wr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:ja(e,t)}}function ZR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{ja(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function ja(e,t){const n=t.type===Qe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function eL(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.BODY:{e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ue.HTML),e.insertionMode=M.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),wr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:$a(e,t)}}function tL(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{$a(e,t);break}case g.TEMPLATE:{go(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function $a(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Ul(e,t)}function Ul(e,t){switch(t.type){case Qe.CHARACTER:{Zy(e,t);break}case Qe.WHITESPACE_CHARACTER:{Jy(e,t);break}case Qe.COMMENT:{vh(e,t);break}case Qe.START_TAG:{_n(e,t);break}case Qe.END_TAG:{Hl(e,t);break}case Qe.EOF:{ob(e,t);break}}}function Jy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Zy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function nL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function rL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function iL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_FRAMESET)}function oL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML)}function sL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Sh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ue.HTML)}function aL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function uL(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),n||(e.formElement=e.openElements.current))}function lL(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===g.LI&&o===g.LI||(n===g.DD||n===g.DT)&&(o===g.DD||o===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==g.ADDRESS&&o!==g.DIV&&o!==g.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML)}function cL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.tokenizer.state=Ft.PLAINTEXT}function dL(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.framesetOk=!1}function fL(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Ah(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pL(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Ah(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function gL(e,t){e.treeAdapter.getDocumentMode(e.document)!==cr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function eb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ue.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function tb(e){const t=Ry(e,mo.TYPE);return t!=null&&t.toLowerCase()===LR}function EL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ue.HTML),tb(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function yL(e,t){e._appendElement(t,ue.HTML),t.ackSelfClosing=!0}function bL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ue.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TL(e,t){t.tagName=X.IMG,t.tagID=g.IMG,eb(e,t)}function _L(e,t){e._insertElement(t,ue.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ft.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function SL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function xL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function nb(e,t){e._switchToTextParsing(t,Ft.RAWTEXT)}function wL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function AL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML)}function vL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ue.HTML)}function CL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ue.HTML)}function kL(e,t){e._reconstructActiveFormattingElements(),Wy(t),wh(t),t.selfClosing?e._appendElement(t,ue.MATHML):e._insertElement(t,ue.MATHML),t.ackSelfClosing=!0}function PL(e,t){e._reconstructActiveFormattingElements(),Gy(t),wh(t),t.selfClosing?e._appendElement(t,ue.SVG):e._insertElement(t,ue.SVG),t.ackSelfClosing=!0}function rb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML)}function _n(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{hL(e,t);break}case g.A:{fL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{sL(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{oL(e,t);break}case g.LI:case g.DD:case g.DT:{lL(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{eb(e,t);break}case g.HR:{bL(e,t);break}case g.RB:case g.RTC:{vL(e,t);break}case g.RT:case g.RP:{CL(e,t);break}case g.PRE:case g.LISTING:{aL(e,t);break}case g.XMP:{SL(e,t);break}case g.SVG:{PL(e,t);break}case g.HTML:{nL(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{wr(e,t);break}case g.BODY:{rL(e,t);break}case g.FORM:{uL(e,t);break}case g.NOBR:{pL(e,t);break}case g.MATH:{kL(e,t);break}case g.TABLE:{gL(e,t);break}case g.INPUT:{EL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{yL(e,t);break}case g.IMAGE:{TL(e,t);break}case g.BUTTON:{dL(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{mL(e,t);break}case g.IFRAME:{xL(e,t);break}case g.SELECT:{wL(e,t);break}case g.OPTION:case g.OPTGROUP:{AL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{nb(e,t);break}case g.FRAMESET:{iL(e,t);break}case g.TEXTAREA:{_L(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?nb(e,t):rb(e,t);break}case g.PLAINTEXT:{cL(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:rb(e,t)}}function NL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function OL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,hb(e,t))}function IL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function RL(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function LL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function DL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function ML(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function FL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function BL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function UL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function ib(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Hl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{Ah(e,t);break}case g.P:{LL(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{IL(e,t);break}case g.LI:{DL(e);break}case g.DD:case g.DT:{ML(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{FL(e);break}case g.BR:{UL(e);break}case g.BODY:{NL(e,t);break}case g.HTML:{OL(e,t);break}case g.FORM:{RL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{BL(e,t);break}case g.TEMPLATE:{go(e,t);break}default:ib(e,t)}}function ob(e,t){e.tmplInsertionModeStack.length>0?fb(e,t):Ch(e,t)}function HL(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function zL(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function kh(e,t){if(e.openElements.currentTagId!==void 0&&Xy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Qe.CHARACTER:{ab(e,t);break}case Qe.WHITESPACE_CHARACTER:{sb(e,t);break}}else qa(e,t)}function jL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_CAPTION}function $L(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function VL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t)}function qL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_TABLE_BODY}function YL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,jl(e,t)}function WL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function GL(e,t){tb(t)?e._appendElement(t,ue.HTML):qa(e,t),t.ackSelfClosing=!0}function XL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ue.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function fs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{YL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{wr(e,t);break}case g.COL:{VL(e,t);break}case g.FORM:{XL(e,t);break}case g.TABLE:{WL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{qL(e,t);break}case g.INPUT:{GL(e,t);break}case g.CAPTION:{jL(e,t);break}case g.COLGROUP:{$L(e,t);break}default:qa(e,t)}}function Va(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{go(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:qa(e,t)}}function qa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ul(e,t),e.fosterParentingEnabled=n}function sb(e,t){e.pendingCharacterTokens.push(t)}function ab(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ya(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)qa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ub=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function KL(e,t){const n=t.tagID;ub.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,fs(e,t)):_n(e,t)}function QL(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===g.TABLE&&Va(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Hl(e,t)}}function Ph(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.COL:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{wr(e,t);break}default:zl(e,t)}}function JL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TEMPLATE:{go(e,t);break}case g.COL:break;default:zl(e,t)}}function zl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function jl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=M.IN_ROW,$l(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,fs(e,t));break}default:fs(e,t)}}function Nh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Va(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:Va(e,t)}}function $l(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,jl(e,t));break}default:fs(e,t)}}function lb(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Nh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Nh(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Va(e,t)}}function ZL(e,t){const n=t.tagID;ub.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),$l(e,t)):_n(e,t)}function e6(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),lb(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Hl(e,t)}}function cb(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,ue.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ue.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{wr(e,t);break}}}function db(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{go(e,t);break}}}function t6(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):cb(e,t)}function n6(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):db(e,t)}function r6(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{wr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,fs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,jl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,$l(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,_n(e,t)}}function i6(e,t){t.tagID===g.TEMPLATE&&go(e,t)}function fb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ch(e,t)}function o6(e,t){t.tagID===g.HTML?_n(e,t):Vl(e,t)}function hb(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.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 Vl(e,t)}function Vl(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function s6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.FRAMESET:{e._insertElement(t,ue.HTML);break}case g.FRAME:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{wr(e,t);break}}}function a6(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function u6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.NOFRAMES:{wr(e,t);break}}}function l6(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function c6(e,t){t.tagID===g.HTML?_n(e,t):ql(e,t)}function ql(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function d6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.NOFRAMES:{wr(e,t);break}}}function f6(e,t){t.chars=vt,e._insertCharacters(t)}function h6(e,t){e._insertCharacters(t),e.framesetOk=!1}function pb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ue.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function p6(e,t){if(PR(t))pb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ue.MATHML?Wy(t):r===ue.SVG&&(NR(t),Gy(t)),wh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function m6(e,t){if(t.tagID===g.P||t.tagID===g.BR){pb(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)===ue.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const g6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,E6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),mb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function gb(e,t){const n=C6(e),r=ky("type",{handlers:{root:y6,element:b6,text:T6,comment:yb,doctype:_6,raw:x6},unknown:w6}),o={parser:n?new Qy(mb):Qy.getFragmentParser(void 0,mb),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),hs(o,Hr());const a=n?o.parser.document:o.parser.getFragment(),u=y3(a,{file:o.options.file});return o.stitches&&Ll(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Eb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function y6(e,t){Eb(e.children,t)}function b6(e,t){A6(e,t),Eb(e.children,t),v6(e,t)}function T6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Qe.CHARACTER,chars:e.value,location:Wa(e)};hs(t,Hr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function _6(e,t){const n={type:Qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Wa(e)};hs(t,Hr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function S6(e,t){t.stitches=!0;const n=k6(e);if("children"in e&&"children"in n){const r=gb({type:"root",children:e.children},t.options);n.children=r.children}yb({type:"comment",value:{stitch:n}},t)}function yb(e,t){const n=e.value,r={type:Qe.COMMENT,data:n,location:Wa(e)};hs(t,Hr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function x6(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,bb(t,Hr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(g6,"<$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 w6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))S6(n,t);else{let r="";throw E6.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 hs(e,t){bb(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=Ft.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 bb(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 A6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ft.PLAINTEXT)return;hs(t,Hr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:ho.html;o===ho.html&&n==="svg"&&(o=ho.svg);const a=R3(pe(F({},e),{children:[]}),{space:o===ho.svg?"svg":"html"}),u={type:Qe.START_TAG,tagName:n,tagID:ds(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Wa(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function v6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&z3.includes(n)||t.parser.tokenizer.state===Ft.PLAINTEXT)return;hs(t,xl(e));const r={type:Qe.END_TAG,tagName:n,tagID:ds(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Wa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ft.RCDATA||t.parser.tokenizer.state===Ft.RAWTEXT||t.parser.tokenizer.state===Ft.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ft.DATA)}function C6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Wa(e){const t=Hr(e)||{line:void 0,column:void 0,offset:void 0},n=xl(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 k6(e){return"children"in e?fo(pe(F({},e),{children:[]})):fo(e)}function Tb(e){return function(t,n){return gb(t,pe(F({},e),{file:n}))}}const Eo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],_b={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Eo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Eo],h2:[["className","sr-only"]],img:[...Eo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Eo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Eo],table:[...Eo],ul:[...Eo,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Ri={}.hasOwnProperty;function P6(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},_b),t):_b,stack:[]},o=Sb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Sb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return N6(e,n);case"doctype":return O6(e,n);case"element":return I6(e,n);case"root":return R6(e,n);case"text":return L6(e,n)}}}function N6(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Ga(a,t),a}}function O6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ga(n,t),n}}function I6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=xb(e,t.children),o=D6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Ri.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Ga(u,t),u}function R6(e,t){const r={type:"root",children:xb(e,t.children)};return Ga(r,t),r}function L6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ga(r,t),r}function xb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Sb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function D6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ri.call(r,n)?r[n]:void 0,u=r&&Ri.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ri.call(c,f)){const p=c[f];let m=wb(e,vb(a,f),f,p);m==null&&(m=wb(e,vb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Ri.call(o,n)){const p=o[n];for(f in p)Ri.call(p,f)&&!Ri.call(d,f)&&(d[f]=p[f])}return d}function wb(e,t,n,r){return t?Array.isArray(r)?M6(e,t,n,r):Ab(e,t,n,r):void 0}function M6(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Ab(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Ab(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&F6(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function F6(e,t,n){const r=e.schema.protocols&&Ri.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function Ga(e,t){const n=aE(t);t.data&&(e.data=fo(t.data)),n&&(e.position=n)}function vb(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function B6(e){return function(t){return P6(t,e)}}const Cb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return x.jsx("a",pe(F(F({className:W(e,`${z}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},U6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=rt();return!e&&!t?null:x.jsx("div",{className:W(n,`${z}-disclaimer`),children:t?x.jsx(uy,{rehypePlugins:[Tb,B6],components:{ul:({children:r})=>x.jsx("ul",{className:W(n,`${z}-ul`),children:r}),ol:({children:r})=>x.jsx("ol",{className:W(n,`${z}-ol`),children:r}),li:({children:r})=>x.jsx("li",{className:W(n,`${z}-li`),children:r}),a:({href:r,title:o,children:a})=>x.jsx(Cb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>x.jsx("img",{className:W(n,`${z}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>x.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>x.jsx("span",{className:W(n,`${z}-disclaimer-text-span`),children:r})},children:t}):x.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:e})})},Oh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=ar(),{setImageFile:u}=Qo(),{logger:c,globalClassName:d,searchConfig:f,features:p}=rt(),m=B.useRef(null),T=B.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",w=!!o||!1,C=w?"connected":"disconnected",A=t||!w,P=()=>a?new Promise((D,q)=>{const re=new FileReader;re.readAsDataURL(a),re.onload=()=>D(re.result),re.onerror=me=>q(me)}):Promise.resolve(""),v=D=>Je(null,null,function*(){var me;if(A)return;const q=10*1024*1024,re=(me=D.target.files)==null?void 0:me[0];if(re){if(re.size>q){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(re)}}),H=()=>{u(null),T.current&&(T.current.value="")},Y=D=>Je(null,null,function*(){var me;D.preventDefault();const q=(((me=m.current)==null?void 0:me.value)||"").trim();let re="";try{re=yield P()}catch(V){c==null||c.error("Error converting file to base64:",V),alert("There was an error processing the file. Please try again.");return}q&&(H(),m.current.value="",r(q,re))});return x.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&x.jsxs("div",{className:W(d,`cim-${n}-component`,`${z}-image-file-preview`),children:[x.jsx("img",{className:W(d,`cim-${n}-component`,`${z}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),x.jsx("span",{className:W(d,`cim-${n}-component`,`${z}-image-file-name`),title:_,children:_}),x.jsx(H1,{className:W(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:H})]}),x.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:Y,children:[x.jsx("span",{role:"status",className:W(`${z}-connection-status-icon`,C)}),y&&x.jsxs("div",{role:"button",className:W(d,e,`cim-${n}-component`,A&&"disabled",`${z}-image-upload-button`),"aria-disabled":A,tabIndex:0,children:[x.jsx("label",{className:W(d,e,`cim-${n}-component`,A&&"disabled",`${z}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:x.jsx(tP,{})}),x.jsx("input",{className:W(d,e,`cim-${n}-component`,`${z}-file-input`),type:"file",ref:T,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${z}-file-input`,disabled:A,onInput:v})]}),x.jsx("input",{className:W(d,e,`cim-${n}-component`,`${z}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,name:`${z}-user-input`}),x.jsx(aP,{isLoading:A}),x.jsx(iP,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:A})]}),x.jsx(U6,{})]})};function H6(e){return At({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function z6(e){return At({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const kb=B.createContext({isOpen:!1}),Ih=B.createContext(null),Pb=B.createContext(null),ps=()=>{var n,r;const e=B.useContext(Ih),t=B.useContext(Pb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Nb=({onClearChat:e,componentType:t})=>{const n=ps(),r=()=>{e(),n()};return x.jsxs("button",{className:W(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[x.jsx(z6,{}),"Clear chat"]})};function j6(e){return e==null?[]:Array.isArray(e)?e:[e]}var $6=(e,...t)=>e.concat(t),V6=(e,...t)=>e.filter(n=>!t.includes(n)),q6=e=>Array.from(new Set(e));function Ob(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function Y6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return Ob(e,t,{step:-r,loop:o})}var W6=e=>Array.isArray(e),Ib=e=>e!=null&&typeof e=="object",G6=e=>Ib(e)&&!W6(e),Yl=e=>typeof e=="string",ms=e=>typeof e=="function",X6=e=>e==null,K6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Q6=e=>Object.prototype.toString.call(e),Rb=Function.prototype.toString,J6=Rb.call(Object),Z6=e=>{if(!Ib(e)||Q6(e)!="[object Object]"||n4(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=K6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Rb.call(n)==J6},e4=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,t4=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,n4=e=>e4(e)||t4(e),r4=e=>e(),i4=()=>{},Rh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function o4(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:s4,max:a4}=Math,u4=e=>Number.isNaN(e),l4=e=>u4(e)?0:e,Lb=(e,t,n)=>s4(a4(l4(e),t),n);function Lh(e){if(!Z6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Lh(o))}return n}function Dh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function c4(e,t){if(e==null)throw new Error(t())}function d4(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var f4=Object.defineProperty,h4=(e,t,n)=>t in e?f4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mh=(e,t,n)=>h4(e,typeof t!="symbol"?t+"":t,n),Db=()=>{},Wl=e=>typeof e=="object"&&e!==null,gs=e=>e?"":void 0,Mb=e=>e?"true":void 0,p4=1,m4=9,g4=11,tn=e=>Wl(e)&&e.nodeType===p4&&typeof e.nodeName=="string",Gl=e=>Wl(e)&&e.nodeType===m4,E4=e=>Wl(e)&&e===e.window,Fb=e=>tn(e)?e.localName||"":"#document";function y4(e){return["html","body","#document"].includes(Fb(e))}var b4=e=>Wl(e)&&e.nodeType!==void 0,yo=e=>b4(e)&&e.nodeType===g4&&"host"in e,T4=e=>tn(e)&&e.localName==="input",_4=e=>tn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Xa(e){if(!e)return!1;const t=e.getRootNode();return bs(t)===e}var S4=/(textarea|select)/;function x4(e){if(e==null||!tn(e))return!1;try{return T4(e)&&e.selectionStart!=null||S4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Es(e,t){var r;if(!e||!t||!tn(e)||!tn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&yo(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function $r(e){var t;return Gl(e)?e:E4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function w4(e){return $r(e).documentElement}function ys(e){var t,n,r;return yo(e)?ys(e.host):Gl(e)?(t=e.defaultView)!=null?t:window:tn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function bs(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function A4(e){if(Fb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yo(e)&&e.host||w4(e);return yo(t)?t.host:t}function Fh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gl(t)||yo(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Bh=new WeakMap;function Ts(e){return Bh.has(e)||Bh.set(e,ys(e).getComputedStyle(e)),Bh.get(e)}var Uh=new Set(["menu","listbox","dialog","grid","tree","region"]),v4=e=>Uh.has(e),Bb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Ub(e,t){const n=new Set,r=Fh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Bb(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(m&&v4(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Hb(e,t){const n=Fh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Bb(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";m&&Uh.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function C4(e){const t=new Set;return Hb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function k4(e){const t=e.getAttribute("role");return!!(t&&Uh.has(t))}function P4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function N4(e){var t;return P4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function O4(e){if(!e.id)return!1;const t=Fh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&k4(e))}var Hh=()=>typeof document!="undefined";function I4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var zh=e=>Hh()&&e.test(I4()),R4=e=>Hh()&&e.test(navigator.vendor),zb=()=>Hh()&&!!navigator.maxTouchPoints,L4=()=>zh(/^iPhone/i),D4=()=>zh(/^iPad/i)||jh()&&navigator.maxTouchPoints>1,Xl=()=>L4()||D4(),M4=()=>jh()||Xl(),jh=()=>zh(/^Mac/i),F4=()=>M4()&&R4(/apple/i);function B4(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Ar(e){var n;const t=B4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var jb=e=>e.button===0,U4=e=>e.button===2||jh()&&e.ctrlKey&&e.button===0,H4=e=>"touches"in e&&e.touches.length>0,z4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},$b={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function j4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=z4[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in $b&&(o=$b[o]),o}function Vb(e,t="client"){const n=H4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var nn=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},qb=e=>tn(e)&&e.tagName==="IFRAME",$4=/^(audio|video|details)$/;function Yb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var V4=e=>!Number.isNaN(Yb(e)),q4=e=>Yb(e)<0;function Y4(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function Wb(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const f=Y4(d,t);if(f){const p=Array.from(f.querySelectorAll(Kl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,_)=>{u.set(y,T+_)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,T+_)})}o.push(...p)}}return r}var Kl="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",Gb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));(n==!0||n=="if-empty"&&o.length===0)&&tn(e)&&Vr(e)&&o.unshift(e);const u=[];for(const c of o)if(Vr(c)){if(qb(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Gb(d,{getShadowRoot:r}));continue}u.push(c)}return r?Wb(u,r,Vr):u};function Vr(e){return!tn(e)||e.closest("[inert]")?!1:e.matches(Kl)&&_4(e)}function _s(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));n&&bo(e)&&o.unshift(e);const a=[];for(const u of o)if(bo(u)){if(qb(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(..._s(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Wb(a,r,bo);return!u.length&&n?o:u}return!a.length&&n?o:a}function bo(e){return tn(e)&&e.tabIndex>0?!0:Vr(e)&&!q4(e)}function W4(e,t={}){const n=_s(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function G4(e,t={}){const{current:n,getShadowRoot:r}=t,o=_s(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:bs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Ka(e){return e.tabIndex<0&&($4.test(e.localName)||x4(e))&&!V4(e)?0:e.tabIndex}function Xb(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=_s(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var X4=class e2{constructor(){Mh(this,"id",null),Mh(this,"fn_cleanup"),Mh(this,"cleanup",()=>{this.cancel()})}static create(){return new e2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function Yt(e){const t=X4.create();return t.request(e),t.cleanup}function Kb(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function $h(e){const t=A4(e);return y4(t)?$r(t).body:tn(t)&&J4(t)?t:$h(t)}var K4=/auto|scroll|overlay|hidden|clip/,Q4=new Set(["inline","contents"]);function J4(e){const t=ys(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return K4.test(n+o+r)&&!Q4.has(a)}var Ss="default",Vh="",Ql=new WeakMap;function Z4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Xl()?(Ss==="default"&&(Vh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Ss="disabled"):t&&(Ql.set(t,t.style.userSelect),t.style.userSelect="none"),()=>eD({target:t,doc:r})}function eD(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Xl()){if(Ss!=="disabled")return;Ss="restoring",setTimeout(()=>{Kb(()=>{Ss==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Vh||""),Vh="",Ss="default")})},300)}else if(t&&Ql.has(t)){const a=Ql.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Ql.delete(t)}}function tD(e={}){const u=e,{defer:t,target:n}=u,r=mn(u,["defer","target"]),o=t?Yt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(Z4(pe(F({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function nD(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=Vb(c),f=Math.sqrt(oa(d.x,2)+oa(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=Vb(c);r({point:d,event:c})},u=[nn(e,"pointermove",o,!1),nn(e,"pointerup",a,!1),nn(e,"pointercancel",a,!1),nn(e,"contextmenu",a,!1),tD({doc:e})];return()=>{u.forEach(c=>c())}}function rD(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=W4(e,{includeContainer:!0,getShadowRoot:a}),y=G4(c,{current:n,getShadowRoot:a}),_=!m&&!T;f.shiftKey&&Xa(y)?(o==null||o(),p=T):f.shiftKey&&(Xa(m)||_)?p=n:!f.shiftKey&&Xa(n)?(o==null||o(),p=m):!f.shiftKey&&(Xa(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return nn(u,"keydown",d,!0)}function iD(e,t){const c=t,{defer:n,triggerElement:r}=c,o=mn(c,["defer","triggerElement"]),a=n?Yt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(rD(d,F({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function oD(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Jl(e,t){if(!e)return Db;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function sD(e,t,n){if(!e)return Db;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function aD(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),c(f))})}),()=>t.abort()]}function uD(e,t){const{timeout:n,rootNode:r}=t,o=ys(r),a=$r(r),u=new o.AbortController;return aD(new Promise(c=>{const d=e();if(d){c(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var lD=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),cD=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Qb=e=>{const t={};let n;for(;n=cD.exec(e);)t[n[1]]=n[2];return t},dD=(e,t)=>{if(Yl(e)){if(Yl(t))return`${e};${t}`;e=Qb(e)}else Yl(t)&&(t=Qb(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Wt(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Rh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=lD(t[o],n[o]);continue}if(o==="style"){t[o]=dD(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function WU(e){return e}var xs=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(xs||{}),qh="__init__";function fD(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>$r(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>bs(t()),a=u=>t().getElementById(u);return pe(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Xa,getById:a})}function hD(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ws=()=>e=>Array.from(new Set(e)),Jb=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Zl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=B.useState(t),[o,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(o);c.current=u?e().value:o;const d=B.useRef(c.current);Jb(()=>{d.current=c.current},[o,e().value]);const f=y=>{var C,A;const _=d.current,w=ms(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:w,prev:_}),u||a(w),n(w,_)||(A=(C=e()).onChange)==null||A.call(C,w,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Jo.flushSync:r4)(()=>f(y))},invoke(y,_){var w,C;(C=(w=e()).onChange)==null||C.call(w,y,_)},hash(y){var _,w,C;return(C=(w=(_=e()).hash)==null?void 0:w.call(_,y))!=null?C:String(y)}}}Zl.cleanup=e=>{B.useEffect(()=>e,[])},Zl.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function pD(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var mD=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function ec(e,t={}){var oe,ce,de,ne,Te,Pe;const n=B.useMemo(()=>{const{id:se,ids:K,getRootNode:ie}=t;return fD({id:se,ids:K,getRootNode:ie})},[t]),r=(...se)=>{e.debug&&console.log(...se)},o=(ce=(oe=e.props)==null?void 0:oe.call(e,{props:Lh(t),scope:n}))!=null?ce:t,a=gD(o),u=(de=e.context)==null?void 0:de.call(e,{prop:a,bindable:Zl,scope:n,flush:eT,getContext(){return d},getComputed(){return Y},getRefs(){return w},getEvent(){return y()}}),c=Zb(u),d={get(se){var K;return(K=c.current)==null?void 0:K[se].ref.current},set(se,K){var ie;(ie=c.current)==null||ie[se].set(K)},initial(se){var K;return(K=c.current)==null?void 0:K[se].initial},hash(se){var ie,k;const K=(ie=c.current)==null?void 0:ie[se].get();return(k=c.current)==null?void 0:k[se].hash(K)}},f=B.useRef(new Map),p=B.useRef(null),m=B.useRef(null),T=B.useRef({type:""}),y=()=>pe(F({},T.current),{current(){return T.current},previous(){return m.current}}),_=()=>pe(F({},D),{matches(...se){return se.includes(D.ref.current)},hasTag(se){var K,ie;return!!((ie=(K=e.states[D.ref.current])==null?void 0:K.tags)!=null&&ie.includes(se))}}),w=pD((Te=(ne=e.refs)==null?void 0:ne.call(e,{prop:a,context:d}))!=null?Te:{}),C=()=>({state:_(),context:d,event:y(),prop:a,send:V,action:A,guard:P,track:mD,refs:w,computed:Y,flush:eT,scope:n,choose:H}),A=se=>{const K=ms(se)?se(C()):se;if(!K)return;const ie=K.map(k=>{var ee,I;const L=(I=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:I[k];return L||Dh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),L});for(const k of ie)k==null||k(C())},P=se=>{var K,ie;return ms(se)?se(C()):(ie=(K=e.implementations)==null?void 0:K.guards)==null?void 0:ie[se](C())},v=se=>{const K=ms(se)?se(C()):se;if(!K)return;const ie=K.map(L=>{var I,Se;const ee=(Se=(I=e.implementations)==null?void 0:I.effects)==null?void 0:Se[L];return ee||Dh(`[zag-js] No implementation found for effect "${JSON.stringify(L)}"`),ee}),k=[];for(const L of ie){const ee=L==null?void 0:L(C());ee&&k.push(ee)}return()=>k.forEach(L=>L==null?void 0:L())},H=se=>j6(se).find(K=>{let ie=!K.guard;return Yl(K.guard)?ie=!!P(K.guard):ms(K.guard)&&(ie=K.guard(C())),ie}),Y=se=>{c4(e.computed,()=>"[zag-js] No computed object found on machine");const K=e.computed[se];return K({context:d,event:y(),prop:a,refs:w,scope:n,computed:Y})},D=Zl(()=>({defaultValue:e.initialState({prop:a}),onChange(se,K){var k,L,ee,I;if(K){const Se=f.current.get(K);Se==null||Se(),f.current.delete(K)}K&&A((k=e.states[K])==null?void 0:k.exit),A((L=p.current)==null?void 0:L.actions);const ie=v((ee=e.states[se])==null?void 0:ee.effects);if(ie&&f.current.set(se,ie),K===qh){A(e.entry);const Se=v(e.effects);Se&&f.current.set(qh,Se)}A((I=e.states[se])==null?void 0:I.entry)}})),q=B.useRef(void 0),re=B.useRef(xs.NotStarted);Jb(()=>{queueMicrotask(()=>{var L;const ie=re.current===xs.Started;re.current=xs.Started,r(ie?"rehydrating...":"initializing...");const k=(L=q.current)!=null?L:D.initial;D.invoke(k,ie?D.get():qh)});const se=f.current,K=D.ref.current;return()=>{r("unmounting..."),q.current=K,re.current=xs.Stopped,se.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const me=()=>"ref"in D?D.ref.current:D.get(),V=se=>{queueMicrotask(()=>{var I,Se,je,Ee,Be;if(re.current!==xs.Started)return;m.current=T.current,T.current=se;let K=me();const ie=(je=(I=e.states[K].on)==null?void 0:I[se.type])!=null?je:(Se=e.on)==null?void 0:Se[se.type],k=H(ie);if(!k)return;p.current=k;const L=(Ee=k.target)!=null?Ee:K;r("transition",se.type,k.target||K,`(${k.actions})`);const ee=L!==K;ee?Jo.flushSync(()=>D.set(L)):k.reenter&&!ee?D.invoke(K,K):A((Be=k.actions)!=null?Be:[])})};return(Pe=e.watch)==null||Pe.call(e,C()),{state:_(),send:V,context:d,prop:a,scope:n,refs:w,computed:Y,event:y(),getStatus:()=>re.current}}function Zb(e){const t=B.useRef(e);return t.current=e,t}function gD(e){const t=Zb(e);return function(r){return t.current[r]}}function eT(e){queueMicrotask(()=>{Jo.flushSync(()=>e())})}var Yh=hD(e=>e);function tc(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function ED(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Wh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=mn(f,["asChild","children"]);if(!o)return B.createElement(e,pe(F({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=ED(c);return B.cloneElement(c,pe(F({},Wt(u,c.props)),{ref:r?tc(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Sn=(()=>{const e=new Map;return new Proxy(Wh,{apply(t,n,r){return Wh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Wh(r)),e.get(r)}})})();function yD(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function To(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const m=new Error(a!=null?a:yD(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[bD,Gh]=To({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[tT,Qa]=To({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),nT=B.forwardRef((e,t)=>{const n=Gh(),r=Qa(),o=Wt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Sn.div,pe(F({},o),{ref:tc(r.ref,t)}))});nT.displayName="PopoverContent";const rT=B.forwardRef((e,t)=>{const n=Gh(),r=Qa(),o=Wt(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(Sn.div,pe(F({},o),{ref:t}))});rT.displayName="PopoverPositioner";const Ja=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},F({},e)]),iT=e=>Ja()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function TD(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var _D={props({props:e}){return pe(F({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Ts(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Yt(()=>{var c,d;const u=nc(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Yt(()=>{e.set("prevAnimationName",nc(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===o&&e.set("prevAnimationName",nc(t.get("styles")))},u=d=>{const f=nc(t.get("styles"));Ar(d)===o&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=Jl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),Kb(()=>c())}}}}};function nc(e){return(e==null?void 0:e.animationName)||"none"}ws()(["onExitComplete","present","immediate"]);function SD(e,t={}){const{sync:n=!1}=t,r=xD(e);return B.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function xD(e){const t=B.useRef(e);return t.current=e,t}const Xh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=mn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=pe(F({},a),{present:r,onExitComplete:SD(e.onExitComplete)}),d=ec(_D,c),f=TD(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var _o=(e,t=[])=>({parts:(...n)=>{if(wD(t))return _o(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>_o(e,[...t,...n]),omit:(...n)=>_o(e,t.filter(r=>!n.includes(r))),rename:n=>_o(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${As(e)}"][data-part="${As(r)}"]`,`& [data-scope="${As(e)}"][data-part="${As(r)}"]`].join(", "),attrs:{"data-scope":As(e),"data-part":As(r)}}}),{})}),As=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),wD=e=>e.length===0;const AD=["top","right","bottom","left"],Li=Math.min,Qn=Math.max,rc=Math.round,ic=Math.floor,qr=e=>({x:e,y:e}),vD={left:"right",right:"left",bottom:"top",top:"bottom"},CD={start:"end",end:"start"};function Kh(e,t,n){return Qn(e,Li(t,n))}function fi(e,t){return typeof e=="function"?e(t):e}function hi(e){return e.split("-")[0]}function vs(e){return e.split("-")[1]}function Qh(e){return e==="x"?"y":"x"}function Jh(e){return e==="y"?"height":"width"}const kD=new Set(["top","bottom"]);function Yr(e){return kD.has(hi(e))?"y":"x"}function Zh(e){return Qh(Yr(e))}function PD(e,t,n){n===void 0&&(n=!1);const r=vs(e),o=Zh(e),a=Jh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=oc(u)),[u,oc(u)]}function ND(e){const t=oc(e);return[ep(e),t,ep(t)]}function ep(e){return e.replace(/start|end/g,t=>CD[t])}const oT=["left","right"],sT=["right","left"],OD=["top","bottom"],ID=["bottom","top"];function RD(e,t,n){switch(e){case"top":case"bottom":return n?t?sT:oT:t?oT:sT;case"left":case"right":return t?OD:ID;default:return[]}}function LD(e,t,n,r){const o=vs(e);let a=RD(hi(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(ep)))),a}function oc(e){return e.replace(/left|right|bottom|top/g,t=>vD[t])}function DD(e){return F({top:0,right:0,bottom:0,left:0},e)}function aT(e){return typeof e!="number"?DD(e):{top:e,right:e,bottom:e,left:e}}function sc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function uT(e,t,n){let{reference:r,floating:o}=e;const a=Yr(t),u=Zh(t),c=Jh(u),d=hi(t),f=a==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-o.width,y:m};break;default:y={x:r.x,y:r.y}}switch(vs(t)){case"start":y[u]-=T*(n&&f?-1:1);break;case"end":y[u]+=T*(n&&f?-1:1);break}return y}const MD=(e,t,n)=>Je(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=uT(f,r,d),T=r,y={},_=0;for(let w=0;w<c.length;w++){const{name:C,fn:A}=c[w],{x:P,y:v,data:H,reset:Y}=yield A({x:p,y:m,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});p=P!=null?P:p,m=v!=null?v:m,y=pe(F({},y),{[C]:F(F({},y[C]),H)}),Y&&_<=50&&(_++,typeof Y=="object"&&(Y.placement&&(T=Y.placement),Y.rects&&(f=Y.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):Y.rects),{x:p,y:m}=uT(f,T,d)),w=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:y}});function Za(e,t){return Je(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=fi(t,e),_=aT(y),C=c[T?m==="floating"?"reference":"floating":m],A=sc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(C))==null||n?C:C.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),P=m==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,v=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),H=(yield a.isElement==null?void 0:a.isElement(v))?(yield a.getScale==null?void 0:a.getScale(v))||{x:1,y:1}:{x:1,y:1},Y=sc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:P,offsetParent:v,strategy:d}):P);return{top:(A.top-Y.top+_.top)/H.y,bottom:(Y.bottom-A.bottom+_.bottom)/H.y,left:(A.left-Y.left+_.left)/H.x,right:(Y.right-A.right+_.right)/H.x}})}const FD=e=>({name:"arrow",options:e,fn(n){return Je(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=fi(e,n)||{};if(p==null)return{};const T=aT(m),y={x:r,y:o},_=Zh(a),w=Jh(_),C=yield c.getDimensions(p),A=_==="y",P=A?"top":"left",v=A?"bottom":"right",H=A?"clientHeight":"clientWidth",Y=u.reference[w]+u.reference[_]-y[_]-u.floating[w],D=y[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let re=q?q[H]:0;(!re||!(yield c.isElement==null?void 0:c.isElement(q)))&&(re=d.floating[H]||u.floating[w]);const me=Y/2-D/2,V=re/2-C[w]/2-1,oe=Li(T[P],V),ce=Li(T[v],V),de=oe,ne=re-C[w]-ce,Te=re/2-C[w]/2+me,Pe=Kh(de,Te,ne),se=!f.arrow&&vs(a)!=null&&Te!==Pe&&u.reference[w]/2-(Te<de?oe:ce)-C[w]/2<0,K=se?Te<de?Te-de:Te-ne:0;return{[_]:y[_]+K,data:F({[_]:Pe,centerOffset:Te-Pe-K},se&&{alignmentOffset:K}),reset:se}})}}),BD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Je(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,Te=fi(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0}=Te,A=mn(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const P=hi(a),v=Yr(d),H=hi(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||(H||!C?[oc(d)]:ND(d)),q=w!=="none";!y&&q&&D.push(...LD(d,C,w,Y));const re=[d,...D],me=yield Za(n,A),V=[];let oe=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&V.push(me[P]),T){const Pe=PD(a,c,Y);V.push(me[Pe[0]],me[Pe[1]])}if(oe=[...oe,{placement:a,overflows:V}],!V.every(Pe=>Pe<=0)){var ce,de;const Pe=(((ce=u.flip)==null?void 0:ce.index)||0)+1,se=re[Pe];if(se&&(!(T==="alignment"?v!==Yr(se):!1)||oe.every(k=>Yr(k.placement)===v?k.overflows[0]>0:!0)))return{data:{index:Pe,overflows:oe},reset:{placement:se}};let K=(de=oe.filter(ie=>ie.overflows[0]<=0).sort((ie,k)=>ie.overflows[1]-k.overflows[1])[0])==null?void 0:de.placement;if(!K)switch(_){case"bestFit":{var ne;const ie=(ne=oe.filter(k=>{if(q){const L=Yr(k.placement);return L===v||L==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(L=>L>0).reduce((L,ee)=>L+ee,0)]).sort((k,L)=>k[1]-L[1])[0])==null?void 0:ne[0];ie&&(K=ie);break}case"initialPlacement":K=d;break}if(a!==K)return{reset:{placement:K}}}return{}})}}};function lT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function cT(e){return AD.some(t=>e[t]>=0)}const UD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Je(this,null,function*(){const{rects:r}=n,u=fi(e,n),{strategy:o="referenceHidden"}=u,a=mn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Za(n,pe(F({},a),{elementContext:"reference"})),d=lT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:cT(d)}}}case"escaped":{const c=yield Za(n,pe(F({},a),{altBoundary:!0})),d=lT(c,r.floating);return{data:{escapedOffsets:d,escaped:cT(d)}}}default:return{}}})}}},dT=new Set(["left","top"]);function HD(e,t){return Je(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=hi(n),c=vs(n),d=Yr(n)==="y",f=dT.has(u)?-1:1,p=a&&d?-1:1,m=fi(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const zD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Je(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield HD(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:pe(F({},f),{placement:c})}})}}},jD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Je(this,null,function*(){const{x:r,y:o,placement:a}=n,A=fi(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:P=>{let{x:v,y:H}=P;return{x:v,y:H}}}}=A,f=mn(A,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},m=yield Za(n,f),T=Yr(hi(a)),y=Qh(T);let _=p[y],w=p[T];if(u){const P=y==="y"?"top":"left",v=y==="y"?"bottom":"right",H=_+m[P],Y=_-m[v];_=Kh(H,_,Y)}if(c){const P=T==="y"?"top":"left",v=T==="y"?"bottom":"right",H=w+m[P],Y=w-m[v];w=Kh(H,w,Y)}const C=d.fn(pe(F({},n),{[y]:_,[T]:w}));return pe(F({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[y]:u,[T]:c}}})})}}},$D=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=fi(e,t),p={x:n,y:r},m=Yr(o),T=Qh(m);let y=p[T],_=p[m];const w=fi(c,t),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:F({mainAxis:0,crossAxis:0},w);if(d){const v=T==="y"?"height":"width",H=a.reference[T]-a.floating[v]+C.mainAxis,Y=a.reference[T]+a.reference[v]-C.mainAxis;y<H?y=H:y>Y&&(y=Y)}if(f){var A,P;const v=T==="y"?"width":"height",H=dT.has(hi(o)),Y=a.reference[m]-a.floating[v]+(H&&((A=u.offset)==null?void 0:A[m])||0)+(H?0:C.crossAxis),D=a.reference[m]+a.reference[v]+(H?0:((P=u.offset)==null?void 0:P[m])||0)-(H?C.crossAxis:0);_<Y?_=Y:_>D&&(_=D)}return{[T]:y,[m]:_}}}},VD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Je(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,oe=fi(e,n),{apply:f=()=>{}}=oe,p=mn(oe,["apply"]),m=yield Za(n,p),T=hi(a),y=vs(a),_=Yr(a)==="y",{width:w,height:C}=u.floating;let A,P;T==="top"||T==="bottom"?(A=T,P=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(P=T,A=y==="end"?"top":"bottom");const v=C-m.top-m.bottom,H=w-m.left-m.right,Y=Li(C-m[A],v),D=Li(w-m[P],H),q=!n.middlewareData.shift;let re=Y,me=D;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(me=H),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(re=v),q&&!y){const ce=Qn(m.left,0),de=Qn(m.right,0),ne=Qn(m.top,0),Te=Qn(m.bottom,0);_?me=w-2*(ce!==0||de!==0?ce+de:Qn(m.left,m.right)):re=C-2*(ne!==0||Te!==0?ne+Te:Qn(m.top,m.bottom))}yield f(pe(F({},n),{availableWidth:me,availableHeight:re}));const V=yield c.getDimensions(d.floating);return w!==V.width||C!==V.height?{reset:{rects:!0}}:{}})}}};function ac(){return typeof window!="undefined"}function Cs(e){return fT(e)?(e.nodeName||"").toLowerCase():"#document"}function Jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(fT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fT(e){return ac()?e instanceof Node||e instanceof Jn(e).Node:!1}function vr(e){return ac()?e instanceof Element||e instanceof Jn(e).Element:!1}function Gr(e){return ac()?e instanceof HTMLElement||e instanceof Jn(e).HTMLElement:!1}function hT(e){return!ac()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Jn(e).ShadowRoot}const qD=new Set(["inline","contents"]);function eu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!qD.has(o)}const YD=new Set(["table","td","th"]);function WD(e){return YD.has(Cs(e))}const GD=[":popover-open",":modal"];function uc(e){return GD.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const XD=["transform","translate","scale","rotate","perspective"],KD=["transform","translate","scale","rotate","perspective","filter"],QD=["paint","layout","strict","content"];function tp(e){const t=np(),n=vr(e)?Cr(e):e;return XD.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||KD.some(r=>(n.willChange||"").includes(r))||QD.some(r=>(n.contain||"").includes(r))}function JD(e){let t=Di(e);for(;Gr(t)&&!ks(t);){if(tp(t))return t;if(uc(t))return null;t=Di(t)}return null}function np(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ZD=new Set(["html","body","#document"]);function ks(e){return ZD.has(Cs(e))}function Cr(e){return Jn(e).getComputedStyle(e)}function lc(e){return vr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Di(e){if(Cs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hT(e)&&e.host||Wr(e);return hT(t)?t.host:t}function pT(e){const t=Di(e);return ks(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gr(t)&&eu(t)?t:pT(t)}function tu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=pT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Jn(o);if(a){const c=rp(u);return t.concat(u,u.visualViewport||[],eu(o)?o:[],c&&n?tu(c):[])}return t.concat(o,tu(o,[],n))}function rp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mT(e){const t=Cr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Gr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=rc(n)!==a||rc(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function ip(e){return vr(e)?e:e.contextElement}function Ps(e){const t=ip(e);if(!Gr(t))return qr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mT(t);let u=(a?rc(n.width):n.width)/r,c=(a?rc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const e5=qr(0);function gT(e){const t=Jn(e);return!np()||!t.visualViewport?e5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function t5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jn(e)?!1:t}function So(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=ip(e);let u=qr(1);t&&(r?vr(r)&&(u=Ps(r)):u=Ps(e));const c=t5(a,n,r)?gT(a):qr(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,m=o.height/u.y;if(a){const T=Jn(a),y=r&&vr(r)?Jn(r):r;let _=T,w=rp(_);for(;w&&r&&y!==_;){const C=Ps(w),A=w.getBoundingClientRect(),P=Cr(w),v=A.left+(w.clientLeft+parseFloat(P.paddingLeft))*C.x,H=A.top+(w.clientTop+parseFloat(P.paddingTop))*C.y;d*=C.x,f*=C.y,p*=C.x,m*=C.y,d+=v,f+=H,_=Jn(w),w=rp(_)}}return sc({width:p,height:m,x:d,y:f})}function cc(e,t){const n=lc(e).scrollLeft;return t?t.left+n:So(Wr(e)).left+n}function ET(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function n5(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Wr(r),c=t?uc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=qr(1);const p=qr(0),m=Gr(r);if((m||!m&&!a)&&((Cs(r)!=="body"||eu(u))&&(d=lc(r)),Gr(r))){const y=So(r);f=Ps(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?ET(u,d):qr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function r5(e){return Array.from(e.getClientRects())}function i5(e){const t=Wr(e),n=lc(e),r=e.ownerDocument.body,o=Qn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Qn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+cc(e);const c=-n.scrollTop;return Cr(r).direction==="rtl"&&(u+=Qn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const yT=25;function o5(e,t){const n=Jn(e),r=Wr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=np();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=cc(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=yT&&(a-=_)}else f<=yT&&(a+=f);return{width:a,height:u,x:c,y:d}}const s5=new Set(["absolute","fixed"]);function a5(e,t){const n=So(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Gr(e)?Ps(e):qr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function bT(e,t,n){let r;if(t==="viewport")r=o5(e,n);else if(t==="document")r=i5(Wr(e));else if(vr(t))r=a5(t,n);else{const o=gT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sc(r)}function TT(e,t){const n=Di(e);return n===t||!vr(n)||ks(n)?!1:Cr(n).position==="fixed"||TT(n,t)}function u5(e,t){const n=t.get(e);if(n)return n;let r=tu(e,[],!1).filter(c=>vr(c)&&Cs(c)!=="body"),o=null;const a=Cr(e).position==="fixed";let u=a?Di(e):e;for(;vr(u)&&!ks(u);){const c=Cr(u),d=tp(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&s5.has(o.position)||eu(u)&&!d&&TT(e,u))?r=r.filter(p=>p!==u):o=c,u=Di(u)}return t.set(e,r),r}function l5(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?uc(t)?[]:u5(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=bT(t,p,o);return f.top=Qn(m.top,f.top),f.right=Li(m.right,f.right),f.bottom=Li(m.bottom,f.bottom),f.left=Qn(m.left,f.left),f},bT(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function c5(e){const{width:t,height:n}=mT(e);return{width:t,height:n}}function d5(e,t,n){const r=Gr(t),o=Wr(t),a=n==="fixed",u=So(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=qr(0);function f(){d.x=cc(o)}if(r||!r&&!a)if((Cs(t)!=="body"||eu(o))&&(c=lc(t)),r){const y=So(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?ET(o,c):qr(0),m=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function op(e){return Cr(e).position==="static"}function _T(e,t){if(!Gr(e)||Cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wr(e)===n&&(n=n.ownerDocument.body),n}function ST(e,t){const n=Jn(e);if(uc(e))return n;if(!Gr(e)){let o=Di(e);for(;o&&!ks(o);){if(vr(o)&&!op(o))return o;o=Di(o)}return n}let r=_T(e,t);for(;r&&WD(r)&&op(r);)r=_T(r,t);return r&&ks(r)&&op(r)&&!tp(r)?n:r||JD(e)||n}const f5=function(e){return Je(this,null,function*(){const t=this.getOffsetParent||ST,n=this.getDimensions,r=yield n(e.floating);return{reference:d5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function h5(e){return Cr(e).direction==="rtl"}const p5={convertOffsetParentRelativeRectToViewportRelativeRect:n5,getDocumentElement:Wr,getClippingRect:l5,getOffsetParent:ST,getElementRects:f5,getClientRects:r5,getDimensions:c5,getScale:Ps,isElement:vr,isRTL:h5};function xT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function m5(e,t){let n=null,r;const o=Wr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(c||t(),!T||!y)return;const _=ic(m),w=ic(o.clientWidth-(p+T)),C=ic(o.clientHeight-(m+y)),A=ic(p),v={rootMargin:-_+"px "+-w+"px "+-C+"px "+-A+"px",threshold:Qn(0,Li(1,d))||1};let H=!0;function Y(D){const q=D[0].intersectionRatio;if(q!==d){if(!H)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!xT(f,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(Y,pe(F({},v),{root:o.ownerDocument}))}catch(D){n=new IntersectionObserver(Y,v)}n.observe(e)}return u(!0),a}function g5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=ip(e),p=o||a?[...f?tu(f):[],...tu(t)]:[];p.forEach(A=>{o&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const m=f&&c?m5(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(A=>{let[P]=A;P&&P.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var v;(v=y)==null||v.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,w=d?So(e):null;d&&C();function C(){const A=So(e);w&&!xT(w,A)&&n(),w=A,_=requestAnimationFrame(C)}return n(),()=>{var A;p.forEach(P=>{o&&P.removeEventListener("scroll",n),a&&P.removeEventListener("resize",n)}),m==null||m(),(A=y)==null||A.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const E5=zD,y5=jD,b5=BD,T5=VD,_5=UD,S5=FD,x5=$D,w5=(e,t,n)=>{const r=new Map,o=F({platform:p5},n),a=pe(F({},o.platform),{_c:r});return MD(e,t,pe(F({},o),{platform:a}))};function wT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return pe(F({},o),{toJSON:()=>o})}function A5(e){if(!e)return wT();const{x:t,y:n,width:r,height:o}=e;return wT(t,n,r,o)}function v5(e,t){return{contextElement:tn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?A5(r):n.getBoundingClientRect()}}}var nu=e=>({variable:e,reference:`var(${e})`}),pi={arrowSize:nu("--arrow-size"),arrowSizeHalf:nu("--arrow-size-half"),arrowBg:nu("--arrow-background"),transformOrigin:nu("--transform-origin"),arrowOffset:nu("--arrow-offset")},C5=e=>e==="top"||e==="bottom"?"y":"x";function k5(e,t){return{name:"transformOrigin",fn(n){var me,V,oe,ce,de;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=C5(d),p=((me=o.arrow)==null?void 0:me.x)||0,m=((V=o.arrow)==null?void 0:V.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+T/2,w=m+y/2,C=Math.abs(((oe=o.shift)==null?void 0:oe.y)||0),A=u.reference.height/2,P=y/2,v=(de=(ce=e.offset)==null?void 0:ce.mainAxis)!=null?de:e.gutter,H=typeof v=="number"?v+P:v!=null?v:P,Y=C>H,D={top:`${_}px calc(100% + ${H}px)`,bottom:`${_}px ${-H}px`,left:`calc(100% + ${H}px) ${w}px`,right:`${-H}px ${w}px`}[d],q=`${_}px ${u.reference.y+A-c}px`,re=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(pi.transformOrigin.variable,re?q:D),{data:{transformOrigin:re?q:D}}}}}var P5={name:"rects",fn({rects:e}){return{data:e}}},N5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${pi.arrowOffset.reference})`}),{}}}};function O5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var I5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function AT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function sp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function R5(e,t,n){const r=e||t.createElement("div");return S5({element:r,padding:n.arrowPadding})}function L5(e,t){var n;if(!X6((n=t.offset)!=null?n:t.gutter))return E5(({placement:r})=>{var p,m,T,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=O5(r),d=c?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Lh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function D5(e){if(!e.flip)return;const t=sp(e.boundary);return b5(pe(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function M5(e){if(!e.slide&&!e.overlap)return;const t=sp(e.boundary);return y5(pe(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:x5()}))}function F5(e){return T5({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function B5(e){var t;if(e.hideWhenDetached)return _5({strategy:"referenceHidden",boundary:(t=sp(e.boundary))!=null?t:"clippingAncestors"})}function U5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function H5(e,t,n={}){const r=v5(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},I5,n),a=t.querySelector("[data-part=arrow]"),u=[L5(a,o),D5(o),M5(o),R5(a,t.ownerDocument,o),N5(a),k5({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),F5(o),B5(o),P5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>Je(null,null,function*(){var H;if(!r||!t)return;const w=yield w5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(w),p==null||p({placed:!0});const C=ys(t),A=AT(C,w.x),P=AT(C,w.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${P}px`),o.hideWhenDetached&&(((H=w.middlewareData.hide)==null?void 0:H.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const v=t.firstElementChild;if(v){const Y=Ts(v);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>Je(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=U5(o.listeners),_=o.listeners?g5(r,t,T,y):i4;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function vT(e,t,n={}){const c=n,{defer:r}=c,o=mn(c,["defer"]),a=r?Yt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(H5(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var z5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function j5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:pi.arrowSize.reference,height:pi.arrowSize.reference,[pi.arrowSizeHalf.variable]:`calc(${pi.arrowSize.reference} / 2)`,[pi.arrowOffset.variable]:`calc(${pi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?z5[t.split("-")[0]]:void 0,background:pi.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var Ns=new WeakMap,dc=new WeakMap,fc={},ap=0,CT=e=>e&&(e.host||CT(e.parentNode)),$5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=CT(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),V5=new Set(["script","output","status","next-route-announcer"]),q5=e=>V5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),Y5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=$5(n,Array.isArray(e)?e:[e]);fc[r]||(fc[r]=new WeakMap);const c=fc[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&tn(y)&&Hb(y,_=>{m(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(q5(_))return;const C=_.getAttribute(o)==="true",A=(Ns.get(_)||0)+1,P=(c.get(_)||0)+1;Ns.set(_,A),c.set(_,P),d.push(_),A===1&&C&&dc.set(_,!0),P===1&&_.setAttribute(r,""),C||_.setAttribute(o,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),f.clear(),ap++,()=>{d.forEach(y=>{const _=Ns.get(y)-1,w=c.get(y)-1;Ns.set(y,_),c.set(y,w),_||(dc.has(y)||y.removeAttribute(o),dc.delete(y)),w||y.removeAttribute(r)}),ap--,ap||(Ns=new WeakMap,Ns=new WeakMap,dc=new WeakMap,fc={})}},W5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,G5=(e,t=W5(e),n="data-aria-hidden",r=!0)=>{if(t)return Y5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},X5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function kT(e,t={}){const{defer:n=!0}=t,r=n?X5:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(G5(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function K5(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function Q5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var PT="pointerdown.outside",NT="focus.outside";function J5(e){for(const t of e)if(tn(t)&&Vr(t))return!0;return!1}var OT=e=>"clientY"in e;function Z5(e,t){if(!OT(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function eM(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function IT(e,t){if(!t||!OT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return eM(u,c)?r||a:!1}function tM(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=$r(e),f=ys(e),p=K5(f),m=Q5(f);function T(v,H){if(!tn(H)||!H.isConnected||Es(e,H)||Z5(e,v)||c&&Ub(e,H))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const q=$h(Y);if(IT(v,q))return!1}const D=$h(e);return IT(v,D)?!1:!(n!=null&&n(H))}const y=new Set,_=yo(e==null?void 0:e.getRootNode());function w(v){function H(Y){var me,V;const D=u&&!zb()?Yt:oe=>oe(),q=Y!=null?Y:v,re=(V=(me=q==null?void 0:q.composedPath)==null?void 0:me.call(q))!=null?V:[q==null?void 0:q.target];D(()=>{const oe=_?re[0]:Ar(v);if(!(!e||!T(v,oe))){if(o||a){const ce=Rh(o,a);e.addEventListener(PT,ce,{once:!0})}RT(e,PT,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:U4(q),focusable:J5(re),target:oe}})}})}v.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(nn(d,"click",H,{once:!0})),y.add(m.addEventListener("click",H,{once:!0})),y.add(p.addEventListener("click",H,{once:!0}))):H()}const C=new Set,A=setTimeout(()=>{C.add(nn(d,"pointerdown",w,!0)),C.add(m.addEventListener("pointerdown",w,!0)),C.add(p.addEventListener("pointerdown",w,!0))},0);function P(v){(u?Yt:Y=>Y())(()=>{var q,re;const Y=(re=(q=v==null?void 0:v.composedPath)==null?void 0:q.call(v))!=null?re:[v==null?void 0:v.target],D=_?Y[0]:Ar(v);if(!(!e||!T(v,D))){if(r||a){const me=Rh(r,a);e.addEventListener(NT,me,{once:!0})}RT(e,NT,{bubbles:!1,cancelable:!0,detail:{originalEvent:v,contextmenu:!1,focusable:Vr(D),target:D}})}})}return zb()||(C.add(nn(d,"focusin",P,!0)),C.add(m.addEventListener("focusin",P,!0)),C.add(p.addEventListener("focusin",P,!0))),()=>{clearTimeout(A),y.forEach(v=>v()),C.forEach(v=>v())}}function nM(e,t){const{defer:n}=t,r=n?Yt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(tM(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function RT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function rM(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return nn($r(e),"keydown",n,{capture:!0})}var LT="layer:request-dismiss",dr={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Es(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Es(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>dr.dismiss(r.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];oM(e,LT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),iM(e,LT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function iM(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function oM(e,t,n){e.addEventListener(t,n,{once:!0})}var DT;function MT(){dr.layers.forEach(({node:e})=>{e.style.pointerEvents=dr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function sM(e){e.style.pointerEvents=""}function aM(e,t){const n=$r(e),r=[];return dr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(DT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=uD(()=>{const c=o();return tn(c)?c:null},{timeout:1e3});a.then(c=>r.push(Jl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{dr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=DT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function uM(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Dh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};dr.add(f),MT();function p(w){var A,P;const C=Ar(w.detail.originalEvent);dr.isBelowPointerBlockingLayer(e)||dr.isInBranch(C)||((A=t.onPointerDownOutside)==null||A.call(t,w),(P=t.onInteractOutside)==null||P.call(t,w),!w.defaultPrevented&&(c&&console.log("onPointerDownOutside:",w.detail.originalEvent),r==null||r()))}function m(w){var A,P;const C=Ar(w.detail.originalEvent);dr.isInBranch(C)||((A=t.onFocusOutside)==null||A.call(t,w),(P=t.onInteractOutside)==null||P.call(t,w),!w.defaultPrevented&&(c&&console.log("onFocusOutside:",w.detail.originalEvent),r==null||r()))}function T(w){var C;dr.isTopMost(e)&&((C=t.onEscapeKeyDown)==null||C.call(t,w),!w.defaultPrevented&&r&&(w.preventDefault(),r()))}function y(w){var v;if(!e)return!1;const C=typeof u=="function"?u():u,A=Array.isArray(C)?C:[C],P=(v=t.persistentElements)==null?void 0:v.map(H=>H()).filter(tn);return P&&A.push(...P),A.some(H=>Es(H,w))||dr.isInNestedLayer(e,w)}const _=[a?aM(e,t.persistentElements):void 0,rM(e,T),nM(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{dr.remove(e),MT(),sM(e),_.forEach(w=>w==null?void 0:w())}}function FT(e,t){const{defer:n}=t,r=n?Yt:a=>a(),o=[];return o.push(r(()=>{const a=ms(e)?e():e;o.push(uM(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var lM=Object.defineProperty,cM=(e,t,n)=>t in e?lM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>cM(e,typeof t!="symbol"?t+"":t,n),BT={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},dM=[],fM=class{constructor(e,t){Ct(this,"trapStack"),Ct(this,"config"),Ct(this,"doc"),Ct(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ct(this,"portalContainers",new Set),Ct(this,"listenerCleanups",[]),Ct(this,"handleFocus",r=>{const o=Ar(r),a=this.findContainerIndex(o,r)>=0;if(a||Gl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Ka(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Ka(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Ct(this,"handlePointerDown",r=>{const o=Ar(r);if(!(this.findContainerIndex(o,r)>=0)){if(iu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}iu(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const o=Ar(r);this.findContainerIndex(o,r)>=0||iu(this.config.clickOutsideDeactivates,r)||iu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ct(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;ru(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{hM(r)&&iu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ct(this,"_mutationObserver"),Ct(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return N4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?O4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ct(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),Ct(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Vr(r)){const o=bs(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Ct(this,"tryFocus",r=>{if(r!==!1&&r!==bs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,pM(r)&&r.select()}}),Ct(this,"deactivate",r=>{if(!this.state.active)return this;const o=F({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),BT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{UT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),Ct(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ct(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),Ct(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),Ct(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),Ct(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Ar(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Vr(u)&&!bo(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];c=Ka(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else ru(o)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Vr(u)&&!bo(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];c=Ka(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else ru(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||dM;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return ru(r)&&!r.shiftKey},isKeyBackward(r){return ru(r)&&r.shiftKey}},t);this.doc=n.document||$r(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{C4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Ub(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=_s(e,{getShadowRoot:this.config.getShadowRoot}),n=Gb(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let f=0;f<t.length;f++)if(Ka(t[f])>0){c=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(bo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(bo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return BT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?UT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(nn(this.doc,"focusin",this.handleFocus,!0),nn(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),nn(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),nn(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),nn(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),nn(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=bs(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},ru=e=>e.key==="Tab",iu=(e,...t)=>typeof e=="function"?e(...t):e,hM=e=>!e.isComposing&&e.key==="Escape",UT=e=>setTimeout(e,0),pM=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function HT(e,t={}){let n;const r=Yt(()=>{const o=typeof e=="function"?e():e;if(o){n=new fM(o,pe(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:$r(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var up="data-scroll-lock";function mM(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function zT(e){const t=Ts(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function jT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(up))return;const u=zT(r)||zT(o),c=n.innerWidth-r.clientWidth;o.setAttribute(up,"");const d=()=>sD(r,"--scrollbar-width",`${c}px`),f=mM(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Jl(o,_)},m=()=>{var Y,D;const{scrollX:_,scrollY:w,visualViewport:C}=n,A=(Y=C==null?void 0:C.offsetLeft)!=null?Y:0,P=(D=C==null?void 0:C.offsetTop)!=null?D:0,v={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(P))}px`,left:`${-(_-Math.floor(A))}px`,right:"0"};!u&&c>0&&(v[f]=`${c}px`);const H=Jl(o,v);return()=>{H==null||H(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),Xl()?m():p()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(up)}}var gM=_o("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Xr=gM.build(),$T=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},VT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},lp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},qT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},EM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},dp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},yM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},YT=e=>e.getById($T(e)),Os=e=>e.getById(VT(e)),Is=e=>e.getById(lp(e)),WT=e=>e.getById(qT(e)),bM=e=>e.getById(cp(e)),TM=e=>e.getById(dp(e));function _M(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=j5(pe(F({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(pe(F({id:EM(c)},Xr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(pe(F({},Xr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(pe(F({},Xr.anchor.attrs),{dir:u("dir"),id:$T(c)}))},getTriggerProps(){return t.button(pe(F({},Xr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:VT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":lp(c),onPointerDown(y){jb(y)&&F4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(pe(F({},Xr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(F({id:qT(c)},Xr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(pe(F({},Xr.content.attrs),{dir:u("dir"),id:lp(c),tabIndex:-1,role:"dialog","aria-modal":Mb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":gs(d),"aria-labelledby":m.title?cp(c):void 0,"aria-describedby":m.description?dp(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(pe(F({},Xr.title.attrs),{id:cp(c),dir:u("dir")}))},getDescriptionProps(){return t.element(pe(F({},Xr.description.attrs),{id:dp(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(pe(F({},Xr.closeTrigger.attrs),{dir:u("dir"),id:yM(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var SM={props({props:e}){return pe(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=YT(n))!=null?a:Os(n);return vT(r,()=>WT(n),pe(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Is(n);let o=!0;return FT(r,{type:"popover",pointerBlocking:t("modal"),exclude:Os(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:iD(()=>Is(t),{triggerElement:Os(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?kT(()=>[Is(t),Os(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return jT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?HT(()=>Is(t),{initialFocus:()=>Xb({root:Is(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=YT(n))!=null?u:Os(n);vT(o,()=>WT(n),pe(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Yt(()=>{Object.assign(e.get("renderedElements"),{title:!!bM(t),description:!!TM(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Yt(()=>{const n=Xb({root:Is(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Yt(()=>{const a=Os(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};ws()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[XU,hc]=To({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[KU,fp]=To({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),xM=e=>{const t=B.useId(),{getRootNode:n}=hc(),{dir:r}=fp(),o=F({id:t,dir:r,getRootNode:n},e),a=ec(SM,o);return _M(a,Yh)},wM=e=>{const[t,u]=iT(e),c=u,{children:n}=c,r=mn(c,["children"]),o=xM(r),a=Xh(Wt({present:o.open},t));return x.jsx(bD,{value:o,children:x.jsx(tT,{value:a,children:n})})},GT=B.forwardRef((e,t)=>{const n=Gh(),r=Qa(),o=Wt(pe(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(Sn.button,pe(F({},o),{ref:t}))});GT.displayName="PopoverTrigger";function AM(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function vM(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function CM(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function kM(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function PM(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function NM(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function hp(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function XT(e){return At({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const OM=({className:e,componentType:t,children:n})=>{const[r,o]=B.useState(!1),{globalClassName:a}=rt(),u=f=>{o(f.open)},c=B.useCallback(()=>{o(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return x.jsxs(wM,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(GT,{"aria-label":`Overflow menu for ${t}`,className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(XT,{})}),x.jsx(rT,{children:x.jsx(nT,{className:W(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(Pb.Provider,{value:d,children:n})})})]})};function KT(e){return At({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function QT(e){return At({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[IM,xo]=To({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),JT=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getControlProps(),e);return x.jsx(Sn.div,pe(F(F({},r),e),{ref:t}))});JT.displayName="CarouselControl";const ZT=B.forwardRef((e,t)=>{const[n,r]=Ja()(e,["readOnly","index"]),o=xo(),a=Wt(o.getIndicatorProps(n),r);return x.jsx(Sn.button,pe(F({},a),{ref:t}))});ZT.displayName="CarouselIndicator";const e_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getIndicatorGroupProps(),e);return x.jsx(Sn.div,pe(F({},r),{ref:t}))});e_.displayName="CarouselIndicatorGroup";const t_=B.forwardRef((e,t)=>{const[n,r]=Ja()(e,["index","snapAlign"]),o=xo(),a=Wt(o.getItemProps(n),r);return x.jsx(Sn.div,pe(F({},a),{ref:t}))});t_.displayName="CarouselItem";const n_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getItemGroupProps(),e);return x.jsx(Sn.div,pe(F({},r),{ref:t}))});n_.displayName="CarouselItemGroup";const r_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getNextTriggerProps(),e);return x.jsx(Sn.button,pe(F({},r),{ref:t}))});r_.displayName="CarouselNextTrigger";const i_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getPrevTriggerProps(),e);return x.jsx(Sn.button,pe(F({},r),{ref:t}))});i_.displayName="CarouselPrevTrigger";function RM(e){const t=Ts(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(o,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function LM(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function o_(e){let t=[];for(const n of e.children)t=t.concat(n,o_(n));return t}function s_(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?o_(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const m=p.getBoundingClientRect();if(!LM(n,m,u))continue;const T=Ts(p);let[y,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const w=a==="x"?_:y,C=m[c]-n[c]+e[f];switch(w){case"none":break;case"start":r[a].start.push({node:p,position:C});break;case"center":r[a].center.push({node:p,position:C+m[d]/2});break;case"end":r[a].end.push({node:p,position:C+m[d]});break}}}return r}function a_(e){const t=e.getBoundingClientRect(),n=RM(e),r=s_(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:u_([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(l_(0,o.x))),y:u_([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(l_(0,o.y)))}}function DM(e,t,n){const r=s_(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var u_=e=>[...new Set(e)],l_=(e,t)=>n=>Math.max(e,Math.min(t,n)),MM=_o("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),mi=MM.build(),FM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},BM=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},pc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},UM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},HM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},zM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},c_=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},Un=e=>e.getById(pc(e)),d_=e=>oD(Un(e),"[data-part=item]"),jM=(e,t)=>e.getById(c_(e,t)),f_=e=>{const t=Un(e);if(!t)return;const n=_s(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function $M(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),m=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),w=c("slidesPerPage"),C=c("padding"),A=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/y.length},scrollToIndex(P,v){a({type:"INDEX.SET",index:P,instant:v})},scrollTo(P,v){a({type:"PAGE.SET",index:P,instant:v})},scrollNext(P){a({type:"PAGE.NEXT",instant:P})},scrollPrev(P){a({type:"PAGE.PREV",instant:P})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(P){return Array.from(r.get("slidesInView")).includes(P)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(pe(F({},mi.root.attrs),{id:FM(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":w,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(pe(F({},mi.itemGroup.attrs),{id:pc(u),"data-orientation":c("orientation"),"data-dragging":gs(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(P){Es(P.currentTarget,Ar(P))&&a({type:"VIEWPORT.FOCUS"})},onBlur(P){Es(P.currentTarget,P.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(P){if(P.defaultPrevented||!c("allowMouseDrag")||!jb(P))return;const v=Ar(P);Vr(v)&&v!==P.currentTarget||(P.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:o4(P=>{const v=c("orientation")==="horizontal"?"deltaX":"deltaY";P[v]<0&&!o("canScrollPrev")||P[v]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:C,[T?"paddingInline":"paddingBlock"]:C,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(P){const v=r.get("slidesInView").includes(P.index);return t.element(pe(F({},mi.item.attrs),{id:BM(u,P.index),dir:c("dir"),role:"group","data-index":P.index,"data-inview":gs(v),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":A.item(P.index,c("slideCount")),"aria-hidden":Mb(!v),style:{scrollSnapAlign:(()=>{var re;const H=(re=P.snapAlign)!=null?re:"start",Y=c("slidesPerMove"),D=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(P.index+D)%D===0?H:void 0})()}}))},getControlProps(){return t.element(pe(F({},mi.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(pe(F({},mi.prevTrigger.attrs),{id:HM(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":A.prevTrigger,"data-orientation":c("orientation"),"aria-controls":pc(u),onClick(P){P.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(pe(F({},mi.nextTrigger.attrs),{dir:c("dir"),id:UM(u),type:"button","aria-label":A.nextTrigger,"data-orientation":c("orientation"),"aria-controls":pc(u),disabled:!p,onClick(P){P.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(pe(F({},mi.indicatorGroup.attrs),{dir:c("dir"),id:zM(u),"data-orientation":c("orientation"),onKeyDown(P){if(P.defaultPrevented)return;const v="indicator",H={ArrowDown(q){T||(a({type:"PAGE.NEXT",src:v}),q.preventDefault())},ArrowUp(q){T||(a({type:"PAGE.PREV",src:v}),q.preventDefault())},ArrowRight(q){T&&(a({type:"PAGE.NEXT",src:v}),q.preventDefault())},ArrowLeft(q){T&&(a({type:"PAGE.PREV",src:v}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:v}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:v}),q.preventDefault()}},Y=j4(P,{dir:c("dir"),orientation:c("orientation")}),D=H[Y];D==null||D(P)}}))},getIndicatorProps(P){return t.button(pe(F({},mi.indicator.attrs),{dir:c("dir"),id:c_(u,P.index),type:"button","data-orientation":c("orientation"),"data-index":P.index,"data-readonly":gs(P.readOnly),"data-current":gs(P.index===_),"aria-label":A.indicator(P.index),onClick(v){v.defaultPrevented||P.readOnly||a({type:"PAGE.SET",index:P.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(pe(F({},mi.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":gs(d),"aria-label":d?A.autoplayStop:A.autoplayStart,onClick(P){P.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var VM={props({props:e}){return d4(e,["slideCount"],"carousel"),pe(F({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:F({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:qM(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return G6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Un(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Un(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),f_(e)});return f_(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!Un(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Yt(()=>{o(),Yt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return d_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Un(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?$6(d,m):V6(d,m)},n.get("slidesInView"));n.set("slidesInView",q6(c))},{root:r,threshold:t("inViewThreshold")});return d_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Un(n);return r?nn(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return nn(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return nD(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return nn(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var f;const a=t.instant?"instant":"smooth",u=Lb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=Un(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Un(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=Ob(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=Y6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=Un(r);if(!o)return;const a=DM(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=Lb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Un(n);if(!r)return;const o=a_(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=Un(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Un(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Un(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=a_(r),c=u.x.reduce((f,p)=>Math.abs(p-o)<Math.abs(f-o)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);Yt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=jM(n,e.get("page"));r&&Yt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function qM(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}ws()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),ws()(["index","readOnly"]),ws()(["index","snapAlign"]);const YM=e=>{const t=B.useId(),{getRootNode:n}=hc(),{dir:r}=fp(),o=F({id:t,dir:r,getRootNode:n},e),a=ec(VM,o);return $M(a,Yh)},h_=B.forwardRef((e,t)=>{const[n,r]=Ja()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=YM(n),a=Wt(o.getRootProps(),r);return x.jsx(IM,{value:o,children:x.jsx(Sn.div,pe(F({},a),{ref:t}))})});h_.displayName="CarouselRoot";const WM=180,GM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},XM=({globalClassName:e,className:t,itemMinWidth:n=WM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((re,me)=>({node:re,key:B.isValidElement(re)&&re.key!=null?re.key:`carousel-item-${me}`})),T=m.length,y=B.useRef(null),[_,w]=B.useState(0),{width:C}=$C();B.useLayoutEffect(()=>{y.current&&w(y.current.getBoundingClientRect().width)},[C,T]);const A=GM(r),P=n+A,v=_>0?(_+A)/P:1,H=Math.max(1,Math.floor(v));if(T===0)return null;const Y=T>H,D=Math.ceil(T/H),q=Y?Math.max(1,v):H;return x.jsxs(h_,{ref:y,className:W(e,t,`${z}-carousel`),slidesPerPage:q,slidesPerMove:H,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[x.jsx(n_,{className:W(e,`${z}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map(({node:re,key:me},V)=>x.jsx(t_,{index:V,className:W(e,`${z}-carousel__item`),children:re},me))}),c&&Y&&x.jsxs(JT,{className:W(e,`${z}-carousel__control`),children:[x.jsx(i_,{className:W(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:x.jsx(CM,{size:"16px"})}),x.jsx(r_,{className:W(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:x.jsx(kM,{size:"16px"})})]}),u&&Y&&x.jsx(e_,{className:W(e,`${z}-carousel__indicator-group`),children:Array.from({length:D},(re,me)=>x.jsx(ZT,{index:me,className:W(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${me+1}`},me))})]})},[KM,QM]=To({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),JM=e=>Ja()(e,["lazyMount","unmountOnExit"]),[ZM,ou]=To({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),p_=B.forwardRef((e,t)=>{const n=ou(),r=QM(),o=Xh(pe(F({},r),{present:n.open})),a=Wt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:x.jsx(Sn.div,pe(F({},a),{ref:tc(o.ref,t)}))});p_.displayName="DialogBackdrop";const pp=B.forwardRef((e,t)=>{const n=ou(),r=Qa(),o=Wt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Sn.div,pe(F({},o),{ref:tc(r.ref,t)}))});pp.displayName="DialogContent";const mp=B.forwardRef((e,t)=>{const n=ou(),r=Wt(n.getDescriptionProps(),e);return x.jsx(Sn.div,pe(F({},r),{ref:t}))});mp.displayName="DialogDescription";const gp=B.forwardRef((e,t)=>{const n=ou(),r=Wt(n.getPositionerProps(),e);return Qa().unmounted?null:x.jsx(Sn.div,pe(F({},r),{ref:t}))});gp.displayName="DialogPositioner";var e8=_o("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),wo=e8.build(),m_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},g_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},E_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},yp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},bp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},y_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},mc=e=>e.getById(Ep(e)),t8=e=>e.getById(m_(e)),n8=e=>e.getById(g_(e)),r8=e=>e.getById(E_(e)),i8=e=>e.getById(yp(e)),o8=e=>e.getById(bp(e)),s8=e=>e.getById(y_(e));function a8(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(pe(F({},wo.trigger.attrs),{dir:a("dir"),id:E_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Ep(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(pe(F({},wo.backdrop.attrs),{dir:a("dir"),hidden:!d,id:g_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(F({},wo.positioner.attrs),{dir:a("dir"),id:m_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(pe(F({},wo.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Ep(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:yp(u),"aria-describedby":f.description?bp(u):void 0}))},getTitleProps(){return t.element(pe(F({},wo.title.attrs),{dir:a("dir"),id:yp(u)}))},getDescriptionProps(){return t.element(pe(F({},wo.description.attrs),{dir:a("dir"),id:bp(u)}))},getCloseTriggerProps(){return t.button(pe(F({},wo.closeTrigger.attrs),{dir:a("dir"),id:y_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var u8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>s8(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return F({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return FT(()=>mc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[r8(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return jT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?HT(()=>mc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?kT(()=>[mc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Yt(()=>{e.set("rendered",{title:!!i8(t),description:!!o8(t)})})},syncZIndex({scope:e}){Yt(()=>{const t=mc(e);if(!t)return;const n=Ts(t);[t8(e),n8(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};ws()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const l8=e=>{const t=B.useId(),{getRootNode:n}=hc(),{dir:r}=fp(),o=F({id:t,getRootNode:n,dir:r},e),a=ec(u8,o);return a8(a,Yh)},b_=e=>{const[t,c]=iT(e),d=c,{children:n}=d,r=mn(d,["children"]),[o]=JM(t),a=l8(r),u=Xh(Wt({present:a.open},t));return x.jsx(ZM,{value:a,children:x.jsx(KM,{value:o,children:x.jsx(tT,{value:u,children:n})})})},T_=B.forwardRef((e,t)=>{const n=ou(),r=Wt(n.getTitleProps(),e);return x.jsx(Sn.h2,pe(F({},r),{ref:t}))});T_.displayName="DialogTitle";const c8=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=B.useMemo(()=>({isOpen:t}),[t]);return x.jsx(Ih.Provider,{value:r,children:x.jsx(kb.Provider,{value:o,children:e})})},__=()=>B.useContext(kb),S_=()=>{const e=B.useContext(Ih);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},d8=`${z}-overflow-menu-button-trigger`,f8=({componentType:e,children:t})=>{const{isOpen:n}=__(),{closeMenu:r}=S_(),{globalClassName:o}=rt(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${d8}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?x.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:W(`${z}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},h8=({componentType:e,className:t})=>{const{toggleMenu:n}=S_(),{isOpen:r}=__(),{globalClassName:o}=rt();return x.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:x.jsx(XT,{})})},Tp=()=>{const{status:e,entryType:t}=sr(),{messages:n}=ar(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},p8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),{previousComponentType:r}=sr(),o=ps(),a=()=>{El(r||"dialog"),o()};return t?x.jsx(ci,{className:W(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:x.jsx(KT,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(KT,{}),"Show ",r||"dialog"]})},m8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),{isModalFullscreen:r}=sr(),o=ps(),a=()=>{vf(!r),o()},u=r?Zk:eP,c="Toggle Fullscreen";return t?x.jsx(ci,{ariaLabel:c,title:c,className:W(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:x.jsx(u,{}),onClick:a}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(u,{}),c]})},g8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),{dialogPosition:r}=sr(),o=ps(),a=r==="bottom-left",u=()=>{Cf(a?"bottom-right":"bottom-left"),o()},c=a?vM:AM,d=a?"Move right":"Move left";return t?x.jsx(ci,{className:W(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:x.jsx(c,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(c,{}),d]})},x_=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:o,globalClassName:a,mode:u,enableDownloadTranscript:c}=rt(),{mode:d}=sr(),f=u==="messaging"&&c&&!!r,p=d==="standalone",m=e==="modal",T=m?p8:w_,y=m?m8:g8,_=B.useMemo(()=>o?nP(o):{},[o]);return x.jsx(c8,{children:x.jsxs("div",{className:W(a,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[x.jsxs("div",{className:W(a,`${z}-${e}-header`,{standalone:p,embedded:!p}),style:_,children:[(o==null?void 0:o.logoUrl)&&x.jsx("img",{alt:"",role:"img",className:W(a,`${z}-${e}-logo`,{standalone:p,embedded:!p}),src:o.logoUrl}),x.jsx(T_,{className:W(a,`${z}-${e}-title`,{standalone:p,embedded:!p}),children:o==null?void 0:o.headerText}),x.jsxs("div",{className:W(a,`${z}-${e}-controls`),children:[x.jsx(T,{componentType:e,isIcon:!0}),x.jsx(h8,{componentType:e}),x.jsx(H1,{className:W(a,`cim-${e}-component`),onClick:n})]})]}),x.jsxs(f8,{componentType:e,children:[x.jsx(y,{componentType:e}),x.jsx(T8,{componentType:e}),x.jsx(Nb,{componentType:e,onClearChat:t}),f&&x.jsx(E8,{componentType:e,onDownloadTranscript:r})]})]})})},E8=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=rt(),r=ps(),[o,a]=B.useState(!1),u=()=>Je(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return x.jsxs("button",{className:W(`${z}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:o,children:[x.jsx(H6,{}),"Download transcript"]})},y8={sparkle:hp,plus:PM,"paper-plane":NM},_p=({icon:e,className:t})=>{const n=y8[e];return n?x.jsx(n,{className:t,"aria-hidden":"true"}):null},b8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=rt(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=o?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},T=_=>x.jsxs(x.Fragment,{children:[c&&x.jsx(_p,{icon:c,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:_})]});return x.jsx("div",{className:W(t,`${z}-suggestion-container ${f}`,e),children:n.map(_=>o?x.jsx(_l,{disabled:r,className:W(t,`${z}-suggestion-button standalone`,m),onClick:p(_),children:T(_)},_):x.jsx("button",{disabled:r,className:W(t,`${z}-suggestion-button embedded`,m),onClick:p(_),children:T(_)},_))})},T8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=rt();if(!r)return null;const o=()=>{ui(!1),gl(!0)};return t?x.jsx(ci,{className:W(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:x.jsx(B1,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(B1,{}),"Minimize"]})},w_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),r=ps(),o=()=>{El("modal"),r()};return t?x.jsx(ci,{className:W(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:x.jsx(QT,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(QT,{}),"Show modal"]})},_8=({isWidgetStandalone:e})=>{var _,w;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o}=rt(),{askCimPrompts:a,messages:u}=ar(),{isLoading:c,handleSuggestion:d}=Ur(),f=o==null?void 0:o.icon,p=(_=o==null?void 0:o.iconPosition)!=null?_:"left",m=B.useMemo(()=>{const C=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return u.some(P=>P.name==="conversation_reset")&&r||C},[u,n,r]),T=((w=a.message)==null?void 0:w.suggestions)||[],y=(C,A)=>()=>{d(C,A)};return x.jsxs("div",{className:W(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[x.jsx("p",{className:W(t,`${z}-ask-cim-entry-text`),children:m}),!!(T!=null&&T.length)&&x.jsx("div",{className:W(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:T.map(C=>{var A;return x.jsxs(_l,{disabled:c,className:W(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!f,"icon-right":!!f&&p==="right"}),onClick:y(C,((A=a.message)==null?void 0:A.eventSourceId)||""),children:[f&&x.jsx(_p,{icon:f,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:C.displayText})]},C.displayText)})})]})},S8=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=rt();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),m=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return x.jsxs("div",{className:W(r,`${z}-product-tile`,{embedded:!e,standalone:e}),children:[m?x.jsx("a",{href:`${m}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:x.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):x.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),x.jsxs("div",{className:W(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[x.jsxs("div",{className:W(r,`${z}-product-tile-content`),children:[u&&x.jsx("p",{className:`${z}-product-tile-brand`,children:u}),m?x.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:W(r,`${z}-product-tile-pdp`),href:`${m}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",x.jsx("span",{className:W(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):x.jsx("p",{className:W(r,`${z}-product-tile-name`),title:a,children:a})]}),x.jsx("div",{className:W(r,`${z}-product-tile-footer`),children:x.jsx("p",{className:W(r,`${z}-product-tile-price`),children:c})})]})]})},x8=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=rt(),o=t;return n?x.jsxs("div",{className:W(r,`${z}-display-products`),children:[x.jsx("p",{children:o.message}),o.products&&o.products.length>0&&x.jsx(XM,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:o.products.map(a=>{const u=n.getPid(a);return x.jsx(S8,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},w8=({globalClassName:e,message:t,isWidgetStandalone:n})=>x.jsx("div",{className:W(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:x.jsxs("p",{className:W(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[x.jsx(Kk,{})," ",t.message||"An error occurred while processing your request."]})}),A8=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var _;const{isLoading:a}=Ur(),{messages:u}=ar(),c=u.find(w=>w.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?vA(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=w=>{const C=n.suggestions.find(A=>A.displayText===w);C&&o(C,n.eventSourceId||n.id)};return x.jsxs("div",{className:W(e,`${z}-follow-up`),children:[x.jsx("p",{className:W(e,`${z}-text`),children:n.message}),x.jsx(b8,{suggestions:n.suggestions.map(w=>w.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function A_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function v8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function C8(e,t,n){const o=Il((n||{}).ignore||[]),a=k8(t);let u=-1;for(;++u<a.length;)QE(e,"text",c);function c(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],_=T?T.children:void 0;if(o(y,_?_.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let _=0;const C=m.children.indexOf(f);let A=!1,P=[];T.lastIndex=0;let v=T.exec(f.value);for(;v;){const H=v.index,Y={index:v.index,input:v.input,stack:[...p,f]};let D=y(...v,Y);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?T.lastIndex=H+1:(_!==H&&P.push({type:"text",value:f.value.slice(_,H)}),Array.isArray(D)?P.push(...D):D&&P.push(D),_=H+v[0].length,A=!0),!T.global)break;v=T.exec(f.value)}return A?(_<f.value.length&&P.push({type:"text",value:f.value.slice(_)}),m.children.splice(C,1,...P)):P=[f],C+P.length}}function k8(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 o=n[r];t.push([P8(o[0]),N8(o[1])])}return t}function P8(e){return typeof e=="string"?new RegExp(v8(e),"g"):e}function N8(e){return typeof e=="function"?e:function(){return e}}const Sp="phrasing",xp=["autolink","link","image","label"];function O8(){return{transforms:[B8],enter:{literalAutolink:R8,literalAutolinkEmail:wp,literalAutolinkHttp:wp,literalAutolinkWww:wp},exit:{literalAutolink:F8,literalAutolinkEmail:M8,literalAutolinkHttp:L8,literalAutolinkWww:D8}}}function I8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Sp,notInConstruct:xp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Sp,notInConstruct:xp},{character:":",before:"[ps]",after:"\\/",inConstruct:Sp,notInConstruct:xp}]}}function R8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wp(e){this.config.enter.autolinkProtocol.call(this,e)}function L8(e){this.config.exit.autolinkProtocol.call(this,e)}function D8(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 M8(e){this.config.exit.autolinkEmail.call(this,e)}function F8(e){this.exit(e)}function B8(e){C8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,U8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),H8]],{ignore:["link","linkReference"]})}function U8(e,t,n,r,o){let a="";if(!v_(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!z8(n)))return!1;const u=j8(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function H8(e,t,n,r){return!v_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function z8(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 j8(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 o=A_(e,"(");let a=A_(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function v_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||co(n)||Al(n))&&(!t||n!==47)}C_.peek=Q8;function $8(){this.buffer()}function V8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function q8(){this.buffer()}function Y8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function W8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function G8(e){this.exit(e)}function X8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function K8(e){this.exit(e)}function Q8(){return"["}function C_(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function J8(){return{enter:{gfmFootnoteCallString:$8,gfmFootnoteCall:V8,gfmFootnoteDefinitionLabelString:q8,gfmFootnoteDefinition:Y8},exit:{gfmFootnoteCallString:W8,gfmFootnoteCall:G8,gfmFootnoteDefinitionLabelString:X8,gfmFootnoteDefinition:K8}}}function Z8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:C_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
32
32
|
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?k_:eF))),f(),d}}function eF(e,t,n){return t===0?e:k_(e,t,n)}function k_(e,t,n){return(n?"":" ")+e}const tF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];P_.peek=sF;function nF(){return{canContainEols:["delete"],enter:{strikethrough:iF},exit:{strikethrough:oF}}}function rF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:tF}],handlers:{delete:P_}}}function iF(e){this.enter({type:"delete",children:[]},e)}function oF(e){this.exit(e)}function P_(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,pe(F({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function sF(){return"~"}function aF(e){return e.length}function uF(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||aF,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const w=[],C=[];let A=-1;for(e[p].length>f&&(f=e[p].length);++A<e[p].length;){const P=lF(e[p][A]);if(n.alignDelimiters!==!1){const v=o(P);C[A]=v,(d[A]===void 0||v>d[A])&&(d[A]=v)}w.push(P)}u[p]=w,c[p]=C}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=N_(r[m]);else{const w=N_(r);for(;++m<f;)a[m]=w}m=-1;const T=[],y=[];for(;++m<f;){const w=a[m];let C="",A="";w===99?(C=":",A=":"):w===108?C=":":w===114&&(A=":");let P=n.alignDelimiters===!1?1:Math.max(1,d[m]-C.length-A.length);const v=C+"-".repeat(P)+A;n.alignDelimiters!==!1&&(P=C.length+P+A.length,P>d[m]&&(d[m]=P),y[m]=P),T[m]=v}u.splice(1,0,T),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const w=u[p],C=c[p];m=-1;const A=[];for(;++m<f;){const P=w[m]||"";let v="",H="";if(n.alignDelimiters!==!1){const Y=d[m]-(C[m]||0),D=a[m];D===114?v=" ".repeat(Y):D===99?Y%2?(v=" ".repeat(Y/2+.5),H=" ".repeat(Y/2-.5)):(v=" ".repeat(Y/2),H=v):H=" ".repeat(Y)}n.delimiterStart!==!1&&!m&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&P==="")&&(n.delimiterStart!==!1||m)&&A.push(" "),n.alignDelimiters!==!1&&A.push(v),A.push(P),n.alignDelimiters!==!1&&A.push(H),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&A.push("|")}_.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return _.join(`
|
|
33
33
|
`)}function lF(e){return e==null?"":String(e)}function N_(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function cF(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),dF);return o(),u}function dF(e,t,n){return">"+(n?"":" ")+e}function fF(e,t){return O_(e,t.inConstruct,!0)&&!O_(e,t.notInConstruct,!1)}function O_(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 o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
34
34
|
`&&fF(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|