@cimulate/copilot-widget 1.10.0 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(Oe,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Oe=typeof globalThis!="undefined"?globalThis:Oe||self,Fe(Oe.CimulateMessaging={}))})(this,(function(Oe){"use strict";var uF=Object.defineProperty,lF=Object.defineProperties;var cF=Object.getOwnPropertyDescriptors;var Lc=Object.getOwnPropertySymbols;var Ux=Object.prototype.hasOwnProperty,Hx=Object.prototype.propertyIsEnumerable;var ys=(Oe,Fe)=>(Fe=Symbol[Oe])?Fe:Symbol.for("Symbol."+Oe),dF=Oe=>{throw TypeError(Oe)},Za=Math.pow,sm=(Oe,Fe,We)=>Fe in Oe?uF(Oe,Fe,{enumerable:!0,configurable:!0,writable:!0,value:We}):Oe[Fe]=We,U=(Oe,Fe)=>{for(var We in Fe||(Fe={}))Ux.call(Fe,We)&&sm(Oe,We,Fe[We]);if(Lc)for(var We of Lc(Fe))Hx.call(Fe,We)&&sm(Oe,We,Fe[We]);return Oe},se=(Oe,Fe)=>lF(Oe,cF(Fe));var sn=(Oe,Fe)=>{var We={};for(var rt in Oe)Ux.call(Oe,rt)&&Fe.indexOf(rt)<0&&(We[rt]=Oe[rt]);if(Oe!=null&&Lc)for(var rt of Lc(Oe))Fe.indexOf(rt)<0&&Hx.call(Oe,rt)&&(We[rt]=Oe[rt]);return We};var Ze=(Oe,Fe,We)=>sm(Oe,typeof Fe!="symbol"?Fe+"":Fe,We);var $e=(Oe,Fe,We)=>new Promise((rt,Et)=>{var dt=Tt=>{try{Pt(We.next(Tt))}catch(an){Et(an)}},Re=Tt=>{try{Pt(We.throw(Tt))}catch(an){Et(an)}},Pt=Tt=>Tt.done?rt(Tt.value):Promise.resolve(Tt.value).then(dt,Re);Pt((We=We.apply(Oe,Fe)).next())}),so=function(Oe,Fe){this[0]=Oe,this[1]=Fe},am=(Oe,Fe,We)=>{var rt=(Re,Pt,Tt,an)=>{try{var ao=We[Re](Pt),Ts=(Pt=ao.value)instanceof so,Dc=ao.done;Promise.resolve(Ts?Pt[0]:Pt).then($n=>Ts?rt(Re==="return"?Re:"next",Pt[1]?{done:$n.done,value:$n.value}:$n,Tt,an):Tt({value:$n,done:Dc})).catch($n=>rt("throw",$n,Tt,an))}catch($n){an($n)}},Et=Re=>dt[Re]=Pt=>new Promise((Tt,an)=>rt(Re,Pt,Tt,an)),dt={};return We=We.apply(Oe,Fe),dt[ys("asyncIterator")]=()=>dt,Et("next"),Et("throw"),Et("return"),dt},um=Oe=>{var Fe=Oe[ys("asyncIterator")],We=!1,rt,Et={};return Fe==null?(Fe=Oe[ys("iterator")](),rt=dt=>Et[dt]=Re=>Fe[dt](Re)):(Fe=Fe.call(Oe),rt=dt=>Et[dt]=Re=>{if(We){if(We=!1,dt==="throw")throw Re;return Re}return We=!0,{done:!1,value:new so(new Promise(Pt=>{var Tt=Fe[dt](Re);Tt instanceof Object||dF("Object expected"),Pt(Tt)}),1)}}),Et[ys("iterator")]=()=>Et,rt("next"),"throw"in Fe?rt("throw"):Et.throw=dt=>{throw dt},"return"in Fe&&rt("return"),Et},zx=(Oe,Fe,We)=>(Fe=Oe[ys("asyncIterator")])?Fe.call(Oe):(Oe=Oe[ys("iterator")](),Fe={},We=(rt,Et)=>(Et=Oe[rt])&&(Fe[rt]=dt=>new Promise((Re,Pt,Tt)=>(dt=Et.call(Oe,dt),Tt=dt.done,Promise.resolve(dt.value).then(an=>Re({value:an,done:Tt}),Pt)))),We("next"),We("return"),Fe);var Fe=document.createElement("style");Fe.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease;&.card-full-width{width:100%;min-width:100%}}.cim-widget-msg-product-card:hover{box-shadow:0 2px 8px #0000001f}.cim-widget-msg-product-card__image-wrapper{position:relative;width:100%;height:100%;aspect-ratio:1 / 1;overflow:hidden}.cim-widget-msg-product-card__image{width:100%;height:100%;object-fit:contain;display:block}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:40%}.cim-widget-msg-product-card__title,.cim-widget-msg-product-card__title-link{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cim-widget-msg-product-card__title-link{text-decoration:none}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}.cim-widget-msg-product-card__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0;font-size:var(--cim-widget-header-text-font-size)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0;font-size:var(--cim-widget-header-text-font-size)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}
1
+ (function(Oe,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Oe=typeof globalThis!="undefined"?globalThis:Oe||self,Fe(Oe.CimulateMessaging={}))})(this,(function(Oe){"use strict";var uF=Object.defineProperty,lF=Object.defineProperties;var cF=Object.getOwnPropertyDescriptors;var Lc=Object.getOwnPropertySymbols;var Ux=Object.prototype.hasOwnProperty,Hx=Object.prototype.propertyIsEnumerable;var ys=(Oe,Fe)=>(Fe=Symbol[Oe])?Fe:Symbol.for("Symbol."+Oe),dF=Oe=>{throw TypeError(Oe)},Za=Math.pow,sm=(Oe,Fe,We)=>Fe in Oe?uF(Oe,Fe,{enumerable:!0,configurable:!0,writable:!0,value:We}):Oe[Fe]=We,U=(Oe,Fe)=>{for(var We in Fe||(Fe={}))Ux.call(Fe,We)&&sm(Oe,We,Fe[We]);if(Lc)for(var We of Lc(Fe))Hx.call(Fe,We)&&sm(Oe,We,Fe[We]);return Oe},se=(Oe,Fe)=>lF(Oe,cF(Fe));var sn=(Oe,Fe)=>{var We={};for(var rt in Oe)Ux.call(Oe,rt)&&Fe.indexOf(rt)<0&&(We[rt]=Oe[rt]);if(Oe!=null&&Lc)for(var rt of Lc(Oe))Fe.indexOf(rt)<0&&Hx.call(Oe,rt)&&(We[rt]=Oe[rt]);return We};var Ze=(Oe,Fe,We)=>sm(Oe,typeof Fe!="symbol"?Fe+"":Fe,We);var $e=(Oe,Fe,We)=>new Promise((rt,Et)=>{var dt=Tt=>{try{Pt(We.next(Tt))}catch(an){Et(an)}},Re=Tt=>{try{Pt(We.throw(Tt))}catch(an){Et(an)}},Pt=Tt=>Tt.done?rt(Tt.value):Promise.resolve(Tt.value).then(dt,Re);Pt((We=We.apply(Oe,Fe)).next())}),so=function(Oe,Fe){this[0]=Oe,this[1]=Fe},am=(Oe,Fe,We)=>{var rt=(Re,Pt,Tt,an)=>{try{var ao=We[Re](Pt),Ts=(Pt=ao.value)instanceof so,Dc=ao.done;Promise.resolve(Ts?Pt[0]:Pt).then($n=>Ts?rt(Re==="return"?Re:"next",Pt[1]?{done:$n.done,value:$n.value}:$n,Tt,an):Tt({value:$n,done:Dc})).catch($n=>rt("throw",$n,Tt,an))}catch($n){an($n)}},Et=Re=>dt[Re]=Pt=>new Promise((Tt,an)=>rt(Re,Pt,Tt,an)),dt={};return We=We.apply(Oe,Fe),dt[ys("asyncIterator")]=()=>dt,Et("next"),Et("throw"),Et("return"),dt},um=Oe=>{var Fe=Oe[ys("asyncIterator")],We=!1,rt,Et={};return Fe==null?(Fe=Oe[ys("iterator")](),rt=dt=>Et[dt]=Re=>Fe[dt](Re)):(Fe=Fe.call(Oe),rt=dt=>Et[dt]=Re=>{if(We){if(We=!1,dt==="throw")throw Re;return Re}return We=!0,{done:!1,value:new so(new Promise(Pt=>{var Tt=Fe[dt](Re);Tt instanceof Object||dF("Object expected"),Pt(Tt)}),1)}}),Et[ys("iterator")]=()=>Et,rt("next"),"throw"in Fe?rt("throw"):Et.throw=dt=>{throw dt},"return"in Fe&&rt("return"),Et},zx=(Oe,Fe,We)=>(Fe=Oe[ys("asyncIterator")])?Fe.call(Oe):(Oe=Oe[ys("iterator")](),Fe={},We=(rt,Et)=>(Et=Oe[rt])&&(Fe[rt]=dt=>new Promise((Re,Pt,Tt)=>(dt=Et.call(Oe,dt),Tt=dt.done,Promise.resolve(dt.value).then(an=>Re({value:an,done:Tt}),Pt)))),We("next"),We("return"),Fe);var Fe=document.createElement("style");Fe.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease;&.card-full-width{width:100%;min-width:100%}}.cim-widget-msg-product-card:hover{box-shadow:0 2px 8px #0000001f}.cim-widget-msg-product-card__image-wrapper{position:relative;width:100%;height:100%;aspect-ratio:1 / 1;overflow:hidden}.cim-widget-msg-product-card__image{width:100%;height:100%;object-fit:contain;display:block}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:40%}.cim-widget-msg-product-card__title,.cim-widget-msg-product-card__title-link{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cim-widget-msg-product-card__title-link{text-decoration:none}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}.cim-widget-msg-product-card__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0;line-height:normal;font-size:var(--cim-widget-header-text-font-size)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0;line-height:normal;font-size:var(--cim-widget-header-text-font-size)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}
2
2
  /*$vite$:1*/`,document.head.appendChild(Fe);function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},Et={},dt={exports:{}},Re={};var Pt;function Tt(){if(Pt)return Re;Pt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),E=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=E&&D[E]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function _(D,Z,k){this.props=D,this.context=Z,this.refs=S,this.updater=k||y}_.prototype.isReactComponent={},_.prototype.setState=function(D,Z){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,Z,"setState")},_.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function A(){}A.prototype=_.prototype;function O(D,Z,k){this.props=D,this.context=Z,this.refs=S,this.updater=k||y}var I=O.prototype=new A;I.constructor=O,x(I,_.prototype),I.isPureReactComponent=!0;var z=Array.isArray,Y=Object.prototype.hasOwnProperty,M={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function pe(D,Z,k){var xe,Pe={},Ne=null,He=null;if(Z!=null)for(xe in Z.ref!==void 0&&(He=Z.ref),Z.key!==void 0&&(Ne=""+Z.key),Z)Y.call(Z,xe)&&!G.hasOwnProperty(xe)&&(Pe[xe]=Z[xe]);var _e=arguments.length-2;if(_e===1)Pe.children=k;else if(1<_e){for(var qe=Array(_e),ut=0;ut<_e;ut++)qe[ut]=arguments[ut+2];Pe.children=qe}if(D&&D.defaultProps)for(xe in _e=D.defaultProps,_e)Pe[xe]===void 0&&(Pe[xe]=_e[xe]);return{$$typeof:e,type:D,key:Ne,ref:He,props:Pe,_owner:M.current}}function be(D,Z){return{$$typeof:e,type:D.type,key:Z,ref:D.ref,props:D.props,_owner:D._owner}}function F(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function te(D){var Z={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(k){return Z[k]})}var X=/\/+/g;function ne(D,Z){return typeof D=="object"&&D!==null&&D.key!=null?te(""+D.key):Z.toString(36)}function ie(D,Z,k,xe,Pe){var Ne=typeof D;(Ne==="undefined"||Ne==="boolean")&&(D=null);var He=!1;if(D===null)He=!0;else switch(Ne){case"string":case"number":He=!0;break;case"object":switch(D.$$typeof){case e:case t:He=!0}}if(He)return He=D,Pe=Pe(He),D=xe===""?"."+ne(He,0):xe,z(Pe)?(k="",D!=null&&(k=D.replace(X,"$&/")+"/"),ie(Pe,Z,k,"",function(ut){return ut})):Pe!=null&&(F(Pe)&&(Pe=be(Pe,k+(!Pe.key||He&&He.key===Pe.key?"":(""+Pe.key).replace(X,"$&/")+"/")+D)),Z.push(Pe)),1;if(He=0,xe=xe===""?".":xe+":",z(D))for(var _e=0;_e<D.length;_e++){Ne=D[_e];var qe=xe+ne(Ne,_e);He+=ie(Ne,Z,k,qe,Pe)}else if(qe=b(D),typeof qe=="function")for(D=qe.call(D),_e=0;!(Ne=D.next()).done;)Ne=Ne.value,qe=xe+ne(Ne,_e++),He+=ie(Ne,Z,k,qe,Pe);else if(Ne==="object")throw Z=String(D),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return He}function Te(D,Z,k){if(D==null)return D;var xe=[],Pe=0;return ie(D,xe,"","",function(Ne){return Z.call(k,Ne,Pe++)}),xe}function Ie(D){if(D._status===-1){var Z=D._result;Z=Z(),Z.then(function(k){(D._status===0||D._status===-1)&&(D._status=1,D._result=k)},function(k){(D._status===0||D._status===-1)&&(D._status=2,D._result=k)}),D._status===-1&&(D._status=0,D._result=Z)}if(D._status===1)return D._result.default;throw D._result}var fe={current:null},W={transition:null},oe={ReactCurrentDispatcher:fe,ReactCurrentBatchConfig:W,ReactCurrentOwner:M};function v(){throw Error("act(...) is not supported in production builds of React.")}return Re.Children={map:Te,forEach:function(D,Z,k){Te(D,function(){Z.apply(this,arguments)},k)},count:function(D){var Z=0;return Te(D,function(){Z++}),Z},toArray:function(D){return Te(D,function(Z){return Z})||[]},only:function(D){if(!F(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Re.Component=_,Re.Fragment=n,Re.Profiler=o,Re.PureComponent=O,Re.StrictMode=r,Re.Suspense=d,Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,Re.act=v,Re.cloneElement=function(D,Z,k){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var xe=x({},D.props),Pe=D.key,Ne=D.ref,He=D._owner;if(Z!=null){if(Z.ref!==void 0&&(Ne=Z.ref,He=M.current),Z.key!==void 0&&(Pe=""+Z.key),D.type&&D.type.defaultProps)var _e=D.type.defaultProps;for(qe in Z)Y.call(Z,qe)&&!G.hasOwnProperty(qe)&&(xe[qe]=Z[qe]===void 0&&_e!==void 0?_e[qe]:Z[qe])}var qe=arguments.length-2;if(qe===1)xe.children=k;else if(1<qe){_e=Array(qe);for(var ut=0;ut<qe;ut++)_e[ut]=arguments[ut+2];xe.children=_e}return{$$typeof:e,type:D.type,key:Pe,ref:Ne,props:xe,_owner:He}},Re.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:a,_context:D},D.Consumer=D},Re.createElement=pe,Re.createFactory=function(D){var Z=pe.bind(null,D);return Z.type=D,Z},Re.createRef=function(){return{current:null}},Re.forwardRef=function(D){return{$$typeof:c,render:D}},Re.isValidElement=F,Re.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:Ie}},Re.memo=function(D,Z){return{$$typeof:h,type:D,compare:Z===void 0?null:Z}},Re.startTransition=function(D){var Z=W.transition;W.transition={};try{D()}finally{W.transition=Z}},Re.unstable_act=v,Re.useCallback=function(D,Z){return fe.current.useCallback(D,Z)},Re.useContext=function(D){return fe.current.useContext(D)},Re.useDebugValue=function(){},Re.useDeferredValue=function(D){return fe.current.useDeferredValue(D)},Re.useEffect=function(D,Z){return fe.current.useEffect(D,Z)},Re.useId=function(){return fe.current.useId()},Re.useImperativeHandle=function(D,Z,k){return fe.current.useImperativeHandle(D,Z,k)},Re.useInsertionEffect=function(D,Z){return fe.current.useInsertionEffect(D,Z)},Re.useLayoutEffect=function(D,Z){return fe.current.useLayoutEffect(D,Z)},Re.useMemo=function(D,Z){return fe.current.useMemo(D,Z)},Re.useReducer=function(D,Z,k){return fe.current.useReducer(D,Z,k)},Re.useRef=function(D){return fe.current.useRef(D)},Re.useState=function(D){return fe.current.useState(D)},Re.useSyncExternalStore=function(D,Z,k){return fe.current.useSyncExternalStore(D,Z,k)},Re.useTransition=function(){return fe.current.useTransition()},Re.version="18.3.1",Re}var an;function ao(){return an||(an=1,dt.exports=Tt()),dt.exports}var Ts;function Dc(){if(Ts)return Et;Ts=1;var e=ao(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,h){var p,E={},b=null,y=null;h!==void 0&&(b=""+h),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(E[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)E[p]===void 0&&(E[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:y,props:E,_owner:o.current}}return Et.Fragment=n,Et.jsx=u,Et.jsxs=u,Et}var $n;function qx(){return $n||($n=1,rt.exports=Dc()),rt.exports}var P=qx();const or=Object.create(null);or.open="0",or.close="1",or.ping="2",or.pong="3",or.message="4",or.upgrade="5",or.noop="6";const eu=Object.create(null);Object.keys(or).forEach(e=>{eu[or[e]]=e});const Mc={type:"error",data:"parser error"},lm=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",cm=typeof ArrayBuffer=="function",dm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Fc=({type:e,data:t},n,r)=>lm&&t instanceof Blob?n?r(t):fm(t,r):cm&&(t instanceof ArrayBuffer||dm(t))?n?r(t):fm(new Blob([t]),r):r(or[e]+(t||"")),fm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function hm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Bc;function Yx(e,t){if(lm&&e.data instanceof Blob)return e.data.arrayBuffer().then(hm).then(t);if(cm&&(e.data instanceof ArrayBuffer||dm(e.data)))return t(hm(e.data));Fc(e,!1,n=>{Bc||(Bc=new TextEncoder),t(Bc.encode(n))})}const pm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bs=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<pm.length;e++)bs[pm.charCodeAt(e)]=e;const Wx=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),p=new Uint8Array(h);for(r=0;r<n;r+=4)a=bs[e.charCodeAt(r)],u=bs[e.charCodeAt(r+1)],c=bs[e.charCodeAt(r+2)],d=bs[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return h},Gx=typeof ArrayBuffer=="function",Uc=(e,t)=>{if(typeof e!="string")return{type:"message",data:mm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Kx(e.substring(1),t)}:eu[n]?e.length>1?{type:eu[n],data:e.substring(1)}:{type:eu[n]}:Mc},Kx=(e,t)=>{if(Gx){const n=Wx(e);return mm(n,t)}else return{base64:!0,data:e}},mm=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,gm="",Xx=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Fc(a,!1,c=>{r[u]=c,++o===n&&t(r.join(gm))})})},Qx=(e,t)=>{const n=e.split(gm),r=[];for(let o=0;o<n.length;o++){const a=Uc(n[o],t);if(r.push(a),a.type==="error")break}return r};function Jx(){return new TransformStream({transform(e,t){Yx(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Hc;function tu(e){return e.reduce((t,n)=>t+n.length,0)}function nu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Zx(e,t){Hc||(Hc=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(tu(n)<1)break;const d=nu(n,1);a=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(tu(n)<2)break;const d=nu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(tu(n)<8)break;const d=nu(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),p=h.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(Mc);break}o=p*Math.pow(2,32)+h.getUint32(4),r=3}else{if(tu(n)<o)break;const d=nu(n,o);c.enqueue(Uc(a?d:Hc.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(Mc);break}}}})}const Em=4;function _t(e){if(e)return ew(e)}function ew(e){for(var t in _t.prototype)e[t]=_t.prototype[t];return e}_t.prototype.on=_t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},_t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},_t.prototype.off=_t.prototype.removeListener=_t.prototype.removeAllListeners=_t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},_t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},_t.prototype.emitReserved=_t.prototype.emit,_t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},_t.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ru=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),On=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),tw="arraybuffer";function fF(){}function ym(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const nw=On.setTimeout,rw=On.clearTimeout;function iu(e,t){t.useNativeTimers?(e.setTimeoutFn=nw.bind(On),e.clearTimeoutFn=rw.bind(On)):(e.setTimeoutFn=On.setTimeout.bind(On),e.clearTimeoutFn=On.clearTimeout.bind(On))}const iw=1.33;function ow(e){return typeof e=="string"?sw(e):Math.ceil((e.byteLength||e.size)*iw)}function sw(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Tm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function aw(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function uw(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class lw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class zc extends _t{constructor(t){super(),this.writable=!1,iu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new lw(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Uc(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=aw(t);return n.length?"?"+n:""}}class cw extends zc{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Qx(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Xx(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Tm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let bm=!1;try{bm=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const dw=bm;function fw(){}class hw extends cw{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class sr extends _t{constructor(t,n,r){super(),this.createRequest=t,iu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=ym(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=sr.requestsCount++,sr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=fw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete sr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(sr.requestsCount=0,sr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",xm);else if(typeof addEventListener=="function"){const e="onpagehide"in On?"pagehide":"unload";addEventListener(e,xm,!1)}}function xm(){for(let e in sr.requests)sr.requests.hasOwnProperty(e)&&sr.requests[e].abort()}const pw=(function(){const e=wm({xdomain:!1});return e&&e.responseType!==null})();class mw extends hw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=pw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new sr(wm,this.uri(),t)}}function wm(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||dw))return new XMLHttpRequest}catch(n){}if(!t)try{return new On[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Sm=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class gw extends zc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Sm?{}:ym(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;Fc(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&ru(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Tm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const jc=On.WebSocket||On.MozWebSocket;class Ew extends gw{createSocket(t,n,r){return Sm?new jc(t,n,r):n?new jc(t,n):new jc(t)}doWrite(t,n){this.ws.send(n)}}class yw extends zc{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Zx(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=Jx();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&ru(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Tw={websocket:Ew,webtransport:yw,polling:mw},bw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,xw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function $c(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=bw.exec(e||""),a={},u=14;for(;u--;)a[xw[u]]=o[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=ww(a,a.path),a.queryKey=Sw(a,a.query),a}function ww(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Sw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Vc=typeof addEventListener=="function"&&typeof removeEventListener=="function",ou=[];Vc&&addEventListener("offline",()=>{ou.forEach(e=>e())},!1);class Hr extends _t{constructor(t,n){if(super(),this.binaryType=tw,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=$c(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=$c(n.host).host);iu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=uw(this.opts.query)),Vc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ou.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Em,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Hr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Hr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=ow(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,ru(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Hr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Vc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ou.indexOf(this._offlineEventListener);r!==-1&&ou.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Hr.protocol=Em;class _w extends Hr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Hr.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",E=>{if(!r)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Hr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=E=>{const b=new Error("probe error: "+E);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function h(E){n&&E.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",o),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",h),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let vw=class extends _w{constructor(t,n={}){const r=typeof t=="object",o=r?U({},t):U({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>Tw[a]).filter(a=>!!a)),super(r?o:t,o)}};function Aw(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=$c(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const Cw=typeof ArrayBuffer=="function",kw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,_m=Object.prototype.toString,Nw=typeof Blob=="function"||typeof Blob!="undefined"&&_m.call(Blob)==="[object BlobConstructor]",Ow=typeof File=="function"||typeof File!="undefined"&&_m.call(File)==="[object FileConstructor]";function qc(e){return Cw&&(e instanceof ArrayBuffer||kw(e))||Nw&&e instanceof Blob||Ow&&e instanceof File}function su(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(su(e[n]))return!0;return!1}if(qc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return su(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&su(e[n]))return!0;return!1}function Iw(e){const t=[],n=e.data,r=e;return r.data=Yc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Yc(e,t){if(!e)return e;if(qc(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Yc(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Yc(e[r],t));return n}return e}function Rw(e,t){return e.data=Wc(e.data,t),delete e.attachments,e}function Wc(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Wc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Wc(e[n],t));return e}const Pw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ke;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ke||(Ke={}));class Lw{constructor(t){this.replacer=t}encode(t){return(t.type===Ke.EVENT||t.type===Ke.ACK)&&su(t)?this.encodeAsBinary({type:t.type===Ke.EVENT?Ke.BINARY_EVENT:Ke.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ke.BINARY_EVENT||t.type===Ke.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Iw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Gc extends _t{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Ke.BINARY_EVENT;r||n.type===Ke.BINARY_ACK?(n.type=r?Ke.EVENT:Ke.ACK,this.reconstructor=new Dw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(qc(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ke[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ke.BINARY_EVENT||r.type===Ke.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Mw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Gc.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ke.CONNECT:return vm(n);case Ke.DISCONNECT:return n===void 0;case Ke.CONNECT_ERROR:return typeof n=="string"||vm(n);case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Pw.indexOf(n[0])===-1);case Ke.ACK:case Ke.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Dw{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Rw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Mw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function vm(e){return Object.prototype.toString.call(e)==="[object Object]"}const Fw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Gc,Encoder:Lw,get PacketType(){return Ke}},Symbol.toStringTag,{value:"Module"}));function Vn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Bw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Am extends _t{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Vn(t,"open",this.onopen.bind(this)),Vn(t,"packet",this.onpacket.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(Bw.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:Ke.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,E=n.pop();this._registerAckCallback(p,E),u.id=p}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ke.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ke.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ke.EVENT:case Ke.BINARY_EVENT:this.onevent(t);break;case Ke.ACK:case Ke.BINARY_ACK:this.onack(t);break;case Ke.DISCONNECT:this.ondisconnect();break;case Ke.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:Ke.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ke.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function uo(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}uo.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},uo.prototype.reset=function(){this.attempts=0},uo.prototype.setMin=function(e){this.ms=e},uo.prototype.setMax=function(e){this.max=e},uo.prototype.setJitter=function(e){this.jitter=e};class Kc extends _t{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,iu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new uo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||Fw;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new vw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Vn(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Vn(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Vn(t,"ping",this.onping.bind(this)),Vn(t,"data",this.ondata.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(t,"close",this.onclose.bind(this)),Vn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){ru(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Am(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const xs={};function Xc(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Aw(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=xs[o]&&a in xs[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Kc(r,t):(xs[o]||(xs[o]=new Kc(r,t)),d=xs[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Xc,{Manager:Kc,Socket:Am,io:Xc,connect:Xc});const Cm=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&Cm.call(Blob),typeof File=="function"||typeof File!="undefined"&&Cm.call(File);var km;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(km||(km={}));var Q=ao();const xi=We(Q);class Uw{constructor(){this.listeners=new Map,this.onceListeners=new Map}on(t,n){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n)}once(t,n){this.onceListeners.has(t)||this.onceListeners.set(t,new Set),this.onceListeners.get(t).add(n)}off(t,n){var r,o;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((o=this.onceListeners.get(t))==null?void 0:o.delete(n))):(this.listeners.delete(t),void this.onceListeners.delete(t)):(this.listeners.clear(),void this.onceListeners.clear())}emit(t,...n){const r=this.listeners.get(t);if(r)for(const a of r)try{a(...n)}catch(u){}const o=this.onceListeners.get(t);if(o){for(const a of o)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}}class Hw{constructor(t,n,r,o,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=o,this.logger=a,this.controller=null,this.reading=!1}connect(){return $e(this,null,function*(){if(this.reading)return void this.logger.warn("SSE already connected, ignoring duplicate connect()");this.controller=new AbortController,this.reading=!0;const t=yield fetch(this.url,{method:"GET",headers:se(U({},this.headers),{Accept:"text/event-stream","Cache-Control":"no-cache"}),signal:this.controller.signal});if(!t.ok){this.reading=!1;const n=yield t.text().catch(()=>t.statusText);throw new Error(`SSE connection failed (${t.status}): ${n}`)}if(!t.body)throw this.reading=!1,new Error("SSE response has no body stream");this.readStream(t.body)})}disconnect(){this.reading=!1,this.controller&&(this.controller.abort(),this.controller=null)}get isConnected(){return this.reading}readStream(t){return $e(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let o="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let c;for(o+=r.decode(a,{stream:!0}),o=o.replace(/\r\n/g,`
3
3
  `).replace(/\r/g,`
4
4
  `);(c=o.indexOf(`
@@ -34,7 +34,7 @@ Error generating stack: `+T.message+`
34
34
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
35
35
  `}),n}function $g(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Vg(e,t){const n=eN(e,t),r=n.one(e,void 0),o=Vk(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
36
36
  `},o),a}function oN(e,t){return e&&"run"in e?function(n,r){return $e(this,null,function*(){const o=Vg(n,U({file:r},t));yield e.run(o,r)})}:function(n,r){return Vg(n,U({file:r},e||t))}}function qg(e){if(e)throw e}var Wd,Yg;function sN(){if(Yg)return Wd;Yg=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},a=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),E=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!E)return!1;var b;for(b in h);return typeof b=="undefined"||e.call(h,b)},u=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(r)return r(h,p).value}else return;return h[p]};return Wd=function d(){var h,p,E,b,y,x,S=arguments[0],_=1,A=arguments.length,O=!1;for(typeof S=="boolean"&&(O=S,S=arguments[1]||{},_=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});_<A;++_)if(h=arguments[_],h!=null)for(p in h)E=c(S,p),b=c(h,p),S!==b&&(O&&b&&(a(b)||(y=o(b)))?(y?(y=!1,x=E&&o(E)?E:[]):x=E&&a(E)?E:{},u(S,{name:p,newValue:d(O,x,b)})):typeof b!="undefined"&&u(S,{name:p,newValue:b}));return S},Wd}var aN=sN();const Gd=We(aN);function Kd(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 uN(){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,...h){const p=e[++a];let E=-1;if(d){u(d);return}for(;++E<o.length;)(h[E]===null||h[E]===void 0)&&(h[E]=o[E]);o=h,p?lN(p,c)(...h):u(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function lN(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(h){const p=h;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 ur={basename:cN,dirname:dN,extname:fN,join:hN,sep:"/"};function cN(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');zs(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 dN(e){if(zs(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 fN(e){zs(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 hN(...e){let t=-1,n;for(;++t<e.length;)zs(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":pN(n)}function pN(e){zs(e);const t=e.codePointAt(0)===47;let n=mN(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function mN(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 zs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const gN={cwd:EN};function EN(){return"/"}function Xd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function yN(e){if(typeof e=="string")e=new URL(e);else if(!Xd(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 TN(e)}function TN(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 Qd=["history","path","basename","stem","extname","dirname"];class Wg{constructor(t){let n;t?Xd(t)?n={path:t}:typeof t=="string"||bN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":gN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Qd.length;){const a=Qd[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)Qd.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?ur.basename(this.path):void 0}set basename(t){Zd(t,"basename"),Jd(t,"basename"),this.path=ur.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ur.dirname(this.path):void 0}set dirname(t){Gg(this.basename,"dirname"),this.path=ur.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ur.extname(this.path):void 0}set extname(t){if(Jd(t,"extname"),Gg(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=ur.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Xd(t)&&(t=yN(t)),Zd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ur.basename(this.path,this.extname):void 0}set stem(t){Zd(t,"stem"),Jd(t,"stem"),this.path=ur.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 Yt(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 Jd(e,t){if(e&&e.includes(ur.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ur.sep+"`")}function Zd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Gg(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function bN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xN=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),wN={}.hasOwnProperty;class ef extends xN{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=uN()}copy(){const t=new ef;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Gd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(rf("data",this.frozen),this.namespace[t]=n,this):wN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(rf("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=Bu(t),r=this.parser||this.Parser;return tf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),tf("process",this.parser||this.Parser),nf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=Bu(t),d=r.parse(c);r.run(d,c,function(p,E,b){if(p||!E||!b)return h(p);const y=E,x=r.stringify(y,b);vN(x)?b.value=x:b.result=x,h(p,b)});function h(p,E){p||!E?u(p):a?a(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),tf("processSync",this.parser||this.Parser),nf("processSync",this.compiler||this.Compiler),this.process(t,o),Xg("processSync","process",n),r;function o(a,u){n=!0,qg(a),r=u}}run(t,n,r){Kg(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=Bu(n);o.run(t,d,h);function h(p,E,b){const y=E||t;p?c(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),Xg("runSync","run",r),o;function a(u,c){qg(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=Bu(n),o=this.compiler||this.Compiler;return nf("stringify",o),Kg(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(rf("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(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...E]=h;d(p,E)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(o.settings=Gd(!0,o.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const E=h[p];a(E)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let E=-1,b=-1;for(;++E<r.length;)if(r[E][0]===h){b=E;break}if(b===-1)r.push([h,...p]);else if(p.length>0){let[y,...x]=p;const S=r[b][1];Kd(S)&&Kd(y)&&(y=Gd(!0,S,y)),r[b]=[h,y,...x]}}}}const SN=new ef().freeze();function tf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function nf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function rf(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 Kg(e){if(!Kd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Xg(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Bu(e){return _N(e)?e:new Wg(e)}function _N(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function vN(e){return typeof e=="string"||AN(e)}function AN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const CN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Qg=[],Jg={allowDangerousHtml:!0},kN=/^(https?|ircs?|mailto|xmpp)$/i,NN=[{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 Zg(e){const t=ON(e),n=IN(e);return RN(t.runSync(t.parse(n),n),e)}function ON(e){const t=e.rehypePlugins||Qg,n=e.remarkPlugins||Qg,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),Jg):Jg;return SN().use(dk).use(n).use(oN,r).use(t)}function IN(e){const t=e.children||"",n=new Wg;return typeof t=="string"&&(n.value=t),n}function RN(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||PN;for(const p of NN)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+CN+p.id,void 0);return Fu(e,h),rA(e,{Fragment:P.Fragment,components:o,ignoreInvalidStyle:!0,jsx:P.jsx,jsxs:P.jsxs,passKeys:!0,passNode:!0});function h(p,E,b){if(p.type==="raw"&&b&&typeof E=="number")return u?b.children.splice(E,1):b.children[E]={type:"text",value:p.value},E;if(p.type==="element"){let y;for(y in Pd)if(Object.hasOwn(Pd,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],S=Pd[y];(S===null||S.includes(p.tagName))&&(p.properties[y]=d(String(x||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof E=="number"&&(y=!r(p,E,b)),y&&b&&typeof E=="number")return c&&p.children?b.children.splice(E,1,...p.children):b.children.splice(E,1),E}}}function PN(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||kN.test(e.slice(0,t))?e:""}const e1=/[#.]/g;function LN(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){e1.lastIndex=o;const c=e1.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 t1(e,t,n){const r=n?BN(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const h=u;c.unshift(h)}else{d=LN(a,t);const h=d.tagName.toLowerCase(),p=r?r.get(h):void 0;if(d.tagName=p||h,DN(u))c.unshift(u);else for(const[E,b]of Object.entries(u))MN(e,d.properties,E,b)}for(const h of c)of(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function DN(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 MN(e,t,n,r){const o=Cd(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=q0(r):o.commaSeparated?a=R0(r):o.commaOrSpaceSeparated?a=q0(R0(r).join(" ")):a=n1(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?FN(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(n1(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function of(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)of(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?of(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function n1(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Is(n)===Is(t)))return!0}return n}function FN(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function BN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const UN=["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"],HN=t1(vu,"div"),zN=t1(mo,"g",UN);function jN(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=r1(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=r1(t,c),h=d===-1?t.length+1:d+1;if(c===h)break;n.push(h)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function r1(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
37
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Ri={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/"},i1={}.hasOwnProperty,$N=Object.prototype;function VN(e,t){const n=t||{};return sf({file:n.file||void 0,location:!1,schema:n.space==="svg"?mo:vu,verbose:n.verbose||!1},e)}function sf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Uu(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:o1(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=jN(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"},Uu(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Uu(e,r,n),n}default:return n=qN(e,t),n}}function o1(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=sf(e,t[n]);r.push(o)}return r}function qN(e,t){const n=e.schema;e.schema=t.namespaceURI===Ri.svg?mo:vu;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;i1.call($N,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?zN:HN)(t.tagName,o,o1(e,t.childNodes));if(Uu(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&bo(d.startTag),p=d&&d.endTag&&bo(d.endTag),E=sf(e,c.content);h&&p&&e.file&&(E.position={start:h.end,end:p.start}),u.content=E}return e.schema=n,u}function Uu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=YN(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function YN(e,t,n){const r=bo(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)i1.call(n.attrs,u)&&(a[Cd(e.schema,u).property]=bo(n.attrs[u]));n.startTag;const c=bo(n.startTag),d=n.endTag?bo(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=a,t.data={position:h}}}return r}function bo(e){const t=s1({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=s1({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function s1(e){return e.line&&e.column?e:void 0}class js{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}js.prototype.property={},js.prototype.normal={},js.prototype.space=null;function a1(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 js(n,r,t)}function af(e){return e.toLowerCase()}class Pn{constructor(t,n){this.property=t,this.attribute=n}}Pn.prototype.space=null,Pn.prototype.boolean=!1,Pn.prototype.booleanish=!1,Pn.prototype.overloadedBoolean=!1,Pn.prototype.number=!1,Pn.prototype.commaSeparated=!1,Pn.prototype.spaceSeparated=!1,Pn.prototype.commaOrSpaceSeparated=!1,Pn.prototype.mustUseProperty=!1,Pn.prototype.defined=!1;let WN=0;const ze=Pi(),At=Pi(),u1=Pi(),ge=Pi(),st=Pi(),xo=Pi(),wn=Pi();function Pi(){return Za(2,++WN)}const uf=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:At,commaOrSpaceSeparated:wn,commaSeparated:xo,number:ge,overloadedBoolean:u1,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),lf=Object.keys(uf);class cf extends Pn{constructor(t,n,r,o){let a=-1;if(super(t,n),l1(this,"space",o),typeof r=="number")for(;++a<lf.length;){const u=lf[a];l1(this,lf[a],(r&uf[u])===uf[u])}}}cf.prototype.defined=!0;function l1(e,t,n){n&&(e[t]=n)}const GN={}.hasOwnProperty;function wo(e){const t={},n={};let r;for(r in e.properties)if(GN.call(e.properties,r)){const o=e.properties[r],a=new cf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[af(r)]=r,n[af(a.attribute)]=r}return new js(t,n,e.space)}const c1=wo({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}}),d1=wo({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function f1(e,t){return t in e?e[t]:t}function h1(e,t){return f1(e,t.toLowerCase())}const p1=wo({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:h1,properties:{xmlns:null,xmlnsXLink:null}}),m1=wo({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:At,ariaAutoComplete:null,ariaBusy:At,ariaChecked:At,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:At,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:At,ariaFlowTo:st,ariaGrabbed:At,ariaHasPopup:null,ariaHidden:At,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:ge,ariaLive:null,ariaModal:At,ariaMultiLine:At,ariaMultiSelectable:At,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:At,ariaReadOnly:At,ariaRelevant:null,ariaRequired:At,ariaRoleDescription:st,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:At,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null}}),KN=wo({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:h1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xo,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:st,autoFocus:ze,autoPlay:ze,blocking:st,capture:null,charSet:null,checked:ze,cite:null,className:st,cols:ge,colSpan:null,content:null,contentEditable:At,controls:ze,controlsList:st,coords:ge|xo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:u1,draggable:At,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:st,height:ge,hidden:ze,high:ge,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:st,itemRef:st,itemScope:ze,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:ge,pattern:null,ping:st,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:st,required:ze,reversed:ze,rows:ge,rowSpan:ge,sandbox:st,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:At,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:At,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:At,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:ge,security:null,unselectable:null}}),XN=wo({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:f1,properties:{about:wn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:st,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:xo,g2:xo,glyphName:xo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wn,rev:wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wn,requiredFeatures:wn,requiredFonts:wn,requiredFormats:wn,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),QN=/^data[-\w.:]+$/i,g1=/-[a-z]/g,JN=/[A-Z]/g;function ZN(e,t){const n=af(t);let r=t,o=Pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&QN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(g1,t3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!g1.test(a)){let u=a.replace(JN,e3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=cf}return new o(r,t)}function e3(e){return"-"+e.toLowerCase()}function t3(e){return e.charAt(1).toUpperCase()}const n3=a1([d1,c1,p1,m1,KN],"html"),E1=a1([d1,c1,p1,m1,XN],"svg"),y1={}.hasOwnProperty;function T1(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&y1.call(o,e)){const d=String(o[e]);u=y1.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 r3={},i3={}.hasOwnProperty,b1=T1("type",{handlers:{root:s3,element:d3,text:l3,comment:c3,doctype:u3}});function o3(e,t){const r=(t||r3).space;return b1(e,r==="svg"?E1:n3)}function s3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=df(e.children,n,t),So(e,n),n}function a3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=df(e.children,n,t),So(e,n),n}function u3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return So(e,t),t}function l3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return So(e,t),t}function c3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return So(e,t),t}function d3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=E1);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&i3.call(e.properties,a)){const d=f3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Ri[u],childNodes:[],parentNode:null};return c.childNodes=df(e.children,c,r),So(e,c),e.tagName==="template"&&e.content&&(c.content=a3(e.content,r)),c}function f3(e,t,n){const r=ZN(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?P0(n):Y0(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=Ri[r.space]}return o}function df(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=b1(e[r],n);a.parentNode=t,o.push(a)}return o}function So(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 h3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],p3=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]),ft="�";var C;(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"})(C||(C={}));const fn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function x1(e){return e>=55296&&e<=57343}function m3(e){return e>=56320&&e<=57343}function g3(e,t){return(e-55296)*1024+9216+t}function w1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function S1(e){return e>=64976&&e<=65007||p3.has(e)}var J;(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"})(J||(J={}));const E3=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=E3,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(m3(n))return this.pos++,this._addGap(),g3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,C.EOF;return this._err(J.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,C.EOF;const r=this.html.charCodeAt(n);return r===C.CARRIAGE_RETURN?C.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,C.EOF;let t=this.html.charCodeAt(this.pos);return t===C.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,C.LINE_FEED):t===C.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,x1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===C.LINE_FEED||t===C.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){w1(t)?this._err(J.controlCharacterInInputStream):S1(t)&&this._err(J.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ve;(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"})(Ve||(Ve={}));function _1(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 T3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),b3=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=b3.get(e))!==null&&t!==void 0?t:e}var Lt;(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"})(Lt||(Lt={}));const w3=32;var Yr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Yr||(Yr={}));function ff(e){return e>=Lt.ZERO&&e<=Lt.NINE}function S3(e){return e>=Lt.UPPER_A&&e<=Lt.UPPER_F||e>=Lt.LOWER_A&&e<=Lt.LOWER_F}function _3(e){return e>=Lt.UPPER_A&&e<=Lt.UPPER_Z||e>=Lt.LOWER_A&&e<=Lt.LOWER_Z||ff(e)}function v3(e){return e===Lt.EQUALS||_3(e)}var Dt;(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"})(Dt||(Dt={}));var vr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(vr||(vr={}));class A3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Dt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=vr.Strict}startEntity(t){this.decodeMode=t,this.state=Dt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Dt.EntityStart:return t.charCodeAt(n)===Lt.NUM?(this.state=Dt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Dt.NamedEntity,this.stateNamedEntity(t,n));case Dt.NumericStart:return this.stateNumericStart(t,n);case Dt.NumericDecimal:return this.stateNumericDecimal(t,n);case Dt.NumericHex:return this.stateNumericHex(t,n);case Dt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|w3)===Lt.LOWER_X?(this.state=Dt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Dt.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(ff(o)||S3(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(ff(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===Lt.SEMI)this.consumed+=1;else if(this.decodeMode===vr.Strict)return 0;return this.emitCodePoint(x3(this.result),this.consumed),this.errors&&(t!==Lt.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&Yr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=C3(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===vr.Attribute&&(a===0||v3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Yr.VALUE_LENGTH)>>14,a!==0){if(u===Lt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==vr.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]&Yr.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]&~Yr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Dt.NamedEntity:return this.result!==0&&(this.decodeMode!==vr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Dt.NumericDecimal:return this.emitNumericEntity(0,2);case Dt.NumericHex:return this.emitNumericEntity(0,3);case Dt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Dt.EntityStart:return 0}}}function C3(e,t,n,r){const o=(t&Yr.BRANCH_LENGTH)>>7,a=t&Yr.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,h=e[d];if(h<r)u=d+1;else if(h>r)c=d-1;else return e[d+o]}return-1}var le;(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/"})(le||(le={}));var Li;(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"})(Li||(Li={}));var Ln;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ln||(Ln={}));var V;(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"})(V||(V={}));var m;(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"})(m||(m={}));const k3=new Map([[V.A,m.A],[V.ADDRESS,m.ADDRESS],[V.ANNOTATION_XML,m.ANNOTATION_XML],[V.APPLET,m.APPLET],[V.AREA,m.AREA],[V.ARTICLE,m.ARTICLE],[V.ASIDE,m.ASIDE],[V.B,m.B],[V.BASE,m.BASE],[V.BASEFONT,m.BASEFONT],[V.BGSOUND,m.BGSOUND],[V.BIG,m.BIG],[V.BLOCKQUOTE,m.BLOCKQUOTE],[V.BODY,m.BODY],[V.BR,m.BR],[V.BUTTON,m.BUTTON],[V.CAPTION,m.CAPTION],[V.CENTER,m.CENTER],[V.CODE,m.CODE],[V.COL,m.COL],[V.COLGROUP,m.COLGROUP],[V.DD,m.DD],[V.DESC,m.DESC],[V.DETAILS,m.DETAILS],[V.DIALOG,m.DIALOG],[V.DIR,m.DIR],[V.DIV,m.DIV],[V.DL,m.DL],[V.DT,m.DT],[V.EM,m.EM],[V.EMBED,m.EMBED],[V.FIELDSET,m.FIELDSET],[V.FIGCAPTION,m.FIGCAPTION],[V.FIGURE,m.FIGURE],[V.FONT,m.FONT],[V.FOOTER,m.FOOTER],[V.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[V.FORM,m.FORM],[V.FRAME,m.FRAME],[V.FRAMESET,m.FRAMESET],[V.H1,m.H1],[V.H2,m.H2],[V.H3,m.H3],[V.H4,m.H4],[V.H5,m.H5],[V.H6,m.H6],[V.HEAD,m.HEAD],[V.HEADER,m.HEADER],[V.HGROUP,m.HGROUP],[V.HR,m.HR],[V.HTML,m.HTML],[V.I,m.I],[V.IMG,m.IMG],[V.IMAGE,m.IMAGE],[V.INPUT,m.INPUT],[V.IFRAME,m.IFRAME],[V.KEYGEN,m.KEYGEN],[V.LABEL,m.LABEL],[V.LI,m.LI],[V.LINK,m.LINK],[V.LISTING,m.LISTING],[V.MAIN,m.MAIN],[V.MALIGNMARK,m.MALIGNMARK],[V.MARQUEE,m.MARQUEE],[V.MATH,m.MATH],[V.MENU,m.MENU],[V.META,m.META],[V.MGLYPH,m.MGLYPH],[V.MI,m.MI],[V.MO,m.MO],[V.MN,m.MN],[V.MS,m.MS],[V.MTEXT,m.MTEXT],[V.NAV,m.NAV],[V.NOBR,m.NOBR],[V.NOFRAMES,m.NOFRAMES],[V.NOEMBED,m.NOEMBED],[V.NOSCRIPT,m.NOSCRIPT],[V.OBJECT,m.OBJECT],[V.OL,m.OL],[V.OPTGROUP,m.OPTGROUP],[V.OPTION,m.OPTION],[V.P,m.P],[V.PARAM,m.PARAM],[V.PLAINTEXT,m.PLAINTEXT],[V.PRE,m.PRE],[V.RB,m.RB],[V.RP,m.RP],[V.RT,m.RT],[V.RTC,m.RTC],[V.RUBY,m.RUBY],[V.S,m.S],[V.SCRIPT,m.SCRIPT],[V.SEARCH,m.SEARCH],[V.SECTION,m.SECTION],[V.SELECT,m.SELECT],[V.SOURCE,m.SOURCE],[V.SMALL,m.SMALL],[V.SPAN,m.SPAN],[V.STRIKE,m.STRIKE],[V.STRONG,m.STRONG],[V.STYLE,m.STYLE],[V.SUB,m.SUB],[V.SUMMARY,m.SUMMARY],[V.SUP,m.SUP],[V.TABLE,m.TABLE],[V.TBODY,m.TBODY],[V.TEMPLATE,m.TEMPLATE],[V.TEXTAREA,m.TEXTAREA],[V.TFOOT,m.TFOOT],[V.TD,m.TD],[V.TH,m.TH],[V.THEAD,m.THEAD],[V.TITLE,m.TITLE],[V.TR,m.TR],[V.TRACK,m.TRACK],[V.TT,m.TT],[V.U,m.U],[V.UL,m.UL],[V.SVG,m.SVG],[V.VAR,m.VAR],[V.WBR,m.WBR],[V.XMP,m.XMP]]);function _o(e){var t;return(t=k3.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const de=m,N3={[le.HTML]:new Set([de.ADDRESS,de.APPLET,de.AREA,de.ARTICLE,de.ASIDE,de.BASE,de.BASEFONT,de.BGSOUND,de.BLOCKQUOTE,de.BODY,de.BR,de.BUTTON,de.CAPTION,de.CENTER,de.COL,de.COLGROUP,de.DD,de.DETAILS,de.DIR,de.DIV,de.DL,de.DT,de.EMBED,de.FIELDSET,de.FIGCAPTION,de.FIGURE,de.FOOTER,de.FORM,de.FRAME,de.FRAMESET,de.H1,de.H2,de.H3,de.H4,de.H5,de.H6,de.HEAD,de.HEADER,de.HGROUP,de.HR,de.HTML,de.IFRAME,de.IMG,de.INPUT,de.LI,de.LINK,de.LISTING,de.MAIN,de.MARQUEE,de.MENU,de.META,de.NAV,de.NOEMBED,de.NOFRAMES,de.NOSCRIPT,de.OBJECT,de.OL,de.P,de.PARAM,de.PLAINTEXT,de.PRE,de.SCRIPT,de.SECTION,de.SELECT,de.SOURCE,de.STYLE,de.SUMMARY,de.TABLE,de.TBODY,de.TD,de.TEMPLATE,de.TEXTAREA,de.TFOOT,de.TH,de.THEAD,de.TITLE,de.TR,de.TRACK,de.UL,de.WBR,de.XMP]),[le.MATHML]:new Set([de.MI,de.MO,de.MN,de.MS,de.MTEXT,de.ANNOTATION_XML]),[le.SVG]:new Set([de.TITLE,de.FOREIGN_OBJECT,de.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},hf=new Set([de.H1,de.H2,de.H3,de.H4,de.H5,de.H6]);V.STYLE,V.SCRIPT,V.XMP,V.IFRAME,V.NOEMBED,V.NOFRAMES,V.PLAINTEXT;var N;(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"})(N||(N={}));const xt={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function O3(e){return e>=C.DIGIT_0&&e<=C.DIGIT_9}function $s(e){return e>=C.LATIN_CAPITAL_A&&e<=C.LATIN_CAPITAL_Z}function I3(e){return e>=C.LATIN_SMALL_A&&e<=C.LATIN_SMALL_Z}function Wr(e){return I3(e)||$s(e)}function v1(e){return Wr(e)||O3(e)}function Hu(e){return e+32}function A1(e){return e===C.SPACE||e===C.LINE_FEED||e===C.TABULATION||e===C.FORM_FEED}function C1(e){return A1(e)||e===C.SOLIDUS||e===C.GREATER_THAN_SIGN}function R3(e){return e===C.NULL?J.nullCharacterReference:e>1114111?J.characterReferenceOutsideUnicodeRange:x1(e)?J.surrogateCharacterReference:S1(e)?J.noncharacterCharacterReference:w1(e)||e===C.CARRIAGE_RETURN?J.controlCharacterReference:null}class P3{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=N.DATA,this.returnState=N.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 A3(T3,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(J.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(J.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=R3(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:Ve.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ve.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ve.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ve.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(_1(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(J.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=_o(t.tagName),t.type===Ve.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(J.endTagWithAttributes),t.selfClosing&&this._err(J.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 Ve.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ve.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ve.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:Ve.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=A1(t)?Ve.WHITESPACE_CHARACTER:t===C.NULL?Ve.NULL_CHARACTER:Ve.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ve.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?vr.Attribute:vr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case N.DATA:{this._stateData(t);break}case N.RCDATA:{this._stateRcdata(t);break}case N.RAWTEXT:{this._stateRawtext(t);break}case N.SCRIPT_DATA:{this._stateScriptData(t);break}case N.PLAINTEXT:{this._statePlaintext(t);break}case N.TAG_OPEN:{this._stateTagOpen(t);break}case N.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case N.TAG_NAME:{this._stateTagName(t);break}case N.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case N.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case N.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case N.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case N.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case N.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case N.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case N.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case N.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case N.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case N.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case N.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case N.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case N.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case N.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case N.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case N.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case N.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case N.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case N.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case N.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case N.BOGUS_COMMENT:{this._stateBogusComment(t);break}case N.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case N.COMMENT_START:{this._stateCommentStart(t);break}case N.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case N.COMMENT:{this._stateComment(t);break}case N.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case N.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case N.COMMENT_END:{this._stateCommentEnd(t);break}case N.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case N.DOCTYPE:{this._stateDoctype(t);break}case N.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case N.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case N.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case N.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case N.CDATA_SECTION:{this._stateCdataSection(t);break}case N.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case N.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case N.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case N.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitCodePoint(t);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case C.AMPERSAND:{this._startCharacterReference();break}case C.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(ft);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case C.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(ft);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(ft);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(ft);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Wr(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case C.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case C.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case C.QUESTION_MARK:{this._err(J.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case C.EOF:{this._err(J.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Wr(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case C.GREATER_THAN_SIGN:{this._err(J.missingEndTagName),this.state=N.DATA;break}case C.EOF:{this._err(J.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.tagName+=ft;break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint($s(t)?Hu(t):t)}}_stateRcdataLessThanSign(t){t===C.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Wr(t)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=N.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case C.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case C.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===C.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Wr(t)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case C.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case C.EXCLAMATION_MARK:{this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Wr(t)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===C.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===C.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(ft);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===C.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Wr(t)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Wr(t)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&C1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(ft);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===C.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&C1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._err(J.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:{this._err(J.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.name+=ft;break}default:this.currentAttr.name+=String.fromCodePoint($s(t)?Hu(t):t)}}_stateAfterAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case C.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case C.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case C.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:case C.EQUALS_SIGN:case C.GRAVE_ACCENT:{this._err(J.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case C.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case C.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.data+=ft;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(fn.DASH_DASH,!0)?(this._createCommentToken(fn.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(fn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(fn.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(fn.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(J.cdataInHtmlContent),this._createCommentToken(fn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(J.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case C.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=N.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case C.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.data+=ft;break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case C.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case C.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===C.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===C.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==C.GREATER_THAN_SIGN&&t!==C.EOF&&this._err(J.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case C.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case C.HYPHEN_MINUS:{n.data+="-";break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case C.GREATER_THAN_SIGN:{this._err(J.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case C.EOF:{this._err(J.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if($s(t))this._createDoctypeToken(String.fromCharCode(Hu(t))),this.state=N.DOCTYPE_NAME;else switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.NULL:{this._err(J.unexpectedNullCharacter),this._createDoctypeToken(ft),this.state=N.DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.EOF:{this._err(J.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=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.name+=ft;break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint($s(t)?Hu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(fn.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(fn.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(J.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=ft;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.EOF:{this._err(J.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 C.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=ft;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.EOF:{this._err(J.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.QUOTATION_MARK:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=ft;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.EOF:{this._err(J.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 C.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=ft;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.EOF:{this._err(J.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.NULL:{this._err(J.unexpectedNullCharacter);break}case C.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case C.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case C.EOF:{this._err(J.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===C.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case C.GREATER_THAN_SIGN:{this.state=N.DATA;break}case C.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=N.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(C.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&v1(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){v1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===C.SEMICOLON&&this._err(J.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const k1=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),N1=new Set([...k1,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),zu=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),L3=new Set([...zu,m.OL,m.UL]),D3=new Set([...zu,m.BUTTON]),O1=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),I1=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),M3=new Set([m.TR,m.TEMPLATE,m.HTML]),F3=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),B3=new Set([m.TABLE,m.TEMPLATE,m.HTML]),U3=new Set([m.TD,m.TH]);class H3{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=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===le.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])!==le.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(hf,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(U3,le.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(B3,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(F3,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(M3,le.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]===m.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]===m.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 le.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case le.SVG:{if(I1.has(o))return!1;break}case le.MATHML:{if(O1.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,zu)}hasInListItemScope(t){return this.hasInDynamicScope(t,L3)}hasInButtonScope(t){return this.hasInDynamicScope(t,D3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(hf.has(n))return!0;if(zu.has(n))return!1;break}case le.SVG:{if(I1.has(n))return!1;break}case le.MATHML:{if(O1.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===le.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&k1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&N1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&N1.has(this.currentTagId);)this.pop()}}const pf=3;var lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(lr||(lr={}));const R1={type:lr.Marker};class z3{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===lr.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===a&&this.treeAdapter.getNamespaceURI(h)===u){const p=this.treeAdapter.getAttrList(h);p.length===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<pf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<pf)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>=pf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(R1)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:lr.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(R1);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===lr.Element&&n.element===t)}}const Gr={createDocument(){return{nodeName:"#document",mode:Ln.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};Gr.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(Gr.isTextNode(n)){n.value+=t;return}}Gr.appendChild(e,Gr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Gr.isTextNode(r)?r.value+=t:Gr.insertBefore(e,Gr.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=U(U({},e.sourceCodeLocation),t)}},P1="html",j3="about:legacy-compat",$3="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",L1=["+//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//"],V3=[...L1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],q3=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),D1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Y3=[...D1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function M1(e,t){return t.some(n=>e.startsWith(n))}function W3(e){return e.name===P1&&e.publicId===null&&(e.systemId===null||e.systemId===j3)}function G3(e){if(e.name!==P1)return Ln.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===$3)return Ln.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),q3.has(n))return Ln.QUIRKS;let r=t===null?V3:L1;if(M1(n,r))return Ln.QUIRKS;if(r=t===null?D1:Y3,M1(n,r))return Ln.LIMITED_QUIRKS}return Ln.NO_QUIRKS}const F1={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},K3="definitionurl",X3="definitionURL",Q3=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])),J3=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),Z3=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])),eO=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function tO(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===Li.COLOR||r===Li.SIZE||r===Li.FACE)||eO.has(t)}function B1(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===K3){e.attrs[t].name=X3;break}}function U1(e){for(let t=0;t<e.attrs.length;t++){const n=Q3.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function mf(e){for(let t=0;t<e.attrs.length;t++){const n=J3.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 nO(e){const t=Z3.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=_o(e.tagName))}function rO(e,t){return t===le.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function iO(e,t,n){if(t===le.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Li.ENCODING){const o=n[r].value.toLowerCase();return o===F1.TEXT_HTML||o===F1.APPLICATION_XML}}return t===le.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function oO(e,t,n,r){return(!r||r===le.HTML)&&iO(e,t,n)||(!r||r===le.MATHML)&&rO(e,t)}const sO="hidden",aO=8,uO=3;var L;(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"})(L||(L={}));const lO={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},H1=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),z1={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Gr,onParseError:null};class j1{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.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=U(U({},z1),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 P3(this.options,this),this.activeFormattingElements=new z3(this.treeAdapter),this.fragmentContextID=r?_o(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new H3(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=U(U({},z1),n);t!=null||(t=r.treeAdapter.createElement(V.TEMPLATE,le.HTML,[]));const o=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(L.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:lO,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)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=xt.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)===V.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==le.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=xt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=xt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=xt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=xt.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&&se(U({},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,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.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(V.HTML,le.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.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:h,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:h,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===Ve.END_TAG&&o===n.tagName?{endTag:U({},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===m.SVG&&this.treeAdapter.getTagName(n)===V.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case Ve.CHARACTER:{this.onCharacter(t);break}case Ve.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ve.COMMENT:{this.onComment(t);break}case Ve.DOCTYPE:{this.onDoctype(t);break}case Ve.START_TAG:{this._processStartTag(t);break}case Ve.END_TAG:{this.onEndTag(t);break}case Ve.EOF:{this.onEof(t);break}case Ve.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return oO(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===lr.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=L.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=L.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=L.IN_TABLE;return}case m.BODY:{this.insertionMode=L.IN_BODY;return}case m.FRAMESET:{this.insertionMode=L.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?L.AFTER_HEAD:L.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return H1.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 m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.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 N3[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){UI(this,t);return}switch(this.insertionMode){case L.INITIAL:{Vs(this,t);break}case L.BEFORE_HTML:{qs(this,t);break}case L.BEFORE_HEAD:{Ys(this,t);break}case L.IN_HEAD:{Ws(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Gs(this,t);break}case L.AFTER_HEAD:{Ks(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{V1(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Tf(this,t);break}case L.IN_TABLE_TEXT:{J1(this,t);break}case L.IN_COLUMN_GROUP:{Vu(this,t);break}case L.AFTER_BODY:{Wu(this,t);break}case L.AFTER_AFTER_BODY:{Gu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){BI(this,t);return}switch(this.insertionMode){case L.INITIAL:{Vs(this,t);break}case L.BEFORE_HTML:{qs(this,t);break}case L.BEFORE_HEAD:{Ys(this,t);break}case L.IN_HEAD:{Ws(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Gs(this,t);break}case L.AFTER_HEAD:{Ks(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Tf(this,t);break}case L.IN_COLUMN_GROUP:{Vu(this,t);break}case L.AFTER_BODY:{Wu(this,t);break}case L.AFTER_AFTER_BODY:{Gu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ef(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{Ef(this,t);break}case L.IN_TABLE_TEXT:{Js(this,t);break}case L.AFTER_BODY:{gO(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{EO(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{yO(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,J.misplacedDoctype);break}case L.IN_TABLE_TEXT:{Js(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,J.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?HI(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Vs(this,t);break}case L.BEFORE_HTML:{TO(this,t);break}case L.BEFORE_HEAD:{xO(this,t);break}case L.IN_HEAD:{Wn(this,t);break}case L.IN_HEAD_NO_SCRIPT:{_O(this,t);break}case L.AFTER_HEAD:{AO(this,t);break}case L.IN_BODY:{Gt(this,t);break}case L.IN_TABLE:{vo(this,t);break}case L.IN_TABLE_TEXT:{Js(this,t);break}case L.IN_CAPTION:{wI(this,t);break}case L.IN_COLUMN_GROUP:{bf(this,t);break}case L.IN_TABLE_BODY:{qu(this,t);break}case L.IN_ROW:{Yu(this,t);break}case L.IN_CELL:{vI(this,t);break}case L.IN_SELECT:{tE(this,t);break}case L.IN_SELECT_IN_TABLE:{CI(this,t);break}case L.IN_TEMPLATE:{NI(this,t);break}case L.AFTER_BODY:{II(this,t);break}case L.IN_FRAMESET:{RI(this,t);break}case L.AFTER_FRAMESET:{LI(this,t);break}case L.AFTER_AFTER_BODY:{MI(this,t);break}case L.AFTER_AFTER_FRAMESET:{FI(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?zI(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Vs(this,t);break}case L.BEFORE_HTML:{bO(this,t);break}case L.BEFORE_HEAD:{wO(this,t);break}case L.IN_HEAD:{SO(this,t);break}case L.IN_HEAD_NO_SCRIPT:{vO(this,t);break}case L.AFTER_HEAD:{CO(this,t);break}case L.IN_BODY:{$u(this,t);break}case L.TEXT:{fI(this,t);break}case L.IN_TABLE:{Xs(this,t);break}case L.IN_TABLE_TEXT:{Js(this,t);break}case L.IN_CAPTION:{SI(this,t);break}case L.IN_COLUMN_GROUP:{_I(this,t);break}case L.IN_TABLE_BODY:{xf(this,t);break}case L.IN_ROW:{eE(this,t);break}case L.IN_CELL:{AI(this,t);break}case L.IN_SELECT:{nE(this,t);break}case L.IN_SELECT_IN_TABLE:{kI(this,t);break}case L.IN_TEMPLATE:{OI(this,t);break}case L.AFTER_BODY:{iE(this,t);break}case L.IN_FRAMESET:{PI(this,t);break}case L.AFTER_FRAMESET:{DI(this,t);break}case L.AFTER_AFTER_BODY:{Gu(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{Vs(this,t);break}case L.BEFORE_HTML:{qs(this,t);break}case L.BEFORE_HEAD:{Ys(this,t);break}case L.IN_HEAD:{Ws(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Gs(this,t);break}case L.AFTER_HEAD:{Ks(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{X1(this,t);break}case L.TEXT:{hI(this,t);break}case L.IN_TABLE_TEXT:{Js(this,t);break}case L.IN_TEMPLATE:{rE(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{yf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===C.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 L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{$1(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Tf(this,t);break}case L.IN_TABLE_TEXT:{Q1(this,t);break}}}}function cO(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):K1(e,t),n}function dO(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 fO(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>=uO;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=hO(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function hO(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 pO(e,t,n){const r=e.treeAdapter.getTagName(t),o=_o(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function mO(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 gf(e,t){for(let n=0;n<aO;n++){const r=cO(e,t);if(!r)break;const o=dO(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=fO(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&pO(e,u,a),mO(e,o,r)}}function Ef(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function gO(e,t){e._appendCommentNode(t,e.openElements.items[0])}function EO(e,t){e._appendCommentNode(t,e.document)}function yf(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 yO(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ln.QUIRKS:G3(t);W3(t)||e._err(t,J.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function Vs(e,t){e._err(t,J.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ln.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function TO(e,t){t.tagID===m.HTML?(e._insertElement(t,le.HTML),e.insertionMode=L.BEFORE_HEAD):qs(e,t)}function bO(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&qs(e,t)}function qs(e,t){e._insertFakeRootElement(),e.insertionMode=L.BEFORE_HEAD,e._processToken(t)}function xO(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Ys(e,t)}}function wO(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Ys(e,t):e._err(t,J.endTagWithoutMatchingOpenElement)}function Ys(e,t){e._insertFakeElement(V.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function Wn(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,xt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,xt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=L.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,xt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,xt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case m.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:Ws(e,t)}}function SO(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Ws(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function Di(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,J.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,J.endTagWithoutMatchingOpenElement)}function Ws(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function _O(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{Wn(e,t);break}case m.NOSCRIPT:{e._err(t,J.nestedNoscriptInHead);break}default:Gs(e,t)}}function vO(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case m.BR:{Gs(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function Gs(e,t){const n=t.type===Ve.EOF?J.openElementsLeftAfterEof:J.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function AO(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=L.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,J.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),Wn(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:Ks(e,t)}}function CO(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Ks(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function Ks(e,t){e._insertFakeElement(V.BODY,m.BODY),e.insertionMode=L.IN_BODY,ju(e,t)}function ju(e,t){switch(t.type){case Ve.CHARACTER:{V1(e,t);break}case Ve.WHITESPACE_CHARACTER:{$1(e,t);break}case Ve.COMMENT:{Ef(e,t);break}case Ve.START_TAG:{Gt(e,t);break}case Ve.END_TAG:{$u(e,t);break}case Ve.EOF:{X1(e,t);break}}}function $1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function V1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function kO(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function NO(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function OO(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=L.IN_FRAMESET)}function IO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function RO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&hf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function PO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function LO(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function DO(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===m.LI&&o===m.LI||(n===m.DD||n===m.DT)&&(o===m.DD||o===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function MO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=xt.PLAINTEXT}function FO(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function BO(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(V.A);n&&(gf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function UO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function HO(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(gf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function jO(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ln.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function q1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Y1(e){const t=_1(e,Li.TYPE);return t!=null&&t.toLowerCase()===sO}function $O(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),Y1(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function VO(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function qO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function YO(e,t){t.tagName=V.IMG,t.tagID=m.IMG,q1(e,t)}function WO(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=xt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function GO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,xt.RAWTEXT)}function KO(e,t){e.framesetOk=!1,e._switchToTextParsing(t,xt.RAWTEXT)}function W1(e,t){e._switchToTextParsing(t,xt.RAWTEXT)}function XO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function QO(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function JO(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function ZO(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,le.HTML)}function eI(e,t){e._reconstructActiveFormattingElements(),B1(t),mf(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function tI(e,t){e._reconstructActiveFormattingElements(),U1(t),mf(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function G1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function Gt(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{UO(e,t);break}case m.A:{BO(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{RO(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{IO(e,t);break}case m.LI:case m.DD:case m.DT:{DO(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{q1(e,t);break}case m.HR:{qO(e,t);break}case m.RB:case m.RTC:{JO(e,t);break}case m.RT:case m.RP:{ZO(e,t);break}case m.PRE:case m.LISTING:{PO(e,t);break}case m.XMP:{GO(e,t);break}case m.SVG:{tI(e,t);break}case m.HTML:{kO(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{Wn(e,t);break}case m.BODY:{NO(e,t);break}case m.FORM:{LO(e,t);break}case m.NOBR:{HO(e,t);break}case m.MATH:{eI(e,t);break}case m.TABLE:{jO(e,t);break}case m.INPUT:{$O(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{VO(e,t);break}case m.IMAGE:{YO(e,t);break}case m.BUTTON:{FO(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{zO(e,t);break}case m.IFRAME:{KO(e,t);break}case m.SELECT:{XO(e,t);break}case m.OPTION:case m.OPTGROUP:{QO(e,t);break}case m.NOEMBED:case m.NOFRAMES:{W1(e,t);break}case m.FRAMESET:{OO(e,t);break}case m.TEXTAREA:{WO(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?W1(e,t):G1(e,t);break}case m.PLAINTEXT:{MO(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:G1(e,t)}}function nI(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function rI(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,iE(e,t))}function iI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function oI(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function sI(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(V.P,m.P),e._closePElement()}function aI(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function uI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function lI(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function cI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function dI(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(V.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function K1(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!==m.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 $u(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{gf(e,t);break}case m.P:{sI(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{iI(e,t);break}case m.LI:{aI(e);break}case m.DD:case m.DT:{uI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{lI(e);break}case m.BR:{dI(e);break}case m.BODY:{nI(e,t);break}case m.HTML:{rI(e,t);break}case m.FORM:{oI(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{cI(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:K1(e,t)}}function X1(e,t){e.tmplInsertionModeStack.length>0?rE(e,t):yf(e,t)}function fI(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function hI(e,t){e._err(t,J.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Tf(e,t){if(e.openElements.currentTagId!==void 0&&H1.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case Ve.CHARACTER:{J1(e,t);break}case Ve.WHITESPACE_CHARACTER:{Q1(e,t);break}}else Qs(e,t)}function pI(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=L.IN_CAPTION}function mI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function gI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.COLGROUP,m.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,bf(e,t)}function EI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=L.IN_TABLE_BODY}function yI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.TBODY,m.TBODY),e.insertionMode=L.IN_TABLE_BODY,qu(e,t)}function TI(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function bI(e,t){Y1(t)?e._appendElement(t,le.HTML):Qs(e,t),t.ackSelfClosing=!0}function xI(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function vo(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{yI(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{Wn(e,t);break}case m.COL:{gI(e,t);break}case m.FORM:{xI(e,t);break}case m.TABLE:{TI(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{EI(e,t);break}case m.INPUT:{bI(e,t);break}case m.CAPTION:{pI(e,t);break}case m.COLGROUP:{mI(e,t);break}default:Qs(e,t)}}function Xs(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{Di(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Qs(e,t)}}function Qs(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ju(e,t),e.fosterParentingEnabled=n}function Q1(e,t){e.pendingCharacterTokens.push(t)}function J1(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Js(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Qs(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Z1=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function wI(e,t){const n=t.tagID;Z1.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,vo(e,t)):Gt(e,t)}function SI(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,n===m.TABLE&&Xs(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:$u(e,t)}}function bf(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{Wn(e,t);break}default:Vu(e,t)}}function _I(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case m.TEMPLATE:{Di(e,t);break}case m.COL:break;default:Vu(e,t)}}function Vu(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function qu(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=L.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(V.TR,m.TR),e.insertionMode=L.IN_ROW,Yu(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,vo(e,t));break}default:vo(e,t)}}function xf(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Xs(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:Xs(e,t)}}function Yu(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=L.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,qu(e,t));break}default:vo(e,t)}}function eE(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,xf(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,xf(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:Xs(e,t)}}function vI(e,t){const n=t.tagID;Z1.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),Yu(e,t)):Gt(e,t)}function AI(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),eE(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:$u(e,t)}}function tE(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{Wn(e,t);break}}}function nE(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{Di(e,t);break}}}function CI(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):tE(e,t)}function kI(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):nE(e,t)}function NI(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{Wn(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,vo(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,bf(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,qu(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,Yu(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,Gt(e,t)}}function OI(e,t){t.tagID===m.TEMPLATE&&Di(e,t)}function rE(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):yf(e,t)}function II(e,t){t.tagID===m.HTML?Gt(e,t):Wu(e,t)}function iE(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=L.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.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 Wu(e,t)}function Wu(e,t){e.insertionMode=L.IN_BODY,ju(e,t)}function RI(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.FRAMESET:{e._insertElement(t,le.HTML);break}case m.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{Wn(e,t);break}}}function PI(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function LI(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.NOFRAMES:{Wn(e,t);break}}}function DI(e,t){t.tagID===m.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function MI(e,t){t.tagID===m.HTML?Gt(e,t):Gu(e,t)}function Gu(e,t){e.insertionMode=L.IN_BODY,ju(e,t)}function FI(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.NOFRAMES:{Wn(e,t);break}}}function BI(e,t){t.chars=ft,e._insertCharacters(t)}function UI(e,t){e._insertCharacters(t),e.framesetOk=!1}function oE(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function HI(e,t){if(tO(t))oE(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?B1(t):r===le.SVG&&(nO(t),U1(t)),mf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function zI(e,t){if(t.tagID===m.P||t.tagID===m.BR){oE(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)===le.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}V.AREA,V.BASE,V.BASEFONT,V.BGSOUND,V.BR,V.COL,V.EMBED,V.FRAME,V.HR,V.IMG,V.INPUT,V.KEYGEN,V.LINK,V.META,V.PARAM,V.SOURCE,V.TRACK,V.WBR;const jI=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,$I=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),sE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function aE(e,t){const n=ZI(e),r=T1("type",{handlers:{root:VI,element:qI,text:YI,comment:lE,doctype:WI,raw:KI},unknown:XI}),o={parser:n?new j1(sE):j1.getFragmentParser(void 0,sE),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Ao(o,ar());const a=n?o.parser.document:o.parser.getFragment(),u=VN(a,{file:o.options.file});return o.stitches&&Fu(u,"comment",function(c,d,h){const p=c;if(p.value.stitch&&h&&d!==void 0){const E=h.children;return E[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function uE(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function VI(e,t){uE(e.children,t)}function qI(e,t){QI(e,t),uE(e.children,t),JI(e,t)}function YI(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ve.CHARACTER,chars:e.value,location:Zs(e)};Ao(t,ar(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function WI(e,t){const n={type:Ve.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Zs(e)};Ao(t,ar(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function GI(e,t){t.stitches=!0;const n=eR(e);if("children"in e&&"children"in n){const r=aE({type:"root",children:e.children},t.options);n.children=r.children}lE({type:"comment",value:{stitch:n}},t)}function lE(e,t){const n=e.value,r={type:Ve.COMMENT,data:n,location:Zs(e)};Ao(t,ar(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function KI(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,cE(t,ar(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(jI,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function XI(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))GI(n,t);else{let r="";throw $I.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 Ao(e,t){cE(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=xt.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 cE(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 QI(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===xt.PLAINTEXT)return;Ao(t,ar(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Ri.html;o===Ri.html&&n==="svg"&&(o=Ri.svg);const a=o3(se(U({},e),{children:[]}),{space:o===Ri.svg?"svg":"html"}),u={type:Ve.START_TAG,tagName:n,tagID:_o(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Zs(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function JI(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&h3.includes(n)||t.parser.tokenizer.state===xt.PLAINTEXT)return;Ao(t,Au(e));const r={type:Ve.END_TAG,tagName:n,tagID:_o(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Zs(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===xt.RCDATA||t.parser.tokenizer.state===xt.RAWTEXT||t.parser.tokenizer.state===xt.SCRIPT_DATA)&&(t.parser.tokenizer.state=xt.DATA)}function ZI(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Zs(e){const t=ar(e)||{line:void 0,column:void 0,offset:void 0},n=Au(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 eR(e){return"children"in e?Ii(se(U({},e),{children:[]})):Ii(e)}function dE(e){return function(t,n){return aE(t,se(U({},e),{file:n}))}}const Mi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],fE={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Mi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Mi],h2:[["className","sr-only"]],img:[...Mi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Mi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Mi],table:[...Mi],ul:[...Mi,["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"]},Kr={}.hasOwnProperty;function tR(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},fE),t):fE,stack:[]},o=hE(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function hE(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return nR(e,n);case"doctype":return rR(e,n);case"element":return iR(e,n);case"root":return oR(e,n);case"text":return sR(e,n)}}}function nR(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 ea(a,t),a}}function rR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ea(n,t),n}}function iR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=pE(e,t.children),o=aR(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&&Kr.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 ea(u,t),u}function oR(e,t){const r={type:"root",children:pE(e,t.children)};return ea(r,t),r}function sR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ea(r,t),r}function pE(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=hE(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function aR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Kr.call(r,n)?r[n]:void 0,u=r&&Kr.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(Kr.call(c,h)){const p=c[h];let E=mE(e,EE(a,h),h,p);E==null&&(E=mE(e,EE(u,h),h,p)),E!=null&&(d[h]=E)}if(o&&Kr.call(o,n)){const p=o[n];for(h in p)Kr.call(p,h)&&!Kr.call(d,h)&&(d[h]=p[h])}return d}function mE(e,t,n,r){return t?Array.isArray(r)?uR(e,t,n,r):gE(e,t,n,r):void 0}function uR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=gE(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function gE(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&lR(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 lR(e,t,n){const r=e.schema.protocols&&Kr.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 h=-1;for(;++h<r.length;){const p=r[h];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function ea(e,t){const n=J0(t);t.data&&(e.data=Ii(t.data)),n&&(e.position=n)}function EE(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 cR(e){return function(t){return tR(t,e)}}const yE=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return P.jsx("a",se(U(U({className:ae(e,`${ee}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},dR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=kt();return!e&&!t?null:P.jsx("div",{className:ae(n,`${ee}-disclaimer`),children:t?P.jsx(Zg,{rehypePlugins:[dE,cR],components:{ul:({children:r})=>P.jsx("ul",{className:ae(n,`${ee}-ul`),children:r}),ol:({children:r})=>P.jsx("ol",{className:ae(n,`${ee}-ol`),children:r}),li:({children:r})=>P.jsx("li",{className:ae(n,`${ee}-li`),children:r}),a:({href:r,title:o,children:a})=>P.jsx(yE,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>P.jsx("img",{className:ae(n,`${ee}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>P.jsx("p",{className:ae(n,`${ee}-disclaimer-text`),children:r}),span:({children:r})=>P.jsx("span",{className:ae(n,`${ee}-disclaimer-text-span`),children:r})},children:t}):P.jsx("p",{className:ae(n,`${ee}-disclaimer-text`),children:e})})},wf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:o}=ki(),{globalClassName:a,searchConfig:u}=kt(),c=Q.useRef(null),d=t||!o,h=E=>{var y;E.preventDefault();const b=(((y=c.current)==null?void 0:y.value)||"").trim();b&&(c.current.value="",r(b))},p=()=>{r("Can you connect me to a human?")};return P.jsxs("div",{className:ae(a,e,`cim-${n}-component`,`${ee}-search-bar-wrapper`),children:[P.jsxs("form",{className:ae(a,e,`cim-${n}-component`,`${ee}-search-bar`),name:`${ee}-search-form`,onSubmit:h,children:[P.jsx("input",{className:ae(a,e,`cim-${n}-component`,`${ee}-search-input`),type:"text",ref:c,placeholder:(u==null?void 0:u.placeholder)||"Ask us anything",name:`${ee}-user-input`,disabled:d}),P.jsx(Pv,{className:e,globalClassName:a,searchConfig:u,componentType:n,isLoading:d}),P.jsx($r,{className:ae(a,`${ee}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:d,onClick:p,icon:P.jsx(Cv,{})})]}),P.jsx(dR,{})]})};function fR(e){return tn({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 TE=Q.createContext({isOpen:!1}),Sf=Q.createContext(null),bE=Q.createContext(null),ta=()=>{var n,r;const e=Q.useContext(Sf),t=Q.useContext(bE);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},xE=({onClearChat:e,componentType:t})=>{const n=ta(),r=()=>{e(),n()};return P.jsxs("button",{className:ae(`${ee}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[P.jsx(fR,{}),"Clear chat"]})};function hR(e){return e==null?[]:Array.isArray(e)?e:[e]}var pR=(e,...t)=>e.concat(t),mR=(e,...t)=>e.filter(n=>!t.includes(n)),gR=e=>Array.from(new Set(e));function wE(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 ER(e,t,n={}){const{step:r=1,loop:o=!0}=n;return wE(e,t,{step:-r,loop:o})}var yR=e=>Array.isArray(e),SE=e=>e!=null&&typeof e=="object",TR=e=>SE(e)&&!yR(e),Ku=e=>typeof e=="string",Co=e=>typeof e=="function",bR=e=>e==null,xR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),wR=e=>Object.prototype.toString.call(e),_E=Function.prototype.toString,SR=_E.call(Object),_R=e=>{if(!SE(e)||wR(e)!="[object Object]"||CR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=xR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&_E.call(n)==SR},vR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,AR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,CR=e=>vR(e)||AR(e),kR=e=>e(),NR=()=>{},_f=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function OR(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:IR,max:RR}=Math,PR=e=>Number.isNaN(e),LR=e=>PR(e)?0:e,vE=(e,t,n)=>IR(RR(LR(e),t),n);function vf(e){if(!_R(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]=vf(o))}return n}function Af(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function DR(e,t){if(e==null)throw new Error(t())}function MR(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 FR=Object.defineProperty,BR=(e,t,n)=>t in e?FR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cf=(e,t,n)=>BR(e,typeof t!="symbol"?t+"":t,n),AE=()=>{},Xu=e=>typeof e=="object"&&e!==null,ko=e=>e?"":void 0,CE=e=>e?"true":void 0,UR=1,HR=9,zR=11,Mt=e=>Xu(e)&&e.nodeType===UR&&typeof e.nodeName=="string",Qu=e=>Xu(e)&&e.nodeType===HR,jR=e=>Xu(e)&&e===e.window,kE=e=>Mt(e)?e.localName||"":"#document";function $R(e){return["html","body","#document"].includes(kE(e))}var VR=e=>Xu(e)&&e.nodeType!==void 0,Fi=e=>VR(e)&&e.nodeType===zR&&"host"in e,qR=e=>Mt(e)&&e.localName==="input",YR=e=>Mt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function na(e){if(!e)return!1;const t=e.getRootNode();return Io(t)===e}var WR=/(textarea|select)/;function GR(e){if(e==null||!Mt(e))return!1;try{return qR(e)&&e.selectionStart!=null||WR.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function No(e,t){var r;if(!e||!t||!Mt(e)||!Mt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Fi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function cr(e){var t;return Qu(e)?e:jR(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function KR(e){return cr(e).documentElement}function Oo(e){var t,n,r;return Fi(e)?Oo(e.host):Qu(e)?(t=e.defaultView)!=null?t:window:Mt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Io(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 XR(e){if(kE(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fi(e)&&e.host||KR(e);return Fi(t)?t.host:t}function kf(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Qu(t)||Fi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Nf=new WeakMap;function Ro(e){return Nf.has(e)||Nf.set(e,Oo(e).getComputedStyle(e)),Nf.get(e)}var Of=new Set(["menu","listbox","dialog","grid","tree","region"]),QR=e=>Of.has(e),NE=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function OE(e,t){const n=new Set,r=kf(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=NE(c);for(const h of d){if(!h||n.has(h))continue;n.add(h);const p=r.getElementById(h);if(p){const E=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(E&&QR(E)&&!b&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function IE(e,t){const n=kf(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=NE(c);for(const h of d){if(!h||r.has(h))continue;r.add(h);const p=n.getElementById(h);if(p){const E=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";E&&Of.has(E)&&!b&&(t(p),o(p))}}}};o(e)}function JR(e){const t=new Set;return IE(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function ZR(e){const t=e.getAttribute("role");return!!(t&&Of.has(t))}function eP(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function tP(e){var t;return eP(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function nP(e){if(!e.id)return!1;const t=kf(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&ZR(e))}var If=()=>typeof document!="undefined";function rP(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Rf=e=>If()&&e.test(rP()),iP=e=>If()&&e.test(navigator.vendor),RE=()=>If()&&!!navigator.maxTouchPoints,oP=()=>Rf(/^iPhone/i),sP=()=>Rf(/^iPad/i)||Pf()&&navigator.maxTouchPoints>1,Ju=()=>oP()||sP(),aP=()=>Pf()||Ju(),Pf=()=>Rf(/^Mac/i),uP=()=>aP()&&iP(/apple/i);function lP(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 Gn(e){var n;const t=lP(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var PE=e=>e.button===0,cP=e=>e.button===2||Pf()&&e.ctrlKey&&e.button===0,dP=e=>"touches"in e&&e.touches.length>0,fP={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},LE={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function hP(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=fP[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in LE&&(o=LE[o]),o}function DE(e,t="client"){const n=dP(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Ft=(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)}},ME=e=>Mt(e)&&e.tagName==="IFRAME",pP=/^(audio|video|details)$/;function FE(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var mP=e=>!Number.isNaN(FE(e)),gP=e=>FE(e)<0;function EP(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 BE(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,h)=>u.set(d,h));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const h=EP(d,t);if(h){const p=Array.from(h.querySelectorAll(Zu)).filter(n),E=u.get(d);if(E!==void 0){const b=E+1;r.splice(b,0,...p),p.forEach((y,x)=>{u.set(y,b+x)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,b+x)})}o.push(...p)}}return r}var Zu="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",UE=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Zu));(n==!0||n=="if-empty"&&o.length===0)&&Mt(e)&&dr(e)&&o.unshift(e);const u=[];for(const c of o)if(dr(c)){if(ME(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...UE(d,{getShadowRoot:r}));continue}u.push(c)}return r?BE(u,r,dr):u};function dr(e){return!Mt(e)||e.closest("[inert]")?!1:e.matches(Zu)&&YR(e)}function Po(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Zu));n&&Bi(e)&&o.unshift(e);const a=[];for(const u of o)if(Bi(u)){if(ME(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Po(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=BE(a,r,Bi);return!u.length&&n?o:u}return!a.length&&n?o:a}function Bi(e){return Mt(e)&&e.tabIndex>0?!0:dr(e)&&!gP(e)}function yP(e,t={}){const n=Po(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function TP(e,t={}){const{current:n,getShadowRoot:r}=t,o=Po(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Io(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function ra(e){return e.tabIndex<0&&(pP.test(e.localName)||GR(e))&&!mP(e)?0:e.tabIndex}function HE(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=Po(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var bP=class Vx{constructor(){Cf(this,"id",null),Cf(this,"fn_cleanup"),Cf(this,"cleanup",()=>{this.cancel()})}static create(){return new Vx}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 Nt(e){const t=bP.create();return t.request(e),t.cleanup}function zE(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 Lf(e){const t=XR(e);return $R(t)?cr(t).body:Mt(t)&&SP(t)?t:Lf(t)}var xP=/auto|scroll|overlay|hidden|clip/,wP=new Set(["inline","contents"]);function SP(e){const t=Oo(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return xP.test(n+o+r)&&!wP.has(a)}var Lo="default",Df="",el=new WeakMap;function _P(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Ju()?(Lo==="default"&&(Df=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Lo="disabled"):t&&(el.set(t,t.style.userSelect),t.style.userSelect="none"),()=>vP({target:t,doc:r})}function vP(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Ju()){if(Lo!=="disabled")return;Lo="restoring",setTimeout(()=>{zE(()=>{Lo==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Df||""),Df="",Lo="default")})},300)}else if(t&&el.has(t)){const a=el.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),el.delete(t)}}function AP(e={}){const u=e,{defer:t,target:n}=u,r=sn(u,["defer","target"]),o=t?Nt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(_P(se(U({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function CP(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=DE(c),h=Math.sqrt(Za(d.x,2)+Za(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(h<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=DE(c);r({point:d,event:c})},u=[Ft(e,"pointermove",o,!1),Ft(e,"pointerup",a,!1),Ft(e,"pointercancel",a,!1),Ft(e,"contextmenu",a,!1),AP({doc:e})];return()=>{u.forEach(c=>c())}}function kP(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(h){if(h.key!=="Tab")return;let p=null;const[E,b]=yP(e,{includeContainer:!0,getShadowRoot:a}),y=TP(c,{current:n,getShadowRoot:a}),x=!E&&!b;h.shiftKey&&na(y)?(o==null||o(),p=b):h.shiftKey&&(na(E)||x)?p=n:!h.shiftKey&&na(n)?(o==null||o(),p=E):!h.shiftKey&&(na(b)||x)&&(p=y),p&&(h.preventDefault(),typeof r=="function"?r(p):p.focus())}return Ft(u,"keydown",d,!0)}function NP(e,t){const c=t,{defer:n,triggerElement:r}=c,o=sn(c,["defer","triggerElement"]),a=n?Nt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(kP(d,U({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function OP(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function tl(e,t){if(!e)return AE;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 IP(e,t,n){if(!e)return AE;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 RP(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(h=>{r.aborted||(clearTimeout(d),u(h))}).catch(h=>{r.aborted||(clearTimeout(d),c(h))})}),()=>t.abort()]}function PP(e,t){const{timeout:n,rootNode:r}=t,o=Oo(r),a=cr(r),u=new o.AbortController;return RP(new Promise(c=>{const d=e();if(d){c(d);return}const h=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(h.disconnect(),c(p))});h.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var LP=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),DP=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,jE=e=>{const t={};let n;for(;n=DP.exec(e);)t[n[1]]=n[2];return t},MP=(e,t)=>{if(Ku(e)){if(Ku(t))return`${e};${t}`;e=jE(e)}else Ku(t)&&(t=jE(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Ot(...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]=_f(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=LP(t[o],n[o]);continue}if(o==="style"){t[o]=MP(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 KF(e){return e}var Do=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Do||{}),Mf="__init__";function FP(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>cr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Io(t()),a=u=>t().getElementById(u);return se(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:na,getById:a})}function BP(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Mo=()=>e=>Array.from(new Set(e)),$E=typeof globalThis.document!="undefined"?Q.useLayoutEffect:Q.useEffect;function nl(e){var E,b;const t=(E=e().value)!=null?E:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=Q.useState(t),[o,a]=Q.useState(r),u=e().value!==void 0,c=Q.useRef(o);c.current=u?e().value:o;const d=Q.useRef(c.current);$E(()=>{d.current=c.current},[o,e().value]);const h=y=>{var _,A;const x=d.current,S=Co(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:x}),u||a(S),n(S,x)||(A=(_=e()).onChange)==null||A.call(_,S,x)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Ns.flushSync:kR)(()=>h(y))},invoke(y,x){var S,_;(_=(S=e()).onChange)==null||_.call(S,y,x)},hash(y){var x,S,_;return(_=(S=(x=e()).hash)==null?void 0:S.call(x,y))!=null?_:String(y)}}}nl.cleanup=e=>{Q.useEffect(()=>e,[])},nl.ref=e=>{const t=Q.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function UP(e){const t=Q.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var HP=(e,t)=>{const n=Q.useRef(!1),r=Q.useRef(!1);Q.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),Q.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function rl(e,t={}){var te,X,ne,ie,Te,Ie;const n=Q.useMemo(()=>{const{id:fe,ids:W,getRootNode:oe}=t;return FP({id:fe,ids:W,getRootNode:oe})},[t]),r=(...fe)=>{e.debug&&console.log(...fe)},o=(X=(te=e.props)==null?void 0:te.call(e,{props:vf(t),scope:n}))!=null?X:t,a=zP(o),u=(ne=e.context)==null?void 0:ne.call(e,{prop:a,bindable:nl,scope:n,flush:qE,getContext(){return d},getComputed(){return Y},getRefs(){return S},getEvent(){return y()}}),c=VE(u),d={get(fe){var W;return(W=c.current)==null?void 0:W[fe].ref.current},set(fe,W){var oe;(oe=c.current)==null||oe[fe].set(W)},initial(fe){var W;return(W=c.current)==null?void 0:W[fe].initial},hash(fe){var oe,v;const W=(oe=c.current)==null?void 0:oe[fe].get();return(v=c.current)==null?void 0:v[fe].hash(W)}},h=Q.useRef(new Map),p=Q.useRef(null),E=Q.useRef(null),b=Q.useRef({type:""}),y=()=>se(U({},b.current),{current(){return b.current},previous(){return E.current}}),x=()=>se(U({},M),{matches(...fe){return fe.includes(M.ref.current)},hasTag(fe){var W,oe;return!!((oe=(W=e.states[M.ref.current])==null?void 0:W.tags)!=null&&oe.includes(fe))}}),S=UP((Te=(ie=e.refs)==null?void 0:ie.call(e,{prop:a,context:d}))!=null?Te:{}),_=()=>({state:x(),context:d,event:y(),prop:a,send:F,action:A,guard:O,track:HP,refs:S,computed:Y,flush:qE,scope:n,choose:z}),A=fe=>{const W=Co(fe)?fe(_()):fe;if(!W)return;const oe=W.map(v=>{var Z,k;const D=(k=(Z=e.implementations)==null?void 0:Z.actions)==null?void 0:k[v];return D||Af(`[zag-js] No implementation found for action "${JSON.stringify(v)}"`),D});for(const v of oe)v==null||v(_())},O=fe=>{var W,oe;return Co(fe)?fe(_()):(oe=(W=e.implementations)==null?void 0:W.guards)==null?void 0:oe[fe](_())},I=fe=>{const W=Co(fe)?fe(_()):fe;if(!W)return;const oe=W.map(D=>{var k,xe;const Z=(xe=(k=e.implementations)==null?void 0:k.effects)==null?void 0:xe[D];return Z||Af(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),Z}),v=[];for(const D of oe){const Z=D==null?void 0:D(_());Z&&v.push(Z)}return()=>v.forEach(D=>D==null?void 0:D())},z=fe=>hR(fe).find(W=>{let oe=!W.guard;return Ku(W.guard)?oe=!!O(W.guard):Co(W.guard)&&(oe=W.guard(_())),oe}),Y=fe=>{DR(e.computed,()=>"[zag-js] No computed object found on machine");const W=e.computed[fe];return W({context:d,event:y(),prop:a,refs:S,scope:n,computed:Y})},M=nl(()=>({defaultValue:e.initialState({prop:a}),onChange(fe,W){var v,D,Z,k;if(W){const xe=h.current.get(W);xe==null||xe(),h.current.delete(W)}W&&A((v=e.states[W])==null?void 0:v.exit),A((D=p.current)==null?void 0:D.actions);const oe=I((Z=e.states[fe])==null?void 0:Z.effects);if(oe&&h.current.set(fe,oe),W===Mf){A(e.entry);const xe=I(e.effects);xe&&h.current.set(Mf,xe)}A((k=e.states[fe])==null?void 0:k.entry)}})),G=Q.useRef(void 0),pe=Q.useRef(Do.NotStarted);$E(()=>{queueMicrotask(()=>{var D;const oe=pe.current===Do.Started;pe.current=Do.Started,r(oe?"rehydrating...":"initializing...");const v=(D=G.current)!=null?D:M.initial;M.invoke(v,oe?M.get():Mf)});const fe=h.current,W=M.ref.current;return()=>{r("unmounting..."),G.current=W,pe.current=Do.Stopped,fe.forEach(oe=>oe==null?void 0:oe()),h.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const be=()=>"ref"in M?M.ref.current:M.get(),F=fe=>{queueMicrotask(()=>{var k,xe,Pe,Ne,He;if(pe.current!==Do.Started)return;E.current=b.current,b.current=fe;let W=be();const oe=(Pe=(k=e.states[W].on)==null?void 0:k[fe.type])!=null?Pe:(xe=e.on)==null?void 0:xe[fe.type],v=z(oe);if(!v)return;p.current=v;const D=(Ne=v.target)!=null?Ne:W;r("transition",fe.type,v.target||W,`(${v.actions})`);const Z=D!==W;Z?Ns.flushSync(()=>M.set(D)):v.reenter&&!Z?M.invoke(W,W):A((He=v.actions)!=null?He:[])})};return(Ie=e.watch)==null||Ie.call(e,_()),{state:x(),send:F,context:d,prop:a,scope:n,refs:S,computed:Y,event:y(),getStatus:()=>pe.current}}function VE(e){const t=Q.useRef(e);return t.current=e,t}function zP(e){const t=VE(e);return function(r){return t.current[r]}}function qE(e){queueMicrotask(()=>{Ns.flushSync(()=>e())})}var Ff=BP(e=>e);function il(...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 jP(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 Bf=e=>{const t=Q.memo(Q.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=sn(h,["asChild","children"]);if(!o)return Q.createElement(e,se(U({},u),{ref:r}),a);if(!Q.isValidElement(a))return null;const c=Q.Children.only(a),d=jP(c);return Q.cloneElement(c,se(U({},Ot(u,c.props)),{ref:r?il(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Kt=(()=>{const e=new Map;return new Proxy(Bf,{apply(t,n,r){return Bf(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Bf(r)),e.get(r)}})})();function $P(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ui(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=Q.createContext(u);c.displayName=t;function d(){var p;const h=Q.useContext(c);if(!h&&n){const E=new Error(a!=null?a:$P(r,o));throw E.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,E,d),E}return h}return[c.Provider,d,c]}const[VP,Uf]=Ui({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[YE,ia]=Ui({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),WE=Q.forwardRef((e,t)=>{const n=Uf(),r=ia(),o=Ot(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:P.jsx(Kt.div,se(U({},o),{ref:il(r.ref,t)}))});WE.displayName="PopoverContent";const GE=Q.forwardRef((e,t)=>{const n=Uf(),r=ia(),o=Ot(n.getPositionerProps(),e);return r.unmounted?null:P.jsx(Kt.div,se(U({},o),{ref:t}))});GE.displayName="PopoverPositioner";const oa=()=>(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]},[{},U({},e)]),KE=e=>oa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function qP(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 YP={props({props:e}){return se(U({},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",Ro(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"});Nt(()=>{var c,d;const u=ol(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})=>{Nt(()=>{e.set("prevAnimationName",ol(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,E,b;((b=(E=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:E[0])!=null?b:d.target)===o&&e.set("prevAnimationName",ol(t.get("styles")))},u=d=>{const h=ol(t.get("styles"));Gn(d)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=tl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),zE(()=>c())}}}}};function ol(e){return(e==null?void 0:e.animationName)||"none"}Mo()(["onExitComplete","present","immediate"]);function WP(e,t={}){const{sync:n=!1}=t,r=GP(e);return Q.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 GP(e){const t=Q.useRef(e);return t.current=e,t}const Hf=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,a=sn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=Q.useRef(!1),c=se(U({},a),{present:r,onExitComplete:WP(e.onExitComplete)}),d=rl(YP,c),h=qP(d);h.present&&(u.current=!0);const p=!h.present&&!u.current&&t||n&&!h.present&&u.current,E=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:E,present:h.present,unmounted:p}};var Hi=(e,t=[])=>({parts:(...n)=>{if(KP(t))return Hi(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Hi(e,[...t,...n]),omit:(...n)=>Hi(e,t.filter(r=>!n.includes(r))),rename:n=>Hi(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Fo(e)}"][data-part="${Fo(r)}"]`,`& [data-scope="${Fo(e)}"][data-part="${Fo(r)}"]`].join(", "),attrs:{"data-scope":Fo(e),"data-part":Fo(r)}}}),{})}),Fo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),KP=e=>e.length===0;const XP=["top","right","bottom","left"],Xr=Math.min,Sn=Math.max,sl=Math.round,al=Math.floor,fr=e=>({x:e,y:e}),QP={left:"right",right:"left",bottom:"top",top:"bottom"},JP={start:"end",end:"start"};function zf(e,t,n){return Sn(e,Xr(t,n))}function Ar(e,t){return typeof e=="function"?e(t):e}function Cr(e){return e.split("-")[0]}function Bo(e){return e.split("-")[1]}function jf(e){return e==="x"?"y":"x"}function $f(e){return e==="y"?"height":"width"}const ZP=new Set(["top","bottom"]);function hr(e){return ZP.has(Cr(e))?"y":"x"}function Vf(e){return jf(hr(e))}function eL(e,t,n){n===void 0&&(n=!1);const r=Bo(e),o=Vf(e),a=$f(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ul(u)),[u,ul(u)]}function tL(e){const t=ul(e);return[qf(e),t,qf(t)]}function qf(e){return e.replace(/start|end/g,t=>JP[t])}const XE=["left","right"],QE=["right","left"],nL=["top","bottom"],rL=["bottom","top"];function iL(e,t,n){switch(e){case"top":case"bottom":return n?t?QE:XE:t?XE:QE;case"left":case"right":return t?nL:rL;default:return[]}}function oL(e,t,n,r){const o=Bo(e);let a=iL(Cr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(qf)))),a}function ul(e){return e.replace(/left|right|bottom|top/g,t=>QP[t])}function sL(e){return U({top:0,right:0,bottom:0,left:0},e)}function JE(e){return typeof e!="number"?sL(e):{top:e,right:e,bottom:e,left:e}}function ll(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 ZE(e,t,n){let{reference:r,floating:o}=e;const a=hr(t),u=Vf(t),c=$f(u),d=Cr(t),h=a==="y",p=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,b=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:E};break;case"left":y={x:r.x-o.width,y:E};break;default:y={x:r.x,y:r.y}}switch(Bo(t)){case"start":y[u]-=b*(n&&h?-1:1);break;case"end":y[u]+=b*(n&&h?-1:1);break}return y}const aL=(e,t,n)=>$e(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 h=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:E}=ZE(h,r,d),b=r,y={},x=0;for(let S=0;S<c.length;S++){const{name:_,fn:A}=c[S],{x:O,y:I,data:z,reset:Y}=yield A({x:p,y:E,initialPlacement:r,placement:b,strategy:o,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});p=O!=null?O:p,E=I!=null?I:E,y=se(U({},y),{[_]:U(U({},y[_]),z)}),Y&&x<=50&&(x++,typeof Y=="object"&&(Y.placement&&(b=Y.placement),Y.rects&&(h=Y.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):Y.rects),{x:p,y:E}=ZE(h,b,d)),S=-1)}return{x:p,y:E,placement:b,strategy:o,middlewareData:y}});function sa(e,t){return $e(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:E="floating",altBoundary:b=!1,padding:y=0}=Ar(t,e),x=JE(y),_=c[b?E==="floating"?"reference":"floating":E],A=ll(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(_))==null||n?_:_.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),O=E==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,I=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),z=(yield a.isElement==null?void 0:a.isElement(I))?(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1}:{x:1,y:1},Y=ll(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:O,offsetParent:I,strategy:d}):O);return{top:(A.top-Y.top+x.top)/z.y,bottom:(Y.bottom-A.bottom+x.bottom)/z.y,left:(A.left-Y.left+x.left)/z.x,right:(Y.right-A.right+x.right)/z.x}})}const uL=e=>({name:"arrow",options:e,fn(n){return $e(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:p,padding:E=0}=Ar(e,n)||{};if(p==null)return{};const b=JE(E),y={x:r,y:o},x=Vf(a),S=$f(x),_=yield c.getDimensions(p),A=x==="y",O=A?"top":"left",I=A?"bottom":"right",z=A?"clientHeight":"clientWidth",Y=u.reference[S]+u.reference[x]-y[x]-u.floating[S],M=y[x]-u.reference[x],G=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let pe=G?G[z]:0;(!pe||!(yield c.isElement==null?void 0:c.isElement(G)))&&(pe=d.floating[z]||u.floating[S]);const be=Y/2-M/2,F=pe/2-_[S]/2-1,te=Xr(b[O],F),X=Xr(b[I],F),ne=te,ie=pe-_[S]-X,Te=pe/2-_[S]/2+be,Ie=zf(ne,Te,ie),fe=!h.arrow&&Bo(a)!=null&&Te!==Ie&&u.reference[S]/2-(Te<ne?te:X)-_[S]/2<0,W=fe?Te<ne?Te-ne:Te-ie:0;return{[x]:y[x]+W,data:U({[x]:Ie,centerOffset:Te-Ie-W},fe&&{alignmentOffset:W}),reset:fe}})}}),lL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return $e(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:p}=n,Te=Ar(e,n),{mainAxis:E=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:_=!0}=Te,A=sn(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const O=Cr(a),I=hr(d),z=Cr(d)===d,Y=yield h.isRTL==null?void 0:h.isRTL(p.floating),M=y||(z||!_?[ul(d)]:tL(d)),G=S!=="none";!y&&G&&M.push(...oL(d,_,S,Y));const pe=[d,...M],be=yield sa(n,A),F=[];let te=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&F.push(be[O]),b){const Ie=eL(a,c,Y);F.push(be[Ie[0]],be[Ie[1]])}if(te=[...te,{placement:a,overflows:F}],!F.every(Ie=>Ie<=0)){var X,ne;const Ie=(((X=u.flip)==null?void 0:X.index)||0)+1,fe=pe[Ie];if(fe&&(!(b==="alignment"?I!==hr(fe):!1)||te.every(v=>hr(v.placement)===I?v.overflows[0]>0:!0)))return{data:{index:Ie,overflows:te},reset:{placement:fe}};let W=(ne=te.filter(oe=>oe.overflows[0]<=0).sort((oe,v)=>oe.overflows[1]-v.overflows[1])[0])==null?void 0:ne.placement;if(!W)switch(x){case"bestFit":{var ie;const oe=(ie=te.filter(v=>{if(G){const D=hr(v.placement);return D===I||D==="y"}return!0}).map(v=>[v.placement,v.overflows.filter(D=>D>0).reduce((D,Z)=>D+Z,0)]).sort((v,D)=>v[1]-D[1])[0])==null?void 0:ie[0];oe&&(W=oe);break}case"initialPlacement":W=d;break}if(a!==W)return{reset:{placement:W}}}return{}})}}};function ey(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ty(e){return XP.some(t=>e[t]>=0)}const cL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return $e(this,null,function*(){const{rects:r}=n,u=Ar(e,n),{strategy:o="referenceHidden"}=u,a=sn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield sa(n,se(U({},a),{elementContext:"reference"})),d=ey(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:ty(d)}}}case"escaped":{const c=yield sa(n,se(U({},a),{altBoundary:!0})),d=ey(c,r.floating);return{data:{escapedOffsets:d,escaped:ty(d)}}}default:return{}}})}}},ny=new Set(["left","top"]);function dL(e,t){return $e(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Cr(n),c=Bo(n),d=hr(n)==="y",h=ny.has(u)?-1:1,p=a&&d?-1:1,E=Ar(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:x}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof x=="number"&&(y=c==="end"?x*-1:x),d?{x:y*p,y:b*h}:{x:b*h,y:y*p}})}const fL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return $e(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield dL(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+h.x,y:u+h.y,data:se(U({},h),{placement:c})}})}}},hL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return $e(this,null,function*(){const{x:r,y:o,placement:a}=n,A=Ar(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:O=>{let{x:I,y:z}=O;return{x:I,y:z}}}}=A,h=sn(A,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},E=yield sa(n,h),b=hr(Cr(a)),y=jf(b);let x=p[y],S=p[b];if(u){const O=y==="y"?"top":"left",I=y==="y"?"bottom":"right",z=x+E[O],Y=x-E[I];x=zf(z,x,Y)}if(c){const O=b==="y"?"top":"left",I=b==="y"?"bottom":"right",z=S+E[O],Y=S-E[I];S=zf(z,S,Y)}const _=d.fn(se(U({},n),{[y]:x,[b]:S}));return se(U({},_),{data:{x:_.x-r,y:_.y-o,enabled:{[y]:u,[b]:c}}})})}}},pL=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:h=!0}=Ar(e,t),p={x:n,y:r},E=hr(o),b=jf(E);let y=p[b],x=p[E];const S=Ar(c,t),_=typeof S=="number"?{mainAxis:S,crossAxis:0}:U({mainAxis:0,crossAxis:0},S);if(d){const I=b==="y"?"height":"width",z=a.reference[b]-a.floating[I]+_.mainAxis,Y=a.reference[b]+a.reference[I]-_.mainAxis;y<z?y=z:y>Y&&(y=Y)}if(h){var A,O;const I=b==="y"?"width":"height",z=ny.has(Cr(o)),Y=a.reference[E]-a.floating[I]+(z&&((A=u.offset)==null?void 0:A[E])||0)+(z?0:_.crossAxis),M=a.reference[E]+a.reference[I]+(z?0:((O=u.offset)==null?void 0:O[E])||0)-(z?_.crossAxis:0);x<Y?x=Y:x>M&&(x=M)}return{[b]:y,[E]:x}}}},mL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return $e(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,te=Ar(e,n),{apply:h=()=>{}}=te,p=sn(te,["apply"]),E=yield sa(n,p),b=Cr(a),y=Bo(a),x=hr(a)==="y",{width:S,height:_}=u.floating;let A,O;b==="top"||b==="bottom"?(A=b,O=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(O=b,A=y==="end"?"top":"bottom");const I=_-E.top-E.bottom,z=S-E.left-E.right,Y=Xr(_-E[A],I),M=Xr(S-E[O],z),G=!n.middlewareData.shift;let pe=Y,be=M;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(be=z),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(pe=I),G&&!y){const X=Sn(E.left,0),ne=Sn(E.right,0),ie=Sn(E.top,0),Te=Sn(E.bottom,0);x?be=S-2*(X!==0||ne!==0?X+ne:Sn(E.left,E.right)):pe=_-2*(ie!==0||Te!==0?ie+Te:Sn(E.top,E.bottom))}yield h(se(U({},n),{availableWidth:be,availableHeight:pe}));const F=yield c.getDimensions(d.floating);return S!==F.width||_!==F.height?{reset:{rects:!0}}:{}})}}};function cl(){return typeof window!="undefined"}function Uo(e){return ry(e)?(e.nodeName||"").toLowerCase():"#document"}function _n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pr(e){var t;return(t=(ry(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ry(e){return cl()?e instanceof Node||e instanceof _n(e).Node:!1}function Kn(e){return cl()?e instanceof Element||e instanceof _n(e).Element:!1}function mr(e){return cl()?e instanceof HTMLElement||e instanceof _n(e).HTMLElement:!1}function iy(e){return!cl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof _n(e).ShadowRoot}const gL=new Set(["inline","contents"]);function aa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Xn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!gL.has(o)}const EL=new Set(["table","td","th"]);function yL(e){return EL.has(Uo(e))}const TL=[":popover-open",":modal"];function dl(e){return TL.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const bL=["transform","translate","scale","rotate","perspective"],xL=["transform","translate","scale","rotate","perspective","filter"],wL=["paint","layout","strict","content"];function Yf(e){const t=Wf(),n=Kn(e)?Xn(e):e;return bL.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)||xL.some(r=>(n.willChange||"").includes(r))||wL.some(r=>(n.contain||"").includes(r))}function SL(e){let t=Qr(e);for(;mr(t)&&!Ho(t);){if(Yf(t))return t;if(dl(t))return null;t=Qr(t)}return null}function Wf(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _L=new Set(["html","body","#document"]);function Ho(e){return _L.has(Uo(e))}function Xn(e){return _n(e).getComputedStyle(e)}function fl(e){return Kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qr(e){if(Uo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||iy(e)&&e.host||pr(e);return iy(t)?t.host:t}function oy(e){const t=Qr(e);return Ho(t)?e.ownerDocument?e.ownerDocument.body:e.body:mr(t)&&aa(t)?t:oy(t)}function ua(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=oy(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=_n(o);if(a){const c=Gf(u);return t.concat(u,u.visualViewport||[],aa(o)?o:[],c&&n?ua(c):[])}return t.concat(o,ua(o,[],n))}function Gf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sy(e){const t=Xn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=mr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=sl(n)!==a||sl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Kf(e){return Kn(e)?e:e.contextElement}function zo(e){const t=Kf(e);if(!mr(t))return fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=sy(t);let u=(a?sl(n.width):n.width)/r,c=(a?sl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const vL=fr(0);function ay(e){const t=_n(e);return!Wf()||!t.visualViewport?vL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_n(e)?!1:t}function zi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Kf(e);let u=fr(1);t&&(r?Kn(r)&&(u=zo(r)):u=zo(e));const c=AL(a,n,r)?ay(a):fr(0);let d=(o.left+c.x)/u.x,h=(o.top+c.y)/u.y,p=o.width/u.x,E=o.height/u.y;if(a){const b=_n(a),y=r&&Kn(r)?_n(r):r;let x=b,S=Gf(x);for(;S&&r&&y!==x;){const _=zo(S),A=S.getBoundingClientRect(),O=Xn(S),I=A.left+(S.clientLeft+parseFloat(O.paddingLeft))*_.x,z=A.top+(S.clientTop+parseFloat(O.paddingTop))*_.y;d*=_.x,h*=_.y,p*=_.x,E*=_.y,d+=I,h+=z,x=_n(S),S=Gf(x)}}return ll({width:p,height:E,x:d,y:h})}function hl(e,t){const n=fl(e).scrollLeft;return t?t.left+n:zi(pr(e)).left+n}function uy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-hl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function CL(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=pr(r),c=t?dl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=fr(1);const p=fr(0),E=mr(r);if((E||!E&&!a)&&((Uo(r)!=="body"||aa(u))&&(d=fl(r)),mr(r))){const y=zi(r);h=zo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!E&&!a?uy(u,d):fr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+b.x,y:n.y*h.y-d.scrollTop*h.y+p.y+b.y}}function kL(e){return Array.from(e.getClientRects())}function NL(e){const t=pr(e),n=fl(e),r=e.ownerDocument.body,o=Sn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Sn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+hl(e);const c=-n.scrollTop;return Xn(r).direction==="rtl"&&(u+=Sn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const ly=25;function OL(e,t){const n=_n(e),r=pr(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=Wf();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const h=hl(r);if(h<=0){const p=r.ownerDocument,E=p.body,b=getComputedStyle(E),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,x=Math.abs(r.clientWidth-E.clientWidth-y);x<=ly&&(a-=x)}else h<=ly&&(a+=h);return{width:a,height:u,x:c,y:d}}const IL=new Set(["absolute","fixed"]);function RL(e,t){const n=zi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=mr(e)?zo(e):fr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,h=r*a.y;return{width:u,height:c,x:d,y:h}}function cy(e,t,n){let r;if(t==="viewport")r=OL(e,n);else if(t==="document")r=NL(pr(e));else if(Kn(t))r=RL(t,n);else{const o=ay(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ll(r)}function dy(e,t){const n=Qr(e);return n===t||!Kn(n)||Ho(n)?!1:Xn(n).position==="fixed"||dy(n,t)}function PL(e,t){const n=t.get(e);if(n)return n;let r=ua(e,[],!1).filter(c=>Kn(c)&&Uo(c)!=="body"),o=null;const a=Xn(e).position==="fixed";let u=a?Qr(e):e;for(;Kn(u)&&!Ho(u);){const c=Xn(u),d=Yf(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&IL.has(o.position)||aa(u)&&!d&&dy(e,u))?r=r.filter(p=>p!==u):o=c,u=Qr(u)}return t.set(e,r),r}function LL(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?dl(t)?[]:PL(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,p)=>{const E=cy(t,p,o);return h.top=Sn(E.top,h.top),h.right=Xr(E.right,h.right),h.bottom=Xr(E.bottom,h.bottom),h.left=Sn(E.left,h.left),h},cy(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function DL(e){const{width:t,height:n}=sy(e);return{width:t,height:n}}function ML(e,t,n){const r=mr(t),o=pr(t),a=n==="fixed",u=zi(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=fr(0);function h(){d.x=hl(o)}if(r||!r&&!a)if((Uo(t)!=="body"||aa(o))&&(c=fl(t)),r){const y=zi(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&h();a&&!r&&o&&h();const p=o&&!r&&!a?uy(o,c):fr(0),E=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:E,y:b,width:u.width,height:u.height}}function Xf(e){return Xn(e).position==="static"}function fy(e,t){if(!mr(e)||Xn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return pr(e)===n&&(n=n.ownerDocument.body),n}function hy(e,t){const n=_n(e);if(dl(e))return n;if(!mr(e)){let o=Qr(e);for(;o&&!Ho(o);){if(Kn(o)&&!Xf(o))return o;o=Qr(o)}return n}let r=fy(e,t);for(;r&&yL(r)&&Xf(r);)r=fy(r,t);return r&&Ho(r)&&Xf(r)&&!Yf(r)?n:r||SL(e)||n}const FL=function(e){return $e(this,null,function*(){const t=this.getOffsetParent||hy,n=this.getDimensions,r=yield n(e.floating);return{reference:ML(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function BL(e){return Xn(e).direction==="rtl"}const UL={convertOffsetParentRelativeRectToViewportRelativeRect:CL,getDocumentElement:pr,getClippingRect:LL,getOffsetParent:hy,getElementRects:FL,getClientRects:kL,getDimensions:DL,getScale:zo,isElement:Kn,isRTL:BL};function py(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function HL(e,t){let n=null,r;const o=pr(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 h=e.getBoundingClientRect(),{left:p,top:E,width:b,height:y}=h;if(c||t(),!b||!y)return;const x=al(E),S=al(o.clientWidth-(p+b)),_=al(o.clientHeight-(E+y)),A=al(p),I={rootMargin:-x+"px "+-S+"px "+-_+"px "+-A+"px",threshold:Sn(0,Xr(1,d))||1};let z=!0;function Y(M){const G=M[0].intersectionRatio;if(G!==d){if(!z)return u();G?u(!1,G):r=setTimeout(()=>{u(!1,1e-7)},1e3)}G===1&&!py(h,e.getBoundingClientRect())&&u(),z=!1}try{n=new IntersectionObserver(Y,se(U({},I),{root:o.ownerDocument}))}catch(M){n=new IntersectionObserver(Y,I)}n.observe(e)}return u(!0),a}function zL(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,h=Kf(e),p=o||a?[...h?ua(h):[],...ua(t)]:[];p.forEach(A=>{o&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const E=h&&c?HL(h,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(A=>{let[O]=A;O&&O.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),h&&!d&&y.observe(h),y.observe(t));let x,S=d?zi(e):null;d&&_();function _(){const A=zi(e);S&&!py(S,A)&&n(),S=A,x=requestAnimationFrame(_)}return n(),()=>{var A;p.forEach(O=>{o&&O.removeEventListener("scroll",n),a&&O.removeEventListener("resize",n)}),E==null||E(),(A=y)==null||A.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const jL=fL,$L=hL,VL=lL,qL=mL,YL=cL,WL=uL,GL=pL,KL=(e,t,n)=>{const r=new Map,o=U({platform:UL},n),a=se(U({},o.platform),{_c:r});return aL(e,t,se(U({},o),{platform:a}))};function my(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 se(U({},o),{toJSON:()=>o})}function XL(e){if(!e)return my();const{x:t,y:n,width:r,height:o}=e;return my(t,n,r,o)}function QL(e,t){return{contextElement:Mt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?XL(r):n.getBoundingClientRect()}}}var la=e=>({variable:e,reference:`var(${e})`}),kr={arrowSize:la("--arrow-size"),arrowSizeHalf:la("--arrow-size-half"),arrowBg:la("--arrow-background"),transformOrigin:la("--transform-origin"),arrowOffset:la("--arrow-offset")},JL=e=>e==="top"||e==="bottom"?"y":"x";function ZL(e,t){return{name:"transformOrigin",fn(n){var be,F,te,X,ne;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=JL(d),p=((be=o.arrow)==null?void 0:be.x)||0,E=((F=o.arrow)==null?void 0:F.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+b/2,S=E+y/2,_=Math.abs(((te=o.shift)==null?void 0:te.y)||0),A=u.reference.height/2,O=y/2,I=(ne=(X=e.offset)==null?void 0:X.mainAxis)!=null?ne:e.gutter,z=typeof I=="number"?I+O:I!=null?I:O,Y=_>z,M={top:`${x}px calc(100% + ${z}px)`,bottom:`${x}px ${-z}px`,left:`calc(100% + ${z}px) ${S}px`,right:`${-z}px ${S}px`}[d],G=`${x}px ${u.reference.y+A-c}px`,pe=!!e.overlap&&h==="y"&&Y;return r.floating.style.setProperty(kr.transformOrigin.variable,pe?G:M),{data:{transformOrigin:pe?G:M}}}}}var e6={name:"rects",fn({rects:e}){return{data:e}}},t6=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% + ${kr.arrowOffset.reference})`}),{}}}};function n6(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var r6={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function gy(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Qf(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function i6(e,t,n){const r=e||t.createElement("div");return WL({element:r,padding:n.arrowPadding})}function o6(e,t){var n;if(!bR((n=t.offset)!=null?n:t.gutter))return jL(({placement:r})=>{var p,E,b,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(E=(p=t.offset)==null?void 0:p.mainAxis)!=null?E:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=n6(r),d=c?void 0:t.shift,h=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return vf({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function s6(e){if(!e.flip)return;const t=Qf(e.boundary);return VL(se(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function a6(e){if(!e.slide&&!e.overlap)return;const t=Qf(e.boundary);return $L(se(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:GL()}))}function u6(e){return qL({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 l6(e){var t;if(e.hideWhenDetached)return YL({strategy:"referenceHidden",boundary:(t=Qf(e.boundary))!=null?t:"clippingAncestors"})}function c6(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function d6(e,t,n={}){const r=QL(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},r6,n),a=t.querySelector("[data-part=arrow]"),u=[o6(a,o),s6(o),a6(o),i6(a,t.ownerDocument,o),t6(a),ZL({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),u6(o),l6(o),e6],{placement:c,strategy:d,onComplete:h,onPositioned:p}=o,E=()=>$e(null,null,function*(){var z;if(!r||!t)return;const S=yield KL(r,t,{placement:c,middleware:u,strategy:d});h==null||h(S),p==null||p({placed:!0});const _=Oo(t),A=gy(_,S.x),O=gy(_,S.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${O}px`),o.hideWhenDetached&&(((z=S.middlewareData.hide)==null?void 0:z.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const I=t.firstElementChild;if(I){const Y=Ro(I);t.style.setProperty("--z-index",Y.zIndex)}}),b=()=>$e(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),p==null||p({placed:!0})):yield E()}),y=c6(o.listeners),x=o.listeners?zL(r,t,b,y):NR;return b(),()=>{x==null||x(),p==null||p({placed:!1})}}function Ey(e,t,n={}){const c=n,{defer:r}=c,o=sn(c,["defer"]),a=r?Nt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(d6(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var f6={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function h6(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:kr.arrowSize.reference,height:kr.arrowSize.reference,[kr.arrowSizeHalf.variable]:`calc(${kr.arrowSize.reference} / 2)`,[kr.arrowOffset.variable]:`calc(${kr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?f6[t.split("-")[0]]:void 0,background:kr.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 jo=new WeakMap,pl=new WeakMap,ml={},Jf=0,yy=e=>e&&(e.host||yy(e.parentNode)),p6=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=yy(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),m6=new Set(["script","output","status","next-route-announcer"]),g6=e=>m6.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),E6=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=p6(n,Array.isArray(e)?e:[e]);ml[r]||(ml[r]=new WeakMap);const c=ml[r],d=[],h=new Set,p=new Set(u),E=y=>{!y||h.has(y)||(h.add(y),E(y.parentNode))};u.forEach(y=>{E(y),a&&Mt(y)&&IE(y,x=>{E(x)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(h.has(x))b(x);else try{if(g6(x))return;const _=x.getAttribute(o)==="true",A=(jo.get(x)||0)+1,O=(c.get(x)||0)+1;jo.set(x,A),c.set(x,O),d.push(x),A===1&&_&&pl.set(x,!0),O===1&&x.setAttribute(r,""),_||x.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",x,S)}})};return b(n),h.clear(),Jf++,()=>{d.forEach(y=>{const x=jo.get(y)-1,S=c.get(y)-1;jo.set(y,x),c.set(y,S),x||(pl.has(y)||y.removeAttribute(o),pl.delete(y)),S||y.removeAttribute(r)}),Jf--,Jf||(jo=new WeakMap,jo=new WeakMap,pl=new WeakMap,ml={})}},y6=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,T6=(e,t=y6(e),n="data-aria-hidden",r=!0)=>{if(t)return E6(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},b6=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Ty(e,t={}){const{defer:n=!0}=t,r=n?b6:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(T6(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function x6(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 w6(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 by="pointerdown.outside",xy="focus.outside";function S6(e){for(const t of e)if(Mt(t)&&dr(t))return!0;return!1}var wy=e=>"clientY"in e;function _6(e,t){if(!wy(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 v6(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Sy(e,t){if(!t||!wy(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 v6(u,c)?r||a:!1}function A6(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=cr(e),h=Oo(e),p=x6(h),E=w6(h);function b(I,z){if(!Mt(z)||!z.isConnected||No(e,z)||_6(e,I)||c&&OE(e,z))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const G=Lf(Y);if(Sy(I,G))return!1}const M=Lf(e);return Sy(I,M)?!1:!(n!=null&&n(z))}const y=new Set,x=Fi(e==null?void 0:e.getRootNode());function S(I){function z(Y){var be,F;const M=u&&!RE()?Nt:te=>te(),G=Y!=null?Y:I,pe=(F=(be=G==null?void 0:G.composedPath)==null?void 0:be.call(G))!=null?F:[G==null?void 0:G.target];M(()=>{const te=x?pe[0]:Gn(I);if(!(!e||!b(I,te))){if(o||a){const X=_f(o,a);e.addEventListener(by,X,{once:!0})}_y(e,by,{bubbles:!1,cancelable:!0,detail:{originalEvent:G,contextmenu:cP(G),focusable:S6(pe),target:te}})}})}I.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(Ft(d,"click",z,{once:!0})),y.add(E.addEventListener("click",z,{once:!0})),y.add(p.addEventListener("click",z,{once:!0}))):z()}const _=new Set,A=setTimeout(()=>{_.add(Ft(d,"pointerdown",S,!0)),_.add(E.addEventListener("pointerdown",S,!0)),_.add(p.addEventListener("pointerdown",S,!0))},0);function O(I){(u?Nt:Y=>Y())(()=>{var G,pe;const Y=(pe=(G=I==null?void 0:I.composedPath)==null?void 0:G.call(I))!=null?pe:[I==null?void 0:I.target],M=x?Y[0]:Gn(I);if(!(!e||!b(I,M))){if(r||a){const be=_f(r,a);e.addEventListener(xy,be,{once:!0})}_y(e,xy,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:dr(M),target:M}})}})}return RE()||(_.add(Ft(d,"focusin",O,!0)),_.add(E.addEventListener("focusin",O,!0)),_.add(p.addEventListener("focusin",O,!0))),()=>{clearTimeout(A),y.forEach(I=>I()),_.forEach(I=>I())}}function C6(e,t){const{defer:n}=t,r=n?Nt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(A6(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function _y(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function k6(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Ft(cr(e),"keydown",n,{capture:!0})}var vy="layer:request-dismiss",Dn={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=>No(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>No(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=>Dn.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];O6(e,vy,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),N6(e,vy,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function N6(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 O6(e,t,n){e.addEventListener(t,n,{once:!0})}var Ay;function Cy(){Dn.layers.forEach(({node:e})=>{e.style.pointerEvents=Dn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function I6(e){e.style.pointerEvents=""}function R6(e,t){const n=cr(e),r=[];return Dn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Ay=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=PP(()=>{const c=o();return Mt(c)?c:null},{timeout:1e3});a.then(c=>r.push(tl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Dn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Ay,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function P6(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Af("[@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,h={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};Dn.add(h),Cy();function p(S){var A,O;const _=Gn(S.detail.originalEvent);Dn.isBelowPointerBlockingLayer(e)||Dn.isInBranch(_)||((A=t.onPointerDownOutside)==null||A.call(t,S),(O=t.onInteractOutside)==null||O.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function E(S){var A,O;const _=Gn(S.detail.originalEvent);Dn.isInBranch(_)||((A=t.onFocusOutside)==null||A.call(t,S),(O=t.onInteractOutside)==null||O.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var _;Dn.isTopMost(e)&&((_=t.onEscapeKeyDown)==null||_.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var I;if(!e)return!1;const _=typeof u=="function"?u():u,A=Array.isArray(_)?_:[_],O=(I=t.persistentElements)==null?void 0:I.map(z=>z()).filter(Mt);return O&&A.push(...O),A.some(z=>No(z,S))||Dn.isInNestedLayer(e,S)}const x=[a?R6(e,t.persistentElements):void 0,k6(e,b),C6(e,{exclude:y,onFocusOutside:E,onPointerDownOutside:p,defer:t.defer})];return()=>{Dn.remove(e),Cy(),I6(e),x.forEach(S=>S==null?void 0:S())}}function ky(e,t){const{defer:n}=t,r=n?Nt:a=>a(),o=[];return o.push(r(()=>{const a=Co(e)?e():e;o.push(P6(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var L6=Object.defineProperty,D6=(e,t,n)=>t in e?L6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ht=(e,t,n)=>D6(e,typeof t!="symbol"?t+"":t,n),Ny={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()}},M6=[],F6=class{constructor(e,t){ht(this,"trapStack"),ht(this,"config"),ht(this,"doc"),ht(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),ht(this,"portalContainers",new Set),ht(this,"listenerCleanups",[]),ht(this,"handleFocus",r=>{const o=Gn(r),a=this.findContainerIndex(o,r)>=0;if(a||Qu(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(ra(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[d];if(h.length>0){const p=h.findIndex(E=>E===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<h.length&&(u=h[p+1],c=!1):p-1>=0&&(u=h[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(h=>ra(h)>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}),ht(this,"handlePointerDown",r=>{const o=Gn(r);if(!(this.findContainerIndex(o,r)>=0)){if(da(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}da(this.config.allowOutsideClick,r)||r.preventDefault()}}),ht(this,"handleClick",r=>{const o=Gn(r);this.findContainerIndex(o,r)>=0||da(this.config.clickOutsideDeactivates,r)||da(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),ht(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;ca(r)&&r.preventDefault(),this.tryFocus(a)}}),ht(this,"handleEscapeKey",r=>{B6(r)&&da(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),ht(this,"_mutationObserver"),ht(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(h=>h===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 h=d;return tP(h)?!0:h.id&&!this.state.containers.some(p=>p.contains(h))?nP(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),ht(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)}))}),ht(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!dr(r)){const o=Io(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}),ht(this,"tryFocus",r=>{if(r!==!1&&r!==Io(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,U6(r)&&r.select()}}),ht(this,"deactivate",r=>{if(!this.state.active)return this;const o=U({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(),Ny.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 h=()=>{Oy(()=>{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(h,h),this}return h(),this}),ht(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}),ht(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}),ht(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),ht(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),ht(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),ht(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}),ht(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Gn(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),h=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:E})=>u===E);if(p<0&&((h==null?void 0:h.container)===u||dr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(p=d),p>=0){const E=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[E];c=ra(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else ca(o)||(c=h==null?void 0:h.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>u===E);if(p<0&&((h==null?void 0:h.container)===u||dr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(p=d),p>=0){const E=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[E];c=ra(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else ca(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||M6;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return ca(r)&&!r.shiftKey},isKeyBackward(r){return ca(r)&&r.shiftKey}},t);this.doc=n.document||cr(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=>{JR(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?OE(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Po(e,{getShadowRoot:this.config.getShadowRoot}),n=UE(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let h=0;h<t.length;h++)if(ra(t[h])>0){c=!0;break}function d(h,p=!0){const E=t.indexOf(h);if(E>=0)return t[E+(p?1:-1)];const b=n.indexOf(h);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(Bi(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(Bi(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 Ny.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Oy(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ft(this.doc,"focusin",this.handleFocus,!0),Ft(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ft(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ft(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ft(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ft(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=Io(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)}},ca=e=>e.key==="Tab",da=(e,...t)=>typeof e=="function"?e(...t):e,B6=e=>!e.isComposing&&e.key==="Escape",Oy=e=>setTimeout(e,0),U6=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Iy(e,t={}){let n;const r=Nt(()=>{const o=typeof e=="function"?e():e;if(o){n=new F6(o,se(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:cr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Zf="data-scroll-lock";function H6(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Ry(e){const t=Ro(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Py(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Zf))return;const u=Ry(r)||Ry(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Zf,"");const d=()=>IP(r,"--scrollbar-width",`${c}px`),h=H6(r),p=()=>{const x={overflow:"hidden"};return!u&&c>0&&(x[h]=`${c}px`),tl(o,x)},E=()=>{var Y,M;const{scrollX:x,scrollY:S,visualViewport:_}=n,A=(Y=_==null?void 0:_.offsetLeft)!=null?Y:0,O=(M=_==null?void 0:_.offsetTop)!=null?M:0,I={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(O))}px`,left:`${-(x-Math.floor(A))}px`,right:"0"};!u&&c>0&&(I[h]=`${c}px`);const z=tl(o,I);return()=>{z==null||z(),n.scrollTo({left:x,top:S,behavior:"instant"})}},b=[d(),Ju()?E():p()];return()=>{b.forEach(x=>x==null?void 0:x()),o.removeAttribute(Zf)}}var z6=Hi("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),gr=z6.build(),Ly=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Dy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},eh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},My=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},j6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},th=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},nh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},$6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Fy=e=>e.getById(Ly(e)),$o=e=>e.getById(Dy(e)),Vo=e=>e.getById(eh(e)),By=e=>e.getById(My(e)),V6=e=>e.getById(th(e)),q6=e=>e.getById(nh(e));function Y6(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),h=r.get("currentPlacement"),p=a("currentPortalled"),E=r.get("renderedElements"),b=h6(se(U({},u("positioning")),{placement:h}));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(se(U({id:j6(c)},gr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(se(U({},gr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(se(U({},gr.anchor.attrs),{dir:u("dir"),id:Ly(c)}))},getTriggerProps(){return t.button(se(U({},gr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:Dy(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":eh(c),onPointerDown(y){PE(y)&&uP()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(se(U({},gr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(se(U({id:My(c)},gr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(se(U({},gr.content.attrs),{dir:u("dir"),id:eh(c),tabIndex:-1,role:"dialog","aria-modal":CE(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ko(d),"aria-labelledby":E.title?th(c):void 0,"aria-describedby":E.description?nh(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(se(U({},gr.title.attrs),{id:th(c),dir:u("dir")}))},getDescriptionProps(){return t.element(se(U({},gr.description.attrs),{id:nh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(se(U({},gr.closeTrigger.attrs),{dir:u("dir"),id:$6(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var W6={props({props:e}){return se(U({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:U({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=Fy(n))!=null?a:$o(n);return Ey(r,()=>By(n),se(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Vo(n);let o=!0;return ky(r,{type:"popover",pointerBlocking:t("modal"),exclude:$o(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:NP(()=>Vo(t),{triggerElement:$o(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Ty(()=>[Vo(t),$o(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Py(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Iy(()=>Vo(t),{initialFocus:()=>HE({root:Vo(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=Fy(n))!=null?u:$o(n);Ey(o,()=>By(n),se(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Nt(()=>{Object.assign(e.get("renderedElements"),{title:!!V6(t),description:!!q6(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Nt(()=>{const n=HE({root:Vo(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||Nt(()=>{const a=$o(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})}}}};Mo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[QF,gl]=Ui({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[JF,rh]=Ui({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),G6=e=>{const t=Q.useId(),{getRootNode:n}=gl(),{dir:r}=rh(),o=U({id:t,dir:r,getRootNode:n},e),a=rl(W6,o);return Y6(a,Ff)},K6=e=>{const[t,u]=KE(e),c=u,{children:n}=c,r=sn(c,["children"]),o=G6(r),a=Hf(Ot({present:o.open},t));return P.jsx(VP,{value:o,children:P.jsx(YE,{value:a,children:n})})},Uy=Q.forwardRef((e,t)=>{const n=Uf(),r=ia(),o=Ot(se(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return P.jsx(Kt.button,se(U({},o),{ref:t}))});Uy.displayName="PopoverTrigger";function X6(e){return tn({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 Q6(e){return tn({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 J6(e){return tn({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 Z6(e){return tn({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 Hy(e){return tn({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 e4=({className:e,componentType:t,children:n})=>{const[r,o]=Q.useState(!1),{globalClassName:a}=kt(),u=h=>{o(h.open)},c=Q.useCallback(()=>{o(!1)},[]),d=Q.useMemo(()=>({closeMenu:c}),[c]);return P.jsxs(K6,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[P.jsx(Uy,{"aria-label":`Overflow menu for ${t}`,className:ae(`${ee}-overflow-menu-button-trigger`,`${ee}-icon-button`,a,e,`cim-${t}-component`),children:P.jsx(Hy,{})}),P.jsx(GE,{children:P.jsx(WE,{className:ae(`${ee}-overflow-menu-list`,a,`cim-${t}-component`),children:P.jsx(bE.Provider,{value:d,children:n})})})]})};function zy(e){return tn({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 jy(e){return tn({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[t4,ji]=Ui({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),$y=Q.forwardRef((e,t)=>{const n=ji(),r=Ot(n.getControlProps(),e);return P.jsx(Kt.div,se(U(U({},r),e),{ref:t}))});$y.displayName="CarouselControl";const Vy=Q.forwardRef((e,t)=>{const[n,r]=oa()(e,["readOnly","index"]),o=ji(),a=Ot(o.getIndicatorProps(n),r);return P.jsx(Kt.button,se(U({},a),{ref:t}))});Vy.displayName="CarouselIndicator";const qy=Q.forwardRef((e,t)=>{const n=ji(),r=Ot(n.getIndicatorGroupProps(),e);return P.jsx(Kt.div,se(U({},r),{ref:t}))});qy.displayName="CarouselIndicatorGroup";const Yy=Q.forwardRef((e,t)=>{const[n,r]=oa()(e,["index","snapAlign"]),o=ji(),a=Ot(o.getItemProps(n),r);return P.jsx(Kt.div,se(U({},a),{ref:t}))});Yy.displayName="CarouselItem";const Wy=Q.forwardRef((e,t)=>{const n=ji(),r=Ot(n.getItemGroupProps(),e);return P.jsx(Kt.div,se(U({},r),{ref:t}))});Wy.displayName="CarouselItemGroup";const Gy=Q.forwardRef((e,t)=>{const n=ji(),r=Ot(n.getNextTriggerProps(),e);return P.jsx(Kt.button,se(U({},r),{ref:t}))});Gy.displayName="CarouselNextTrigger";const Ky=Q.forwardRef((e,t)=>{const n=ji(),r=Ot(n.getPrevTriggerProps(),e);return P.jsx(Kt.button,se(U({},r),{ref:t}))});Ky.displayName="CarouselPrevTrigger";function n4(e){const t=Ro(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(b,y){let x=parseFloat(b);return/%/.test(b)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=c(r,n.width),h=c(o,n.height),p=c(a,n.width),E=c(u,n.height);return{x:{before:d,after:p},y:{before:h,after:E}}}function r4(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 Xy(e){let t=[];for(const n of e.children)t=t.concat(n,Xy(n));return t}function Qy(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?Xy(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",h=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const E=p.getBoundingClientRect();if(!r4(n,E,u))continue;const b=Ro(p);let[y,x]=b.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const S=a==="x"?x:y,_=E[c]-n[c]+e[h];switch(S){case"none":break;case"start":r[a].start.push({node:p,position:_});break;case"center":r[a].center.push({node:p,position:_+E[d]/2});break;case"end":r[a].end.push({node:p,position:_+E[d]});break}}}return r}function Jy(e){const t=e.getBoundingClientRect(),n=n4(e),r=Qy(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Zy([...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(eT(0,o.x))),y:Zy([...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(eT(0,o.y)))}}function i4(e,t,n){const r=Qy(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var Zy=e=>[...new Set(e)],eT=(e,t)=>n=>Math.max(e,Math.min(t,n)),o4=Hi("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Nr=o4.build(),s4=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},a4=(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}`},El=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},u4=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},l4=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},c4=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},tT=(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}`},hn=e=>e.getById(El(e)),nT=e=>OP(hn(e),"[data-part=item]"),d4=(e,t)=>e.getById(tT(e,t)),rT=e=>{const t=hn(e);if(!t)return;const n=Po(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function f4(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),h=n.matches("dragging"),p=o("canScrollNext"),E=o("canScrollPrev"),b=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),S=c("slidesPerPage"),_=c("padding"),A=c("translations");return{isPlaying:d,isDragging:h,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:E,getProgress(){return x/y.length},scrollToIndex(O,I){a({type:"INDEX.SET",index:O,instant:I})},scrollTo(O,I){a({type:"PAGE.SET",index:O,instant:I})},scrollNext(O){a({type:"PAGE.NEXT",instant:O})},scrollPrev(O){a({type:"PAGE.PREV",instant:O})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(O){return Array.from(r.get("slidesInView")).includes(O)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(se(U({},Nr.root.attrs),{id:s4(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":S,"--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(se(U({},Nr.itemGroup.attrs),{id:El(u),"data-orientation":c("orientation"),"data-dragging":ko(h),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(O){No(O.currentTarget,Gn(O))&&a({type:"VIEWPORT.FOCUS"})},onBlur(O){No(O.currentTarget,O.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(O){if(O.defaultPrevented||!c("allowMouseDrag")||!PE(O))return;const I=Gn(O);dr(I)&&I!==O.currentTarget||(O.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:OR(O=>{const I=c("orientation")==="horizontal"?"deltaX":"deltaY";O[I]<0&&!o("canScrollPrev")||O[I]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:_,[b?"paddingInline":"paddingBlock"]:_,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(O){const I=r.get("slidesInView").includes(O.index);return t.element(se(U({},Nr.item.attrs),{id:a4(u,O.index),dir:c("dir"),role:"group","data-index":O.index,"data-inview":ko(I),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":A.item(O.index,c("slideCount")),"aria-hidden":CE(!I),style:{scrollSnapAlign:(()=>{var pe;const z=(pe=O.snapAlign)!=null?pe:"start",Y=c("slidesPerMove"),M=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(O.index+M)%M===0?z:void 0})()}}))},getControlProps(){return t.element(se(U({},Nr.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(se(U({},Nr.prevTrigger.attrs),{id:l4(u),type:"button",disabled:!E,dir:c("dir"),"aria-label":A.prevTrigger,"data-orientation":c("orientation"),"aria-controls":El(u),onClick(O){O.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(se(U({},Nr.nextTrigger.attrs),{dir:c("dir"),id:u4(u),type:"button","aria-label":A.nextTrigger,"data-orientation":c("orientation"),"aria-controls":El(u),disabled:!p,onClick(O){O.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(se(U({},Nr.indicatorGroup.attrs),{dir:c("dir"),id:c4(u),"data-orientation":c("orientation"),onKeyDown(O){if(O.defaultPrevented)return;const I="indicator",z={ArrowDown(G){b||(a({type:"PAGE.NEXT",src:I}),G.preventDefault())},ArrowUp(G){b||(a({type:"PAGE.PREV",src:I}),G.preventDefault())},ArrowRight(G){b&&(a({type:"PAGE.NEXT",src:I}),G.preventDefault())},ArrowLeft(G){b&&(a({type:"PAGE.PREV",src:I}),G.preventDefault())},Home(G){a({type:"PAGE.SET",index:0,src:I}),G.preventDefault()},End(G){a({type:"PAGE.SET",index:y.length-1,src:I}),G.preventDefault()}},Y=hP(O,{dir:c("dir"),orientation:c("orientation")}),M=z[Y];M==null||M(O)}}))},getIndicatorProps(O){return t.button(se(U({},Nr.indicator.attrs),{dir:c("dir"),id:tT(u,O.index),type:"button","data-orientation":c("orientation"),"data-index":O.index,"data-readonly":ko(O.readOnly),"data-current":ko(O.index===x),"aria-label":A.indicator(O.index),onClick(I){I.defaultPrevented||O.readOnly||a({type:"PAGE.SET",index:O.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(se(U({},Nr.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":ko(d),"aria-label":d?A.autoplayStop:A.autoplayStart,onClick(O){O.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var h4={props({props:e}){return MR(e,["slideCount"],"carousel"),se(U({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:U({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:p4(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 TR(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(hn(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=hn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),rT(e)});return rT(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!hn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Nt(()=>{o(),Nt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return nT(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=hn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,h)=>{var b;const p=h.target,E=Number((b=p.dataset.index)!=null?b:"-1");return E==null||Number.isNaN(E)||E===-1?d:h.isIntersecting?pR(d,E):mR(d,E)},n.get("slidesInView"));n.set("slidesInView",gR(c))},{root:r,threshold:t("inViewThreshold")});return nT(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=hn(n);return r?Ft(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 Ft(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return CP(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 Ft(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 h;const a=t.instant?"instant":"smooth",u=vE((h=t.index)!=null?h:e.get("page"),0,e.get("pageSnapPoints").length-1),c=hn(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=hn(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=wE(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=ER(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=hn(r);if(!o)return;const a=i4(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=vE(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=hn(n);if(!r)return;const o=Jy(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=hn(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=hn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=hn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=Jy(r),c=u.x.reduce((h,p)=>Math.abs(p-o)<Math.abs(h-o)?p:h,u.x[0]),d=u.y.reduce((h,p)=>Math.abs(p-a)<Math.abs(h-a)?p:h,u.y[0]);Nt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const h=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(h));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=d4(n,e.get("page"));r&&Nt(()=>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 p4(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}Mo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Mo()(["index","readOnly"]),Mo()(["index","snapAlign"]);const m4=e=>{const t=Q.useId(),{getRootNode:n}=gl(),{dir:r}=rh(),o=U({id:t,dir:r,getRootNode:n},e),a=rl(h4,o);return f4(a,Ff)},iT=Q.forwardRef((e,t)=>{const[n,r]=oa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=m4(n),a=Ot(o.getRootProps(),r);return P.jsx(t4,{value:o,children:P.jsx(Kt.div,se(U({},a),{ref:t}))})});iT.displayName="CarouselRoot";const g4=180,E4=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},y4=({globalClassName:e,className:t,itemMinWidth:n=g4,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:h="Product carousel",children:p})=>{const E=Array.from(p),b=E.length,y=Q.useRef(null),[x,S]=Q.useState(0),{width:_}=sv();Q.useLayoutEffect(()=>{y.current&&S(y.current.getBoundingClientRect().width)},[_,b]);const A=E4(r),O=n+A,I=x>0?(x+A)/O:1,z=Math.max(1,Math.floor(I));if(b===0)return null;const Y=b>z,M=Math.ceil(b/z),G=Y?Math.max(1,I):z;return P.jsxs(iT,{ref:y,className:ae(e,t,`${ee}-carousel`),slidesPerPage:G,slidesPerMove:z,spacing:r,loop:o,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":h,children:[P.jsx(Wy,{className:ae(e,`${ee}-carousel__item-group`,{"carousel-row-container":!Y}),children:E.map((pe,be)=>P.jsx(Yy,{index:be,className:ae(e,`${ee}-carousel__item`),children:pe},be))}),c&&Y&&P.jsxs($y,{className:ae(e,`${ee}-carousel__control`),children:[P.jsx(Ky,{className:ae(e,`${ee}-carousel__prev-trigger`),"aria-label":"Previous slide",children:P.jsx(J6,{})}),P.jsx(Gy,{className:ae(e,`${ee}-carousel__next-trigger`),"aria-label":"Next slide",children:P.jsx(Z6,{})})]}),u&&Y&&P.jsx(qy,{className:ae(e,`${ee}-carousel__indicator-group`),children:Array.from({length:M},(pe,be)=>P.jsx(Vy,{index:be,className:ae(e,`${ee}-carousel__indicator`),"aria-label":`Go to slide group ${be+1}`},be))})]})},T4=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>P.jsx("button",{"aria-label":t,title:t,className:ae(e,`${ee}-close-button`),disabled:r,onClick:n,children:P.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:P.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),[b4,x4]=Ui({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),w4=e=>oa()(e,["lazyMount","unmountOnExit"]),[S4,fa]=Ui({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),oT=Q.forwardRef((e,t)=>{const n=fa(),r=x4(),o=Hf(se(U({},r),{present:n.open})),a=Ot(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:P.jsx(Kt.div,se(U({},a),{ref:il(o.ref,t)}))});oT.displayName="DialogBackdrop";const ih=Q.forwardRef((e,t)=>{const n=fa(),r=ia(),o=Ot(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:P.jsx(Kt.div,se(U({},o),{ref:il(r.ref,t)}))});ih.displayName="DialogContent";const oh=Q.forwardRef((e,t)=>{const n=fa(),r=Ot(n.getDescriptionProps(),e);return P.jsx(Kt.div,se(U({},r),{ref:t}))});oh.displayName="DialogDescription";const sh=Q.forwardRef((e,t)=>{const n=fa(),r=Ot(n.getPositionerProps(),e);return ia().unmounted?null:P.jsx(Kt.div,se(U({},r),{ref:t}))});sh.displayName="DialogPositioner";var _4=Hi("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),$i=_4.build(),sT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},aT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},ah=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},uT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},lh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},lT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},yl=e=>e.getById(ah(e)),v4=e=>e.getById(sT(e)),A4=e=>e.getById(aT(e)),C4=e=>e.getById(uT(e)),k4=e=>e.getById(uh(e)),N4=e=>e.getById(lh(e)),O4=e=>e.getById(lT(e));function I4(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(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(se(U({},$i.trigger.attrs),{dir:a("dir"),id:uT(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ah(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(se(U({},$i.backdrop.attrs),{dir:a("dir"),hidden:!d,id:aT(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(se(U({},$i.positioner.attrs),{dir:a("dir"),id:sT(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(se(U({},$i.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:ah(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:uh(u),"aria-describedby":h.description?lh(u):void 0}))},getTitleProps(){return t.element(se(U({},$i.title.attrs),{dir:a("dir"),id:uh(u)}))},getDescriptionProps(){return t.element(se(U({},$i.description.attrs),{dir:a("dir"),id:lh(u)}))},getCloseTriggerProps(){return t.button(se(U({},$i.closeTrigger.attrs),{dir:a("dir"),id:lT(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var R4={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>O4(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return U({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 ky(()=>yl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[C4(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 Py(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Iy(()=>yl(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")?Ty(()=>[yl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Nt(()=>{e.set("rendered",{title:!!k4(t),description:!!N4(t)})})},syncZIndex({scope:e}){Nt(()=>{const t=yl(e);if(!t)return;const n=Ro(t);[v4(e),A4(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})}}}};Mo()(["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 P4=e=>{const t=Q.useId(),{getRootNode:n}=gl(),{dir:r}=rh(),o=U({id:t,getRootNode:n,dir:r},e),a=rl(R4,o);return I4(a,Ff)},cT=e=>{const[t,c]=KE(e),d=c,{children:n}=d,r=sn(d,["children"]),[o]=w4(t),a=P4(r),u=Hf(Ot({present:a.open},t));return P.jsx(S4,{value:a,children:P.jsx(b4,{value:o,children:P.jsx(YE,{value:u,children:n})})})},dT=Q.forwardRef((e,t)=>{const n=fa(),r=Ot(n.getTitleProps(),e);return P.jsx(Kt.h2,se(U({},r),{ref:t}))});dT.displayName="DialogTitle";const L4=({children:e})=>{const[t,n]=Q.useState(!1),r=Q.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=Q.useMemo(()=>({isOpen:t}),[t]);return P.jsx(Sf.Provider,{value:r,children:P.jsx(TE.Provider,{value:o,children:e})})},fT=()=>Q.useContext(TE),hT=()=>{const e=Q.useContext(Sf);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},D4=`${ee}-overflow-menu-button-trigger`,M4=({componentType:e,children:t})=>{const{isOpen:n}=fT(),{closeMenu:r}=hT(),{globalClassName:o}=kt(),a=Q.useRef(null);return Q.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const h=d.target;h instanceof Element&&h.closest(`.${D4}`)||a.current&&!a.current.contains(h)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?P.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:ae(`${ee}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},F4=({componentType:e,className:t})=>{const{toggleMenu:n}=hT(),{isOpen:r}=fT(),{globalClassName:o}=kt();return P.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:ae(`${ee}-overflow-menu-button-trigger`,`${ee}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:P.jsx(Hy,{})})},B4=({componentType:e,isIcon:t})=>{const{globalClassName:n}=kt(),{previousComponentType:r}=Ci(),o=ta(),a=()=>{wu(r||"dialog"),o()};return t?P.jsx($r,{className:ae(n,`${ee}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:P.jsx(zy,{})}):P.jsxs("button",{className:ae(n,`${ee}-overflow-menu-button`,`${ee}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[P.jsx(zy,{}),"Show ",r||"dialog"]})},U4=({componentType:e,isIcon:t})=>{const{globalClassName:n}=kt(),{isModalFullscreen:r}=Ci(),o=ta(),a=()=>{yd(!r),o()},u=r?Ov:Iv,c="Toggle Fullscreen";return t?P.jsx($r,{ariaLabel:c,title:c,className:ae(n,`${ee}-modal-fullscreen-button`,`cim-${e}-component`),icon:P.jsx(u,{}),onClick:a}):P.jsxs("button",{className:ae(n,`${ee}-overflow-menu-button`,`${ee}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[P.jsx(u,{}),c]})},H4=({componentType:e,isIcon:t})=>{const{globalClassName:n}=kt(),{dialogPosition:r}=Ci(),o=ta(),a=r==="bottom-left",u=()=>{Td(a?"bottom-right":"bottom-left"),o()},c=a?Q6:X6,d=a?"Move right":"Move left";return t?P.jsx($r,{className:ae(n,`${ee}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:P.jsx(c,{})}):P.jsxs("button",{className:ae(n,`${ee}-overflow-menu-button`,`${ee}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[P.jsx(c,{}),d]})},pT=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=kt(),{mode:a}=Ci(),u=a==="standalone",c=e==="modal",d=c?B4:mT,h=c?U4:H4,p=Q.useMemo(()=>r?kv(r):{},[r]);return P.jsx(L4,{children:P.jsxs("div",{className:ae(o,`${ee}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[P.jsxs("div",{className:ae(o,`${ee}-${e}-header`,{standalone:u,embedded:!u}),style:p,children:[(r==null?void 0:r.logoUrl)&&P.jsx("img",{alt:"",role:"img",className:ae(o,`${ee}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),P.jsx(dT,{className:ae(o,`${ee}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),P.jsxs("div",{className:ae(o,`${ee}-${e}-controls`),children:[P.jsx(d,{componentType:e,isIcon:!0}),P.jsx(F4,{componentType:e}),P.jsx(T4,{className:ae(o,`cim-${e}-component`),onClick:n})]})]}),P.jsxs(M4,{componentType:e,children:[P.jsx(h,{componentType:e}),P.jsx(j4,{componentType:e}),P.jsx(xE,{componentType:e,onClearChat:t})]})]})})},z4=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return P.jsx("div",{className:ae(t,`${ee}-suggestion-container ${u}`,e),children:n.map(d=>o?P.jsx(I0,{disabled:r,className:ae(t,`${ee}-suggestion-button standalone`),onClick:c(d),children:d},d):P.jsx("button",{disabled:r,className:ae(t,`${ee}-suggestion-button embedded`),onClick:c(d),children:d},d))})},j4=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=kt();if(!r)return null;const o=()=>{Ai(!1),xu(!0)};return t?P.jsx($r,{className:ae(n,`${ee}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:P.jsx(N0,{})}):P.jsxs("button",{className:ae(n,`${ee}-overflow-menu-button`,`${ee}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[P.jsx(N0,{}),"Minimize"]})},mT=({componentType:e,isIcon:t})=>{const{globalClassName:n}=kt(),r=ta(),o=()=>{wu("modal"),r()};return t?P.jsx($r,{className:ae(n,`${ee}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:P.jsx(jy,{})}):P.jsxs("button",{className:ae(n,`${ee}-overflow-menu-button`,`${ee}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[P.jsx(jy,{}),"Show modal"]})},$4=["Hey there! 👋 What can I find for you today?","Shopping for a gift? Tell me your budget and preferences","Need help? Connect to an agent"],V4=3e3,q4=400,Y4=({globalClassName:e,isWidgetStandalone:t,messages:n=$4})=>{const[r,o]=Q.useState(0),[a,u]=Q.useState(!0);return Q.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{o(h=>(h+1)%n.length),u(!0)},q4)},V4);return()=>{clearInterval(d),clearTimeout(c)}},[n.length]),P.jsxs("div",{className:ae(e,`${ee}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[P.jsxs("div",{className:`${ee}-connecting-pulse-wrapper`,children:[P.jsx("div",{className:`${ee}-connecting-pulse`}),P.jsx("div",{className:`${ee}-connecting-ring`})]}),P.jsx("span",{className:ae(`${ee}-connecting-text`,a&&`${ee}-connecting-text--visible`),children:n[r]})]})},W4=({shouldShow:e,loadingText:t})=>e?P.jsx("span",{className:`${ee}-processing-text`,children:t}):null,G4=({shouldShow:e})=>e?P.jsxs(P.Fragment,{children:[P.jsx("div",{className:`${ee}-processing-shimmer-bar`}),P.jsx("div",{className:`${ee}-processing-shimmer-bar`}),P.jsx("div",{className:`${ee}-processing-shimmer-bar`})]}):null,ch=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>P.jsxs("div",{className:ae(e,`${ee}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[P.jsx(W4,{shouldShow:!!n,loadingText:n}),P.jsx(G4,{shouldShow:!n})]});function gT(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 K4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function X4(e,t,n){const o=Du((n||{}).ignore||[]),a=Q4(t);let u=-1;for(;++u<a.length;)jg(e,"text",c);function c(h,p){let E=-1,b;for(;++E<p.length;){const y=p[E],x=b?b.children:void 0;if(o(y,x?x.indexOf(y):void 0,b))return;b=y}if(b)return d(h,p)}function d(h,p){const E=p[p.length-1],b=a[u][0],y=a[u][1];let x=0;const _=E.children.indexOf(h);let A=!1,O=[];b.lastIndex=0;let I=b.exec(h.value);for(;I;){const z=I.index,Y={index:I.index,input:I.input,stack:[...p,h]};let M=y(...I,Y);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?b.lastIndex=z+1:(x!==z&&O.push({type:"text",value:h.value.slice(x,z)}),Array.isArray(M)?O.push(...M):M&&O.push(M),x=z+I[0].length,A=!0),!b.global)break;I=b.exec(h.value)}return A?(x<h.value.length&&O.push({type:"text",value:h.value.slice(x)}),E.children.splice(_,1,...O)):O=[h],_+O.length}}function Q4(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([J4(o[0]),Z4(o[1])])}return t}function J4(e){return typeof e=="string"?new RegExp(K4(e),"g"):e}function Z4(e){return typeof e=="function"?e:function(){return e}}const dh="phrasing",fh=["autolink","link","image","label"];function eD(){return{transforms:[aD],enter:{literalAutolink:nD,literalAutolinkEmail:hh,literalAutolinkHttp:hh,literalAutolinkWww:hh},exit:{literalAutolink:sD,literalAutolinkEmail:oD,literalAutolinkHttp:rD,literalAutolinkWww:iD}}}function tD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:dh,notInConstruct:fh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:dh,notInConstruct:fh},{character:":",before:"[ps]",after:"\\/",inConstruct:dh,notInConstruct:fh}]}}function nD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function hh(e){this.config.enter.autolinkProtocol.call(this,e)}function rD(e){this.config.exit.autolinkProtocol.call(this,e)}function iD(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 oD(e){this.config.exit.autolinkEmail.call(this,e)}function sD(e){this.exit(e)}function aD(e){X4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,uD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),lD]],{ignore:["link","linkReference"]})}function uD(e,t,n,r,o){let a="";if(!ET(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!cD(n)))return!1;const u=dD(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 lD(e,t,n,r){return!ET(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function cD(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 dD(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=gT(e,"(");let a=gT(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 ET(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Oi(n)||ku(n))&&(!t||n!==47)}yT.peek=bD;function fD(){this.buffer()}function hD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function pD(){this.buffer()}function mD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function gD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ED(e){this.exit(e)}function yD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function TD(e){this.exit(e)}function bD(){return"["}function yT(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 xD(){return{enter:{gfmFootnoteCallString:fD,gfmFootnoteCall:hD,gfmFootnoteDefinitionLabelString:pD,gfmFootnoteDefinition:mD},exit:{gfmFootnoteCallString:gD,gfmFootnoteCall:ED,gfmFootnoteDefinitionLabelString:yD,gfmFootnoteDefinition:TD}}}function wD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:yT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const h=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?`
37
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Ri={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/"},i1={}.hasOwnProperty,$N=Object.prototype;function VN(e,t){const n=t||{};return sf({file:n.file||void 0,location:!1,schema:n.space==="svg"?mo:vu,verbose:n.verbose||!1},e)}function sf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Uu(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:o1(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=jN(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"},Uu(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Uu(e,r,n),n}default:return n=qN(e,t),n}}function o1(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=sf(e,t[n]);r.push(o)}return r}function qN(e,t){const n=e.schema;e.schema=t.namespaceURI===Ri.svg?mo:vu;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;i1.call($N,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?zN:HN)(t.tagName,o,o1(e,t.childNodes));if(Uu(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&bo(d.startTag),p=d&&d.endTag&&bo(d.endTag),E=sf(e,c.content);h&&p&&e.file&&(E.position={start:h.end,end:p.start}),u.content=E}return e.schema=n,u}function Uu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=YN(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function YN(e,t,n){const r=bo(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)i1.call(n.attrs,u)&&(a[Cd(e.schema,u).property]=bo(n.attrs[u]));n.startTag;const c=bo(n.startTag),d=n.endTag?bo(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=a,t.data={position:h}}}return r}function bo(e){const t=s1({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=s1({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function s1(e){return e.line&&e.column?e:void 0}class js{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}js.prototype.property={},js.prototype.normal={},js.prototype.space=null;function a1(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 js(n,r,t)}function af(e){return e.toLowerCase()}class Pn{constructor(t,n){this.property=t,this.attribute=n}}Pn.prototype.space=null,Pn.prototype.boolean=!1,Pn.prototype.booleanish=!1,Pn.prototype.overloadedBoolean=!1,Pn.prototype.number=!1,Pn.prototype.commaSeparated=!1,Pn.prototype.spaceSeparated=!1,Pn.prototype.commaOrSpaceSeparated=!1,Pn.prototype.mustUseProperty=!1,Pn.prototype.defined=!1;let WN=0;const ze=Pi(),At=Pi(),u1=Pi(),ge=Pi(),st=Pi(),xo=Pi(),wn=Pi();function Pi(){return Za(2,++WN)}const uf=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:At,commaOrSpaceSeparated:wn,commaSeparated:xo,number:ge,overloadedBoolean:u1,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),lf=Object.keys(uf);class cf extends Pn{constructor(t,n,r,o){let a=-1;if(super(t,n),l1(this,"space",o),typeof r=="number")for(;++a<lf.length;){const u=lf[a];l1(this,lf[a],(r&uf[u])===uf[u])}}}cf.prototype.defined=!0;function l1(e,t,n){n&&(e[t]=n)}const GN={}.hasOwnProperty;function wo(e){const t={},n={};let r;for(r in e.properties)if(GN.call(e.properties,r)){const o=e.properties[r],a=new cf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[af(r)]=r,n[af(a.attribute)]=r}return new js(t,n,e.space)}const c1=wo({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}}),d1=wo({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function f1(e,t){return t in e?e[t]:t}function h1(e,t){return f1(e,t.toLowerCase())}const p1=wo({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:h1,properties:{xmlns:null,xmlnsXLink:null}}),m1=wo({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:At,ariaAutoComplete:null,ariaBusy:At,ariaChecked:At,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:At,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:At,ariaFlowTo:st,ariaGrabbed:At,ariaHasPopup:null,ariaHidden:At,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:ge,ariaLive:null,ariaModal:At,ariaMultiLine:At,ariaMultiSelectable:At,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:At,ariaReadOnly:At,ariaRelevant:null,ariaRequired:At,ariaRoleDescription:st,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:At,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null}}),KN=wo({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:h1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xo,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:st,autoFocus:ze,autoPlay:ze,blocking:st,capture:null,charSet:null,checked:ze,cite:null,className:st,cols:ge,colSpan:null,content:null,contentEditable:At,controls:ze,controlsList:st,coords:ge|xo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:u1,draggable:At,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:st,height:ge,hidden:ze,high:ge,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:st,itemRef:st,itemScope:ze,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:ge,pattern:null,ping:st,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:st,required:ze,reversed:ze,rows:ge,rowSpan:ge,sandbox:st,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:At,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:At,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:At,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:ge,security:null,unselectable:null}}),XN=wo({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:f1,properties:{about:wn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:st,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:xo,g2:xo,glyphName:xo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wn,rev:wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wn,requiredFeatures:wn,requiredFonts:wn,requiredFormats:wn,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),QN=/^data[-\w.:]+$/i,g1=/-[a-z]/g,JN=/[A-Z]/g;function ZN(e,t){const n=af(t);let r=t,o=Pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&QN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(g1,t3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!g1.test(a)){let u=a.replace(JN,e3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=cf}return new o(r,t)}function e3(e){return"-"+e.toLowerCase()}function t3(e){return e.charAt(1).toUpperCase()}const n3=a1([d1,c1,p1,m1,KN],"html"),E1=a1([d1,c1,p1,m1,XN],"svg"),y1={}.hasOwnProperty;function T1(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&y1.call(o,e)){const d=String(o[e]);u=y1.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 r3={},i3={}.hasOwnProperty,b1=T1("type",{handlers:{root:s3,element:d3,text:l3,comment:c3,doctype:u3}});function o3(e,t){const r=(t||r3).space;return b1(e,r==="svg"?E1:n3)}function s3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=df(e.children,n,t),So(e,n),n}function a3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=df(e.children,n,t),So(e,n),n}function u3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return So(e,t),t}function l3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return So(e,t),t}function c3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return So(e,t),t}function d3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=E1);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&i3.call(e.properties,a)){const d=f3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Ri[u],childNodes:[],parentNode:null};return c.childNodes=df(e.children,c,r),So(e,c),e.tagName==="template"&&e.content&&(c.content=a3(e.content,r)),c}function f3(e,t,n){const r=ZN(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?P0(n):Y0(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=Ri[r.space]}return o}function df(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=b1(e[r],n);a.parentNode=t,o.push(a)}return o}function So(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 h3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],p3=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]),ft="�";var C;(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"})(C||(C={}));const fn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function x1(e){return e>=55296&&e<=57343}function m3(e){return e>=56320&&e<=57343}function g3(e,t){return(e-55296)*1024+9216+t}function w1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function S1(e){return e>=64976&&e<=65007||p3.has(e)}var J;(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"})(J||(J={}));const E3=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=E3,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(m3(n))return this.pos++,this._addGap(),g3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,C.EOF;return this._err(J.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,C.EOF;const r=this.html.charCodeAt(n);return r===C.CARRIAGE_RETURN?C.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,C.EOF;let t=this.html.charCodeAt(this.pos);return t===C.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,C.LINE_FEED):t===C.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,x1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===C.LINE_FEED||t===C.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){w1(t)?this._err(J.controlCharacterInInputStream):S1(t)&&this._err(J.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ve;(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"})(Ve||(Ve={}));function _1(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 T3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),b3=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=b3.get(e))!==null&&t!==void 0?t:e}var Lt;(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"})(Lt||(Lt={}));const w3=32;var Yr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Yr||(Yr={}));function ff(e){return e>=Lt.ZERO&&e<=Lt.NINE}function S3(e){return e>=Lt.UPPER_A&&e<=Lt.UPPER_F||e>=Lt.LOWER_A&&e<=Lt.LOWER_F}function _3(e){return e>=Lt.UPPER_A&&e<=Lt.UPPER_Z||e>=Lt.LOWER_A&&e<=Lt.LOWER_Z||ff(e)}function v3(e){return e===Lt.EQUALS||_3(e)}var Dt;(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"})(Dt||(Dt={}));var vr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(vr||(vr={}));class A3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Dt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=vr.Strict}startEntity(t){this.decodeMode=t,this.state=Dt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Dt.EntityStart:return t.charCodeAt(n)===Lt.NUM?(this.state=Dt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Dt.NamedEntity,this.stateNamedEntity(t,n));case Dt.NumericStart:return this.stateNumericStart(t,n);case Dt.NumericDecimal:return this.stateNumericDecimal(t,n);case Dt.NumericHex:return this.stateNumericHex(t,n);case Dt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|w3)===Lt.LOWER_X?(this.state=Dt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Dt.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(ff(o)||S3(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(ff(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===Lt.SEMI)this.consumed+=1;else if(this.decodeMode===vr.Strict)return 0;return this.emitCodePoint(x3(this.result),this.consumed),this.errors&&(t!==Lt.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&Yr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=C3(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===vr.Attribute&&(a===0||v3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Yr.VALUE_LENGTH)>>14,a!==0){if(u===Lt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==vr.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]&Yr.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]&~Yr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Dt.NamedEntity:return this.result!==0&&(this.decodeMode!==vr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Dt.NumericDecimal:return this.emitNumericEntity(0,2);case Dt.NumericHex:return this.emitNumericEntity(0,3);case Dt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Dt.EntityStart:return 0}}}function C3(e,t,n,r){const o=(t&Yr.BRANCH_LENGTH)>>7,a=t&Yr.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,h=e[d];if(h<r)u=d+1;else if(h>r)c=d-1;else return e[d+o]}return-1}var le;(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/"})(le||(le={}));var Li;(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"})(Li||(Li={}));var Ln;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ln||(Ln={}));var V;(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"})(V||(V={}));var m;(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"})(m||(m={}));const k3=new Map([[V.A,m.A],[V.ADDRESS,m.ADDRESS],[V.ANNOTATION_XML,m.ANNOTATION_XML],[V.APPLET,m.APPLET],[V.AREA,m.AREA],[V.ARTICLE,m.ARTICLE],[V.ASIDE,m.ASIDE],[V.B,m.B],[V.BASE,m.BASE],[V.BASEFONT,m.BASEFONT],[V.BGSOUND,m.BGSOUND],[V.BIG,m.BIG],[V.BLOCKQUOTE,m.BLOCKQUOTE],[V.BODY,m.BODY],[V.BR,m.BR],[V.BUTTON,m.BUTTON],[V.CAPTION,m.CAPTION],[V.CENTER,m.CENTER],[V.CODE,m.CODE],[V.COL,m.COL],[V.COLGROUP,m.COLGROUP],[V.DD,m.DD],[V.DESC,m.DESC],[V.DETAILS,m.DETAILS],[V.DIALOG,m.DIALOG],[V.DIR,m.DIR],[V.DIV,m.DIV],[V.DL,m.DL],[V.DT,m.DT],[V.EM,m.EM],[V.EMBED,m.EMBED],[V.FIELDSET,m.FIELDSET],[V.FIGCAPTION,m.FIGCAPTION],[V.FIGURE,m.FIGURE],[V.FONT,m.FONT],[V.FOOTER,m.FOOTER],[V.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[V.FORM,m.FORM],[V.FRAME,m.FRAME],[V.FRAMESET,m.FRAMESET],[V.H1,m.H1],[V.H2,m.H2],[V.H3,m.H3],[V.H4,m.H4],[V.H5,m.H5],[V.H6,m.H6],[V.HEAD,m.HEAD],[V.HEADER,m.HEADER],[V.HGROUP,m.HGROUP],[V.HR,m.HR],[V.HTML,m.HTML],[V.I,m.I],[V.IMG,m.IMG],[V.IMAGE,m.IMAGE],[V.INPUT,m.INPUT],[V.IFRAME,m.IFRAME],[V.KEYGEN,m.KEYGEN],[V.LABEL,m.LABEL],[V.LI,m.LI],[V.LINK,m.LINK],[V.LISTING,m.LISTING],[V.MAIN,m.MAIN],[V.MALIGNMARK,m.MALIGNMARK],[V.MARQUEE,m.MARQUEE],[V.MATH,m.MATH],[V.MENU,m.MENU],[V.META,m.META],[V.MGLYPH,m.MGLYPH],[V.MI,m.MI],[V.MO,m.MO],[V.MN,m.MN],[V.MS,m.MS],[V.MTEXT,m.MTEXT],[V.NAV,m.NAV],[V.NOBR,m.NOBR],[V.NOFRAMES,m.NOFRAMES],[V.NOEMBED,m.NOEMBED],[V.NOSCRIPT,m.NOSCRIPT],[V.OBJECT,m.OBJECT],[V.OL,m.OL],[V.OPTGROUP,m.OPTGROUP],[V.OPTION,m.OPTION],[V.P,m.P],[V.PARAM,m.PARAM],[V.PLAINTEXT,m.PLAINTEXT],[V.PRE,m.PRE],[V.RB,m.RB],[V.RP,m.RP],[V.RT,m.RT],[V.RTC,m.RTC],[V.RUBY,m.RUBY],[V.S,m.S],[V.SCRIPT,m.SCRIPT],[V.SEARCH,m.SEARCH],[V.SECTION,m.SECTION],[V.SELECT,m.SELECT],[V.SOURCE,m.SOURCE],[V.SMALL,m.SMALL],[V.SPAN,m.SPAN],[V.STRIKE,m.STRIKE],[V.STRONG,m.STRONG],[V.STYLE,m.STYLE],[V.SUB,m.SUB],[V.SUMMARY,m.SUMMARY],[V.SUP,m.SUP],[V.TABLE,m.TABLE],[V.TBODY,m.TBODY],[V.TEMPLATE,m.TEMPLATE],[V.TEXTAREA,m.TEXTAREA],[V.TFOOT,m.TFOOT],[V.TD,m.TD],[V.TH,m.TH],[V.THEAD,m.THEAD],[V.TITLE,m.TITLE],[V.TR,m.TR],[V.TRACK,m.TRACK],[V.TT,m.TT],[V.U,m.U],[V.UL,m.UL],[V.SVG,m.SVG],[V.VAR,m.VAR],[V.WBR,m.WBR],[V.XMP,m.XMP]]);function _o(e){var t;return(t=k3.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const de=m,N3={[le.HTML]:new Set([de.ADDRESS,de.APPLET,de.AREA,de.ARTICLE,de.ASIDE,de.BASE,de.BASEFONT,de.BGSOUND,de.BLOCKQUOTE,de.BODY,de.BR,de.BUTTON,de.CAPTION,de.CENTER,de.COL,de.COLGROUP,de.DD,de.DETAILS,de.DIR,de.DIV,de.DL,de.DT,de.EMBED,de.FIELDSET,de.FIGCAPTION,de.FIGURE,de.FOOTER,de.FORM,de.FRAME,de.FRAMESET,de.H1,de.H2,de.H3,de.H4,de.H5,de.H6,de.HEAD,de.HEADER,de.HGROUP,de.HR,de.HTML,de.IFRAME,de.IMG,de.INPUT,de.LI,de.LINK,de.LISTING,de.MAIN,de.MARQUEE,de.MENU,de.META,de.NAV,de.NOEMBED,de.NOFRAMES,de.NOSCRIPT,de.OBJECT,de.OL,de.P,de.PARAM,de.PLAINTEXT,de.PRE,de.SCRIPT,de.SECTION,de.SELECT,de.SOURCE,de.STYLE,de.SUMMARY,de.TABLE,de.TBODY,de.TD,de.TEMPLATE,de.TEXTAREA,de.TFOOT,de.TH,de.THEAD,de.TITLE,de.TR,de.TRACK,de.UL,de.WBR,de.XMP]),[le.MATHML]:new Set([de.MI,de.MO,de.MN,de.MS,de.MTEXT,de.ANNOTATION_XML]),[le.SVG]:new Set([de.TITLE,de.FOREIGN_OBJECT,de.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},hf=new Set([de.H1,de.H2,de.H3,de.H4,de.H5,de.H6]);V.STYLE,V.SCRIPT,V.XMP,V.IFRAME,V.NOEMBED,V.NOFRAMES,V.PLAINTEXT;var N;(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"})(N||(N={}));const xt={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function O3(e){return e>=C.DIGIT_0&&e<=C.DIGIT_9}function $s(e){return e>=C.LATIN_CAPITAL_A&&e<=C.LATIN_CAPITAL_Z}function I3(e){return e>=C.LATIN_SMALL_A&&e<=C.LATIN_SMALL_Z}function Wr(e){return I3(e)||$s(e)}function v1(e){return Wr(e)||O3(e)}function Hu(e){return e+32}function A1(e){return e===C.SPACE||e===C.LINE_FEED||e===C.TABULATION||e===C.FORM_FEED}function C1(e){return A1(e)||e===C.SOLIDUS||e===C.GREATER_THAN_SIGN}function R3(e){return e===C.NULL?J.nullCharacterReference:e>1114111?J.characterReferenceOutsideUnicodeRange:x1(e)?J.surrogateCharacterReference:S1(e)?J.noncharacterCharacterReference:w1(e)||e===C.CARRIAGE_RETURN?J.controlCharacterReference:null}class P3{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=N.DATA,this.returnState=N.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 A3(T3,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(J.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(J.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=R3(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:Ve.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ve.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ve.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ve.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(_1(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(J.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=_o(t.tagName),t.type===Ve.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(J.endTagWithAttributes),t.selfClosing&&this._err(J.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 Ve.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ve.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ve.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:Ve.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=A1(t)?Ve.WHITESPACE_CHARACTER:t===C.NULL?Ve.NULL_CHARACTER:Ve.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ve.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?vr.Attribute:vr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case N.DATA:{this._stateData(t);break}case N.RCDATA:{this._stateRcdata(t);break}case N.RAWTEXT:{this._stateRawtext(t);break}case N.SCRIPT_DATA:{this._stateScriptData(t);break}case N.PLAINTEXT:{this._statePlaintext(t);break}case N.TAG_OPEN:{this._stateTagOpen(t);break}case N.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case N.TAG_NAME:{this._stateTagName(t);break}case N.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case N.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case N.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case N.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case N.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case N.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case N.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case N.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case N.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case N.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case N.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case N.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case N.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case N.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case N.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case N.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case N.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case N.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case N.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case N.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case N.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case N.BOGUS_COMMENT:{this._stateBogusComment(t);break}case N.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case N.COMMENT_START:{this._stateCommentStart(t);break}case N.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case N.COMMENT:{this._stateComment(t);break}case N.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case N.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case N.COMMENT_END:{this._stateCommentEnd(t);break}case N.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case N.DOCTYPE:{this._stateDoctype(t);break}case N.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case N.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case N.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case N.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case N.CDATA_SECTION:{this._stateCdataSection(t);break}case N.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case N.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case N.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case N.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitCodePoint(t);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case C.AMPERSAND:{this._startCharacterReference();break}case C.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(ft);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case C.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(ft);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(ft);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(ft);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Wr(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case C.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case C.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case C.QUESTION_MARK:{this._err(J.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case C.EOF:{this._err(J.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Wr(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case C.GREATER_THAN_SIGN:{this._err(J.missingEndTagName),this.state=N.DATA;break}case C.EOF:{this._err(J.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.tagName+=ft;break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint($s(t)?Hu(t):t)}}_stateRcdataLessThanSign(t){t===C.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Wr(t)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=N.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case C.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case C.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===C.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Wr(t)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case C.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case C.EXCLAMATION_MARK:{this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Wr(t)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===C.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===C.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(ft);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===C.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Wr(t)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Wr(t)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&C1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(ft);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===C.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&C1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._err(J.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:{this._err(J.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.name+=ft;break}default:this.currentAttr.name+=String.fromCodePoint($s(t)?Hu(t):t)}}_stateAfterAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case C.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case C.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case C.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:case C.EQUALS_SIGN:case C.GRAVE_ACCENT:{this._err(J.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case C.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case C.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.data+=ft;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(fn.DASH_DASH,!0)?(this._createCommentToken(fn.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(fn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(fn.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(fn.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(J.cdataInHtmlContent),this._createCommentToken(fn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(J.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case C.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=N.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case C.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.data+=ft;break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case C.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case C.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===C.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===C.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==C.GREATER_THAN_SIGN&&t!==C.EOF&&this._err(J.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case C.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case C.HYPHEN_MINUS:{n.data+="-";break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case C.GREATER_THAN_SIGN:{this._err(J.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case C.EOF:{this._err(J.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if($s(t))this._createDoctypeToken(String.fromCharCode(Hu(t))),this.state=N.DOCTYPE_NAME;else switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.NULL:{this._err(J.unexpectedNullCharacter),this._createDoctypeToken(ft),this.state=N.DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.EOF:{this._err(J.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=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.name+=ft;break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint($s(t)?Hu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(fn.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(fn.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(J.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=ft;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.EOF:{this._err(J.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 C.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=ft;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.EOF:{this._err(J.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case C.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.QUOTATION_MARK:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=ft;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.EOF:{this._err(J.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 C.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=ft;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.EOF:{this._err(J.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case C.NULL:{this._err(J.unexpectedNullCharacter);break}case C.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case C.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case C.EOF:{this._err(J.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===C.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case C.GREATER_THAN_SIGN:{this.state=N.DATA;break}case C.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=N.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(C.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&v1(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){v1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===C.SEMICOLON&&this._err(J.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const k1=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),N1=new Set([...k1,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),zu=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),L3=new Set([...zu,m.OL,m.UL]),D3=new Set([...zu,m.BUTTON]),O1=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),I1=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),M3=new Set([m.TR,m.TEMPLATE,m.HTML]),F3=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),B3=new Set([m.TABLE,m.TEMPLATE,m.HTML]),U3=new Set([m.TD,m.TH]);class H3{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=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===le.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])!==le.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(hf,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(U3,le.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(B3,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(F3,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(M3,le.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]===m.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]===m.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 le.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case le.SVG:{if(I1.has(o))return!1;break}case le.MATHML:{if(O1.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,zu)}hasInListItemScope(t){return this.hasInDynamicScope(t,L3)}hasInButtonScope(t){return this.hasInDynamicScope(t,D3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(hf.has(n))return!0;if(zu.has(n))return!1;break}case le.SVG:{if(I1.has(n))return!1;break}case le.MATHML:{if(O1.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===le.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&k1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&N1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&N1.has(this.currentTagId);)this.pop()}}const pf=3;var lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(lr||(lr={}));const R1={type:lr.Marker};class z3{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===lr.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===a&&this.treeAdapter.getNamespaceURI(h)===u){const p=this.treeAdapter.getAttrList(h);p.length===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<pf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<pf)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>=pf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(R1)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:lr.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(R1);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===lr.Element&&n.element===t)}}const Gr={createDocument(){return{nodeName:"#document",mode:Ln.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};Gr.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(Gr.isTextNode(n)){n.value+=t;return}}Gr.appendChild(e,Gr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Gr.isTextNode(r)?r.value+=t:Gr.insertBefore(e,Gr.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=U(U({},e.sourceCodeLocation),t)}},P1="html",j3="about:legacy-compat",$3="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",L1=["+//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//"],V3=[...L1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],q3=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),D1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Y3=[...D1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function M1(e,t){return t.some(n=>e.startsWith(n))}function W3(e){return e.name===P1&&e.publicId===null&&(e.systemId===null||e.systemId===j3)}function G3(e){if(e.name!==P1)return Ln.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===$3)return Ln.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),q3.has(n))return Ln.QUIRKS;let r=t===null?V3:L1;if(M1(n,r))return Ln.QUIRKS;if(r=t===null?D1:Y3,M1(n,r))return Ln.LIMITED_QUIRKS}return Ln.NO_QUIRKS}const F1={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},K3="definitionurl",X3="definitionURL",Q3=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])),J3=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),Z3=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])),eO=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function tO(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===Li.COLOR||r===Li.SIZE||r===Li.FACE)||eO.has(t)}function B1(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===K3){e.attrs[t].name=X3;break}}function U1(e){for(let t=0;t<e.attrs.length;t++){const n=Q3.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function mf(e){for(let t=0;t<e.attrs.length;t++){const n=J3.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 nO(e){const t=Z3.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=_o(e.tagName))}function rO(e,t){return t===le.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function iO(e,t,n){if(t===le.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Li.ENCODING){const o=n[r].value.toLowerCase();return o===F1.TEXT_HTML||o===F1.APPLICATION_XML}}return t===le.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function oO(e,t,n,r){return(!r||r===le.HTML)&&iO(e,t,n)||(!r||r===le.MATHML)&&rO(e,t)}const sO="hidden",aO=8,uO=3;var L;(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"})(L||(L={}));const lO={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},H1=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),z1={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Gr,onParseError:null};class j1{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.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=U(U({},z1),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 P3(this.options,this),this.activeFormattingElements=new z3(this.treeAdapter),this.fragmentContextID=r?_o(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new H3(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=U(U({},z1),n);t!=null||(t=r.treeAdapter.createElement(V.TEMPLATE,le.HTML,[]));const o=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(L.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:lO,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)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=xt.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)===V.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==le.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=xt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=xt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=xt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=xt.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&&se(U({},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,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.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(V.HTML,le.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.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:h,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:h,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===Ve.END_TAG&&o===n.tagName?{endTag:U({},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===m.SVG&&this.treeAdapter.getTagName(n)===V.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case Ve.CHARACTER:{this.onCharacter(t);break}case Ve.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ve.COMMENT:{this.onComment(t);break}case Ve.DOCTYPE:{this.onDoctype(t);break}case Ve.START_TAG:{this._processStartTag(t);break}case Ve.END_TAG:{this.onEndTag(t);break}case Ve.EOF:{this.onEof(t);break}case Ve.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return oO(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===lr.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=L.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=L.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=L.IN_TABLE;return}case m.BODY:{this.insertionMode=L.IN_BODY;return}case m.FRAMESET:{this.insertionMode=L.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?L.AFTER_HEAD:L.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return H1.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 m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.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 N3[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){UI(this,t);return}switch(this.insertionMode){case L.INITIAL:{Vs(this,t);break}case L.BEFORE_HTML:{qs(this,t);break}case L.BEFORE_HEAD:{Ys(this,t);break}case L.IN_HEAD:{Ws(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Gs(this,t);break}case L.AFTER_HEAD:{Ks(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{V1(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Tf(this,t);break}case L.IN_TABLE_TEXT:{J1(this,t);break}case L.IN_COLUMN_GROUP:{Vu(this,t);break}case L.AFTER_BODY:{Wu(this,t);break}case L.AFTER_AFTER_BODY:{Gu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){BI(this,t);return}switch(this.insertionMode){case L.INITIAL:{Vs(this,t);break}case L.BEFORE_HTML:{qs(this,t);break}case L.BEFORE_HEAD:{Ys(this,t);break}case L.IN_HEAD:{Ws(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Gs(this,t);break}case L.AFTER_HEAD:{Ks(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Tf(this,t);break}case L.IN_COLUMN_GROUP:{Vu(this,t);break}case L.AFTER_BODY:{Wu(this,t);break}case L.AFTER_AFTER_BODY:{Gu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ef(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{Ef(this,t);break}case L.IN_TABLE_TEXT:{Js(this,t);break}case L.AFTER_BODY:{gO(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{EO(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{yO(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,J.misplacedDoctype);break}case L.IN_TABLE_TEXT:{Js(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,J.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?HI(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Vs(this,t);break}case L.BEFORE_HTML:{TO(this,t);break}case L.BEFORE_HEAD:{xO(this,t);break}case L.IN_HEAD:{Wn(this,t);break}case L.IN_HEAD_NO_SCRIPT:{_O(this,t);break}case L.AFTER_HEAD:{AO(this,t);break}case L.IN_BODY:{Gt(this,t);break}case L.IN_TABLE:{vo(this,t);break}case L.IN_TABLE_TEXT:{Js(this,t);break}case L.IN_CAPTION:{wI(this,t);break}case L.IN_COLUMN_GROUP:{bf(this,t);break}case L.IN_TABLE_BODY:{qu(this,t);break}case L.IN_ROW:{Yu(this,t);break}case L.IN_CELL:{vI(this,t);break}case L.IN_SELECT:{tE(this,t);break}case L.IN_SELECT_IN_TABLE:{CI(this,t);break}case L.IN_TEMPLATE:{NI(this,t);break}case L.AFTER_BODY:{II(this,t);break}case L.IN_FRAMESET:{RI(this,t);break}case L.AFTER_FRAMESET:{LI(this,t);break}case L.AFTER_AFTER_BODY:{MI(this,t);break}case L.AFTER_AFTER_FRAMESET:{FI(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?zI(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Vs(this,t);break}case L.BEFORE_HTML:{bO(this,t);break}case L.BEFORE_HEAD:{wO(this,t);break}case L.IN_HEAD:{SO(this,t);break}case L.IN_HEAD_NO_SCRIPT:{vO(this,t);break}case L.AFTER_HEAD:{CO(this,t);break}case L.IN_BODY:{$u(this,t);break}case L.TEXT:{fI(this,t);break}case L.IN_TABLE:{Xs(this,t);break}case L.IN_TABLE_TEXT:{Js(this,t);break}case L.IN_CAPTION:{SI(this,t);break}case L.IN_COLUMN_GROUP:{_I(this,t);break}case L.IN_TABLE_BODY:{xf(this,t);break}case L.IN_ROW:{eE(this,t);break}case L.IN_CELL:{AI(this,t);break}case L.IN_SELECT:{nE(this,t);break}case L.IN_SELECT_IN_TABLE:{kI(this,t);break}case L.IN_TEMPLATE:{OI(this,t);break}case L.AFTER_BODY:{iE(this,t);break}case L.IN_FRAMESET:{PI(this,t);break}case L.AFTER_FRAMESET:{DI(this,t);break}case L.AFTER_AFTER_BODY:{Gu(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{Vs(this,t);break}case L.BEFORE_HTML:{qs(this,t);break}case L.BEFORE_HEAD:{Ys(this,t);break}case L.IN_HEAD:{Ws(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Gs(this,t);break}case L.AFTER_HEAD:{Ks(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{X1(this,t);break}case L.TEXT:{hI(this,t);break}case L.IN_TABLE_TEXT:{Js(this,t);break}case L.IN_TEMPLATE:{rE(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{yf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===C.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 L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{$1(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Tf(this,t);break}case L.IN_TABLE_TEXT:{Q1(this,t);break}}}}function cO(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):K1(e,t),n}function dO(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 fO(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>=uO;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=hO(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function hO(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 pO(e,t,n){const r=e.treeAdapter.getTagName(t),o=_o(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function mO(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 gf(e,t){for(let n=0;n<aO;n++){const r=cO(e,t);if(!r)break;const o=dO(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=fO(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&pO(e,u,a),mO(e,o,r)}}function Ef(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function gO(e,t){e._appendCommentNode(t,e.openElements.items[0])}function EO(e,t){e._appendCommentNode(t,e.document)}function yf(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 yO(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ln.QUIRKS:G3(t);W3(t)||e._err(t,J.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function Vs(e,t){e._err(t,J.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ln.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function TO(e,t){t.tagID===m.HTML?(e._insertElement(t,le.HTML),e.insertionMode=L.BEFORE_HEAD):qs(e,t)}function bO(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&qs(e,t)}function qs(e,t){e._insertFakeRootElement(),e.insertionMode=L.BEFORE_HEAD,e._processToken(t)}function xO(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Ys(e,t)}}function wO(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Ys(e,t):e._err(t,J.endTagWithoutMatchingOpenElement)}function Ys(e,t){e._insertFakeElement(V.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function Wn(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,xt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,xt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=L.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,xt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,xt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case m.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:Ws(e,t)}}function SO(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Ws(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function Di(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,J.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,J.endTagWithoutMatchingOpenElement)}function Ws(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function _O(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{Wn(e,t);break}case m.NOSCRIPT:{e._err(t,J.nestedNoscriptInHead);break}default:Gs(e,t)}}function vO(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case m.BR:{Gs(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function Gs(e,t){const n=t.type===Ve.EOF?J.openElementsLeftAfterEof:J.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function AO(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=L.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,J.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),Wn(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:Ks(e,t)}}function CO(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Ks(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function Ks(e,t){e._insertFakeElement(V.BODY,m.BODY),e.insertionMode=L.IN_BODY,ju(e,t)}function ju(e,t){switch(t.type){case Ve.CHARACTER:{V1(e,t);break}case Ve.WHITESPACE_CHARACTER:{$1(e,t);break}case Ve.COMMENT:{Ef(e,t);break}case Ve.START_TAG:{Gt(e,t);break}case Ve.END_TAG:{$u(e,t);break}case Ve.EOF:{X1(e,t);break}}}function $1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function V1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function kO(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function NO(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function OO(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=L.IN_FRAMESET)}function IO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function RO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&hf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function PO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function LO(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function DO(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===m.LI&&o===m.LI||(n===m.DD||n===m.DT)&&(o===m.DD||o===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function MO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=xt.PLAINTEXT}function FO(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function BO(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(V.A);n&&(gf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function UO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function HO(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(gf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function jO(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ln.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function q1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Y1(e){const t=_1(e,Li.TYPE);return t!=null&&t.toLowerCase()===sO}function $O(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),Y1(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function VO(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function qO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function YO(e,t){t.tagName=V.IMG,t.tagID=m.IMG,q1(e,t)}function WO(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=xt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function GO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,xt.RAWTEXT)}function KO(e,t){e.framesetOk=!1,e._switchToTextParsing(t,xt.RAWTEXT)}function W1(e,t){e._switchToTextParsing(t,xt.RAWTEXT)}function XO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function QO(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function JO(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function ZO(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,le.HTML)}function eI(e,t){e._reconstructActiveFormattingElements(),B1(t),mf(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function tI(e,t){e._reconstructActiveFormattingElements(),U1(t),mf(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function G1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function Gt(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{UO(e,t);break}case m.A:{BO(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{RO(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{IO(e,t);break}case m.LI:case m.DD:case m.DT:{DO(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{q1(e,t);break}case m.HR:{qO(e,t);break}case m.RB:case m.RTC:{JO(e,t);break}case m.RT:case m.RP:{ZO(e,t);break}case m.PRE:case m.LISTING:{PO(e,t);break}case m.XMP:{GO(e,t);break}case m.SVG:{tI(e,t);break}case m.HTML:{kO(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{Wn(e,t);break}case m.BODY:{NO(e,t);break}case m.FORM:{LO(e,t);break}case m.NOBR:{HO(e,t);break}case m.MATH:{eI(e,t);break}case m.TABLE:{jO(e,t);break}case m.INPUT:{$O(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{VO(e,t);break}case m.IMAGE:{YO(e,t);break}case m.BUTTON:{FO(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{zO(e,t);break}case m.IFRAME:{KO(e,t);break}case m.SELECT:{XO(e,t);break}case m.OPTION:case m.OPTGROUP:{QO(e,t);break}case m.NOEMBED:case m.NOFRAMES:{W1(e,t);break}case m.FRAMESET:{OO(e,t);break}case m.TEXTAREA:{WO(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?W1(e,t):G1(e,t);break}case m.PLAINTEXT:{MO(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:G1(e,t)}}function nI(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function rI(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,iE(e,t))}function iI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function oI(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function sI(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(V.P,m.P),e._closePElement()}function aI(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function uI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function lI(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function cI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function dI(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(V.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function K1(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!==m.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 $u(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{gf(e,t);break}case m.P:{sI(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{iI(e,t);break}case m.LI:{aI(e);break}case m.DD:case m.DT:{uI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{lI(e);break}case m.BR:{dI(e);break}case m.BODY:{nI(e,t);break}case m.HTML:{rI(e,t);break}case m.FORM:{oI(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{cI(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:K1(e,t)}}function X1(e,t){e.tmplInsertionModeStack.length>0?rE(e,t):yf(e,t)}function fI(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function hI(e,t){e._err(t,J.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Tf(e,t){if(e.openElements.currentTagId!==void 0&&H1.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case Ve.CHARACTER:{J1(e,t);break}case Ve.WHITESPACE_CHARACTER:{Q1(e,t);break}}else Qs(e,t)}function pI(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=L.IN_CAPTION}function mI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function gI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.COLGROUP,m.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,bf(e,t)}function EI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=L.IN_TABLE_BODY}function yI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.TBODY,m.TBODY),e.insertionMode=L.IN_TABLE_BODY,qu(e,t)}function TI(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function bI(e,t){Y1(t)?e._appendElement(t,le.HTML):Qs(e,t),t.ackSelfClosing=!0}function xI(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function vo(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{yI(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{Wn(e,t);break}case m.COL:{gI(e,t);break}case m.FORM:{xI(e,t);break}case m.TABLE:{TI(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{EI(e,t);break}case m.INPUT:{bI(e,t);break}case m.CAPTION:{pI(e,t);break}case m.COLGROUP:{mI(e,t);break}default:Qs(e,t)}}function Xs(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{Di(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Qs(e,t)}}function Qs(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ju(e,t),e.fosterParentingEnabled=n}function Q1(e,t){e.pendingCharacterTokens.push(t)}function J1(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Js(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Qs(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Z1=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function wI(e,t){const n=t.tagID;Z1.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,vo(e,t)):Gt(e,t)}function SI(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,n===m.TABLE&&Xs(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:$u(e,t)}}function bf(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{Wn(e,t);break}default:Vu(e,t)}}function _I(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case m.TEMPLATE:{Di(e,t);break}case m.COL:break;default:Vu(e,t)}}function Vu(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function qu(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=L.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(V.TR,m.TR),e.insertionMode=L.IN_ROW,Yu(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,vo(e,t));break}default:vo(e,t)}}function xf(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Xs(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:Xs(e,t)}}function Yu(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=L.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,qu(e,t));break}default:vo(e,t)}}function eE(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,xf(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,xf(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:Xs(e,t)}}function vI(e,t){const n=t.tagID;Z1.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),Yu(e,t)):Gt(e,t)}function AI(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),eE(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:$u(e,t)}}function tE(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{Wn(e,t);break}}}function nE(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{Di(e,t);break}}}function CI(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):tE(e,t)}function kI(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):nE(e,t)}function NI(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{Wn(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,vo(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,bf(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,qu(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,Yu(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,Gt(e,t)}}function OI(e,t){t.tagID===m.TEMPLATE&&Di(e,t)}function rE(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):yf(e,t)}function II(e,t){t.tagID===m.HTML?Gt(e,t):Wu(e,t)}function iE(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=L.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.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 Wu(e,t)}function Wu(e,t){e.insertionMode=L.IN_BODY,ju(e,t)}function RI(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.FRAMESET:{e._insertElement(t,le.HTML);break}case m.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{Wn(e,t);break}}}function PI(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function LI(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.NOFRAMES:{Wn(e,t);break}}}function DI(e,t){t.tagID===m.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function MI(e,t){t.tagID===m.HTML?Gt(e,t):Gu(e,t)}function Gu(e,t){e.insertionMode=L.IN_BODY,ju(e,t)}function FI(e,t){switch(t.tagID){case m.HTML:{Gt(e,t);break}case m.NOFRAMES:{Wn(e,t);break}}}function BI(e,t){t.chars=ft,e._insertCharacters(t)}function UI(e,t){e._insertCharacters(t),e.framesetOk=!1}function oE(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function HI(e,t){if(tO(t))oE(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?B1(t):r===le.SVG&&(nO(t),U1(t)),mf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function zI(e,t){if(t.tagID===m.P||t.tagID===m.BR){oE(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)===le.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}V.AREA,V.BASE,V.BASEFONT,V.BGSOUND,V.BR,V.COL,V.EMBED,V.FRAME,V.HR,V.IMG,V.INPUT,V.KEYGEN,V.LINK,V.META,V.PARAM,V.SOURCE,V.TRACK,V.WBR;const jI=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,$I=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),sE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function aE(e,t){const n=ZI(e),r=T1("type",{handlers:{root:VI,element:qI,text:YI,comment:lE,doctype:WI,raw:KI},unknown:XI}),o={parser:n?new j1(sE):j1.getFragmentParser(void 0,sE),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Ao(o,ar());const a=n?o.parser.document:o.parser.getFragment(),u=VN(a,{file:o.options.file});return o.stitches&&Fu(u,"comment",function(c,d,h){const p=c;if(p.value.stitch&&h&&d!==void 0){const E=h.children;return E[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function uE(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function VI(e,t){uE(e.children,t)}function qI(e,t){QI(e,t),uE(e.children,t),JI(e,t)}function YI(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ve.CHARACTER,chars:e.value,location:Zs(e)};Ao(t,ar(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function WI(e,t){const n={type:Ve.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Zs(e)};Ao(t,ar(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function GI(e,t){t.stitches=!0;const n=eR(e);if("children"in e&&"children"in n){const r=aE({type:"root",children:e.children},t.options);n.children=r.children}lE({type:"comment",value:{stitch:n}},t)}function lE(e,t){const n=e.value,r={type:Ve.COMMENT,data:n,location:Zs(e)};Ao(t,ar(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function KI(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,cE(t,ar(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(jI,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function XI(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))GI(n,t);else{let r="";throw $I.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 Ao(e,t){cE(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=xt.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 cE(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 QI(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===xt.PLAINTEXT)return;Ao(t,ar(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Ri.html;o===Ri.html&&n==="svg"&&(o=Ri.svg);const a=o3(se(U({},e),{children:[]}),{space:o===Ri.svg?"svg":"html"}),u={type:Ve.START_TAG,tagName:n,tagID:_o(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Zs(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function JI(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&h3.includes(n)||t.parser.tokenizer.state===xt.PLAINTEXT)return;Ao(t,Au(e));const r={type:Ve.END_TAG,tagName:n,tagID:_o(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Zs(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===xt.RCDATA||t.parser.tokenizer.state===xt.RAWTEXT||t.parser.tokenizer.state===xt.SCRIPT_DATA)&&(t.parser.tokenizer.state=xt.DATA)}function ZI(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Zs(e){const t=ar(e)||{line:void 0,column:void 0,offset:void 0},n=Au(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 eR(e){return"children"in e?Ii(se(U({},e),{children:[]})):Ii(e)}function dE(e){return function(t,n){return aE(t,se(U({},e),{file:n}))}}const Mi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],fE={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Mi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Mi],h2:[["className","sr-only"]],img:[...Mi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Mi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Mi],table:[...Mi],ul:[...Mi,["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"]},Kr={}.hasOwnProperty;function tR(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},fE),t):fE,stack:[]},o=hE(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function hE(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return nR(e,n);case"doctype":return rR(e,n);case"element":return iR(e,n);case"root":return oR(e,n);case"text":return sR(e,n)}}}function nR(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 ea(a,t),a}}function rR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ea(n,t),n}}function iR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=pE(e,t.children),o=aR(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&&Kr.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 ea(u,t),u}function oR(e,t){const r={type:"root",children:pE(e,t.children)};return ea(r,t),r}function sR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ea(r,t),r}function pE(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=hE(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function aR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Kr.call(r,n)?r[n]:void 0,u=r&&Kr.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(Kr.call(c,h)){const p=c[h];let E=mE(e,EE(a,h),h,p);E==null&&(E=mE(e,EE(u,h),h,p)),E!=null&&(d[h]=E)}if(o&&Kr.call(o,n)){const p=o[n];for(h in p)Kr.call(p,h)&&!Kr.call(d,h)&&(d[h]=p[h])}return d}function mE(e,t,n,r){return t?Array.isArray(r)?uR(e,t,n,r):gE(e,t,n,r):void 0}function uR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=gE(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function gE(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&lR(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 lR(e,t,n){const r=e.schema.protocols&&Kr.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 h=-1;for(;++h<r.length;){const p=r[h];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function ea(e,t){const n=J0(t);t.data&&(e.data=Ii(t.data)),n&&(e.position=n)}function EE(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 cR(e){return function(t){return tR(t,e)}}const yE=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return P.jsx("a",se(U(U({className:ae(e,`${ee}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},dR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=kt();return!e&&!t?null:P.jsx("div",{className:ae(n,`${ee}-disclaimer`),children:t?P.jsx(Zg,{rehypePlugins:[dE,cR],components:{ul:({children:r})=>P.jsx("ul",{className:ae(n,`${ee}-ul`),children:r}),ol:({children:r})=>P.jsx("ol",{className:ae(n,`${ee}-ol`),children:r}),li:({children:r})=>P.jsx("li",{className:ae(n,`${ee}-li`),children:r}),a:({href:r,title:o,children:a})=>P.jsx(yE,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>P.jsx("img",{className:ae(n,`${ee}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>P.jsx("p",{className:ae(n,`${ee}-disclaimer-text`),children:r}),span:({children:r})=>P.jsx("span",{className:ae(n,`${ee}-disclaimer-text-span`),children:r})},children:t}):P.jsx("p",{className:ae(n,`${ee}-disclaimer-text`),children:e})})},wf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:o}=ki(),{globalClassName:a,searchConfig:u}=kt(),c=Q.useRef(null),d=t||!o,h=E=>{var y;E.preventDefault();const b=(((y=c.current)==null?void 0:y.value)||"").trim();b&&(c.current.value="",r(b))},p=()=>{r("Can you connect me to a human?")};return P.jsxs("div",{className:ae(a,e,`cim-${n}-component`,`${ee}-search-bar-wrapper`),children:[P.jsxs("form",{className:ae(a,e,`cim-${n}-component`,`${ee}-search-bar`),name:`${ee}-search-form`,onSubmit:h,children:[P.jsx("input",{className:ae(a,e,`cim-${n}-component`,`${ee}-search-input`),type:"text",ref:c,placeholder:(u==null?void 0:u.placeholder)||"Ask us anything",name:`${ee}-user-input`,disabled:d}),P.jsx(Pv,{className:e,globalClassName:a,searchConfig:u,componentType:n,isLoading:d}),P.jsx($r,{className:ae(a,`${ee}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:d,onClick:p,icon:P.jsx(Cv,{})})]}),P.jsx(dR,{})]})};function fR(e){return tn({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 TE=Q.createContext({isOpen:!1}),Sf=Q.createContext(null),bE=Q.createContext(null),ta=()=>{var n,r;const e=Q.useContext(Sf),t=Q.useContext(bE);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},xE=({onClearChat:e,componentType:t})=>{const n=ta(),r=()=>{e(),n()};return P.jsxs("button",{className:ae(`${ee}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[P.jsx(fR,{}),"Clear chat"]})};function hR(e){return e==null?[]:Array.isArray(e)?e:[e]}var pR=(e,...t)=>e.concat(t),mR=(e,...t)=>e.filter(n=>!t.includes(n)),gR=e=>Array.from(new Set(e));function wE(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 ER(e,t,n={}){const{step:r=1,loop:o=!0}=n;return wE(e,t,{step:-r,loop:o})}var yR=e=>Array.isArray(e),SE=e=>e!=null&&typeof e=="object",TR=e=>SE(e)&&!yR(e),Ku=e=>typeof e=="string",Co=e=>typeof e=="function",bR=e=>e==null,xR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),wR=e=>Object.prototype.toString.call(e),_E=Function.prototype.toString,SR=_E.call(Object),_R=e=>{if(!SE(e)||wR(e)!="[object Object]"||CR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=xR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&_E.call(n)==SR},vR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,AR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,CR=e=>vR(e)||AR(e),kR=e=>e(),NR=()=>{},_f=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function OR(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:IR,max:RR}=Math,PR=e=>Number.isNaN(e),LR=e=>PR(e)?0:e,vE=(e,t,n)=>IR(RR(LR(e),t),n);function vf(e){if(!_R(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]=vf(o))}return n}function Af(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function DR(e,t){if(e==null)throw new Error(t())}function MR(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 FR=Object.defineProperty,BR=(e,t,n)=>t in e?FR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cf=(e,t,n)=>BR(e,typeof t!="symbol"?t+"":t,n),AE=()=>{},Xu=e=>typeof e=="object"&&e!==null,ko=e=>e?"":void 0,CE=e=>e?"true":void 0,UR=1,HR=9,zR=11,Mt=e=>Xu(e)&&e.nodeType===UR&&typeof e.nodeName=="string",Qu=e=>Xu(e)&&e.nodeType===HR,jR=e=>Xu(e)&&e===e.window,kE=e=>Mt(e)?e.localName||"":"#document";function $R(e){return["html","body","#document"].includes(kE(e))}var VR=e=>Xu(e)&&e.nodeType!==void 0,Fi=e=>VR(e)&&e.nodeType===zR&&"host"in e,qR=e=>Mt(e)&&e.localName==="input",YR=e=>Mt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function na(e){if(!e)return!1;const t=e.getRootNode();return Io(t)===e}var WR=/(textarea|select)/;function GR(e){if(e==null||!Mt(e))return!1;try{return qR(e)&&e.selectionStart!=null||WR.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function No(e,t){var r;if(!e||!t||!Mt(e)||!Mt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Fi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function cr(e){var t;return Qu(e)?e:jR(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function KR(e){return cr(e).documentElement}function Oo(e){var t,n,r;return Fi(e)?Oo(e.host):Qu(e)?(t=e.defaultView)!=null?t:window:Mt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Io(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 XR(e){if(kE(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fi(e)&&e.host||KR(e);return Fi(t)?t.host:t}function kf(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Qu(t)||Fi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Nf=new WeakMap;function Ro(e){return Nf.has(e)||Nf.set(e,Oo(e).getComputedStyle(e)),Nf.get(e)}var Of=new Set(["menu","listbox","dialog","grid","tree","region"]),QR=e=>Of.has(e),NE=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function OE(e,t){const n=new Set,r=kf(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=NE(c);for(const h of d){if(!h||n.has(h))continue;n.add(h);const p=r.getElementById(h);if(p){const E=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(E&&QR(E)&&!b&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function IE(e,t){const n=kf(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=NE(c);for(const h of d){if(!h||r.has(h))continue;r.add(h);const p=n.getElementById(h);if(p){const E=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";E&&Of.has(E)&&!b&&(t(p),o(p))}}}};o(e)}function JR(e){const t=new Set;return IE(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function ZR(e){const t=e.getAttribute("role");return!!(t&&Of.has(t))}function eP(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function tP(e){var t;return eP(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function nP(e){if(!e.id)return!1;const t=kf(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&ZR(e))}var If=()=>typeof document!="undefined";function rP(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Rf=e=>If()&&e.test(rP()),iP=e=>If()&&e.test(navigator.vendor),RE=()=>If()&&!!navigator.maxTouchPoints,oP=()=>Rf(/^iPhone/i),sP=()=>Rf(/^iPad/i)||Pf()&&navigator.maxTouchPoints>1,Ju=()=>oP()||sP(),aP=()=>Pf()||Ju(),Pf=()=>Rf(/^Mac/i),uP=()=>aP()&&iP(/apple/i);function lP(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 Gn(e){var n;const t=lP(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var PE=e=>e.button===0,cP=e=>e.button===2||Pf()&&e.ctrlKey&&e.button===0,dP=e=>"touches"in e&&e.touches.length>0,fP={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},LE={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function hP(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=fP[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in LE&&(o=LE[o]),o}function DE(e,t="client"){const n=dP(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Ft=(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)}},ME=e=>Mt(e)&&e.tagName==="IFRAME",pP=/^(audio|video|details)$/;function FE(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var mP=e=>!Number.isNaN(FE(e)),gP=e=>FE(e)<0;function EP(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 BE(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,h)=>u.set(d,h));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const h=EP(d,t);if(h){const p=Array.from(h.querySelectorAll(Zu)).filter(n),E=u.get(d);if(E!==void 0){const b=E+1;r.splice(b,0,...p),p.forEach((y,x)=>{u.set(y,b+x)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,b+x)})}o.push(...p)}}return r}var Zu="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",UE=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Zu));(n==!0||n=="if-empty"&&o.length===0)&&Mt(e)&&dr(e)&&o.unshift(e);const u=[];for(const c of o)if(dr(c)){if(ME(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...UE(d,{getShadowRoot:r}));continue}u.push(c)}return r?BE(u,r,dr):u};function dr(e){return!Mt(e)||e.closest("[inert]")?!1:e.matches(Zu)&&YR(e)}function Po(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Zu));n&&Bi(e)&&o.unshift(e);const a=[];for(const u of o)if(Bi(u)){if(ME(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Po(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=BE(a,r,Bi);return!u.length&&n?o:u}return!a.length&&n?o:a}function Bi(e){return Mt(e)&&e.tabIndex>0?!0:dr(e)&&!gP(e)}function yP(e,t={}){const n=Po(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function TP(e,t={}){const{current:n,getShadowRoot:r}=t,o=Po(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Io(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function ra(e){return e.tabIndex<0&&(pP.test(e.localName)||GR(e))&&!mP(e)?0:e.tabIndex}function HE(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=Po(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var bP=class Vx{constructor(){Cf(this,"id",null),Cf(this,"fn_cleanup"),Cf(this,"cleanup",()=>{this.cancel()})}static create(){return new Vx}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 Nt(e){const t=bP.create();return t.request(e),t.cleanup}function zE(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 Lf(e){const t=XR(e);return $R(t)?cr(t).body:Mt(t)&&SP(t)?t:Lf(t)}var xP=/auto|scroll|overlay|hidden|clip/,wP=new Set(["inline","contents"]);function SP(e){const t=Oo(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return xP.test(n+o+r)&&!wP.has(a)}var Lo="default",Df="",el=new WeakMap;function _P(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Ju()?(Lo==="default"&&(Df=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Lo="disabled"):t&&(el.set(t,t.style.userSelect),t.style.userSelect="none"),()=>vP({target:t,doc:r})}function vP(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Ju()){if(Lo!=="disabled")return;Lo="restoring",setTimeout(()=>{zE(()=>{Lo==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Df||""),Df="",Lo="default")})},300)}else if(t&&el.has(t)){const a=el.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),el.delete(t)}}function AP(e={}){const u=e,{defer:t,target:n}=u,r=sn(u,["defer","target"]),o=t?Nt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(_P(se(U({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function CP(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=DE(c),h=Math.sqrt(Za(d.x,2)+Za(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(h<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=DE(c);r({point:d,event:c})},u=[Ft(e,"pointermove",o,!1),Ft(e,"pointerup",a,!1),Ft(e,"pointercancel",a,!1),Ft(e,"contextmenu",a,!1),AP({doc:e})];return()=>{u.forEach(c=>c())}}function kP(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(h){if(h.key!=="Tab")return;let p=null;const[E,b]=yP(e,{includeContainer:!0,getShadowRoot:a}),y=TP(c,{current:n,getShadowRoot:a}),x=!E&&!b;h.shiftKey&&na(y)?(o==null||o(),p=b):h.shiftKey&&(na(E)||x)?p=n:!h.shiftKey&&na(n)?(o==null||o(),p=E):!h.shiftKey&&(na(b)||x)&&(p=y),p&&(h.preventDefault(),typeof r=="function"?r(p):p.focus())}return Ft(u,"keydown",d,!0)}function NP(e,t){const c=t,{defer:n,triggerElement:r}=c,o=sn(c,["defer","triggerElement"]),a=n?Nt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(kP(d,U({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function OP(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function tl(e,t){if(!e)return AE;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 IP(e,t,n){if(!e)return AE;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 RP(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(h=>{r.aborted||(clearTimeout(d),u(h))}).catch(h=>{r.aborted||(clearTimeout(d),c(h))})}),()=>t.abort()]}function PP(e,t){const{timeout:n,rootNode:r}=t,o=Oo(r),a=cr(r),u=new o.AbortController;return RP(new Promise(c=>{const d=e();if(d){c(d);return}const h=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(h.disconnect(),c(p))});h.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var LP=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),DP=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,jE=e=>{const t={};let n;for(;n=DP.exec(e);)t[n[1]]=n[2];return t},MP=(e,t)=>{if(Ku(e)){if(Ku(t))return`${e};${t}`;e=jE(e)}else Ku(t)&&(t=jE(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Ot(...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]=_f(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=LP(t[o],n[o]);continue}if(o==="style"){t[o]=MP(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 KF(e){return e}var Do=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Do||{}),Mf="__init__";function FP(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>cr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Io(t()),a=u=>t().getElementById(u);return se(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:na,getById:a})}function BP(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Mo=()=>e=>Array.from(new Set(e)),$E=typeof globalThis.document!="undefined"?Q.useLayoutEffect:Q.useEffect;function nl(e){var E,b;const t=(E=e().value)!=null?E:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=Q.useState(t),[o,a]=Q.useState(r),u=e().value!==void 0,c=Q.useRef(o);c.current=u?e().value:o;const d=Q.useRef(c.current);$E(()=>{d.current=c.current},[o,e().value]);const h=y=>{var _,A;const x=d.current,S=Co(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:x}),u||a(S),n(S,x)||(A=(_=e()).onChange)==null||A.call(_,S,x)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Ns.flushSync:kR)(()=>h(y))},invoke(y,x){var S,_;(_=(S=e()).onChange)==null||_.call(S,y,x)},hash(y){var x,S,_;return(_=(S=(x=e()).hash)==null?void 0:S.call(x,y))!=null?_:String(y)}}}nl.cleanup=e=>{Q.useEffect(()=>e,[])},nl.ref=e=>{const t=Q.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function UP(e){const t=Q.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var HP=(e,t)=>{const n=Q.useRef(!1),r=Q.useRef(!1);Q.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),Q.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function rl(e,t={}){var te,X,ne,ie,Te,Ie;const n=Q.useMemo(()=>{const{id:fe,ids:W,getRootNode:oe}=t;return FP({id:fe,ids:W,getRootNode:oe})},[t]),r=(...fe)=>{e.debug&&console.log(...fe)},o=(X=(te=e.props)==null?void 0:te.call(e,{props:vf(t),scope:n}))!=null?X:t,a=zP(o),u=(ne=e.context)==null?void 0:ne.call(e,{prop:a,bindable:nl,scope:n,flush:qE,getContext(){return d},getComputed(){return Y},getRefs(){return S},getEvent(){return y()}}),c=VE(u),d={get(fe){var W;return(W=c.current)==null?void 0:W[fe].ref.current},set(fe,W){var oe;(oe=c.current)==null||oe[fe].set(W)},initial(fe){var W;return(W=c.current)==null?void 0:W[fe].initial},hash(fe){var oe,v;const W=(oe=c.current)==null?void 0:oe[fe].get();return(v=c.current)==null?void 0:v[fe].hash(W)}},h=Q.useRef(new Map),p=Q.useRef(null),E=Q.useRef(null),b=Q.useRef({type:""}),y=()=>se(U({},b.current),{current(){return b.current},previous(){return E.current}}),x=()=>se(U({},M),{matches(...fe){return fe.includes(M.ref.current)},hasTag(fe){var W,oe;return!!((oe=(W=e.states[M.ref.current])==null?void 0:W.tags)!=null&&oe.includes(fe))}}),S=UP((Te=(ie=e.refs)==null?void 0:ie.call(e,{prop:a,context:d}))!=null?Te:{}),_=()=>({state:x(),context:d,event:y(),prop:a,send:F,action:A,guard:O,track:HP,refs:S,computed:Y,flush:qE,scope:n,choose:z}),A=fe=>{const W=Co(fe)?fe(_()):fe;if(!W)return;const oe=W.map(v=>{var Z,k;const D=(k=(Z=e.implementations)==null?void 0:Z.actions)==null?void 0:k[v];return D||Af(`[zag-js] No implementation found for action "${JSON.stringify(v)}"`),D});for(const v of oe)v==null||v(_())},O=fe=>{var W,oe;return Co(fe)?fe(_()):(oe=(W=e.implementations)==null?void 0:W.guards)==null?void 0:oe[fe](_())},I=fe=>{const W=Co(fe)?fe(_()):fe;if(!W)return;const oe=W.map(D=>{var k,xe;const Z=(xe=(k=e.implementations)==null?void 0:k.effects)==null?void 0:xe[D];return Z||Af(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),Z}),v=[];for(const D of oe){const Z=D==null?void 0:D(_());Z&&v.push(Z)}return()=>v.forEach(D=>D==null?void 0:D())},z=fe=>hR(fe).find(W=>{let oe=!W.guard;return Ku(W.guard)?oe=!!O(W.guard):Co(W.guard)&&(oe=W.guard(_())),oe}),Y=fe=>{DR(e.computed,()=>"[zag-js] No computed object found on machine");const W=e.computed[fe];return W({context:d,event:y(),prop:a,refs:S,scope:n,computed:Y})},M=nl(()=>({defaultValue:e.initialState({prop:a}),onChange(fe,W){var v,D,Z,k;if(W){const xe=h.current.get(W);xe==null||xe(),h.current.delete(W)}W&&A((v=e.states[W])==null?void 0:v.exit),A((D=p.current)==null?void 0:D.actions);const oe=I((Z=e.states[fe])==null?void 0:Z.effects);if(oe&&h.current.set(fe,oe),W===Mf){A(e.entry);const xe=I(e.effects);xe&&h.current.set(Mf,xe)}A((k=e.states[fe])==null?void 0:k.entry)}})),G=Q.useRef(void 0),pe=Q.useRef(Do.NotStarted);$E(()=>{queueMicrotask(()=>{var D;const oe=pe.current===Do.Started;pe.current=Do.Started,r(oe?"rehydrating...":"initializing...");const v=(D=G.current)!=null?D:M.initial;M.invoke(v,oe?M.get():Mf)});const fe=h.current,W=M.ref.current;return()=>{r("unmounting..."),G.current=W,pe.current=Do.Stopped,fe.forEach(oe=>oe==null?void 0:oe()),h.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const be=()=>"ref"in M?M.ref.current:M.get(),F=fe=>{queueMicrotask(()=>{var k,xe,Pe,Ne,He;if(pe.current!==Do.Started)return;E.current=b.current,b.current=fe;let W=be();const oe=(Pe=(k=e.states[W].on)==null?void 0:k[fe.type])!=null?Pe:(xe=e.on)==null?void 0:xe[fe.type],v=z(oe);if(!v)return;p.current=v;const D=(Ne=v.target)!=null?Ne:W;r("transition",fe.type,v.target||W,`(${v.actions})`);const Z=D!==W;Z?Ns.flushSync(()=>M.set(D)):v.reenter&&!Z?M.invoke(W,W):A((He=v.actions)!=null?He:[])})};return(Ie=e.watch)==null||Ie.call(e,_()),{state:x(),send:F,context:d,prop:a,scope:n,refs:S,computed:Y,event:y(),getStatus:()=>pe.current}}function VE(e){const t=Q.useRef(e);return t.current=e,t}function zP(e){const t=VE(e);return function(r){return t.current[r]}}function qE(e){queueMicrotask(()=>{Ns.flushSync(()=>e())})}var Ff=BP(e=>e);function il(...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 jP(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 Bf=e=>{const t=Q.memo(Q.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=sn(h,["asChild","children"]);if(!o)return Q.createElement(e,se(U({},u),{ref:r}),a);if(!Q.isValidElement(a))return null;const c=Q.Children.only(a),d=jP(c);return Q.cloneElement(c,se(U({},Ot(u,c.props)),{ref:r?il(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Kt=(()=>{const e=new Map;return new Proxy(Bf,{apply(t,n,r){return Bf(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Bf(r)),e.get(r)}})})();function $P(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ui(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=Q.createContext(u);c.displayName=t;function d(){var p;const h=Q.useContext(c);if(!h&&n){const E=new Error(a!=null?a:$P(r,o));throw E.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,E,d),E}return h}return[c.Provider,d,c]}const[VP,Uf]=Ui({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[YE,ia]=Ui({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),WE=Q.forwardRef((e,t)=>{const n=Uf(),r=ia(),o=Ot(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:P.jsx(Kt.div,se(U({},o),{ref:il(r.ref,t)}))});WE.displayName="PopoverContent";const GE=Q.forwardRef((e,t)=>{const n=Uf(),r=ia(),o=Ot(n.getPositionerProps(),e);return r.unmounted?null:P.jsx(Kt.div,se(U({},o),{ref:t}))});GE.displayName="PopoverPositioner";const oa=()=>(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]},[{},U({},e)]),KE=e=>oa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function qP(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 YP={props({props:e}){return se(U({},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",Ro(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"});Nt(()=>{var c,d;const u=ol(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})=>{Nt(()=>{e.set("prevAnimationName",ol(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,E,b;((b=(E=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:E[0])!=null?b:d.target)===o&&e.set("prevAnimationName",ol(t.get("styles")))},u=d=>{const h=ol(t.get("styles"));Gn(d)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=tl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),zE(()=>c())}}}}};function ol(e){return(e==null?void 0:e.animationName)||"none"}Mo()(["onExitComplete","present","immediate"]);function WP(e,t={}){const{sync:n=!1}=t,r=GP(e);return Q.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 GP(e){const t=Q.useRef(e);return t.current=e,t}const Hf=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,a=sn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=Q.useRef(!1),c=se(U({},a),{present:r,onExitComplete:WP(e.onExitComplete)}),d=rl(YP,c),h=qP(d);h.present&&(u.current=!0);const p=!h.present&&!u.current&&t||n&&!h.present&&u.current,E=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:E,present:h.present,unmounted:p}};var Hi=(e,t=[])=>({parts:(...n)=>{if(KP(t))return Hi(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Hi(e,[...t,...n]),omit:(...n)=>Hi(e,t.filter(r=>!n.includes(r))),rename:n=>Hi(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Fo(e)}"][data-part="${Fo(r)}"]`,`& [data-scope="${Fo(e)}"][data-part="${Fo(r)}"]`].join(", "),attrs:{"data-scope":Fo(e),"data-part":Fo(r)}}}),{})}),Fo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),KP=e=>e.length===0;const XP=["top","right","bottom","left"],Xr=Math.min,Sn=Math.max,sl=Math.round,al=Math.floor,fr=e=>({x:e,y:e}),QP={left:"right",right:"left",bottom:"top",top:"bottom"},JP={start:"end",end:"start"};function zf(e,t,n){return Sn(e,Xr(t,n))}function Ar(e,t){return typeof e=="function"?e(t):e}function Cr(e){return e.split("-")[0]}function Bo(e){return e.split("-")[1]}function jf(e){return e==="x"?"y":"x"}function $f(e){return e==="y"?"height":"width"}const ZP=new Set(["top","bottom"]);function hr(e){return ZP.has(Cr(e))?"y":"x"}function Vf(e){return jf(hr(e))}function eL(e,t,n){n===void 0&&(n=!1);const r=Bo(e),o=Vf(e),a=$f(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ul(u)),[u,ul(u)]}function tL(e){const t=ul(e);return[qf(e),t,qf(t)]}function qf(e){return e.replace(/start|end/g,t=>JP[t])}const XE=["left","right"],QE=["right","left"],nL=["top","bottom"],rL=["bottom","top"];function iL(e,t,n){switch(e){case"top":case"bottom":return n?t?QE:XE:t?XE:QE;case"left":case"right":return t?nL:rL;default:return[]}}function oL(e,t,n,r){const o=Bo(e);let a=iL(Cr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(qf)))),a}function ul(e){return e.replace(/left|right|bottom|top/g,t=>QP[t])}function sL(e){return U({top:0,right:0,bottom:0,left:0},e)}function JE(e){return typeof e!="number"?sL(e):{top:e,right:e,bottom:e,left:e}}function ll(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 ZE(e,t,n){let{reference:r,floating:o}=e;const a=hr(t),u=Vf(t),c=$f(u),d=Cr(t),h=a==="y",p=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,b=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:E};break;case"left":y={x:r.x-o.width,y:E};break;default:y={x:r.x,y:r.y}}switch(Bo(t)){case"start":y[u]-=b*(n&&h?-1:1);break;case"end":y[u]+=b*(n&&h?-1:1);break}return y}const aL=(e,t,n)=>$e(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 h=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:E}=ZE(h,r,d),b=r,y={},x=0;for(let S=0;S<c.length;S++){const{name:_,fn:A}=c[S],{x:O,y:I,data:z,reset:Y}=yield A({x:p,y:E,initialPlacement:r,placement:b,strategy:o,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});p=O!=null?O:p,E=I!=null?I:E,y=se(U({},y),{[_]:U(U({},y[_]),z)}),Y&&x<=50&&(x++,typeof Y=="object"&&(Y.placement&&(b=Y.placement),Y.rects&&(h=Y.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):Y.rects),{x:p,y:E}=ZE(h,b,d)),S=-1)}return{x:p,y:E,placement:b,strategy:o,middlewareData:y}});function sa(e,t){return $e(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:E="floating",altBoundary:b=!1,padding:y=0}=Ar(t,e),x=JE(y),_=c[b?E==="floating"?"reference":"floating":E],A=ll(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(_))==null||n?_:_.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),O=E==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,I=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),z=(yield a.isElement==null?void 0:a.isElement(I))?(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1}:{x:1,y:1},Y=ll(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:O,offsetParent:I,strategy:d}):O);return{top:(A.top-Y.top+x.top)/z.y,bottom:(Y.bottom-A.bottom+x.bottom)/z.y,left:(A.left-Y.left+x.left)/z.x,right:(Y.right-A.right+x.right)/z.x}})}const uL=e=>({name:"arrow",options:e,fn(n){return $e(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:p,padding:E=0}=Ar(e,n)||{};if(p==null)return{};const b=JE(E),y={x:r,y:o},x=Vf(a),S=$f(x),_=yield c.getDimensions(p),A=x==="y",O=A?"top":"left",I=A?"bottom":"right",z=A?"clientHeight":"clientWidth",Y=u.reference[S]+u.reference[x]-y[x]-u.floating[S],M=y[x]-u.reference[x],G=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let pe=G?G[z]:0;(!pe||!(yield c.isElement==null?void 0:c.isElement(G)))&&(pe=d.floating[z]||u.floating[S]);const be=Y/2-M/2,F=pe/2-_[S]/2-1,te=Xr(b[O],F),X=Xr(b[I],F),ne=te,ie=pe-_[S]-X,Te=pe/2-_[S]/2+be,Ie=zf(ne,Te,ie),fe=!h.arrow&&Bo(a)!=null&&Te!==Ie&&u.reference[S]/2-(Te<ne?te:X)-_[S]/2<0,W=fe?Te<ne?Te-ne:Te-ie:0;return{[x]:y[x]+W,data:U({[x]:Ie,centerOffset:Te-Ie-W},fe&&{alignmentOffset:W}),reset:fe}})}}),lL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return $e(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:p}=n,Te=Ar(e,n),{mainAxis:E=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:_=!0}=Te,A=sn(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const O=Cr(a),I=hr(d),z=Cr(d)===d,Y=yield h.isRTL==null?void 0:h.isRTL(p.floating),M=y||(z||!_?[ul(d)]:tL(d)),G=S!=="none";!y&&G&&M.push(...oL(d,_,S,Y));const pe=[d,...M],be=yield sa(n,A),F=[];let te=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&F.push(be[O]),b){const Ie=eL(a,c,Y);F.push(be[Ie[0]],be[Ie[1]])}if(te=[...te,{placement:a,overflows:F}],!F.every(Ie=>Ie<=0)){var X,ne;const Ie=(((X=u.flip)==null?void 0:X.index)||0)+1,fe=pe[Ie];if(fe&&(!(b==="alignment"?I!==hr(fe):!1)||te.every(v=>hr(v.placement)===I?v.overflows[0]>0:!0)))return{data:{index:Ie,overflows:te},reset:{placement:fe}};let W=(ne=te.filter(oe=>oe.overflows[0]<=0).sort((oe,v)=>oe.overflows[1]-v.overflows[1])[0])==null?void 0:ne.placement;if(!W)switch(x){case"bestFit":{var ie;const oe=(ie=te.filter(v=>{if(G){const D=hr(v.placement);return D===I||D==="y"}return!0}).map(v=>[v.placement,v.overflows.filter(D=>D>0).reduce((D,Z)=>D+Z,0)]).sort((v,D)=>v[1]-D[1])[0])==null?void 0:ie[0];oe&&(W=oe);break}case"initialPlacement":W=d;break}if(a!==W)return{reset:{placement:W}}}return{}})}}};function ey(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ty(e){return XP.some(t=>e[t]>=0)}const cL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return $e(this,null,function*(){const{rects:r}=n,u=Ar(e,n),{strategy:o="referenceHidden"}=u,a=sn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield sa(n,se(U({},a),{elementContext:"reference"})),d=ey(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:ty(d)}}}case"escaped":{const c=yield sa(n,se(U({},a),{altBoundary:!0})),d=ey(c,r.floating);return{data:{escapedOffsets:d,escaped:ty(d)}}}default:return{}}})}}},ny=new Set(["left","top"]);function dL(e,t){return $e(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Cr(n),c=Bo(n),d=hr(n)==="y",h=ny.has(u)?-1:1,p=a&&d?-1:1,E=Ar(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:x}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof x=="number"&&(y=c==="end"?x*-1:x),d?{x:y*p,y:b*h}:{x:b*h,y:y*p}})}const fL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return $e(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield dL(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+h.x,y:u+h.y,data:se(U({},h),{placement:c})}})}}},hL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return $e(this,null,function*(){const{x:r,y:o,placement:a}=n,A=Ar(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:O=>{let{x:I,y:z}=O;return{x:I,y:z}}}}=A,h=sn(A,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},E=yield sa(n,h),b=hr(Cr(a)),y=jf(b);let x=p[y],S=p[b];if(u){const O=y==="y"?"top":"left",I=y==="y"?"bottom":"right",z=x+E[O],Y=x-E[I];x=zf(z,x,Y)}if(c){const O=b==="y"?"top":"left",I=b==="y"?"bottom":"right",z=S+E[O],Y=S-E[I];S=zf(z,S,Y)}const _=d.fn(se(U({},n),{[y]:x,[b]:S}));return se(U({},_),{data:{x:_.x-r,y:_.y-o,enabled:{[y]:u,[b]:c}}})})}}},pL=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:h=!0}=Ar(e,t),p={x:n,y:r},E=hr(o),b=jf(E);let y=p[b],x=p[E];const S=Ar(c,t),_=typeof S=="number"?{mainAxis:S,crossAxis:0}:U({mainAxis:0,crossAxis:0},S);if(d){const I=b==="y"?"height":"width",z=a.reference[b]-a.floating[I]+_.mainAxis,Y=a.reference[b]+a.reference[I]-_.mainAxis;y<z?y=z:y>Y&&(y=Y)}if(h){var A,O;const I=b==="y"?"width":"height",z=ny.has(Cr(o)),Y=a.reference[E]-a.floating[I]+(z&&((A=u.offset)==null?void 0:A[E])||0)+(z?0:_.crossAxis),M=a.reference[E]+a.reference[I]+(z?0:((O=u.offset)==null?void 0:O[E])||0)-(z?_.crossAxis:0);x<Y?x=Y:x>M&&(x=M)}return{[b]:y,[E]:x}}}},mL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return $e(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,te=Ar(e,n),{apply:h=()=>{}}=te,p=sn(te,["apply"]),E=yield sa(n,p),b=Cr(a),y=Bo(a),x=hr(a)==="y",{width:S,height:_}=u.floating;let A,O;b==="top"||b==="bottom"?(A=b,O=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(O=b,A=y==="end"?"top":"bottom");const I=_-E.top-E.bottom,z=S-E.left-E.right,Y=Xr(_-E[A],I),M=Xr(S-E[O],z),G=!n.middlewareData.shift;let pe=Y,be=M;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(be=z),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(pe=I),G&&!y){const X=Sn(E.left,0),ne=Sn(E.right,0),ie=Sn(E.top,0),Te=Sn(E.bottom,0);x?be=S-2*(X!==0||ne!==0?X+ne:Sn(E.left,E.right)):pe=_-2*(ie!==0||Te!==0?ie+Te:Sn(E.top,E.bottom))}yield h(se(U({},n),{availableWidth:be,availableHeight:pe}));const F=yield c.getDimensions(d.floating);return S!==F.width||_!==F.height?{reset:{rects:!0}}:{}})}}};function cl(){return typeof window!="undefined"}function Uo(e){return ry(e)?(e.nodeName||"").toLowerCase():"#document"}function _n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pr(e){var t;return(t=(ry(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ry(e){return cl()?e instanceof Node||e instanceof _n(e).Node:!1}function Kn(e){return cl()?e instanceof Element||e instanceof _n(e).Element:!1}function mr(e){return cl()?e instanceof HTMLElement||e instanceof _n(e).HTMLElement:!1}function iy(e){return!cl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof _n(e).ShadowRoot}const gL=new Set(["inline","contents"]);function aa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Xn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!gL.has(o)}const EL=new Set(["table","td","th"]);function yL(e){return EL.has(Uo(e))}const TL=[":popover-open",":modal"];function dl(e){return TL.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const bL=["transform","translate","scale","rotate","perspective"],xL=["transform","translate","scale","rotate","perspective","filter"],wL=["paint","layout","strict","content"];function Yf(e){const t=Wf(),n=Kn(e)?Xn(e):e;return bL.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)||xL.some(r=>(n.willChange||"").includes(r))||wL.some(r=>(n.contain||"").includes(r))}function SL(e){let t=Qr(e);for(;mr(t)&&!Ho(t);){if(Yf(t))return t;if(dl(t))return null;t=Qr(t)}return null}function Wf(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _L=new Set(["html","body","#document"]);function Ho(e){return _L.has(Uo(e))}function Xn(e){return _n(e).getComputedStyle(e)}function fl(e){return Kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qr(e){if(Uo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||iy(e)&&e.host||pr(e);return iy(t)?t.host:t}function oy(e){const t=Qr(e);return Ho(t)?e.ownerDocument?e.ownerDocument.body:e.body:mr(t)&&aa(t)?t:oy(t)}function ua(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=oy(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=_n(o);if(a){const c=Gf(u);return t.concat(u,u.visualViewport||[],aa(o)?o:[],c&&n?ua(c):[])}return t.concat(o,ua(o,[],n))}function Gf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sy(e){const t=Xn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=mr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=sl(n)!==a||sl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Kf(e){return Kn(e)?e:e.contextElement}function zo(e){const t=Kf(e);if(!mr(t))return fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=sy(t);let u=(a?sl(n.width):n.width)/r,c=(a?sl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const vL=fr(0);function ay(e){const t=_n(e);return!Wf()||!t.visualViewport?vL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_n(e)?!1:t}function zi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Kf(e);let u=fr(1);t&&(r?Kn(r)&&(u=zo(r)):u=zo(e));const c=AL(a,n,r)?ay(a):fr(0);let d=(o.left+c.x)/u.x,h=(o.top+c.y)/u.y,p=o.width/u.x,E=o.height/u.y;if(a){const b=_n(a),y=r&&Kn(r)?_n(r):r;let x=b,S=Gf(x);for(;S&&r&&y!==x;){const _=zo(S),A=S.getBoundingClientRect(),O=Xn(S),I=A.left+(S.clientLeft+parseFloat(O.paddingLeft))*_.x,z=A.top+(S.clientTop+parseFloat(O.paddingTop))*_.y;d*=_.x,h*=_.y,p*=_.x,E*=_.y,d+=I,h+=z,x=_n(S),S=Gf(x)}}return ll({width:p,height:E,x:d,y:h})}function hl(e,t){const n=fl(e).scrollLeft;return t?t.left+n:zi(pr(e)).left+n}function uy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-hl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function CL(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=pr(r),c=t?dl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=fr(1);const p=fr(0),E=mr(r);if((E||!E&&!a)&&((Uo(r)!=="body"||aa(u))&&(d=fl(r)),mr(r))){const y=zi(r);h=zo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!E&&!a?uy(u,d):fr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+b.x,y:n.y*h.y-d.scrollTop*h.y+p.y+b.y}}function kL(e){return Array.from(e.getClientRects())}function NL(e){const t=pr(e),n=fl(e),r=e.ownerDocument.body,o=Sn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Sn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+hl(e);const c=-n.scrollTop;return Xn(r).direction==="rtl"&&(u+=Sn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const ly=25;function OL(e,t){const n=_n(e),r=pr(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=Wf();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const h=hl(r);if(h<=0){const p=r.ownerDocument,E=p.body,b=getComputedStyle(E),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,x=Math.abs(r.clientWidth-E.clientWidth-y);x<=ly&&(a-=x)}else h<=ly&&(a+=h);return{width:a,height:u,x:c,y:d}}const IL=new Set(["absolute","fixed"]);function RL(e,t){const n=zi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=mr(e)?zo(e):fr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,h=r*a.y;return{width:u,height:c,x:d,y:h}}function cy(e,t,n){let r;if(t==="viewport")r=OL(e,n);else if(t==="document")r=NL(pr(e));else if(Kn(t))r=RL(t,n);else{const o=ay(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ll(r)}function dy(e,t){const n=Qr(e);return n===t||!Kn(n)||Ho(n)?!1:Xn(n).position==="fixed"||dy(n,t)}function PL(e,t){const n=t.get(e);if(n)return n;let r=ua(e,[],!1).filter(c=>Kn(c)&&Uo(c)!=="body"),o=null;const a=Xn(e).position==="fixed";let u=a?Qr(e):e;for(;Kn(u)&&!Ho(u);){const c=Xn(u),d=Yf(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&IL.has(o.position)||aa(u)&&!d&&dy(e,u))?r=r.filter(p=>p!==u):o=c,u=Qr(u)}return t.set(e,r),r}function LL(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?dl(t)?[]:PL(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,p)=>{const E=cy(t,p,o);return h.top=Sn(E.top,h.top),h.right=Xr(E.right,h.right),h.bottom=Xr(E.bottom,h.bottom),h.left=Sn(E.left,h.left),h},cy(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function DL(e){const{width:t,height:n}=sy(e);return{width:t,height:n}}function ML(e,t,n){const r=mr(t),o=pr(t),a=n==="fixed",u=zi(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=fr(0);function h(){d.x=hl(o)}if(r||!r&&!a)if((Uo(t)!=="body"||aa(o))&&(c=fl(t)),r){const y=zi(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&h();a&&!r&&o&&h();const p=o&&!r&&!a?uy(o,c):fr(0),E=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:E,y:b,width:u.width,height:u.height}}function Xf(e){return Xn(e).position==="static"}function fy(e,t){if(!mr(e)||Xn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return pr(e)===n&&(n=n.ownerDocument.body),n}function hy(e,t){const n=_n(e);if(dl(e))return n;if(!mr(e)){let o=Qr(e);for(;o&&!Ho(o);){if(Kn(o)&&!Xf(o))return o;o=Qr(o)}return n}let r=fy(e,t);for(;r&&yL(r)&&Xf(r);)r=fy(r,t);return r&&Ho(r)&&Xf(r)&&!Yf(r)?n:r||SL(e)||n}const FL=function(e){return $e(this,null,function*(){const t=this.getOffsetParent||hy,n=this.getDimensions,r=yield n(e.floating);return{reference:ML(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function BL(e){return Xn(e).direction==="rtl"}const UL={convertOffsetParentRelativeRectToViewportRelativeRect:CL,getDocumentElement:pr,getClippingRect:LL,getOffsetParent:hy,getElementRects:FL,getClientRects:kL,getDimensions:DL,getScale:zo,isElement:Kn,isRTL:BL};function py(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function HL(e,t){let n=null,r;const o=pr(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 h=e.getBoundingClientRect(),{left:p,top:E,width:b,height:y}=h;if(c||t(),!b||!y)return;const x=al(E),S=al(o.clientWidth-(p+b)),_=al(o.clientHeight-(E+y)),A=al(p),I={rootMargin:-x+"px "+-S+"px "+-_+"px "+-A+"px",threshold:Sn(0,Xr(1,d))||1};let z=!0;function Y(M){const G=M[0].intersectionRatio;if(G!==d){if(!z)return u();G?u(!1,G):r=setTimeout(()=>{u(!1,1e-7)},1e3)}G===1&&!py(h,e.getBoundingClientRect())&&u(),z=!1}try{n=new IntersectionObserver(Y,se(U({},I),{root:o.ownerDocument}))}catch(M){n=new IntersectionObserver(Y,I)}n.observe(e)}return u(!0),a}function zL(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,h=Kf(e),p=o||a?[...h?ua(h):[],...ua(t)]:[];p.forEach(A=>{o&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const E=h&&c?HL(h,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(A=>{let[O]=A;O&&O.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),h&&!d&&y.observe(h),y.observe(t));let x,S=d?zi(e):null;d&&_();function _(){const A=zi(e);S&&!py(S,A)&&n(),S=A,x=requestAnimationFrame(_)}return n(),()=>{var A;p.forEach(O=>{o&&O.removeEventListener("scroll",n),a&&O.removeEventListener("resize",n)}),E==null||E(),(A=y)==null||A.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const jL=fL,$L=hL,VL=lL,qL=mL,YL=cL,WL=uL,GL=pL,KL=(e,t,n)=>{const r=new Map,o=U({platform:UL},n),a=se(U({},o.platform),{_c:r});return aL(e,t,se(U({},o),{platform:a}))};function my(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 se(U({},o),{toJSON:()=>o})}function XL(e){if(!e)return my();const{x:t,y:n,width:r,height:o}=e;return my(t,n,r,o)}function QL(e,t){return{contextElement:Mt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?XL(r):n.getBoundingClientRect()}}}var la=e=>({variable:e,reference:`var(${e})`}),kr={arrowSize:la("--arrow-size"),arrowSizeHalf:la("--arrow-size-half"),arrowBg:la("--arrow-background"),transformOrigin:la("--transform-origin"),arrowOffset:la("--arrow-offset")},JL=e=>e==="top"||e==="bottom"?"y":"x";function ZL(e,t){return{name:"transformOrigin",fn(n){var be,F,te,X,ne;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=JL(d),p=((be=o.arrow)==null?void 0:be.x)||0,E=((F=o.arrow)==null?void 0:F.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+b/2,S=E+y/2,_=Math.abs(((te=o.shift)==null?void 0:te.y)||0),A=u.reference.height/2,O=y/2,I=(ne=(X=e.offset)==null?void 0:X.mainAxis)!=null?ne:e.gutter,z=typeof I=="number"?I+O:I!=null?I:O,Y=_>z,M={top:`${x}px calc(100% + ${z}px)`,bottom:`${x}px ${-z}px`,left:`calc(100% + ${z}px) ${S}px`,right:`${-z}px ${S}px`}[d],G=`${x}px ${u.reference.y+A-c}px`,pe=!!e.overlap&&h==="y"&&Y;return r.floating.style.setProperty(kr.transformOrigin.variable,pe?G:M),{data:{transformOrigin:pe?G:M}}}}}var e6={name:"rects",fn({rects:e}){return{data:e}}},t6=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% + ${kr.arrowOffset.reference})`}),{}}}};function n6(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var r6={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function gy(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Qf(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function i6(e,t,n){const r=e||t.createElement("div");return WL({element:r,padding:n.arrowPadding})}function o6(e,t){var n;if(!bR((n=t.offset)!=null?n:t.gutter))return jL(({placement:r})=>{var p,E,b,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(E=(p=t.offset)==null?void 0:p.mainAxis)!=null?E:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=n6(r),d=c?void 0:t.shift,h=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return vf({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function s6(e){if(!e.flip)return;const t=Qf(e.boundary);return VL(se(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function a6(e){if(!e.slide&&!e.overlap)return;const t=Qf(e.boundary);return $L(se(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:GL()}))}function u6(e){return qL({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 l6(e){var t;if(e.hideWhenDetached)return YL({strategy:"referenceHidden",boundary:(t=Qf(e.boundary))!=null?t:"clippingAncestors"})}function c6(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function d6(e,t,n={}){const r=QL(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},r6,n),a=t.querySelector("[data-part=arrow]"),u=[o6(a,o),s6(o),a6(o),i6(a,t.ownerDocument,o),t6(a),ZL({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),u6(o),l6(o),e6],{placement:c,strategy:d,onComplete:h,onPositioned:p}=o,E=()=>$e(null,null,function*(){var z;if(!r||!t)return;const S=yield KL(r,t,{placement:c,middleware:u,strategy:d});h==null||h(S),p==null||p({placed:!0});const _=Oo(t),A=gy(_,S.x),O=gy(_,S.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${O}px`),o.hideWhenDetached&&(((z=S.middlewareData.hide)==null?void 0:z.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const I=t.firstElementChild;if(I){const Y=Ro(I);t.style.setProperty("--z-index",Y.zIndex)}}),b=()=>$e(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),p==null||p({placed:!0})):yield E()}),y=c6(o.listeners),x=o.listeners?zL(r,t,b,y):NR;return b(),()=>{x==null||x(),p==null||p({placed:!1})}}function Ey(e,t,n={}){const c=n,{defer:r}=c,o=sn(c,["defer"]),a=r?Nt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(d6(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var f6={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function h6(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:kr.arrowSize.reference,height:kr.arrowSize.reference,[kr.arrowSizeHalf.variable]:`calc(${kr.arrowSize.reference} / 2)`,[kr.arrowOffset.variable]:`calc(${kr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?f6[t.split("-")[0]]:void 0,background:kr.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 jo=new WeakMap,pl=new WeakMap,ml={},Jf=0,yy=e=>e&&(e.host||yy(e.parentNode)),p6=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=yy(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),m6=new Set(["script","output","status","next-route-announcer"]),g6=e=>m6.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),E6=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=p6(n,Array.isArray(e)?e:[e]);ml[r]||(ml[r]=new WeakMap);const c=ml[r],d=[],h=new Set,p=new Set(u),E=y=>{!y||h.has(y)||(h.add(y),E(y.parentNode))};u.forEach(y=>{E(y),a&&Mt(y)&&IE(y,x=>{E(x)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(h.has(x))b(x);else try{if(g6(x))return;const _=x.getAttribute(o)==="true",A=(jo.get(x)||0)+1,O=(c.get(x)||0)+1;jo.set(x,A),c.set(x,O),d.push(x),A===1&&_&&pl.set(x,!0),O===1&&x.setAttribute(r,""),_||x.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",x,S)}})};return b(n),h.clear(),Jf++,()=>{d.forEach(y=>{const x=jo.get(y)-1,S=c.get(y)-1;jo.set(y,x),c.set(y,S),x||(pl.has(y)||y.removeAttribute(o),pl.delete(y)),S||y.removeAttribute(r)}),Jf--,Jf||(jo=new WeakMap,jo=new WeakMap,pl=new WeakMap,ml={})}},y6=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,T6=(e,t=y6(e),n="data-aria-hidden",r=!0)=>{if(t)return E6(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},b6=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Ty(e,t={}){const{defer:n=!0}=t,r=n?b6:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(T6(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function x6(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 w6(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 by="pointerdown.outside",xy="focus.outside";function S6(e){for(const t of e)if(Mt(t)&&dr(t))return!0;return!1}var wy=e=>"clientY"in e;function _6(e,t){if(!wy(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 v6(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Sy(e,t){if(!t||!wy(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 v6(u,c)?r||a:!1}function A6(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=cr(e),h=Oo(e),p=x6(h),E=w6(h);function b(I,z){if(!Mt(z)||!z.isConnected||No(e,z)||_6(e,I)||c&&OE(e,z))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const G=Lf(Y);if(Sy(I,G))return!1}const M=Lf(e);return Sy(I,M)?!1:!(n!=null&&n(z))}const y=new Set,x=Fi(e==null?void 0:e.getRootNode());function S(I){function z(Y){var be,F;const M=u&&!RE()?Nt:te=>te(),G=Y!=null?Y:I,pe=(F=(be=G==null?void 0:G.composedPath)==null?void 0:be.call(G))!=null?F:[G==null?void 0:G.target];M(()=>{const te=x?pe[0]:Gn(I);if(!(!e||!b(I,te))){if(o||a){const X=_f(o,a);e.addEventListener(by,X,{once:!0})}_y(e,by,{bubbles:!1,cancelable:!0,detail:{originalEvent:G,contextmenu:cP(G),focusable:S6(pe),target:te}})}})}I.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(Ft(d,"click",z,{once:!0})),y.add(E.addEventListener("click",z,{once:!0})),y.add(p.addEventListener("click",z,{once:!0}))):z()}const _=new Set,A=setTimeout(()=>{_.add(Ft(d,"pointerdown",S,!0)),_.add(E.addEventListener("pointerdown",S,!0)),_.add(p.addEventListener("pointerdown",S,!0))},0);function O(I){(u?Nt:Y=>Y())(()=>{var G,pe;const Y=(pe=(G=I==null?void 0:I.composedPath)==null?void 0:G.call(I))!=null?pe:[I==null?void 0:I.target],M=x?Y[0]:Gn(I);if(!(!e||!b(I,M))){if(r||a){const be=_f(r,a);e.addEventListener(xy,be,{once:!0})}_y(e,xy,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:dr(M),target:M}})}})}return RE()||(_.add(Ft(d,"focusin",O,!0)),_.add(E.addEventListener("focusin",O,!0)),_.add(p.addEventListener("focusin",O,!0))),()=>{clearTimeout(A),y.forEach(I=>I()),_.forEach(I=>I())}}function C6(e,t){const{defer:n}=t,r=n?Nt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(A6(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function _y(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function k6(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Ft(cr(e),"keydown",n,{capture:!0})}var vy="layer:request-dismiss",Dn={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=>No(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>No(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=>Dn.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];O6(e,vy,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),N6(e,vy,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function N6(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 O6(e,t,n){e.addEventListener(t,n,{once:!0})}var Ay;function Cy(){Dn.layers.forEach(({node:e})=>{e.style.pointerEvents=Dn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function I6(e){e.style.pointerEvents=""}function R6(e,t){const n=cr(e),r=[];return Dn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Ay=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=PP(()=>{const c=o();return Mt(c)?c:null},{timeout:1e3});a.then(c=>r.push(tl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Dn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Ay,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function P6(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Af("[@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,h={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};Dn.add(h),Cy();function p(S){var A,O;const _=Gn(S.detail.originalEvent);Dn.isBelowPointerBlockingLayer(e)||Dn.isInBranch(_)||((A=t.onPointerDownOutside)==null||A.call(t,S),(O=t.onInteractOutside)==null||O.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function E(S){var A,O;const _=Gn(S.detail.originalEvent);Dn.isInBranch(_)||((A=t.onFocusOutside)==null||A.call(t,S),(O=t.onInteractOutside)==null||O.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var _;Dn.isTopMost(e)&&((_=t.onEscapeKeyDown)==null||_.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var I;if(!e)return!1;const _=typeof u=="function"?u():u,A=Array.isArray(_)?_:[_],O=(I=t.persistentElements)==null?void 0:I.map(z=>z()).filter(Mt);return O&&A.push(...O),A.some(z=>No(z,S))||Dn.isInNestedLayer(e,S)}const x=[a?R6(e,t.persistentElements):void 0,k6(e,b),C6(e,{exclude:y,onFocusOutside:E,onPointerDownOutside:p,defer:t.defer})];return()=>{Dn.remove(e),Cy(),I6(e),x.forEach(S=>S==null?void 0:S())}}function ky(e,t){const{defer:n}=t,r=n?Nt:a=>a(),o=[];return o.push(r(()=>{const a=Co(e)?e():e;o.push(P6(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var L6=Object.defineProperty,D6=(e,t,n)=>t in e?L6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ht=(e,t,n)=>D6(e,typeof t!="symbol"?t+"":t,n),Ny={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()}},M6=[],F6=class{constructor(e,t){ht(this,"trapStack"),ht(this,"config"),ht(this,"doc"),ht(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),ht(this,"portalContainers",new Set),ht(this,"listenerCleanups",[]),ht(this,"handleFocus",r=>{const o=Gn(r),a=this.findContainerIndex(o,r)>=0;if(a||Qu(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(ra(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[d];if(h.length>0){const p=h.findIndex(E=>E===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<h.length&&(u=h[p+1],c=!1):p-1>=0&&(u=h[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(h=>ra(h)>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}),ht(this,"handlePointerDown",r=>{const o=Gn(r);if(!(this.findContainerIndex(o,r)>=0)){if(da(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}da(this.config.allowOutsideClick,r)||r.preventDefault()}}),ht(this,"handleClick",r=>{const o=Gn(r);this.findContainerIndex(o,r)>=0||da(this.config.clickOutsideDeactivates,r)||da(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),ht(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;ca(r)&&r.preventDefault(),this.tryFocus(a)}}),ht(this,"handleEscapeKey",r=>{B6(r)&&da(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),ht(this,"_mutationObserver"),ht(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(h=>h===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 h=d;return tP(h)?!0:h.id&&!this.state.containers.some(p=>p.contains(h))?nP(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),ht(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)}))}),ht(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!dr(r)){const o=Io(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}),ht(this,"tryFocus",r=>{if(r!==!1&&r!==Io(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,U6(r)&&r.select()}}),ht(this,"deactivate",r=>{if(!this.state.active)return this;const o=U({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(),Ny.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 h=()=>{Oy(()=>{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(h,h),this}return h(),this}),ht(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}),ht(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}),ht(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),ht(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),ht(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),ht(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}),ht(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Gn(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),h=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:E})=>u===E);if(p<0&&((h==null?void 0:h.container)===u||dr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(p=d),p>=0){const E=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[E];c=ra(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else ca(o)||(c=h==null?void 0:h.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>u===E);if(p<0&&((h==null?void 0:h.container)===u||dr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(p=d),p>=0){const E=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[E];c=ra(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else ca(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||M6;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return ca(r)&&!r.shiftKey},isKeyBackward(r){return ca(r)&&r.shiftKey}},t);this.doc=n.document||cr(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=>{JR(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?OE(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Po(e,{getShadowRoot:this.config.getShadowRoot}),n=UE(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let h=0;h<t.length;h++)if(ra(t[h])>0){c=!0;break}function d(h,p=!0){const E=t.indexOf(h);if(E>=0)return t[E+(p?1:-1)];const b=n.indexOf(h);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(Bi(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(Bi(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 Ny.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Oy(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ft(this.doc,"focusin",this.handleFocus,!0),Ft(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ft(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ft(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ft(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ft(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=Io(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)}},ca=e=>e.key==="Tab",da=(e,...t)=>typeof e=="function"?e(...t):e,B6=e=>!e.isComposing&&e.key==="Escape",Oy=e=>setTimeout(e,0),U6=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Iy(e,t={}){let n;const r=Nt(()=>{const o=typeof e=="function"?e():e;if(o){n=new F6(o,se(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:cr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Zf="data-scroll-lock";function H6(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Ry(e){const t=Ro(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Py(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Zf))return;const u=Ry(r)||Ry(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Zf,"");const d=()=>IP(r,"--scrollbar-width",`${c}px`),h=H6(r),p=()=>{const x={overflow:"hidden"};return!u&&c>0&&(x[h]=`${c}px`),tl(o,x)},E=()=>{var Y,M;const{scrollX:x,scrollY:S,visualViewport:_}=n,A=(Y=_==null?void 0:_.offsetLeft)!=null?Y:0,O=(M=_==null?void 0:_.offsetTop)!=null?M:0,I={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(O))}px`,left:`${-(x-Math.floor(A))}px`,right:"0"};!u&&c>0&&(I[h]=`${c}px`);const z=tl(o,I);return()=>{z==null||z(),n.scrollTo({left:x,top:S,behavior:"instant"})}},b=[d(),Ju()?E():p()];return()=>{b.forEach(x=>x==null?void 0:x()),o.removeAttribute(Zf)}}var z6=Hi("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),gr=z6.build(),Ly=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Dy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},eh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},My=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},j6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},th=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},nh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},$6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Fy=e=>e.getById(Ly(e)),$o=e=>e.getById(Dy(e)),Vo=e=>e.getById(eh(e)),By=e=>e.getById(My(e)),V6=e=>e.getById(th(e)),q6=e=>e.getById(nh(e));function Y6(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),h=r.get("currentPlacement"),p=a("currentPortalled"),E=r.get("renderedElements"),b=h6(se(U({},u("positioning")),{placement:h}));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(se(U({id:j6(c)},gr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(se(U({},gr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(se(U({},gr.anchor.attrs),{dir:u("dir"),id:Ly(c)}))},getTriggerProps(){return t.button(se(U({},gr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:Dy(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":eh(c),onPointerDown(y){PE(y)&&uP()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(se(U({},gr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(se(U({id:My(c)},gr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(se(U({},gr.content.attrs),{dir:u("dir"),id:eh(c),tabIndex:-1,role:"dialog","aria-modal":CE(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ko(d),"aria-labelledby":E.title?th(c):void 0,"aria-describedby":E.description?nh(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(se(U({},gr.title.attrs),{id:th(c),dir:u("dir")}))},getDescriptionProps(){return t.element(se(U({},gr.description.attrs),{id:nh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(se(U({},gr.closeTrigger.attrs),{dir:u("dir"),id:$6(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var W6={props({props:e}){return se(U({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:U({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=Fy(n))!=null?a:$o(n);return Ey(r,()=>By(n),se(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Vo(n);let o=!0;return ky(r,{type:"popover",pointerBlocking:t("modal"),exclude:$o(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:NP(()=>Vo(t),{triggerElement:$o(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Ty(()=>[Vo(t),$o(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Py(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Iy(()=>Vo(t),{initialFocus:()=>HE({root:Vo(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=Fy(n))!=null?u:$o(n);Ey(o,()=>By(n),se(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Nt(()=>{Object.assign(e.get("renderedElements"),{title:!!V6(t),description:!!q6(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Nt(()=>{const n=HE({root:Vo(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||Nt(()=>{const a=$o(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})}}}};Mo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[QF,gl]=Ui({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[JF,rh]=Ui({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),G6=e=>{const t=Q.useId(),{getRootNode:n}=gl(),{dir:r}=rh(),o=U({id:t,dir:r,getRootNode:n},e),a=rl(W6,o);return Y6(a,Ff)},K6=e=>{const[t,u]=KE(e),c=u,{children:n}=c,r=sn(c,["children"]),o=G6(r),a=Hf(Ot({present:o.open},t));return P.jsx(VP,{value:o,children:P.jsx(YE,{value:a,children:n})})},Uy=Q.forwardRef((e,t)=>{const n=Uf(),r=ia(),o=Ot(se(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return P.jsx(Kt.button,se(U({},o),{ref:t}))});Uy.displayName="PopoverTrigger";function X6(e){return tn({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 Q6(e){return tn({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 J6(e){return tn({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 Z6(e){return tn({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 Hy(e){return tn({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 e4=({className:e,componentType:t,children:n})=>{const[r,o]=Q.useState(!1),{globalClassName:a}=kt(),u=h=>{o(h.open)},c=Q.useCallback(()=>{o(!1)},[]),d=Q.useMemo(()=>({closeMenu:c}),[c]);return P.jsxs(K6,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[P.jsx(Uy,{"aria-label":`Overflow menu for ${t}`,className:ae(`${ee}-overflow-menu-button-trigger`,`${ee}-icon-button`,a,e,`cim-${t}-component`),children:P.jsx(Hy,{})}),P.jsx(GE,{children:P.jsx(WE,{className:ae(`${ee}-overflow-menu-list`,a,`cim-${t}-component`),children:P.jsx(bE.Provider,{value:d,children:n})})})]})};function zy(e){return tn({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 jy(e){return tn({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[t4,ji]=Ui({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),$y=Q.forwardRef((e,t)=>{const n=ji(),r=Ot(n.getControlProps(),e);return P.jsx(Kt.div,se(U(U({},r),e),{ref:t}))});$y.displayName="CarouselControl";const Vy=Q.forwardRef((e,t)=>{const[n,r]=oa()(e,["readOnly","index"]),o=ji(),a=Ot(o.getIndicatorProps(n),r);return P.jsx(Kt.button,se(U({},a),{ref:t}))});Vy.displayName="CarouselIndicator";const qy=Q.forwardRef((e,t)=>{const n=ji(),r=Ot(n.getIndicatorGroupProps(),e);return P.jsx(Kt.div,se(U({},r),{ref:t}))});qy.displayName="CarouselIndicatorGroup";const Yy=Q.forwardRef((e,t)=>{const[n,r]=oa()(e,["index","snapAlign"]),o=ji(),a=Ot(o.getItemProps(n),r);return P.jsx(Kt.div,se(U({},a),{ref:t}))});Yy.displayName="CarouselItem";const Wy=Q.forwardRef((e,t)=>{const n=ji(),r=Ot(n.getItemGroupProps(),e);return P.jsx(Kt.div,se(U({},r),{ref:t}))});Wy.displayName="CarouselItemGroup";const Gy=Q.forwardRef((e,t)=>{const n=ji(),r=Ot(n.getNextTriggerProps(),e);return P.jsx(Kt.button,se(U({},r),{ref:t}))});Gy.displayName="CarouselNextTrigger";const Ky=Q.forwardRef((e,t)=>{const n=ji(),r=Ot(n.getPrevTriggerProps(),e);return P.jsx(Kt.button,se(U({},r),{ref:t}))});Ky.displayName="CarouselPrevTrigger";function n4(e){const t=Ro(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(b,y){let x=parseFloat(b);return/%/.test(b)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=c(r,n.width),h=c(o,n.height),p=c(a,n.width),E=c(u,n.height);return{x:{before:d,after:p},y:{before:h,after:E}}}function r4(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 Xy(e){let t=[];for(const n of e.children)t=t.concat(n,Xy(n));return t}function Qy(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?Xy(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",h=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const E=p.getBoundingClientRect();if(!r4(n,E,u))continue;const b=Ro(p);let[y,x]=b.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const S=a==="x"?x:y,_=E[c]-n[c]+e[h];switch(S){case"none":break;case"start":r[a].start.push({node:p,position:_});break;case"center":r[a].center.push({node:p,position:_+E[d]/2});break;case"end":r[a].end.push({node:p,position:_+E[d]});break}}}return r}function Jy(e){const t=e.getBoundingClientRect(),n=n4(e),r=Qy(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Zy([...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(eT(0,o.x))),y:Zy([...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(eT(0,o.y)))}}function i4(e,t,n){const r=Qy(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var Zy=e=>[...new Set(e)],eT=(e,t)=>n=>Math.max(e,Math.min(t,n)),o4=Hi("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Nr=o4.build(),s4=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},a4=(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}`},El=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},u4=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},l4=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},c4=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},tT=(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}`},hn=e=>e.getById(El(e)),nT=e=>OP(hn(e),"[data-part=item]"),d4=(e,t)=>e.getById(tT(e,t)),rT=e=>{const t=hn(e);if(!t)return;const n=Po(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function f4(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),h=n.matches("dragging"),p=o("canScrollNext"),E=o("canScrollPrev"),b=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),S=c("slidesPerPage"),_=c("padding"),A=c("translations");return{isPlaying:d,isDragging:h,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:E,getProgress(){return x/y.length},scrollToIndex(O,I){a({type:"INDEX.SET",index:O,instant:I})},scrollTo(O,I){a({type:"PAGE.SET",index:O,instant:I})},scrollNext(O){a({type:"PAGE.NEXT",instant:O})},scrollPrev(O){a({type:"PAGE.PREV",instant:O})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(O){return Array.from(r.get("slidesInView")).includes(O)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(se(U({},Nr.root.attrs),{id:s4(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":S,"--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(se(U({},Nr.itemGroup.attrs),{id:El(u),"data-orientation":c("orientation"),"data-dragging":ko(h),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(O){No(O.currentTarget,Gn(O))&&a({type:"VIEWPORT.FOCUS"})},onBlur(O){No(O.currentTarget,O.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(O){if(O.defaultPrevented||!c("allowMouseDrag")||!PE(O))return;const I=Gn(O);dr(I)&&I!==O.currentTarget||(O.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:OR(O=>{const I=c("orientation")==="horizontal"?"deltaX":"deltaY";O[I]<0&&!o("canScrollPrev")||O[I]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:_,[b?"paddingInline":"paddingBlock"]:_,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(O){const I=r.get("slidesInView").includes(O.index);return t.element(se(U({},Nr.item.attrs),{id:a4(u,O.index),dir:c("dir"),role:"group","data-index":O.index,"data-inview":ko(I),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":A.item(O.index,c("slideCount")),"aria-hidden":CE(!I),style:{scrollSnapAlign:(()=>{var pe;const z=(pe=O.snapAlign)!=null?pe:"start",Y=c("slidesPerMove"),M=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(O.index+M)%M===0?z:void 0})()}}))},getControlProps(){return t.element(se(U({},Nr.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(se(U({},Nr.prevTrigger.attrs),{id:l4(u),type:"button",disabled:!E,dir:c("dir"),"aria-label":A.prevTrigger,"data-orientation":c("orientation"),"aria-controls":El(u),onClick(O){O.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(se(U({},Nr.nextTrigger.attrs),{dir:c("dir"),id:u4(u),type:"button","aria-label":A.nextTrigger,"data-orientation":c("orientation"),"aria-controls":El(u),disabled:!p,onClick(O){O.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(se(U({},Nr.indicatorGroup.attrs),{dir:c("dir"),id:c4(u),"data-orientation":c("orientation"),onKeyDown(O){if(O.defaultPrevented)return;const I="indicator",z={ArrowDown(G){b||(a({type:"PAGE.NEXT",src:I}),G.preventDefault())},ArrowUp(G){b||(a({type:"PAGE.PREV",src:I}),G.preventDefault())},ArrowRight(G){b&&(a({type:"PAGE.NEXT",src:I}),G.preventDefault())},ArrowLeft(G){b&&(a({type:"PAGE.PREV",src:I}),G.preventDefault())},Home(G){a({type:"PAGE.SET",index:0,src:I}),G.preventDefault()},End(G){a({type:"PAGE.SET",index:y.length-1,src:I}),G.preventDefault()}},Y=hP(O,{dir:c("dir"),orientation:c("orientation")}),M=z[Y];M==null||M(O)}}))},getIndicatorProps(O){return t.button(se(U({},Nr.indicator.attrs),{dir:c("dir"),id:tT(u,O.index),type:"button","data-orientation":c("orientation"),"data-index":O.index,"data-readonly":ko(O.readOnly),"data-current":ko(O.index===x),"aria-label":A.indicator(O.index),onClick(I){I.defaultPrevented||O.readOnly||a({type:"PAGE.SET",index:O.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(se(U({},Nr.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":ko(d),"aria-label":d?A.autoplayStop:A.autoplayStart,onClick(O){O.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var h4={props({props:e}){return MR(e,["slideCount"],"carousel"),se(U({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:U({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:p4(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 TR(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(hn(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=hn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),rT(e)});return rT(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!hn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Nt(()=>{o(),Nt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return nT(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=hn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,h)=>{var b;const p=h.target,E=Number((b=p.dataset.index)!=null?b:"-1");return E==null||Number.isNaN(E)||E===-1?d:h.isIntersecting?pR(d,E):mR(d,E)},n.get("slidesInView"));n.set("slidesInView",gR(c))},{root:r,threshold:t("inViewThreshold")});return nT(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=hn(n);return r?Ft(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 Ft(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return CP(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 Ft(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 h;const a=t.instant?"instant":"smooth",u=vE((h=t.index)!=null?h:e.get("page"),0,e.get("pageSnapPoints").length-1),c=hn(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=hn(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=wE(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=ER(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=hn(r);if(!o)return;const a=i4(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=vE(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=hn(n);if(!r)return;const o=Jy(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=hn(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=hn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=hn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=Jy(r),c=u.x.reduce((h,p)=>Math.abs(p-o)<Math.abs(h-o)?p:h,u.x[0]),d=u.y.reduce((h,p)=>Math.abs(p-a)<Math.abs(h-a)?p:h,u.y[0]);Nt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const h=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(h));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=d4(n,e.get("page"));r&&Nt(()=>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 p4(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}Mo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Mo()(["index","readOnly"]),Mo()(["index","snapAlign"]);const m4=e=>{const t=Q.useId(),{getRootNode:n}=gl(),{dir:r}=rh(),o=U({id:t,dir:r,getRootNode:n},e),a=rl(h4,o);return f4(a,Ff)},iT=Q.forwardRef((e,t)=>{const[n,r]=oa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=m4(n),a=Ot(o.getRootProps(),r);return P.jsx(t4,{value:o,children:P.jsx(Kt.div,se(U({},a),{ref:t}))})});iT.displayName="CarouselRoot";const g4=180,E4=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},y4=({globalClassName:e,className:t,itemMinWidth:n=g4,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:h="Product carousel",children:p})=>{const E=Array.from(p),b=E.length,y=Q.useRef(null),[x,S]=Q.useState(0),{width:_}=sv();Q.useLayoutEffect(()=>{y.current&&S(y.current.getBoundingClientRect().width)},[_,b]);const A=E4(r),O=n+A,I=x>0?(x+A)/O:1,z=Math.max(1,Math.floor(I));if(b===0)return null;const Y=b>z,M=Math.ceil(b/z),G=Y?Math.max(1,I):z;return P.jsxs(iT,{ref:y,className:ae(e,t,`${ee}-carousel`),slidesPerPage:G,slidesPerMove:z,spacing:r,loop:o,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":h,children:[P.jsx(Wy,{className:ae(e,`${ee}-carousel__item-group`,{"carousel-row-container":!Y}),children:E.map((pe,be)=>P.jsx(Yy,{index:be,className:ae(e,`${ee}-carousel__item`),children:pe},be))}),c&&Y&&P.jsxs($y,{className:ae(e,`${ee}-carousel__control`),children:[P.jsx(Ky,{className:ae(e,`${ee}-carousel__prev-trigger`),"aria-label":"Previous slide",children:P.jsx(J6,{size:"16px"})}),P.jsx(Gy,{className:ae(e,`${ee}-carousel__next-trigger`),"aria-label":"Next slide",children:P.jsx(Z6,{size:"16px"})})]}),u&&Y&&P.jsx(qy,{className:ae(e,`${ee}-carousel__indicator-group`),children:Array.from({length:M},(pe,be)=>P.jsx(Vy,{index:be,className:ae(e,`${ee}-carousel__indicator`),"aria-label":`Go to slide group ${be+1}`},be))})]})},T4=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>P.jsx("button",{"aria-label":t,title:t,className:ae(e,`${ee}-close-button`),disabled:r,onClick:n,children:P.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:P.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),[b4,x4]=Ui({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),w4=e=>oa()(e,["lazyMount","unmountOnExit"]),[S4,fa]=Ui({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),oT=Q.forwardRef((e,t)=>{const n=fa(),r=x4(),o=Hf(se(U({},r),{present:n.open})),a=Ot(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:P.jsx(Kt.div,se(U({},a),{ref:il(o.ref,t)}))});oT.displayName="DialogBackdrop";const ih=Q.forwardRef((e,t)=>{const n=fa(),r=ia(),o=Ot(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:P.jsx(Kt.div,se(U({},o),{ref:il(r.ref,t)}))});ih.displayName="DialogContent";const oh=Q.forwardRef((e,t)=>{const n=fa(),r=Ot(n.getDescriptionProps(),e);return P.jsx(Kt.div,se(U({},r),{ref:t}))});oh.displayName="DialogDescription";const sh=Q.forwardRef((e,t)=>{const n=fa(),r=Ot(n.getPositionerProps(),e);return ia().unmounted?null:P.jsx(Kt.div,se(U({},r),{ref:t}))});sh.displayName="DialogPositioner";var _4=Hi("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),$i=_4.build(),sT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},aT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},ah=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},uT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},lh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},lT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},yl=e=>e.getById(ah(e)),v4=e=>e.getById(sT(e)),A4=e=>e.getById(aT(e)),C4=e=>e.getById(uT(e)),k4=e=>e.getById(uh(e)),N4=e=>e.getById(lh(e)),O4=e=>e.getById(lT(e));function I4(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(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(se(U({},$i.trigger.attrs),{dir:a("dir"),id:uT(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ah(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(se(U({},$i.backdrop.attrs),{dir:a("dir"),hidden:!d,id:aT(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(se(U({},$i.positioner.attrs),{dir:a("dir"),id:sT(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(se(U({},$i.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:ah(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:uh(u),"aria-describedby":h.description?lh(u):void 0}))},getTitleProps(){return t.element(se(U({},$i.title.attrs),{dir:a("dir"),id:uh(u)}))},getDescriptionProps(){return t.element(se(U({},$i.description.attrs),{dir:a("dir"),id:lh(u)}))},getCloseTriggerProps(){return t.button(se(U({},$i.closeTrigger.attrs),{dir:a("dir"),id:lT(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var R4={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>O4(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return U({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 ky(()=>yl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[C4(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 Py(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Iy(()=>yl(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")?Ty(()=>[yl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Nt(()=>{e.set("rendered",{title:!!k4(t),description:!!N4(t)})})},syncZIndex({scope:e}){Nt(()=>{const t=yl(e);if(!t)return;const n=Ro(t);[v4(e),A4(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})}}}};Mo()(["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 P4=e=>{const t=Q.useId(),{getRootNode:n}=gl(),{dir:r}=rh(),o=U({id:t,getRootNode:n,dir:r},e),a=rl(R4,o);return I4(a,Ff)},cT=e=>{const[t,c]=KE(e),d=c,{children:n}=d,r=sn(d,["children"]),[o]=w4(t),a=P4(r),u=Hf(Ot({present:a.open},t));return P.jsx(S4,{value:a,children:P.jsx(b4,{value:o,children:P.jsx(YE,{value:u,children:n})})})},dT=Q.forwardRef((e,t)=>{const n=fa(),r=Ot(n.getTitleProps(),e);return P.jsx(Kt.h2,se(U({},r),{ref:t}))});dT.displayName="DialogTitle";const L4=({children:e})=>{const[t,n]=Q.useState(!1),r=Q.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=Q.useMemo(()=>({isOpen:t}),[t]);return P.jsx(Sf.Provider,{value:r,children:P.jsx(TE.Provider,{value:o,children:e})})},fT=()=>Q.useContext(TE),hT=()=>{const e=Q.useContext(Sf);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},D4=`${ee}-overflow-menu-button-trigger`,M4=({componentType:e,children:t})=>{const{isOpen:n}=fT(),{closeMenu:r}=hT(),{globalClassName:o}=kt(),a=Q.useRef(null);return Q.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const h=d.target;h instanceof Element&&h.closest(`.${D4}`)||a.current&&!a.current.contains(h)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?P.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:ae(`${ee}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},F4=({componentType:e,className:t})=>{const{toggleMenu:n}=hT(),{isOpen:r}=fT(),{globalClassName:o}=kt();return P.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:ae(`${ee}-overflow-menu-button-trigger`,`${ee}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:P.jsx(Hy,{})})},B4=({componentType:e,isIcon:t})=>{const{globalClassName:n}=kt(),{previousComponentType:r}=Ci(),o=ta(),a=()=>{wu(r||"dialog"),o()};return t?P.jsx($r,{className:ae(n,`${ee}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:P.jsx(zy,{})}):P.jsxs("button",{className:ae(n,`${ee}-overflow-menu-button`,`${ee}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[P.jsx(zy,{}),"Show ",r||"dialog"]})},U4=({componentType:e,isIcon:t})=>{const{globalClassName:n}=kt(),{isModalFullscreen:r}=Ci(),o=ta(),a=()=>{yd(!r),o()},u=r?Ov:Iv,c="Toggle Fullscreen";return t?P.jsx($r,{ariaLabel:c,title:c,className:ae(n,`${ee}-modal-fullscreen-button`,`cim-${e}-component`),icon:P.jsx(u,{}),onClick:a}):P.jsxs("button",{className:ae(n,`${ee}-overflow-menu-button`,`${ee}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[P.jsx(u,{}),c]})},H4=({componentType:e,isIcon:t})=>{const{globalClassName:n}=kt(),{dialogPosition:r}=Ci(),o=ta(),a=r==="bottom-left",u=()=>{Td(a?"bottom-right":"bottom-left"),o()},c=a?Q6:X6,d=a?"Move right":"Move left";return t?P.jsx($r,{className:ae(n,`${ee}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:P.jsx(c,{})}):P.jsxs("button",{className:ae(n,`${ee}-overflow-menu-button`,`${ee}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[P.jsx(c,{}),d]})},pT=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=kt(),{mode:a}=Ci(),u=a==="standalone",c=e==="modal",d=c?B4:mT,h=c?U4:H4,p=Q.useMemo(()=>r?kv(r):{},[r]);return P.jsx(L4,{children:P.jsxs("div",{className:ae(o,`${ee}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[P.jsxs("div",{className:ae(o,`${ee}-${e}-header`,{standalone:u,embedded:!u}),style:p,children:[(r==null?void 0:r.logoUrl)&&P.jsx("img",{alt:"",role:"img",className:ae(o,`${ee}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),P.jsx(dT,{className:ae(o,`${ee}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),P.jsxs("div",{className:ae(o,`${ee}-${e}-controls`),children:[P.jsx(d,{componentType:e,isIcon:!0}),P.jsx(F4,{componentType:e}),P.jsx(T4,{className:ae(o,`cim-${e}-component`),onClick:n})]})]}),P.jsxs(M4,{componentType:e,children:[P.jsx(h,{componentType:e}),P.jsx(j4,{componentType:e}),P.jsx(xE,{componentType:e,onClearChat:t})]})]})})},z4=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return P.jsx("div",{className:ae(t,`${ee}-suggestion-container ${u}`,e),children:n.map(d=>o?P.jsx(I0,{disabled:r,className:ae(t,`${ee}-suggestion-button standalone`),onClick:c(d),children:d},d):P.jsx("button",{disabled:r,className:ae(t,`${ee}-suggestion-button embedded`),onClick:c(d),children:d},d))})},j4=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=kt();if(!r)return null;const o=()=>{Ai(!1),xu(!0)};return t?P.jsx($r,{className:ae(n,`${ee}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:P.jsx(N0,{})}):P.jsxs("button",{className:ae(n,`${ee}-overflow-menu-button`,`${ee}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[P.jsx(N0,{}),"Minimize"]})},mT=({componentType:e,isIcon:t})=>{const{globalClassName:n}=kt(),r=ta(),o=()=>{wu("modal"),r()};return t?P.jsx($r,{className:ae(n,`${ee}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:P.jsx(jy,{})}):P.jsxs("button",{className:ae(n,`${ee}-overflow-menu-button`,`${ee}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[P.jsx(jy,{}),"Show modal"]})},$4=["Hey there! 👋 What can I find for you today?","Shopping for a gift? Tell me your budget and preferences","Need help? Connect to an agent"],V4=3e3,q4=400,Y4=({globalClassName:e,isWidgetStandalone:t,messages:n=$4})=>{const[r,o]=Q.useState(0),[a,u]=Q.useState(!0);return Q.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{o(h=>(h+1)%n.length),u(!0)},q4)},V4);return()=>{clearInterval(d),clearTimeout(c)}},[n.length]),P.jsxs("div",{className:ae(e,`${ee}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[P.jsxs("div",{className:`${ee}-connecting-pulse-wrapper`,children:[P.jsx("div",{className:`${ee}-connecting-pulse`}),P.jsx("div",{className:`${ee}-connecting-ring`})]}),P.jsx("span",{className:ae(`${ee}-connecting-text`,a&&`${ee}-connecting-text--visible`),children:n[r]})]})},W4=({shouldShow:e,loadingText:t})=>e?P.jsx("span",{className:`${ee}-processing-text`,children:t}):null,G4=({shouldShow:e})=>e?P.jsxs(P.Fragment,{children:[P.jsx("div",{className:`${ee}-processing-shimmer-bar`}),P.jsx("div",{className:`${ee}-processing-shimmer-bar`}),P.jsx("div",{className:`${ee}-processing-shimmer-bar`})]}):null,ch=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>P.jsxs("div",{className:ae(e,`${ee}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[P.jsx(W4,{shouldShow:!!n,loadingText:n}),P.jsx(G4,{shouldShow:!n})]});function gT(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 K4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function X4(e,t,n){const o=Du((n||{}).ignore||[]),a=Q4(t);let u=-1;for(;++u<a.length;)jg(e,"text",c);function c(h,p){let E=-1,b;for(;++E<p.length;){const y=p[E],x=b?b.children:void 0;if(o(y,x?x.indexOf(y):void 0,b))return;b=y}if(b)return d(h,p)}function d(h,p){const E=p[p.length-1],b=a[u][0],y=a[u][1];let x=0;const _=E.children.indexOf(h);let A=!1,O=[];b.lastIndex=0;let I=b.exec(h.value);for(;I;){const z=I.index,Y={index:I.index,input:I.input,stack:[...p,h]};let M=y(...I,Y);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?b.lastIndex=z+1:(x!==z&&O.push({type:"text",value:h.value.slice(x,z)}),Array.isArray(M)?O.push(...M):M&&O.push(M),x=z+I[0].length,A=!0),!b.global)break;I=b.exec(h.value)}return A?(x<h.value.length&&O.push({type:"text",value:h.value.slice(x)}),E.children.splice(_,1,...O)):O=[h],_+O.length}}function Q4(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([J4(o[0]),Z4(o[1])])}return t}function J4(e){return typeof e=="string"?new RegExp(K4(e),"g"):e}function Z4(e){return typeof e=="function"?e:function(){return e}}const dh="phrasing",fh=["autolink","link","image","label"];function eD(){return{transforms:[aD],enter:{literalAutolink:nD,literalAutolinkEmail:hh,literalAutolinkHttp:hh,literalAutolinkWww:hh},exit:{literalAutolink:sD,literalAutolinkEmail:oD,literalAutolinkHttp:rD,literalAutolinkWww:iD}}}function tD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:dh,notInConstruct:fh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:dh,notInConstruct:fh},{character:":",before:"[ps]",after:"\\/",inConstruct:dh,notInConstruct:fh}]}}function nD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function hh(e){this.config.enter.autolinkProtocol.call(this,e)}function rD(e){this.config.exit.autolinkProtocol.call(this,e)}function iD(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 oD(e){this.config.exit.autolinkEmail.call(this,e)}function sD(e){this.exit(e)}function aD(e){X4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,uD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),lD]],{ignore:["link","linkReference"]})}function uD(e,t,n,r,o){let a="";if(!ET(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!cD(n)))return!1;const u=dD(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 lD(e,t,n,r){return!ET(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function cD(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 dD(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=gT(e,"(");let a=gT(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 ET(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Oi(n)||ku(n))&&(!t||n!==47)}yT.peek=bD;function fD(){this.buffer()}function hD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function pD(){this.buffer()}function mD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function gD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ED(e){this.exit(e)}function yD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function TD(e){this.exit(e)}function bD(){return"["}function yT(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 xD(){return{enter:{gfmFootnoteCallString:fD,gfmFootnoteCall:hD,gfmFootnoteDefinitionLabelString:pD,gfmFootnoteDefinition:mD},exit:{gfmFootnoteCallString:gD,gfmFootnoteCall:ED,gfmFootnoteDefinitionLabelString:yD,gfmFootnoteDefinition:TD}}}function wD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:yT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const h=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?`
38
38
  `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?TT:SD))),h(),d}}function SD(e,t,n){return t===0?e:TT(e,t,n)}function TT(e,t,n){return(n?"":" ")+e}const _D=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];bT.peek=ND;function vD(){return{canContainEols:["delete"],enter:{strikethrough:CD},exit:{strikethrough:kD}}}function AD(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_D}],handlers:{delete:bT}}}function CD(e){this.enter({type:"delete",children:[]},e)}function kD(e){this.exit(e)}function bT(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,se(U({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function ND(){return"~"}function OD(e){return e.length}function ID(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||OD,a=[],u=[],c=[],d=[];let h=0,p=-1;for(;++p<e.length;){const S=[],_=[];let A=-1;for(e[p].length>h&&(h=e[p].length);++A<e[p].length;){const O=RD(e[p][A]);if(n.alignDelimiters!==!1){const I=o(O);_[A]=I,(d[A]===void 0||I>d[A])&&(d[A]=I)}S.push(O)}u[p]=S,c[p]=_}let E=-1;if(typeof r=="object"&&"length"in r)for(;++E<h;)a[E]=xT(r[E]);else{const S=xT(r);for(;++E<h;)a[E]=S}E=-1;const b=[],y=[];for(;++E<h;){const S=a[E];let _="",A="";S===99?(_=":",A=":"):S===108?_=":":S===114&&(A=":");let O=n.alignDelimiters===!1?1:Math.max(1,d[E]-_.length-A.length);const I=_+"-".repeat(O)+A;n.alignDelimiters!==!1&&(O=_.length+O+A.length,O>d[E]&&(d[E]=O),y[E]=O),b[E]=I}u.splice(1,0,b),c.splice(1,0,y),p=-1;const x=[];for(;++p<u.length;){const S=u[p],_=c[p];E=-1;const A=[];for(;++E<h;){const O=S[E]||"";let I="",z="";if(n.alignDelimiters!==!1){const Y=d[E]-(_[E]||0),M=a[E];M===114?I=" ".repeat(Y):M===99?Y%2?(I=" ".repeat(Y/2+.5),z=" ".repeat(Y/2-.5)):(I=" ".repeat(Y/2),z=I):z=" ".repeat(Y)}n.delimiterStart!==!1&&!E&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&O==="")&&(n.delimiterStart!==!1||E)&&A.push(" "),n.alignDelimiters!==!1&&A.push(I),A.push(O),n.alignDelimiters!==!1&&A.push(z),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||E!==h-1)&&A.push("|")}x.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return x.join(`
39
39
  `)}function RD(e){return e==null?"":String(e)}function xT(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 PD(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()),LD);return o(),u}function LD(e,t,n){return">"+(n?"":" ")+e}function DD(e,t){return wT(e,t.inConstruct,!0)&&!wT(e,t.notInConstruct,!1)}function wT(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 ST(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
40
40
  `&&DD(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\