@cimulate/copilot-widget 1.13.0 → 1.14.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,52 +1,52 @@
1
- (function(Ie,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Fe(Ie.CimulateMessaging={}))})(this,(function(Ie){"use strict";var F9=Object.defineProperty,B9=Object.defineProperties;var U9=Object.getOwnPropertyDescriptors;var Bc=Object.getOwnPropertySymbols;var X2=Object.prototype.hasOwnProperty,J2=Object.prototype.propertyIsEnumerable;var bs=(Ie,Fe)=>(Fe=Symbol[Ie])?Fe:Symbol.for("Symbol."+Ie),H9=Ie=>{throw TypeError(Ie)},nu=Math.pow,Tm=(Ie,Fe,We)=>Fe in Ie?F9(Ie,Fe,{enumerable:!0,configurable:!0,writable:!0,value:We}):Ie[Fe]=We,F=(Ie,Fe)=>{for(var We in Fe||(Fe={}))X2.call(Fe,We)&&Tm(Ie,We,Fe[We]);if(Bc)for(var We of Bc(Fe))J2.call(Fe,We)&&Tm(Ie,We,Fe[We]);return Ie},ae=(Ie,Fe)=>B9(Ie,U9(Fe));var sn=(Ie,Fe)=>{var We={};for(var rt in Ie)X2.call(Ie,rt)&&Fe.indexOf(rt)<0&&(We[rt]=Ie[rt]);if(Ie!=null&&Bc)for(var rt of Bc(Ie))Fe.indexOf(rt)<0&&J2.call(Ie,rt)&&(We[rt]=Ie[rt]);return We};var Ze=(Ie,Fe,We)=>Tm(Ie,typeof Fe!="symbol"?Fe+"":Fe,We);var Ve=(Ie,Fe,We)=>new Promise((rt,yt)=>{var dt=Tt=>{try{Lt(We.next(Tt))}catch(an){yt(an)}},Pe=Tt=>{try{Lt(We.throw(Tt))}catch(an){yt(an)}},Lt=Tt=>Tt.done?rt(Tt.value):Promise.resolve(Tt.value).then(dt,Pe);Lt((We=We.apply(Ie,Fe)).next())}),ao=function(Ie,Fe){this[0]=Ie,this[1]=Fe},xm=(Ie,Fe,We)=>{var rt=(Pe,Lt,Tt,an)=>{try{var uo=We[Pe](Lt),Ts=(Lt=uo.value)instanceof ao,Uc=uo.done;Promise.resolve(Ts?Lt[0]:Lt).then($n=>Ts?rt(Pe==="return"?Pe:"next",Lt[1]?{done:$n.done,value:$n.value}:$n,Tt,an):Tt({value:$n,done:Uc})).catch($n=>rt("throw",$n,Tt,an))}catch($n){an($n)}},yt=Pe=>dt[Pe]=Lt=>new Promise((Tt,an)=>rt(Pe,Lt,Tt,an)),dt={};return We=We.apply(Ie,Fe),dt[bs("asyncIterator")]=()=>dt,yt("next"),yt("throw"),yt("return"),dt},wm=Ie=>{var Fe=Ie[bs("asyncIterator")],We=!1,rt,yt={};return Fe==null?(Fe=Ie[bs("iterator")](),rt=dt=>yt[dt]=Pe=>Fe[dt](Pe)):(Fe=Fe.call(Ie),rt=dt=>yt[dt]=Pe=>{if(We){if(We=!1,dt==="throw")throw Pe;return Pe}return We=!0,{done:!1,value:new ao(new Promise(Lt=>{var Tt=Fe[dt](Pe);Tt instanceof Object||H9("Object expected"),Lt(Tt)}),1)}}),yt[bs("iterator")]=()=>yt,rt("next"),"throw"in Fe?rt("throw"):yt.throw=dt=>{throw dt},"return"in Fe&&rt("return"),yt},Z2=(Ie,Fe,We)=>(Fe=Ie[bs("asyncIterator")])?Fe.call(Ie):(Ie=Ie[bs("iterator")](),Fe={},We=(rt,yt)=>(yt=Ie[rt])&&(Fe[rt]=dt=>new Promise((Pe,Lt,Tt)=>(dt=yt.call(Ie,dt),Tt=dt.done,Promise.resolve(dt.value).then(an=>Pe({value:an,done:Tt}),Lt)))),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-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.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-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:.8125rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:.875rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.75rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;align-items:baseline;gap:8px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:.875rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:.875rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-cart-item-qty{font-size:.75rem;font-weight:500;opacity:.85}.cim-widget-cart-item-remove{padding:0;border:none;background:none;font-family:inherit;font-size:.75rem;font-weight:500;color:var(--cim-widget-font-color, #3f3f46);text-decoration:underline;cursor:pointer}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.8125rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-font-color, #141415);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-font-color, #141415);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-font-color, #141415) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;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 #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__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-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;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}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__express-pay{display:flex;align-items:center;justify-content:center;gap:.4rem;min-height:34px;background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff;font-weight:700}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.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
- /*$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:{}},yt={},dt={exports:{}},Pe={};var Lt;function Tt(){if(Lt)return Pe;Lt=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 T(P){return P===null||typeof P!="object"?null:(P=E&&P[E]||P["@@iterator"],typeof P=="function"?P:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function A(P,X,N){this.props=P,this.context=X,this.refs=v,this.updater=N||y}A.prototype.isReactComponent={},A.prototype.setState=function(P,X){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,X,"setState")},A.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function C(){}C.prototype=A.prototype;function O(P,X,N){this.props=P,this.context=X,this.refs=v,this.updater=N||y}var R=O.prototype=new C;R.constructor=O,x(R,A.prototype),R.isPureReactComponent=!0;var H=Array.isArray,W=Object.prototype.hasOwnProperty,M={current:null},K={key:!0,ref:!0,__self:!0,__source:!0};function ce(P,X,N){var xe,Re={},Oe=null,Be=null;if(X!=null)for(xe in X.ref!==void 0&&(Be=X.ref),X.key!==void 0&&(Oe=""+X.key),X)W.call(X,xe)&&!K.hasOwnProperty(xe)&&(Re[xe]=X[xe]);var _e=arguments.length-2;if(_e===1)Re.children=N;else if(1<_e){for(var $e=Array(_e),ot=0;ot<_e;ot++)$e[ot]=arguments[ot+2];Re.children=$e}if(P&&P.defaultProps)for(xe in _e=P.defaultProps,_e)Re[xe]===void 0&&(Re[xe]=_e[xe]);return{$$typeof:e,type:P,key:Oe,ref:Be,props:Re,_owner:M.current}}function be(P,X){return{$$typeof:e,type:P.type,key:X,ref:P.ref,props:P.props,_owner:P._owner}}function z(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function ee(P){var X={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(N){return X[N]})}var se=/\/+/g;function te(P,X){return typeof P=="object"&&P!==null&&P.key!=null?ee(""+P.key):X.toString(36)}function re(P,X,N,xe,Re){var Oe=typeof P;(Oe==="undefined"||Oe==="boolean")&&(P=null);var Be=!1;if(P===null)Be=!0;else switch(Oe){case"string":case"number":Be=!0;break;case"object":switch(P.$$typeof){case e:case t:Be=!0}}if(Be)return Be=P,Re=Re(Be),P=xe===""?"."+te(Be,0):xe,H(Re)?(N="",P!=null&&(N=P.replace(se,"$&/")+"/"),re(Re,X,N,"",function(ot){return ot})):Re!=null&&(z(Re)&&(Re=be(Re,N+(!Re.key||Be&&Be.key===Re.key?"":(""+Re.key).replace(se,"$&/")+"/")+P)),X.push(Re)),1;if(Be=0,xe=xe===""?".":xe+":",H(P))for(var _e=0;_e<P.length;_e++){Oe=P[_e];var $e=xe+te(Oe,_e);Be+=re(Oe,X,N,$e,Re)}else if($e=T(P),typeof $e=="function")for(P=$e.call(P),_e=0;!(Oe=P.next()).done;)Oe=Oe.value,$e=xe+te(Oe,_e++),Be+=re(Oe,X,N,$e,Re);else if(Oe==="object")throw X=String(P),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.");return Be}function fe(P,X,N){if(P==null)return P;var xe=[],Re=0;return re(P,xe,"","",function(Oe){return X.call(N,Oe,Re++)}),xe}function ke(P){if(P._status===-1){var X=P._result;X=X(),X.then(function(N){(P._status===0||P._status===-1)&&(P._status=1,P._result=N)},function(N){(P._status===0||P._status===-1)&&(P._status=2,P._result=N)}),P._status===-1&&(P._status=0,P._result=X)}if(P._status===1)return P._result.default;throw P._result}var he={current:null},Q={transition:null},oe={ReactCurrentDispatcher:he,ReactCurrentBatchConfig:Q,ReactCurrentOwner:M};function _(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:fe,forEach:function(P,X,N){fe(P,function(){X.apply(this,arguments)},N)},count:function(P){var X=0;return fe(P,function(){X++}),X},toArray:function(P){return fe(P,function(X){return X})||[]},only:function(P){if(!z(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Pe.Component=A,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=O,Pe.StrictMode=r,Pe.Suspense=d,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,Pe.act=_,Pe.cloneElement=function(P,X,N){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var xe=x({},P.props),Re=P.key,Oe=P.ref,Be=P._owner;if(X!=null){if(X.ref!==void 0&&(Oe=X.ref,Be=M.current),X.key!==void 0&&(Re=""+X.key),P.type&&P.type.defaultProps)var _e=P.type.defaultProps;for($e in X)W.call(X,$e)&&!K.hasOwnProperty($e)&&(xe[$e]=X[$e]===void 0&&_e!==void 0?_e[$e]:X[$e])}var $e=arguments.length-2;if($e===1)xe.children=N;else if(1<$e){_e=Array($e);for(var ot=0;ot<$e;ot++)_e[ot]=arguments[ot+2];xe.children=_e}return{$$typeof:e,type:P.type,key:Re,ref:Oe,props:xe,_owner:Be}},Pe.createContext=function(P){return P={$$typeof:u,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:a,_context:P},P.Consumer=P},Pe.createElement=ce,Pe.createFactory=function(P){var X=ce.bind(null,P);return X.type=P,X},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(P){return{$$typeof:c,render:P}},Pe.isValidElement=z,Pe.lazy=function(P){return{$$typeof:p,_payload:{_status:-1,_result:P},_init:ke}},Pe.memo=function(P,X){return{$$typeof:h,type:P,compare:X===void 0?null:X}},Pe.startTransition=function(P){var X=Q.transition;Q.transition={};try{P()}finally{Q.transition=X}},Pe.unstable_act=_,Pe.useCallback=function(P,X){return he.current.useCallback(P,X)},Pe.useContext=function(P){return he.current.useContext(P)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(P){return he.current.useDeferredValue(P)},Pe.useEffect=function(P,X){return he.current.useEffect(P,X)},Pe.useId=function(){return he.current.useId()},Pe.useImperativeHandle=function(P,X,N){return he.current.useImperativeHandle(P,X,N)},Pe.useInsertionEffect=function(P,X){return he.current.useInsertionEffect(P,X)},Pe.useLayoutEffect=function(P,X){return he.current.useLayoutEffect(P,X)},Pe.useMemo=function(P,X){return he.current.useMemo(P,X)},Pe.useReducer=function(P,X,N){return he.current.useReducer(P,X,N)},Pe.useRef=function(P){return he.current.useRef(P)},Pe.useState=function(P){return he.current.useState(P)},Pe.useSyncExternalStore=function(P,X,N){return he.current.useSyncExternalStore(P,X,N)},Pe.useTransition=function(){return he.current.useTransition()},Pe.version="18.3.1",Pe}var an;function uo(){return an||(an=1,dt.exports=Tt()),dt.exports}var Ts;function Uc(){if(Ts)return yt;Ts=1;var e=uo(),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={},T=null,y=null;h!==void 0&&(T=""+h),d.key!==void 0&&(T=""+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:T,ref:y,props:E,_owner:o.current}}return yt.Fragment=n,yt.jsx=u,yt.jsxs=u,yt}var $n;function rw(){return $n||($n=1,rt.exports=Uc()),rt.exports}var S=rw();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 ru=Object.create(null);Object.keys(or).forEach(e=>{ru[or[e]]=e});const Hc={type:"error",data:"parser error"},_m=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",vm=typeof ArrayBuffer=="function",Sm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,zc=({type:e,data:t},n,r)=>_m&&t instanceof Blob?n?r(t):Am(t,r):vm&&(t instanceof ArrayBuffer||Sm(t))?n?r(t):Am(new Blob([t]),r):r(or[e]+(t||"")),Am=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Cm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let jc;function iw(e,t){if(_m&&e.data instanceof Blob)return e.data.arrayBuffer().then(Cm).then(t);if(vm&&(e.data instanceof ArrayBuffer||Sm(e.data)))return t(Cm(e.data));zc(e,!1,n=>{jc||(jc=new TextEncoder),t(jc.encode(n))})}const km="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xs=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<km.length;e++)xs[km.charCodeAt(e)]=e;const ow=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=xs[e.charCodeAt(r)],u=xs[e.charCodeAt(r+1)],c=xs[e.charCodeAt(r+2)],d=xs[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},sw=typeof ArrayBuffer=="function",$c=(e,t)=>{if(typeof e!="string")return{type:"message",data:Nm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:aw(e.substring(1),t)}:ru[n]?e.length>1?{type:ru[n],data:e.substring(1)}:{type:ru[n]}:Hc},aw=(e,t)=>{if(sw){const n=ow(e);return Nm(n,t)}else return{base64:!0,data:e}},Nm=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Om="",uw=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{zc(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Om))})})},lw=(e,t)=>{const n=e.split(Om),r=[];for(let o=0;o<n.length;o++){const a=$c(n[o],t);if(r.push(a),a.type==="error")break}return r};function cw(){return new TransformStream({transform(e,t){iw(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 Vc;function iu(e){return e.reduce((t,n)=>t+n.length,0)}function ou(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 dw(e,t){Vc||(Vc=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(iu(n)<1)break;const d=ou(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(iu(n)<2)break;const d=ou(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(iu(n)<8)break;const d=ou(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),p=h.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(Hc);break}o=p*Math.pow(2,32)+h.getUint32(4),r=3}else{if(iu(n)<o)break;const d=ou(n,o);c.enqueue($c(a?d:Vc.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(Hc);break}}}})}const Im=4;function St(e){if(e)return fw(e)}function fw(e){for(var t in St.prototype)e[t]=St.prototype[t];return e}St.prototype.on=St.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},St.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},St.prototype.off=St.prototype.removeListener=St.prototype.removeAllListeners=St.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},St.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},St.prototype.emitReserved=St.prototype.emit,St.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},St.prototype.hasListeners=function(e){return!!this.listeners(e).length};const su=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")(),hw="arraybuffer";function z9(){}function Rm(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const pw=On.setTimeout,mw=On.clearTimeout;function au(e,t){t.useNativeTimers?(e.setTimeoutFn=pw.bind(On),e.clearTimeoutFn=mw.bind(On)):(e.setTimeoutFn=On.setTimeout.bind(On),e.clearTimeoutFn=On.clearTimeout.bind(On))}const gw=1.33;function Ew(e){return typeof e=="string"?yw(e):Math.ceil((e.byteLength||e.size)*gw)}function yw(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 Pm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function bw(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Tw(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 xw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class qc extends St{constructor(t){super(),this.writable=!1,au(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 xw(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=$c(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=bw(t);return n.length?"?"+n:""}}class ww extends qc{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)};lw(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,uw(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]=Pm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Lm=!1;try{Lm=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const _w=Lm;function vw(){}class Sw extends ww{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 St{constructor(t,n,r){super(),this.createRequest=t,au(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=Rm(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=vw,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",Dm);else if(typeof addEventListener=="function"){const e="onpagehide"in On?"pagehide":"unload";addEventListener(e,Dm,!1)}}function Dm(){for(let e in sr.requests)sr.requests.hasOwnProperty(e)&&sr.requests[e].abort()}const Aw=(function(){const e=Mm({xdomain:!1});return e&&e.responseType!==null})();class Cw extends Sw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Aw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new sr(Mm,this.uri(),t)}}function Mm(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||_w))return new XMLHttpRequest}catch(n){}if(!t)try{return new On[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Fm=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class kw extends qc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Fm?{}:Rm(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;zc(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&su(()=>{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]=Pm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Yc=On.WebSocket||On.MozWebSocket;class Nw extends kw{createSocket(t,n,r){return Fm?new Yc(t,n,r):n?new Yc(t,n):new Yc(t)}doWrite(t,n){this.ws.send(n)}}class Ow extends qc{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=dw(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=cw();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&&su(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Iw={websocket:Nw,webtransport:Ow,polling:Cw},Rw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Pw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Wc(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=Rw.exec(e||""),a={},u=14;for(;u--;)a[Pw[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=Lw(a,a.path),a.queryKey=Dw(a,a.query),a}function Lw(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 Dw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Gc=typeof addEventListener=="function"&&typeof removeEventListener=="function",uu=[];Gc&&addEventListener("offline",()=>{uu.forEach(e=>e())},!1);class jr extends St{constructor(t,n){if(super(),this.binaryType=hw,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=Wc(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=Wc(n.host).host);au(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=Tw(this.opts.query)),Gc&&(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"})},uu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Im,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&&jr.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",jr.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+=Ew(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,su(()=>{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(jr.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(),Gc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=uu.indexOf(this._offlineEventListener);r!==-1&&uu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}jr.protocol=Im;class Mw extends jr{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;jr.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;jr.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 T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=E=>{const T=new Error("probe error: "+E);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};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 Fw=class extends Mw{constructor(t,n={}){const r=typeof t=="object",o=r?F({},t):F({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>Iw[a]).filter(a=>!!a)),super(r?o:t,o)}};function Bw(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=Wc(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 Uw=typeof ArrayBuffer=="function",Hw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Bm=Object.prototype.toString,zw=typeof Blob=="function"||typeof Blob!="undefined"&&Bm.call(Blob)==="[object BlobConstructor]",jw=typeof File=="function"||typeof File!="undefined"&&Bm.call(File)==="[object FileConstructor]";function Kc(e){return Uw&&(e instanceof ArrayBuffer||Hw(e))||zw&&e instanceof Blob||jw&&e instanceof File}function lu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(lu(e[n]))return!0;return!1}if(Kc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return lu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&lu(e[n]))return!0;return!1}function $w(e){const t=[],n=e.data,r=e;return r.data=Qc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Qc(e,t){if(!e)return e;if(Kc(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]=Qc(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]=Qc(e[r],t));return n}return e}function Vw(e,t){return e.data=Xc(e.data,t),delete e.attachments,e}function Xc(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]=Xc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Xc(e[n],t));return e}const qw=["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 Yw{constructor(t){this.replacer=t}encode(t){return(t.type===Ke.EVENT||t.type===Ke.ACK)&&lu(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=$w(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Jc extends St{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 Ww(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Kc(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(!Gw(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(Jc.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 Um(n);case Ke.DISCONNECT:return n===void 0;case Ke.CONNECT_ERROR:return typeof n=="string"||Um(n);case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&qw.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 Ww{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=Vw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Gw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Um(e){return Object.prototype.toString.call(e)==="[object Object]"}const Kw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Jc,Encoder:Yw,get PacketType(){return Ke}},Symbol.toStringTag,{value:"Module"}));function Vn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Qw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Hm extends St{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(Qw.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 lo(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}lo.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},lo.prototype.reset=function(){this.attempts=0},lo.prototype.setMin=function(e){this.ms=e},lo.prototype.setMax=function(e){this.max=e},lo.prototype.setJitter=function(e){this.jitter=e};class Zc extends St{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,au(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 lo({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||Kw;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 Fw(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){su(()=>{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 Hm(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 ws={};function ed(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Bw(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ws[o]&&a in ws[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Zc(r,t):(ws[o]||(ws[o]=new Zc(r,t)),d=ws[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(ed,{Manager:Zc,Socket:Hm,io:ed,connect:ed});const zm=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&zm.call(Blob),typeof File=="function"||typeof File!="undefined"&&zm.call(File);var jm;(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"})(jm||(jm={}));var J=uo();const wi=We(J);class Xw{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 Jw{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 Ve(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:ae(F({},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 Ve(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,`
1
+ (function(Ie,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Fe(Ie.CimulateMessaging={}))})(this,(function(Ie){"use strict";var U9=Object.defineProperty,H9=Object.defineProperties;var z9=Object.getOwnPropertyDescriptors;var Bc=Object.getOwnPropertySymbols;var Xw=Object.prototype.hasOwnProperty,Jw=Object.prototype.propertyIsEnumerable;var bs=(Ie,Fe)=>(Fe=Symbol[Ie])?Fe:Symbol.for("Symbol."+Ie),j9=Ie=>{throw TypeError(Ie)},nu=Math.pow,xm=(Ie,Fe,We)=>Fe in Ie?U9(Ie,Fe,{enumerable:!0,configurable:!0,writable:!0,value:We}):Ie[Fe]=We,B=(Ie,Fe)=>{for(var We in Fe||(Fe={}))Xw.call(Fe,We)&&xm(Ie,We,Fe[We]);if(Bc)for(var We of Bc(Fe))Jw.call(Fe,We)&&xm(Ie,We,Fe[We]);return Ie},ae=(Ie,Fe)=>H9(Ie,z9(Fe));var sn=(Ie,Fe)=>{var We={};for(var rt in Ie)Xw.call(Ie,rt)&&Fe.indexOf(rt)<0&&(We[rt]=Ie[rt]);if(Ie!=null&&Bc)for(var rt of Bc(Ie))Fe.indexOf(rt)<0&&Jw.call(Ie,rt)&&(We[rt]=Ie[rt]);return We};var Ze=(Ie,Fe,We)=>xm(Ie,typeof Fe!="symbol"?Fe+"":Fe,We);var Ve=(Ie,Fe,We)=>new Promise((rt,yt)=>{var dt=Tt=>{try{Lt(We.next(Tt))}catch(an){yt(an)}},Pe=Tt=>{try{Lt(We.throw(Tt))}catch(an){yt(an)}},Lt=Tt=>Tt.done?rt(Tt.value):Promise.resolve(Tt.value).then(dt,Pe);Lt((We=We.apply(Ie,Fe)).next())}),ao=function(Ie,Fe){this[0]=Ie,this[1]=Fe},wm=(Ie,Fe,We)=>{var rt=(Pe,Lt,Tt,an)=>{try{var uo=We[Pe](Lt),Ts=(Lt=uo.value)instanceof ao,Uc=uo.done;Promise.resolve(Ts?Lt[0]:Lt).then($n=>Ts?rt(Pe==="return"?Pe:"next",Lt[1]?{done:$n.done,value:$n.value}:$n,Tt,an):Tt({value:$n,done:Uc})).catch($n=>rt("throw",$n,Tt,an))}catch($n){an($n)}},yt=Pe=>dt[Pe]=Lt=>new Promise((Tt,an)=>rt(Pe,Lt,Tt,an)),dt={};return We=We.apply(Ie,Fe),dt[bs("asyncIterator")]=()=>dt,yt("next"),yt("throw"),yt("return"),dt},_m=Ie=>{var Fe=Ie[bs("asyncIterator")],We=!1,rt,yt={};return Fe==null?(Fe=Ie[bs("iterator")](),rt=dt=>yt[dt]=Pe=>Fe[dt](Pe)):(Fe=Fe.call(Ie),rt=dt=>yt[dt]=Pe=>{if(We){if(We=!1,dt==="throw")throw Pe;return Pe}return We=!0,{done:!1,value:new ao(new Promise(Lt=>{var Tt=Fe[dt](Pe);Tt instanceof Object||j9("Object expected"),Lt(Tt)}),1)}}),yt[bs("iterator")]=()=>yt,rt("next"),"throw"in Fe?rt("throw"):yt.throw=dt=>{throw dt},"return"in Fe&&rt("return"),yt},Zw=(Ie,Fe,We)=>(Fe=Ie[bs("asyncIterator")])?Fe.call(Ie):(Ie=Ie[bs("iterator")](),Fe={},We=(rt,yt)=>(yt=Ie[rt])&&(Fe[rt]=dt=>new Promise((Pe,Lt,Tt)=>(dt=yt.call(Ie,dt),Tt=dt.done,Promise.resolve(dt.value).then(an=>Pe({value:an,done:Tt}),Lt)))),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-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.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-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:.8125rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:.875rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.75rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;align-items:baseline;gap:8px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:.875rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:.875rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-cart-item-qty{font-size:.75rem;font-weight:500;opacity:.85}.cim-widget-cart-item-remove{padding:0;border:none;background:none;font-family:inherit;font-size:.75rem;font-weight:500;color:var(--cim-widget-font-color, #3f3f46);text-decoration:underline;cursor:pointer}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.8125rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-font-color, #141415);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-font-color, #141415);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-font-color, #141415) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;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 #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__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-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;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}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__express-pay{display:flex;align-items:center;justify-content:center;gap:.4rem;min-height:34px;background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff;font-weight:700}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.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
+ /*$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:{}},yt={},dt={exports:{}},Pe={};var Lt;function Tt(){if(Lt)return Pe;Lt=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"),g=Symbol.iterator;function T(P){return P===null||typeof P!="object"?null:(P=g&&P[g]||P["@@iterator"],typeof P=="function"?P:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function A(P,Z,N){this.props=P,this.context=Z,this.refs=S,this.updater=N||y}A.prototype.isReactComponent={},A.prototype.setState=function(P,Z){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,Z,"setState")},A.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function C(){}C.prototype=A.prototype;function O(P,Z,N){this.props=P,this.context=Z,this.refs=S,this.updater=N||y}var R=O.prototype=new C;R.constructor=O,x(R,A.prototype),R.isPureReactComponent=!0;var H=Array.isArray,W=Object.prototype.hasOwnProperty,F={current:null},K={key:!0,ref:!0,__self:!0,__source:!0};function ce(P,Z,N){var xe,Re={},Oe=null,Be=null;if(Z!=null)for(xe in Z.ref!==void 0&&(Be=Z.ref),Z.key!==void 0&&(Oe=""+Z.key),Z)W.call(Z,xe)&&!K.hasOwnProperty(xe)&&(Re[xe]=Z[xe]);var _e=arguments.length-2;if(_e===1)Re.children=N;else if(1<_e){for(var $e=Array(_e),ot=0;ot<_e;ot++)$e[ot]=arguments[ot+2];Re.children=$e}if(P&&P.defaultProps)for(xe in _e=P.defaultProps,_e)Re[xe]===void 0&&(Re[xe]=_e[xe]);return{$$typeof:e,type:P,key:Oe,ref:Be,props:Re,_owner:F.current}}function be(P,Z){return{$$typeof:e,type:P.type,key:Z,ref:P.ref,props:P.props,_owner:P._owner}}function z(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function X(P){var Z={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(N){return Z[N]})}var se=/\/+/g;function J(P,Z){return typeof P=="object"&&P!==null&&P.key!=null?X(""+P.key):Z.toString(36)}function re(P,Z,N,xe,Re){var Oe=typeof P;(Oe==="undefined"||Oe==="boolean")&&(P=null);var Be=!1;if(P===null)Be=!0;else switch(Oe){case"string":case"number":Be=!0;break;case"object":switch(P.$$typeof){case e:case t:Be=!0}}if(Be)return Be=P,Re=Re(Be),P=xe===""?"."+J(Be,0):xe,H(Re)?(N="",P!=null&&(N=P.replace(se,"$&/")+"/"),re(Re,Z,N,"",function(ot){return ot})):Re!=null&&(z(Re)&&(Re=be(Re,N+(!Re.key||Be&&Be.key===Re.key?"":(""+Re.key).replace(se,"$&/")+"/")+P)),Z.push(Re)),1;if(Be=0,xe=xe===""?".":xe+":",H(P))for(var _e=0;_e<P.length;_e++){Oe=P[_e];var $e=xe+J(Oe,_e);Be+=re(Oe,Z,N,$e,Re)}else if($e=T(P),typeof $e=="function")for(P=$e.call(P),_e=0;!(Oe=P.next()).done;)Oe=Oe.value,$e=xe+J(Oe,_e++),Be+=re(Oe,Z,N,$e,Re);else if(Oe==="object")throw Z=String(P),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return Be}function fe(P,Z,N){if(P==null)return P;var xe=[],Re=0;return re(P,xe,"","",function(Oe){return Z.call(N,Oe,Re++)}),xe}function ke(P){if(P._status===-1){var Z=P._result;Z=Z(),Z.then(function(N){(P._status===0||P._status===-1)&&(P._status=1,P._result=N)},function(N){(P._status===0||P._status===-1)&&(P._status=2,P._result=N)}),P._status===-1&&(P._status=0,P._result=Z)}if(P._status===1)return P._result.default;throw P._result}var he={current:null},Q={transition:null},oe={ReactCurrentDispatcher:he,ReactCurrentBatchConfig:Q,ReactCurrentOwner:F};function v(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:fe,forEach:function(P,Z,N){fe(P,function(){Z.apply(this,arguments)},N)},count:function(P){var Z=0;return fe(P,function(){Z++}),Z},toArray:function(P){return fe(P,function(Z){return Z})||[]},only:function(P){if(!z(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Pe.Component=A,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=O,Pe.StrictMode=r,Pe.Suspense=d,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,Pe.act=v,Pe.cloneElement=function(P,Z,N){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var xe=x({},P.props),Re=P.key,Oe=P.ref,Be=P._owner;if(Z!=null){if(Z.ref!==void 0&&(Oe=Z.ref,Be=F.current),Z.key!==void 0&&(Re=""+Z.key),P.type&&P.type.defaultProps)var _e=P.type.defaultProps;for($e in Z)W.call(Z,$e)&&!K.hasOwnProperty($e)&&(xe[$e]=Z[$e]===void 0&&_e!==void 0?_e[$e]:Z[$e])}var $e=arguments.length-2;if($e===1)xe.children=N;else if(1<$e){_e=Array($e);for(var ot=0;ot<$e;ot++)_e[ot]=arguments[ot+2];xe.children=_e}return{$$typeof:e,type:P.type,key:Re,ref:Oe,props:xe,_owner:Be}},Pe.createContext=function(P){return P={$$typeof:u,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:a,_context:P},P.Consumer=P},Pe.createElement=ce,Pe.createFactory=function(P){var Z=ce.bind(null,P);return Z.type=P,Z},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(P){return{$$typeof:c,render:P}},Pe.isValidElement=z,Pe.lazy=function(P){return{$$typeof:p,_payload:{_status:-1,_result:P},_init:ke}},Pe.memo=function(P,Z){return{$$typeof:h,type:P,compare:Z===void 0?null:Z}},Pe.startTransition=function(P){var Z=Q.transition;Q.transition={};try{P()}finally{Q.transition=Z}},Pe.unstable_act=v,Pe.useCallback=function(P,Z){return he.current.useCallback(P,Z)},Pe.useContext=function(P){return he.current.useContext(P)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(P){return he.current.useDeferredValue(P)},Pe.useEffect=function(P,Z){return he.current.useEffect(P,Z)},Pe.useId=function(){return he.current.useId()},Pe.useImperativeHandle=function(P,Z,N){return he.current.useImperativeHandle(P,Z,N)},Pe.useInsertionEffect=function(P,Z){return he.current.useInsertionEffect(P,Z)},Pe.useLayoutEffect=function(P,Z){return he.current.useLayoutEffect(P,Z)},Pe.useMemo=function(P,Z){return he.current.useMemo(P,Z)},Pe.useReducer=function(P,Z,N){return he.current.useReducer(P,Z,N)},Pe.useRef=function(P){return he.current.useRef(P)},Pe.useState=function(P){return he.current.useState(P)},Pe.useSyncExternalStore=function(P,Z,N){return he.current.useSyncExternalStore(P,Z,N)},Pe.useTransition=function(){return he.current.useTransition()},Pe.version="18.3.1",Pe}var an;function uo(){return an||(an=1,dt.exports=Tt()),dt.exports}var Ts;function Uc(){if(Ts)return yt;Ts=1;var e=uo(),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,g={},T=null,y=null;h!==void 0&&(T=""+h),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(g[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)g[p]===void 0&&(g[p]=d[p]);return{$$typeof:t,type:c,key:T,ref:y,props:g,_owner:o.current}}return yt.Fragment=n,yt.jsx=u,yt.jsxs=u,yt}var $n;function r2(){return $n||($n=1,rt.exports=Uc()),rt.exports}var _=r2();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 ru=Object.create(null);Object.keys(or).forEach(e=>{ru[or[e]]=e});const Hc={type:"error",data:"parser error"},vm=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Sm=typeof ArrayBuffer=="function",Am=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,zc=({type:e,data:t},n,r)=>vm&&t instanceof Blob?n?r(t):Cm(t,r):Sm&&(t instanceof ArrayBuffer||Am(t))?n?r(t):Cm(new Blob([t]),r):r(or[e]+(t||"")),Cm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function km(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let jc;function i2(e,t){if(vm&&e.data instanceof Blob)return e.data.arrayBuffer().then(km).then(t);if(Sm&&(e.data instanceof ArrayBuffer||Am(e.data)))return t(km(e.data));zc(e,!1,n=>{jc||(jc=new TextEncoder),t(jc.encode(n))})}const Nm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xs=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Nm.length;e++)xs[Nm.charCodeAt(e)]=e;const o2=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=xs[e.charCodeAt(r)],u=xs[e.charCodeAt(r+1)],c=xs[e.charCodeAt(r+2)],d=xs[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},s2=typeof ArrayBuffer=="function",$c=(e,t)=>{if(typeof e!="string")return{type:"message",data:Om(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:a2(e.substring(1),t)}:ru[n]?e.length>1?{type:ru[n],data:e.substring(1)}:{type:ru[n]}:Hc},a2=(e,t)=>{if(s2){const n=o2(e);return Om(n,t)}else return{base64:!0,data:e}},Om=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Im="",u2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{zc(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Im))})})},l2=(e,t)=>{const n=e.split(Im),r=[];for(let o=0;o<n.length;o++){const a=$c(n[o],t);if(r.push(a),a.type==="error")break}return r};function c2(){return new TransformStream({transform(e,t){i2(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 Vc;function iu(e){return e.reduce((t,n)=>t+n.length,0)}function ou(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 d2(e,t){Vc||(Vc=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(iu(n)<1)break;const d=ou(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(iu(n)<2)break;const d=ou(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(iu(n)<8)break;const d=ou(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),p=h.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(Hc);break}o=p*Math.pow(2,32)+h.getUint32(4),r=3}else{if(iu(n)<o)break;const d=ou(n,o);c.enqueue($c(a?d:Vc.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(Hc);break}}}})}const Rm=4;function St(e){if(e)return f2(e)}function f2(e){for(var t in St.prototype)e[t]=St.prototype[t];return e}St.prototype.on=St.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},St.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},St.prototype.off=St.prototype.removeListener=St.prototype.removeAllListeners=St.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},St.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},St.prototype.emitReserved=St.prototype.emit,St.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},St.prototype.hasListeners=function(e){return!!this.listeners(e).length};const su=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")(),h2="arraybuffer";function $9(){}function Pm(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const p2=On.setTimeout,m2=On.clearTimeout;function au(e,t){t.useNativeTimers?(e.setTimeoutFn=p2.bind(On),e.clearTimeoutFn=m2.bind(On)):(e.setTimeoutFn=On.setTimeout.bind(On),e.clearTimeoutFn=On.clearTimeout.bind(On))}const g2=1.33;function E2(e){return typeof e=="string"?y2(e):Math.ceil((e.byteLength||e.size)*g2)}function y2(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 Lm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function b2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function T2(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 x2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class qc extends St{constructor(t){super(),this.writable=!1,au(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 x2(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=$c(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=b2(t);return n.length?"?"+n:""}}class w2 extends qc{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)};l2(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,u2(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]=Lm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Dm=!1;try{Dm=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const _2=Dm;function v2(){}class S2 extends w2{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 St{constructor(t,n,r){super(),this.createRequest=t,au(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=Pm(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=v2,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",Mm);else if(typeof addEventListener=="function"){const e="onpagehide"in On?"pagehide":"unload";addEventListener(e,Mm,!1)}}function Mm(){for(let e in sr.requests)sr.requests.hasOwnProperty(e)&&sr.requests[e].abort()}const A2=(function(){const e=Fm({xdomain:!1});return e&&e.responseType!==null})();class C2 extends S2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=A2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new sr(Fm,this.uri(),t)}}function Fm(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||_2))return new XMLHttpRequest}catch(n){}if(!t)try{return new On[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Bm=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class k2 extends qc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Bm?{}:Pm(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;zc(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&su(()=>{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]=Lm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Yc=On.WebSocket||On.MozWebSocket;class N2 extends k2{createSocket(t,n,r){return Bm?new Yc(t,n,r):n?new Yc(t,n):new Yc(t)}doWrite(t,n){this.ws.send(n)}}class O2 extends qc{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=d2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=c2();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&&su(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const I2={websocket:N2,webtransport:O2,polling:C2},R2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,P2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Wc(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=R2.exec(e||""),a={},u=14;for(;u--;)a[P2[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=L2(a,a.path),a.queryKey=D2(a,a.query),a}function L2(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 D2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Gc=typeof addEventListener=="function"&&typeof removeEventListener=="function",uu=[];Gc&&addEventListener("offline",()=>{uu.forEach(e=>e())},!1);class jr extends St{constructor(t,n){if(super(),this.binaryType=h2,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=Wc(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=Wc(n.host).host);au(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=T2(this.opts.query)),Gc&&(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"})},uu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Rm,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&&jr.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",jr.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+=E2(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,su(()=>{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(jr.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(),Gc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=uu.indexOf(this._offlineEventListener);r!==-1&&uu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}jr.protocol=Rm;class M2 extends jr{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;jr.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;jr.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 T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=g=>{const T=new Error("probe error: "+g);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function c(){u("transport closed")}function d(){u("socket closed")}function h(g){n&&g.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 F2=class extends M2{constructor(t,n={}){const r=typeof t=="object",o=r?B({},t):B({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>I2[a]).filter(a=>!!a)),super(r?o:t,o)}};function B2(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=Wc(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 U2=typeof ArrayBuffer=="function",H2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Um=Object.prototype.toString,z2=typeof Blob=="function"||typeof Blob!="undefined"&&Um.call(Blob)==="[object BlobConstructor]",j2=typeof File=="function"||typeof File!="undefined"&&Um.call(File)==="[object FileConstructor]";function Kc(e){return U2&&(e instanceof ArrayBuffer||H2(e))||z2&&e instanceof Blob||j2&&e instanceof File}function lu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(lu(e[n]))return!0;return!1}if(Kc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return lu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&lu(e[n]))return!0;return!1}function $2(e){const t=[],n=e.data,r=e;return r.data=Qc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Qc(e,t){if(!e)return e;if(Kc(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]=Qc(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]=Qc(e[r],t));return n}return e}function V2(e,t){return e.data=Xc(e.data,t),delete e.attachments,e}function Xc(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]=Xc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Xc(e[n],t));return e}const q2=["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 Y2{constructor(t){this.replacer=t}encode(t){return(t.type===Ke.EVENT||t.type===Ke.ACK)&&lu(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=$2(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Jc extends St{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 W2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Kc(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(!G2(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(Jc.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 Hm(n);case Ke.DISCONNECT:return n===void 0;case Ke.CONNECT_ERROR:return typeof n=="string"||Hm(n);case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&q2.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 W2{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=V2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const G2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Hm(e){return Object.prototype.toString.call(e)==="[object Object]"}const K2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Jc,Encoder:Y2,get PacketType(){return Ke}},Symbol.toStringTag,{value:"Module"}));function Vn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Q2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zm extends St{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(Q2.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++,g=n.pop();this._registerAckCallback(p,g),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 lo(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}lo.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},lo.prototype.reset=function(){this.attempts=0},lo.prototype.setMin=function(e){this.ms=e},lo.prototype.setMax=function(e){this.max=e},lo.prototype.setJitter=function(e){this.jitter=e};class Zc extends St{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,au(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 lo({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||K2;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 F2(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){su(()=>{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 zm(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 ws={};function ed(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=B2(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ws[o]&&a in ws[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Zc(r,t):(ws[o]||(ws[o]=new Zc(r,t)),d=ws[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(ed,{Manager:Zc,Socket:zm,io:ed,connect:ed});const jm=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&jm.call(Blob),typeof File=="function"||typeof File!="undefined"&&jm.call(File);var $m;(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"})($m||($m={}));var ee=uo();const wi=We(ee);class X2{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 J2{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 Ve(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:ae(B({},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 Ve(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(`
5
5
 
6
6
  `))>=0;){const d=o.slice(0,c);o=o.slice(c+2),this.parseFrame(d)}}}catch(a){return a instanceof DOMException&&a.name==="AbortError"?void this.logger.debug("SSE stream aborted (intentional disconnect)"):(this.logger.error("SSE stream error:",a),this.reading=!1,void this.onClose(a instanceof Error?a.message:"Unknown stream error"))}finally{n.releaseLock()}this.reading=!1,this.logger.info("SSE stream ended"),this.onClose("stream_ended")})}parseFrame(t){let n="message";const r=[];for(const a of t.split(`
7
7
  `))if(a.startsWith("event:"))n=a.slice(6).trim();else if(a.startsWith("data:")){const u=a.slice(5);r.push(u.startsWith(" ")?u.slice(1):u)}else a.startsWith(":");if(r.length===0)return;const o=r.join(`
8
- `);this.logger.debug(`SSE event: ${n}`,o.slice(0,200)),this.onEvent(n,o)}}class $r extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let Zw=class extends $r{constructor(t,n,r,o){super(t,"api",o),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class $m extends $r{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let td=class extends $r{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class e_{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}class t_ extends Xw{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:o={}}){var u,c,d,h,p,E,T;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=o.maxRetries)!=null?u:3,timeout:(c=o.timeout)!=null?c:15e3,maxReconnectAttempts:(d=o.maxReconnectAttempts)!=null?d:5,reconnectDelay:(h=o.reconnectDelay)!=null?h:2e3,enableLogging:(p=o.enableLogging)!=null?p:!1,platform:(E=o.platform)!=null?E:"Web",capabilitiesVersion:(T=o.capabilitiesVersion)!=null?T:"1"};this.maxRetries=a.maxRetries,this.timeout=a.timeout,this.maxReconnectAttempts=a.maxReconnectAttempts,this.reconnectDelay=a.reconnectDelay,this.platform=a.platform,this.capabilitiesVersion=a.capabilitiesVersion,this.logger=new e_(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return Ve(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return Ve(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return Ve(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new $r("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return Ve(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return Ve(this,null,function*(){var u,c,d;this.assertConnected();const n=new URLSearchParams;(t==null?void 0:t.inclClosedConvs)!=null&&n.set("inclClosedConvs",String(t.inclClosedConvs)),(t==null?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),t!=null&&t.conversationId&&n.set("conversationId",t.conversationId),(t==null?void 0:t.startTimestamp)!=null&&n.set("startTimestamp",String(t.startTimestamp)),(t==null?void 0:t.endTimestamp)!=null&&n.set("endTimestamp",String(t.endTimestamp));const r=n.toString(),o="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",o);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(c=a.openConversationsFound)!=null?c:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return Ve(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const o=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${o?`?${o}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}resumeConversation(t){if(this.assertConnected(),!t)throw new $r("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return Ve(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}openSSE(t){return Ve(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new Jw(n,r,(o,a)=>this.handleSSEEvent(o,a),o=>this.handleSSEClose(o),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>Ve(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const o=r instanceof Error?r.message:String(r);if(o.includes("(401)"))return this.logger.error("SSE rejected token (401) — session expired"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);this.logger.error(`Reconnect attempt ${this.reconnectAttempts} failed: ${o}`),this.attemptReconnect()}}),n)}clearReconnectTimer(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null)}handleSSEEvent(t,n){if(t==="ping")return;let r;try{r=JSON.parse(n)}catch(o){return void this.logger.debug(`Non-JSON SSE event (${t}): ${n.slice(0,100)}`)}switch(t){case"CONVERSATION_ROUTING_RESULT":this.handleRoutingResult(r);break;case"CONVERSATION_MESSAGE":this.handleConversationMessage(r);break;case"CONVERSATION_STREAMING_TOKEN":this.handleStreamingToken(r);break;case"CONVERSATION_TYPING_STARTED_INDICATOR":this.handleTypingStarted(r);break;case"CONVERSATION_TYPING_STOPPED_INDICATOR":this.handleTypingStopped(r);break;case"CONVERSATION_PROGRESS_INDICATOR":this.handleProgressIndicator(r);break;case"CONVERSATION_PARTICIPANT_CHANGED":this.handleParticipantChanged(r);break;case"CONVERSATION_CLOSE_CONVERSATION":this.handleConversationClosed(r);break;default:this.logger.debug(`Unhandled SSE event type: ${t}`)}}handleRoutingResult(t){let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.failureType||n.routingFailureType||"",o=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:o,failureType:o?void 0:r,raw:n}),o||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var c;const n=t.conversationEntry;if(!n)return;const r=((c=n.sender)==null?void 0:c.role)||"";if(r==="EndUser"||r==="Customer")return;const o=this.parseEntryPayload(n),a=this.getNestedValue(o,"abstractMessage"),u=this.getNestedString(a,"staticContent","text")||this.getNestedString(a,"content","text")||"";u&&this.emit("message",{conversationId:this._conversationId||"",messageId:n.identifier||"",content:u,sender:{role:r,name:n.senderDisplayName},timestamp:n.transcriptedTimestamp||new Date().toISOString(),raw:o})}handleStreamingToken(t){let n,r,o,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),c=this.getNestedValue(u,"streamingToken");a=this.getNestedString(c,"token","text")||this.getNestedString(c,"token","content")||"";const d=this.getNestedValue(c,"sequenceNumber");typeof d=="number"&&(n=d);const h=this.getNestedString(c,"targetMessageIdentifier");h&&(r=h);const p=this.getNestedString(c,"tokenType");p&&(o=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",F(F(F({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),o?{tokenType:o}:{})):this.logger.warn("STREAMING_TOKEN received but no token text could be extracted — payload shape may have changed")}handleTypingStarted(t){var n;this.emit("typing_started",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleTypingStopped(t){var n;this.emit("typing_stopped",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleProgressIndicator(t){const n=t.conversationEntry;if(!n)return;const r=this.parseEntryPayload(n),o=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(o,"progressMessage","text")||this.getNestedString(o,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(o,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var o,a,u,c,d,h,p;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries;if(r&&r.length>0)for(const E of r){const T=E.participant,y=E.displayName||(T==null?void 0:T.displayName)||((o=t.conversationEntry)==null?void 0:o.senderDisplayName)||"Agent",x=(T==null?void 0:T.role)||((u=(a=t.conversationEntry)==null?void 0:a.sender)==null?void 0:u.role)||"",v=E.operation||E.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(v)})}else{const E=((c=t.conversationEntry)==null?void 0:c.senderDisplayName)||n.participantName||((d=n.participant)==null?void 0:d.displayName)||"Agent",T=n.operation||n.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:((p=(h=t.conversationEntry)==null?void 0:h.sender)==null?void 0:p.role)||"",name:E},action:this.normalizeParticipantAction(T)})}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return Ve(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new td("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,o){return Ve(this,null,function*(){const a=(o==null?void 0:o.useAuth)!==!1;let u=0;for(;;){let c;try{const d=new AbortController;c=setTimeout(()=>d.abort(),(o==null?void 0:o.timeout)||this.timeout);const h=F({"Content-Type":"application/json"},o==null?void 0:o.headers);a&&this._accessToken&&(h.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:h,signal:(o==null?void 0:o.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const E=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(c),!E.ok){const T=yield E.text().catch(()=>E.statusText);if(E.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new td(`Request ${t} ${n} failed (401): continuation token expired or invalid. Reconnect without a continuation token to create a new session.`);if(this._conversationId)throw this.logger.warn("Got 401 with active conversation — cannot auto-refresh (would orphan conversation)"),new td(`Request ${t} ${n} failed (401): session expired. Call connect() to start a new session.`);this.logger.info("Got 401 — refreshing token and retrying..."),this._accessToken=yield this.fetchAccessToken(),u++;continue}throw new Zw(`Request ${t} ${n} failed (${E.status}): ${T}`,E.status,T)}return E.status===204||t==="DELETE"?{}:E.text().then(T=>T?JSON.parse(T):null)}catch(d){if(clearTimeout(c),d instanceof $r)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new $m("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const h=100*Math.random(),p=300*Math.pow(2,u-1)+h;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(E=>setTimeout(E,p));continue}throw new $m(`Network error: ${d.message}`,u,{cause:d})}throw new $r(`Unexpected error: ${d instanceof Error?d.message:String(d)}`,"unknown",{cause:d instanceof Error?d:void 0})}}})}assertConnected(){if(!this._isConnected||!this._accessToken)throw new $r("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const o of n){if(r==null||typeof r!="object")return;r=r[o]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}}const B="cim-widget",Sr=`--${B}`,Vr={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},n_=(e=Vr)=>({[`${Sr}-primary-color`]:e.primaryColor||Vr.primaryColor,[`${Sr}-secondary-color`]:e.secondaryColor||Vr.secondaryColor,[`${Sr}-font-color`]:e.fontColor||Vr.fontColor,[`${Sr}-font-family`]:e.fontFamily||Vr.fontFamily,[`${Sr}-background-color`]:e.backgroundColor||Vr.backgroundColor,[`${Sr}-border-color`]:e.borderColor||Vr.borderColor,[`${Sr}-border-radius`]:e.borderRadius||Vr.borderRadius});function Vm(e,t){return function(){return e.apply(t,arguments)}}const{toString:r_}=Object.prototype,{getPrototypeOf:cu}=Object,{iterator:du,toStringTag:qm}=Symbol,fu=(e=>t=>{const n=r_.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qn=e=>(e=e.toLowerCase(),t=>fu(t)===e),hu=e=>t=>typeof t===e,{isArray:co}=Array,fo=hu("undefined");function _s(e){return e!==null&&!fo(e)&&e.constructor!==null&&!fo(e.constructor)&&un(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ym=qn("ArrayBuffer");function i_(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ym(e.buffer),t}const o_=hu("string"),un=hu("function"),Wm=hu("number"),vs=e=>e!==null&&typeof e=="object",s_=e=>e===!0||e===!1,pu=e=>{if(fu(e)!=="object")return!1;const t=cu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(qm in e)&&!(du in e)},a_=e=>{if(!vs(e)||_s(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},u_=qn("Date"),l_=qn("File"),c_=e=>!!(e&&typeof e.uri!="undefined"),d_=e=>e&&typeof e.getParts!="undefined",f_=qn("Blob"),h_=qn("FileList"),p_=e=>vs(e)&&un(e.pipe);function m_(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const Gm=m_(),Km=typeof Gm.FormData!="undefined"?Gm.FormData:void 0,g_=e=>{if(!e)return!1;if(Km&&e instanceof Km)return!0;const t=cu(e);if(!t||t===Object.prototype||!un(e.append))return!1;const n=fu(e);return n==="formdata"||n==="object"&&un(e.toString)&&e.toString()==="[object FormData]"},E_=qn("URLSearchParams"),[y_,b_,T_,x_]=["ReadableStream","Request","Response","Headers"].map(qn),w_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ss(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),co(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(_s(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function Qm(e,t){if(_s(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const _i=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Xm=e=>!fo(e)&&e!==_i;function nd(...e){const{caseless:t,skipUndefined:n}=Xm(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&Qm(r,u)||u,d=rd(r,c)?r[c]:void 0;pu(d)&&pu(a)?r[c]=nd(d,a):pu(a)?r[c]=nd({},a):co(a)?r[c]=a.slice():(!n||!fo(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&Ss(e[a],o);return r}const __=(e,t,n,{allOwnKeys:r}={})=>(Ss(t,(o,a)=>{n&&un(o)?Object.defineProperty(e,a,{__proto__:null,value:Vm(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),v_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),S_=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},A_=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&cu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},C_=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},k_=e=>{if(!e)return null;if(co(e))return e;let t=e.length;if(!Wm(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},N_=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&cu(Uint8Array)),O_=(e,t)=>{const r=(e&&e[du]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},I_=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},R_=qn("HTMLFormElement"),P_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),rd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),L_=qn("RegExp"),Jm=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ss(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},D_=e=>{Jm(e,(t,n)=>{if(un(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(un(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},M_=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return co(e)?r(e):r(String(e).split(t)),n},F_=()=>{},B_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function U_(e){return!!(e&&un(e.append)&&e[qm]==="FormData"&&e[du])}const H_=e=>{const t=new WeakSet,n=r=>{if(vs(r)){if(t.has(r))return;if(_s(r))return r;if(!("toJSON"in r)){t.add(r);const o=co(r)?[]:{};return Ss(r,(a,u)=>{const c=n(a);!fo(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},z_=qn("AsyncFunction"),j_=e=>e&&(vs(e)||un(e))&&un(e.then)&&un(e.catch),Zm=((e,t)=>e?setImmediate:t?((n,r)=>(_i.addEventListener("message",({source:o,data:a})=>{o===_i&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),_i.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",un(_i.postMessage)),$_=typeof queueMicrotask!="undefined"?queueMicrotask.bind(_i):typeof process!="undefined"&&process.nextTick||Zm,V={isArray:co,isArrayBuffer:Ym,isBuffer:_s,isFormData:g_,isArrayBufferView:i_,isString:o_,isNumber:Wm,isBoolean:s_,isObject:vs,isPlainObject:pu,isEmptyObject:a_,isReadableStream:y_,isRequest:b_,isResponse:T_,isHeaders:x_,isUndefined:fo,isDate:u_,isFile:l_,isReactNativeBlob:c_,isReactNative:d_,isBlob:f_,isRegExp:L_,isFunction:un,isStream:p_,isURLSearchParams:E_,isTypedArray:N_,isFileList:h_,forEach:Ss,merge:nd,extend:__,trim:w_,stripBOM:v_,inherits:S_,toFlatObject:A_,kindOf:fu,kindOfTest:qn,endsWith:C_,toArray:k_,forEachEntry:O_,matchAll:I_,isHTMLForm:R_,hasOwnProperty:rd,hasOwnProp:rd,reduceDescriptors:Jm,freezeMethods:D_,toObjectSet:M_,toCamelCase:P_,noop:F_,toFiniteNumber:B_,findKey:Qm,global:_i,isContextDefined:Xm,isSpecCompliantForm:U_,toJSONObject:H_,isAsyncFn:z_,isThenable:j_,setImmediate:Zm,asap:$_,isIterable:e=>e!=null&&un(e[du])},V_=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),q_=e=>{const t={};let n,r,o;return e&&e.split(`
9
- `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&V_[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function Y_(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const W_=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),G_=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function id(e,t){return V.isArray(e)?e.map(n=>id(n,t)):Y_(String(e).replace(t,""))}const K_=e=>id(e,W_),Q_=e=>id(e,G_);function e0(e){const t=Object.create(null);return V.forEach(e.toJSON(),(n,r)=>{t[r]=Q_(n)}),t}const t0=Symbol("internals");function As(e){return e&&String(e).trim().toLowerCase()}function mu(e){return e===!1||e==null?e:V.isArray(e)?e.map(mu):K_(String(e))}function X_(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const J_=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function od(e,t,n,r,o){if(V.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function Z_(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ev(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let tn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,h){const p=As(d);if(!p)throw new Error("header name must be a non-empty string");const E=V.findKey(o,p);(!E||o[E]===void 0||h===!0||h===void 0&&o[E]!==!1)&&(o[E||d]=mu(c))}const u=(c,d)=>V.forEach(c,(h,p)=>a(h,p,d));if(V.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(V.isString(t)&&(t=t.trim())&&!J_(t))u(q_(t),n);else if(V.isObject(t)&&V.isIterable(t)){let c={},d,h;for(const p of t){if(!V.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[h=p[0]]=(d=c[h])?V.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=As(t),t){const r=V.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return X_(o);if(V.isFunction(n))return n.call(this,o,r);if(V.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=As(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||od(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=As(u),u){const c=V.findKey(r,u);c&&(!n||od(r,r[c],c,n))&&(delete r[c],o=!0)}}return V.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||od(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return V.forEach(this,(o,a)=>{const u=V.findKey(r,a);if(u){n[u]=mu(o),delete n[a];return}const c=t?Z_(a):String(a).trim();c!==a&&delete n[a],n[c]=mu(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return V.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
10
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[t0]=this[t0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=As(u);r[c]||(ev(o,u),r[c]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}};tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(tn);const tv="[REDACTED ****]";function nv(e){if(V.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(V.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function rv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||V.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof tn&&(a=a.toJSON()),r.push(a);let u;if(V.isArray(a))u=[],a.forEach((c,d)=>{const h=o(c);V.isUndefined(h)||(u[d]=h)});else{if(!V.isPlainObject(a)&&nv(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const h=n.has(c.toLowerCase())?tv:o(d);V.isUndefined(h)||(u[c]=h)}}return r.pop(),u};return o(e)}let Ae=class ew extends Error{static from(t,n,r,o,a,u){const c=new ew(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&V.hasOwnProp(t,"redact")?t.redact:void 0,r=V.isArray(n)&&n.length>0?rv(t,n):V.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ae.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ae.ERR_BAD_OPTION="ERR_BAD_OPTION",Ae.ECONNABORTED="ECONNABORTED",Ae.ETIMEDOUT="ETIMEDOUT",Ae.ECONNREFUSED="ECONNREFUSED",Ae.ERR_NETWORK="ERR_NETWORK",Ae.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ae.ERR_DEPRECATED="ERR_DEPRECATED",Ae.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ae.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ae.ERR_CANCELED="ERR_CANCELED",Ae.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ae.ERR_INVALID_URL="ERR_INVALID_URL",Ae.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const iv=null;function sd(e){return V.isPlainObject(e)||V.isArray(e)}function n0(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function ad(e,t,n){return e?e.concat(t).map(function(o,a){return o=n0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function ov(e){return V.isArray(e)&&!e.some(sd)}const sv=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function gu(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,C){return!V.isUndefined(C[A])});const r=n.metaTokens,o=n.visitor||E,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,h=c&&V.isSpecCompliantForm(t);if(!V.isFunction(o))throw new TypeError("visitor must be a function");function p(v){if(v===null)return"";if(V.isDate(v))return v.toISOString();if(V.isBoolean(v))return v.toString();if(!h&&V.isBlob(v))throw new Ae("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(v)||V.isTypedArray(v)?h&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function E(v,A,C){let O=v;if(V.isReactNative(t)&&V.isReactNativeBlob(v))return t.append(ad(C,A,a),p(v)),!1;if(v&&!C&&typeof v=="object"){if(V.endsWith(A,"{}"))A=r?A:A.slice(0,-2),v=JSON.stringify(v);else if(V.isArray(v)&&ov(v)||(V.isFileList(v)||V.endsWith(A,"[]"))&&(O=V.toArray(v)))return A=n0(A),O.forEach(function(H,W){!(V.isUndefined(H)||H===null)&&t.append(u===!0?ad([A],W,a):u===null?A:A+"[]",p(H))}),!1}return sd(v)?!0:(t.append(ad(C,A,a),p(v)),!1)}const T=[],y=Object.assign(sv,{defaultVisitor:E,convertValue:p,isVisitable:sd});function x(v,A,C=0){if(!V.isUndefined(v)){if(C>d)throw new Ae("Object is too deeply nested ("+C+" levels). Max depth: "+d,Ae.ERR_FORM_DATA_DEPTH_EXCEEDED);if(T.indexOf(v)!==-1)throw Error("Circular reference detected in "+A.join("."));T.push(v),V.forEach(v,function(R,H){(!(V.isUndefined(R)||R===null)&&o.call(t,R,V.isString(H)?H.trim():H,A,y))===!0&&x(R,A?A.concat(H):[H],C+1)}),T.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return x(e),t}function r0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ud(e,t){this._pairs=[],e&&gu(e,this,t)}const i0=ud.prototype;i0.append=function(t,n){this._pairs.push([t,n])},i0.toString=function(t){const n=t?function(r){return t.call(this,r,r0)}:r0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function av(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function o0(e,t,n){if(!t)return e;const r=n&&n.encode||av,o=V.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=V.isURLSearchParams(t)?t.toString():new ud(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class s0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ld={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},uv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:ud,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},cd=typeof window!="undefined"&&typeof document!="undefined",dd=typeof navigator=="object"&&navigator||void 0,lv=cd&&(!dd||["ReactNative","NativeScript","NS"].indexOf(dd.product)<0),cv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dv=cd&&window.location.href||"http://localhost",Yt=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:cd,hasStandardBrowserEnv:lv,hasStandardBrowserWebWorkerEnv:cv,navigator:dd,origin:dv},Symbol.toStringTag,{value:"Module"}))),uv);function fv(e,t){return gu(e,new Yt.classes.URLSearchParams,F({visitor:function(n,r,o,a){return Yt.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function hv(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function pv(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function a0(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&V.isArray(o)?o.length:u,d?(V.hasOwnProp(o,u)?o[u]=V.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!V.hasOwnProp(o,u)||!V.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&V.isArray(o[u])&&(o[u]=pv(o[u])),!c)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,o)=>{t(hv(r),o,n,0)}),n}return null}const ho=(e,t)=>e!=null&&V.hasOwnProp(e,t)?e[t]:void 0;function mv(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Cs={transitional:ld,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return o?JSON.stringify(a0(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=ho(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return fv(t,d).toString();if((c=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=ho(this,"env"),p=h&&h.FormData;return gu(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),mv(t)):t}],transformResponse:[function(t){const n=ho(this,"transitional")||Cs.transitional,r=n&&n.forcedJSONParsing,o=ho(this,"responseType"),a=o==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,ho(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ae.from(d,Ae.ERR_BAD_RESPONSE,this,null,ho(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],e=>{Cs.headers[e]={}});function fd(e,t){const n=this||Cs,r=t||n,o=tn.from(r.headers);let a=r.data;return V.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function u0(e){return!!(e&&e.__CANCEL__)}let ks=class extends Ae{constructor(t,n,r){super(t==null?"canceled":t,Ae.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function l0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ae("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ae.ERR_BAD_REQUEST:Ae.ERR_BAD_RESPONSE,n.config,n.request,n))}function gv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Ev(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),p=r[a];u||(u=h),n[o]=d,r[o]=h;let E=a,T=0;for(;E!==o;)T+=n[E++],E=E%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),h-u<t)return;const y=p&&h-p;return y?Math.round(T*1e3/y):void 0}}function yv(e,t){let n=0,r=1e3/t,o,a;const u=(h,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e(...h)};return[(...h)=>{const p=Date.now(),E=p-n;E>=r?u(h,p):(o=h,a||(a=setTimeout(()=>{a=null,u(o)},r-E)))},()=>o&&u(o)]}const Eu=(e,t,n=3)=>{let r=0;const o=Ev(50,250);return yv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,h=Math.max(0,d-r),p=o(h);r=Math.max(r,d);const E={loaded:d,total:c,progress:c?d/c:void 0,bytes:h,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(E)},n)},c0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},d0=e=>(...t)=>V.asap(()=>e(...t)),bv=Yt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Yt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Yt.origin),Yt.navigator&&/(msie|trident)/i.test(Yt.navigator.userAgent)):()=>!0,Tv=Yt.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&c.push(`path=${r}`),V.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),V.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function xv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function wv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function f0(e,t,n){let r=!xv(t);return e&&(r||n===!1)?wv(e,t):t}const h0=e=>e instanceof tn?F({},e):e;function vi(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(h,p,E,T){return V.isPlainObject(h)&&V.isPlainObject(p)?V.merge.call({caseless:T},h,p):V.isPlainObject(p)?V.merge({},p):V.isArray(p)?p.slice():p}function o(h,p,E,T){if(V.isUndefined(p)){if(!V.isUndefined(h))return r(void 0,h,E,T)}else return r(h,p,E,T)}function a(h,p){if(!V.isUndefined(p))return r(void 0,p)}function u(h,p){if(V.isUndefined(p)){if(!V.isUndefined(h))return r(void 0,h)}else return r(void 0,p)}function c(h,p,E){if(V.hasOwnProp(t,E))return r(h,p);if(V.hasOwnProp(e,E))return r(void 0,h)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(h,p,E)=>o(h0(h),h0(p),E,!0)};return V.forEach(Object.keys(F(F({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const E=V.hasOwnProp(d,p)?d[p]:o,T=V.hasOwnProp(e,p)?e[p]:void 0,y=V.hasOwnProp(t,p)?t[p]:void 0,x=E(T,y,p);V.isUndefined(x)&&E!==c||(n[p]=x)}),n}const _v=["content-type","content-length"];function vv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{_v.includes(r.toLowerCase())&&e.set(r,o)})}const Sv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),p0=e=>{const t=vi({},e),n=T=>V.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),h=n("baseURL"),p=n("allowAbsoluteUrls"),E=n("url");if(t.headers=c=tn.from(c),t.url=o0(f0(h,E,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?Sv(d.password):""))),V.isFormData(r)&&(Yt.hasStandardBrowserEnv||Yt.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):V.isFunction(r.getHeaders)&&vv(c,r.getHeaders(),n("formDataHeaderPolicy"))),Yt.hasStandardBrowserEnv&&(V.isFunction(o)&&(o=o(t)),o===!0||o==null&&bv(t.url))){const y=a&&u&&Tv.read(u);y&&c.set(a,y)}return t},Av=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=p0(e);let a=o.data;const u=tn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:h}=o,p,E,T,y,x;function v(){y&&y(),x&&x(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(o.method.toUpperCase(),o.url,!0),A.timeout=o.timeout;function C(){if(!A)return;const R=tn.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),W={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:R,config:e,request:A};l0(function(K){n(K),v()},function(K){r(K),v()},W),A=null}"onloadend"in A?A.onloadend=C:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(C)},A.onabort=function(){A&&(r(new Ae("Request aborted",Ae.ECONNABORTED,e,A)),v(),A=null)},A.onerror=function(H){const W=H&&H.message?H.message:"Network Error",M=new Ae(W,Ae.ERR_NETWORK,e,A);M.event=H||null,r(M),v(),A=null},A.ontimeout=function(){let H=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const W=o.transitional||ld;o.timeoutErrorMessage&&(H=o.timeoutErrorMessage),r(new Ae(H,W.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,e,A)),v(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&V.forEach(e0(u),function(H,W){A.setRequestHeader(W,H)}),V.isUndefined(o.withCredentials)||(A.withCredentials=!!o.withCredentials),c&&c!=="json"&&(A.responseType=o.responseType),h&&([T,x]=Eu(h,!0),A.addEventListener("progress",T)),d&&A.upload&&([E,y]=Eu(d),A.upload.addEventListener("progress",E),A.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=R=>{A&&(r(!R||R.type?new ks(null,e,A):R),A.abort(),v(),A=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const O=gv(o.url);if(O&&!Yt.protocols.includes(O)){r(new Ae("Unsupported protocol "+O+":",Ae.ERR_BAD_REQUEST,e));return}A.send(a||null)})},Cv=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const h=d instanceof Error?d:this.reason;n.abort(h instanceof Ae?h:new ks(h instanceof Error?h.message:h))}};let a=t&&setTimeout(()=>{a=null,o(new Ae(`timeout of ${t}ms exceeded`,Ae.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>V.asap(u),c},kv=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Nv=function(e,t){return xm(this,null,function*(){try{for(var n=Z2(Ov(e)),r,o,a;r=!(o=yield new ao(n.next())).done;r=!1){const u=o.value;yield*wm(kv(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new ao(o.call(n)))}finally{if(a)throw a[0]}}})},Ov=function(e){return xm(this,null,function*(){if(e[Symbol.asyncIterator]){yield*wm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new ao(t.read());if(n)break;yield r}}finally{yield new ao(t.cancel())}})},m0=(e,t,n,r)=>{const o=Nv(e,t);let a=0,u,c=h=>{u||(u=!0,r&&r(h))};return new ReadableStream({pull(h){return Ve(this,null,function*(){try{const{done:p,value:E}=yield o.next();if(p){c(),h.close();return}let T=E.byteLength;if(n){let y=a+=T;n(y)}h.enqueue(new Uint8Array(E))}catch(p){throw c(p),p}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})};function Iv(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const x=r.charCodeAt(y+1),v=r.charCodeAt(y+2);(x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(u-=2,y+=2)}let d=0,h=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);h>=0&&(r.charCodeAt(h)===61?(d++,h--):p(h)&&(d++,h-=3)),d===1&&h>=0&&(r.charCodeAt(h)===61||p(h))&&d++;const T=Math.floor(u/4)*3-(d||0);return T>0?T:0}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const h=r.charCodeAt(u+1);h>=56320&&h<=57343?(a+=4,u++):a+=3}else a+=3}return a}const hd="1.16.1",g0=64*1024,{isFunction:yu}=V,E0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Rv=e=>{const t=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=V.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,c=o?yu(o):typeof fetch=="function",d=yu(a),h=yu(u);if(!c)return!1;const p=c&&yu(n),E=c&&(typeof r=="function"?(C=>O=>C.encode(O))(new r):C=>Ve(null,null,function*(){return new Uint8Array(yield new a(C).arrayBuffer())})),T=d&&p&&E0(()=>{let C=!1;const O=new a(Yt.origin,{body:new n,method:"POST",get duplex(){return C=!0,"half"}}),R=O.headers.has("Content-Type");return O.body!=null&&O.body.cancel(),C&&!R}),y=h&&p&&E0(()=>V.isReadableStream(new u("").body)),x={stream:y&&(C=>C.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!x[C]&&(x[C]=(O,R)=>{let H=O&&O[C];if(H)return H.call(O);throw new Ae(`Response type '${C}' is not supported`,Ae.ERR_NOT_SUPPORT,R)})});const v=C=>Ve(null,null,function*(){if(C==null)return 0;if(V.isBlob(C))return C.size;if(V.isSpecCompliantForm(C))return(yield new a(Yt.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(V.isArrayBufferView(C)||V.isArrayBuffer(C))return C.byteLength;if(V.isURLSearchParams(C)&&(C=C+""),V.isString(C))return(yield E(C)).byteLength}),A=(C,O)=>Ve(null,null,function*(){const R=V.toFiniteNumber(C.getContentLength());return R==null?v(O):R});return C=>Ve(null,null,function*(){let{url:O,method:R,data:H,signal:W,cancelToken:M,timeout:K,onDownloadProgress:ce,onUploadProgress:be,responseType:z,headers:ee,withCredentials:se="same-origin",fetchOptions:te,maxContentLength:re,maxBodyLength:fe}=p0(C);const ke=V.isNumber(re)&&re>-1,he=V.isNumber(fe)&&fe>-1;let Q=o||fetch;z=z?(z+"").toLowerCase():"text";let oe=Cv([W,M&&M.toAbortSignal()],K),_=null;const P=oe&&oe.unsubscribe&&(()=>{oe.unsubscribe()});let X;try{if(ke&&typeof O=="string"&&O.startsWith("data:")&&Iv(O)>re)throw new Ae("maxContentLength size of "+re+" exceeded",Ae.ERR_BAD_RESPONSE,C,_);if(he&&R!=="get"&&R!=="head"){const _e=yield A(ee,H);if(typeof _e=="number"&&isFinite(_e)&&_e>fe)throw new Ae("Request body larger than maxBodyLength limit",Ae.ERR_BAD_REQUEST,C,_)}if(be&&T&&R!=="get"&&R!=="head"&&(X=yield A(ee,H))!==0){let _e=new a(O,{method:"POST",body:H,duplex:"half"}),$e;if(V.isFormData(H)&&($e=_e.headers.get("content-type"))&&ee.setContentType($e),_e.body){const[ot,pn]=c0(X,Eu(d0(be)));H=m0(_e.body,g0,ot,pn)}}V.isString(se)||(se=se?"include":"omit");const N=d&&"credentials"in a.prototype;if(V.isFormData(H)){const _e=ee.getContentType();_e&&/^multipart\/form-data/i.test(_e)&&!/boundary=/i.test(_e)&&ee.delete("content-type")}ee.set("User-Agent","axios/"+hd,!1);const xe=ae(F({},te),{signal:oe,method:R.toUpperCase(),headers:e0(ee.normalize()),body:H,duplex:"half",credentials:N?se:void 0});_=d&&new a(O,xe);let Re=yield d?Q(_,te):Q(O,xe);if(ke){const _e=V.toFiniteNumber(Re.headers.get("content-length"));if(_e!=null&&_e>re)throw new Ae("maxContentLength size of "+re+" exceeded",Ae.ERR_BAD_RESPONSE,C,_)}const Oe=y&&(z==="stream"||z==="response");if(y&&Re.body&&(ce||ke||Oe&&P)){const _e={};["status","statusText","headers"].forEach(Xn=>{_e[Xn]=Re[Xn]});const $e=V.toFiniteNumber(Re.headers.get("content-length")),[ot,pn]=ce&&c0($e,Eu(d0(ce),!0))||[];let Yi=0;const Zr=Xn=>{if(ke&&(Yi=Xn,Yi>re))throw new Ae("maxContentLength size of "+re+" exceeded",Ae.ERR_BAD_RESPONSE,C,_);ot&&ot(Xn)};Re=new u(m0(Re.body,g0,Zr,()=>{pn&&pn(),P&&P()}),_e)}z=z||"text";let Be=yield x[V.findKey(x,z)||"text"](Re,C);if(ke&&!y&&!Oe){let _e;if(Be!=null&&(typeof Be.byteLength=="number"?_e=Be.byteLength:typeof Be.size=="number"?_e=Be.size:typeof Be=="string"&&(_e=typeof r=="function"?new r().encode(Be).byteLength:Be.length)),typeof _e=="number"&&_e>re)throw new Ae("maxContentLength size of "+re+" exceeded",Ae.ERR_BAD_RESPONSE,C,_)}return!Oe&&P&&P(),yield new Promise((_e,$e)=>{l0(_e,$e,{data:Be,headers:tn.from(Re.headers),status:Re.status,statusText:Re.statusText,config:C,request:_})})}catch(N){if(P&&P(),oe&&oe.aborted&&oe.reason instanceof Ae){const xe=oe.reason;throw xe.config=C,_&&(xe.request=_),N!==xe&&(xe.cause=N),xe}throw N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new Ae("Network Error",Ae.ERR_NETWORK,C,_,N&&N.response),{cause:N.cause||N}):Ae.from(N,N&&N.code,C,_,N&&N.response)}})},Pv=new Map,y0=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,h,p=Pv;for(;c--;)d=a[c],h=p.get(d),h===void 0&&p.set(d,h=c?new Map:Rv(t)),p=h;return h};y0();const pd={http:iv,xhr:Av,fetch:{get:y0}};V.forEach(pd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const b0=e=>`- ${e}`,Lv=e=>V.isFunction(e)||e===null||e===!1;function Dv(e,t){e=V.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!Lv(r)&&(o=pd[(c=String(r)).toLowerCase()],o===void 0))throw new Ae(`Unknown adapter '${c}'`);if(o&&(V.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
11
- `+u.map(b0).join(`
12
- `):" "+b0(u[0]):"as no adapter specified";throw new Ae("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const T0={getAdapter:Dv,adapters:pd};function md(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ks(null,e)}function x0(e){return md(e),e.headers=tn.from(e.headers),e.data=fd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),T0.getAdapter(e.adapter||Cs.adapter,e)(e).then(function(r){md(e),e.response=r;try{r.data=fd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=tn.from(r.headers),r},function(r){if(!u0(r)&&(md(e),r&&r.response)){e.response=r.response;try{r.response.data=fd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=tn.from(r.response.headers)}return Promise.reject(r)})}const bu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{bu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const w0={};bu.transitional=function(t,n,r){function o(a,u){return"[Axios v"+hd+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Ae(o(u," has been removed"+(n?" in "+n:"")),Ae.ERR_DEPRECATED);return n&&!w0[u]&&(w0[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},bu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Mv(e,t,n){if(typeof e!="object")throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new Ae("option "+a+" must be "+d,Ae.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ae("Unknown option "+a,Ae.ERR_BAD_OPTION)}}const Tu={assertOptions:Mv,validators:bu},In=Tu.validators;let Si=class{constructor(t){this.defaults=t||{},this.interceptors={request:new s0,response:new s0}}request(t,n){return Ve(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(`
8
+ `);this.logger.debug(`SSE event: ${n}`,o.slice(0,200)),this.onEvent(n,o)}}class $r extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let Z2=class extends $r{constructor(t,n,r,o){super(t,"api",o),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class Vm extends $r{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let td=class extends $r{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class e_{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}class t_ extends X2{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:o={}}){var u,c,d,h,p,g,T;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=o.maxRetries)!=null?u:3,timeout:(c=o.timeout)!=null?c:15e3,maxReconnectAttempts:(d=o.maxReconnectAttempts)!=null?d:5,reconnectDelay:(h=o.reconnectDelay)!=null?h:2e3,enableLogging:(p=o.enableLogging)!=null?p:!1,platform:(g=o.platform)!=null?g:"Web",capabilitiesVersion:(T=o.capabilitiesVersion)!=null?T:"1"};this.maxRetries=a.maxRetries,this.timeout=a.timeout,this.maxReconnectAttempts=a.maxReconnectAttempts,this.reconnectDelay=a.reconnectDelay,this.platform=a.platform,this.capabilitiesVersion=a.capabilitiesVersion,this.logger=new e_(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return Ve(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return Ve(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return Ve(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new $r("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return Ve(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return Ve(this,null,function*(){var u,c,d;this.assertConnected();const n=new URLSearchParams;(t==null?void 0:t.inclClosedConvs)!=null&&n.set("inclClosedConvs",String(t.inclClosedConvs)),(t==null?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),t!=null&&t.conversationId&&n.set("conversationId",t.conversationId),(t==null?void 0:t.startTimestamp)!=null&&n.set("startTimestamp",String(t.startTimestamp)),(t==null?void 0:t.endTimestamp)!=null&&n.set("endTimestamp",String(t.endTimestamp));const r=n.toString(),o="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",o);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(c=a.openConversationsFound)!=null?c:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return Ve(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const o=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${o?`?${o}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}resumeConversation(t){if(this.assertConnected(),!t)throw new $r("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return Ve(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}openSSE(t){return Ve(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new J2(n,r,(o,a)=>this.handleSSEEvent(o,a),o=>this.handleSSEClose(o),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>Ve(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const o=r instanceof Error?r.message:String(r);if(o.includes("(401)"))return this.logger.error("SSE rejected token (401) — session expired"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);this.logger.error(`Reconnect attempt ${this.reconnectAttempts} failed: ${o}`),this.attemptReconnect()}}),n)}clearReconnectTimer(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null)}handleSSEEvent(t,n){if(t==="ping")return;let r;try{r=JSON.parse(n)}catch(o){return void this.logger.debug(`Non-JSON SSE event (${t}): ${n.slice(0,100)}`)}switch(t){case"CONVERSATION_ROUTING_RESULT":this.handleRoutingResult(r);break;case"CONVERSATION_MESSAGE":this.handleConversationMessage(r);break;case"CONVERSATION_STREAMING_TOKEN":this.handleStreamingToken(r);break;case"CONVERSATION_TYPING_STARTED_INDICATOR":this.handleTypingStarted(r);break;case"CONVERSATION_TYPING_STOPPED_INDICATOR":this.handleTypingStopped(r);break;case"CONVERSATION_PROGRESS_INDICATOR":this.handleProgressIndicator(r);break;case"CONVERSATION_PARTICIPANT_CHANGED":this.handleParticipantChanged(r);break;case"CONVERSATION_CLOSE_CONVERSATION":this.handleConversationClosed(r);break;default:this.logger.debug(`Unhandled SSE event type: ${t}`)}}handleRoutingResult(t){let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.failureType||n.routingFailureType||"",o=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:o,failureType:o?void 0:r,raw:n}),o||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var c;const n=t.conversationEntry;if(!n)return;const r=((c=n.sender)==null?void 0:c.role)||"";if(r==="EndUser"||r==="Customer")return;const o=this.parseEntryPayload(n),a=this.getNestedValue(o,"abstractMessage"),u=this.getNestedString(a,"staticContent","text")||this.getNestedString(a,"content","text")||"";u&&this.emit("message",{conversationId:this._conversationId||"",messageId:n.identifier||"",content:u,sender:{role:r,name:n.senderDisplayName},timestamp:n.transcriptedTimestamp||new Date().toISOString(),raw:o})}handleStreamingToken(t){let n,r,o,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),c=this.getNestedValue(u,"streamingToken");a=this.getNestedString(c,"token","text")||this.getNestedString(c,"token","content")||"";const d=this.getNestedValue(c,"sequenceNumber");typeof d=="number"&&(n=d);const h=this.getNestedString(c,"targetMessageIdentifier");h&&(r=h);const p=this.getNestedString(c,"tokenType");p&&(o=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",B(B(B({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),o?{tokenType:o}:{})):this.logger.warn("STREAMING_TOKEN received but no token text could be extracted — payload shape may have changed")}handleTypingStarted(t){var n;this.emit("typing_started",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleTypingStopped(t){var n;this.emit("typing_stopped",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleProgressIndicator(t){const n=t.conversationEntry;if(!n)return;const r=this.parseEntryPayload(n),o=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(o,"progressMessage","text")||this.getNestedString(o,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(o,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var o,a,u,c,d,h,p;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries;if(r&&r.length>0)for(const g of r){const T=g.participant,y=g.displayName||(T==null?void 0:T.displayName)||((o=t.conversationEntry)==null?void 0:o.senderDisplayName)||"Agent",x=(T==null?void 0:T.role)||((u=(a=t.conversationEntry)==null?void 0:a.sender)==null?void 0:u.role)||"",S=g.operation||g.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(S)})}else{const g=((c=t.conversationEntry)==null?void 0:c.senderDisplayName)||n.participantName||((d=n.participant)==null?void 0:d.displayName)||"Agent",T=n.operation||n.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:((p=(h=t.conversationEntry)==null?void 0:h.sender)==null?void 0:p.role)||"",name:g},action:this.normalizeParticipantAction(T)})}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return Ve(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new td("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,o){return Ve(this,null,function*(){const a=(o==null?void 0:o.useAuth)!==!1;let u=0;for(;;){let c;try{const d=new AbortController;c=setTimeout(()=>d.abort(),(o==null?void 0:o.timeout)||this.timeout);const h=B({"Content-Type":"application/json"},o==null?void 0:o.headers);a&&this._accessToken&&(h.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:h,signal:(o==null?void 0:o.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const g=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(c),!g.ok){const T=yield g.text().catch(()=>g.statusText);if(g.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new td(`Request ${t} ${n} failed (401): continuation token expired or invalid. Reconnect without a continuation token to create a new session.`);if(this._conversationId)throw this.logger.warn("Got 401 with active conversation — cannot auto-refresh (would orphan conversation)"),new td(`Request ${t} ${n} failed (401): session expired. Call connect() to start a new session.`);this.logger.info("Got 401 — refreshing token and retrying..."),this._accessToken=yield this.fetchAccessToken(),u++;continue}throw new Z2(`Request ${t} ${n} failed (${g.status}): ${T}`,g.status,T)}return g.status===204||t==="DELETE"?{}:g.text().then(T=>T?JSON.parse(T):null)}catch(d){if(clearTimeout(c),d instanceof $r)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new Vm("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const h=100*Math.random(),p=300*Math.pow(2,u-1)+h;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(g=>setTimeout(g,p));continue}throw new Vm(`Network error: ${d.message}`,u,{cause:d})}throw new $r(`Unexpected error: ${d instanceof Error?d.message:String(d)}`,"unknown",{cause:d instanceof Error?d:void 0})}}})}assertConnected(){if(!this._isConnected||!this._accessToken)throw new $r("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const o of n){if(r==null||typeof r!="object")return;r=r[o]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}}const M="cim-widget",Sr=`--${M}`,Vr={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},n_=(e=Vr)=>({[`${Sr}-primary-color`]:e.primaryColor||Vr.primaryColor,[`${Sr}-secondary-color`]:e.secondaryColor||Vr.secondaryColor,[`${Sr}-font-color`]:e.fontColor||Vr.fontColor,[`${Sr}-font-family`]:e.fontFamily||Vr.fontFamily,[`${Sr}-background-color`]:e.backgroundColor||Vr.backgroundColor,[`${Sr}-border-color`]:e.borderColor||Vr.borderColor,[`${Sr}-border-radius`]:e.borderRadius||Vr.borderRadius});function qm(e,t){return function(){return e.apply(t,arguments)}}const{toString:r_}=Object.prototype,{getPrototypeOf:cu}=Object,{iterator:du,toStringTag:Ym}=Symbol,fu=(e=>t=>{const n=r_.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qn=e=>(e=e.toLowerCase(),t=>fu(t)===e),hu=e=>t=>typeof t===e,{isArray:co}=Array,fo=hu("undefined");function _s(e){return e!==null&&!fo(e)&&e.constructor!==null&&!fo(e.constructor)&&un(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Wm=qn("ArrayBuffer");function i_(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Wm(e.buffer),t}const o_=hu("string"),un=hu("function"),Gm=hu("number"),vs=e=>e!==null&&typeof e=="object",s_=e=>e===!0||e===!1,pu=e=>{if(fu(e)!=="object")return!1;const t=cu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ym in e)&&!(du in e)},a_=e=>{if(!vs(e)||_s(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},u_=qn("Date"),l_=qn("File"),c_=e=>!!(e&&typeof e.uri!="undefined"),d_=e=>e&&typeof e.getParts!="undefined",f_=qn("Blob"),h_=qn("FileList"),p_=e=>vs(e)&&un(e.pipe);function m_(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const Km=m_(),Qm=typeof Km.FormData!="undefined"?Km.FormData:void 0,g_=e=>{if(!e)return!1;if(Qm&&e instanceof Qm)return!0;const t=cu(e);if(!t||t===Object.prototype||!un(e.append))return!1;const n=fu(e);return n==="formdata"||n==="object"&&un(e.toString)&&e.toString()==="[object FormData]"},E_=qn("URLSearchParams"),[y_,b_,T_,x_]=["ReadableStream","Request","Response","Headers"].map(qn),w_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ss(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),co(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(_s(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function Xm(e,t){if(_s(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const _i=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Jm=e=>!fo(e)&&e!==_i;function nd(...e){const{caseless:t,skipUndefined:n}=Jm(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&Xm(r,u)||u,d=rd(r,c)?r[c]:void 0;pu(d)&&pu(a)?r[c]=nd(d,a):pu(a)?r[c]=nd({},a):co(a)?r[c]=a.slice():(!n||!fo(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&Ss(e[a],o);return r}const __=(e,t,n,{allOwnKeys:r}={})=>(Ss(t,(o,a)=>{n&&un(o)?Object.defineProperty(e,a,{__proto__:null,value:qm(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),v_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),S_=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},A_=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&cu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},C_=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},k_=e=>{if(!e)return null;if(co(e))return e;let t=e.length;if(!Gm(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},N_=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&cu(Uint8Array)),O_=(e,t)=>{const r=(e&&e[du]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},I_=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},R_=qn("HTMLFormElement"),P_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),rd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),L_=qn("RegExp"),Zm=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ss(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},D_=e=>{Zm(e,(t,n)=>{if(un(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(un(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},M_=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return co(e)?r(e):r(String(e).split(t)),n},F_=()=>{},B_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function U_(e){return!!(e&&un(e.append)&&e[Ym]==="FormData"&&e[du])}const H_=e=>{const t=new WeakSet,n=r=>{if(vs(r)){if(t.has(r))return;if(_s(r))return r;if(!("toJSON"in r)){t.add(r);const o=co(r)?[]:{};return Ss(r,(a,u)=>{const c=n(a);!fo(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},z_=qn("AsyncFunction"),j_=e=>e&&(vs(e)||un(e))&&un(e.then)&&un(e.catch),e0=((e,t)=>e?setImmediate:t?((n,r)=>(_i.addEventListener("message",({source:o,data:a})=>{o===_i&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),_i.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",un(_i.postMessage)),$_=typeof queueMicrotask!="undefined"?queueMicrotask.bind(_i):typeof process!="undefined"&&process.nextTick||e0,V={isArray:co,isArrayBuffer:Wm,isBuffer:_s,isFormData:g_,isArrayBufferView:i_,isString:o_,isNumber:Gm,isBoolean:s_,isObject:vs,isPlainObject:pu,isEmptyObject:a_,isReadableStream:y_,isRequest:b_,isResponse:T_,isHeaders:x_,isUndefined:fo,isDate:u_,isFile:l_,isReactNativeBlob:c_,isReactNative:d_,isBlob:f_,isRegExp:L_,isFunction:un,isStream:p_,isURLSearchParams:E_,isTypedArray:N_,isFileList:h_,forEach:Ss,merge:nd,extend:__,trim:w_,stripBOM:v_,inherits:S_,toFlatObject:A_,kindOf:fu,kindOfTest:qn,endsWith:C_,toArray:k_,forEachEntry:O_,matchAll:I_,isHTMLForm:R_,hasOwnProperty:rd,hasOwnProp:rd,reduceDescriptors:Zm,freezeMethods:D_,toObjectSet:M_,toCamelCase:P_,noop:F_,toFiniteNumber:B_,findKey:Xm,global:_i,isContextDefined:Jm,isSpecCompliantForm:U_,toJSONObject:H_,isAsyncFn:z_,isThenable:j_,setImmediate:e0,asap:$_,isIterable:e=>e!=null&&un(e[du])},V_=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),q_=e=>{const t={};let n,r,o;return e&&e.split(`
9
+ `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&V_[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function Y_(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const W_=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),G_=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function id(e,t){return V.isArray(e)?e.map(n=>id(n,t)):Y_(String(e).replace(t,""))}const K_=e=>id(e,W_),Q_=e=>id(e,G_);function t0(e){const t=Object.create(null);return V.forEach(e.toJSON(),(n,r)=>{t[r]=Q_(n)}),t}const n0=Symbol("internals");function As(e){return e&&String(e).trim().toLowerCase()}function mu(e){return e===!1||e==null?e:V.isArray(e)?e.map(mu):K_(String(e))}function X_(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const J_=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function od(e,t,n,r,o){if(V.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function Z_(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ev(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let tn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,h){const p=As(d);if(!p)throw new Error("header name must be a non-empty string");const g=V.findKey(o,p);(!g||o[g]===void 0||h===!0||h===void 0&&o[g]!==!1)&&(o[g||d]=mu(c))}const u=(c,d)=>V.forEach(c,(h,p)=>a(h,p,d));if(V.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(V.isString(t)&&(t=t.trim())&&!J_(t))u(q_(t),n);else if(V.isObject(t)&&V.isIterable(t)){let c={},d,h;for(const p of t){if(!V.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[h=p[0]]=(d=c[h])?V.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=As(t),t){const r=V.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return X_(o);if(V.isFunction(n))return n.call(this,o,r);if(V.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=As(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||od(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=As(u),u){const c=V.findKey(r,u);c&&(!n||od(r,r[c],c,n))&&(delete r[c],o=!0)}}return V.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||od(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return V.forEach(this,(o,a)=>{const u=V.findKey(r,a);if(u){n[u]=mu(o),delete n[a];return}const c=t?Z_(a):String(a).trim();c!==a&&delete n[a],n[c]=mu(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return V.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
10
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[n0]=this[n0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=As(u);r[c]||(ev(o,u),r[c]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}};tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(tn);const tv="[REDACTED ****]";function nv(e){if(V.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(V.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function rv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||V.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof tn&&(a=a.toJSON()),r.push(a);let u;if(V.isArray(a))u=[],a.forEach((c,d)=>{const h=o(c);V.isUndefined(h)||(u[d]=h)});else{if(!V.isPlainObject(a)&&nv(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const h=n.has(c.toLowerCase())?tv:o(d);V.isUndefined(h)||(u[c]=h)}}return r.pop(),u};return o(e)}let Ae=class e2 extends Error{static from(t,n,r,o,a,u){const c=new e2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&V.hasOwnProp(t,"redact")?t.redact:void 0,r=V.isArray(n)&&n.length>0?rv(t,n):V.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ae.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ae.ERR_BAD_OPTION="ERR_BAD_OPTION",Ae.ECONNABORTED="ECONNABORTED",Ae.ETIMEDOUT="ETIMEDOUT",Ae.ECONNREFUSED="ECONNREFUSED",Ae.ERR_NETWORK="ERR_NETWORK",Ae.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ae.ERR_DEPRECATED="ERR_DEPRECATED",Ae.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ae.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ae.ERR_CANCELED="ERR_CANCELED",Ae.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ae.ERR_INVALID_URL="ERR_INVALID_URL",Ae.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const iv=null;function sd(e){return V.isPlainObject(e)||V.isArray(e)}function r0(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function ad(e,t,n){return e?e.concat(t).map(function(o,a){return o=r0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function ov(e){return V.isArray(e)&&!e.some(sd)}const sv=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function gu(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,C){return!V.isUndefined(C[A])});const r=n.metaTokens,o=n.visitor||g,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,h=c&&V.isSpecCompliantForm(t);if(!V.isFunction(o))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(V.isDate(S))return S.toISOString();if(V.isBoolean(S))return S.toString();if(!h&&V.isBlob(S))throw new Ae("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(S)||V.isTypedArray(S)?h&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,A,C){let O=S;if(V.isReactNative(t)&&V.isReactNativeBlob(S))return t.append(ad(C,A,a),p(S)),!1;if(S&&!C&&typeof S=="object"){if(V.endsWith(A,"{}"))A=r?A:A.slice(0,-2),S=JSON.stringify(S);else if(V.isArray(S)&&ov(S)||(V.isFileList(S)||V.endsWith(A,"[]"))&&(O=V.toArray(S)))return A=r0(A),O.forEach(function(H,W){!(V.isUndefined(H)||H===null)&&t.append(u===!0?ad([A],W,a):u===null?A:A+"[]",p(H))}),!1}return sd(S)?!0:(t.append(ad(C,A,a),p(S)),!1)}const T=[],y=Object.assign(sv,{defaultVisitor:g,convertValue:p,isVisitable:sd});function x(S,A,C=0){if(!V.isUndefined(S)){if(C>d)throw new Ae("Object is too deeply nested ("+C+" levels). Max depth: "+d,Ae.ERR_FORM_DATA_DEPTH_EXCEEDED);if(T.indexOf(S)!==-1)throw Error("Circular reference detected in "+A.join("."));T.push(S),V.forEach(S,function(R,H){(!(V.isUndefined(R)||R===null)&&o.call(t,R,V.isString(H)?H.trim():H,A,y))===!0&&x(R,A?A.concat(H):[H],C+1)}),T.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return x(e),t}function i0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ud(e,t){this._pairs=[],e&&gu(e,this,t)}const o0=ud.prototype;o0.append=function(t,n){this._pairs.push([t,n])},o0.toString=function(t){const n=t?function(r){return t.call(this,r,i0)}:i0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function av(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function s0(e,t,n){if(!t)return e;const r=n&&n.encode||av,o=V.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=V.isURLSearchParams(t)?t.toString():new ud(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class a0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ld={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},uv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:ud,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},cd=typeof window!="undefined"&&typeof document!="undefined",dd=typeof navigator=="object"&&navigator||void 0,lv=cd&&(!dd||["ReactNative","NativeScript","NS"].indexOf(dd.product)<0),cv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dv=cd&&window.location.href||"http://localhost",Yt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:cd,hasStandardBrowserEnv:lv,hasStandardBrowserWebWorkerEnv:cv,navigator:dd,origin:dv},Symbol.toStringTag,{value:"Module"}))),uv);function fv(e,t){return gu(e,new Yt.classes.URLSearchParams,B({visitor:function(n,r,o,a){return Yt.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function hv(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function pv(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function u0(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&V.isArray(o)?o.length:u,d?(V.hasOwnProp(o,u)?o[u]=V.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!V.hasOwnProp(o,u)||!V.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&V.isArray(o[u])&&(o[u]=pv(o[u])),!c)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,o)=>{t(hv(r),o,n,0)}),n}return null}const ho=(e,t)=>e!=null&&V.hasOwnProp(e,t)?e[t]:void 0;function mv(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Cs={transitional:ld,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return o?JSON.stringify(u0(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=ho(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return fv(t,d).toString();if((c=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=ho(this,"env"),p=h&&h.FormData;return gu(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),mv(t)):t}],transformResponse:[function(t){const n=ho(this,"transitional")||Cs.transitional,r=n&&n.forcedJSONParsing,o=ho(this,"responseType"),a=o==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,ho(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ae.from(d,Ae.ERR_BAD_RESPONSE,this,null,ho(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],e=>{Cs.headers[e]={}});function fd(e,t){const n=this||Cs,r=t||n,o=tn.from(r.headers);let a=r.data;return V.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function l0(e){return!!(e&&e.__CANCEL__)}let ks=class extends Ae{constructor(t,n,r){super(t==null?"canceled":t,Ae.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function c0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ae("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ae.ERR_BAD_REQUEST:Ae.ERR_BAD_RESPONSE,n.config,n.request,n))}function gv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Ev(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),p=r[a];u||(u=h),n[o]=d,r[o]=h;let g=a,T=0;for(;g!==o;)T+=n[g++],g=g%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),h-u<t)return;const y=p&&h-p;return y?Math.round(T*1e3/y):void 0}}function yv(e,t){let n=0,r=1e3/t,o,a;const u=(h,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e(...h)};return[(...h)=>{const p=Date.now(),g=p-n;g>=r?u(h,p):(o=h,a||(a=setTimeout(()=>{a=null,u(o)},r-g)))},()=>o&&u(o)]}const Eu=(e,t,n=3)=>{let r=0;const o=Ev(50,250);return yv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,h=Math.max(0,d-r),p=o(h);r=Math.max(r,d);const g={loaded:d,total:c,progress:c?d/c:void 0,bytes:h,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(g)},n)},d0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},f0=e=>(...t)=>V.asap(()=>e(...t)),bv=Yt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Yt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Yt.origin),Yt.navigator&&/(msie|trident)/i.test(Yt.navigator.userAgent)):()=>!0,Tv=Yt.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&c.push(`path=${r}`),V.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),V.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function xv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function wv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function h0(e,t,n){let r=!xv(t);return e&&(r||n===!1)?wv(e,t):t}const p0=e=>e instanceof tn?B({},e):e;function vi(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(h,p,g,T){return V.isPlainObject(h)&&V.isPlainObject(p)?V.merge.call({caseless:T},h,p):V.isPlainObject(p)?V.merge({},p):V.isArray(p)?p.slice():p}function o(h,p,g,T){if(V.isUndefined(p)){if(!V.isUndefined(h))return r(void 0,h,g,T)}else return r(h,p,g,T)}function a(h,p){if(!V.isUndefined(p))return r(void 0,p)}function u(h,p){if(V.isUndefined(p)){if(!V.isUndefined(h))return r(void 0,h)}else return r(void 0,p)}function c(h,p,g){if(V.hasOwnProp(t,g))return r(h,p);if(V.hasOwnProp(e,g))return r(void 0,h)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(h,p,g)=>o(p0(h),p0(p),g,!0)};return V.forEach(Object.keys(B(B({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=V.hasOwnProp(d,p)?d[p]:o,T=V.hasOwnProp(e,p)?e[p]:void 0,y=V.hasOwnProp(t,p)?t[p]:void 0,x=g(T,y,p);V.isUndefined(x)&&g!==c||(n[p]=x)}),n}const _v=["content-type","content-length"];function vv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{_v.includes(r.toLowerCase())&&e.set(r,o)})}const Sv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),m0=e=>{const t=vi({},e),n=T=>V.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),h=n("baseURL"),p=n("allowAbsoluteUrls"),g=n("url");if(t.headers=c=tn.from(c),t.url=s0(h0(h,g,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?Sv(d.password):""))),V.isFormData(r)&&(Yt.hasStandardBrowserEnv||Yt.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):V.isFunction(r.getHeaders)&&vv(c,r.getHeaders(),n("formDataHeaderPolicy"))),Yt.hasStandardBrowserEnv&&(V.isFunction(o)&&(o=o(t)),o===!0||o==null&&bv(t.url))){const y=a&&u&&Tv.read(u);y&&c.set(a,y)}return t},Av=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=m0(e);let a=o.data;const u=tn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:h}=o,p,g,T,y,x;function S(){y&&y(),x&&x(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(o.method.toUpperCase(),o.url,!0),A.timeout=o.timeout;function C(){if(!A)return;const R=tn.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),W={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:R,config:e,request:A};c0(function(K){n(K),S()},function(K){r(K),S()},W),A=null}"onloadend"in A?A.onloadend=C:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(C)},A.onabort=function(){A&&(r(new Ae("Request aborted",Ae.ECONNABORTED,e,A)),S(),A=null)},A.onerror=function(H){const W=H&&H.message?H.message:"Network Error",F=new Ae(W,Ae.ERR_NETWORK,e,A);F.event=H||null,r(F),S(),A=null},A.ontimeout=function(){let H=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const W=o.transitional||ld;o.timeoutErrorMessage&&(H=o.timeoutErrorMessage),r(new Ae(H,W.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,e,A)),S(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&V.forEach(t0(u),function(H,W){A.setRequestHeader(W,H)}),V.isUndefined(o.withCredentials)||(A.withCredentials=!!o.withCredentials),c&&c!=="json"&&(A.responseType=o.responseType),h&&([T,x]=Eu(h,!0),A.addEventListener("progress",T)),d&&A.upload&&([g,y]=Eu(d),A.upload.addEventListener("progress",g),A.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=R=>{A&&(r(!R||R.type?new ks(null,e,A):R),A.abort(),S(),A=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const O=gv(o.url);if(O&&!Yt.protocols.includes(O)){r(new Ae("Unsupported protocol "+O+":",Ae.ERR_BAD_REQUEST,e));return}A.send(a||null)})},Cv=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const h=d instanceof Error?d:this.reason;n.abort(h instanceof Ae?h:new ks(h instanceof Error?h.message:h))}};let a=t&&setTimeout(()=>{a=null,o(new Ae(`timeout of ${t}ms exceeded`,Ae.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>V.asap(u),c},kv=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Nv=function(e,t){return wm(this,null,function*(){try{for(var n=Zw(Ov(e)),r,o,a;r=!(o=yield new ao(n.next())).done;r=!1){const u=o.value;yield*_m(kv(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new ao(o.call(n)))}finally{if(a)throw a[0]}}})},Ov=function(e){return wm(this,null,function*(){if(e[Symbol.asyncIterator]){yield*_m(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new ao(t.read());if(n)break;yield r}}finally{yield new ao(t.cancel())}})},g0=(e,t,n,r)=>{const o=Nv(e,t);let a=0,u,c=h=>{u||(u=!0,r&&r(h))};return new ReadableStream({pull(h){return Ve(this,null,function*(){try{const{done:p,value:g}=yield o.next();if(p){c(),h.close();return}let T=g.byteLength;if(n){let y=a+=T;n(y)}h.enqueue(new Uint8Array(g))}catch(p){throw c(p),p}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})};function Iv(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const x=r.charCodeAt(y+1),S=r.charCodeAt(y+2);(x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102)&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102)&&(u-=2,y+=2)}let d=0,h=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);h>=0&&(r.charCodeAt(h)===61?(d++,h--):p(h)&&(d++,h-=3)),d===1&&h>=0&&(r.charCodeAt(h)===61||p(h))&&d++;const T=Math.floor(u/4)*3-(d||0);return T>0?T:0}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const h=r.charCodeAt(u+1);h>=56320&&h<=57343?(a+=4,u++):a+=3}else a+=3}return a}const hd="1.16.1",E0=64*1024,{isFunction:yu}=V,y0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Rv=e=>{const t=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=V.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,c=o?yu(o):typeof fetch=="function",d=yu(a),h=yu(u);if(!c)return!1;const p=c&&yu(n),g=c&&(typeof r=="function"?(C=>O=>C.encode(O))(new r):C=>Ve(null,null,function*(){return new Uint8Array(yield new a(C).arrayBuffer())})),T=d&&p&&y0(()=>{let C=!1;const O=new a(Yt.origin,{body:new n,method:"POST",get duplex(){return C=!0,"half"}}),R=O.headers.has("Content-Type");return O.body!=null&&O.body.cancel(),C&&!R}),y=h&&p&&y0(()=>V.isReadableStream(new u("").body)),x={stream:y&&(C=>C.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!x[C]&&(x[C]=(O,R)=>{let H=O&&O[C];if(H)return H.call(O);throw new Ae(`Response type '${C}' is not supported`,Ae.ERR_NOT_SUPPORT,R)})});const S=C=>Ve(null,null,function*(){if(C==null)return 0;if(V.isBlob(C))return C.size;if(V.isSpecCompliantForm(C))return(yield new a(Yt.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(V.isArrayBufferView(C)||V.isArrayBuffer(C))return C.byteLength;if(V.isURLSearchParams(C)&&(C=C+""),V.isString(C))return(yield g(C)).byteLength}),A=(C,O)=>Ve(null,null,function*(){const R=V.toFiniteNumber(C.getContentLength());return R==null?S(O):R});return C=>Ve(null,null,function*(){let{url:O,method:R,data:H,signal:W,cancelToken:F,timeout:K,onDownloadProgress:ce,onUploadProgress:be,responseType:z,headers:X,withCredentials:se="same-origin",fetchOptions:J,maxContentLength:re,maxBodyLength:fe}=m0(C);const ke=V.isNumber(re)&&re>-1,he=V.isNumber(fe)&&fe>-1;let Q=o||fetch;z=z?(z+"").toLowerCase():"text";let oe=Cv([W,F&&F.toAbortSignal()],K),v=null;const P=oe&&oe.unsubscribe&&(()=>{oe.unsubscribe()});let Z;try{if(ke&&typeof O=="string"&&O.startsWith("data:")&&Iv(O)>re)throw new Ae("maxContentLength size of "+re+" exceeded",Ae.ERR_BAD_RESPONSE,C,v);if(he&&R!=="get"&&R!=="head"){const _e=yield A(X,H);if(typeof _e=="number"&&isFinite(_e)&&_e>fe)throw new Ae("Request body larger than maxBodyLength limit",Ae.ERR_BAD_REQUEST,C,v)}if(be&&T&&R!=="get"&&R!=="head"&&(Z=yield A(X,H))!==0){let _e=new a(O,{method:"POST",body:H,duplex:"half"}),$e;if(V.isFormData(H)&&($e=_e.headers.get("content-type"))&&X.setContentType($e),_e.body){const[ot,pn]=d0(Z,Eu(f0(be)));H=g0(_e.body,E0,ot,pn)}}V.isString(se)||(se=se?"include":"omit");const N=d&&"credentials"in a.prototype;if(V.isFormData(H)){const _e=X.getContentType();_e&&/^multipart\/form-data/i.test(_e)&&!/boundary=/i.test(_e)&&X.delete("content-type")}X.set("User-Agent","axios/"+hd,!1);const xe=ae(B({},J),{signal:oe,method:R.toUpperCase(),headers:t0(X.normalize()),body:H,duplex:"half",credentials:N?se:void 0});v=d&&new a(O,xe);let Re=yield d?Q(v,J):Q(O,xe);if(ke){const _e=V.toFiniteNumber(Re.headers.get("content-length"));if(_e!=null&&_e>re)throw new Ae("maxContentLength size of "+re+" exceeded",Ae.ERR_BAD_RESPONSE,C,v)}const Oe=y&&(z==="stream"||z==="response");if(y&&Re.body&&(ce||ke||Oe&&P)){const _e={};["status","statusText","headers"].forEach(Xn=>{_e[Xn]=Re[Xn]});const $e=V.toFiniteNumber(Re.headers.get("content-length")),[ot,pn]=ce&&d0($e,Eu(f0(ce),!0))||[];let Yi=0;const Zr=Xn=>{if(ke&&(Yi=Xn,Yi>re))throw new Ae("maxContentLength size of "+re+" exceeded",Ae.ERR_BAD_RESPONSE,C,v);ot&&ot(Xn)};Re=new u(g0(Re.body,E0,Zr,()=>{pn&&pn(),P&&P()}),_e)}z=z||"text";let Be=yield x[V.findKey(x,z)||"text"](Re,C);if(ke&&!y&&!Oe){let _e;if(Be!=null&&(typeof Be.byteLength=="number"?_e=Be.byteLength:typeof Be.size=="number"?_e=Be.size:typeof Be=="string"&&(_e=typeof r=="function"?new r().encode(Be).byteLength:Be.length)),typeof _e=="number"&&_e>re)throw new Ae("maxContentLength size of "+re+" exceeded",Ae.ERR_BAD_RESPONSE,C,v)}return!Oe&&P&&P(),yield new Promise((_e,$e)=>{c0(_e,$e,{data:Be,headers:tn.from(Re.headers),status:Re.status,statusText:Re.statusText,config:C,request:v})})}catch(N){if(P&&P(),oe&&oe.aborted&&oe.reason instanceof Ae){const xe=oe.reason;throw xe.config=C,v&&(xe.request=v),N!==xe&&(xe.cause=N),xe}throw N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new Ae("Network Error",Ae.ERR_NETWORK,C,v,N&&N.response),{cause:N.cause||N}):Ae.from(N,N&&N.code,C,v,N&&N.response)}})},Pv=new Map,b0=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,h,p=Pv;for(;c--;)d=a[c],h=p.get(d),h===void 0&&p.set(d,h=c?new Map:Rv(t)),p=h;return h};b0();const pd={http:iv,xhr:Av,fetch:{get:b0}};V.forEach(pd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const T0=e=>`- ${e}`,Lv=e=>V.isFunction(e)||e===null||e===!1;function Dv(e,t){e=V.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!Lv(r)&&(o=pd[(c=String(r)).toLowerCase()],o===void 0))throw new Ae(`Unknown adapter '${c}'`);if(o&&(V.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
11
+ `+u.map(T0).join(`
12
+ `):" "+T0(u[0]):"as no adapter specified";throw new Ae("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const x0={getAdapter:Dv,adapters:pd};function md(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ks(null,e)}function w0(e){return md(e),e.headers=tn.from(e.headers),e.data=fd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),x0.getAdapter(e.adapter||Cs.adapter,e)(e).then(function(r){md(e),e.response=r;try{r.data=fd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=tn.from(r.headers),r},function(r){if(!l0(r)&&(md(e),r&&r.response)){e.response=r.response;try{r.response.data=fd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=tn.from(r.response.headers)}return Promise.reject(r)})}const bu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{bu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const _0={};bu.transitional=function(t,n,r){function o(a,u){return"[Axios v"+hd+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Ae(o(u," has been removed"+(n?" in "+n:"")),Ae.ERR_DEPRECATED);return n&&!_0[u]&&(_0[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},bu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Mv(e,t,n){if(typeof e!="object")throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new Ae("option "+a+" must be "+d,Ae.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ae("Unknown option "+a,Ae.ERR_BAD_OPTION)}}const Tu={assertOptions:Mv,validators:bu},In=Tu.validators;let Si=class{constructor(t){this.defaults=t||{},this.interceptors={request:new a0,response:new a0}}request(t,n){return Ve(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(`
13
13
  `);return u===-1?"":o.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
14
14
  `),c=u===-1?-1:a.indexOf(`
15
15
  `,u+1),d=c===-1?"":a.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
16
- `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=vi(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Tu.assertOptions(r,{silentJSONParsing:In.transitional(In.boolean),forcedJSONParsing:In.transitional(In.boolean),clarifyTimeoutError:In.transitional(In.boolean),legacyInterceptorReqResOrdering:In.transitional(In.boolean)},!1),o!=null&&(V.isFunction(o)?n.paramsSerializer={serialize:o}:Tu.assertOptions(o,{encode:In.function,serialize:In.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Tu.assertOptions(n,{baseUrl:In.spelling("baseURL"),withXsrfToken:In.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&V.merge(a.common,a[n.method]);a&&V.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=tn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;d=d&&v.synchronous;const A=n.transitional||ld;A&&A.legacyInterceptorReqResOrdering?c.unshift(v.fulfilled,v.rejected):c.push(v.fulfilled,v.rejected)});const h=[];this.interceptors.response.forEach(function(v){h.push(v.fulfilled,v.rejected)});let p,E=0,T;if(!d){const x=[x0.bind(this),void 0];for(x.unshift(...c),x.push(...h),T=x.length,p=Promise.resolve(n);E<T;)p=p.then(x[E++],x[E++]);return p}T=c.length;let y=n;for(;E<T;){const x=c[E++],v=c[E++];try{y=x(y)}catch(A){v.call(this,A);break}}try{p=x0.call(this,y)}catch(x){return Promise.reject(x)}for(E=0,T=h.length;E<T;)p=p.then(h[E++],h[E++]);return p}getUri(t){t=vi(this.defaults,t);const n=f0(t.baseURL,t.url,t.allowAbsoluteUrls);return o0(n,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){Si.prototype[t]=function(n,r){return this.request(vi(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(vi(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Si.prototype[t]=n(),t!=="query"&&(Si.prototype[t+"Form"]=n(!0))});let Fv=class tw{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new ks(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new tw(function(o){t=o}),cancel:t}}};function Bv(e){return function(n){return e.apply(null,n)}}function Uv(e){return V.isObject(e)&&e.isAxiosError===!0}const gd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(gd).forEach(([e,t])=>{gd[t]=e});function _0(e){const t=new Si(e),n=Vm(Si.prototype.request,t);return V.extend(n,Si.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return _0(vi(e,o))},n}const xt=_0(Cs);xt.Axios=Si,xt.CanceledError=ks,xt.CancelToken=Fv,xt.isCancel=u0,xt.VERSION=hd,xt.toFormData=gu,xt.AxiosError=Ae,xt.Cancel=xt.CanceledError,xt.all=function(t){return Promise.all(t)},xt.spread=Bv,xt.isAxiosError=Uv,xt.mergeConfig=vi,xt.AxiosHeaders=tn,xt.formToJSON=e=>a0(V.isHTMLForm(e)?new FormData(e):e),xt.getAdapter=T0.getAdapter,xt.HttpStatusCode=gd,xt.default=xt;const{Axios:G9,AxiosError:K9,CanceledError:Q9,isCancel:X9,CancelToken:J9,VERSION:Z9,all:eF,Cancel:tF,isAxiosError:nF,spread:rF,toFormData:iF,AxiosHeaders:oF,HttpStatusCode:sF,formToJSON:aF,getAdapter:uF,mergeConfig:lF,create:cF}=xt;class Hv{constructor(t,n,r,o=!1,a,u){Ze(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ze(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ze(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ze(this,"baseApiUrl");Ze(this,"headers",{});Ze(this,"fetchConfig",()=>Ve(this,null,function*(){try{const t=yield xt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Ze(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class zv{constructor(t,n,r,o=!1,a,u){Ze(this,"apiService");Ze(this,"config",null);Ze(this,"getConfig",()=>Ve(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Ze(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ze(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ze(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ze(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ze(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ze(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ze(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ze(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ze(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ze(this,"getProductField",t=>this.config?this.config[t]:"");Ze(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Hv(t,n,r,o,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Ai=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class jv{constructor(t=!1){Ze(this,"isDevelopment");Ze(this,"_log",(t,n,...r)=>{Ai(this.isDevelopment,t,n,...r)});this.isDevelopment=t}log(t,...n){this._log("log",t,...n)}warn(t,...n){this._log("warn",t,...n)}error(t,...n){this._log("error",t,...n)}info(t,...n){this._log("info",t,...n)}debug(t,...n){this._log("debug",t,...n)}}const $v={copilot:"Your Search Assistant",messaging:"Commerce Client"},v0=J.createContext(null),Vv=({mode:e,logoUrl:t,headerText:n="Your Search Assistant",headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,searchPlaceholder:E,searchButtonLabel:T,searchConfig:y,componentConfig:x,conversationHistory:v,resetConversationMessage:A="",apiKey:C,apiToken:O,baseUrl:R,customerId:H,tenantId:W,theme:M,isDevelopment:K,__features:ce,children:be})=>{const z=e==="messaging",ee=J.useMemo(()=>z?{config:null}:new zv(R,C,O,K,H,W),[z,R,C,O,K,H,W]),se=J.useMemo(()=>new jv(K),[K]);J.useEffect(()=>{z||!ee||ee.config||ee.getConfig()},[ee,z]);const te=J.useMemo(()=>n_(M),[M]),re=J.useMemo(()=>{const he=(y==null?void 0:y.placeholder)||E,Q=(y==null?void 0:y.buttonLabel)||T;let oe="icon";return y!=null&&y.buttonType?oe=y.buttonType:T&&(oe="text"),ae(F({},y||{}),{placeholder:he,buttonLabel:Q,buttonType:oe})},[y,E,T]),fe=J.useMemo(()=>ae(F({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:n||$v[e!=null?e:"copilot"]}),[r,t,n,e]),ke=J.useMemo(()=>({configModule:ee,mode:e!=null?e:"copilot",headerConfig:fe,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,themeVariables:te,logger:se,searchConfig:re,enableMinimize:!!(x!=null&&x.enableMinimize),resetConversationMessage:A,conversationHistory:{sinceHours:typeof(v==null?void 0:v.sinceHours)=="number"?v.sinceHours:1,limit:v==null?void 0:v.limit},features:ce}),[ee,e,fe,a,o,h,p,c,d,u,re,x,A,se,te,v,ce]);return S.jsx(v0.Provider,{value:ke,children:be})},Nt=()=>{const e=J.useContext(v0);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},qv=["markdown","product_carousel","product_tile","suggestions","cart"],xu=-1;function Yv(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.type=="string"&&typeof t.index=="number")return qv.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:xu,data:{content:e}}}function Wv(e,t){if(t.index===xu){const o=e[e.length-1];if(o&&o.type==="markdown"&&o.index===xu&&t.type==="markdown"){const a={type:"markdown",index:xu,data:{content:o.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(o=>o.index===t.index);return[...n>=0?e.map((o,a)=>a===n?t:o):[...e,t]].sort((o,a)=>o.index-a.index)}const S0={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",routingResult:null,error:null,sessionExpired:!1};function Gv(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return F(ae(F({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ae(F({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return ae(F({},e),{conversationId:t.id});case"ADD_MESSAGE":return ae(F({},e),{messages:[...e.messages,ae(F({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=Yv(t.token);return n?ae(F({},e),{streamingBlocks:Wv(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":return ae(F({},e),{messages:[...e.messages,ae(F({},t.message),{type:"FLUSH_STREAMING"})],streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:""});case"SET_AGENT_TYPING":return ae(F({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return ae(F({},e),{progressMessage:t.message});case"SET_ROUTING_RESULT":return ae(F({},e),{routingResult:t.result});case"SET_ERROR":return ae(F({},e),{error:t.error,loading:!1,progressMessage:""});case"LOAD_HISTORY":return ae(F({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return ae(F({},e),{sessionExpired:t.expired});case"RESET":return ae(F({},S0),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const A0=J.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",loading:!0,error:null,sessionExpired:!1,sendMessage:()=>{},resetConversation:()=>{}});function Ed(e,t){return`cim_af_conv_${e}_${t}`}function yd(e,t){return Date.now()-e>t}function Kv(e,t,n){try{const r=Ed(e,t),o=sessionStorage.getItem(r);if(!o)return null;const a=JSON.parse(o);if(!a||typeof a!="object"||!("conversationId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.conversationId!="string"||!u.conversationId?null:typeof u.storedAt!="number"||yd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Ns(e,t,n){try{const r=Ed(e,t),o={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(o))}catch(r){}}function wu(e,t){try{const n=Ed(e,t);sessionStorage.removeItem(n)}catch(n){}}function bd(e,t){return`cim_af_ct_${e}_${t}`}function C0(e,t,n){try{const r=bd(e,t),o=sessionStorage.getItem(r);if(!o)return null;const a=JSON.parse(o);if(!a||typeof a!="object"||!("accessToken"in a)||!("lastEventId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.accessToken!="string"||!u.accessToken||typeof u.lastEventId!="string"||!u.lastEventId?null:typeof u.storedAt!="number"||Date.now()-u.storedAt>n?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Qv(e,t,n,r){try{const o=bd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(o,JSON.stringify(a))}catch(o){}}function Xv(e,t){try{const n=bd(e,t);sessionStorage.removeItem(n)}catch(n){}}function Jv(e,t){return`cim_af_conv_${e}_${t}`}function Zv(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=Jv(e,t);return new BroadcastChannel(n)}catch(n){return null}}function eS(e,t=500){return e?new Promise(n=>{let r=!1;const o=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var c;r||((c=u.data)==null?void 0:c.type)==="conversation_response"&&(r=!0,clearTimeout(o),e.removeEventListener("message",a),n({conversationId:u.data.conversationId,storedAt:u.data.storedAt,continuationToken:u.data.continuationToken,lastEventId:u.data.lastEventId}))}e.addEventListener("message",a);try{e.postMessage({type:"request_conversation"})}catch(u){r||(r=!0,clearTimeout(o),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function tS(e,t,n){if(!e)return()=>{};function r(o){var a;if((a=o.data)!=null&&a.type)switch(o.data.type){case"request_conversation":{const u=t();if(u!=null&&u.conversationId)try{e.postMessage({type:"conversation_response",conversationId:u.conversationId,storedAt:Date.now(),continuationToken:u.continuationToken,lastEventId:u.lastEventId})}catch(c){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function nS(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function rS(e){if(e)try{e.close()}catch(t){}}function iS(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function oS(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function k0(e,...t){let n=e;for(const r of t){if(n==null||typeof n!="object")return"";n=n[r]}return typeof n=="string"?n:""}function sS(e){if(e.entryType!=="Message")return null;const n=oS(e.entryPayload).abstractMessage;if(!n)return null;const r=k0(n,"staticContent","text")||k0(n,"content","text")||"";if(!r)return null;const o=iS(e.sender.role);return{id:e.identifier,role:o,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function aS(e){const t=[];for(const n of e){const r=sS(n);r&&t.push(r)}return t}function uS(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:o}=e,a=J.useRef(null),u=J.useRef(null),c=J.useRef(null),d=o.sinceHours*60*60*1e3,h=J.useCallback(()=>(c.current||(c.current=eS(a.current)),c.current),[]);J.useEffect(()=>{const A=Zv(t,n);a.current=A,c.current=null;const C=tS(A,()=>{const O=u.current;if(!O)return null;const R=C0(t,n,d);return{conversationId:O,continuationToken:R==null?void 0:R.accessToken,lastEventId:R==null?void 0:R.lastEventId}},()=>{wu(t,n),u.current=null});return()=>{C(),rS(A),a.current=null}},[t,n,d]);const p=J.useCallback(A=>Ve(null,null,function*(){let C=Kv(t,n,d);if(!C){const O=yield h();O&&!yd(O.storedAt,d)&&(C=O)}if(!C){const O=yield A.createConversation(r);return Ns(t,n,O),u.current=O,{conversationId:O,restoredMessages:[],resumed:!1}}try{const O=Date.now()-d,H=(yield A.listConversations({conversationId:C.conversationId,startTimestamp:O})).conversations.find(M=>M.conversationId===C.conversationId&&!M.isConversationClosed);if(!H){wu(t,n);const M=yield A.createConversation(r);return Ns(t,n,M),u.current=M,{conversationId:M,restoredMessages:[],resumed:!1}}A.resumeConversation(H.conversationId),u.current=H.conversationId,Ns(t,n,H.conversationId);let W=[];try{const M=yield A.listConversationEntries(H.conversationId,{limit:o.limit,startTimestamp:O,direction:"FromStart"});W=aS(M.conversationEntries)}catch(M){}return{conversationId:H.conversationId,restoredMessages:W,resumed:!0}}catch(O){wu(t,n);const R=yield A.createConversation(r);return Ns(t,n,R),u.current=R,{conversationId:R,restoredMessages:[],resumed:!1}}}),[t,n,r,o,d,h]),E=J.useCallback(A=>{Ns(t,n,A),u.current=A},[t,n]),T=J.useCallback(()=>{wu(t,n),Xv(t,n),nS(a.current),u.current=null},[t,n]),y=J.useCallback(()=>{const A=C0(t,n,d);return A?{continuationToken:A.accessToken,lastEventId:A.lastEventId}:null},[t,n,d]),x=J.useCallback(()=>Ve(null,null,function*(){const A=yield h();return!(A!=null&&A.continuationToken)||yd(A.storedAt,d)?null:{continuationToken:A.continuationToken,lastEventId:A.lastEventId}}),[d,h]),v=J.useCallback(A=>Ve(null,null,function*(){try{const{accessToken:C,lastEventId:O}=yield A.generateContinuationToken();Qv(t,n,C,O)}catch(C){}}),[t,n]);return{initializeConversation:p,persistConversationId:E,clearPersistedConversation:T,getStoredConnectOptions:y,getPeerConnectOptions:x,persistContinuationToken:v}}const lS="Your session ended due to inactivity. Starting a new session…";function cS(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="auth"?!0:t.type==="api"&&(t.statusCode===401||t.statusCode===403)}const N0=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:o,enableLogging:a=!1,onConnect:u,onMessage:c,onError:d,children:h})=>{const{logger:p,conversationHistory:E}=Nt(),[T,y]=J.useReducer(Gv,S0),x=uS({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:E}),v=J.useRef(null),A=J.useRef(c),C=J.useRef(d),O=J.useRef(u),R=J.useRef(!1),H=J.useRef(!1),W=J.useRef(0);A.current=c,C.current=d,O.current=u,J.useEffect(()=>{const ee=new t_({baseURL:e,orgId:t,esDeveloperName:n,options:F({enableLogging:a},o?{capabilitiesVersion:o}:{})});return v.current=ee,ee.on("connected",()=>{var te;y({type:"SET_CONNECTION_STATUS",status:"connected"}),(te=O.current)==null||te.call(O)}),ee.on("disconnected",()=>{y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),ee.on("reconnecting",()=>{y({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),ee.on("message",te=>{var fe;const re={id:te.messageId||crypto.randomUUID(),role:"agent",content:te.content,timestamp:te.timestamp,sender:te.sender,raw:te};p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:re.id,tokensBeforeFlush:W.current,streamedFinalOnly:W.current===0}),W.current=0,y({type:"FLUSH_STREAMING",message:re}),(fe=A.current)==null||fe.call(A,re)}),ee.on("streaming_token",te=>{W.current+=1,y({type:"APPEND_STREAMING_TOKEN",token:te.token})}),ee.on("typing_started",()=>{y({type:"SET_AGENT_TYPING",isTyping:!0})}),ee.on("typing_stopped",()=>{y({type:"SET_AGENT_TYPING",isTyping:!1})}),ee.on("progress_indicator",te=>{y({type:"SET_PROGRESS_MESSAGE",message:te.message})}),ee.on("routing_result",te=>{var re;if(y({type:"SET_ROUTING_RESULT",result:te}),!te.isSuccessful){const fe=`Routing failed: ${te.failureType||"unknown"}`;y({type:"SET_ERROR",error:fe}),(re=C.current)==null||re.call(C,fe)}}),ee.on("participant_changed",te=>{if(te.participant.name==="Automated Process")return;const re={id:crypto.randomUUID(),role:"system",content:te.action==="add"?`${te.participant.name||"Agent"} joined the conversation`:`${te.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()};p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:te}),y({type:"ADD_MESSAGE",message:re})}),ee.on("conversation_closed",()=>{const te={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};y({type:"ADD_MESSAGE",message:te}),y({type:"SET_CONVERSATION_ID",id:null}),x.clearPersistedConversation()}),ee.on("error",te=>{var re;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:te}),te.code==="SESSION_EXPIRED"){H.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}),y({type:"SET_LOADING",isLoading:!1});return}y({type:"SET_ERROR",error:te.message}),te.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(re=C.current)==null||re.call(C,te.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),Ve(null,null,function*(){let te=x.getStoredConnectOptions(),re=!1;te||(te=yield x.getPeerConnectOptions(),re=!!te);try{yield ee.connect(te!=null?te:void 0)}catch(ke){if(te)p==null||p.log("Continuation token failed, falling back to fresh connect"),re||x.clearPersistedConversation(),yield ee.connect();else throw ke}yield x.persistContinuationToken(ee);const fe=yield x.initializeConversation(ee);y({type:"SET_CONVERSATION_ID",id:fe.conversationId}),fe.resumed&&fe.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:fe.restoredMessages})}).catch(te=>{var re;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:te.message}),(re=C.current)==null||re.call(C,te.message)}),()=>{ee.disconnect(),ee.off(),v.current=null}},[e,t,n,o]),J.useEffect(()=>{const ee=()=>{document.visibilityState==="visible"&&v.current&&!H.current&&v.current.reconnect()};return document.addEventListener("visibilitychange",ee),()=>{document.removeEventListener("visibilitychange",ee)}},[]);const M=J.useCallback(ee=>Ve(null,null,function*(){var te;const se=v.current;if(!(!se||R.current)){R.current=!0,H.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:lS,timestamp:new Date().toISOString()}}),x.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"});try{se.disconnect(),yield se.connect(),yield x.persistContinuationToken(se);const re=yield se.createConversation(r);y({type:"SET_CONVERSATION_ID",id:re}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),x.persistConversationId(re),ee&&(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),yield se.sendMessage(ee))}catch(re){const fe=re instanceof Error?re.message:String(re);y({type:"SET_ERROR",error:fe}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(te=C.current)==null||te.call(C,fe)}finally{R.current=!1}}}),[r,x]),K=J.useRef(M);K.current=M;const ce=J.useCallback(ee=>{if(!ee.trim())return;const se=v.current;if(!se)return;const te={id:crypto.randomUUID(),role:"user",content:ee,timestamp:new Date().toISOString()};if(y({type:"ADD_MESSAGE",message:te}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),H.current){K.current(ee);return}se.sendMessage(ee).catch(re=>{var fe;if(cS(re)){K.current(ee);return}y({type:"SET_ERROR",error:re.message}),(fe=C.current)==null||fe.call(C,re.message)})},[]),be=J.useCallback(()=>{const ee=v.current;ee&&(H.current=!1,x.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),ee.endConversation().then(()=>(ee.disconnect(),ee.connect())).then(()=>Ve(null,null,function*(){return yield x.persistContinuationToken(ee),ee.createConversation(r)})).then(se=>{y({type:"SET_CONVERSATION_ID",id:se}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),x.persistConversationId(se)}).catch(se=>{var te;y({type:"SET_ERROR",error:se.message}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(te=C.current)==null||te.call(C,se.message)}))},[r,x]),z=J.useMemo(()=>({connectionStatus:T.connectionStatus,isConnected:T.connectionStatus==="connected"&&T.conversationId!==null,isAgentTyping:T.isAgentTyping,conversationId:T.conversationId,messages:T.messages,streamingBlocks:T.streamingBlocks,progressMessage:T.progressMessage,error:T.error,loading:T.loading,sessionExpired:T.sessionExpired,sendMessage:ce,resetConversation:be}),[T,ce,be]);return S.jsx(A0.Provider,{value:z,children:h})};function dS(){var e=J.useRef(!0);return e.current?(e.current=!1,!0):e.current}function fS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function hS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Td=typeof window!="undefined",_u=function(e){J.useEffect(e,[])},pS=function(e){var t=J.useRef(e);t.current=e,_u(function(){return function(){return t.current()}})},mS=function(e){var t=J.useRef(0),n=J.useState(e),r=n[0],o=n[1],a=J.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return pS(function(){cancelAnimationFrame(t.current)}),[r,a]},gS=function(e,t){return e===t};function ES(e,t){t===void 0&&(t=gS);var n=J.useRef(),r=J.useRef(e),o=dS();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var yS=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,c=mS({width:Td?window.innerWidth:r,height:Td?window.innerHeight:a}),d=c[0],h=c[1];return J.useEffect(function(){if(Td){var p=function(){var E=window.innerWidth,T=window.innerHeight;h({width:E,height:T}),u&&u(E,T)};return fS(window,"resize",p),function(){hS(window,"resize",p)}}},[]),d};const xd="cimulate:ui-state-update",bS=e=>{window.addEventListener(xd,e)},TS=e=>{window.removeEventListener(xd,e)},xS=(e,t)=>{const n=new CustomEvent(xd,{detail:{property:e,value:t}});window.dispatchEvent(n)},O0=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);tt.entryTypeProxy.entryType=e},Ci=e=>{const t=tt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;tt.statusProxy.isOpen=n,n&&(tt.statusProxy.isMinimized=!1)},vu=e=>{const t=tt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;tt.statusProxy.isMinimized=n,n&&(tt.statusProxy.isOpen=!1)},wd=e=>{tt.modalProxy.isFullscreen=e},Su=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);tt.statusProxy.type=e,e==="dialog"||e==="chat"?tt.modeProxy.mode="embedded":tt.modeProxy.mode="standalone"},_d=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);tt.dialogProxy.position=e},wS=e=>{const t=tt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;tt.dialogProxy.isFullHeight=n};class _S{constructor(){Ze(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Ze(this,"connectedProxy");Ze(this,"modeProxy");Ze(this,"entryTypeProxy");Ze(this,"statusProxy");Ze(this,"dialogProxy");Ze(this,"modalProxy",{isFullscreen:!1});Ze(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ze(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return xS(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const tt=new _S,I0=J.createContext({mode:tt.modeProxy.mode,entryType:tt.entryType,status:tt.statusProxy,dialogPosition:tt.dialogProxy.position,isDialogFullHeight:tt.dialogProxy.isFullHeight,dialogWidth:tt.dialogProxy.width,isModalFullscreen:tt.modalProxy.isFullscreen,previousComponentType:tt.statusProxy.type}),vS=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=J.useState(e!=null?e:tt.entryTypeProxy.entryType),[u,c]=J.useState(tt.modeProxy.mode),[d,h]=J.useState({type:n||tt.statusProxy.type,isOpen:tt.statusProxy.isOpen,isMinimized:tt.statusProxy.isMinimized}),[p,E]=J.useState(tt.dialogProxy.position),[T,y]=J.useState(tt.dialogProxy.isFullHeight),[x,v]=J.useState(tt.dialogProxy.width),[A,C]=J.useState(tt.modalProxy.isFullscreen),O=ES(d.type);J.useEffect(()=>{const H=W=>{const{property:M,value:K}=W.detail||{};if(!(!M||K===void 0)){if(M==="mode"){c(K);return}if(M==="entryType"){a(K);return}if(M==="isMinimized"){h(ce=>ae(F({},ce),{isMinimized:K}));return}if(M==="isOpen"){h(ce=>ae(F({},ce),{isOpen:K}));return}if(M==="type"){h(ce=>ae(F({},ce),{type:K}));return}if(M==="position"){E(K);return}if(M==="isFullHeight"){y(K);return}if(M==="width"){v(K);return}if(M==="isFullscreen"){C(K);return}}};return bS(H),()=>{TS(H)}},[]),_u(()=>{e&&O0(e)}),_u(()=>{const H=n||(t==null?void 0:t.type);H&&Su(H),t&&"isOpen"in t&&Ci(!!t.isOpen),t&&"isMinimized"in t&&vu(!!t.isMinimized)}),_u(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:H}=t.options;H&&_d(H),"dialogFullHeight"in t.options&&wS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&wd(!!t.options.isModalFullscreen)});const R=J.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:O||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:x,isModalFullscreen:A}),[u,o,d,O,p,T,x,A]);return S.jsx(I0.Provider,{value:R,children:r})},R0=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:o,headerText:a,headerConfig:u,theme:c,openLinksInNewTab:d,globalClassName:h,isDevelopment:p=!1,componentType:E,componentConfig:T,entryType:y,entryMessage:x,disclaimerText:v,disclaimerMarkdown:A,clientContext:C,searchPlaceholder:O,searchButtonLabel:R,searchConfig:H,resetConversationMessage:W,conversationHistory:M,messagingConfig:K,__features:ce,children:be})=>S.jsx(Vv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:o,headerText:a,headerConfig:u,entryMessage:x,theme:c,globalClassName:h,openLinksInNewTab:d,searchPlaceholder:O,searchButtonLabel:R,searchConfig:H,componentConfig:T,clientContext:C,disclaimerMarkdown:A,disclaimerText:v,resetConversationMessage:W,conversationHistory:M,isDevelopment:p,__features:ce,children:S.jsx(vS,{entryType:y,componentConfig:T,componentType:E,children:S.jsx(N0,{scrt2Url:(K==null?void 0:K.scrt2Url)||"",orgId:(K==null?void 0:K.orgId)||"",esDeveloperName:(K==null?void 0:K.esDeveloperName)||"",routingAttributes:(K==null?void 0:K.routingAttributes)||{},capabilitiesVersion:K==null?void 0:K.capabilitiesVersion,enableLogging:p,children:be})})}),ki=()=>{const e=J.useContext(I0);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var vd={exports:{}},ln={},Sd={exports:{}},Ad={};var P0;function SS(){return P0||(P0=1,(function(e){function t(Q,oe){var _=Q.length;Q.push(oe);e:for(;0<_;){var P=_-1>>>1,X=Q[P];if(0<o(X,oe))Q[P]=oe,Q[_]=X,_=P;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var oe=Q[0],_=Q.pop();if(_!==oe){Q[0]=_;e:for(var P=0,X=Q.length,N=X>>>1;P<N;){var xe=2*(P+1)-1,Re=Q[xe],Oe=xe+1,Be=Q[Oe];if(0>o(Re,_))Oe<X&&0>o(Be,Re)?(Q[P]=Be,Q[Oe]=_,P=Oe):(Q[P]=Re,Q[xe]=_,P=xe);else if(Oe<X&&0>o(Be,_))Q[P]=Be,Q[Oe]=_,P=Oe;else break e}}return oe}function o(Q,oe){var _=Q.sortIndex-oe.sortIndex;return _!==0?_:Q.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],h=[],p=1,E=null,T=3,y=!1,x=!1,v=!1,A=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(Q){for(var oe=n(h);oe!==null;){if(oe.callback===null)r(h);else if(oe.startTime<=Q)r(h),oe.sortIndex=oe.expirationTime,t(d,oe);else break;oe=n(h)}}function H(Q){if(v=!1,R(Q),!x)if(n(d)!==null)x=!0,ke(W);else{var oe=n(h);oe!==null&&he(H,oe.startTime-Q)}}function W(Q,oe){x=!1,v&&(v=!1,C(ce),ce=-1),y=!0;var _=T;try{for(R(oe),E=n(d);E!==null&&(!(E.expirationTime>oe)||Q&&!ee());){var P=E.callback;if(typeof P=="function"){E.callback=null,T=E.priorityLevel;var X=P(E.expirationTime<=oe);oe=e.unstable_now(),typeof X=="function"?E.callback=X:E===n(d)&&r(d),R(oe)}else r(d);E=n(d)}if(E!==null)var N=!0;else{var xe=n(h);xe!==null&&he(H,xe.startTime-oe),N=!1}return N}finally{E=null,T=_,y=!1}}var M=!1,K=null,ce=-1,be=5,z=-1;function ee(){return!(e.unstable_now()-z<be)}function se(){if(K!==null){var Q=e.unstable_now();z=Q;var oe=!0;try{oe=K(!0,Q)}finally{oe?te():(M=!1,K=null)}}else M=!1}var te;if(typeof O=="function")te=function(){O(se)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,fe=re.port2;re.port1.onmessage=se,te=function(){fe.postMessage(null)}}else te=function(){A(se,0)};function ke(Q){K=Q,M||(M=!0,te())}function he(Q,oe){ce=A(function(){Q(e.unstable_now())},oe)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,ke(W))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):be=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Q){switch(T){case 1:case 2:case 3:var oe=3;break;default:oe=T}var _=T;T=oe;try{return Q()}finally{T=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,oe){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var _=T;T=Q;try{return oe()}finally{T=_}},e.unstable_scheduleCallback=function(Q,oe,_){var P=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?P+_:P):_=P,Q){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=_+X,Q={id:p++,callback:oe,priorityLevel:Q,startTime:_,expirationTime:X,sortIndex:-1},_>P?(Q.sortIndex=_,t(h,Q),n(d)===null&&Q===n(h)&&(v?(C(ce),ce=-1):v=!0,he(H,_-P))):(Q.sortIndex=X,t(d,Q),x||y||(x=!0,ke(W))),Q},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(Q){var oe=T;return function(){var _=T;T=oe;try{return Q.apply(this,arguments)}finally{T=_}}}})(Ad)),Ad}var L0;function AS(){return L0||(L0=1,Sd.exports=SS()),Sd.exports}var D0;function CS(){if(D0)return ln;D0=1;var e=uo(),t=AS();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},E={};function T(i){return d.call(E,i)?!0:d.call(p,i)?!1:h.test(i)?E[i]=!0:(p[i]=!0,!1)}function y(i,s,l,f){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,s,l,f){if(s===null||typeof s=="undefined"||y(i,s,l,f))return!0;if(f)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(i,s,l,f,g,b,w){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=g,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=w}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];A[s]=new v(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new v(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function O(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(C,O);A[s]=new v(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(C,O);A[s]=new v(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(C,O);A[s]=new v(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function R(i,s,l,f){var g=A.hasOwnProperty(s)?A[s]:null;(g!==null?g.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(x(s,l,g,f)&&(l=null),f||g===null?T(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):g.mustUseProperty?i[g.propertyName]=l===null?g.type===3?!1:"":l:(s=g.attributeName,f=g.attributeNamespace,l===null?i.removeAttribute(s):(g=g.type,l=g===3||g===4&&l===!0?"":""+l,f?i.setAttributeNS(f,s,l):i.setAttribute(s,l))))}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),M=Symbol.for("react.portal"),K=Symbol.for("react.fragment"),ce=Symbol.for("react.strict_mode"),be=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),ee=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),fe=Symbol.for("react.memo"),ke=Symbol.for("react.lazy"),he=Symbol.for("react.offscreen"),Q=Symbol.iterator;function oe(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var _=Object.assign,P;function X(i){if(P===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);P=s&&s[1]||""}return`
17
- `+P+i}var N=!1;function xe(i,s){if(!i||N)return"";N=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(Z){var f=Z}Reflect.construct(i,[],s)}else{try{s.call()}catch(Z){f=Z}i.call(s.prototype)}else{try{throw Error()}catch(Z){f=Z}i()}}catch(Z){if(Z&&f&&typeof Z.stack=="string"){for(var g=Z.stack.split(`
16
+ `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=vi(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Tu.assertOptions(r,{silentJSONParsing:In.transitional(In.boolean),forcedJSONParsing:In.transitional(In.boolean),clarifyTimeoutError:In.transitional(In.boolean),legacyInterceptorReqResOrdering:In.transitional(In.boolean)},!1),o!=null&&(V.isFunction(o)?n.paramsSerializer={serialize:o}:Tu.assertOptions(o,{encode:In.function,serialize:In.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Tu.assertOptions(n,{baseUrl:In.spelling("baseURL"),withXsrfToken:In.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&V.merge(a.common,a[n.method]);a&&V.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=tn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;d=d&&S.synchronous;const A=n.transitional||ld;A&&A.legacyInterceptorReqResOrdering?c.unshift(S.fulfilled,S.rejected):c.push(S.fulfilled,S.rejected)});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let p,g=0,T;if(!d){const x=[w0.bind(this),void 0];for(x.unshift(...c),x.push(...h),T=x.length,p=Promise.resolve(n);g<T;)p=p.then(x[g++],x[g++]);return p}T=c.length;let y=n;for(;g<T;){const x=c[g++],S=c[g++];try{y=x(y)}catch(A){S.call(this,A);break}}try{p=w0.call(this,y)}catch(x){return Promise.reject(x)}for(g=0,T=h.length;g<T;)p=p.then(h[g++],h[g++]);return p}getUri(t){t=vi(this.defaults,t);const n=h0(t.baseURL,t.url,t.allowAbsoluteUrls);return s0(n,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){Si.prototype[t]=function(n,r){return this.request(vi(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(vi(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Si.prototype[t]=n(),t!=="query"&&(Si.prototype[t+"Form"]=n(!0))});let Fv=class t2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new ks(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new t2(function(o){t=o}),cancel:t}}};function Bv(e){return function(n){return e.apply(null,n)}}function Uv(e){return V.isObject(e)&&e.isAxiosError===!0}const gd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(gd).forEach(([e,t])=>{gd[t]=e});function v0(e){const t=new Si(e),n=qm(Si.prototype.request,t);return V.extend(n,Si.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return v0(vi(e,o))},n}const xt=v0(Cs);xt.Axios=Si,xt.CanceledError=ks,xt.CancelToken=Fv,xt.isCancel=l0,xt.VERSION=hd,xt.toFormData=gu,xt.AxiosError=Ae,xt.Cancel=xt.CanceledError,xt.all=function(t){return Promise.all(t)},xt.spread=Bv,xt.isAxiosError=Uv,xt.mergeConfig=vi,xt.AxiosHeaders=tn,xt.formToJSON=e=>u0(V.isHTMLForm(e)?new FormData(e):e),xt.getAdapter=x0.getAdapter,xt.HttpStatusCode=gd,xt.default=xt;const{Axios:Q9,AxiosError:X9,CanceledError:J9,isCancel:Z9,CancelToken:eF,VERSION:tF,all:nF,Cancel:rF,isAxiosError:iF,spread:oF,toFormData:sF,AxiosHeaders:aF,HttpStatusCode:uF,formToJSON:lF,getAdapter:cF,mergeConfig:dF,create:fF}=xt;class Hv{constructor(t,n,r,o=!1,a,u){Ze(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ze(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ze(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ze(this,"baseApiUrl");Ze(this,"headers",{});Ze(this,"fetchConfig",()=>Ve(this,null,function*(){try{const t=yield xt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Ze(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class zv{constructor(t,n,r,o=!1,a,u){Ze(this,"apiService");Ze(this,"config",null);Ze(this,"getConfig",()=>Ve(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Ze(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ze(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ze(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ze(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ze(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ze(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ze(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ze(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ze(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ze(this,"getProductField",t=>this.config?this.config[t]:"");Ze(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Hv(t,n,r,o,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Ai=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class jv{constructor(t=!1){Ze(this,"isDevelopment");Ze(this,"_log",(t,n,...r)=>{Ai(this.isDevelopment,t,n,...r)});this.isDevelopment=t}log(t,...n){this._log("log",t,...n)}warn(t,...n){this._log("warn",t,...n)}error(t,...n){this._log("error",t,...n)}info(t,...n){this._log("info",t,...n)}debug(t,...n){this._log("debug",t,...n)}}const $v={copilot:"Your Search Assistant",messaging:"Commerce Client"},S0=ee.createContext(null),Vv=({mode:e,logoUrl:t,headerText:n="Your Search Assistant",headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,searchPlaceholder:g,searchButtonLabel:T,searchConfig:y,componentConfig:x,conversationHistory:S,resetConversationMessage:A="",apiKey:C,apiToken:O,baseUrl:R,customerId:H,tenantId:W,theme:F,isDevelopment:K,__features:ce,children:be})=>{const z=e==="messaging",X=ee.useMemo(()=>z?{config:null}:new zv(R,C,O,K,H,W),[z,R,C,O,K,H,W]),se=ee.useMemo(()=>new jv(K),[K]);ee.useEffect(()=>{z||!X||X.config||X.getConfig()},[X,z]);const J=ee.useMemo(()=>n_(F),[F]),re=ee.useMemo(()=>{const he=(y==null?void 0:y.placeholder)||g,Q=(y==null?void 0:y.buttonLabel)||T;let oe="icon";return y!=null&&y.buttonType?oe=y.buttonType:T&&(oe="text"),ae(B({},y||{}),{placeholder:he,buttonLabel:Q,buttonType:oe})},[y,g,T]),fe=ee.useMemo(()=>ae(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:n||$v[e!=null?e:"copilot"]}),[r,t,n,e]),ke=ee.useMemo(()=>({configModule:X,mode:e!=null?e:"copilot",headerConfig:fe,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,themeVariables:J,logger:se,searchConfig:re,enableMinimize:!!(x!=null&&x.enableMinimize),resetConversationMessage:A,conversationHistory:{sinceHours:typeof(S==null?void 0:S.sinceHours)=="number"?S.sinceHours:1,limit:S==null?void 0:S.limit},features:ce}),[X,e,fe,a,o,h,p,c,d,u,re,x,A,se,J,S,ce]);return _.jsx(S0.Provider,{value:ke,children:be})},Nt=()=>{const e=ee.useContext(S0);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},qv=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart"],xu=-1;function Yv(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.type=="string"&&typeof t.index=="number")return qv.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:xu,data:{content:e}}}function Wv(e,t){if(t.index===xu){const o=e[e.length-1];if(o&&o.type==="markdown"&&o.index===xu&&t.type==="markdown"){const a={type:"markdown",index:xu,data:{content:o.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(o=>o.index===t.index);return[...n>=0?e.map((o,a)=>a===n?t:o):[...e,t]].sort((o,a)=>o.index-a.index)}const A0={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",routingResult:null,error:null,sessionExpired:!1};function Gv(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return B(ae(B({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ae(B({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return ae(B({},e),{conversationId:t.id});case"ADD_MESSAGE":return ae(B({},e),{messages:[...e.messages,ae(B({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=Yv(t.token);return n?ae(B({},e),{streamingBlocks:Wv(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":return ae(B({},e),{messages:[...e.messages,ae(B({},t.message),{type:"FLUSH_STREAMING"})],streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:""});case"SET_AGENT_TYPING":return ae(B({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return ae(B({},e),{progressMessage:t.message});case"SET_ROUTING_RESULT":return ae(B({},e),{routingResult:t.result});case"SET_ERROR":return ae(B({},e),{error:t.error,loading:!1,progressMessage:""});case"LOAD_HISTORY":return ae(B({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return ae(B({},e),{sessionExpired:t.expired});case"RESET":return ae(B({},A0),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const C0=ee.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",loading:!0,error:null,sessionExpired:!1,sendMessage:()=>{},resetConversation:()=>{}});function Ed(e,t){return`cim_af_conv_${e}_${t}`}function yd(e,t){return Date.now()-e>t}function Kv(e,t,n){try{const r=Ed(e,t),o=sessionStorage.getItem(r);if(!o)return null;const a=JSON.parse(o);if(!a||typeof a!="object"||!("conversationId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.conversationId!="string"||!u.conversationId?null:typeof u.storedAt!="number"||yd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Ns(e,t,n){try{const r=Ed(e,t),o={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(o))}catch(r){}}function wu(e,t){try{const n=Ed(e,t);sessionStorage.removeItem(n)}catch(n){}}function bd(e,t){return`cim_af_ct_${e}_${t}`}function k0(e,t,n){try{const r=bd(e,t),o=sessionStorage.getItem(r);if(!o)return null;const a=JSON.parse(o);if(!a||typeof a!="object"||!("accessToken"in a)||!("lastEventId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.accessToken!="string"||!u.accessToken||typeof u.lastEventId!="string"||!u.lastEventId?null:typeof u.storedAt!="number"||Date.now()-u.storedAt>n?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Qv(e,t,n,r){try{const o=bd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(o,JSON.stringify(a))}catch(o){}}function Xv(e,t){try{const n=bd(e,t);sessionStorage.removeItem(n)}catch(n){}}function Jv(e,t){return`cim_af_conv_${e}_${t}`}function Zv(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=Jv(e,t);return new BroadcastChannel(n)}catch(n){return null}}function eS(e,t=500){return e?new Promise(n=>{let r=!1;const o=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var c;r||((c=u.data)==null?void 0:c.type)==="conversation_response"&&(r=!0,clearTimeout(o),e.removeEventListener("message",a),n({conversationId:u.data.conversationId,storedAt:u.data.storedAt,continuationToken:u.data.continuationToken,lastEventId:u.data.lastEventId}))}e.addEventListener("message",a);try{e.postMessage({type:"request_conversation"})}catch(u){r||(r=!0,clearTimeout(o),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function tS(e,t,n){if(!e)return()=>{};function r(o){var a;if((a=o.data)!=null&&a.type)switch(o.data.type){case"request_conversation":{const u=t();if(u!=null&&u.conversationId)try{e.postMessage({type:"conversation_response",conversationId:u.conversationId,storedAt:Date.now(),continuationToken:u.continuationToken,lastEventId:u.lastEventId})}catch(c){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function nS(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function rS(e){if(e)try{e.close()}catch(t){}}function iS(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function oS(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function N0(e,...t){let n=e;for(const r of t){if(n==null||typeof n!="object")return"";n=n[r]}return typeof n=="string"?n:""}function sS(e){if(e.entryType!=="Message")return null;const n=oS(e.entryPayload).abstractMessage;if(!n)return null;const r=N0(n,"staticContent","text")||N0(n,"content","text")||"";if(!r)return null;const o=iS(e.sender.role);return{id:e.identifier,role:o,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function aS(e){const t=[];for(const n of e){const r=sS(n);r&&t.push(r)}return t}function uS(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:o}=e,a=ee.useRef(null),u=ee.useRef(null),c=ee.useRef(null),d=o.sinceHours*60*60*1e3,h=ee.useCallback(()=>(c.current||(c.current=eS(a.current)),c.current),[]);ee.useEffect(()=>{const A=Zv(t,n);a.current=A,c.current=null;const C=tS(A,()=>{const O=u.current;if(!O)return null;const R=k0(t,n,d);return{conversationId:O,continuationToken:R==null?void 0:R.accessToken,lastEventId:R==null?void 0:R.lastEventId}},()=>{wu(t,n),u.current=null});return()=>{C(),rS(A),a.current=null}},[t,n,d]);const p=ee.useCallback(A=>Ve(null,null,function*(){let C=Kv(t,n,d);if(!C){const O=yield h();O&&!yd(O.storedAt,d)&&(C=O)}if(!C){const O=yield A.createConversation(r);return Ns(t,n,O),u.current=O,{conversationId:O,restoredMessages:[],resumed:!1}}try{const O=Date.now()-d,H=(yield A.listConversations({conversationId:C.conversationId,startTimestamp:O})).conversations.find(F=>F.conversationId===C.conversationId&&!F.isConversationClosed);if(!H){wu(t,n);const F=yield A.createConversation(r);return Ns(t,n,F),u.current=F,{conversationId:F,restoredMessages:[],resumed:!1}}A.resumeConversation(H.conversationId),u.current=H.conversationId,Ns(t,n,H.conversationId);let W=[];try{const F=yield A.listConversationEntries(H.conversationId,{limit:o.limit,startTimestamp:O,direction:"FromStart"});W=aS(F.conversationEntries)}catch(F){}return{conversationId:H.conversationId,restoredMessages:W,resumed:!0}}catch(O){wu(t,n);const R=yield A.createConversation(r);return Ns(t,n,R),u.current=R,{conversationId:R,restoredMessages:[],resumed:!1}}}),[t,n,r,o,d,h]),g=ee.useCallback(A=>{Ns(t,n,A),u.current=A},[t,n]),T=ee.useCallback(()=>{wu(t,n),Xv(t,n),nS(a.current),u.current=null},[t,n]),y=ee.useCallback(()=>{const A=k0(t,n,d);return A?{continuationToken:A.accessToken,lastEventId:A.lastEventId}:null},[t,n,d]),x=ee.useCallback(()=>Ve(null,null,function*(){const A=yield h();return!(A!=null&&A.continuationToken)||yd(A.storedAt,d)?null:{continuationToken:A.continuationToken,lastEventId:A.lastEventId}}),[d,h]),S=ee.useCallback(A=>Ve(null,null,function*(){try{const{accessToken:C,lastEventId:O}=yield A.generateContinuationToken();Qv(t,n,C,O)}catch(C){}}),[t,n]);return{initializeConversation:p,persistConversationId:g,clearPersistedConversation:T,getStoredConnectOptions:y,getPeerConnectOptions:x,persistContinuationToken:S}}const lS="Your session ended due to inactivity. Starting a new session…";function cS(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="auth"?!0:t.type==="api"&&(t.statusCode===401||t.statusCode===403)}const O0=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:o,enableLogging:a=!1,onConnect:u,onMessage:c,onError:d,children:h})=>{const{logger:p,conversationHistory:g}=Nt(),[T,y]=ee.useReducer(Gv,A0),x=uS({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:g}),S=ee.useRef(null),A=ee.useRef(c),C=ee.useRef(d),O=ee.useRef(u),R=ee.useRef(!1),H=ee.useRef(!1),W=ee.useRef(0);A.current=c,C.current=d,O.current=u,ee.useEffect(()=>{const X=new t_({baseURL:e,orgId:t,esDeveloperName:n,options:B({enableLogging:a},o?{capabilitiesVersion:o}:{})});return S.current=X,X.on("connected",()=>{var J;y({type:"SET_CONNECTION_STATUS",status:"connected"}),(J=O.current)==null||J.call(O)}),X.on("disconnected",()=>{y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),X.on("reconnecting",()=>{y({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),X.on("message",J=>{var fe;const re={id:J.messageId||crypto.randomUUID(),role:"agent",content:J.content,timestamp:J.timestamp,sender:J.sender,raw:J};p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:re.id,tokensBeforeFlush:W.current,streamedFinalOnly:W.current===0}),W.current=0,y({type:"FLUSH_STREAMING",message:re}),(fe=A.current)==null||fe.call(A,re)}),X.on("streaming_token",J=>{W.current+=1,y({type:"APPEND_STREAMING_TOKEN",token:J.token})}),X.on("typing_started",()=>{y({type:"SET_AGENT_TYPING",isTyping:!0})}),X.on("typing_stopped",()=>{y({type:"SET_AGENT_TYPING",isTyping:!1})}),X.on("progress_indicator",J=>{y({type:"SET_PROGRESS_MESSAGE",message:J.message})}),X.on("routing_result",J=>{var re;if(y({type:"SET_ROUTING_RESULT",result:J}),!J.isSuccessful){const fe=`Routing failed: ${J.failureType||"unknown"}`;y({type:"SET_ERROR",error:fe}),(re=C.current)==null||re.call(C,fe)}}),X.on("participant_changed",J=>{if(J.participant.name==="Automated Process")return;const re={id:crypto.randomUUID(),role:"system",content:J.action==="add"?`${J.participant.name||"Agent"} joined the conversation`:`${J.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()};p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:J}),y({type:"ADD_MESSAGE",message:re})}),X.on("conversation_closed",()=>{const J={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};y({type:"ADD_MESSAGE",message:J}),y({type:"SET_CONVERSATION_ID",id:null}),x.clearPersistedConversation()}),X.on("error",J=>{var re;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:J}),J.code==="SESSION_EXPIRED"){H.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}),y({type:"SET_LOADING",isLoading:!1});return}y({type:"SET_ERROR",error:J.message}),J.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(re=C.current)==null||re.call(C,J.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),Ve(null,null,function*(){let J=x.getStoredConnectOptions(),re=!1;J||(J=yield x.getPeerConnectOptions(),re=!!J);try{yield X.connect(J!=null?J:void 0)}catch(ke){if(J)p==null||p.log("Continuation token failed, falling back to fresh connect"),re||x.clearPersistedConversation(),yield X.connect();else throw ke}yield x.persistContinuationToken(X);const fe=yield x.initializeConversation(X);y({type:"SET_CONVERSATION_ID",id:fe.conversationId}),fe.resumed&&fe.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:fe.restoredMessages})}).catch(J=>{var re;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:J.message}),(re=C.current)==null||re.call(C,J.message)}),()=>{X.disconnect(),X.off(),S.current=null}},[e,t,n,o]),ee.useEffect(()=>{const X=()=>{document.visibilityState==="visible"&&S.current&&!H.current&&S.current.reconnect()};return document.addEventListener("visibilitychange",X),()=>{document.removeEventListener("visibilitychange",X)}},[]);const F=ee.useCallback(X=>Ve(null,null,function*(){var J;const se=S.current;if(!(!se||R.current)){R.current=!0,H.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:lS,timestamp:new Date().toISOString()}}),x.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"});try{se.disconnect(),yield se.connect(),yield x.persistContinuationToken(se);const re=yield se.createConversation(r);y({type:"SET_CONVERSATION_ID",id:re}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),x.persistConversationId(re),X&&(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),yield se.sendMessage(X))}catch(re){const fe=re instanceof Error?re.message:String(re);y({type:"SET_ERROR",error:fe}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(J=C.current)==null||J.call(C,fe)}finally{R.current=!1}}}),[r,x]),K=ee.useRef(F);K.current=F;const ce=ee.useCallback(X=>{if(!X.trim())return;const se=S.current;if(!se)return;const J={id:crypto.randomUUID(),role:"user",content:X,timestamp:new Date().toISOString()};if(y({type:"ADD_MESSAGE",message:J}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),H.current){K.current(X);return}se.sendMessage(X).catch(re=>{var fe;if(cS(re)){K.current(X);return}y({type:"SET_ERROR",error:re.message}),(fe=C.current)==null||fe.call(C,re.message)})},[]),be=ee.useCallback(()=>{const X=S.current;X&&(H.current=!1,x.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),X.endConversation().then(()=>(X.disconnect(),X.connect())).then(()=>Ve(null,null,function*(){return yield x.persistContinuationToken(X),X.createConversation(r)})).then(se=>{y({type:"SET_CONVERSATION_ID",id:se}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),x.persistConversationId(se)}).catch(se=>{var J;y({type:"SET_ERROR",error:se.message}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(J=C.current)==null||J.call(C,se.message)}))},[r,x]),z=ee.useMemo(()=>({connectionStatus:T.connectionStatus,isConnected:T.connectionStatus==="connected"&&T.conversationId!==null,isAgentTyping:T.isAgentTyping,conversationId:T.conversationId,messages:T.messages,streamingBlocks:T.streamingBlocks,progressMessage:T.progressMessage,error:T.error,loading:T.loading,sessionExpired:T.sessionExpired,sendMessage:ce,resetConversation:be}),[T,ce,be]);return _.jsx(C0.Provider,{value:z,children:h})};function dS(){var e=ee.useRef(!0);return e.current?(e.current=!1,!0):e.current}function fS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function hS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Td=typeof window!="undefined",_u=function(e){ee.useEffect(e,[])},pS=function(e){var t=ee.useRef(e);t.current=e,_u(function(){return function(){return t.current()}})},mS=function(e){var t=ee.useRef(0),n=ee.useState(e),r=n[0],o=n[1],a=ee.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return pS(function(){cancelAnimationFrame(t.current)}),[r,a]},gS=function(e,t){return e===t};function ES(e,t){t===void 0&&(t=gS);var n=ee.useRef(),r=ee.useRef(e),o=dS();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var yS=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,c=mS({width:Td?window.innerWidth:r,height:Td?window.innerHeight:a}),d=c[0],h=c[1];return ee.useEffect(function(){if(Td){var p=function(){var g=window.innerWidth,T=window.innerHeight;h({width:g,height:T}),u&&u(g,T)};return fS(window,"resize",p),function(){hS(window,"resize",p)}}},[]),d};const xd="cimulate:ui-state-update",bS=e=>{window.addEventListener(xd,e)},TS=e=>{window.removeEventListener(xd,e)},xS=(e,t)=>{const n=new CustomEvent(xd,{detail:{property:e,value:t}});window.dispatchEvent(n)},I0=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);tt.entryTypeProxy.entryType=e},Ci=e=>{const t=tt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;tt.statusProxy.isOpen=n,n&&(tt.statusProxy.isMinimized=!1)},vu=e=>{const t=tt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;tt.statusProxy.isMinimized=n,n&&(tt.statusProxy.isOpen=!1)},wd=e=>{tt.modalProxy.isFullscreen=e},Su=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);tt.statusProxy.type=e,e==="dialog"||e==="chat"?tt.modeProxy.mode="embedded":tt.modeProxy.mode="standalone"},_d=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);tt.dialogProxy.position=e},wS=e=>{const t=tt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;tt.dialogProxy.isFullHeight=n};class _S{constructor(){Ze(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Ze(this,"connectedProxy");Ze(this,"modeProxy");Ze(this,"entryTypeProxy");Ze(this,"statusProxy");Ze(this,"dialogProxy");Ze(this,"modalProxy",{isFullscreen:!1});Ze(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ze(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return xS(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const tt=new _S,R0=ee.createContext({mode:tt.modeProxy.mode,entryType:tt.entryType,status:tt.statusProxy,dialogPosition:tt.dialogProxy.position,isDialogFullHeight:tt.dialogProxy.isFullHeight,dialogWidth:tt.dialogProxy.width,isModalFullscreen:tt.modalProxy.isFullscreen,previousComponentType:tt.statusProxy.type}),vS=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=ee.useState(e!=null?e:tt.entryTypeProxy.entryType),[u,c]=ee.useState(tt.modeProxy.mode),[d,h]=ee.useState({type:n||tt.statusProxy.type,isOpen:tt.statusProxy.isOpen,isMinimized:tt.statusProxy.isMinimized}),[p,g]=ee.useState(tt.dialogProxy.position),[T,y]=ee.useState(tt.dialogProxy.isFullHeight),[x,S]=ee.useState(tt.dialogProxy.width),[A,C]=ee.useState(tt.modalProxy.isFullscreen),O=ES(d.type);ee.useEffect(()=>{const H=W=>{const{property:F,value:K}=W.detail||{};if(!(!F||K===void 0)){if(F==="mode"){c(K);return}if(F==="entryType"){a(K);return}if(F==="isMinimized"){h(ce=>ae(B({},ce),{isMinimized:K}));return}if(F==="isOpen"){h(ce=>ae(B({},ce),{isOpen:K}));return}if(F==="type"){h(ce=>ae(B({},ce),{type:K}));return}if(F==="position"){g(K);return}if(F==="isFullHeight"){y(K);return}if(F==="width"){S(K);return}if(F==="isFullscreen"){C(K);return}}};return bS(H),()=>{TS(H)}},[]),_u(()=>{e&&I0(e)}),_u(()=>{const H=n||(t==null?void 0:t.type);H&&Su(H),t&&"isOpen"in t&&Ci(!!t.isOpen),t&&"isMinimized"in t&&vu(!!t.isMinimized)}),_u(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:H}=t.options;H&&_d(H),"dialogFullHeight"in t.options&&wS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&S(t.options.dialogWidth),"isModalFullscreen"in t.options&&wd(!!t.options.isModalFullscreen)});const R=ee.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:O||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:x,isModalFullscreen:A}),[u,o,d,O,p,T,x,A]);return _.jsx(R0.Provider,{value:R,children:r})},P0=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:o,headerText:a,headerConfig:u,theme:c,openLinksInNewTab:d,globalClassName:h,isDevelopment:p=!1,componentType:g,componentConfig:T,entryType:y,entryMessage:x,disclaimerText:S,disclaimerMarkdown:A,clientContext:C,searchPlaceholder:O,searchButtonLabel:R,searchConfig:H,resetConversationMessage:W,conversationHistory:F,messagingConfig:K,__features:ce,children:be})=>_.jsx(Vv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:o,headerText:a,headerConfig:u,entryMessage:x,theme:c,globalClassName:h,openLinksInNewTab:d,searchPlaceholder:O,searchButtonLabel:R,searchConfig:H,componentConfig:T,clientContext:C,disclaimerMarkdown:A,disclaimerText:S,resetConversationMessage:W,conversationHistory:F,isDevelopment:p,__features:ce,children:_.jsx(vS,{entryType:y,componentConfig:T,componentType:g,children:_.jsx(O0,{scrt2Url:(K==null?void 0:K.scrt2Url)||"",orgId:(K==null?void 0:K.orgId)||"",esDeveloperName:(K==null?void 0:K.esDeveloperName)||"",routingAttributes:(K==null?void 0:K.routingAttributes)||{},capabilitiesVersion:K==null?void 0:K.capabilitiesVersion,enableLogging:p,children:be})})}),ki=()=>{const e=ee.useContext(R0);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var vd={exports:{}},ln={},Sd={exports:{}},Ad={};var L0;function SS(){return L0||(L0=1,(function(e){function t(Q,oe){var v=Q.length;Q.push(oe);e:for(;0<v;){var P=v-1>>>1,Z=Q[P];if(0<o(Z,oe))Q[P]=oe,Q[v]=Z,v=P;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var oe=Q[0],v=Q.pop();if(v!==oe){Q[0]=v;e:for(var P=0,Z=Q.length,N=Z>>>1;P<N;){var xe=2*(P+1)-1,Re=Q[xe],Oe=xe+1,Be=Q[Oe];if(0>o(Re,v))Oe<Z&&0>o(Be,Re)?(Q[P]=Be,Q[Oe]=v,P=Oe):(Q[P]=Re,Q[xe]=v,P=xe);else if(Oe<Z&&0>o(Be,v))Q[P]=Be,Q[Oe]=v,P=Oe;else break e}}return oe}function o(Q,oe){var v=Q.sortIndex-oe.sortIndex;return v!==0?v:Q.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],h=[],p=1,g=null,T=3,y=!1,x=!1,S=!1,A=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(Q){for(var oe=n(h);oe!==null;){if(oe.callback===null)r(h);else if(oe.startTime<=Q)r(h),oe.sortIndex=oe.expirationTime,t(d,oe);else break;oe=n(h)}}function H(Q){if(S=!1,R(Q),!x)if(n(d)!==null)x=!0,ke(W);else{var oe=n(h);oe!==null&&he(H,oe.startTime-Q)}}function W(Q,oe){x=!1,S&&(S=!1,C(ce),ce=-1),y=!0;var v=T;try{for(R(oe),g=n(d);g!==null&&(!(g.expirationTime>oe)||Q&&!X());){var P=g.callback;if(typeof P=="function"){g.callback=null,T=g.priorityLevel;var Z=P(g.expirationTime<=oe);oe=e.unstable_now(),typeof Z=="function"?g.callback=Z:g===n(d)&&r(d),R(oe)}else r(d);g=n(d)}if(g!==null)var N=!0;else{var xe=n(h);xe!==null&&he(H,xe.startTime-oe),N=!1}return N}finally{g=null,T=v,y=!1}}var F=!1,K=null,ce=-1,be=5,z=-1;function X(){return!(e.unstable_now()-z<be)}function se(){if(K!==null){var Q=e.unstable_now();z=Q;var oe=!0;try{oe=K(!0,Q)}finally{oe?J():(F=!1,K=null)}}else F=!1}var J;if(typeof O=="function")J=function(){O(se)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,fe=re.port2;re.port1.onmessage=se,J=function(){fe.postMessage(null)}}else J=function(){A(se,0)};function ke(Q){K=Q,F||(F=!0,J())}function he(Q,oe){ce=A(function(){Q(e.unstable_now())},oe)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,ke(W))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):be=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Q){switch(T){case 1:case 2:case 3:var oe=3;break;default:oe=T}var v=T;T=oe;try{return Q()}finally{T=v}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,oe){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var v=T;T=Q;try{return oe()}finally{T=v}},e.unstable_scheduleCallback=function(Q,oe,v){var P=e.unstable_now();switch(typeof v=="object"&&v!==null?(v=v.delay,v=typeof v=="number"&&0<v?P+v:P):v=P,Q){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=v+Z,Q={id:p++,callback:oe,priorityLevel:Q,startTime:v,expirationTime:Z,sortIndex:-1},v>P?(Q.sortIndex=v,t(h,Q),n(d)===null&&Q===n(h)&&(S?(C(ce),ce=-1):S=!0,he(H,v-P))):(Q.sortIndex=Z,t(d,Q),x||y||(x=!0,ke(W))),Q},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(Q){var oe=T;return function(){var v=T;T=oe;try{return Q.apply(this,arguments)}finally{T=v}}}})(Ad)),Ad}var D0;function AS(){return D0||(D0=1,Sd.exports=SS()),Sd.exports}var M0;function CS(){if(M0)return ln;M0=1;var e=uo(),t=AS();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function T(i){return d.call(g,i)?!0:d.call(p,i)?!1:h.test(i)?g[i]=!0:(p[i]=!0,!1)}function y(i,s,l,f){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,s,l,f){if(s===null||typeof s=="undefined"||y(i,s,l,f))return!0;if(f)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function S(i,s,l,f,E,b,w){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=w}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];A[s]=new S(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new S(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function O(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(C,O);A[s]=new S(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(C,O);A[s]=new S(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(C,O);A[s]=new S(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function R(i,s,l,f){var E=A.hasOwnProperty(s)?A[s]:null;(E!==null?E.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(x(s,l,E,f)&&(l=null),f||E===null?T(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(s=E.attributeName,f=E.attributeNamespace,l===null?i.removeAttribute(s):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,f?i.setAttributeNS(f,s,l):i.setAttribute(s,l))))}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),F=Symbol.for("react.portal"),K=Symbol.for("react.fragment"),ce=Symbol.for("react.strict_mode"),be=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),X=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),fe=Symbol.for("react.memo"),ke=Symbol.for("react.lazy"),he=Symbol.for("react.offscreen"),Q=Symbol.iterator;function oe(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var v=Object.assign,P;function Z(i){if(P===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);P=s&&s[1]||""}return`
17
+ `+P+i}var N=!1;function xe(i,s){if(!i||N)return"";N=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(te){var f=te}Reflect.construct(i,[],s)}else{try{s.call()}catch(te){f=te}i.call(s.prototype)}else{try{throw Error()}catch(te){f=te}i()}}catch(te){if(te&&f&&typeof te.stack=="string"){for(var E=te.stack.split(`
18
18
  `),b=f.stack.split(`
19
- `),w=g.length-1,L=b.length-1;1<=w&&0<=L&&g[w]!==b[L];)L--;for(;1<=w&&0<=L;w--,L--)if(g[w]!==b[L]){if(w!==1||L!==1)do if(w--,L--,0>L||g[w]!==b[L]){var U=`
20
- `+g[w].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=w&&0<=L);break}}}finally{N=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?X(i):""}function Re(i){switch(i.tag){case 5:return X(i.type);case 16:return X("Lazy");case 13:return X("Suspense");case 19:return X("SuspenseList");case 0:case 2:case 15:return i=xe(i.type,!1),i;case 11:return i=xe(i.type.render,!1),i;case 1:return i=xe(i.type,!0),i;default:return""}}function Oe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case K:return"Fragment";case M:return"Portal";case be:return"Profiler";case ce:return"StrictMode";case te:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ee:return(i.displayName||"Context")+".Consumer";case z:return(i._context.displayName||"Context")+".Provider";case se:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case fe:return s=i.displayName||null,s!==null?s:Oe(i.type)||"Memo";case ke:s=i._payload,i=i._init;try{return Oe(i(s))}catch(l){}}return null}function Be(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Oe(s);case 8:return s===ce?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function _e(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function $e(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ot(i){var s=$e(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),f=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var g=l.get,b=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(w){f=""+w,b.call(this,w)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return f},setValue:function(w){f=""+w},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function pn(i){i._valueTracker||(i._valueTracker=ot(i))}function Yi(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),f="";return i&&(f=$e(i)?i.checked?"true":"false":i.value),i=f,i!==l?(s.setValue(i),!0):!1}function Zr(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function Xn(i,s){var l=s.checked;return _({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Ea(i,s){var l=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;l=_e(s.value!=null?s.value:l),i._wrapperState={initialChecked:f,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function ya(i,s){s=s.checked,s!=null&&R(i,"checked",s,!1)}function Wo(i,s){ya(i,s);var l=_e(s.value),f=s.type;if(l!=null)f==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Go(i,s.type,l):s.hasOwnProperty("defaultValue")&&Go(i,s.type,_e(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Cl(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function Go(i,s,l){(s!=="number"||Zr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var ei=Array.isArray;function ti(i,s,l,f){if(i=i.options,s){s={};for(var g=0;g<l.length;g++)s["$"+l[g]]=!0;for(l=0;l<i.length;l++)g=s.hasOwnProperty("$"+i[l].value),i[l].selected!==g&&(i[l].selected=g),g&&f&&(i[l].defaultSelected=!0)}else{for(l=""+_e(l),s=null,g=0;g<i.length;g++){if(i[g].value===l){i[g].selected=!0,f&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function ba(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return _({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function kl(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(ei(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:_e(l)}}function Nl(i,s){var l=_e(s.value),f=_e(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),f!=null&&(i.defaultValue=""+f)}function Ol(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ie(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Te(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?ie(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ue,Ye=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,f,g){MSApp.execUnsafeLocalFunction(function(){return i(s,l,f,g)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Ue=Ue||document.createElement("div"),Ue.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ue.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Xe(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var jt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pr=["Webkit","ms","Moz","O"];Object.keys(jt).forEach(function(i){Pr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),jt[s]=jt[i]})});function Mn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||jt.hasOwnProperty(i)&&jt[i]?(""+s).trim():s+"px"}function ni(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var f=l.indexOf("--")===0,g=Mn(l,s[l],f);l==="float"&&(l="cssFloat"),f?i.setProperty(l,g):i[l]=g}}var Wi=_({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $t(i,s){if(s){if(Wi[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function br(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Sn=null;function Dh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Mh=null,Ko=null,Qo=null;function pT(i){if(i=za(i)){if(typeof Mh!="function")throw Error(n(280));var s=i.stateNode;s&&(s=Zl(s),Mh(i.stateNode,i.type,s))}}function mT(i){Ko?Qo?Qo.push(i):Qo=[i]:Ko=i}function gT(){if(Ko){var i=Ko,s=Qo;if(Qo=Ko=null,pT(i),s)for(i=0;i<s.length;i++)pT(s[i])}}function ET(i,s){return i(s)}function yT(){}var Fh=!1;function bT(i,s,l){if(Fh)return i(s,l);Fh=!0;try{return ET(i,s,l)}finally{Fh=!1,(Ko!==null||Qo!==null)&&(yT(),gT())}}function Ta(i,s){var l=i.stateNode;if(l===null)return null;var f=Zl(l);if(f===null)return null;l=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var Bh=!1;if(c)try{var xa={};Object.defineProperty(xa,"passive",{get:function(){Bh=!0}}),window.addEventListener("test",xa,xa),window.removeEventListener("test",xa,xa)}catch(i){Bh=!1}function $8(i,s,l,f,g,b,w,L,U){var Z=Array.prototype.slice.call(arguments,3);try{s.apply(l,Z)}catch(de){this.onError(de)}}var wa=!1,Il=null,Rl=!1,Uh=null,V8={onError:function(i){wa=!0,Il=i}};function q8(i,s,l,f,g,b,w,L,U){wa=!1,Il=null,$8.apply(V8,arguments)}function Y8(i,s,l,f,g,b,w,L,U){if(q8.apply(this,arguments),wa){if(wa){var Z=Il;wa=!1,Il=null}else throw Error(n(198));Rl||(Rl=!0,Uh=Z)}}function Gi(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function TT(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function xT(i){if(Gi(i)!==i)throw Error(n(188))}function W8(i){var s=i.alternate;if(!s){if(s=Gi(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,f=s;;){var g=l.return;if(g===null)break;var b=g.alternate;if(b===null){if(f=g.return,f!==null){l=f;continue}break}if(g.child===b.child){for(b=g.child;b;){if(b===l)return xT(g),i;if(b===f)return xT(g),s;b=b.sibling}throw Error(n(188))}if(l.return!==f.return)l=g,f=b;else{for(var w=!1,L=g.child;L;){if(L===l){w=!0,l=g,f=b;break}if(L===f){w=!0,f=g,l=b;break}L=L.sibling}if(!w){for(L=b.child;L;){if(L===l){w=!0,l=b,f=g;break}if(L===f){w=!0,f=b,l=g;break}L=L.sibling}if(!w)throw Error(n(189))}}if(l.alternate!==f)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function wT(i){return i=W8(i),i!==null?_T(i):null}function _T(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=_T(i);if(s!==null)return s;i=i.sibling}return null}var vT=t.unstable_scheduleCallback,ST=t.unstable_cancelCallback,G8=t.unstable_shouldYield,K8=t.unstable_requestPaint,_t=t.unstable_now,Q8=t.unstable_getCurrentPriorityLevel,Hh=t.unstable_ImmediatePriority,AT=t.unstable_UserBlockingPriority,Pl=t.unstable_NormalPriority,X8=t.unstable_LowPriority,CT=t.unstable_IdlePriority,Ll=null,Tr=null;function J8(i){if(Tr&&typeof Tr.onCommitFiberRoot=="function")try{Tr.onCommitFiberRoot(Ll,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Jn=Math.clz32?Math.clz32:tM,Z8=Math.log,eM=Math.LN2;function tM(i){return i>>>=0,i===0?32:31-(Z8(i)/eM|0)|0}var Dl=64,Ml=4194304;function _a(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Fl(i,s){var l=i.pendingLanes;if(l===0)return 0;var f=0,g=i.suspendedLanes,b=i.pingedLanes,w=l&268435455;if(w!==0){var L=w&~g;L!==0?f=_a(L):(b&=w,b!==0&&(f=_a(b)))}else w=l&~g,w!==0?f=_a(w):b!==0&&(f=_a(b));if(f===0)return 0;if(s!==0&&s!==f&&(s&g)===0&&(g=f&-f,b=s&-s,g>=b||g===16&&(b&4194240)!==0))return s;if((f&4)!==0&&(f|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=f;0<s;)l=31-Jn(s),g=1<<l,f|=i[l],s&=~g;return f}function nM(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rM(i,s){for(var l=i.suspendedLanes,f=i.pingedLanes,g=i.expirationTimes,b=i.pendingLanes;0<b;){var w=31-Jn(b),L=1<<w,U=g[w];U===-1?((L&l)===0||(L&f)!==0)&&(g[w]=nM(L,s)):U<=s&&(i.expiredLanes|=L),b&=~L}}function zh(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function kT(){var i=Dl;return Dl<<=1,(Dl&4194240)===0&&(Dl=64),i}function jh(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function va(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Jn(s),i[s]=l}function iM(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0<l;){var g=31-Jn(l),b=1<<g;s[g]=0,f[g]=-1,i[g]=-1,l&=~b}}function $h(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var f=31-Jn(l),g=1<<f;g&s|i[f]&s&&(i[f]|=s),l&=~g}}var nt=0;function NT(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var OT,Vh,IT,RT,PT,qh=!1,Bl=[],ri=null,ii=null,oi=null,Sa=new Map,Aa=new Map,si=[],oM="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function LT(i,s){switch(i){case"focusin":case"focusout":ri=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":oi=null;break;case"pointerover":case"pointerout":Sa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Aa.delete(s.pointerId)}}function Ca(i,s,l,f,g,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:l,eventSystemFlags:f,nativeEvent:b,targetContainers:[g]},s!==null&&(s=za(s),s!==null&&Vh(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function sM(i,s,l,f,g){switch(s){case"focusin":return ri=Ca(ri,i,s,l,f,g),!0;case"dragenter":return ii=Ca(ii,i,s,l,f,g),!0;case"mouseover":return oi=Ca(oi,i,s,l,f,g),!0;case"pointerover":var b=g.pointerId;return Sa.set(b,Ca(Sa.get(b)||null,i,s,l,f,g)),!0;case"gotpointercapture":return b=g.pointerId,Aa.set(b,Ca(Aa.get(b)||null,i,s,l,f,g)),!0}return!1}function DT(i){var s=Ki(i.target);if(s!==null){var l=Gi(s);if(l!==null){if(s=l.tag,s===13){if(s=TT(l),s!==null){i.blockedOn=s,PT(i.priority,function(){IT(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Ul(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=Wh(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var f=new l.constructor(l.type,l);Sn=f,l.target.dispatchEvent(f),Sn=null}else return s=za(l),s!==null&&Vh(s),i.blockedOn=l,!1;s.shift()}return!0}function MT(i,s,l){Ul(i)&&l.delete(s)}function aM(){qh=!1,ri!==null&&Ul(ri)&&(ri=null),ii!==null&&Ul(ii)&&(ii=null),oi!==null&&Ul(oi)&&(oi=null),Sa.forEach(MT),Aa.forEach(MT)}function ka(i,s){i.blockedOn===s&&(i.blockedOn=null,qh||(qh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,aM)))}function Na(i){function s(g){return ka(g,i)}if(0<Bl.length){ka(Bl[0],i);for(var l=1;l<Bl.length;l++){var f=Bl[l];f.blockedOn===i&&(f.blockedOn=null)}}for(ri!==null&&ka(ri,i),ii!==null&&ka(ii,i),oi!==null&&ka(oi,i),Sa.forEach(s),Aa.forEach(s),l=0;l<si.length;l++)f=si[l],f.blockedOn===i&&(f.blockedOn=null);for(;0<si.length&&(l=si[0],l.blockedOn===null);)DT(l),l.blockedOn===null&&si.shift()}var Xo=H.ReactCurrentBatchConfig,Hl=!0;function uM(i,s,l,f){var g=nt,b=Xo.transition;Xo.transition=null;try{nt=1,Yh(i,s,l,f)}finally{nt=g,Xo.transition=b}}function lM(i,s,l,f){var g=nt,b=Xo.transition;Xo.transition=null;try{nt=4,Yh(i,s,l,f)}finally{nt=g,Xo.transition=b}}function Yh(i,s,l,f){if(Hl){var g=Wh(i,s,l,f);if(g===null)cp(i,s,f,zl,l),LT(i,f);else if(sM(g,i,s,l,f))f.stopPropagation();else if(LT(i,f),s&4&&-1<oM.indexOf(i)){for(;g!==null;){var b=za(g);if(b!==null&&OT(b),b=Wh(i,s,l,f),b===null&&cp(i,s,f,zl,l),b===g)break;g=b}g!==null&&f.stopPropagation()}else cp(i,s,f,null,l)}}var zl=null;function Wh(i,s,l,f){if(zl=null,i=Dh(f),i=Ki(i),i!==null)if(s=Gi(i),s===null)i=null;else if(l=s.tag,l===13){if(i=TT(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return zl=i,null}function FT(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Q8()){case Hh:return 1;case AT:return 4;case Pl:case X8:return 16;case CT:return 536870912;default:return 16}default:return 16}}var ai=null,Gh=null,jl=null;function BT(){if(jl)return jl;var i,s=Gh,l=s.length,f,g="value"in ai?ai.value:ai.textContent,b=g.length;for(i=0;i<l&&s[i]===g[i];i++);var w=l-i;for(f=1;f<=w&&s[l-f]===g[b-f];f++);return jl=g.slice(i,1<f?1-f:void 0)}function $l(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Vl(){return!0}function UT(){return!1}function An(i){function s(l,f,g,b,w){this._reactName=l,this._targetInst=g,this.type=f,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(l=i[L],this[L]=l?l(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Vl:UT,this.isPropagationStopped=UT,this}return _(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Vl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Vl)},persist:function(){},isPersistent:Vl}),s}var Jo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kh=An(Jo),Oa=_({},Jo,{view:0,detail:0}),cM=An(Oa),Qh,Xh,Ia,ql=_({},Oa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zh,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Ia&&(Ia&&i.type==="mousemove"?(Qh=i.screenX-Ia.screenX,Xh=i.screenY-Ia.screenY):Xh=Qh=0,Ia=i),Qh)},movementY:function(i){return"movementY"in i?i.movementY:Xh}}),HT=An(ql),dM=_({},ql,{dataTransfer:0}),fM=An(dM),hM=_({},Oa,{relatedTarget:0}),Jh=An(hM),pM=_({},Jo,{animationName:0,elapsedTime:0,pseudoElement:0}),mM=An(pM),gM=_({},Jo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),EM=An(gM),yM=_({},Jo,{data:0}),zT=An(yM),bM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=xM[i])?!!s[i]:!1}function Zh(){return wM}var _M=_({},Oa,{key:function(i){if(i.key){var s=bM[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=$l(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?TM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zh,charCode:function(i){return i.type==="keypress"?$l(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?$l(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),vM=An(_M),SM=_({},ql,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jT=An(SM),AM=_({},Oa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zh}),CM=An(AM),kM=_({},Jo,{propertyName:0,elapsedTime:0,pseudoElement:0}),NM=An(kM),OM=_({},ql,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),IM=An(OM),RM=[9,13,27,32],ep=c&&"CompositionEvent"in window,Ra=null;c&&"documentMode"in document&&(Ra=document.documentMode);var PM=c&&"TextEvent"in window&&!Ra,$T=c&&(!ep||Ra&&8<Ra&&11>=Ra),VT=" ",qT=!1;function YT(i,s){switch(i){case"keyup":return RM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WT(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Zo=!1;function LM(i,s){switch(i){case"compositionend":return WT(s);case"keypress":return s.which!==32?null:(qT=!0,VT);case"textInput":return i=s.data,i===VT&&qT?null:i;default:return null}}function DM(i,s){if(Zo)return i==="compositionend"||!ep&&YT(i,s)?(i=BT(),jl=Gh=ai=null,Zo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return $T&&s.locale!=="ko"?null:s.data;default:return null}}var MM={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function GT(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!MM[i.type]:s==="textarea"}function KT(i,s,l,f){mT(f),s=Ql(s,"onChange"),0<s.length&&(l=new Kh("onChange","change",null,l,f),i.push({event:l,listeners:s}))}var Pa=null,La=null;function FM(i){hx(i,0)}function Yl(i){var s=is(i);if(Yi(s))return i}function BM(i,s){if(i==="change")return s}var QT=!1;if(c){var tp;if(c){var np="oninput"in document;if(!np){var XT=document.createElement("div");XT.setAttribute("oninput","return;"),np=typeof XT.oninput=="function"}tp=np}else tp=!1;QT=tp&&(!document.documentMode||9<document.documentMode)}function JT(){Pa&&(Pa.detachEvent("onpropertychange",ZT),La=Pa=null)}function ZT(i){if(i.propertyName==="value"&&Yl(La)){var s=[];KT(s,La,i,Dh(i)),bT(FM,s)}}function UM(i,s,l){i==="focusin"?(JT(),Pa=s,La=l,Pa.attachEvent("onpropertychange",ZT)):i==="focusout"&&JT()}function HM(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Yl(La)}function zM(i,s){if(i==="click")return Yl(s)}function jM(i,s){if(i==="input"||i==="change")return Yl(s)}function $M(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Zn=typeof Object.is=="function"?Object.is:$M;function Da(i,s){if(Zn(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),f=Object.keys(s);if(l.length!==f.length)return!1;for(f=0;f<l.length;f++){var g=l[f];if(!d.call(s,g)||!Zn(i[g],s[g]))return!1}return!0}function ex(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function tx(i,s){var l=ex(i);i=0;for(var f;l;){if(l.nodeType===3){if(f=i+l.textContent.length,i<=s&&f>=s)return{node:l,offset:s-i};i=f}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=ex(l)}}function nx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?nx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function rx(){for(var i=window,s=Zr();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(f){l=!1}if(l)i=s.contentWindow;else break;s=Zr(i.document)}return s}function rp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function VM(i){var s=rx(),l=i.focusedElem,f=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&nx(l.ownerDocument.documentElement,l)){if(f!==null&&rp(l)){if(s=f.start,i=f.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=l.textContent.length,b=Math.min(f.start,g);f=f.end===void 0?b:Math.min(f.end,g),!i.extend&&b>f&&(g=f,f=b,b=g),g=tx(l,b);var w=tx(l,f);g&&w&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==w.node||i.focusOffset!==w.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),b>f?(i.addRange(s),i.extend(w.node,w.offset)):(s.setEnd(w.node,w.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var qM=c&&"documentMode"in document&&11>=document.documentMode,es=null,ip=null,Ma=null,op=!1;function ix(i,s,l){var f=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;op||es==null||es!==Zr(f)||(f=es,"selectionStart"in f&&rp(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Ma&&Da(Ma,f)||(Ma=f,f=Ql(ip,"onSelect"),0<f.length&&(s=new Kh("onSelect","select",null,s,l),i.push({event:s,listeners:f}),s.target=es)))}function Wl(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var ts={animationend:Wl("Animation","AnimationEnd"),animationiteration:Wl("Animation","AnimationIteration"),animationstart:Wl("Animation","AnimationStart"),transitionend:Wl("Transition","TransitionEnd")},sp={},ox={};c&&(ox=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function Gl(i){if(sp[i])return sp[i];if(!ts[i])return i;var s=ts[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in ox)return sp[i]=s[l];return i}var sx=Gl("animationend"),ax=Gl("animationiteration"),ux=Gl("animationstart"),lx=Gl("transitionend"),cx=new Map,dx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ui(i,s){cx.set(i,s),a(s,[i])}for(var ap=0;ap<dx.length;ap++){var up=dx[ap],YM=up.toLowerCase(),WM=up[0].toUpperCase()+up.slice(1);ui(YM,"on"+WM)}ui(sx,"onAnimationEnd"),ui(ax,"onAnimationIteration"),ui(ux,"onAnimationStart"),ui("dblclick","onDoubleClick"),ui("focusin","onFocus"),ui("focusout","onBlur"),ui(lx,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fa="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),GM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fa));function fx(i,s,l){var f=i.type||"unknown-event";i.currentTarget=l,Y8(f,s,void 0,i),i.currentTarget=null}function hx(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var f=i[l],g=f.event;f=f.listeners;e:{var b=void 0;if(s)for(var w=f.length-1;0<=w;w--){var L=f[w],U=L.instance,Z=L.currentTarget;if(L=L.listener,U!==b&&g.isPropagationStopped())break e;fx(g,L,Z),b=U}else for(w=0;w<f.length;w++){if(L=f[w],U=L.instance,Z=L.currentTarget,L=L.listener,U!==b&&g.isPropagationStopped())break e;fx(g,L,Z),b=U}}}if(Rl)throw i=Uh,Rl=!1,Uh=null,i}function lt(i,s){var l=s[gp];l===void 0&&(l=s[gp]=new Set);var f=i+"__bubble";l.has(f)||(px(s,i,2,!1),l.add(f))}function lp(i,s,l){var f=0;s&&(f|=4),px(l,i,f,s)}var Kl="_reactListening"+Math.random().toString(36).slice(2);function Ba(i){if(!i[Kl]){i[Kl]=!0,r.forEach(function(l){l!=="selectionchange"&&(GM.has(l)||lp(l,!1,i),lp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Kl]||(s[Kl]=!0,lp("selectionchange",!1,s))}}function px(i,s,l,f){switch(FT(s)){case 1:var g=uM;break;case 4:g=lM;break;default:g=Yh}l=g.bind(null,s,l,i),g=void 0,!Bh||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),f?g!==void 0?i.addEventListener(s,l,{capture:!0,passive:g}):i.addEventListener(s,l,!0):g!==void 0?i.addEventListener(s,l,{passive:g}):i.addEventListener(s,l,!1)}function cp(i,s,l,f,g){var b=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var w=f.tag;if(w===3||w===4){var L=f.stateNode.containerInfo;if(L===g||L.nodeType===8&&L.parentNode===g)break;if(w===4)for(w=f.return;w!==null;){var U=w.tag;if((U===3||U===4)&&(U=w.stateNode.containerInfo,U===g||U.nodeType===8&&U.parentNode===g))return;w=w.return}for(;L!==null;){if(w=Ki(L),w===null)return;if(U=w.tag,U===5||U===6){f=b=w;continue e}L=L.parentNode}}f=f.return}bT(function(){var Z=b,de=Dh(l),me=[];e:{var ue=cx.get(i);if(ue!==void 0){var we=Kh,Se=i;switch(i){case"keypress":if($l(l)===0)break e;case"keydown":case"keyup":we=vM;break;case"focusin":Se="focus",we=Jh;break;case"focusout":Se="blur",we=Jh;break;case"beforeblur":case"afterblur":we=Jh;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=HT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=fM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=CM;break;case sx:case ax:case ux:we=mM;break;case lx:we=NM;break;case"scroll":we=cM;break;case"wheel":we=IM;break;case"copy":case"cut":case"paste":we=EM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=jT}var Ce=(s&4)!==0,vt=!Ce&&i==="scroll",q=Ce?ue!==null?ue+"Capture":null:ue;Ce=[];for(var j=Z,G;j!==null;){G=j;var ye=G.stateNode;if(G.tag===5&&ye!==null&&(G=ye,q!==null&&(ye=Ta(j,q),ye!=null&&Ce.push(Ua(j,ye,G)))),vt)break;j=j.return}0<Ce.length&&(ue=new we(ue,Se,null,l,de),me.push({event:ue,listeners:Ce}))}}if((s&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",we=i==="mouseout"||i==="pointerout",ue&&l!==Sn&&(Se=l.relatedTarget||l.fromElement)&&(Ki(Se)||Se[Lr]))break e;if((we||ue)&&(ue=de.window===de?de:(ue=de.ownerDocument)?ue.defaultView||ue.parentWindow:window,we?(Se=l.relatedTarget||l.toElement,we=Z,Se=Se?Ki(Se):null,Se!==null&&(vt=Gi(Se),Se!==vt||Se.tag!==5&&Se.tag!==6)&&(Se=null)):(we=null,Se=Z),we!==Se)){if(Ce=HT,ye="onMouseLeave",q="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(Ce=jT,ye="onPointerLeave",q="onPointerEnter",j="pointer"),vt=we==null?ue:is(we),G=Se==null?ue:is(Se),ue=new Ce(ye,j+"leave",we,l,de),ue.target=vt,ue.relatedTarget=G,ye=null,Ki(de)===Z&&(Ce=new Ce(q,j+"enter",Se,l,de),Ce.target=G,Ce.relatedTarget=vt,ye=Ce),vt=ye,we&&Se)t:{for(Ce=we,q=Se,j=0,G=Ce;G;G=ns(G))j++;for(G=0,ye=q;ye;ye=ns(ye))G++;for(;0<j-G;)Ce=ns(Ce),j--;for(;0<G-j;)q=ns(q),G--;for(;j--;){if(Ce===q||q!==null&&Ce===q.alternate)break t;Ce=ns(Ce),q=ns(q)}Ce=null}else Ce=null;we!==null&&mx(me,ue,we,Ce,!1),Se!==null&&vt!==null&&mx(me,vt,Se,Ce,!0)}}e:{if(ue=Z?is(Z):window,we=ue.nodeName&&ue.nodeName.toLowerCase(),we==="select"||we==="input"&&ue.type==="file")var Ne=BM;else if(GT(ue))if(QT)Ne=jM;else{Ne=HM;var De=UM}else(we=ue.nodeName)&&we.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Ne=zM);if(Ne&&(Ne=Ne(i,Z))){KT(me,Ne,l,de);break e}De&&De(i,ue,Z),i==="focusout"&&(De=ue._wrapperState)&&De.controlled&&ue.type==="number"&&Go(ue,"number",ue.value)}switch(De=Z?is(Z):window,i){case"focusin":(GT(De)||De.contentEditable==="true")&&(es=De,ip=Z,Ma=null);break;case"focusout":Ma=ip=es=null;break;case"mousedown":op=!0;break;case"contextmenu":case"mouseup":case"dragend":op=!1,ix(me,l,de);break;case"selectionchange":if(qM)break;case"keydown":case"keyup":ix(me,l,de)}var Me;if(ep)e:{switch(i){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Zo?YT(i,l)&&(He="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(He="onCompositionStart");He&&($T&&l.locale!=="ko"&&(Zo||He!=="onCompositionStart"?He==="onCompositionEnd"&&Zo&&(Me=BT()):(ai=de,Gh="value"in ai?ai.value:ai.textContent,Zo=!0)),De=Ql(Z,He),0<De.length&&(He=new zT(He,i,null,l,de),me.push({event:He,listeners:De}),Me?He.data=Me:(Me=WT(l),Me!==null&&(He.data=Me)))),(Me=PM?LM(i,l):DM(i,l))&&(Z=Ql(Z,"onBeforeInput"),0<Z.length&&(de=new zT("onBeforeInput","beforeinput",null,l,de),me.push({event:de,listeners:Z}),de.data=Me))}hx(me,s)})}function Ua(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Ql(i,s){for(var l=s+"Capture",f=[];i!==null;){var g=i,b=g.stateNode;g.tag===5&&b!==null&&(g=b,b=Ta(i,l),b!=null&&f.unshift(Ua(i,b,g)),b=Ta(i,s),b!=null&&f.push(Ua(i,b,g))),i=i.return}return f}function ns(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function mx(i,s,l,f,g){for(var b=s._reactName,w=[];l!==null&&l!==f;){var L=l,U=L.alternate,Z=L.stateNode;if(U!==null&&U===f)break;L.tag===5&&Z!==null&&(L=Z,g?(U=Ta(l,b),U!=null&&w.unshift(Ua(l,U,L))):g||(U=Ta(l,b),U!=null&&w.push(Ua(l,U,L)))),l=l.return}w.length!==0&&i.push({event:s,listeners:w})}var KM=/\r\n?/g,QM=/\u0000|\uFFFD/g;function gx(i){return(typeof i=="string"?i:""+i).replace(KM,`
21
- `).replace(QM,"")}function Xl(i,s,l){if(s=gx(s),gx(i)!==s&&l)throw Error(n(425))}function Jl(){}var dp=null,fp=null;function hp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var pp=typeof setTimeout=="function"?setTimeout:void 0,XM=typeof clearTimeout=="function"?clearTimeout:void 0,Ex=typeof Promise=="function"?Promise:void 0,JM=typeof queueMicrotask=="function"?queueMicrotask:typeof Ex!="undefined"?function(i){return Ex.resolve(null).then(i).catch(ZM)}:pp;function ZM(i){setTimeout(function(){throw i})}function mp(i,s){var l=s,f=0;do{var g=l.nextSibling;if(i.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(f===0){i.removeChild(g),Na(s);return}f--}else l!=="$"&&l!=="$?"&&l!=="$!"||f++;l=g}while(l);Na(s)}function li(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function yx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var rs=Math.random().toString(36).slice(2),xr="__reactFiber$"+rs,Ha="__reactProps$"+rs,Lr="__reactContainer$"+rs,gp="__reactEvents$"+rs,e9="__reactListeners$"+rs,t9="__reactHandles$"+rs;function Ki(i){var s=i[xr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[Lr]||l[xr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=yx(i);i!==null;){if(l=i[xr])return l;i=yx(i)}return s}i=l,l=i.parentNode}return null}function za(i){return i=i[xr]||i[Lr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function is(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Zl(i){return i[Ha]||null}var Ep=[],os=-1;function ci(i){return{current:i}}function ct(i){0>os||(i.current=Ep[os],Ep[os]=null,os--)}function ut(i,s){os++,Ep[os]=i.current,i.current=s}var di={},Xt=ci(di),mn=ci(!1),Qi=di;function ss(i,s){var l=i.type.contextTypes;if(!l)return di;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var g={},b;for(b in l)g[b]=s[b];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function gn(i){return i=i.childContextTypes,i!=null}function ec(){ct(mn),ct(Xt)}function bx(i,s,l){if(Xt.current!==di)throw Error(n(168));ut(Xt,s),ut(mn,l)}function Tx(i,s,l){var f=i.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return l;f=f.getChildContext();for(var g in f)if(!(g in s))throw Error(n(108,Be(i)||"Unknown",g));return _({},l,f)}function tc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||di,Qi=Xt.current,ut(Xt,i),ut(mn,mn.current),!0}function xx(i,s,l){var f=i.stateNode;if(!f)throw Error(n(169));l?(i=Tx(i,s,Qi),f.__reactInternalMemoizedMergedChildContext=i,ct(mn),ct(Xt),ut(Xt,i)):ct(mn),ut(mn,l)}var Dr=null,nc=!1,yp=!1;function wx(i){Dr===null?Dr=[i]:Dr.push(i)}function n9(i){nc=!0,wx(i)}function fi(){if(!yp&&Dr!==null){yp=!0;var i=0,s=nt;try{var l=Dr;for(nt=1;i<l.length;i++){var f=l[i];do f=f(!0);while(f!==null)}Dr=null,nc=!1}catch(g){throw Dr!==null&&(Dr=Dr.slice(i+1)),vT(Hh,fi),g}finally{nt=s,yp=!1}}return null}var as=[],us=0,rc=null,ic=0,Fn=[],Bn=0,Xi=null,Mr=1,Fr="";function Ji(i,s){as[us++]=ic,as[us++]=rc,rc=i,ic=s}function _x(i,s,l){Fn[Bn++]=Mr,Fn[Bn++]=Fr,Fn[Bn++]=Xi,Xi=i;var f=Mr;i=Fr;var g=32-Jn(f)-1;f&=~(1<<g),l+=1;var b=32-Jn(s)+g;if(30<b){var w=g-g%5;b=(f&(1<<w)-1).toString(32),f>>=w,g-=w,Mr=1<<32-Jn(s)+g|l<<g|f,Fr=b+i}else Mr=1<<b|l<<g|f,Fr=i}function bp(i){i.return!==null&&(Ji(i,1),_x(i,1,0))}function Tp(i){for(;i===rc;)rc=as[--us],as[us]=null,ic=as[--us],as[us]=null;for(;i===Xi;)Xi=Fn[--Bn],Fn[Bn]=null,Fr=Fn[--Bn],Fn[Bn]=null,Mr=Fn[--Bn],Fn[Bn]=null}var Cn=null,kn=null,pt=!1,er=null;function vx(i,s){var l=jn(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function Sx(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Cn=i,kn=li(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Cn=i,kn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=Xi!==null?{id:Mr,overflow:Fr}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=jn(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Cn=i,kn=null,!0):!1;default:return!1}}function xp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function wp(i){if(pt){var s=kn;if(s){var l=s;if(!Sx(i,s)){if(xp(i))throw Error(n(418));s=li(l.nextSibling);var f=Cn;s&&Sx(i,s)?vx(f,l):(i.flags=i.flags&-4097|2,pt=!1,Cn=i)}}else{if(xp(i))throw Error(n(418));i.flags=i.flags&-4097|2,pt=!1,Cn=i}}}function Ax(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Cn=i}function oc(i){if(i!==Cn)return!1;if(!pt)return Ax(i),pt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!hp(i.type,i.memoizedProps)),s&&(s=kn)){if(xp(i))throw Cx(),Error(n(418));for(;s;)vx(i,s),s=li(s.nextSibling)}if(Ax(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){kn=li(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}kn=null}}else kn=Cn?li(i.stateNode.nextSibling):null;return!0}function Cx(){for(var i=kn;i;)i=li(i.nextSibling)}function ls(){kn=Cn=null,pt=!1}function _p(i){er===null?er=[i]:er.push(i)}var r9=H.ReactCurrentBatchConfig;function ja(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var f=l.stateNode}if(!f)throw Error(n(147,i));var g=f,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(w){var L=g.refs;w===null?delete L[b]:L[b]=w},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function sc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function kx(i){var s=i._init;return s(i._payload)}function Nx(i){function s(q,j){if(i){var G=q.deletions;G===null?(q.deletions=[j],q.flags|=16):G.push(j)}}function l(q,j){if(!i)return null;for(;j!==null;)s(q,j),j=j.sibling;return null}function f(q,j){for(q=new Map;j!==null;)j.key!==null?q.set(j.key,j):q.set(j.index,j),j=j.sibling;return q}function g(q,j){return q=Ti(q,j),q.index=0,q.sibling=null,q}function b(q,j,G){return q.index=G,i?(G=q.alternate,G!==null?(G=G.index,G<j?(q.flags|=2,j):G):(q.flags|=2,j)):(q.flags|=1048576,j)}function w(q){return i&&q.alternate===null&&(q.flags|=2),q}function L(q,j,G,ye){return j===null||j.tag!==6?(j=pm(G,q.mode,ye),j.return=q,j):(j=g(j,G),j.return=q,j)}function U(q,j,G,ye){var Ne=G.type;return Ne===K?de(q,j,G.props.children,ye,G.key):j!==null&&(j.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===ke&&kx(Ne)===j.type)?(ye=g(j,G.props),ye.ref=ja(q,j,G),ye.return=q,ye):(ye=Oc(G.type,G.key,G.props,null,q.mode,ye),ye.ref=ja(q,j,G),ye.return=q,ye)}function Z(q,j,G,ye){return j===null||j.tag!==4||j.stateNode.containerInfo!==G.containerInfo||j.stateNode.implementation!==G.implementation?(j=mm(G,q.mode,ye),j.return=q,j):(j=g(j,G.children||[]),j.return=q,j)}function de(q,j,G,ye,Ne){return j===null||j.tag!==7?(j=so(G,q.mode,ye,Ne),j.return=q,j):(j=g(j,G),j.return=q,j)}function me(q,j,G){if(typeof j=="string"&&j!==""||typeof j=="number")return j=pm(""+j,q.mode,G),j.return=q,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case W:return G=Oc(j.type,j.key,j.props,null,q.mode,G),G.ref=ja(q,null,j),G.return=q,G;case M:return j=mm(j,q.mode,G),j.return=q,j;case ke:var ye=j._init;return me(q,ye(j._payload),G)}if(ei(j)||oe(j))return j=so(j,q.mode,G,null),j.return=q,j;sc(q,j)}return null}function ue(q,j,G,ye){var Ne=j!==null?j.key:null;if(typeof G=="string"&&G!==""||typeof G=="number")return Ne!==null?null:L(q,j,""+G,ye);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case W:return G.key===Ne?U(q,j,G,ye):null;case M:return G.key===Ne?Z(q,j,G,ye):null;case ke:return Ne=G._init,ue(q,j,Ne(G._payload),ye)}if(ei(G)||oe(G))return Ne!==null?null:de(q,j,G,ye,null);sc(q,G)}return null}function we(q,j,G,ye,Ne){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return q=q.get(G)||null,L(j,q,""+ye,Ne);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case W:return q=q.get(ye.key===null?G:ye.key)||null,U(j,q,ye,Ne);case M:return q=q.get(ye.key===null?G:ye.key)||null,Z(j,q,ye,Ne);case ke:var De=ye._init;return we(q,j,G,De(ye._payload),Ne)}if(ei(ye)||oe(ye))return q=q.get(G)||null,de(j,q,ye,Ne,null);sc(j,ye)}return null}function Se(q,j,G,ye){for(var Ne=null,De=null,Me=j,He=j=0,zt=null;Me!==null&&He<G.length;He++){Me.index>He?(zt=Me,Me=null):zt=Me.sibling;var et=ue(q,Me,G[He],ye);if(et===null){Me===null&&(Me=zt);break}i&&Me&&et.alternate===null&&s(q,Me),j=b(et,j,He),De===null?Ne=et:De.sibling=et,De=et,Me=zt}if(He===G.length)return l(q,Me),pt&&Ji(q,He),Ne;if(Me===null){for(;He<G.length;He++)Me=me(q,G[He],ye),Me!==null&&(j=b(Me,j,He),De===null?Ne=Me:De.sibling=Me,De=Me);return pt&&Ji(q,He),Ne}for(Me=f(q,Me);He<G.length;He++)zt=we(Me,q,He,G[He],ye),zt!==null&&(i&&zt.alternate!==null&&Me.delete(zt.key===null?He:zt.key),j=b(zt,j,He),De===null?Ne=zt:De.sibling=zt,De=zt);return i&&Me.forEach(function(xi){return s(q,xi)}),pt&&Ji(q,He),Ne}function Ce(q,j,G,ye){var Ne=oe(G);if(typeof Ne!="function")throw Error(n(150));if(G=Ne.call(G),G==null)throw Error(n(151));for(var De=Ne=null,Me=j,He=j=0,zt=null,et=G.next();Me!==null&&!et.done;He++,et=G.next()){Me.index>He?(zt=Me,Me=null):zt=Me.sibling;var xi=ue(q,Me,et.value,ye);if(xi===null){Me===null&&(Me=zt);break}i&&Me&&xi.alternate===null&&s(q,Me),j=b(xi,j,He),De===null?Ne=xi:De.sibling=xi,De=xi,Me=zt}if(et.done)return l(q,Me),pt&&Ji(q,He),Ne;if(Me===null){for(;!et.done;He++,et=G.next())et=me(q,et.value,ye),et!==null&&(j=b(et,j,He),De===null?Ne=et:De.sibling=et,De=et);return pt&&Ji(q,He),Ne}for(Me=f(q,Me);!et.done;He++,et=G.next())et=we(Me,q,He,et.value,ye),et!==null&&(i&&et.alternate!==null&&Me.delete(et.key===null?He:et.key),j=b(et,j,He),De===null?Ne=et:De.sibling=et,De=et);return i&&Me.forEach(function(M9){return s(q,M9)}),pt&&Ji(q,He),Ne}function vt(q,j,G,ye){if(typeof G=="object"&&G!==null&&G.type===K&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case W:e:{for(var Ne=G.key,De=j;De!==null;){if(De.key===Ne){if(Ne=G.type,Ne===K){if(De.tag===7){l(q,De.sibling),j=g(De,G.props.children),j.return=q,q=j;break e}}else if(De.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===ke&&kx(Ne)===De.type){l(q,De.sibling),j=g(De,G.props),j.ref=ja(q,De,G),j.return=q,q=j;break e}l(q,De);break}else s(q,De);De=De.sibling}G.type===K?(j=so(G.props.children,q.mode,ye,G.key),j.return=q,q=j):(ye=Oc(G.type,G.key,G.props,null,q.mode,ye),ye.ref=ja(q,j,G),ye.return=q,q=ye)}return w(q);case M:e:{for(De=G.key;j!==null;){if(j.key===De)if(j.tag===4&&j.stateNode.containerInfo===G.containerInfo&&j.stateNode.implementation===G.implementation){l(q,j.sibling),j=g(j,G.children||[]),j.return=q,q=j;break e}else{l(q,j);break}else s(q,j);j=j.sibling}j=mm(G,q.mode,ye),j.return=q,q=j}return w(q);case ke:return De=G._init,vt(q,j,De(G._payload),ye)}if(ei(G))return Se(q,j,G,ye);if(oe(G))return Ce(q,j,G,ye);sc(q,G)}return typeof G=="string"&&G!==""||typeof G=="number"?(G=""+G,j!==null&&j.tag===6?(l(q,j.sibling),j=g(j,G),j.return=q,q=j):(l(q,j),j=pm(G,q.mode,ye),j.return=q,q=j),w(q)):l(q,j)}return vt}var cs=Nx(!0),Ox=Nx(!1),ac=ci(null),uc=null,ds=null,vp=null;function Sp(){vp=ds=uc=null}function Ap(i){var s=ac.current;ct(ac),i._currentValue=s}function Cp(i,s,l){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===l)break;i=i.return}}function fs(i,s){uc=i,vp=ds=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(En=!0),i.firstContext=null)}function Un(i){var s=i._currentValue;if(vp!==i)if(i={context:i,memoizedValue:s,next:null},ds===null){if(uc===null)throw Error(n(308));ds=i,uc.dependencies={lanes:0,firstContext:i}}else ds=ds.next=i;return s}var Zi=null;function kp(i){Zi===null?Zi=[i]:Zi.push(i)}function Ix(i,s,l,f){var g=s.interleaved;return g===null?(l.next=l,kp(s)):(l.next=g.next,g.next=l),s.interleaved=l,Br(i,f)}function Br(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var hi=!1;function Np(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rx(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Ur(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function pi(i,s,l){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(Je&2)!==0){var g=f.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),f.pending=s,Br(i,l)}return g=f.interleaved,g===null?(s.next=s,kp(f)):(s.next=g.next,g.next=s),f.interleaved=s,Br(i,l)}function lc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,$h(i,l)}}function Px(i,s){var l=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,l===f)){var g=null,b=null;if(l=l.firstBaseUpdate,l!==null){do{var w={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};b===null?g=b=w:b=b.next=w,l=l.next}while(l!==null);b===null?g=b=s:b=b.next=s}else g=b=s;l={baseState:f.baseState,firstBaseUpdate:g,lastBaseUpdate:b,shared:f.shared,effects:f.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function cc(i,s,l,f){var g=i.updateQueue;hi=!1;var b=g.firstBaseUpdate,w=g.lastBaseUpdate,L=g.shared.pending;if(L!==null){g.shared.pending=null;var U=L,Z=U.next;U.next=null,w===null?b=Z:w.next=Z,w=U;var de=i.alternate;de!==null&&(de=de.updateQueue,L=de.lastBaseUpdate,L!==w&&(L===null?de.firstBaseUpdate=Z:L.next=Z,de.lastBaseUpdate=U))}if(b!==null){var me=g.baseState;w=0,de=Z=U=null,L=b;do{var ue=L.lane,we=L.eventTime;if((f&ue)===ue){de!==null&&(de=de.next={eventTime:we,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Se=i,Ce=L;switch(ue=s,we=l,Ce.tag){case 1:if(Se=Ce.payload,typeof Se=="function"){me=Se.call(we,me,ue);break e}me=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ce.payload,ue=typeof Se=="function"?Se.call(we,me,ue):Se,ue==null)break e;me=_({},me,ue);break e;case 2:hi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,ue=g.effects,ue===null?g.effects=[L]:ue.push(L))}else we={eventTime:we,lane:ue,tag:L.tag,payload:L.payload,callback:L.callback,next:null},de===null?(Z=de=we,U=me):de=de.next=we,w|=ue;if(L=L.next,L===null){if(L=g.shared.pending,L===null)break;ue=L,L=ue.next,ue.next=null,g.lastBaseUpdate=ue,g.shared.pending=null}}while(!0);if(de===null&&(U=me),g.baseState=U,g.firstBaseUpdate=Z,g.lastBaseUpdate=de,s=g.shared.interleaved,s!==null){g=s;do w|=g.lane,g=g.next;while(g!==s)}else b===null&&(g.shared.lanes=0);no|=w,i.lanes=w,i.memoizedState=me}}function Lx(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var f=i[s],g=f.callback;if(g!==null){if(f.callback=null,f=l,typeof g!="function")throw Error(n(191,g));g.call(f)}}}var $a={},wr=ci($a),Va=ci($a),qa=ci($a);function eo(i){if(i===$a)throw Error(n(174));return i}function Op(i,s){switch(ut(qa,s),ut(Va,i),ut(wr,$a),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Te(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=Te(s,i)}ct(wr),ut(wr,s)}function hs(){ct(wr),ct(Va),ct(qa)}function Dx(i){eo(qa.current);var s=eo(wr.current),l=Te(s,i.type);s!==l&&(ut(Va,i),ut(wr,l))}function Ip(i){Va.current===i&&(ct(wr),ct(Va))}var gt=ci(0);function dc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Rp=[];function Pp(){for(var i=0;i<Rp.length;i++)Rp[i]._workInProgressVersionPrimary=null;Rp.length=0}var fc=H.ReactCurrentDispatcher,Lp=H.ReactCurrentBatchConfig,to=0,Et=null,Rt=null,Ut=null,hc=!1,Ya=!1,Wa=0,i9=0;function Jt(){throw Error(n(321))}function Dp(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!Zn(i[l],s[l]))return!1;return!0}function Mp(i,s,l,f,g,b){if(to=b,Et=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,fc.current=i===null||i.memoizedState===null?u9:l9,i=l(f,g),Ya){b=0;do{if(Ya=!1,Wa=0,25<=b)throw Error(n(301));b+=1,Ut=Rt=null,s.updateQueue=null,fc.current=c9,i=l(f,g)}while(Ya)}if(fc.current=gc,s=Rt!==null&&Rt.next!==null,to=0,Ut=Rt=Et=null,hc=!1,s)throw Error(n(300));return i}function Fp(){var i=Wa!==0;return Wa=0,i}function _r(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?Et.memoizedState=Ut=i:Ut=Ut.next=i,Ut}function Hn(){if(Rt===null){var i=Et.alternate;i=i!==null?i.memoizedState:null}else i=Rt.next;var s=Ut===null?Et.memoizedState:Ut.next;if(s!==null)Ut=s,Rt=i;else{if(i===null)throw Error(n(310));Rt=i,i={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},Ut===null?Et.memoizedState=Ut=i:Ut=Ut.next=i}return Ut}function Ga(i,s){return typeof s=="function"?s(i):s}function Bp(i){var s=Hn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=Rt,g=f.baseQueue,b=l.pending;if(b!==null){if(g!==null){var w=g.next;g.next=b.next,b.next=w}f.baseQueue=g=b,l.pending=null}if(g!==null){b=g.next,f=f.baseState;var L=w=null,U=null,Z=b;do{var de=Z.lane;if((to&de)===de)U!==null&&(U=U.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),f=Z.hasEagerState?Z.eagerState:i(f,Z.action);else{var me={lane:de,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};U===null?(L=U=me,w=f):U=U.next=me,Et.lanes|=de,no|=de}Z=Z.next}while(Z!==null&&Z!==b);U===null?w=f:U.next=L,Zn(f,s.memoizedState)||(En=!0),s.memoizedState=f,s.baseState=w,s.baseQueue=U,l.lastRenderedState=f}if(i=l.interleaved,i!==null){g=i;do b=g.lane,Et.lanes|=b,no|=b,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Up(i){var s=Hn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=l.dispatch,g=l.pending,b=s.memoizedState;if(g!==null){l.pending=null;var w=g=g.next;do b=i(b,w.action),w=w.next;while(w!==g);Zn(b,s.memoizedState)||(En=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),l.lastRenderedState=b}return[b,f]}function Mx(){}function Fx(i,s){var l=Et,f=Hn(),g=s(),b=!Zn(f.memoizedState,g);if(b&&(f.memoizedState=g,En=!0),f=f.queue,Hp(Hx.bind(null,l,f,i),[i]),f.getSnapshot!==s||b||Ut!==null&&Ut.memoizedState.tag&1){if(l.flags|=2048,Ka(9,Ux.bind(null,l,f,g,s),void 0,null),Ht===null)throw Error(n(349));(to&30)!==0||Bx(l,s,g)}return g}function Bx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Et.updateQueue,s===null?(s={lastEffect:null,stores:null},Et.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function Ux(i,s,l,f){s.value=l,s.getSnapshot=f,zx(s)&&jx(i)}function Hx(i,s,l){return l(function(){zx(s)&&jx(i)})}function zx(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!Zn(i,l)}catch(f){return!0}}function jx(i){var s=Br(i,1);s!==null&&ir(s,i,1,-1)}function $x(i){var s=_r();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ga,lastRenderedState:i},s.queue=i,i=i.dispatch=a9.bind(null,Et,i),[s.memoizedState,i]}function Ka(i,s,l,f){return i={tag:i,create:s,destroy:l,deps:f,next:null},s=Et.updateQueue,s===null?(s={lastEffect:null,stores:null},Et.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(f=l.next,l.next=i,i.next=f,s.lastEffect=i)),i}function Vx(){return Hn().memoizedState}function pc(i,s,l,f){var g=_r();Et.flags|=i,g.memoizedState=Ka(1|s,l,void 0,f===void 0?null:f)}function mc(i,s,l,f){var g=Hn();f=f===void 0?null:f;var b=void 0;if(Rt!==null){var w=Rt.memoizedState;if(b=w.destroy,f!==null&&Dp(f,w.deps)){g.memoizedState=Ka(s,l,b,f);return}}Et.flags|=i,g.memoizedState=Ka(1|s,l,b,f)}function qx(i,s){return pc(8390656,8,i,s)}function Hp(i,s){return mc(2048,8,i,s)}function Yx(i,s){return mc(4,2,i,s)}function Wx(i,s){return mc(4,4,i,s)}function Gx(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Kx(i,s,l){return l=l!=null?l.concat([i]):null,mc(4,4,Gx.bind(null,s,i),l)}function zp(){}function Qx(i,s){var l=Hn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Dp(s,f[1])?f[0]:(l.memoizedState=[i,s],i)}function Xx(i,s){var l=Hn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Dp(s,f[1])?f[0]:(i=i(),l.memoizedState=[i,s],i)}function Jx(i,s,l){return(to&21)===0?(i.baseState&&(i.baseState=!1,En=!0),i.memoizedState=l):(Zn(l,s)||(l=kT(),Et.lanes|=l,no|=l,i.baseState=!0),s)}function o9(i,s){var l=nt;nt=l!==0&&4>l?l:4,i(!0);var f=Lp.transition;Lp.transition={};try{i(!1),s()}finally{nt=l,Lp.transition=f}}function Zx(){return Hn().memoizedState}function s9(i,s,l){var f=yi(i);if(l={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null},e2(i))t2(s,l);else if(l=Ix(i,s,l,f),l!==null){var g=on();ir(l,i,f,g),n2(l,s,f)}}function a9(i,s,l){var f=yi(i),g={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null};if(e2(i))t2(s,g);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var w=s.lastRenderedState,L=b(w,l);if(g.hasEagerState=!0,g.eagerState=L,Zn(L,w)){var U=s.interleaved;U===null?(g.next=g,kp(s)):(g.next=U.next,U.next=g),s.interleaved=g;return}}catch(Z){}l=Ix(i,s,g,f),l!==null&&(g=on(),ir(l,i,f,g),n2(l,s,f))}}function e2(i){var s=i.alternate;return i===Et||s!==null&&s===Et}function t2(i,s){Ya=hc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function n2(i,s,l){if((l&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,$h(i,l)}}var gc={readContext:Un,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useInsertionEffect:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useSyncExternalStore:Jt,useId:Jt,unstable_isNewReconciler:!1},u9={readContext:Un,useCallback:function(i,s){return _r().memoizedState=[i,s===void 0?null:s],i},useContext:Un,useEffect:qx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,pc(4194308,4,Gx.bind(null,s,i),l)},useLayoutEffect:function(i,s){return pc(4194308,4,i,s)},useInsertionEffect:function(i,s){return pc(4,2,i,s)},useMemo:function(i,s){var l=_r();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var f=_r();return s=l!==void 0?l(s):s,f.memoizedState=f.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},f.queue=i,i=i.dispatch=s9.bind(null,Et,i),[f.memoizedState,i]},useRef:function(i){var s=_r();return i={current:i},s.memoizedState=i},useState:$x,useDebugValue:zp,useDeferredValue:function(i){return _r().memoizedState=i},useTransition:function(){var i=$x(!1),s=i[0];return i=o9.bind(null,i[1]),_r().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var f=Et,g=_r();if(pt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Ht===null)throw Error(n(349));(to&30)!==0||Bx(f,s,l)}g.memoizedState=l;var b={value:l,getSnapshot:s};return g.queue=b,qx(Hx.bind(null,f,b,i),[i]),f.flags|=2048,Ka(9,Ux.bind(null,f,b,l,s),void 0,null),l},useId:function(){var i=_r(),s=Ht.identifierPrefix;if(pt){var l=Fr,f=Mr;l=(f&~(1<<32-Jn(f)-1)).toString(32)+l,s=":"+s+"R"+l,l=Wa++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=i9++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},l9={readContext:Un,useCallback:Qx,useContext:Un,useEffect:Hp,useImperativeHandle:Kx,useInsertionEffect:Yx,useLayoutEffect:Wx,useMemo:Xx,useReducer:Bp,useRef:Vx,useState:function(){return Bp(Ga)},useDebugValue:zp,useDeferredValue:function(i){var s=Hn();return Jx(s,Rt.memoizedState,i)},useTransition:function(){var i=Bp(Ga)[0],s=Hn().memoizedState;return[i,s]},useMutableSource:Mx,useSyncExternalStore:Fx,useId:Zx,unstable_isNewReconciler:!1},c9={readContext:Un,useCallback:Qx,useContext:Un,useEffect:Hp,useImperativeHandle:Kx,useInsertionEffect:Yx,useLayoutEffect:Wx,useMemo:Xx,useReducer:Up,useRef:Vx,useState:function(){return Up(Ga)},useDebugValue:zp,useDeferredValue:function(i){var s=Hn();return Rt===null?s.memoizedState=i:Jx(s,Rt.memoizedState,i)},useTransition:function(){var i=Up(Ga)[0],s=Hn().memoizedState;return[i,s]},useMutableSource:Mx,useSyncExternalStore:Fx,useId:Zx,unstable_isNewReconciler:!1};function tr(i,s){if(i&&i.defaultProps){s=_({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function jp(i,s,l,f){s=i.memoizedState,l=l(f,s),l=l==null?s:_({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Ec={isMounted:function(i){return(i=i._reactInternals)?Gi(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var f=on(),g=yi(i),b=Ur(f,g);b.payload=s,l!=null&&(b.callback=l),s=pi(i,b,g),s!==null&&(ir(s,i,g,f),lc(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var f=on(),g=yi(i),b=Ur(f,g);b.tag=1,b.payload=s,l!=null&&(b.callback=l),s=pi(i,b,g),s!==null&&(ir(s,i,g,f),lc(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=on(),f=yi(i),g=Ur(l,f);g.tag=2,s!=null&&(g.callback=s),s=pi(i,g,f),s!==null&&(ir(s,i,f,l),lc(s,i,f))}};function r2(i,s,l,f,g,b,w){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,b,w):s.prototype&&s.prototype.isPureReactComponent?!Da(l,f)||!Da(g,b):!0}function i2(i,s,l){var f=!1,g=di,b=s.contextType;return typeof b=="object"&&b!==null?b=Un(b):(g=gn(s)?Qi:Xt.current,f=s.contextTypes,b=(f=f!=null)?ss(i,g):di),s=new s(l,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Ec,i.stateNode=s,s._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=b),s}function o2(i,s,l,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,f),s.state!==i&&Ec.enqueueReplaceState(s,s.state,null)}function $p(i,s,l,f){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},Np(i);var b=s.contextType;typeof b=="object"&&b!==null?g.context=Un(b):(b=gn(s)?Qi:Xt.current,g.context=ss(i,b)),g.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(jp(i,s,b,l),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Ec.enqueueReplaceState(g,g.state,null),cc(i,l,g,f),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function ps(i,s){try{var l="",f=s;do l+=Re(f),f=f.return;while(f);var g=l}catch(b){g=`
19
+ `),w=E.length-1,L=b.length-1;1<=w&&0<=L&&E[w]!==b[L];)L--;for(;1<=w&&0<=L;w--,L--)if(E[w]!==b[L]){if(w!==1||L!==1)do if(w--,L--,0>L||E[w]!==b[L]){var U=`
20
+ `+E[w].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=w&&0<=L);break}}}finally{N=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?Z(i):""}function Re(i){switch(i.tag){case 5:return Z(i.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return i=xe(i.type,!1),i;case 11:return i=xe(i.type.render,!1),i;case 1:return i=xe(i.type,!0),i;default:return""}}function Oe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case K:return"Fragment";case F:return"Portal";case be:return"Profiler";case ce:return"StrictMode";case J:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case X:return(i.displayName||"Context")+".Consumer";case z:return(i._context.displayName||"Context")+".Provider";case se:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case fe:return s=i.displayName||null,s!==null?s:Oe(i.type)||"Memo";case ke:s=i._payload,i=i._init;try{return Oe(i(s))}catch(l){}}return null}function Be(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Oe(s);case 8:return s===ce?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function _e(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function $e(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ot(i){var s=$e(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),f=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,b=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(w){f=""+w,b.call(this,w)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return f},setValue:function(w){f=""+w},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function pn(i){i._valueTracker||(i._valueTracker=ot(i))}function Yi(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),f="";return i&&(f=$e(i)?i.checked?"true":"false":i.value),i=f,i!==l?(s.setValue(i),!0):!1}function Zr(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function Xn(i,s){var l=s.checked;return v({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Ea(i,s){var l=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;l=_e(s.value!=null?s.value:l),i._wrapperState={initialChecked:f,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function ya(i,s){s=s.checked,s!=null&&R(i,"checked",s,!1)}function Wo(i,s){ya(i,s);var l=_e(s.value),f=s.type;if(l!=null)f==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Go(i,s.type,l):s.hasOwnProperty("defaultValue")&&Go(i,s.type,_e(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Cl(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function Go(i,s,l){(s!=="number"||Zr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var ei=Array.isArray;function ti(i,s,l,f){if(i=i.options,s){s={};for(var E=0;E<l.length;E++)s["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=s.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&f&&(i[l].defaultSelected=!0)}else{for(l=""+_e(l),s=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,f&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function ba(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return v({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function kl(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(ei(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:_e(l)}}function Nl(i,s){var l=_e(s.value),f=_e(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),f!=null&&(i.defaultValue=""+f)}function Ol(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ie(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Te(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?ie(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ue,Ye=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,f,E){MSApp.execUnsafeLocalFunction(function(){return i(s,l,f,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Ue=Ue||document.createElement("div"),Ue.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ue.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Xe(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var jt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pr=["Webkit","ms","Moz","O"];Object.keys(jt).forEach(function(i){Pr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),jt[s]=jt[i]})});function Mn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||jt.hasOwnProperty(i)&&jt[i]?(""+s).trim():s+"px"}function ni(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var f=l.indexOf("--")===0,E=Mn(l,s[l],f);l==="float"&&(l="cssFloat"),f?i.setProperty(l,E):i[l]=E}}var Wi=v({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $t(i,s){if(s){if(Wi[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function br(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Sn=null;function Mh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Fh=null,Ko=null,Qo=null;function pT(i){if(i=za(i)){if(typeof Fh!="function")throw Error(n(280));var s=i.stateNode;s&&(s=Zl(s),Fh(i.stateNode,i.type,s))}}function mT(i){Ko?Qo?Qo.push(i):Qo=[i]:Ko=i}function gT(){if(Ko){var i=Ko,s=Qo;if(Qo=Ko=null,pT(i),s)for(i=0;i<s.length;i++)pT(s[i])}}function ET(i,s){return i(s)}function yT(){}var Bh=!1;function bT(i,s,l){if(Bh)return i(s,l);Bh=!0;try{return ET(i,s,l)}finally{Bh=!1,(Ko!==null||Qo!==null)&&(yT(),gT())}}function Ta(i,s){var l=i.stateNode;if(l===null)return null;var f=Zl(l);if(f===null)return null;l=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var Uh=!1;if(c)try{var xa={};Object.defineProperty(xa,"passive",{get:function(){Uh=!0}}),window.addEventListener("test",xa,xa),window.removeEventListener("test",xa,xa)}catch(i){Uh=!1}function q8(i,s,l,f,E,b,w,L,U){var te=Array.prototype.slice.call(arguments,3);try{s.apply(l,te)}catch(de){this.onError(de)}}var wa=!1,Il=null,Rl=!1,Hh=null,Y8={onError:function(i){wa=!0,Il=i}};function W8(i,s,l,f,E,b,w,L,U){wa=!1,Il=null,q8.apply(Y8,arguments)}function G8(i,s,l,f,E,b,w,L,U){if(W8.apply(this,arguments),wa){if(wa){var te=Il;wa=!1,Il=null}else throw Error(n(198));Rl||(Rl=!0,Hh=te)}}function Gi(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function TT(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function xT(i){if(Gi(i)!==i)throw Error(n(188))}function K8(i){var s=i.alternate;if(!s){if(s=Gi(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,f=s;;){var E=l.return;if(E===null)break;var b=E.alternate;if(b===null){if(f=E.return,f!==null){l=f;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===l)return xT(E),i;if(b===f)return xT(E),s;b=b.sibling}throw Error(n(188))}if(l.return!==f.return)l=E,f=b;else{for(var w=!1,L=E.child;L;){if(L===l){w=!0,l=E,f=b;break}if(L===f){w=!0,f=E,l=b;break}L=L.sibling}if(!w){for(L=b.child;L;){if(L===l){w=!0,l=b,f=E;break}if(L===f){w=!0,f=b,l=E;break}L=L.sibling}if(!w)throw Error(n(189))}}if(l.alternate!==f)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function wT(i){return i=K8(i),i!==null?_T(i):null}function _T(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=_T(i);if(s!==null)return s;i=i.sibling}return null}var vT=t.unstable_scheduleCallback,ST=t.unstable_cancelCallback,Q8=t.unstable_shouldYield,X8=t.unstable_requestPaint,_t=t.unstable_now,J8=t.unstable_getCurrentPriorityLevel,zh=t.unstable_ImmediatePriority,AT=t.unstable_UserBlockingPriority,Pl=t.unstable_NormalPriority,Z8=t.unstable_LowPriority,CT=t.unstable_IdlePriority,Ll=null,Tr=null;function eM(i){if(Tr&&typeof Tr.onCommitFiberRoot=="function")try{Tr.onCommitFiberRoot(Ll,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Jn=Math.clz32?Math.clz32:rM,tM=Math.log,nM=Math.LN2;function rM(i){return i>>>=0,i===0?32:31-(tM(i)/nM|0)|0}var Dl=64,Ml=4194304;function _a(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Fl(i,s){var l=i.pendingLanes;if(l===0)return 0;var f=0,E=i.suspendedLanes,b=i.pingedLanes,w=l&268435455;if(w!==0){var L=w&~E;L!==0?f=_a(L):(b&=w,b!==0&&(f=_a(b)))}else w=l&~E,w!==0?f=_a(w):b!==0&&(f=_a(b));if(f===0)return 0;if(s!==0&&s!==f&&(s&E)===0&&(E=f&-f,b=s&-s,E>=b||E===16&&(b&4194240)!==0))return s;if((f&4)!==0&&(f|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=f;0<s;)l=31-Jn(s),E=1<<l,f|=i[l],s&=~E;return f}function iM(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oM(i,s){for(var l=i.suspendedLanes,f=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var w=31-Jn(b),L=1<<w,U=E[w];U===-1?((L&l)===0||(L&f)!==0)&&(E[w]=iM(L,s)):U<=s&&(i.expiredLanes|=L),b&=~L}}function jh(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function kT(){var i=Dl;return Dl<<=1,(Dl&4194240)===0&&(Dl=64),i}function $h(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function va(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Jn(s),i[s]=l}function sM(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-Jn(l),b=1<<E;s[E]=0,f[E]=-1,i[E]=-1,l&=~b}}function Vh(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var f=31-Jn(l),E=1<<f;E&s|i[f]&s&&(i[f]|=s),l&=~E}}var nt=0;function NT(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var OT,qh,IT,RT,PT,Yh=!1,Bl=[],ri=null,ii=null,oi=null,Sa=new Map,Aa=new Map,si=[],aM="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function LT(i,s){switch(i){case"focusin":case"focusout":ri=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":oi=null;break;case"pointerover":case"pointerout":Sa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Aa.delete(s.pointerId)}}function Ca(i,s,l,f,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:l,eventSystemFlags:f,nativeEvent:b,targetContainers:[E]},s!==null&&(s=za(s),s!==null&&qh(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function uM(i,s,l,f,E){switch(s){case"focusin":return ri=Ca(ri,i,s,l,f,E),!0;case"dragenter":return ii=Ca(ii,i,s,l,f,E),!0;case"mouseover":return oi=Ca(oi,i,s,l,f,E),!0;case"pointerover":var b=E.pointerId;return Sa.set(b,Ca(Sa.get(b)||null,i,s,l,f,E)),!0;case"gotpointercapture":return b=E.pointerId,Aa.set(b,Ca(Aa.get(b)||null,i,s,l,f,E)),!0}return!1}function DT(i){var s=Ki(i.target);if(s!==null){var l=Gi(s);if(l!==null){if(s=l.tag,s===13){if(s=TT(l),s!==null){i.blockedOn=s,PT(i.priority,function(){IT(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Ul(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=Gh(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var f=new l.constructor(l.type,l);Sn=f,l.target.dispatchEvent(f),Sn=null}else return s=za(l),s!==null&&qh(s),i.blockedOn=l,!1;s.shift()}return!0}function MT(i,s,l){Ul(i)&&l.delete(s)}function lM(){Yh=!1,ri!==null&&Ul(ri)&&(ri=null),ii!==null&&Ul(ii)&&(ii=null),oi!==null&&Ul(oi)&&(oi=null),Sa.forEach(MT),Aa.forEach(MT)}function ka(i,s){i.blockedOn===s&&(i.blockedOn=null,Yh||(Yh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,lM)))}function Na(i){function s(E){return ka(E,i)}if(0<Bl.length){ka(Bl[0],i);for(var l=1;l<Bl.length;l++){var f=Bl[l];f.blockedOn===i&&(f.blockedOn=null)}}for(ri!==null&&ka(ri,i),ii!==null&&ka(ii,i),oi!==null&&ka(oi,i),Sa.forEach(s),Aa.forEach(s),l=0;l<si.length;l++)f=si[l],f.blockedOn===i&&(f.blockedOn=null);for(;0<si.length&&(l=si[0],l.blockedOn===null);)DT(l),l.blockedOn===null&&si.shift()}var Xo=H.ReactCurrentBatchConfig,Hl=!0;function cM(i,s,l,f){var E=nt,b=Xo.transition;Xo.transition=null;try{nt=1,Wh(i,s,l,f)}finally{nt=E,Xo.transition=b}}function dM(i,s,l,f){var E=nt,b=Xo.transition;Xo.transition=null;try{nt=4,Wh(i,s,l,f)}finally{nt=E,Xo.transition=b}}function Wh(i,s,l,f){if(Hl){var E=Gh(i,s,l,f);if(E===null)dp(i,s,f,zl,l),LT(i,f);else if(uM(E,i,s,l,f))f.stopPropagation();else if(LT(i,f),s&4&&-1<aM.indexOf(i)){for(;E!==null;){var b=za(E);if(b!==null&&OT(b),b=Gh(i,s,l,f),b===null&&dp(i,s,f,zl,l),b===E)break;E=b}E!==null&&f.stopPropagation()}else dp(i,s,f,null,l)}}var zl=null;function Gh(i,s,l,f){if(zl=null,i=Mh(f),i=Ki(i),i!==null)if(s=Gi(i),s===null)i=null;else if(l=s.tag,l===13){if(i=TT(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return zl=i,null}function FT(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(J8()){case zh:return 1;case AT:return 4;case Pl:case Z8:return 16;case CT:return 536870912;default:return 16}default:return 16}}var ai=null,Kh=null,jl=null;function BT(){if(jl)return jl;var i,s=Kh,l=s.length,f,E="value"in ai?ai.value:ai.textContent,b=E.length;for(i=0;i<l&&s[i]===E[i];i++);var w=l-i;for(f=1;f<=w&&s[l-f]===E[b-f];f++);return jl=E.slice(i,1<f?1-f:void 0)}function $l(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Vl(){return!0}function UT(){return!1}function An(i){function s(l,f,E,b,w){this._reactName=l,this._targetInst=E,this.type=f,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(l=i[L],this[L]=l?l(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Vl:UT,this.isPropagationStopped=UT,this}return v(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Vl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Vl)},persist:function(){},isPersistent:Vl}),s}var Jo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qh=An(Jo),Oa=v({},Jo,{view:0,detail:0}),fM=An(Oa),Xh,Jh,Ia,ql=v({},Oa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ep,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Ia&&(Ia&&i.type==="mousemove"?(Xh=i.screenX-Ia.screenX,Jh=i.screenY-Ia.screenY):Jh=Xh=0,Ia=i),Xh)},movementY:function(i){return"movementY"in i?i.movementY:Jh}}),HT=An(ql),hM=v({},ql,{dataTransfer:0}),pM=An(hM),mM=v({},Oa,{relatedTarget:0}),Zh=An(mM),gM=v({},Jo,{animationName:0,elapsedTime:0,pseudoElement:0}),EM=An(gM),yM=v({},Jo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),bM=An(yM),TM=v({},Jo,{data:0}),zT=An(TM),xM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_M={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=_M[i])?!!s[i]:!1}function ep(){return vM}var SM=v({},Oa,{key:function(i){if(i.key){var s=xM[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=$l(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?wM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ep,charCode:function(i){return i.type==="keypress"?$l(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?$l(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),AM=An(SM),CM=v({},ql,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jT=An(CM),kM=v({},Oa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ep}),NM=An(kM),OM=v({},Jo,{propertyName:0,elapsedTime:0,pseudoElement:0}),IM=An(OM),RM=v({},ql,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),PM=An(RM),LM=[9,13,27,32],tp=c&&"CompositionEvent"in window,Ra=null;c&&"documentMode"in document&&(Ra=document.documentMode);var DM=c&&"TextEvent"in window&&!Ra,$T=c&&(!tp||Ra&&8<Ra&&11>=Ra),VT=" ",qT=!1;function YT(i,s){switch(i){case"keyup":return LM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WT(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Zo=!1;function MM(i,s){switch(i){case"compositionend":return WT(s);case"keypress":return s.which!==32?null:(qT=!0,VT);case"textInput":return i=s.data,i===VT&&qT?null:i;default:return null}}function FM(i,s){if(Zo)return i==="compositionend"||!tp&&YT(i,s)?(i=BT(),jl=Kh=ai=null,Zo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return $T&&s.locale!=="ko"?null:s.data;default:return null}}var BM={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function GT(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!BM[i.type]:s==="textarea"}function KT(i,s,l,f){mT(f),s=Ql(s,"onChange"),0<s.length&&(l=new Qh("onChange","change",null,l,f),i.push({event:l,listeners:s}))}var Pa=null,La=null;function UM(i){hx(i,0)}function Yl(i){var s=is(i);if(Yi(s))return i}function HM(i,s){if(i==="change")return s}var QT=!1;if(c){var np;if(c){var rp="oninput"in document;if(!rp){var XT=document.createElement("div");XT.setAttribute("oninput","return;"),rp=typeof XT.oninput=="function"}np=rp}else np=!1;QT=np&&(!document.documentMode||9<document.documentMode)}function JT(){Pa&&(Pa.detachEvent("onpropertychange",ZT),La=Pa=null)}function ZT(i){if(i.propertyName==="value"&&Yl(La)){var s=[];KT(s,La,i,Mh(i)),bT(UM,s)}}function zM(i,s,l){i==="focusin"?(JT(),Pa=s,La=l,Pa.attachEvent("onpropertychange",ZT)):i==="focusout"&&JT()}function jM(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Yl(La)}function $M(i,s){if(i==="click")return Yl(s)}function VM(i,s){if(i==="input"||i==="change")return Yl(s)}function qM(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Zn=typeof Object.is=="function"?Object.is:qM;function Da(i,s){if(Zn(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),f=Object.keys(s);if(l.length!==f.length)return!1;for(f=0;f<l.length;f++){var E=l[f];if(!d.call(s,E)||!Zn(i[E],s[E]))return!1}return!0}function ex(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function tx(i,s){var l=ex(i);i=0;for(var f;l;){if(l.nodeType===3){if(f=i+l.textContent.length,i<=s&&f>=s)return{node:l,offset:s-i};i=f}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=ex(l)}}function nx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?nx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function rx(){for(var i=window,s=Zr();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(f){l=!1}if(l)i=s.contentWindow;else break;s=Zr(i.document)}return s}function ip(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function YM(i){var s=rx(),l=i.focusedElem,f=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&nx(l.ownerDocument.documentElement,l)){if(f!==null&&ip(l)){if(s=f.start,i=f.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,b=Math.min(f.start,E);f=f.end===void 0?b:Math.min(f.end,E),!i.extend&&b>f&&(E=f,f=b,b=E),E=tx(l,b);var w=tx(l,f);E&&w&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==w.node||i.focusOffset!==w.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>f?(i.addRange(s),i.extend(w.node,w.offset)):(s.setEnd(w.node,w.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var WM=c&&"documentMode"in document&&11>=document.documentMode,es=null,op=null,Ma=null,sp=!1;function ix(i,s,l){var f=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;sp||es==null||es!==Zr(f)||(f=es,"selectionStart"in f&&ip(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Ma&&Da(Ma,f)||(Ma=f,f=Ql(op,"onSelect"),0<f.length&&(s=new Qh("onSelect","select",null,s,l),i.push({event:s,listeners:f}),s.target=es)))}function Wl(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var ts={animationend:Wl("Animation","AnimationEnd"),animationiteration:Wl("Animation","AnimationIteration"),animationstart:Wl("Animation","AnimationStart"),transitionend:Wl("Transition","TransitionEnd")},ap={},ox={};c&&(ox=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function Gl(i){if(ap[i])return ap[i];if(!ts[i])return i;var s=ts[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in ox)return ap[i]=s[l];return i}var sx=Gl("animationend"),ax=Gl("animationiteration"),ux=Gl("animationstart"),lx=Gl("transitionend"),cx=new Map,dx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ui(i,s){cx.set(i,s),a(s,[i])}for(var up=0;up<dx.length;up++){var lp=dx[up],GM=lp.toLowerCase(),KM=lp[0].toUpperCase()+lp.slice(1);ui(GM,"on"+KM)}ui(sx,"onAnimationEnd"),ui(ax,"onAnimationIteration"),ui(ux,"onAnimationStart"),ui("dblclick","onDoubleClick"),ui("focusin","onFocus"),ui("focusout","onBlur"),ui(lx,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fa="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),QM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fa));function fx(i,s,l){var f=i.type||"unknown-event";i.currentTarget=l,G8(f,s,void 0,i),i.currentTarget=null}function hx(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var f=i[l],E=f.event;f=f.listeners;e:{var b=void 0;if(s)for(var w=f.length-1;0<=w;w--){var L=f[w],U=L.instance,te=L.currentTarget;if(L=L.listener,U!==b&&E.isPropagationStopped())break e;fx(E,L,te),b=U}else for(w=0;w<f.length;w++){if(L=f[w],U=L.instance,te=L.currentTarget,L=L.listener,U!==b&&E.isPropagationStopped())break e;fx(E,L,te),b=U}}}if(Rl)throw i=Hh,Rl=!1,Hh=null,i}function lt(i,s){var l=s[Ep];l===void 0&&(l=s[Ep]=new Set);var f=i+"__bubble";l.has(f)||(px(s,i,2,!1),l.add(f))}function cp(i,s,l){var f=0;s&&(f|=4),px(l,i,f,s)}var Kl="_reactListening"+Math.random().toString(36).slice(2);function Ba(i){if(!i[Kl]){i[Kl]=!0,r.forEach(function(l){l!=="selectionchange"&&(QM.has(l)||cp(l,!1,i),cp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Kl]||(s[Kl]=!0,cp("selectionchange",!1,s))}}function px(i,s,l,f){switch(FT(s)){case 1:var E=cM;break;case 4:E=dM;break;default:E=Wh}l=E.bind(null,s,l,i),E=void 0,!Uh||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),f?E!==void 0?i.addEventListener(s,l,{capture:!0,passive:E}):i.addEventListener(s,l,!0):E!==void 0?i.addEventListener(s,l,{passive:E}):i.addEventListener(s,l,!1)}function dp(i,s,l,f,E){var b=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var w=f.tag;if(w===3||w===4){var L=f.stateNode.containerInfo;if(L===E||L.nodeType===8&&L.parentNode===E)break;if(w===4)for(w=f.return;w!==null;){var U=w.tag;if((U===3||U===4)&&(U=w.stateNode.containerInfo,U===E||U.nodeType===8&&U.parentNode===E))return;w=w.return}for(;L!==null;){if(w=Ki(L),w===null)return;if(U=w.tag,U===5||U===6){f=b=w;continue e}L=L.parentNode}}f=f.return}bT(function(){var te=b,de=Mh(l),me=[];e:{var ue=cx.get(i);if(ue!==void 0){var we=Qh,Se=i;switch(i){case"keypress":if($l(l)===0)break e;case"keydown":case"keyup":we=AM;break;case"focusin":Se="focus",we=Zh;break;case"focusout":Se="blur",we=Zh;break;case"beforeblur":case"afterblur":we=Zh;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=HT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=pM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=NM;break;case sx:case ax:case ux:we=EM;break;case lx:we=IM;break;case"scroll":we=fM;break;case"wheel":we=PM;break;case"copy":case"cut":case"paste":we=bM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=jT}var Ce=(s&4)!==0,vt=!Ce&&i==="scroll",q=Ce?ue!==null?ue+"Capture":null:ue;Ce=[];for(var j=te,G;j!==null;){G=j;var ye=G.stateNode;if(G.tag===5&&ye!==null&&(G=ye,q!==null&&(ye=Ta(j,q),ye!=null&&Ce.push(Ua(j,ye,G)))),vt)break;j=j.return}0<Ce.length&&(ue=new we(ue,Se,null,l,de),me.push({event:ue,listeners:Ce}))}}if((s&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",we=i==="mouseout"||i==="pointerout",ue&&l!==Sn&&(Se=l.relatedTarget||l.fromElement)&&(Ki(Se)||Se[Lr]))break e;if((we||ue)&&(ue=de.window===de?de:(ue=de.ownerDocument)?ue.defaultView||ue.parentWindow:window,we?(Se=l.relatedTarget||l.toElement,we=te,Se=Se?Ki(Se):null,Se!==null&&(vt=Gi(Se),Se!==vt||Se.tag!==5&&Se.tag!==6)&&(Se=null)):(we=null,Se=te),we!==Se)){if(Ce=HT,ye="onMouseLeave",q="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(Ce=jT,ye="onPointerLeave",q="onPointerEnter",j="pointer"),vt=we==null?ue:is(we),G=Se==null?ue:is(Se),ue=new Ce(ye,j+"leave",we,l,de),ue.target=vt,ue.relatedTarget=G,ye=null,Ki(de)===te&&(Ce=new Ce(q,j+"enter",Se,l,de),Ce.target=G,Ce.relatedTarget=vt,ye=Ce),vt=ye,we&&Se)t:{for(Ce=we,q=Se,j=0,G=Ce;G;G=ns(G))j++;for(G=0,ye=q;ye;ye=ns(ye))G++;for(;0<j-G;)Ce=ns(Ce),j--;for(;0<G-j;)q=ns(q),G--;for(;j--;){if(Ce===q||q!==null&&Ce===q.alternate)break t;Ce=ns(Ce),q=ns(q)}Ce=null}else Ce=null;we!==null&&mx(me,ue,we,Ce,!1),Se!==null&&vt!==null&&mx(me,vt,Se,Ce,!0)}}e:{if(ue=te?is(te):window,we=ue.nodeName&&ue.nodeName.toLowerCase(),we==="select"||we==="input"&&ue.type==="file")var Ne=HM;else if(GT(ue))if(QT)Ne=VM;else{Ne=jM;var De=zM}else(we=ue.nodeName)&&we.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Ne=$M);if(Ne&&(Ne=Ne(i,te))){KT(me,Ne,l,de);break e}De&&De(i,ue,te),i==="focusout"&&(De=ue._wrapperState)&&De.controlled&&ue.type==="number"&&Go(ue,"number",ue.value)}switch(De=te?is(te):window,i){case"focusin":(GT(De)||De.contentEditable==="true")&&(es=De,op=te,Ma=null);break;case"focusout":Ma=op=es=null;break;case"mousedown":sp=!0;break;case"contextmenu":case"mouseup":case"dragend":sp=!1,ix(me,l,de);break;case"selectionchange":if(WM)break;case"keydown":case"keyup":ix(me,l,de)}var Me;if(tp)e:{switch(i){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Zo?YT(i,l)&&(He="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(He="onCompositionStart");He&&($T&&l.locale!=="ko"&&(Zo||He!=="onCompositionStart"?He==="onCompositionEnd"&&Zo&&(Me=BT()):(ai=de,Kh="value"in ai?ai.value:ai.textContent,Zo=!0)),De=Ql(te,He),0<De.length&&(He=new zT(He,i,null,l,de),me.push({event:He,listeners:De}),Me?He.data=Me:(Me=WT(l),Me!==null&&(He.data=Me)))),(Me=DM?MM(i,l):FM(i,l))&&(te=Ql(te,"onBeforeInput"),0<te.length&&(de=new zT("onBeforeInput","beforeinput",null,l,de),me.push({event:de,listeners:te}),de.data=Me))}hx(me,s)})}function Ua(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Ql(i,s){for(var l=s+"Capture",f=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=Ta(i,l),b!=null&&f.unshift(Ua(i,b,E)),b=Ta(i,s),b!=null&&f.push(Ua(i,b,E))),i=i.return}return f}function ns(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function mx(i,s,l,f,E){for(var b=s._reactName,w=[];l!==null&&l!==f;){var L=l,U=L.alternate,te=L.stateNode;if(U!==null&&U===f)break;L.tag===5&&te!==null&&(L=te,E?(U=Ta(l,b),U!=null&&w.unshift(Ua(l,U,L))):E||(U=Ta(l,b),U!=null&&w.push(Ua(l,U,L)))),l=l.return}w.length!==0&&i.push({event:s,listeners:w})}var XM=/\r\n?/g,JM=/\u0000|\uFFFD/g;function gx(i){return(typeof i=="string"?i:""+i).replace(XM,`
21
+ `).replace(JM,"")}function Xl(i,s,l){if(s=gx(s),gx(i)!==s&&l)throw Error(n(425))}function Jl(){}var fp=null,hp=null;function pp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var mp=typeof setTimeout=="function"?setTimeout:void 0,ZM=typeof clearTimeout=="function"?clearTimeout:void 0,Ex=typeof Promise=="function"?Promise:void 0,e9=typeof queueMicrotask=="function"?queueMicrotask:typeof Ex!="undefined"?function(i){return Ex.resolve(null).then(i).catch(t9)}:mp;function t9(i){setTimeout(function(){throw i})}function gp(i,s){var l=s,f=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(f===0){i.removeChild(E),Na(s);return}f--}else l!=="$"&&l!=="$?"&&l!=="$!"||f++;l=E}while(l);Na(s)}function li(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function yx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var rs=Math.random().toString(36).slice(2),xr="__reactFiber$"+rs,Ha="__reactProps$"+rs,Lr="__reactContainer$"+rs,Ep="__reactEvents$"+rs,n9="__reactListeners$"+rs,r9="__reactHandles$"+rs;function Ki(i){var s=i[xr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[Lr]||l[xr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=yx(i);i!==null;){if(l=i[xr])return l;i=yx(i)}return s}i=l,l=i.parentNode}return null}function za(i){return i=i[xr]||i[Lr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function is(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Zl(i){return i[Ha]||null}var yp=[],os=-1;function ci(i){return{current:i}}function ct(i){0>os||(i.current=yp[os],yp[os]=null,os--)}function ut(i,s){os++,yp[os]=i.current,i.current=s}var di={},Xt=ci(di),mn=ci(!1),Qi=di;function ss(i,s){var l=i.type.contextTypes;if(!l)return di;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in l)E[b]=s[b];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function gn(i){return i=i.childContextTypes,i!=null}function ec(){ct(mn),ct(Xt)}function bx(i,s,l){if(Xt.current!==di)throw Error(n(168));ut(Xt,s),ut(mn,l)}function Tx(i,s,l){var f=i.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return l;f=f.getChildContext();for(var E in f)if(!(E in s))throw Error(n(108,Be(i)||"Unknown",E));return v({},l,f)}function tc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||di,Qi=Xt.current,ut(Xt,i),ut(mn,mn.current),!0}function xx(i,s,l){var f=i.stateNode;if(!f)throw Error(n(169));l?(i=Tx(i,s,Qi),f.__reactInternalMemoizedMergedChildContext=i,ct(mn),ct(Xt),ut(Xt,i)):ct(mn),ut(mn,l)}var Dr=null,nc=!1,bp=!1;function wx(i){Dr===null?Dr=[i]:Dr.push(i)}function i9(i){nc=!0,wx(i)}function fi(){if(!bp&&Dr!==null){bp=!0;var i=0,s=nt;try{var l=Dr;for(nt=1;i<l.length;i++){var f=l[i];do f=f(!0);while(f!==null)}Dr=null,nc=!1}catch(E){throw Dr!==null&&(Dr=Dr.slice(i+1)),vT(zh,fi),E}finally{nt=s,bp=!1}}return null}var as=[],us=0,rc=null,ic=0,Fn=[],Bn=0,Xi=null,Mr=1,Fr="";function Ji(i,s){as[us++]=ic,as[us++]=rc,rc=i,ic=s}function _x(i,s,l){Fn[Bn++]=Mr,Fn[Bn++]=Fr,Fn[Bn++]=Xi,Xi=i;var f=Mr;i=Fr;var E=32-Jn(f)-1;f&=~(1<<E),l+=1;var b=32-Jn(s)+E;if(30<b){var w=E-E%5;b=(f&(1<<w)-1).toString(32),f>>=w,E-=w,Mr=1<<32-Jn(s)+E|l<<E|f,Fr=b+i}else Mr=1<<b|l<<E|f,Fr=i}function Tp(i){i.return!==null&&(Ji(i,1),_x(i,1,0))}function xp(i){for(;i===rc;)rc=as[--us],as[us]=null,ic=as[--us],as[us]=null;for(;i===Xi;)Xi=Fn[--Bn],Fn[Bn]=null,Fr=Fn[--Bn],Fn[Bn]=null,Mr=Fn[--Bn],Fn[Bn]=null}var Cn=null,kn=null,pt=!1,er=null;function vx(i,s){var l=jn(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function Sx(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Cn=i,kn=li(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Cn=i,kn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=Xi!==null?{id:Mr,overflow:Fr}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=jn(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Cn=i,kn=null,!0):!1;default:return!1}}function wp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function _p(i){if(pt){var s=kn;if(s){var l=s;if(!Sx(i,s)){if(wp(i))throw Error(n(418));s=li(l.nextSibling);var f=Cn;s&&Sx(i,s)?vx(f,l):(i.flags=i.flags&-4097|2,pt=!1,Cn=i)}}else{if(wp(i))throw Error(n(418));i.flags=i.flags&-4097|2,pt=!1,Cn=i}}}function Ax(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Cn=i}function oc(i){if(i!==Cn)return!1;if(!pt)return Ax(i),pt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!pp(i.type,i.memoizedProps)),s&&(s=kn)){if(wp(i))throw Cx(),Error(n(418));for(;s;)vx(i,s),s=li(s.nextSibling)}if(Ax(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){kn=li(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}kn=null}}else kn=Cn?li(i.stateNode.nextSibling):null;return!0}function Cx(){for(var i=kn;i;)i=li(i.nextSibling)}function ls(){kn=Cn=null,pt=!1}function vp(i){er===null?er=[i]:er.push(i)}var o9=H.ReactCurrentBatchConfig;function ja(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var f=l.stateNode}if(!f)throw Error(n(147,i));var E=f,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(w){var L=E.refs;w===null?delete L[b]:L[b]=w},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function sc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function kx(i){var s=i._init;return s(i._payload)}function Nx(i){function s(q,j){if(i){var G=q.deletions;G===null?(q.deletions=[j],q.flags|=16):G.push(j)}}function l(q,j){if(!i)return null;for(;j!==null;)s(q,j),j=j.sibling;return null}function f(q,j){for(q=new Map;j!==null;)j.key!==null?q.set(j.key,j):q.set(j.index,j),j=j.sibling;return q}function E(q,j){return q=Ti(q,j),q.index=0,q.sibling=null,q}function b(q,j,G){return q.index=G,i?(G=q.alternate,G!==null?(G=G.index,G<j?(q.flags|=2,j):G):(q.flags|=2,j)):(q.flags|=1048576,j)}function w(q){return i&&q.alternate===null&&(q.flags|=2),q}function L(q,j,G,ye){return j===null||j.tag!==6?(j=mm(G,q.mode,ye),j.return=q,j):(j=E(j,G),j.return=q,j)}function U(q,j,G,ye){var Ne=G.type;return Ne===K?de(q,j,G.props.children,ye,G.key):j!==null&&(j.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===ke&&kx(Ne)===j.type)?(ye=E(j,G.props),ye.ref=ja(q,j,G),ye.return=q,ye):(ye=Oc(G.type,G.key,G.props,null,q.mode,ye),ye.ref=ja(q,j,G),ye.return=q,ye)}function te(q,j,G,ye){return j===null||j.tag!==4||j.stateNode.containerInfo!==G.containerInfo||j.stateNode.implementation!==G.implementation?(j=gm(G,q.mode,ye),j.return=q,j):(j=E(j,G.children||[]),j.return=q,j)}function de(q,j,G,ye,Ne){return j===null||j.tag!==7?(j=so(G,q.mode,ye,Ne),j.return=q,j):(j=E(j,G),j.return=q,j)}function me(q,j,G){if(typeof j=="string"&&j!==""||typeof j=="number")return j=mm(""+j,q.mode,G),j.return=q,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case W:return G=Oc(j.type,j.key,j.props,null,q.mode,G),G.ref=ja(q,null,j),G.return=q,G;case F:return j=gm(j,q.mode,G),j.return=q,j;case ke:var ye=j._init;return me(q,ye(j._payload),G)}if(ei(j)||oe(j))return j=so(j,q.mode,G,null),j.return=q,j;sc(q,j)}return null}function ue(q,j,G,ye){var Ne=j!==null?j.key:null;if(typeof G=="string"&&G!==""||typeof G=="number")return Ne!==null?null:L(q,j,""+G,ye);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case W:return G.key===Ne?U(q,j,G,ye):null;case F:return G.key===Ne?te(q,j,G,ye):null;case ke:return Ne=G._init,ue(q,j,Ne(G._payload),ye)}if(ei(G)||oe(G))return Ne!==null?null:de(q,j,G,ye,null);sc(q,G)}return null}function we(q,j,G,ye,Ne){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return q=q.get(G)||null,L(j,q,""+ye,Ne);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case W:return q=q.get(ye.key===null?G:ye.key)||null,U(j,q,ye,Ne);case F:return q=q.get(ye.key===null?G:ye.key)||null,te(j,q,ye,Ne);case ke:var De=ye._init;return we(q,j,G,De(ye._payload),Ne)}if(ei(ye)||oe(ye))return q=q.get(G)||null,de(j,q,ye,Ne,null);sc(j,ye)}return null}function Se(q,j,G,ye){for(var Ne=null,De=null,Me=j,He=j=0,zt=null;Me!==null&&He<G.length;He++){Me.index>He?(zt=Me,Me=null):zt=Me.sibling;var et=ue(q,Me,G[He],ye);if(et===null){Me===null&&(Me=zt);break}i&&Me&&et.alternate===null&&s(q,Me),j=b(et,j,He),De===null?Ne=et:De.sibling=et,De=et,Me=zt}if(He===G.length)return l(q,Me),pt&&Ji(q,He),Ne;if(Me===null){for(;He<G.length;He++)Me=me(q,G[He],ye),Me!==null&&(j=b(Me,j,He),De===null?Ne=Me:De.sibling=Me,De=Me);return pt&&Ji(q,He),Ne}for(Me=f(q,Me);He<G.length;He++)zt=we(Me,q,He,G[He],ye),zt!==null&&(i&&zt.alternate!==null&&Me.delete(zt.key===null?He:zt.key),j=b(zt,j,He),De===null?Ne=zt:De.sibling=zt,De=zt);return i&&Me.forEach(function(xi){return s(q,xi)}),pt&&Ji(q,He),Ne}function Ce(q,j,G,ye){var Ne=oe(G);if(typeof Ne!="function")throw Error(n(150));if(G=Ne.call(G),G==null)throw Error(n(151));for(var De=Ne=null,Me=j,He=j=0,zt=null,et=G.next();Me!==null&&!et.done;He++,et=G.next()){Me.index>He?(zt=Me,Me=null):zt=Me.sibling;var xi=ue(q,Me,et.value,ye);if(xi===null){Me===null&&(Me=zt);break}i&&Me&&xi.alternate===null&&s(q,Me),j=b(xi,j,He),De===null?Ne=xi:De.sibling=xi,De=xi,Me=zt}if(et.done)return l(q,Me),pt&&Ji(q,He),Ne;if(Me===null){for(;!et.done;He++,et=G.next())et=me(q,et.value,ye),et!==null&&(j=b(et,j,He),De===null?Ne=et:De.sibling=et,De=et);return pt&&Ji(q,He),Ne}for(Me=f(q,Me);!et.done;He++,et=G.next())et=we(Me,q,He,et.value,ye),et!==null&&(i&&et.alternate!==null&&Me.delete(et.key===null?He:et.key),j=b(et,j,He),De===null?Ne=et:De.sibling=et,De=et);return i&&Me.forEach(function(B9){return s(q,B9)}),pt&&Ji(q,He),Ne}function vt(q,j,G,ye){if(typeof G=="object"&&G!==null&&G.type===K&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case W:e:{for(var Ne=G.key,De=j;De!==null;){if(De.key===Ne){if(Ne=G.type,Ne===K){if(De.tag===7){l(q,De.sibling),j=E(De,G.props.children),j.return=q,q=j;break e}}else if(De.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===ke&&kx(Ne)===De.type){l(q,De.sibling),j=E(De,G.props),j.ref=ja(q,De,G),j.return=q,q=j;break e}l(q,De);break}else s(q,De);De=De.sibling}G.type===K?(j=so(G.props.children,q.mode,ye,G.key),j.return=q,q=j):(ye=Oc(G.type,G.key,G.props,null,q.mode,ye),ye.ref=ja(q,j,G),ye.return=q,q=ye)}return w(q);case F:e:{for(De=G.key;j!==null;){if(j.key===De)if(j.tag===4&&j.stateNode.containerInfo===G.containerInfo&&j.stateNode.implementation===G.implementation){l(q,j.sibling),j=E(j,G.children||[]),j.return=q,q=j;break e}else{l(q,j);break}else s(q,j);j=j.sibling}j=gm(G,q.mode,ye),j.return=q,q=j}return w(q);case ke:return De=G._init,vt(q,j,De(G._payload),ye)}if(ei(G))return Se(q,j,G,ye);if(oe(G))return Ce(q,j,G,ye);sc(q,G)}return typeof G=="string"&&G!==""||typeof G=="number"?(G=""+G,j!==null&&j.tag===6?(l(q,j.sibling),j=E(j,G),j.return=q,q=j):(l(q,j),j=mm(G,q.mode,ye),j.return=q,q=j),w(q)):l(q,j)}return vt}var cs=Nx(!0),Ox=Nx(!1),ac=ci(null),uc=null,ds=null,Sp=null;function Ap(){Sp=ds=uc=null}function Cp(i){var s=ac.current;ct(ac),i._currentValue=s}function kp(i,s,l){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===l)break;i=i.return}}function fs(i,s){uc=i,Sp=ds=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(En=!0),i.firstContext=null)}function Un(i){var s=i._currentValue;if(Sp!==i)if(i={context:i,memoizedValue:s,next:null},ds===null){if(uc===null)throw Error(n(308));ds=i,uc.dependencies={lanes:0,firstContext:i}}else ds=ds.next=i;return s}var Zi=null;function Np(i){Zi===null?Zi=[i]:Zi.push(i)}function Ix(i,s,l,f){var E=s.interleaved;return E===null?(l.next=l,Np(s)):(l.next=E.next,E.next=l),s.interleaved=l,Br(i,f)}function Br(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var hi=!1;function Op(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rx(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Ur(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function pi(i,s,l){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(Je&2)!==0){var E=f.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),f.pending=s,Br(i,l)}return E=f.interleaved,E===null?(s.next=s,Np(f)):(s.next=E.next,E.next=s),f.interleaved=s,Br(i,l)}function lc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,Vh(i,l)}}function Px(i,s){var l=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,l===f)){var E=null,b=null;if(l=l.firstBaseUpdate,l!==null){do{var w={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};b===null?E=b=w:b=b.next=w,l=l.next}while(l!==null);b===null?E=b=s:b=b.next=s}else E=b=s;l={baseState:f.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:f.shared,effects:f.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function cc(i,s,l,f){var E=i.updateQueue;hi=!1;var b=E.firstBaseUpdate,w=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var U=L,te=U.next;U.next=null,w===null?b=te:w.next=te,w=U;var de=i.alternate;de!==null&&(de=de.updateQueue,L=de.lastBaseUpdate,L!==w&&(L===null?de.firstBaseUpdate=te:L.next=te,de.lastBaseUpdate=U))}if(b!==null){var me=E.baseState;w=0,de=te=U=null,L=b;do{var ue=L.lane,we=L.eventTime;if((f&ue)===ue){de!==null&&(de=de.next={eventTime:we,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Se=i,Ce=L;switch(ue=s,we=l,Ce.tag){case 1:if(Se=Ce.payload,typeof Se=="function"){me=Se.call(we,me,ue);break e}me=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ce.payload,ue=typeof Se=="function"?Se.call(we,me,ue):Se,ue==null)break e;me=v({},me,ue);break e;case 2:hi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[L]:ue.push(L))}else we={eventTime:we,lane:ue,tag:L.tag,payload:L.payload,callback:L.callback,next:null},de===null?(te=de=we,U=me):de=de.next=we,w|=ue;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;ue=L,L=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(de===null&&(U=me),E.baseState=U,E.firstBaseUpdate=te,E.lastBaseUpdate=de,s=E.shared.interleaved,s!==null){E=s;do w|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);no|=w,i.lanes=w,i.memoizedState=me}}function Lx(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var f=i[s],E=f.callback;if(E!==null){if(f.callback=null,f=l,typeof E!="function")throw Error(n(191,E));E.call(f)}}}var $a={},wr=ci($a),Va=ci($a),qa=ci($a);function eo(i){if(i===$a)throw Error(n(174));return i}function Ip(i,s){switch(ut(qa,s),ut(Va,i),ut(wr,$a),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Te(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=Te(s,i)}ct(wr),ut(wr,s)}function hs(){ct(wr),ct(Va),ct(qa)}function Dx(i){eo(qa.current);var s=eo(wr.current),l=Te(s,i.type);s!==l&&(ut(Va,i),ut(wr,l))}function Rp(i){Va.current===i&&(ct(wr),ct(Va))}var gt=ci(0);function dc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Pp=[];function Lp(){for(var i=0;i<Pp.length;i++)Pp[i]._workInProgressVersionPrimary=null;Pp.length=0}var fc=H.ReactCurrentDispatcher,Dp=H.ReactCurrentBatchConfig,to=0,Et=null,Rt=null,Ut=null,hc=!1,Ya=!1,Wa=0,s9=0;function Jt(){throw Error(n(321))}function Mp(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!Zn(i[l],s[l]))return!1;return!0}function Fp(i,s,l,f,E,b){if(to=b,Et=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,fc.current=i===null||i.memoizedState===null?c9:d9,i=l(f,E),Ya){b=0;do{if(Ya=!1,Wa=0,25<=b)throw Error(n(301));b+=1,Ut=Rt=null,s.updateQueue=null,fc.current=f9,i=l(f,E)}while(Ya)}if(fc.current=gc,s=Rt!==null&&Rt.next!==null,to=0,Ut=Rt=Et=null,hc=!1,s)throw Error(n(300));return i}function Bp(){var i=Wa!==0;return Wa=0,i}function _r(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?Et.memoizedState=Ut=i:Ut=Ut.next=i,Ut}function Hn(){if(Rt===null){var i=Et.alternate;i=i!==null?i.memoizedState:null}else i=Rt.next;var s=Ut===null?Et.memoizedState:Ut.next;if(s!==null)Ut=s,Rt=i;else{if(i===null)throw Error(n(310));Rt=i,i={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},Ut===null?Et.memoizedState=Ut=i:Ut=Ut.next=i}return Ut}function Ga(i,s){return typeof s=="function"?s(i):s}function Up(i){var s=Hn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=Rt,E=f.baseQueue,b=l.pending;if(b!==null){if(E!==null){var w=E.next;E.next=b.next,b.next=w}f.baseQueue=E=b,l.pending=null}if(E!==null){b=E.next,f=f.baseState;var L=w=null,U=null,te=b;do{var de=te.lane;if((to&de)===de)U!==null&&(U=U.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),f=te.hasEagerState?te.eagerState:i(f,te.action);else{var me={lane:de,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};U===null?(L=U=me,w=f):U=U.next=me,Et.lanes|=de,no|=de}te=te.next}while(te!==null&&te!==b);U===null?w=f:U.next=L,Zn(f,s.memoizedState)||(En=!0),s.memoizedState=f,s.baseState=w,s.baseQueue=U,l.lastRenderedState=f}if(i=l.interleaved,i!==null){E=i;do b=E.lane,Et.lanes|=b,no|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Hp(i){var s=Hn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=l.dispatch,E=l.pending,b=s.memoizedState;if(E!==null){l.pending=null;var w=E=E.next;do b=i(b,w.action),w=w.next;while(w!==E);Zn(b,s.memoizedState)||(En=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),l.lastRenderedState=b}return[b,f]}function Mx(){}function Fx(i,s){var l=Et,f=Hn(),E=s(),b=!Zn(f.memoizedState,E);if(b&&(f.memoizedState=E,En=!0),f=f.queue,zp(Hx.bind(null,l,f,i),[i]),f.getSnapshot!==s||b||Ut!==null&&Ut.memoizedState.tag&1){if(l.flags|=2048,Ka(9,Ux.bind(null,l,f,E,s),void 0,null),Ht===null)throw Error(n(349));(to&30)!==0||Bx(l,s,E)}return E}function Bx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Et.updateQueue,s===null?(s={lastEffect:null,stores:null},Et.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function Ux(i,s,l,f){s.value=l,s.getSnapshot=f,zx(s)&&jx(i)}function Hx(i,s,l){return l(function(){zx(s)&&jx(i)})}function zx(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!Zn(i,l)}catch(f){return!0}}function jx(i){var s=Br(i,1);s!==null&&ir(s,i,1,-1)}function $x(i){var s=_r();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ga,lastRenderedState:i},s.queue=i,i=i.dispatch=l9.bind(null,Et,i),[s.memoizedState,i]}function Ka(i,s,l,f){return i={tag:i,create:s,destroy:l,deps:f,next:null},s=Et.updateQueue,s===null?(s={lastEffect:null,stores:null},Et.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(f=l.next,l.next=i,i.next=f,s.lastEffect=i)),i}function Vx(){return Hn().memoizedState}function pc(i,s,l,f){var E=_r();Et.flags|=i,E.memoizedState=Ka(1|s,l,void 0,f===void 0?null:f)}function mc(i,s,l,f){var E=Hn();f=f===void 0?null:f;var b=void 0;if(Rt!==null){var w=Rt.memoizedState;if(b=w.destroy,f!==null&&Mp(f,w.deps)){E.memoizedState=Ka(s,l,b,f);return}}Et.flags|=i,E.memoizedState=Ka(1|s,l,b,f)}function qx(i,s){return pc(8390656,8,i,s)}function zp(i,s){return mc(2048,8,i,s)}function Yx(i,s){return mc(4,2,i,s)}function Wx(i,s){return mc(4,4,i,s)}function Gx(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Kx(i,s,l){return l=l!=null?l.concat([i]):null,mc(4,4,Gx.bind(null,s,i),l)}function jp(){}function Qx(i,s){var l=Hn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Mp(s,f[1])?f[0]:(l.memoizedState=[i,s],i)}function Xx(i,s){var l=Hn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Mp(s,f[1])?f[0]:(i=i(),l.memoizedState=[i,s],i)}function Jx(i,s,l){return(to&21)===0?(i.baseState&&(i.baseState=!1,En=!0),i.memoizedState=l):(Zn(l,s)||(l=kT(),Et.lanes|=l,no|=l,i.baseState=!0),s)}function a9(i,s){var l=nt;nt=l!==0&&4>l?l:4,i(!0);var f=Dp.transition;Dp.transition={};try{i(!1),s()}finally{nt=l,Dp.transition=f}}function Zx(){return Hn().memoizedState}function u9(i,s,l){var f=yi(i);if(l={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null},ew(i))tw(s,l);else if(l=Ix(i,s,l,f),l!==null){var E=on();ir(l,i,f,E),nw(l,s,f)}}function l9(i,s,l){var f=yi(i),E={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null};if(ew(i))tw(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var w=s.lastRenderedState,L=b(w,l);if(E.hasEagerState=!0,E.eagerState=L,Zn(L,w)){var U=s.interleaved;U===null?(E.next=E,Np(s)):(E.next=U.next,U.next=E),s.interleaved=E;return}}catch(te){}l=Ix(i,s,E,f),l!==null&&(E=on(),ir(l,i,f,E),nw(l,s,f))}}function ew(i){var s=i.alternate;return i===Et||s!==null&&s===Et}function tw(i,s){Ya=hc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function nw(i,s,l){if((l&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,Vh(i,l)}}var gc={readContext:Un,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useInsertionEffect:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useSyncExternalStore:Jt,useId:Jt,unstable_isNewReconciler:!1},c9={readContext:Un,useCallback:function(i,s){return _r().memoizedState=[i,s===void 0?null:s],i},useContext:Un,useEffect:qx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,pc(4194308,4,Gx.bind(null,s,i),l)},useLayoutEffect:function(i,s){return pc(4194308,4,i,s)},useInsertionEffect:function(i,s){return pc(4,2,i,s)},useMemo:function(i,s){var l=_r();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var f=_r();return s=l!==void 0?l(s):s,f.memoizedState=f.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},f.queue=i,i=i.dispatch=u9.bind(null,Et,i),[f.memoizedState,i]},useRef:function(i){var s=_r();return i={current:i},s.memoizedState=i},useState:$x,useDebugValue:jp,useDeferredValue:function(i){return _r().memoizedState=i},useTransition:function(){var i=$x(!1),s=i[0];return i=a9.bind(null,i[1]),_r().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var f=Et,E=_r();if(pt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Ht===null)throw Error(n(349));(to&30)!==0||Bx(f,s,l)}E.memoizedState=l;var b={value:l,getSnapshot:s};return E.queue=b,qx(Hx.bind(null,f,b,i),[i]),f.flags|=2048,Ka(9,Ux.bind(null,f,b,l,s),void 0,null),l},useId:function(){var i=_r(),s=Ht.identifierPrefix;if(pt){var l=Fr,f=Mr;l=(f&~(1<<32-Jn(f)-1)).toString(32)+l,s=":"+s+"R"+l,l=Wa++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=s9++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},d9={readContext:Un,useCallback:Qx,useContext:Un,useEffect:zp,useImperativeHandle:Kx,useInsertionEffect:Yx,useLayoutEffect:Wx,useMemo:Xx,useReducer:Up,useRef:Vx,useState:function(){return Up(Ga)},useDebugValue:jp,useDeferredValue:function(i){var s=Hn();return Jx(s,Rt.memoizedState,i)},useTransition:function(){var i=Up(Ga)[0],s=Hn().memoizedState;return[i,s]},useMutableSource:Mx,useSyncExternalStore:Fx,useId:Zx,unstable_isNewReconciler:!1},f9={readContext:Un,useCallback:Qx,useContext:Un,useEffect:zp,useImperativeHandle:Kx,useInsertionEffect:Yx,useLayoutEffect:Wx,useMemo:Xx,useReducer:Hp,useRef:Vx,useState:function(){return Hp(Ga)},useDebugValue:jp,useDeferredValue:function(i){var s=Hn();return Rt===null?s.memoizedState=i:Jx(s,Rt.memoizedState,i)},useTransition:function(){var i=Hp(Ga)[0],s=Hn().memoizedState;return[i,s]},useMutableSource:Mx,useSyncExternalStore:Fx,useId:Zx,unstable_isNewReconciler:!1};function tr(i,s){if(i&&i.defaultProps){s=v({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function $p(i,s,l,f){s=i.memoizedState,l=l(f,s),l=l==null?s:v({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Ec={isMounted:function(i){return(i=i._reactInternals)?Gi(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var f=on(),E=yi(i),b=Ur(f,E);b.payload=s,l!=null&&(b.callback=l),s=pi(i,b,E),s!==null&&(ir(s,i,E,f),lc(s,i,E))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var f=on(),E=yi(i),b=Ur(f,E);b.tag=1,b.payload=s,l!=null&&(b.callback=l),s=pi(i,b,E),s!==null&&(ir(s,i,E,f),lc(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=on(),f=yi(i),E=Ur(l,f);E.tag=2,s!=null&&(E.callback=s),s=pi(i,E,f),s!==null&&(ir(s,i,f,l),lc(s,i,f))}};function rw(i,s,l,f,E,b,w){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,b,w):s.prototype&&s.prototype.isPureReactComponent?!Da(l,f)||!Da(E,b):!0}function iw(i,s,l){var f=!1,E=di,b=s.contextType;return typeof b=="object"&&b!==null?b=Un(b):(E=gn(s)?Qi:Xt.current,f=s.contextTypes,b=(f=f!=null)?ss(i,E):di),s=new s(l,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Ec,i.stateNode=s,s._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function ow(i,s,l,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,f),s.state!==i&&Ec.enqueueReplaceState(s,s.state,null)}function Vp(i,s,l,f){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},Op(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=Un(b):(b=gn(s)?Qi:Xt.current,E.context=ss(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&($p(i,s,b,l),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&Ec.enqueueReplaceState(E,E.state,null),cc(i,l,E,f),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function ps(i,s){try{var l="",f=s;do l+=Re(f),f=f.return;while(f);var E=l}catch(b){E=`
22
22
  Error generating stack: `+b.message+`
23
- `+b.stack}return{value:i,source:s,stack:g,digest:null}}function Vp(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function qp(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var d9=typeof WeakMap=="function"?WeakMap:Map;function s2(i,s,l){l=Ur(-1,l),l.tag=3,l.payload={element:null};var f=s.value;return l.callback=function(){vc||(vc=!0,sm=f),qp(i,s)},l}function a2(i,s,l){l=Ur(-1,l),l.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var g=s.value;l.payload=function(){return f(g)},l.callback=function(){qp(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){qp(i,s),typeof f!="function"&&(gi===null?gi=new Set([this]):gi.add(this));var w=s.stack;this.componentDidCatch(s.value,{componentStack:w!==null?w:""})}),l}function u2(i,s,l){var f=i.pingCache;if(f===null){f=i.pingCache=new d9;var g=new Set;f.set(s,g)}else g=f.get(s),g===void 0&&(g=new Set,f.set(s,g));g.has(l)||(g.add(l),i=S9.bind(null,i,s,l),s.then(i,i))}function l2(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function c2(i,s,l,f,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=Ur(-1,1),s.tag=2,pi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var f9=H.ReactCurrentOwner,En=!1;function rn(i,s,l,f){s.child=i===null?Ox(s,null,l,f):cs(s,i.child,l,f)}function d2(i,s,l,f,g){l=l.render;var b=s.ref;return fs(s,g),f=Mp(i,s,l,f,b,g),l=Fp(),i!==null&&!En?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Hr(i,s,g)):(pt&&l&&bp(s),s.flags|=1,rn(i,s,f,g),s.child)}function f2(i,s,l,f,g){if(i===null){var b=l.type;return typeof b=="function"&&!hm(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=b,h2(i,s,b,f,g)):(i=Oc(l.type,null,f,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(b=i.child,(i.lanes&g)===0){var w=b.memoizedProps;if(l=l.compare,l=l!==null?l:Da,l(w,f)&&i.ref===s.ref)return Hr(i,s,g)}return s.flags|=1,i=Ti(b,f),i.ref=s.ref,i.return=s,s.child=i}function h2(i,s,l,f,g){if(i!==null){var b=i.memoizedProps;if(Da(b,f)&&i.ref===s.ref)if(En=!1,s.pendingProps=f=b,(i.lanes&g)!==0)(i.flags&131072)!==0&&(En=!0);else return s.lanes=i.lanes,Hr(i,s,g)}return Yp(i,s,l,f,g)}function p2(i,s,l){var f=s.pendingProps,g=f.children,b=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ut(gs,Nn),Nn|=l;else{if((l&1073741824)===0)return i=b!==null?b.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ut(gs,Nn),Nn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=b!==null?b.baseLanes:l,ut(gs,Nn),Nn|=f}else b!==null?(f=b.baseLanes|l,s.memoizedState=null):f=l,ut(gs,Nn),Nn|=f;return rn(i,s,g,l),s.child}function m2(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function Yp(i,s,l,f,g){var b=gn(l)?Qi:Xt.current;return b=ss(s,b),fs(s,g),l=Mp(i,s,l,f,b,g),f=Fp(),i!==null&&!En?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Hr(i,s,g)):(pt&&f&&bp(s),s.flags|=1,rn(i,s,l,g),s.child)}function g2(i,s,l,f,g){if(gn(l)){var b=!0;tc(s)}else b=!1;if(fs(s,g),s.stateNode===null)bc(i,s),i2(s,l,f),$p(s,l,f,g),f=!0;else if(i===null){var w=s.stateNode,L=s.memoizedProps;w.props=L;var U=w.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=Un(Z):(Z=gn(l)?Qi:Xt.current,Z=ss(s,Z));var de=l.getDerivedStateFromProps,me=typeof de=="function"||typeof w.getSnapshotBeforeUpdate=="function";me||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(L!==f||U!==Z)&&o2(s,w,f,Z),hi=!1;var ue=s.memoizedState;w.state=ue,cc(s,f,w,g),U=s.memoizedState,L!==f||ue!==U||mn.current||hi?(typeof de=="function"&&(jp(s,l,de,f),U=s.memoizedState),(L=hi||r2(s,l,L,f,ue,U,Z))?(me||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(s.flags|=4194308)):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=U),w.props=f,w.state=U,w.context=Z,f=L):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{w=s.stateNode,Rx(i,s),L=s.memoizedProps,Z=s.type===s.elementType?L:tr(s.type,L),w.props=Z,me=s.pendingProps,ue=w.context,U=l.contextType,typeof U=="object"&&U!==null?U=Un(U):(U=gn(l)?Qi:Xt.current,U=ss(s,U));var we=l.getDerivedStateFromProps;(de=typeof we=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(L!==me||ue!==U)&&o2(s,w,f,U),hi=!1,ue=s.memoizedState,w.state=ue,cc(s,f,w,g);var Se=s.memoizedState;L!==me||ue!==Se||mn.current||hi?(typeof we=="function"&&(jp(s,l,we,f),Se=s.memoizedState),(Z=hi||r2(s,l,Z,f,ue,Se,U)||!1)?(de||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(f,Se,U),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(f,Se,U)),typeof w.componentDidUpdate=="function"&&(s.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof w.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=Se),w.props=f,w.state=Se,w.context=U,f=Z):(typeof w.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),f=!1)}return Wp(i,s,l,f,b,g)}function Wp(i,s,l,f,g,b){m2(i,s);var w=(s.flags&128)!==0;if(!f&&!w)return g&&xx(s,l,!1),Hr(i,s,b);f=s.stateNode,f9.current=s;var L=w&&typeof l.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&w?(s.child=cs(s,i.child,null,b),s.child=cs(s,null,L,b)):rn(i,s,L,b),s.memoizedState=f.state,g&&xx(s,l,!0),s.child}function E2(i){var s=i.stateNode;s.pendingContext?bx(i,s.pendingContext,s.pendingContext!==s.context):s.context&&bx(i,s.context,!1),Op(i,s.containerInfo)}function y2(i,s,l,f,g){return ls(),_p(g),s.flags|=256,rn(i,s,l,f),s.child}var Gp={dehydrated:null,treeContext:null,retryLane:0};function Kp(i){return{baseLanes:i,cachePool:null,transitions:null}}function b2(i,s,l){var f=s.pendingProps,g=gt.current,b=!1,w=(s.flags&128)!==0,L;if((L=w)||(L=i!==null&&i.memoizedState===null?!1:(g&2)!==0),L?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),ut(gt,g&1),i===null)return wp(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(w=f.children,i=f.fallback,b?(f=s.mode,b=s.child,w={mode:"hidden",children:w},(f&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=w):b=Ic(w,f,0,null),i=so(i,f,l,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=Kp(l),s.memoizedState=Gp,i):Qp(s,w));if(g=i.memoizedState,g!==null&&(L=g.dehydrated,L!==null))return h9(i,s,w,f,L,g,l);if(b){b=f.fallback,w=s.mode,g=i.child,L=g.sibling;var U={mode:"hidden",children:f.children};return(w&1)===0&&s.child!==g?(f=s.child,f.childLanes=0,f.pendingProps=U,s.deletions=null):(f=Ti(g,U),f.subtreeFlags=g.subtreeFlags&14680064),L!==null?b=Ti(L,b):(b=so(b,w,l,null),b.flags|=2),b.return=s,f.return=s,f.sibling=b,s.child=f,f=b,b=s.child,w=i.child.memoizedState,w=w===null?Kp(l):{baseLanes:w.baseLanes|l,cachePool:null,transitions:w.transitions},b.memoizedState=w,b.childLanes=i.childLanes&~l,s.memoizedState=Gp,f}return b=i.child,i=b.sibling,f=Ti(b,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=l),f.return=s,f.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=f,s.memoizedState=null,f}function Qp(i,s){return s=Ic({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function yc(i,s,l,f){return f!==null&&_p(f),cs(s,i.child,null,l),i=Qp(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function h9(i,s,l,f,g,b,w){if(l)return s.flags&256?(s.flags&=-257,f=Vp(Error(n(422))),yc(i,s,w,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=f.fallback,g=s.mode,f=Ic({mode:"visible",children:f.children},g,0,null),b=so(b,g,w,null),b.flags|=2,f.return=s,b.return=s,f.sibling=b,s.child=f,(s.mode&1)!==0&&cs(s,i.child,null,w),s.child.memoizedState=Kp(w),s.memoizedState=Gp,b);if((s.mode&1)===0)return yc(i,s,w,null);if(g.data==="$!"){if(f=g.nextSibling&&g.nextSibling.dataset,f)var L=f.dgst;return f=L,b=Error(n(419)),f=Vp(b,f,void 0),yc(i,s,w,f)}if(L=(w&i.childLanes)!==0,En||L){if(f=Ht,f!==null){switch(w&-w){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(f.suspendedLanes|w))!==0?0:g,g!==0&&g!==b.retryLane&&(b.retryLane=g,Br(i,g),ir(f,i,g,-1))}return fm(),f=Vp(Error(n(421))),yc(i,s,w,f)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=A9.bind(null,i),g._reactRetry=s,null):(i=b.treeContext,kn=li(g.nextSibling),Cn=s,pt=!0,er=null,i!==null&&(Fn[Bn++]=Mr,Fn[Bn++]=Fr,Fn[Bn++]=Xi,Mr=i.id,Fr=i.overflow,Xi=s),s=Qp(s,f.children),s.flags|=4096,s)}function T2(i,s,l){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),Cp(i.return,s,l)}function Xp(i,s,l,f,g){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:l,tailMode:g}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=f,b.tail=l,b.tailMode=g)}function x2(i,s,l){var f=s.pendingProps,g=f.revealOrder,b=f.tail;if(rn(i,s,f.children,l),f=gt.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&T2(i,l,s);else if(i.tag===19)T2(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(ut(gt,f),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(l=s.child,g=null;l!==null;)i=l.alternate,i!==null&&dc(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),Xp(s,!1,g,l,b);break;case"backwards":for(l=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&dc(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}Xp(s,!0,l,null,b);break;case"together":Xp(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function bc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Hr(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),no|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Ti(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Ti(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function p9(i,s,l){switch(s.tag){case 3:E2(s),ls();break;case 5:Dx(s);break;case 1:gn(s.type)&&tc(s);break;case 4:Op(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,g=s.memoizedProps.value;ut(ac,f._currentValue),f._currentValue=g;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ut(gt,gt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?b2(i,s,l):(ut(gt,gt.current&1),i=Hr(i,s,l),i!==null?i.sibling:null);ut(gt,gt.current&1);break;case 19:if(f=(l&s.childLanes)!==0,(i.flags&128)!==0){if(f)return x2(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ut(gt,gt.current),f)break;return null;case 22:case 23:return s.lanes=0,p2(i,s,l)}return Hr(i,s,l)}var w2,Jp,_2,v2;w2=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Jp=function(){},_2=function(i,s,l,f){var g=i.memoizedProps;if(g!==f){i=s.stateNode,eo(wr.current);var b=null;switch(l){case"input":g=Xn(i,g),f=Xn(i,f),b=[];break;case"select":g=_({},g,{value:void 0}),f=_({},f,{value:void 0}),b=[];break;case"textarea":g=ba(i,g),f=ba(i,f),b=[];break;default:typeof g.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=Jl)}$t(l,f);var w;l=null;for(Z in g)if(!f.hasOwnProperty(Z)&&g.hasOwnProperty(Z)&&g[Z]!=null)if(Z==="style"){var L=g[Z];for(w in L)L.hasOwnProperty(w)&&(l||(l={}),l[w]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(o.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in f){var U=f[Z];if(L=g!=null?g[Z]:void 0,f.hasOwnProperty(Z)&&U!==L&&(U!=null||L!=null))if(Z==="style")if(L){for(w in L)!L.hasOwnProperty(w)||U&&U.hasOwnProperty(w)||(l||(l={}),l[w]="");for(w in U)U.hasOwnProperty(w)&&L[w]!==U[w]&&(l||(l={}),l[w]=U[w])}else l||(b||(b=[]),b.push(Z,l)),l=U;else Z==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,L=L?L.__html:void 0,U!=null&&L!==U&&(b=b||[]).push(Z,U)):Z==="children"?typeof U!="string"&&typeof U!="number"||(b=b||[]).push(Z,""+U):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(o.hasOwnProperty(Z)?(U!=null&&Z==="onScroll"&&lt("scroll",i),b||L===U||(b=[])):(b=b||[]).push(Z,U))}l&&(b=b||[]).push("style",l);var Z=b;(s.updateQueue=Z)&&(s.flags|=4)}},v2=function(i,s,l,f){l!==f&&(s.flags|=4)};function Qa(i,s){if(!pt)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function Zt(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,f=0;if(s)for(var g=i.child;g!==null;)l|=g.lanes|g.childLanes,f|=g.subtreeFlags&14680064,f|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)l|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=f,i.childLanes=l,s}function m9(i,s,l){var f=s.pendingProps;switch(Tp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(s),null;case 1:return gn(s.type)&&ec(),Zt(s),null;case 3:return f=s.stateNode,hs(),ct(mn),ct(Xt),Pp(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(oc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,er!==null&&(lm(er),er=null))),Jp(i,s),Zt(s),null;case 5:Ip(s);var g=eo(qa.current);if(l=s.type,i!==null&&s.stateNode!=null)_2(i,s,l,f,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return Zt(s),null}if(i=eo(wr.current),oc(s)){f=s.stateNode,l=s.type;var b=s.memoizedProps;switch(f[xr]=s,f[Ha]=b,i=(s.mode&1)!==0,l){case"dialog":lt("cancel",f),lt("close",f);break;case"iframe":case"object":case"embed":lt("load",f);break;case"video":case"audio":for(g=0;g<Fa.length;g++)lt(Fa[g],f);break;case"source":lt("error",f);break;case"img":case"image":case"link":lt("error",f),lt("load",f);break;case"details":lt("toggle",f);break;case"input":Ea(f,b),lt("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!b.multiple},lt("invalid",f);break;case"textarea":kl(f,b),lt("invalid",f)}$t(l,b),g=null;for(var w in b)if(b.hasOwnProperty(w)){var L=b[w];w==="children"?typeof L=="string"?f.textContent!==L&&(b.suppressHydrationWarning!==!0&&Xl(f.textContent,L,i),g=["children",L]):typeof L=="number"&&f.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&Xl(f.textContent,L,i),g=["children",""+L]):o.hasOwnProperty(w)&&L!=null&&w==="onScroll"&&lt("scroll",f)}switch(l){case"input":pn(f),Cl(f,b,!0);break;case"textarea":pn(f),Ol(f);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(f.onclick=Jl)}f=g,s.updateQueue=f,f!==null&&(s.flags|=4)}else{w=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ie(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=w.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=w.createElement(l,{is:f.is}):(i=w.createElement(l),l==="select"&&(w=i,f.multiple?w.multiple=!0:f.size&&(w.size=f.size))):i=w.createElementNS(i,l),i[xr]=s,i[Ha]=f,w2(i,s,!1,!1),s.stateNode=i;e:{switch(w=br(l,f),l){case"dialog":lt("cancel",i),lt("close",i),g=f;break;case"iframe":case"object":case"embed":lt("load",i),g=f;break;case"video":case"audio":for(g=0;g<Fa.length;g++)lt(Fa[g],i);g=f;break;case"source":lt("error",i),g=f;break;case"img":case"image":case"link":lt("error",i),lt("load",i),g=f;break;case"details":lt("toggle",i),g=f;break;case"input":Ea(i,f),g=Xn(i,f),lt("invalid",i);break;case"option":g=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},g=_({},f,{value:void 0}),lt("invalid",i);break;case"textarea":kl(i,f),g=ba(i,f),lt("invalid",i);break;default:g=f}$t(l,g),L=g;for(b in L)if(L.hasOwnProperty(b)){var U=L[b];b==="style"?ni(i,U):b==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Ye(i,U)):b==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Xe(i,U):typeof U=="number"&&Xe(i,""+U):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?U!=null&&b==="onScroll"&&lt("scroll",i):U!=null&&R(i,b,U,w))}switch(l){case"input":pn(i),Cl(i,f,!1);break;case"textarea":pn(i),Ol(i);break;case"option":f.value!=null&&i.setAttribute("value",""+_e(f.value));break;case"select":i.multiple=!!f.multiple,b=f.value,b!=null?ti(i,!!f.multiple,b,!1):f.defaultValue!=null&&ti(i,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=Jl)}switch(l){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Zt(s),null;case 6:if(i&&s.stateNode!=null)v2(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(l=eo(qa.current),eo(wr.current),oc(s)){if(f=s.stateNode,l=s.memoizedProps,f[xr]=s,(b=f.nodeValue!==l)&&(i=Cn,i!==null))switch(i.tag){case 3:Xl(f.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Xl(f.nodeValue,l,(i.mode&1)!==0)}b&&(s.flags|=4)}else f=(l.nodeType===9?l:l.ownerDocument).createTextNode(f),f[xr]=s,s.stateNode=f}return Zt(s),null;case 13:if(ct(gt),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(pt&&kn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Cx(),ls(),s.flags|=98560,b=!1;else if(b=oc(s),f!==null&&f.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[xr]=s}else ls(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Zt(s),b=!1}else er!==null&&(lm(er),er=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(gt.current&1)!==0?Pt===0&&(Pt=3):fm())),s.updateQueue!==null&&(s.flags|=4),Zt(s),null);case 4:return hs(),Jp(i,s),i===null&&Ba(s.stateNode.containerInfo),Zt(s),null;case 10:return Ap(s.type._context),Zt(s),null;case 17:return gn(s.type)&&ec(),Zt(s),null;case 19:if(ct(gt),b=s.memoizedState,b===null)return Zt(s),null;if(f=(s.flags&128)!==0,w=b.rendering,w===null)if(f)Qa(b,!1);else{if(Pt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(w=dc(i),w!==null){for(s.flags|=128,Qa(b,!1),f=w.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=l,l=s.child;l!==null;)b=l,i=f,b.flags&=14680066,w=b.alternate,w===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=w.childLanes,b.lanes=w.lanes,b.child=w.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=w.memoizedProps,b.memoizedState=w.memoizedState,b.updateQueue=w.updateQueue,b.type=w.type,i=w.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return ut(gt,gt.current&1|2),s.child}i=i.sibling}b.tail!==null&&_t()>Es&&(s.flags|=128,f=!0,Qa(b,!1),s.lanes=4194304)}else{if(!f)if(i=dc(w),i!==null){if(s.flags|=128,f=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Qa(b,!0),b.tail===null&&b.tailMode==="hidden"&&!w.alternate&&!pt)return Zt(s),null}else 2*_t()-b.renderingStartTime>Es&&l!==1073741824&&(s.flags|=128,f=!0,Qa(b,!1),s.lanes=4194304);b.isBackwards?(w.sibling=s.child,s.child=w):(l=b.last,l!==null?l.sibling=w:s.child=w,b.last=w)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=_t(),s.sibling=null,l=gt.current,ut(gt,f?l&1|2:l&1),s):(Zt(s),null);case 22:case 23:return dm(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Nn&1073741824)!==0&&(Zt(s),s.subtreeFlags&6&&(s.flags|=8192)):Zt(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function g9(i,s){switch(Tp(s),s.tag){case 1:return gn(s.type)&&ec(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return hs(),ct(mn),ct(Xt),Pp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Ip(s),null;case 13:if(ct(gt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ls()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return ct(gt),null;case 4:return hs(),null;case 10:return Ap(s.type._context),null;case 22:case 23:return dm(),null;case 24:return null;default:return null}}var Tc=!1,en=!1,E9=typeof WeakSet=="function"?WeakSet:Set,ve=null;function ms(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(f){bt(i,s,f)}else l.current=null}function Zp(i,s,l){try{l()}catch(f){bt(i,s,f)}}var S2=!1;function y9(i,s){if(dp=Hl,i=rx(),rp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var g=f.anchorOffset,b=f.focusNode;f=f.focusOffset;try{l.nodeType,b.nodeType}catch(ye){l=null;break e}var w=0,L=-1,U=-1,Z=0,de=0,me=i,ue=null;t:for(;;){for(var we;me!==l||g!==0&&me.nodeType!==3||(L=w+g),me!==b||f!==0&&me.nodeType!==3||(U=w+f),me.nodeType===3&&(w+=me.nodeValue.length),(we=me.firstChild)!==null;)ue=me,me=we;for(;;){if(me===i)break t;if(ue===l&&++Z===g&&(L=w),ue===b&&++de===f&&(U=w),(we=me.nextSibling)!==null)break;me=ue,ue=me.parentNode}me=we}l=L===-1||U===-1?null:{start:L,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(fp={focusedElem:i,selectionRange:l},Hl=!1,ve=s;ve!==null;)if(s=ve,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,ve=i;else for(;ve!==null;){s=ve;try{var Se=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Se!==null){var Ce=Se.memoizedProps,vt=Se.memoizedState,q=s.stateNode,j=q.getSnapshotBeforeUpdate(s.elementType===s.type?Ce:tr(s.type,Ce),vt);q.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var G=s.stateNode.containerInfo;G.nodeType===1?G.textContent="":G.nodeType===9&&G.documentElement&&G.removeChild(G.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){bt(s,s.return,ye)}if(i=s.sibling,i!==null){i.return=s.return,ve=i;break}ve=s.return}return Se=S2,S2=!1,Se}function Xa(i,s,l){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&i)===i){var b=g.destroy;g.destroy=void 0,b!==void 0&&Zp(s,l,b)}g=g.next}while(g!==f)}}function xc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var f=l.create;l.destroy=f()}l=l.next}while(l!==s)}}function em(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function A2(i){var s=i.alternate;s!==null&&(i.alternate=null,A2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[xr],delete s[Ha],delete s[gp],delete s[e9],delete s[t9])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function C2(i){return i.tag===5||i.tag===3||i.tag===4}function k2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||C2(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function tm(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=Jl));else if(f!==4&&(i=i.child,i!==null))for(tm(i,s,l),i=i.sibling;i!==null;)tm(i,s,l),i=i.sibling}function nm(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(nm(i,s,l),i=i.sibling;i!==null;)nm(i,s,l),i=i.sibling}var Vt=null,nr=!1;function mi(i,s,l){for(l=l.child;l!==null;)N2(i,s,l),l=l.sibling}function N2(i,s,l){if(Tr&&typeof Tr.onCommitFiberUnmount=="function")try{Tr.onCommitFiberUnmount(Ll,l)}catch(L){}switch(l.tag){case 5:en||ms(l,s);case 6:var f=Vt,g=nr;Vt=null,mi(i,s,l),Vt=f,nr=g,Vt!==null&&(nr?(i=Vt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Vt.removeChild(l.stateNode));break;case 18:Vt!==null&&(nr?(i=Vt,l=l.stateNode,i.nodeType===8?mp(i.parentNode,l):i.nodeType===1&&mp(i,l),Na(i)):mp(Vt,l.stateNode));break;case 4:f=Vt,g=nr,Vt=l.stateNode.containerInfo,nr=!0,mi(i,s,l),Vt=f,nr=g;break;case 0:case 11:case 14:case 15:if(!en&&(f=l.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){g=f=f.next;do{var b=g,w=b.destroy;b=b.tag,w!==void 0&&((b&2)!==0||(b&4)!==0)&&Zp(l,s,w),g=g.next}while(g!==f)}mi(i,s,l);break;case 1:if(!en&&(ms(l,s),f=l.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=l.memoizedProps,f.state=l.memoizedState,f.componentWillUnmount()}catch(L){bt(l,s,L)}mi(i,s,l);break;case 21:mi(i,s,l);break;case 22:l.mode&1?(en=(f=en)||l.memoizedState!==null,mi(i,s,l),en=f):mi(i,s,l);break;default:mi(i,s,l)}}function O2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new E9),s.forEach(function(f){var g=C9.bind(null,i,f);l.has(f)||(l.add(f),f.then(g,g))})}}function rr(i,s){var l=s.deletions;if(l!==null)for(var f=0;f<l.length;f++){var g=l[f];try{var b=i,w=s,L=w;e:for(;L!==null;){switch(L.tag){case 5:Vt=L.stateNode,nr=!1;break e;case 3:Vt=L.stateNode.containerInfo,nr=!0;break e;case 4:Vt=L.stateNode.containerInfo,nr=!0;break e}L=L.return}if(Vt===null)throw Error(n(160));N2(b,w,g),Vt=null,nr=!1;var U=g.alternate;U!==null&&(U.return=null),g.return=null}catch(Z){bt(g,s,Z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)I2(s,i),s=s.sibling}function I2(i,s){var l=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(rr(s,i),vr(i),f&4){try{Xa(3,i,i.return),xc(3,i)}catch(Ce){bt(i,i.return,Ce)}try{Xa(5,i,i.return)}catch(Ce){bt(i,i.return,Ce)}}break;case 1:rr(s,i),vr(i),f&512&&l!==null&&ms(l,l.return);break;case 5:if(rr(s,i),vr(i),f&512&&l!==null&&ms(l,l.return),i.flags&32){var g=i.stateNode;try{Xe(g,"")}catch(Ce){bt(i,i.return,Ce)}}if(f&4&&(g=i.stateNode,g!=null)){var b=i.memoizedProps,w=l!==null?l.memoizedProps:b,L=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&ya(g,b),br(L,w);var Z=br(L,b);for(w=0;w<U.length;w+=2){var de=U[w],me=U[w+1];de==="style"?ni(g,me):de==="dangerouslySetInnerHTML"?Ye(g,me):de==="children"?Xe(g,me):R(g,de,me,Z)}switch(L){case"input":Wo(g,b);break;case"textarea":Nl(g,b);break;case"select":var ue=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!b.multiple;var we=b.value;we!=null?ti(g,!!b.multiple,we,!1):ue!==!!b.multiple&&(b.defaultValue!=null?ti(g,!!b.multiple,b.defaultValue,!0):ti(g,!!b.multiple,b.multiple?[]:"",!1))}g[Ha]=b}catch(Ce){bt(i,i.return,Ce)}}break;case 6:if(rr(s,i),vr(i),f&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,b=i.memoizedProps;try{g.nodeValue=b}catch(Ce){bt(i,i.return,Ce)}}break;case 3:if(rr(s,i),vr(i),f&4&&l!==null&&l.memoizedState.isDehydrated)try{Na(s.containerInfo)}catch(Ce){bt(i,i.return,Ce)}break;case 4:rr(s,i),vr(i);break;case 13:rr(s,i),vr(i),g=i.child,g.flags&8192&&(b=g.memoizedState!==null,g.stateNode.isHidden=b,!b||g.alternate!==null&&g.alternate.memoizedState!==null||(om=_t())),f&4&&O2(i);break;case 22:if(de=l!==null&&l.memoizedState!==null,i.mode&1?(en=(Z=en)||de,rr(s,i),en=Z):rr(s,i),vr(i),f&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!de&&(i.mode&1)!==0)for(ve=i,de=i.child;de!==null;){for(me=ve=de;ve!==null;){switch(ue=ve,we=ue.child,ue.tag){case 0:case 11:case 14:case 15:Xa(4,ue,ue.return);break;case 1:ms(ue,ue.return);var Se=ue.stateNode;if(typeof Se.componentWillUnmount=="function"){f=ue,l=ue.return;try{s=f,Se.props=s.memoizedProps,Se.state=s.memoizedState,Se.componentWillUnmount()}catch(Ce){bt(f,l,Ce)}}break;case 5:ms(ue,ue.return);break;case 22:if(ue.memoizedState!==null){L2(me);continue}}we!==null?(we.return=ue,ve=we):L2(me)}de=de.sibling}e:for(de=null,me=i;;){if(me.tag===5){if(de===null){de=me;try{g=me.stateNode,Z?(b=g.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=me.stateNode,U=me.memoizedProps.style,w=U!=null&&U.hasOwnProperty("display")?U.display:null,L.style.display=Mn("display",w))}catch(Ce){bt(i,i.return,Ce)}}}else if(me.tag===6){if(de===null)try{me.stateNode.nodeValue=Z?"":me.memoizedProps}catch(Ce){bt(i,i.return,Ce)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===i)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===i)break e;for(;me.sibling===null;){if(me.return===null||me.return===i)break e;de===me&&(de=null),me=me.return}de===me&&(de=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:rr(s,i),vr(i),f&4&&O2(i);break;case 21:break;default:rr(s,i),vr(i)}}function vr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(C2(l)){var f=l;break e}l=l.return}throw Error(n(160))}switch(f.tag){case 5:var g=f.stateNode;f.flags&32&&(Xe(g,""),f.flags&=-33);var b=k2(i);nm(i,b,g);break;case 3:case 4:var w=f.stateNode.containerInfo,L=k2(i);tm(i,L,w);break;default:throw Error(n(161))}}catch(U){bt(i,i.return,U)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function b9(i,s,l){ve=i,R2(i)}function R2(i,s,l){for(var f=(i.mode&1)!==0;ve!==null;){var g=ve,b=g.child;if(g.tag===22&&f){var w=g.memoizedState!==null||Tc;if(!w){var L=g.alternate,U=L!==null&&L.memoizedState!==null||en;L=Tc;var Z=en;if(Tc=w,(en=U)&&!Z)for(ve=g;ve!==null;)w=ve,U=w.child,w.tag===22&&w.memoizedState!==null?D2(g):U!==null?(U.return=w,ve=U):D2(g);for(;b!==null;)ve=b,R2(b),b=b.sibling;ve=g,Tc=L,en=Z}P2(i)}else(g.subtreeFlags&8772)!==0&&b!==null?(b.return=g,ve=b):P2(i)}}function P2(i){for(;ve!==null;){var s=ve;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:en||xc(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!en)if(l===null)f.componentDidMount();else{var g=s.elementType===s.type?l.memoizedProps:tr(s.type,l.memoizedProps);f.componentDidUpdate(g,l.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&Lx(s,b,f);break;case 3:var w=s.updateQueue;if(w!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}Lx(s,w,l)}break;case 5:var L=s.stateNode;if(l===null&&s.flags&4){l=L;var U=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&l.focus();break;case"img":U.src&&(l.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Z=s.alternate;if(Z!==null){var de=Z.memoizedState;if(de!==null){var me=de.dehydrated;me!==null&&Na(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}en||s.flags&512&&em(s)}catch(ue){bt(s,s.return,ue)}}if(s===i){ve=null;break}if(l=s.sibling,l!==null){l.return=s.return,ve=l;break}ve=s.return}}function L2(i){for(;ve!==null;){var s=ve;if(s===i){ve=null;break}var l=s.sibling;if(l!==null){l.return=s.return,ve=l;break}ve=s.return}}function D2(i){for(;ve!==null;){var s=ve;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{xc(4,s)}catch(U){bt(s,l,U)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var g=s.return;try{f.componentDidMount()}catch(U){bt(s,g,U)}}var b=s.return;try{em(s)}catch(U){bt(s,b,U)}break;case 5:var w=s.return;try{em(s)}catch(U){bt(s,w,U)}}}catch(U){bt(s,s.return,U)}if(s===i){ve=null;break}var L=s.sibling;if(L!==null){L.return=s.return,ve=L;break}ve=s.return}}var T9=Math.ceil,wc=H.ReactCurrentDispatcher,rm=H.ReactCurrentOwner,zn=H.ReactCurrentBatchConfig,Je=0,Ht=null,kt=null,qt=0,Nn=0,gs=ci(0),Pt=0,Ja=null,no=0,_c=0,im=0,Za=null,yn=null,om=0,Es=1/0,zr=null,vc=!1,sm=null,gi=null,Sc=!1,Ei=null,Ac=0,eu=0,am=null,Cc=-1,kc=0;function on(){return(Je&6)!==0?_t():Cc!==-1?Cc:Cc=_t()}function yi(i){return(i.mode&1)===0?1:(Je&2)!==0&&qt!==0?qt&-qt:r9.transition!==null?(kc===0&&(kc=kT()),kc):(i=nt,i!==0||(i=window.event,i=i===void 0?16:FT(i.type)),i)}function ir(i,s,l,f){if(50<eu)throw eu=0,am=null,Error(n(185));va(i,l,f),((Je&2)===0||i!==Ht)&&(i===Ht&&((Je&2)===0&&(_c|=l),Pt===4&&bi(i,qt)),bn(i,f),l===1&&Je===0&&(s.mode&1)===0&&(Es=_t()+500,nc&&fi()))}function bn(i,s){var l=i.callbackNode;rM(i,s);var f=Fl(i,i===Ht?qt:0);if(f===0)l!==null&&ST(l),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(l!=null&&ST(l),s===1)i.tag===0?n9(F2.bind(null,i)):wx(F2.bind(null,i)),JM(function(){(Je&6)===0&&fi()}),l=null;else{switch(NT(f)){case 1:l=Hh;break;case 4:l=AT;break;case 16:l=Pl;break;case 536870912:l=CT;break;default:l=Pl}l=q2(l,M2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function M2(i,s){if(Cc=-1,kc=0,(Je&6)!==0)throw Error(n(327));var l=i.callbackNode;if(ys()&&i.callbackNode!==l)return null;var f=Fl(i,i===Ht?qt:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=Nc(i,f);else{s=f;var g=Je;Je|=2;var b=U2();(Ht!==i||qt!==s)&&(zr=null,Es=_t()+500,io(i,s));do try{_9();break}catch(L){B2(i,L)}while(!0);Sp(),wc.current=b,Je=g,kt!==null?s=0:(Ht=null,qt=0,s=Pt)}if(s!==0){if(s===2&&(g=zh(i),g!==0&&(f=g,s=um(i,g))),s===1)throw l=Ja,io(i,0),bi(i,f),bn(i,_t()),l;if(s===6)bi(i,f);else{if(g=i.current.alternate,(f&30)===0&&!x9(g)&&(s=Nc(i,f),s===2&&(b=zh(i),b!==0&&(f=b,s=um(i,b))),s===1))throw l=Ja,io(i,0),bi(i,f),bn(i,_t()),l;switch(i.finishedWork=g,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:oo(i,yn,zr);break;case 3:if(bi(i,f),(f&130023424)===f&&(s=om+500-_t(),10<s)){if(Fl(i,0)!==0)break;if(g=i.suspendedLanes,(g&f)!==f){on(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=pp(oo.bind(null,i,yn,zr),s);break}oo(i,yn,zr);break;case 4:if(bi(i,f),(f&4194240)===f)break;for(s=i.eventTimes,g=-1;0<f;){var w=31-Jn(f);b=1<<w,w=s[w],w>g&&(g=w),f&=~b}if(f=g,f=_t()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*T9(f/1960))-f,10<f){i.timeoutHandle=pp(oo.bind(null,i,yn,zr),f);break}oo(i,yn,zr);break;case 5:oo(i,yn,zr);break;default:throw Error(n(329))}}}return bn(i,_t()),i.callbackNode===l?M2.bind(null,i):null}function um(i,s){var l=Za;return i.current.memoizedState.isDehydrated&&(io(i,s).flags|=256),i=Nc(i,s),i!==2&&(s=yn,yn=l,s!==null&&lm(s)),i}function lm(i){yn===null?yn=i:yn.push.apply(yn,i)}function x9(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var f=0;f<l.length;f++){var g=l[f],b=g.getSnapshot;g=g.value;try{if(!Zn(b(),g))return!1}catch(w){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function bi(i,s){for(s&=~im,s&=~_c,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-Jn(s),f=1<<l;i[l]=-1,s&=~f}}function F2(i){if((Je&6)!==0)throw Error(n(327));ys();var s=Fl(i,0);if((s&1)===0)return bn(i,_t()),null;var l=Nc(i,s);if(i.tag!==0&&l===2){var f=zh(i);f!==0&&(s=f,l=um(i,f))}if(l===1)throw l=Ja,io(i,0),bi(i,s),bn(i,_t()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,oo(i,yn,zr),bn(i,_t()),null}function cm(i,s){var l=Je;Je|=1;try{return i(s)}finally{Je=l,Je===0&&(Es=_t()+500,nc&&fi())}}function ro(i){Ei!==null&&Ei.tag===0&&(Je&6)===0&&ys();var s=Je;Je|=1;var l=zn.transition,f=nt;try{if(zn.transition=null,nt=1,i)return i()}finally{nt=f,zn.transition=l,Je=s,(Je&6)===0&&fi()}}function dm(){Nn=gs.current,ct(gs)}function io(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,XM(l)),kt!==null)for(l=kt.return;l!==null;){var f=l;switch(Tp(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&ec();break;case 3:hs(),ct(mn),ct(Xt),Pp();break;case 5:Ip(f);break;case 4:hs();break;case 13:ct(gt);break;case 19:ct(gt);break;case 10:Ap(f.type._context);break;case 22:case 23:dm()}l=l.return}if(Ht=i,kt=i=Ti(i.current,null),qt=Nn=s,Pt=0,Ja=null,im=_c=no=0,yn=Za=null,Zi!==null){for(s=0;s<Zi.length;s++)if(l=Zi[s],f=l.interleaved,f!==null){l.interleaved=null;var g=f.next,b=l.pending;if(b!==null){var w=b.next;b.next=g,f.next=w}l.pending=f}Zi=null}return i}function B2(i,s){do{var l=kt;try{if(Sp(),fc.current=gc,hc){for(var f=Et.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}hc=!1}if(to=0,Ut=Rt=Et=null,Ya=!1,Wa=0,rm.current=null,l===null||l.return===null){Pt=1,Ja=s,kt=null;break}e:{var b=i,w=l.return,L=l,U=s;if(s=qt,L.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var Z=U,de=L,me=de.tag;if((de.mode&1)===0&&(me===0||me===11||me===15)){var ue=de.alternate;ue?(de.updateQueue=ue.updateQueue,de.memoizedState=ue.memoizedState,de.lanes=ue.lanes):(de.updateQueue=null,de.memoizedState=null)}var we=l2(w);if(we!==null){we.flags&=-257,c2(we,w,L,b,s),we.mode&1&&u2(b,Z,s),s=we,U=Z;var Se=s.updateQueue;if(Se===null){var Ce=new Set;Ce.add(U),s.updateQueue=Ce}else Se.add(U);break e}else{if((s&1)===0){u2(b,Z,s),fm();break e}U=Error(n(426))}}else if(pt&&L.mode&1){var vt=l2(w);if(vt!==null){(vt.flags&65536)===0&&(vt.flags|=256),c2(vt,w,L,b,s),_p(ps(U,L));break e}}b=U=ps(U,L),Pt!==4&&(Pt=2),Za===null?Za=[b]:Za.push(b),b=w;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var q=s2(b,U,s);Px(b,q);break e;case 1:L=U;var j=b.type,G=b.stateNode;if((b.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||G!==null&&typeof G.componentDidCatch=="function"&&(gi===null||!gi.has(G)))){b.flags|=65536,s&=-s,b.lanes|=s;var ye=a2(b,L,s);Px(b,ye);break e}}b=b.return}while(b!==null)}z2(l)}catch(Ne){s=Ne,kt===l&&l!==null&&(kt=l=l.return);continue}break}while(!0)}function U2(){var i=wc.current;return wc.current=gc,i===null?gc:i}function fm(){(Pt===0||Pt===3||Pt===2)&&(Pt=4),Ht===null||(no&268435455)===0&&(_c&268435455)===0||bi(Ht,qt)}function Nc(i,s){var l=Je;Je|=2;var f=U2();(Ht!==i||qt!==s)&&(zr=null,io(i,s));do try{w9();break}catch(g){B2(i,g)}while(!0);if(Sp(),Je=l,wc.current=f,kt!==null)throw Error(n(261));return Ht=null,qt=0,Pt}function w9(){for(;kt!==null;)H2(kt)}function _9(){for(;kt!==null&&!G8();)H2(kt)}function H2(i){var s=V2(i.alternate,i,Nn);i.memoizedProps=i.pendingProps,s===null?z2(i):kt=s,rm.current=null}function z2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=m9(l,s,Nn),l!==null){kt=l;return}}else{if(l=g9(l,s),l!==null){l.flags&=32767,kt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Pt=6,kt=null;return}}if(s=s.sibling,s!==null){kt=s;return}kt=s=i}while(s!==null);Pt===0&&(Pt=5)}function oo(i,s,l){var f=nt,g=zn.transition;try{zn.transition=null,nt=1,v9(i,s,l,f)}finally{zn.transition=g,nt=f}return null}function v9(i,s,l,f){do ys();while(Ei!==null);if((Je&6)!==0)throw Error(n(327));l=i.finishedWork;var g=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=l.lanes|l.childLanes;if(iM(i,b),i===Ht&&(kt=Ht=null,qt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Sc||(Sc=!0,q2(Pl,function(){return ys(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=zn.transition,zn.transition=null;var w=nt;nt=1;var L=Je;Je|=4,rm.current=null,y9(i,l),I2(l,i),VM(fp),Hl=!!dp,fp=dp=null,i.current=l,b9(l),K8(),Je=L,nt=w,zn.transition=b}else i.current=l;if(Sc&&(Sc=!1,Ei=i,Ac=g),b=i.pendingLanes,b===0&&(gi=null),J8(l.stateNode),bn(i,_t()),s!==null)for(f=i.onRecoverableError,l=0;l<s.length;l++)g=s[l],f(g.value,{componentStack:g.stack,digest:g.digest});if(vc)throw vc=!1,i=sm,sm=null,i;return(Ac&1)!==0&&i.tag!==0&&ys(),b=i.pendingLanes,(b&1)!==0?i===am?eu++:(eu=0,am=i):eu=0,fi(),null}function ys(){if(Ei!==null){var i=NT(Ac),s=zn.transition,l=nt;try{if(zn.transition=null,nt=16>i?16:i,Ei===null)var f=!1;else{if(i=Ei,Ei=null,Ac=0,(Je&6)!==0)throw Error(n(331));var g=Je;for(Je|=4,ve=i.current;ve!==null;){var b=ve,w=b.child;if((ve.flags&16)!==0){var L=b.deletions;if(L!==null){for(var U=0;U<L.length;U++){var Z=L[U];for(ve=Z;ve!==null;){var de=ve;switch(de.tag){case 0:case 11:case 15:Xa(8,de,b)}var me=de.child;if(me!==null)me.return=de,ve=me;else for(;ve!==null;){de=ve;var ue=de.sibling,we=de.return;if(A2(de),de===Z){ve=null;break}if(ue!==null){ue.return=we,ve=ue;break}ve=we}}}var Se=b.alternate;if(Se!==null){var Ce=Se.child;if(Ce!==null){Se.child=null;do{var vt=Ce.sibling;Ce.sibling=null,Ce=vt}while(Ce!==null)}}ve=b}}if((b.subtreeFlags&2064)!==0&&w!==null)w.return=b,ve=w;else e:for(;ve!==null;){if(b=ve,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Xa(9,b,b.return)}var q=b.sibling;if(q!==null){q.return=b.return,ve=q;break e}ve=b.return}}var j=i.current;for(ve=j;ve!==null;){w=ve;var G=w.child;if((w.subtreeFlags&2064)!==0&&G!==null)G.return=w,ve=G;else e:for(w=j;ve!==null;){if(L=ve,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:xc(9,L)}}catch(Ne){bt(L,L.return,Ne)}if(L===w){ve=null;break e}var ye=L.sibling;if(ye!==null){ye.return=L.return,ve=ye;break e}ve=L.return}}if(Je=g,fi(),Tr&&typeof Tr.onPostCommitFiberRoot=="function")try{Tr.onPostCommitFiberRoot(Ll,i)}catch(Ne){}f=!0}return f}finally{nt=l,zn.transition=s}}return!1}function j2(i,s,l){s=ps(l,s),s=s2(i,s,1),i=pi(i,s,1),s=on(),i!==null&&(va(i,1,s),bn(i,s))}function bt(i,s,l){if(i.tag===3)j2(i,i,l);else for(;s!==null;){if(s.tag===3){j2(s,i,l);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(gi===null||!gi.has(f))){i=ps(l,i),i=a2(s,i,1),s=pi(s,i,1),i=on(),s!==null&&(va(s,1,i),bn(s,i));break}}s=s.return}}function S9(i,s,l){var f=i.pingCache;f!==null&&f.delete(s),s=on(),i.pingedLanes|=i.suspendedLanes&l,Ht===i&&(qt&l)===l&&(Pt===4||Pt===3&&(qt&130023424)===qt&&500>_t()-om?io(i,0):im|=l),bn(i,s)}function $2(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ml,Ml<<=1,(Ml&130023424)===0&&(Ml=4194304)));var l=on();i=Br(i,s),i!==null&&(va(i,s,l),bn(i,l))}function A9(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),$2(i,l)}function C9(i,s){var l=0;switch(i.tag){case 13:var f=i.stateNode,g=i.memoizedState;g!==null&&(l=g.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),$2(i,l)}var V2;V2=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||mn.current)En=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return En=!1,p9(i,s,l);En=(i.flags&131072)!==0}else En=!1,pt&&(s.flags&1048576)!==0&&_x(s,ic,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;bc(i,s),i=s.pendingProps;var g=ss(s,Xt.current);fs(s,l),g=Mp(null,s,f,i,g,l);var b=Fp();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,gn(f)?(b=!0,tc(s)):b=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Np(s),g.updater=Ec,s.stateNode=g,g._reactInternals=s,$p(s,f,i,l),s=Wp(null,s,f,!0,b,l)):(s.tag=0,pt&&b&&bp(s),rn(null,s,g,l),s=s.child),s;case 16:f=s.elementType;e:{switch(bc(i,s),i=s.pendingProps,g=f._init,f=g(f._payload),s.type=f,g=s.tag=N9(f),i=tr(f,i),g){case 0:s=Yp(null,s,f,i,l);break e;case 1:s=g2(null,s,f,i,l);break e;case 11:s=d2(null,s,f,i,l);break e;case 14:s=f2(null,s,f,tr(f.type,i),l);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:tr(f,g),Yp(i,s,f,g,l);case 1:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:tr(f,g),g2(i,s,f,g,l);case 3:e:{if(E2(s),i===null)throw Error(n(387));f=s.pendingProps,b=s.memoizedState,g=b.element,Rx(i,s),cc(s,f,null,l);var w=s.memoizedState;if(f=w.element,b.isDehydrated)if(b={element:f,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){g=ps(Error(n(423)),s),s=y2(i,s,f,l,g);break e}else if(f!==g){g=ps(Error(n(424)),s),s=y2(i,s,f,l,g);break e}else for(kn=li(s.stateNode.containerInfo.firstChild),Cn=s,pt=!0,er=null,l=Ox(s,null,f,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ls(),f===g){s=Hr(i,s,l);break e}rn(i,s,f,l)}s=s.child}return s;case 5:return Dx(s),i===null&&wp(s),f=s.type,g=s.pendingProps,b=i!==null?i.memoizedProps:null,w=g.children,hp(f,g)?w=null:b!==null&&hp(f,b)&&(s.flags|=32),m2(i,s),rn(i,s,w,l),s.child;case 6:return i===null&&wp(s),null;case 13:return b2(i,s,l);case 4:return Op(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=cs(s,null,f,l):rn(i,s,f,l),s.child;case 11:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:tr(f,g),d2(i,s,f,g,l);case 7:return rn(i,s,s.pendingProps,l),s.child;case 8:return rn(i,s,s.pendingProps.children,l),s.child;case 12:return rn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(f=s.type._context,g=s.pendingProps,b=s.memoizedProps,w=g.value,ut(ac,f._currentValue),f._currentValue=w,b!==null)if(Zn(b.value,w)){if(b.children===g.children&&!mn.current){s=Hr(i,s,l);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var L=b.dependencies;if(L!==null){w=b.child;for(var U=L.firstContext;U!==null;){if(U.context===f){if(b.tag===1){U=Ur(-1,l&-l),U.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var de=Z.pending;de===null?U.next=U:(U.next=de.next,de.next=U),Z.pending=U}}b.lanes|=l,U=b.alternate,U!==null&&(U.lanes|=l),Cp(b.return,l,s),L.lanes|=l;break}U=U.next}}else if(b.tag===10)w=b.type===s.type?null:b.child;else if(b.tag===18){if(w=b.return,w===null)throw Error(n(341));w.lanes|=l,L=w.alternate,L!==null&&(L.lanes|=l),Cp(w,l,s),w=b.sibling}else w=b.child;if(w!==null)w.return=b;else for(w=b;w!==null;){if(w===s){w=null;break}if(b=w.sibling,b!==null){b.return=w.return,w=b;break}w=w.return}b=w}rn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,f=s.pendingProps.children,fs(s,l),g=Un(g),f=f(g),s.flags|=1,rn(i,s,f,l),s.child;case 14:return f=s.type,g=tr(f,s.pendingProps),g=tr(f.type,g),f2(i,s,f,g,l);case 15:return h2(i,s,s.type,s.pendingProps,l);case 17:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:tr(f,g),bc(i,s),s.tag=1,gn(f)?(i=!0,tc(s)):i=!1,fs(s,l),i2(s,f,g),$p(s,f,g,l),Wp(null,s,f,!0,i,l);case 19:return x2(i,s,l);case 22:return p2(i,s,l)}throw Error(n(156,s.tag))};function q2(i,s){return vT(i,s)}function k9(i,s,l,f){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jn(i,s,l,f){return new k9(i,s,l,f)}function hm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function N9(i){if(typeof i=="function")return hm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===se)return 11;if(i===fe)return 14}return 2}function Ti(i,s){var l=i.alternate;return l===null?(l=jn(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Oc(i,s,l,f,g,b){var w=2;if(f=i,typeof i=="function")hm(i)&&(w=1);else if(typeof i=="string")w=5;else e:switch(i){case K:return so(l.children,g,b,s);case ce:w=8,g|=8;break;case be:return i=jn(12,l,s,g|2),i.elementType=be,i.lanes=b,i;case te:return i=jn(13,l,s,g),i.elementType=te,i.lanes=b,i;case re:return i=jn(19,l,s,g),i.elementType=re,i.lanes=b,i;case he:return Ic(l,g,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case z:w=10;break e;case ee:w=9;break e;case se:w=11;break e;case fe:w=14;break e;case ke:w=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=jn(w,l,s,g),s.elementType=i,s.type=f,s.lanes=b,s}function so(i,s,l,f){return i=jn(7,i,f,s),i.lanes=l,i}function Ic(i,s,l,f){return i=jn(22,i,f,s),i.elementType=he,i.lanes=l,i.stateNode={isHidden:!1},i}function pm(i,s,l){return i=jn(6,i,null,s),i.lanes=l,i}function mm(i,s,l){return s=jn(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function O9(i,s,l,f,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jh(0),this.expirationTimes=jh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jh(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function gm(i,s,l,f,g,b,w,L,U){return i=new O9(i,s,l,L,U),s===1?(s=1,b===!0&&(s|=8)):s=0,b=jn(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:f,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Np(b),i}function I9(i,s,l){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:f==null?null:""+f,children:i,containerInfo:s,implementation:l}}function Y2(i){if(!i)return di;i=i._reactInternals;e:{if(Gi(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(gn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(gn(l))return Tx(i,l,s)}return s}function W2(i,s,l,f,g,b,w,L,U){return i=gm(l,f,!0,i,g,b,w,L,U),i.context=Y2(null),l=i.current,f=on(),g=yi(l),b=Ur(f,g),b.callback=s!=null?s:null,pi(l,b,g),i.current.lanes=g,va(i,g,f),bn(i,f),i}function Rc(i,s,l,f){var g=s.current,b=on(),w=yi(g);return l=Y2(l),s.context===null?s.context=l:s.pendingContext=l,s=Ur(b,w),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=pi(g,s,w),i!==null&&(ir(i,g,w,b),lc(i,g,w)),w}function Pc(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function G2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function Em(i,s){G2(i,s),(i=i.alternate)&&G2(i,s)}function R9(){return null}var K2=typeof reportError=="function"?reportError:function(i){console.error(i)};function ym(i){this._internalRoot=i}Lc.prototype.render=ym.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Rc(i,s,null,null)},Lc.prototype.unmount=ym.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;ro(function(){Rc(null,i,null,null)}),s[Lr]=null}};function Lc(i){this._internalRoot=i}Lc.prototype.unstable_scheduleHydration=function(i){if(i){var s=RT();i={blockedOn:null,target:i,priority:s};for(var l=0;l<si.length&&s!==0&&s<si[l].priority;l++);si.splice(l,0,i),l===0&&DT(i)}};function bm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Dc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Q2(){}function P9(i,s,l,f,g){if(g){if(typeof f=="function"){var b=f;f=function(){var Z=Pc(w);b.call(Z)}}var w=W2(s,f,i,0,null,!1,!1,"",Q2);return i._reactRootContainer=w,i[Lr]=w.current,Ba(i.nodeType===8?i.parentNode:i),ro(),w}for(;g=i.lastChild;)i.removeChild(g);if(typeof f=="function"){var L=f;f=function(){var Z=Pc(U);L.call(Z)}}var U=gm(i,0,!1,null,null,!1,!1,"",Q2);return i._reactRootContainer=U,i[Lr]=U.current,Ba(i.nodeType===8?i.parentNode:i),ro(function(){Rc(s,U,l,f)}),U}function Mc(i,s,l,f,g){var b=l._reactRootContainer;if(b){var w=b;if(typeof g=="function"){var L=g;g=function(){var U=Pc(w);L.call(U)}}Rc(s,w,i,g)}else w=P9(l,s,i,g,f);return Pc(w)}OT=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=_a(s.pendingLanes);l!==0&&($h(s,l|1),bn(s,_t()),(Je&6)===0&&(Es=_t()+500,fi()))}break;case 13:ro(function(){var f=Br(i,1);if(f!==null){var g=on();ir(f,i,1,g)}}),Em(i,1)}},Vh=function(i){if(i.tag===13){var s=Br(i,134217728);if(s!==null){var l=on();ir(s,i,134217728,l)}Em(i,134217728)}},IT=function(i){if(i.tag===13){var s=yi(i),l=Br(i,s);if(l!==null){var f=on();ir(l,i,s,f)}Em(i,s)}},RT=function(){return nt},PT=function(i,s){var l=nt;try{return nt=i,s()}finally{nt=l}},Mh=function(i,s,l){switch(s){case"input":if(Wo(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var f=l[s];if(f!==i&&f.form===i.form){var g=Zl(f);if(!g)throw Error(n(90));Yi(f),Wo(f,g)}}}break;case"textarea":Nl(i,l);break;case"select":s=l.value,s!=null&&ti(i,!!l.multiple,s,!1)}},ET=cm,yT=ro;var L9={usingClientEntryPoint:!1,Events:[za,is,Zl,mT,gT,cm]},tu={findFiberByHostInstance:Ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},D9={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:H.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=wT(i),i===null?null:i.stateNode},findFiberByHostInstance:tu.findFiberByHostInstance||R9,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var Fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fc.isDisabled&&Fc.supportsFiber)try{Ll=Fc.inject(D9),Tr=Fc}catch(i){}}return ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L9,ln.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bm(s))throw Error(n(200));return I9(i,s,null,l)},ln.createRoot=function(i,s){if(!bm(i))throw Error(n(299));var l=!1,f="",g=K2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=gm(i,1,!1,null,null,l,!1,f,g),i[Lr]=s.current,Ba(i.nodeType===8?i.parentNode:i),new ym(s)},ln.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=wT(s),i=i===null?null:i.stateNode,i},ln.flushSync=function(i){return ro(i)},ln.hydrate=function(i,s,l){if(!Dc(s))throw Error(n(200));return Mc(null,i,s,!0,l)},ln.hydrateRoot=function(i,s,l){if(!bm(i))throw Error(n(405));var f=l!=null&&l.hydratedSources||null,g=!1,b="",w=K2;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),s=W2(s,null,i,1,l!=null?l:null,g,!1,b,w),i[Lr]=s.current,Ba(i),f)for(i=0;i<f.length;i++)l=f[i],g=l._getVersion,g=g(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,g]:s.mutableSourceEagerHydrationData.push(l,g);return new Lc(s)},ln.render=function(i,s,l){if(!Dc(s))throw Error(n(200));return Mc(null,i,s,!1,l)},ln.unmountComponentAtNode=function(i){if(!Dc(i))throw Error(n(40));return i._reactRootContainer?(ro(function(){Mc(null,null,i,!1,function(){i._reactRootContainer=null,i[Lr]=null})}),!0):!1},ln.unstable_batchedUpdates=cm,ln.unstable_renderSubtreeIntoContainer=function(i,s,l,f){if(!Dc(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Mc(i,s,l,!1,f)},ln.version="18.3.1-next-f1338f8080-20240426",ln}var M0;function F0(){if(M0)return vd.exports;M0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),vd.exports=CS(),vd.exports}var Os=F0();function B0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=B0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=B0(e))&&(r&&(r+=" "),r+=t);return r}var U0={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},H0=wi.createContext&&wi.createContext(U0),kS=["attr","size","title"];function NS(e,t){if(e==null)return{};var n=OS(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OS(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Au(){return Au=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Au.apply(this,arguments)}function z0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Cu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z0(Object(n),!0).forEach(function(r){IS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IS(e,t,n){return t=RS(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RS(e){var t=PS(e,"string");return typeof t=="symbol"?t:t+""}function PS(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function j0(e){return e&&e.map((t,n)=>wi.createElement(t.tag,Cu({key:n},t.attr),j0(t.child)))}function mt(e){return t=>wi.createElement(LS,Au({attr:Cu({},e.attr)},t),j0(e.child))}function LS(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=NS(e,kS),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),wi.createElement("svg",Au({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Cu(Cu({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&wi.createElement("title",null,a),e.children)};return H0!==void 0?wi.createElement(H0.Consumer,null,n=>t(n)):t(U0)}function DS(e){return mt({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function MS(e){return mt({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function FS(e){return mt({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const ar=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:S.jsx("button",{className:$(e,`${B}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?S.jsx("img",{className:$(`${B}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),BS="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",US=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=Nt(),o=r==="messaging",a=o?"Open Commerce Client":"Open Copilot",u=o?S.jsx(FS,{className:$(t,`${B}-minimized-icon`)}):S.jsx("img",{src:(n==null?void 0:n.logoUrl)||BS,alt:"Copilot",className:$(t,`${B}-minimized-icon-img`)});return S.jsx(ar,{className:$(t,`${B}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},HS=()=>{const{globalClassName:e,themeVariables:t}=Nt(),n=()=>{vu(!1),Ci(!0)};return Os.createPortal(S.jsx("div",{className:$(e,`${B}-minimized-container`),style:t,children:S.jsx(US,{onClick:n})}),document.body)};function zS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function Ar(){const e=J.useContext(A0);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const jS=e=>({[`${Sr}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Sr}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem"});function $0(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function $S(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function V0(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function VS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function qS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function YS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function WS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function GS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function KS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function q0(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}const ku=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>S.jsx("button",{className:$(`${B}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),QS=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?S.jsx("img",{className:$(`${B}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):S.jsx(V0,{size:"16px"})},XS=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return S.jsx(ar,{className:$(e,n,`cim-${r}-component`,`${B}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:S.jsx(V0,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return S.jsxs(ku,{className:$(e,n,`cim-${r}-component`,`${B}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&S.jsx(QS,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function fF(){}function hF(){}function Y0(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function W0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const JS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ZS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eA={};function G0(e,t){return(eA.jsx?ZS:JS).test(e)}const tA=/[ \t\n\f\r]/g;function nA(e){return typeof e=="object"?e.type==="text"?K0(e.value):!1:K0(e)}function K0(e){return e.replace(tA,"")===""}let Is=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Is.prototype.normal={},Is.prototype.property={},Is.prototype.space=void 0;function Q0(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Is(n,r,t)}function Rs(e){return e.toLowerCase()}let cn=class{constructor(t,n){this.attribute=n,this.property=t}};cn.prototype.attribute="",cn.prototype.booleanish=!1,cn.prototype.boolean=!1,cn.prototype.commaOrSpaceSeparated=!1,cn.prototype.commaSeparated=!1,cn.prototype.defined=!1,cn.prototype.mustUseProperty=!1,cn.prototype.number=!1,cn.prototype.overloadedBoolean=!1,cn.prototype.property="",cn.prototype.spaceSeparated=!1,cn.prototype.space=void 0;let rA=0;const je=Ni(),At=Ni(),Cd=Ni(),ge=Ni(),st=Ni(),po=Ni(),Tn=Ni();function Ni(){return nu(2,++rA)}const kd=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:At,commaOrSpaceSeparated:Tn,commaSeparated:po,number:ge,overloadedBoolean:Cd,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),Nd=Object.keys(kd);let Od=class extends cn{constructor(t,n,r,o){let a=-1;if(super(t,n),X0(this,"space",o),typeof r=="number")for(;++a<Nd.length;){const u=Nd[a];X0(this,Nd[a],(r&kd[u])===kd[u])}}};Od.prototype.defined=!0;function X0(e,t,n){n&&(e[t]=n)}function mo(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Od(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Rs(r)]=r,n[Rs(a.attribute)]=r}return new Is(t,n,e.space)}const J0=mo({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},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Z0(e,t){return t in e?e[t]:t}function eg(e,t){return Z0(e,t.toLowerCase())}const iA=mo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:po,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:st,autoFocus:je,autoPlay:je,blocking:st,capture:null,charSet:null,checked:je,cite:null,className:st,cols:ge,colSpan:null,content:null,contentEditable:At,controls:je,controlsList:st,coords:ge|po,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:Cd,draggable:At,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:st,height:ge,hidden:Cd,high:ge,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:st,itemRef:st,itemScope:je,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:ge,pattern:null,ping:st,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:st,required:je,reversed:je,rows:ge,rowSpan:ge,sandbox:st,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,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:je,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:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:je,noHref:je,noShade:je,noWrap:je,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:je,disableRemotePlayback:je,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:eg}),oA=mo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Tn,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:je,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:po,g2:po,glyphName:po,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:Tn,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:Tn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Tn,rev:Tn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Tn,requiredFeatures:Tn,requiredFonts:Tn,requiredFormats:Tn,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:Tn,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:Tn,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:Tn,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},space:"svg",transform:Z0}),tg=mo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ng=mo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:eg}),rg=mo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),sA={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},aA=/[A-Z]/g,ig=/-[a-z]/g,uA=/^data[-\w.:]+$/i;function Id(e,t){const n=Rs(t);let r=t,o=cn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uA.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ig,cA);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ig.test(a)){let u=a.replace(aA,lA);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Od}return new o(r,t)}function lA(e){return"-"+e.toLowerCase()}function cA(e){return e.charAt(1).toUpperCase()}const Nu=Q0([J0,iA,tg,ng,rg],"html"),go=Q0([J0,oA,tg,ng,rg],"svg");function og(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function sg(e){return e.join(" ").trim()}var Eo={},Rd,ag;function dA(){if(ag)return Rd;ag=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
24
- `,h="/",p="*",E="",T="comment",y="declaration";Rd=function(v,A){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];A=A||{};var C=1,O=1;function R(te){var re=te.match(t);re&&(C+=re.length);var fe=te.lastIndexOf(d);O=~fe?te.length-fe:O+te.length}function H(){var te={line:C,column:O};return function(re){return re.position=new W(te),ce(),re}}function W(te){this.start=te,this.end={line:C,column:O},this.source=A.source}W.prototype.content=v;function M(te){var re=new Error(A.source+":"+C+":"+O+": "+te);if(re.reason=te,re.filename=A.source,re.line=C,re.column=O,re.source=v,!A.silent)throw re}function K(te){var re=te.exec(v);if(re){var fe=re[0];return R(fe),v=v.slice(fe.length),re}}function ce(){K(n)}function be(te){var re;for(te=te||[];re=z();)re!==!1&&te.push(re);return te}function z(){var te=H();if(!(h!=v.charAt(0)||p!=v.charAt(1))){for(var re=2;E!=v.charAt(re)&&(p!=v.charAt(re)||h!=v.charAt(re+1));)++re;if(re+=2,E===v.charAt(re-1))return M("End of comment missing");var fe=v.slice(2,re-2);return O+=2,R(fe),v=v.slice(re),O+=2,te({type:T,comment:fe})}}function ee(){var te=H(),re=K(r);if(re){if(z(),!K(o))return M("property missing ':'");var fe=K(a),ke=te({type:y,property:x(re[0].replace(e,E)),value:fe?x(fe[0].replace(e,E)):E});return K(u),ke}}function se(){var te=[];be(te);for(var re;re=ee();)re!==!1&&(te.push(re),be(te));return te}return ce(),se()};function x(v){return v?v.replace(c,E):E}return Rd}var ug;function fA(){if(ug)return Eo;ug=1;var e=Eo&&Eo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.default=n;var t=e(dA());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,p=d.value;c?o(h,p,d):p&&(a=a||{},a[h]=p)}}),a}return Eo}var Ps={},lg;function hA(){if(lg)return Ps;lg=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},u=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),a(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,u))};return Ps.camelCase=d,Ps}var Ls,cg;function pA(){if(cg)return Ls;cg=1;var e=Ls&&Ls.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(fA()),n=hA();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,Ls=r,Ls}var mA=pA();const gA=We(mA),Ou=dg("end"),ur=dg("start");function dg(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function fg(e){const t=ur(e),n=Ou(e);if(t&&n)return{start:t,end:n}}function Ds(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?hg(e.position):"start"in e||"end"in e?hg(e):"line"in e||"column"in e?Pd(e):""}function Pd(e){return pg(e&&e.line)+":"+pg(e&&e.column)}function hg(e){return Pd(e&&e.start)+"-"+Pd(e&&e.end)}function pg(e){return e&&typeof e=="number"?e:1}class Wt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=F({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=Ds(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Wt.prototype.file="",Wt.prototype.name="",Wt.prototype.reason="",Wt.prototype.message="",Wt.prototype.stack="",Wt.prototype.column=void 0,Wt.prototype.line=void 0,Wt.prototype.ancestors=void 0,Wt.prototype.cause=void 0,Wt.prototype.fatal=void 0,Wt.prototype.place=void 0,Wt.prototype.ruleId=void 0,Wt.prototype.source=void 0;const Ld={}.hasOwnProperty,EA=new Map,yA=/[A-Z]/g,bA=new Set(["table","tbody","thead","tfoot","tr"]),TA=new Set(["td","th"]),mg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xA(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=NA(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=kA(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?go:Nu,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=gg(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function gg(e,t,n){if(t.type==="element")return wA(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return _A(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return SA(e,t,n);if(t.type==="mdxjsEsm")return vA(e,t);if(t.type==="root")return AA(e,t,n);if(t.type==="text")return CA(e,t)}function wA(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=go,e.schema=o),e.ancestors.push(t);const a=yg(e,t.tagName,!1),u=OA(e,t);let c=Md(e,t);return bA.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!nA(d):!0})),Eg(e,u,a,t),Dd(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function _A(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ms(e,t.position)}function vA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ms(e,t.position)}function SA(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=go,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:yg(e,t.name,!0),u=IA(e,t),c=Md(e,t);return Eg(e,u,a,t),Dd(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function AA(e,t,n){const r={};return Dd(r,Md(e,t)),e.create(t,e.Fragment,r,n)}function CA(e,t){return t.value}function Eg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Dd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function kA(e,t,n){return r;function r(o,a,u,c){const h=Array.isArray(u.children)?n:t;return c?h(a,u,c):h(a,u)}}function NA(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=ur(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function OA(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Ld.call(t.properties,o)){const a=RA(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&TA.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function IA(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Ms(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Ms(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Md(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:EA;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const h=o.get(d)||0;u=d+"-"+h,o.set(d,h+1)}}const c=gg(e,a,u);c!==void 0&&n.push(c)}return n}function RA(e,t,n){const r=Id(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?W0(n):sg(n)),r.property==="style"){let o=typeof n=="object"?n:PA(e,String(n));return e.stylePropertyNameCase==="css"&&(o=LA(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?sA[r.property]||r.property:r.attribute,n]}}function PA(e,t){try{return gA(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Wt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=mg+"#cannot-parse-style-attribute",o}}function yg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=G0(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=G0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Ld.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ms(e)}function Ms(e,t){const n=new Wt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=mg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function LA(e){const t={};let n;for(n in e)Ld.call(e,n)&&(t[DA(n)]=e[n]);return t}function DA(e){let t=e.replace(yA,MA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function MA(e){return"-"+e.toLowerCase()}const Fd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},FA={};function Bd(e,t){const n=FA,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return bg(e,r,o)}function bg(e,t,n){if(BA(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Tg(e.children,t,n)}return Array.isArray(e)?Tg(e,t,n):""}function Tg(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=bg(e[o],t,n);return r.join("")}function BA(e){return!!(e&&typeof e=="object")}const xg=document.createElement("i");function Ud(e){const t="&"+e+";";xg.innerHTML=t;const n=xg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function xn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function Rn(e,t){return e.length>0?(xn(e,e.length,0,t),e):t}const wg={}.hasOwnProperty;function _g(e){const t={};let n=-1;for(;++n<e.length;)UA(t,e[n]);return t}function UA(e,t){let n;for(n in t){const o=(wg.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){wg.call(o,u)||(o[u]=[]);const c=a[u];HA(o[u],Array.isArray(c)?c:c?[c]:[])}}}function HA(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);xn(e,0,0,r)}function vg(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nn=qr(/[A-Za-z]/),Gt=qr(/[\dA-Za-z]/),zA=qr(/[#-'*+\--9=?A-Z^-~]/);function Iu(e){return e!==null&&(e<32||e===127)}const Hd=qr(/\d/),jA=qr(/[\dA-Fa-f]/),$A=qr(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function it(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const Ru=qr(new RegExp("\\p{P}|\\p{S}","u")),Oi=qr(/\s/);function qr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function yo(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Gt(e.charCodeAt(n+1))&&Gt(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Qe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ge(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ge(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const VA={tokenize:qA};function qA(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Qe(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const YA={tokenize:WA},Sg={tokenize:GA};function WA(e){const t=this,n=[];let r=0,o,a,u;return c;function c(R){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,d,h)(R)}return h(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&O();const H=t.events.length;let W=H,M;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){M=t.events[W][1].end;break}C(r);let K=H;for(;K<t.events.length;)t.events[K][1].end=F({},M),K++;return xn(t.events,W+1,0,t.events.slice(H)),t.events.length=K,h(R)}return c(R)}function h(R){if(r===n.length){if(!o)return T(R);if(o.currentConstruct&&o.currentConstruct.concrete)return x(R);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Sg,p,E)(R)}function p(R){return o&&O(),C(r),T(R)}function E(R){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(R)}function T(R){return t.containerState={},e.attempt(Sg,y,x)(R)}function y(R){return r++,n.push([t.currentConstruct,t.containerState]),T(R)}function x(R){if(R===null){o&&O(),C(0),e.consume(R);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),v(R)}function v(R){if(R===null){A(e.exit("chunkFlow"),!0),C(0),e.consume(R);return}return Le(R)?(e.consume(R),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),v)}function A(R,H){const W=t.sliceStream(R);if(H&&W.push(null),R.previous=a,a&&(a.next=R),a=R,o.defineSkip(R.start),o.write(W),t.parser.lazy[R.start.line]){let M=o.events.length;for(;M--;)if(o.events[M][1].start.offset<u&&(!o.events[M][1].end||o.events[M][1].end.offset>u))return;const K=t.events.length;let ce=K,be,z;for(;ce--;)if(t.events[ce][0]==="exit"&&t.events[ce][1].type==="chunkFlow"){if(be){z=t.events[ce][1].end;break}be=!0}for(C(r),M=K;M<t.events.length;)t.events[M][1].end=F({},z),M++;xn(t.events,ce+1,0,t.events.slice(K)),t.events.length=M}}function C(R){let H=n.length;for(;H-- >R;){const W=n[H];t.containerState=W[1],W[0].exit.call(t,e)}n.length=R}function O(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function GA(e,t,n){return Qe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function bo(e){if(e===null||it(e)||Oi(e))return 1;if(Ru(e))return 2}function Pu(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const zd={name:"attention",resolveAll:KA,tokenize:QA};function KA(e,t){let n=-1,r,o,a,u,c,d,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const E=F({},e[r][1].end),T=F({},e[n][1].start);Ag(E,-d),Ag(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:E,end:F({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},c.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Rn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Rn(h,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),h=Rn(h,Pu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Rn(h,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=Rn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,xn(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function QA(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=bo(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const h=e.exit("attentionSequence"),p=bo(d),E=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return h._open=!!(a===42?E:E&&(o||!T)),h._close=!!(a===42?T:T&&(p||!E)),t(d)}}function Ag(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const XA={name:"autolink",tokenize:JA};function JA(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return nn(y)?(e.consume(y),u):y===64?n(y):h(y)}function u(y){return y===43||y===45||y===46||Gt(y)?(r=1,c(y)):h(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Gt(y))&&r++<32?(e.consume(y),c):(r=0,h(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Iu(y)?n(y):(e.consume(y),d)}function h(y){return y===64?(e.consume(y),p):zA(y)?(e.consume(y),h):n(y)}function p(y){return Gt(y)?E(y):n(y)}function E(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):T(y)}function T(y){if((y===45||Gt(y))&&r++<63){const x=y===45?T:E;return e.consume(y),x}return n(y)}}const Fs={partial:!0,tokenize:ZA};function ZA(e,t,n){return r;function r(a){return Ge(a)?Qe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const Cg={continuation:{tokenize:tC},exit:nC,name:"blockQuote",tokenize:eC};function eC(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ge(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function tC(e,t,n){const r=this;return o;function o(u){return Ge(u)?Qe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(Cg,t,n)(u)}}function nC(e){e.exit("blockQuote")}const kg={name:"characterEscape",tokenize:rC};function rC(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return $A(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Ng={name:"characterReference",tokenize:iC};function iC(e,t,n){const r=this;let o=0,a,u;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),d}function d(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,u=Gt,p(E))}function h(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=jA,p):(e.enter("characterReferenceValue"),a=7,u=Hd,p(E))}function p(E){if(E===59&&o){const T=e.exit("characterReferenceValue");return u===Gt&&!Ud(r.sliceSerialize(T))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(E)&&o++<a?(e.consume(E),p):n(E)}}const Og={partial:!0,tokenize:sC},Ig={concrete:!0,name:"codeFenced",tokenize:oC};function oC(e,t,n){const r=this,o={partial:!0,tokenize:W};let a=0,u=0,c;return d;function d(M){return h(M)}function h(M){const K=r.events[r.events.length-1];return a=K&&K[1].type==="linePrefix"?K[2].sliceSerialize(K[1],!0).length:0,c=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(M)}function p(M){return M===c?(u++,e.consume(M),p):u<3?n(M):(e.exit("codeFencedFenceSequence"),Ge(M)?Qe(e,E,"whitespace")(M):E(M))}function E(M){return M===null||Le(M)?(e.exit("codeFencedFence"),r.interrupt?t(M):e.check(Og,v,H)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(M))}function T(M){return M===null||Le(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(M)):Ge(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qe(e,y,"whitespace")(M)):M===96&&M===c?n(M):(e.consume(M),T)}function y(M){return M===null||Le(M)?E(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(M))}function x(M){return M===null||Le(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(M)):M===96&&M===c?n(M):(e.consume(M),x)}function v(M){return e.attempt(o,H,A)(M)}function A(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),C}function C(M){return a>0&&Ge(M)?Qe(e,O,"linePrefix",a+1)(M):O(M)}function O(M){return M===null||Le(M)?e.check(Og,v,H)(M):(e.enter("codeFlowValue"),R(M))}function R(M){return M===null||Le(M)?(e.exit("codeFlowValue"),O(M)):(e.consume(M),R)}function H(M){return e.exit("codeFenced"),t(M)}function W(M,K,ce){let be=0;return z;function z(fe){return M.enter("lineEnding"),M.consume(fe),M.exit("lineEnding"),ee}function ee(fe){return M.enter("codeFencedFence"),Ge(fe)?Qe(M,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(fe):se(fe)}function se(fe){return fe===c?(M.enter("codeFencedFenceSequence"),te(fe)):ce(fe)}function te(fe){return fe===c?(be++,M.consume(fe),te):be>=u?(M.exit("codeFencedFenceSequence"),Ge(fe)?Qe(M,re,"whitespace")(fe):re(fe)):ce(fe)}function re(fe){return fe===null||Le(fe)?(M.exit("codeFencedFence"),K(fe)):ce(fe)}}}function sC(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const jd={name:"codeIndented",tokenize:uC},aC={partial:!0,tokenize:lC};function uC(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Qe(e,a,"linePrefix",5)(h)}function a(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):Le(h)?e.attempt(aC,u,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Le(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function lC(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Qe(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const cC={name:"codeText",previous:fC,resolve:dC,tokenize:hC};function dC(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function fC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function hC(e,t,n){let r=0,o,a;return u;function u(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),r++,c):(e.exit("codeTextSequence"),d(E))}function d(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),d):E===96?(a=e.enter("codeTextSequence"),o=0,p(E)):Le(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(E))}function h(E){return E===null||E===32||E===96||Le(E)?(e.exit("codeTextData"),d(E)):(e.consume(E),h)}function p(E){return E===96?(e.consume(E),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(a.type="codeTextData",h(E))}}class pC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Bs(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Bs(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Bs(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Bs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Bs(this.left,n.reverse())}}}function Bs(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Rg(e){const t={};let n=-1,r,o,a,u,c,d,h;const p=new pC(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,mC(p,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=F({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return xn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function mC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],h={};let p,E,T=-1,y=n,x=0,v=0;const A=[v];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),E&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),E=y,y=y.next}for(y=n;++T<c.length;)c[T][0]==="exit"&&c[T-1][0]==="enter"&&c[T][1].type===c[T-1][1].type&&c[T][1].start.line!==c[T][1].end.line&&(v=T+1,A.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),T=A.length;T--;){const C=c.slice(A[T],A[T+1]),O=a.pop();d.push([O,O+C.length-1]),e.splice(O,2,C)}for(d.reverse(),T=-1;++T<d.length;)h[x+d[T][0]]=x+d[T][1],x+=d[T][1]-d[T][0]-1;return h}const gC={resolve:yC,tokenize:bC},EC={partial:!0,tokenize:TC};function yC(e){return Rg(e),e}function bC(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(EC,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function TC(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Qe(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function Pg(e,t,n,r,o,a,u,c,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return E;function E(C){return C===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(C),e.exit(a),T):C===null||C===32||C===41||Iu(C)?n(C):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),v(C))}function T(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(C))}function y(C){return C===62?(e.exit("chunkString"),e.exit(c),T(C)):C===null||C===60||Le(C)?n(C):(e.consume(C),C===92?x:y)}function x(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function v(C){return!p&&(C===null||C===41||it(C))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(C)):p<h&&C===40?(e.consume(C),p++,v):C===41?(e.consume(C),p--,v):C===null||C===32||C===40||Iu(C)?n(C):(e.consume(C),C===92?A:v)}function A(C){return C===40||C===41||C===92?(e.consume(C),v):v(C)}}function Lg(e,t,n,r,o,a){const u=this;let c=0,d;return h;function h(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):Le(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),E(y))}function E(y){return y===null||y===91||y===93||Le(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ge(y)),y===92?T:E)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,E):E(y)}}function Dg(e,t,n,r,o,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),h(T))}function h(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Le(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Qe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Le(T)?(e.exit("chunkString"),h(T)):(e.consume(T),T===92?E:p)}function E(T){return T===u||T===92?(e.consume(T),p):p(T)}}function Us(e,t){let n;return r;function r(o){return Le(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ge(o)?Qe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const xC={name:"definition",tokenize:_C},wC={partial:!0,tokenize:vC};function _C(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return Lg.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=Yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return it(y)?Us(e,h)(y):h(y)}function h(y){return Pg(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(wC,E,E)(y)}function E(y){return Ge(y)?Qe(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Le(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function vC(e,t,n){return r;function r(c){return it(c)?Us(e,o)(c):n(c)}function o(c){return Dg(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ge(c)?Qe(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const SC={name:"hardBreakEscape",tokenize:AC};function AC(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const CC={name:"headingAtx",resolve:kC,tokenize:NC};function kC(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},xn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function NC(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||it(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Le(p)?(e.exit("atxHeading"),t(p)):Ge(p)?Qe(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||it(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const OC=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Mg=["pre","script","style","textarea"],IC={concrete:!0,name:"htmlFlow",resolveTo:LC,tokenize:DC},RC={partial:!0,tokenize:FC},PC={partial:!0,tokenize:MC};function LC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function DC(e,t,n){const r=this;let o,a,u,c,d;return h;function h(N){return p(N)}function p(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),E}function E(N){return N===33?(e.consume(N),T):N===47?(e.consume(N),a=!0,v):N===63?(e.consume(N),o=3,r.interrupt?t:_):nn(N)?(e.consume(N),u=String.fromCharCode(N),A):n(N)}function T(N){return N===45?(e.consume(N),o=2,y):N===91?(e.consume(N),o=5,c=0,x):nn(N)?(e.consume(N),o=4,r.interrupt?t:_):n(N)}function y(N){return N===45?(e.consume(N),r.interrupt?t:_):n(N)}function x(N){const xe="CDATA[";return N===xe.charCodeAt(c++)?(e.consume(N),c===xe.length?r.interrupt?t:se:x):n(N)}function v(N){return nn(N)?(e.consume(N),u=String.fromCharCode(N),A):n(N)}function A(N){if(N===null||N===47||N===62||it(N)){const xe=N===47,Re=u.toLowerCase();return!xe&&!a&&Mg.includes(Re)?(o=1,r.interrupt?t(N):se(N)):OC.includes(u.toLowerCase())?(o=6,xe?(e.consume(N),C):r.interrupt?t(N):se(N)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):a?O(N):R(N))}return N===45||Gt(N)?(e.consume(N),u+=String.fromCharCode(N),A):n(N)}function C(N){return N===62?(e.consume(N),r.interrupt?t:se):n(N)}function O(N){return Ge(N)?(e.consume(N),O):z(N)}function R(N){return N===47?(e.consume(N),z):N===58||N===95||nn(N)?(e.consume(N),H):Ge(N)?(e.consume(N),R):z(N)}function H(N){return N===45||N===46||N===58||N===95||Gt(N)?(e.consume(N),H):W(N)}function W(N){return N===61?(e.consume(N),M):Ge(N)?(e.consume(N),W):R(N)}function M(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),d=N,K):Ge(N)?(e.consume(N),M):ce(N)}function K(N){return N===d?(e.consume(N),d=null,be):N===null||Le(N)?n(N):(e.consume(N),K)}function ce(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||it(N)?W(N):(e.consume(N),ce)}function be(N){return N===47||N===62||Ge(N)?R(N):n(N)}function z(N){return N===62?(e.consume(N),ee):n(N)}function ee(N){return N===null||Le(N)?se(N):Ge(N)?(e.consume(N),ee):n(N)}function se(N){return N===45&&o===2?(e.consume(N),ke):N===60&&o===1?(e.consume(N),he):N===62&&o===4?(e.consume(N),P):N===63&&o===3?(e.consume(N),_):N===93&&o===5?(e.consume(N),oe):Le(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(RC,X,te)(N)):N===null||Le(N)?(e.exit("htmlFlowData"),te(N)):(e.consume(N),se)}function te(N){return e.check(PC,re,X)(N)}function re(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),fe}function fe(N){return N===null||Le(N)?te(N):(e.enter("htmlFlowData"),se(N))}function ke(N){return N===45?(e.consume(N),_):se(N)}function he(N){return N===47?(e.consume(N),u="",Q):se(N)}function Q(N){if(N===62){const xe=u.toLowerCase();return Mg.includes(xe)?(e.consume(N),P):se(N)}return nn(N)&&u.length<8?(e.consume(N),u+=String.fromCharCode(N),Q):se(N)}function oe(N){return N===93?(e.consume(N),_):se(N)}function _(N){return N===62?(e.consume(N),P):N===45&&o===2?(e.consume(N),_):se(N)}function P(N){return N===null||Le(N)?(e.exit("htmlFlowData"),X(N)):(e.consume(N),P)}function X(N){return e.exit("htmlFlow"),t(N)}}function MC(e,t,n){const r=this;return o;function o(u){return Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function FC(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Fs,t,n)}}const BC={name:"htmlText",tokenize:UC};function UC(e,t,n){const r=this;let o,a,u;return c;function c(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),h):_===47?(e.consume(_),W):_===63?(e.consume(_),R):nn(_)?(e.consume(_),ce):n(_)}function h(_){return _===45?(e.consume(_),p):_===91?(e.consume(_),a=0,x):nn(_)?(e.consume(_),O):n(_)}function p(_){return _===45?(e.consume(_),y):n(_)}function E(_){return _===null?n(_):_===45?(e.consume(_),T):Le(_)?(u=E,he(_)):(e.consume(_),E)}function T(_){return _===45?(e.consume(_),y):E(_)}function y(_){return _===62?ke(_):_===45?T(_):E(_)}function x(_){const P="CDATA[";return _===P.charCodeAt(a++)?(e.consume(_),a===P.length?v:x):n(_)}function v(_){return _===null?n(_):_===93?(e.consume(_),A):Le(_)?(u=v,he(_)):(e.consume(_),v)}function A(_){return _===93?(e.consume(_),C):v(_)}function C(_){return _===62?ke(_):_===93?(e.consume(_),C):v(_)}function O(_){return _===null||_===62?ke(_):Le(_)?(u=O,he(_)):(e.consume(_),O)}function R(_){return _===null?n(_):_===63?(e.consume(_),H):Le(_)?(u=R,he(_)):(e.consume(_),R)}function H(_){return _===62?ke(_):R(_)}function W(_){return nn(_)?(e.consume(_),M):n(_)}function M(_){return _===45||Gt(_)?(e.consume(_),M):K(_)}function K(_){return Le(_)?(u=K,he(_)):Ge(_)?(e.consume(_),K):ke(_)}function ce(_){return _===45||Gt(_)?(e.consume(_),ce):_===47||_===62||it(_)?be(_):n(_)}function be(_){return _===47?(e.consume(_),ke):_===58||_===95||nn(_)?(e.consume(_),z):Le(_)?(u=be,he(_)):Ge(_)?(e.consume(_),be):ke(_)}function z(_){return _===45||_===46||_===58||_===95||Gt(_)?(e.consume(_),z):ee(_)}function ee(_){return _===61?(e.consume(_),se):Le(_)?(u=ee,he(_)):Ge(_)?(e.consume(_),ee):be(_)}function se(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),o=_,te):Le(_)?(u=se,he(_)):Ge(_)?(e.consume(_),se):(e.consume(_),re)}function te(_){return _===o?(e.consume(_),o=void 0,fe):_===null?n(_):Le(_)?(u=te,he(_)):(e.consume(_),te)}function re(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||it(_)?be(_):(e.consume(_),re)}function fe(_){return _===47||_===62||it(_)?be(_):n(_)}function ke(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function he(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),Q}function Q(_){return Ge(_)?Qe(e,oe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):oe(_)}function oe(_){return e.enter("htmlTextData"),u(_)}}const $d={name:"labelEnd",resolveAll:$C,resolveTo:VC,tokenize:qC},HC={tokenize:YC},zC={tokenize:WC},jC={tokenize:GC};function $C(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&xn(e,0,e.length,n),e}function VC(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},h={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return c=[["enter",d,t],["enter",h,t]],c=Rn(c,e.slice(a+1,a+r+3)),c=Rn(c,[["enter",p,t]]),c=Rn(c,Pu(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Rn(c,[["exit",p,t],e[u-2],e[u-1],["exit",h,t]]),c=Rn(c,e.slice(u+1)),c=Rn(c,[["exit",d,t]]),xn(e,a,e.length,c),e}function qC(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(T){return a?a._inactive?E(T):(u=r.parser.defined.includes(Yn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(HC,p,u?p:E)(T):T===91?e.attempt(zC,p,u?h:E)(T):u?p(T):E(T)}function h(T){return e.attempt(jC,p,E)(T)}function p(T){return t(T)}function E(T){return a._balanced=!0,n(T)}}function YC(e,t,n){return r;function r(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),o}function o(E){return it(E)?Us(e,a)(E):a(E)}function a(E){return E===41?p(E):Pg(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function u(E){return it(E)?Us(e,d)(E):p(E)}function c(E){return n(E)}function d(E){return E===34||E===39||E===40?Dg(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):p(E)}function h(E){return it(E)?Us(e,p)(E):p(E)}function p(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function WC(e,t,n){const r=this;return o;function o(c){return Lg.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function GC(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const KC={name:"labelStartImage",resolveAll:$d.resolveAll,tokenize:QC};function QC(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const XC={name:"labelStartLink",resolveAll:$d.resolveAll,tokenize:JC};function JC(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Vd={name:"lineEnding",tokenize:ZC};function ZC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qe(e,t,"linePrefix")}}const Lu={name:"thematicBreak",tokenize:ek};function ek(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),u(h)}function u(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Le(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ge(h)?Qe(e,c,"whitespace")(h):c(h))}}const dn={continuation:{tokenize:ik},exit:sk,name:"list",tokenize:rk},tk={partial:!0,tokenize:ak},nk={partial:!0,tokenize:ok};function rk(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Hd(y)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Lu,n,h)(y):h(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Hd(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),h(y)):n(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Fs,r.interrupt?n:p,e.attempt(tk,T,E))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function E(y){return Ge(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),T):n(y)}function T(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function ik(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Fs,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qe(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ge(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(nk,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qe(e,e.attempt(dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function ok(e,t,n){const r=this;return Qe(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function sk(e){e.exit(this.containerState.type)}function ak(e,t,n){const r=this;return Qe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Ge(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Fg={name:"setextUnderline",resolveTo:uk,tokenize:lk};function uk(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:F({},e[r][1].start),end:F({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function lk(e,t,n){const r=this;let o;return a;function a(h){let p=r.events.length,E;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){E=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||E)?(e.enter("setextHeadingLine"),o=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ge(h)?Qe(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Le(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const ck={tokenize:dk};function dk(e){const t=this,n=e.attempt(Fs,r,e.attempt(this.parser.constructs.flowInitial,o,Qe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(gC,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const fk={resolveAll:Ug()},hk=Bg("string"),pk=Bg("text");function Bg(e){return{resolveAll:Ug(e==="text"?mk:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return h(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const E=o[p];let T=-1;if(E)for(;++T<E.length;){const y=E[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function Ug(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function mk(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const h=o[a];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)d=!0,c++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:F({},r.end)};r.end=F({},h.start),r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const gk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:xC},disable:{null:[]},document:{42:dn,43:dn,45:dn,48:dn,49:dn,50:dn,51:dn,52:dn,53:dn,54:dn,55:dn,56:dn,57:dn,62:Cg},flow:{35:CC,42:Lu,45:[Fg,Lu],60:IC,61:Fg,95:Lu,96:Ig,126:Ig},flowInitial:{[-2]:jd,[-1]:jd,32:jd},insideSpan:{null:[zd,fk]},string:{38:Ng,92:kg},text:{[-5]:Vd,[-4]:Vd,[-3]:Vd,33:KC,38:Ng,42:zd,60:[XA,BC],91:XC,92:[SC,kg],93:$d,95:zd,96:cC}},Symbol.toStringTag,{value:"Module"}));function Ek(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:K(W),check:K(M),consume:O,enter:R,exit:H,interrupt:K(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:x,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:E};let p=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function E(ee){return u=Rn(u,ee),A(),u[u.length-1]!==null?[]:(ce(t,0),h.events=Pu(a,h.events,h),h.events)}function T(ee,se){return bk(y(ee),se)}function y(ee){return yk(u,ee)}function x(){const{_bufferIndex:ee,_index:se,line:te,column:re,offset:fe}=r;return{_bufferIndex:ee,_index:se,line:te,column:re,offset:fe}}function v(ee){o[ee.line]=ee.column,z()}function A(){let ee;for(;r._index<u.length;){const se=u[r._index];if(typeof se=="string")for(ee=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ee&&r._bufferIndex<se.length;)C(se.charCodeAt(r._bufferIndex));else C(se)}}function C(ee){p=p(ee)}function O(ee){Le(ee)?(r.line++,r.column=1,r.offset+=ee===-3?2:1,z()):ee!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=ee}function R(ee,se){const te=se||{};return te.type=ee,te.start=x(),h.events.push(["enter",te,h]),c.push(te),te}function H(ee){const se=c.pop();return se.end=x(),h.events.push(["exit",se,h]),se}function W(ee,se){ce(ee,se.from)}function M(ee,se){se.restore()}function K(ee,se){return te;function te(re,fe,ke){let he,Q,oe,_;return Array.isArray(re)?X(re):"tokenize"in re?X([re]):P(re);function P(Oe){return Be;function Be(_e){const $e=_e!==null&&Oe[_e],ot=_e!==null&&Oe.null,pn=[...Array.isArray($e)?$e:$e?[$e]:[],...Array.isArray(ot)?ot:ot?[ot]:[]];return X(pn)(_e)}}function X(Oe){return he=Oe,Q=0,Oe.length===0?ke:N(Oe[Q])}function N(Oe){return Be;function Be(_e){return _=be(),oe=Oe,Oe.partial||(h.currentConstruct=Oe),Oe.name&&h.parser.constructs.disable.null.includes(Oe.name)?Re():Oe.tokenize.call(se?Object.assign(Object.create(h),se):h,d,xe,Re)(_e)}}function xe(Oe){return ee(oe,_),fe}function Re(Oe){return _.restore(),++Q<he.length?N(he[Q]):ke}}}function ce(ee,se){ee.resolveAll&&!a.includes(ee)&&a.push(ee),ee.resolve&&xn(h.events,se,h.events.length-se,ee.resolve(h.events.slice(se),h)),ee.resolveTo&&(h.events=ee.resolveTo(h.events,h))}function be(){const ee=x(),se=h.previous,te=h.currentConstruct,re=h.events.length,fe=Array.from(c);return{from:re,restore:ke};function ke(){r=ee,h.previous=se,h.currentConstruct=te,h.events.length=re,c=fe,z()}}function z(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function yk(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function bk(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
23
+ `+b.stack}return{value:i,source:s,stack:E,digest:null}}function qp(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function Yp(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var h9=typeof WeakMap=="function"?WeakMap:Map;function sw(i,s,l){l=Ur(-1,l),l.tag=3,l.payload={element:null};var f=s.value;return l.callback=function(){vc||(vc=!0,am=f),Yp(i,s)},l}function aw(i,s,l){l=Ur(-1,l),l.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var E=s.value;l.payload=function(){return f(E)},l.callback=function(){Yp(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){Yp(i,s),typeof f!="function"&&(gi===null?gi=new Set([this]):gi.add(this));var w=s.stack;this.componentDidCatch(s.value,{componentStack:w!==null?w:""})}),l}function uw(i,s,l){var f=i.pingCache;if(f===null){f=i.pingCache=new h9;var E=new Set;f.set(s,E)}else E=f.get(s),E===void 0&&(E=new Set,f.set(s,E));E.has(l)||(E.add(l),i=C9.bind(null,i,s,l),s.then(i,i))}function lw(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function cw(i,s,l,f,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=Ur(-1,1),s.tag=2,pi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var p9=H.ReactCurrentOwner,En=!1;function rn(i,s,l,f){s.child=i===null?Ox(s,null,l,f):cs(s,i.child,l,f)}function dw(i,s,l,f,E){l=l.render;var b=s.ref;return fs(s,E),f=Fp(i,s,l,f,b,E),l=Bp(),i!==null&&!En?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Hr(i,s,E)):(pt&&l&&Tp(s),s.flags|=1,rn(i,s,f,E),s.child)}function fw(i,s,l,f,E){if(i===null){var b=l.type;return typeof b=="function"&&!pm(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=b,hw(i,s,b,f,E)):(i=Oc(l.type,null,f,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(b=i.child,(i.lanes&E)===0){var w=b.memoizedProps;if(l=l.compare,l=l!==null?l:Da,l(w,f)&&i.ref===s.ref)return Hr(i,s,E)}return s.flags|=1,i=Ti(b,f),i.ref=s.ref,i.return=s,s.child=i}function hw(i,s,l,f,E){if(i!==null){var b=i.memoizedProps;if(Da(b,f)&&i.ref===s.ref)if(En=!1,s.pendingProps=f=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(En=!0);else return s.lanes=i.lanes,Hr(i,s,E)}return Wp(i,s,l,f,E)}function pw(i,s,l){var f=s.pendingProps,E=f.children,b=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ut(gs,Nn),Nn|=l;else{if((l&1073741824)===0)return i=b!==null?b.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ut(gs,Nn),Nn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=b!==null?b.baseLanes:l,ut(gs,Nn),Nn|=f}else b!==null?(f=b.baseLanes|l,s.memoizedState=null):f=l,ut(gs,Nn),Nn|=f;return rn(i,s,E,l),s.child}function mw(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function Wp(i,s,l,f,E){var b=gn(l)?Qi:Xt.current;return b=ss(s,b),fs(s,E),l=Fp(i,s,l,f,b,E),f=Bp(),i!==null&&!En?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Hr(i,s,E)):(pt&&f&&Tp(s),s.flags|=1,rn(i,s,l,E),s.child)}function gw(i,s,l,f,E){if(gn(l)){var b=!0;tc(s)}else b=!1;if(fs(s,E),s.stateNode===null)bc(i,s),iw(s,l,f),Vp(s,l,f,E),f=!0;else if(i===null){var w=s.stateNode,L=s.memoizedProps;w.props=L;var U=w.context,te=l.contextType;typeof te=="object"&&te!==null?te=Un(te):(te=gn(l)?Qi:Xt.current,te=ss(s,te));var de=l.getDerivedStateFromProps,me=typeof de=="function"||typeof w.getSnapshotBeforeUpdate=="function";me||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(L!==f||U!==te)&&ow(s,w,f,te),hi=!1;var ue=s.memoizedState;w.state=ue,cc(s,f,w,E),U=s.memoizedState,L!==f||ue!==U||mn.current||hi?(typeof de=="function"&&($p(s,l,de,f),U=s.memoizedState),(L=hi||rw(s,l,L,f,ue,U,te))?(me||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(s.flags|=4194308)):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=U),w.props=f,w.state=U,w.context=te,f=L):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{w=s.stateNode,Rx(i,s),L=s.memoizedProps,te=s.type===s.elementType?L:tr(s.type,L),w.props=te,me=s.pendingProps,ue=w.context,U=l.contextType,typeof U=="object"&&U!==null?U=Un(U):(U=gn(l)?Qi:Xt.current,U=ss(s,U));var we=l.getDerivedStateFromProps;(de=typeof we=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(L!==me||ue!==U)&&ow(s,w,f,U),hi=!1,ue=s.memoizedState,w.state=ue,cc(s,f,w,E);var Se=s.memoizedState;L!==me||ue!==Se||mn.current||hi?(typeof we=="function"&&($p(s,l,we,f),Se=s.memoizedState),(te=hi||rw(s,l,te,f,ue,Se,U)||!1)?(de||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(f,Se,U),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(f,Se,U)),typeof w.componentDidUpdate=="function"&&(s.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof w.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=Se),w.props=f,w.state=Se,w.context=U,f=te):(typeof w.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),f=!1)}return Gp(i,s,l,f,b,E)}function Gp(i,s,l,f,E,b){mw(i,s);var w=(s.flags&128)!==0;if(!f&&!w)return E&&xx(s,l,!1),Hr(i,s,b);f=s.stateNode,p9.current=s;var L=w&&typeof l.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&w?(s.child=cs(s,i.child,null,b),s.child=cs(s,null,L,b)):rn(i,s,L,b),s.memoizedState=f.state,E&&xx(s,l,!0),s.child}function Ew(i){var s=i.stateNode;s.pendingContext?bx(i,s.pendingContext,s.pendingContext!==s.context):s.context&&bx(i,s.context,!1),Ip(i,s.containerInfo)}function yw(i,s,l,f,E){return ls(),vp(E),s.flags|=256,rn(i,s,l,f),s.child}var Kp={dehydrated:null,treeContext:null,retryLane:0};function Qp(i){return{baseLanes:i,cachePool:null,transitions:null}}function bw(i,s,l){var f=s.pendingProps,E=gt.current,b=!1,w=(s.flags&128)!==0,L;if((L=w)||(L=i!==null&&i.memoizedState===null?!1:(E&2)!==0),L?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),ut(gt,E&1),i===null)return _p(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(w=f.children,i=f.fallback,b?(f=s.mode,b=s.child,w={mode:"hidden",children:w},(f&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=w):b=Ic(w,f,0,null),i=so(i,f,l,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=Qp(l),s.memoizedState=Kp,i):Xp(s,w));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return m9(i,s,w,f,L,E,l);if(b){b=f.fallback,w=s.mode,E=i.child,L=E.sibling;var U={mode:"hidden",children:f.children};return(w&1)===0&&s.child!==E?(f=s.child,f.childLanes=0,f.pendingProps=U,s.deletions=null):(f=Ti(E,U),f.subtreeFlags=E.subtreeFlags&14680064),L!==null?b=Ti(L,b):(b=so(b,w,l,null),b.flags|=2),b.return=s,f.return=s,f.sibling=b,s.child=f,f=b,b=s.child,w=i.child.memoizedState,w=w===null?Qp(l):{baseLanes:w.baseLanes|l,cachePool:null,transitions:w.transitions},b.memoizedState=w,b.childLanes=i.childLanes&~l,s.memoizedState=Kp,f}return b=i.child,i=b.sibling,f=Ti(b,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=l),f.return=s,f.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=f,s.memoizedState=null,f}function Xp(i,s){return s=Ic({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function yc(i,s,l,f){return f!==null&&vp(f),cs(s,i.child,null,l),i=Xp(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function m9(i,s,l,f,E,b,w){if(l)return s.flags&256?(s.flags&=-257,f=qp(Error(n(422))),yc(i,s,w,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=f.fallback,E=s.mode,f=Ic({mode:"visible",children:f.children},E,0,null),b=so(b,E,w,null),b.flags|=2,f.return=s,b.return=s,f.sibling=b,s.child=f,(s.mode&1)!==0&&cs(s,i.child,null,w),s.child.memoizedState=Qp(w),s.memoizedState=Kp,b);if((s.mode&1)===0)return yc(i,s,w,null);if(E.data==="$!"){if(f=E.nextSibling&&E.nextSibling.dataset,f)var L=f.dgst;return f=L,b=Error(n(419)),f=qp(b,f,void 0),yc(i,s,w,f)}if(L=(w&i.childLanes)!==0,En||L){if(f=Ht,f!==null){switch(w&-w){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(f.suspendedLanes|w))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,Br(i,E),ir(f,i,E,-1))}return hm(),f=qp(Error(n(421))),yc(i,s,w,f)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=k9.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,kn=li(E.nextSibling),Cn=s,pt=!0,er=null,i!==null&&(Fn[Bn++]=Mr,Fn[Bn++]=Fr,Fn[Bn++]=Xi,Mr=i.id,Fr=i.overflow,Xi=s),s=Xp(s,f.children),s.flags|=4096,s)}function Tw(i,s,l){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),kp(i.return,s,l)}function Jp(i,s,l,f,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:l,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=f,b.tail=l,b.tailMode=E)}function xw(i,s,l){var f=s.pendingProps,E=f.revealOrder,b=f.tail;if(rn(i,s,f.children,l),f=gt.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Tw(i,l,s);else if(i.tag===19)Tw(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(ut(gt,f),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(l=s.child,E=null;l!==null;)i=l.alternate,i!==null&&dc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=s.child,s.child=null):(E=l.sibling,l.sibling=null),Jp(s,!1,E,l,b);break;case"backwards":for(l=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&dc(i)===null){s.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Jp(s,!0,l,null,b);break;case"together":Jp(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function bc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Hr(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),no|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Ti(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Ti(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function g9(i,s,l){switch(s.tag){case 3:Ew(s),ls();break;case 5:Dx(s);break;case 1:gn(s.type)&&tc(s);break;case 4:Ip(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,E=s.memoizedProps.value;ut(ac,f._currentValue),f._currentValue=E;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ut(gt,gt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?bw(i,s,l):(ut(gt,gt.current&1),i=Hr(i,s,l),i!==null?i.sibling:null);ut(gt,gt.current&1);break;case 19:if(f=(l&s.childLanes)!==0,(i.flags&128)!==0){if(f)return xw(i,s,l);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ut(gt,gt.current),f)break;return null;case 22:case 23:return s.lanes=0,pw(i,s,l)}return Hr(i,s,l)}var ww,Zp,_w,vw;ww=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Zp=function(){},_w=function(i,s,l,f){var E=i.memoizedProps;if(E!==f){i=s.stateNode,eo(wr.current);var b=null;switch(l){case"input":E=Xn(i,E),f=Xn(i,f),b=[];break;case"select":E=v({},E,{value:void 0}),f=v({},f,{value:void 0}),b=[];break;case"textarea":E=ba(i,E),f=ba(i,f),b=[];break;default:typeof E.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=Jl)}$t(l,f);var w;l=null;for(te in E)if(!f.hasOwnProperty(te)&&E.hasOwnProperty(te)&&E[te]!=null)if(te==="style"){var L=E[te];for(w in L)L.hasOwnProperty(w)&&(l||(l={}),l[w]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(o.hasOwnProperty(te)?b||(b=[]):(b=b||[]).push(te,null));for(te in f){var U=f[te];if(L=E!=null?E[te]:void 0,f.hasOwnProperty(te)&&U!==L&&(U!=null||L!=null))if(te==="style")if(L){for(w in L)!L.hasOwnProperty(w)||U&&U.hasOwnProperty(w)||(l||(l={}),l[w]="");for(w in U)U.hasOwnProperty(w)&&L[w]!==U[w]&&(l||(l={}),l[w]=U[w])}else l||(b||(b=[]),b.push(te,l)),l=U;else te==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,L=L?L.__html:void 0,U!=null&&L!==U&&(b=b||[]).push(te,U)):te==="children"?typeof U!="string"&&typeof U!="number"||(b=b||[]).push(te,""+U):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(o.hasOwnProperty(te)?(U!=null&&te==="onScroll"&&lt("scroll",i),b||L===U||(b=[])):(b=b||[]).push(te,U))}l&&(b=b||[]).push("style",l);var te=b;(s.updateQueue=te)&&(s.flags|=4)}},vw=function(i,s,l,f){l!==f&&(s.flags|=4)};function Qa(i,s){if(!pt)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function Zt(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,f=0;if(s)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,f|=E.subtreeFlags&14680064,f|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,f|=E.subtreeFlags,f|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=f,i.childLanes=l,s}function E9(i,s,l){var f=s.pendingProps;switch(xp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(s),null;case 1:return gn(s.type)&&ec(),Zt(s),null;case 3:return f=s.stateNode,hs(),ct(mn),ct(Xt),Lp(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(oc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,er!==null&&(cm(er),er=null))),Zp(i,s),Zt(s),null;case 5:Rp(s);var E=eo(qa.current);if(l=s.type,i!==null&&s.stateNode!=null)_w(i,s,l,f,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return Zt(s),null}if(i=eo(wr.current),oc(s)){f=s.stateNode,l=s.type;var b=s.memoizedProps;switch(f[xr]=s,f[Ha]=b,i=(s.mode&1)!==0,l){case"dialog":lt("cancel",f),lt("close",f);break;case"iframe":case"object":case"embed":lt("load",f);break;case"video":case"audio":for(E=0;E<Fa.length;E++)lt(Fa[E],f);break;case"source":lt("error",f);break;case"img":case"image":case"link":lt("error",f),lt("load",f);break;case"details":lt("toggle",f);break;case"input":Ea(f,b),lt("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!b.multiple},lt("invalid",f);break;case"textarea":kl(f,b),lt("invalid",f)}$t(l,b),E=null;for(var w in b)if(b.hasOwnProperty(w)){var L=b[w];w==="children"?typeof L=="string"?f.textContent!==L&&(b.suppressHydrationWarning!==!0&&Xl(f.textContent,L,i),E=["children",L]):typeof L=="number"&&f.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&Xl(f.textContent,L,i),E=["children",""+L]):o.hasOwnProperty(w)&&L!=null&&w==="onScroll"&&lt("scroll",f)}switch(l){case"input":pn(f),Cl(f,b,!0);break;case"textarea":pn(f),Ol(f);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(f.onclick=Jl)}f=E,s.updateQueue=f,f!==null&&(s.flags|=4)}else{w=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ie(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=w.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=w.createElement(l,{is:f.is}):(i=w.createElement(l),l==="select"&&(w=i,f.multiple?w.multiple=!0:f.size&&(w.size=f.size))):i=w.createElementNS(i,l),i[xr]=s,i[Ha]=f,ww(i,s,!1,!1),s.stateNode=i;e:{switch(w=br(l,f),l){case"dialog":lt("cancel",i),lt("close",i),E=f;break;case"iframe":case"object":case"embed":lt("load",i),E=f;break;case"video":case"audio":for(E=0;E<Fa.length;E++)lt(Fa[E],i);E=f;break;case"source":lt("error",i),E=f;break;case"img":case"image":case"link":lt("error",i),lt("load",i),E=f;break;case"details":lt("toggle",i),E=f;break;case"input":Ea(i,f),E=Xn(i,f),lt("invalid",i);break;case"option":E=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},E=v({},f,{value:void 0}),lt("invalid",i);break;case"textarea":kl(i,f),E=ba(i,f),lt("invalid",i);break;default:E=f}$t(l,E),L=E;for(b in L)if(L.hasOwnProperty(b)){var U=L[b];b==="style"?ni(i,U):b==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Ye(i,U)):b==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Xe(i,U):typeof U=="number"&&Xe(i,""+U):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?U!=null&&b==="onScroll"&&lt("scroll",i):U!=null&&R(i,b,U,w))}switch(l){case"input":pn(i),Cl(i,f,!1);break;case"textarea":pn(i),Ol(i);break;case"option":f.value!=null&&i.setAttribute("value",""+_e(f.value));break;case"select":i.multiple=!!f.multiple,b=f.value,b!=null?ti(i,!!f.multiple,b,!1):f.defaultValue!=null&&ti(i,!!f.multiple,f.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Jl)}switch(l){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Zt(s),null;case 6:if(i&&s.stateNode!=null)vw(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(l=eo(qa.current),eo(wr.current),oc(s)){if(f=s.stateNode,l=s.memoizedProps,f[xr]=s,(b=f.nodeValue!==l)&&(i=Cn,i!==null))switch(i.tag){case 3:Xl(f.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Xl(f.nodeValue,l,(i.mode&1)!==0)}b&&(s.flags|=4)}else f=(l.nodeType===9?l:l.ownerDocument).createTextNode(f),f[xr]=s,s.stateNode=f}return Zt(s),null;case 13:if(ct(gt),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(pt&&kn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Cx(),ls(),s.flags|=98560,b=!1;else if(b=oc(s),f!==null&&f.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[xr]=s}else ls(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Zt(s),b=!1}else er!==null&&(cm(er),er=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(gt.current&1)!==0?Pt===0&&(Pt=3):hm())),s.updateQueue!==null&&(s.flags|=4),Zt(s),null);case 4:return hs(),Zp(i,s),i===null&&Ba(s.stateNode.containerInfo),Zt(s),null;case 10:return Cp(s.type._context),Zt(s),null;case 17:return gn(s.type)&&ec(),Zt(s),null;case 19:if(ct(gt),b=s.memoizedState,b===null)return Zt(s),null;if(f=(s.flags&128)!==0,w=b.rendering,w===null)if(f)Qa(b,!1);else{if(Pt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(w=dc(i),w!==null){for(s.flags|=128,Qa(b,!1),f=w.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=l,l=s.child;l!==null;)b=l,i=f,b.flags&=14680066,w=b.alternate,w===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=w.childLanes,b.lanes=w.lanes,b.child=w.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=w.memoizedProps,b.memoizedState=w.memoizedState,b.updateQueue=w.updateQueue,b.type=w.type,i=w.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return ut(gt,gt.current&1|2),s.child}i=i.sibling}b.tail!==null&&_t()>Es&&(s.flags|=128,f=!0,Qa(b,!1),s.lanes=4194304)}else{if(!f)if(i=dc(w),i!==null){if(s.flags|=128,f=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Qa(b,!0),b.tail===null&&b.tailMode==="hidden"&&!w.alternate&&!pt)return Zt(s),null}else 2*_t()-b.renderingStartTime>Es&&l!==1073741824&&(s.flags|=128,f=!0,Qa(b,!1),s.lanes=4194304);b.isBackwards?(w.sibling=s.child,s.child=w):(l=b.last,l!==null?l.sibling=w:s.child=w,b.last=w)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=_t(),s.sibling=null,l=gt.current,ut(gt,f?l&1|2:l&1),s):(Zt(s),null);case 22:case 23:return fm(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Nn&1073741824)!==0&&(Zt(s),s.subtreeFlags&6&&(s.flags|=8192)):Zt(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function y9(i,s){switch(xp(s),s.tag){case 1:return gn(s.type)&&ec(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return hs(),ct(mn),ct(Xt),Lp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Rp(s),null;case 13:if(ct(gt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ls()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return ct(gt),null;case 4:return hs(),null;case 10:return Cp(s.type._context),null;case 22:case 23:return fm(),null;case 24:return null;default:return null}}var Tc=!1,en=!1,b9=typeof WeakSet=="function"?WeakSet:Set,ve=null;function ms(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(f){bt(i,s,f)}else l.current=null}function em(i,s,l){try{l()}catch(f){bt(i,s,f)}}var Sw=!1;function T9(i,s){if(fp=Hl,i=rx(),ip(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var E=f.anchorOffset,b=f.focusNode;f=f.focusOffset;try{l.nodeType,b.nodeType}catch(ye){l=null;break e}var w=0,L=-1,U=-1,te=0,de=0,me=i,ue=null;t:for(;;){for(var we;me!==l||E!==0&&me.nodeType!==3||(L=w+E),me!==b||f!==0&&me.nodeType!==3||(U=w+f),me.nodeType===3&&(w+=me.nodeValue.length),(we=me.firstChild)!==null;)ue=me,me=we;for(;;){if(me===i)break t;if(ue===l&&++te===E&&(L=w),ue===b&&++de===f&&(U=w),(we=me.nextSibling)!==null)break;me=ue,ue=me.parentNode}me=we}l=L===-1||U===-1?null:{start:L,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(hp={focusedElem:i,selectionRange:l},Hl=!1,ve=s;ve!==null;)if(s=ve,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,ve=i;else for(;ve!==null;){s=ve;try{var Se=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Se!==null){var Ce=Se.memoizedProps,vt=Se.memoizedState,q=s.stateNode,j=q.getSnapshotBeforeUpdate(s.elementType===s.type?Ce:tr(s.type,Ce),vt);q.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var G=s.stateNode.containerInfo;G.nodeType===1?G.textContent="":G.nodeType===9&&G.documentElement&&G.removeChild(G.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){bt(s,s.return,ye)}if(i=s.sibling,i!==null){i.return=s.return,ve=i;break}ve=s.return}return Se=Sw,Sw=!1,Se}function Xa(i,s,l){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var E=f=f.next;do{if((E.tag&i)===i){var b=E.destroy;E.destroy=void 0,b!==void 0&&em(s,l,b)}E=E.next}while(E!==f)}}function xc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var f=l.create;l.destroy=f()}l=l.next}while(l!==s)}}function tm(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function Aw(i){var s=i.alternate;s!==null&&(i.alternate=null,Aw(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[xr],delete s[Ha],delete s[Ep],delete s[n9],delete s[r9])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function Cw(i){return i.tag===5||i.tag===3||i.tag===4}function kw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Cw(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function nm(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=Jl));else if(f!==4&&(i=i.child,i!==null))for(nm(i,s,l),i=i.sibling;i!==null;)nm(i,s,l),i=i.sibling}function rm(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(rm(i,s,l),i=i.sibling;i!==null;)rm(i,s,l),i=i.sibling}var Vt=null,nr=!1;function mi(i,s,l){for(l=l.child;l!==null;)Nw(i,s,l),l=l.sibling}function Nw(i,s,l){if(Tr&&typeof Tr.onCommitFiberUnmount=="function")try{Tr.onCommitFiberUnmount(Ll,l)}catch(L){}switch(l.tag){case 5:en||ms(l,s);case 6:var f=Vt,E=nr;Vt=null,mi(i,s,l),Vt=f,nr=E,Vt!==null&&(nr?(i=Vt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Vt.removeChild(l.stateNode));break;case 18:Vt!==null&&(nr?(i=Vt,l=l.stateNode,i.nodeType===8?gp(i.parentNode,l):i.nodeType===1&&gp(i,l),Na(i)):gp(Vt,l.stateNode));break;case 4:f=Vt,E=nr,Vt=l.stateNode.containerInfo,nr=!0,mi(i,s,l),Vt=f,nr=E;break;case 0:case 11:case 14:case 15:if(!en&&(f=l.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){E=f=f.next;do{var b=E,w=b.destroy;b=b.tag,w!==void 0&&((b&2)!==0||(b&4)!==0)&&em(l,s,w),E=E.next}while(E!==f)}mi(i,s,l);break;case 1:if(!en&&(ms(l,s),f=l.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=l.memoizedProps,f.state=l.memoizedState,f.componentWillUnmount()}catch(L){bt(l,s,L)}mi(i,s,l);break;case 21:mi(i,s,l);break;case 22:l.mode&1?(en=(f=en)||l.memoizedState!==null,mi(i,s,l),en=f):mi(i,s,l);break;default:mi(i,s,l)}}function Ow(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new b9),s.forEach(function(f){var E=N9.bind(null,i,f);l.has(f)||(l.add(f),f.then(E,E))})}}function rr(i,s){var l=s.deletions;if(l!==null)for(var f=0;f<l.length;f++){var E=l[f];try{var b=i,w=s,L=w;e:for(;L!==null;){switch(L.tag){case 5:Vt=L.stateNode,nr=!1;break e;case 3:Vt=L.stateNode.containerInfo,nr=!0;break e;case 4:Vt=L.stateNode.containerInfo,nr=!0;break e}L=L.return}if(Vt===null)throw Error(n(160));Nw(b,w,E),Vt=null,nr=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(te){bt(E,s,te)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Iw(s,i),s=s.sibling}function Iw(i,s){var l=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(rr(s,i),vr(i),f&4){try{Xa(3,i,i.return),xc(3,i)}catch(Ce){bt(i,i.return,Ce)}try{Xa(5,i,i.return)}catch(Ce){bt(i,i.return,Ce)}}break;case 1:rr(s,i),vr(i),f&512&&l!==null&&ms(l,l.return);break;case 5:if(rr(s,i),vr(i),f&512&&l!==null&&ms(l,l.return),i.flags&32){var E=i.stateNode;try{Xe(E,"")}catch(Ce){bt(i,i.return,Ce)}}if(f&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,w=l!==null?l.memoizedProps:b,L=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&ya(E,b),br(L,w);var te=br(L,b);for(w=0;w<U.length;w+=2){var de=U[w],me=U[w+1];de==="style"?ni(E,me):de==="dangerouslySetInnerHTML"?Ye(E,me):de==="children"?Xe(E,me):R(E,de,me,te)}switch(L){case"input":Wo(E,b);break;case"textarea":Nl(E,b);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var we=b.value;we!=null?ti(E,!!b.multiple,we,!1):ue!==!!b.multiple&&(b.defaultValue!=null?ti(E,!!b.multiple,b.defaultValue,!0):ti(E,!!b.multiple,b.multiple?[]:"",!1))}E[Ha]=b}catch(Ce){bt(i,i.return,Ce)}}break;case 6:if(rr(s,i),vr(i),f&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Ce){bt(i,i.return,Ce)}}break;case 3:if(rr(s,i),vr(i),f&4&&l!==null&&l.memoizedState.isDehydrated)try{Na(s.containerInfo)}catch(Ce){bt(i,i.return,Ce)}break;case 4:rr(s,i),vr(i);break;case 13:rr(s,i),vr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(sm=_t())),f&4&&Ow(i);break;case 22:if(de=l!==null&&l.memoizedState!==null,i.mode&1?(en=(te=en)||de,rr(s,i),en=te):rr(s,i),vr(i),f&8192){if(te=i.memoizedState!==null,(i.stateNode.isHidden=te)&&!de&&(i.mode&1)!==0)for(ve=i,de=i.child;de!==null;){for(me=ve=de;ve!==null;){switch(ue=ve,we=ue.child,ue.tag){case 0:case 11:case 14:case 15:Xa(4,ue,ue.return);break;case 1:ms(ue,ue.return);var Se=ue.stateNode;if(typeof Se.componentWillUnmount=="function"){f=ue,l=ue.return;try{s=f,Se.props=s.memoizedProps,Se.state=s.memoizedState,Se.componentWillUnmount()}catch(Ce){bt(f,l,Ce)}}break;case 5:ms(ue,ue.return);break;case 22:if(ue.memoizedState!==null){Lw(me);continue}}we!==null?(we.return=ue,ve=we):Lw(me)}de=de.sibling}e:for(de=null,me=i;;){if(me.tag===5){if(de===null){de=me;try{E=me.stateNode,te?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=me.stateNode,U=me.memoizedProps.style,w=U!=null&&U.hasOwnProperty("display")?U.display:null,L.style.display=Mn("display",w))}catch(Ce){bt(i,i.return,Ce)}}}else if(me.tag===6){if(de===null)try{me.stateNode.nodeValue=te?"":me.memoizedProps}catch(Ce){bt(i,i.return,Ce)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===i)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===i)break e;for(;me.sibling===null;){if(me.return===null||me.return===i)break e;de===me&&(de=null),me=me.return}de===me&&(de=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:rr(s,i),vr(i),f&4&&Ow(i);break;case 21:break;default:rr(s,i),vr(i)}}function vr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(Cw(l)){var f=l;break e}l=l.return}throw Error(n(160))}switch(f.tag){case 5:var E=f.stateNode;f.flags&32&&(Xe(E,""),f.flags&=-33);var b=kw(i);rm(i,b,E);break;case 3:case 4:var w=f.stateNode.containerInfo,L=kw(i);nm(i,L,w);break;default:throw Error(n(161))}}catch(U){bt(i,i.return,U)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function x9(i,s,l){ve=i,Rw(i)}function Rw(i,s,l){for(var f=(i.mode&1)!==0;ve!==null;){var E=ve,b=E.child;if(E.tag===22&&f){var w=E.memoizedState!==null||Tc;if(!w){var L=E.alternate,U=L!==null&&L.memoizedState!==null||en;L=Tc;var te=en;if(Tc=w,(en=U)&&!te)for(ve=E;ve!==null;)w=ve,U=w.child,w.tag===22&&w.memoizedState!==null?Dw(E):U!==null?(U.return=w,ve=U):Dw(E);for(;b!==null;)ve=b,Rw(b),b=b.sibling;ve=E,Tc=L,en=te}Pw(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,ve=b):Pw(i)}}function Pw(i){for(;ve!==null;){var s=ve;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:en||xc(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!en)if(l===null)f.componentDidMount();else{var E=s.elementType===s.type?l.memoizedProps:tr(s.type,l.memoizedProps);f.componentDidUpdate(E,l.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&Lx(s,b,f);break;case 3:var w=s.updateQueue;if(w!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}Lx(s,w,l)}break;case 5:var L=s.stateNode;if(l===null&&s.flags&4){l=L;var U=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&l.focus();break;case"img":U.src&&(l.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var te=s.alternate;if(te!==null){var de=te.memoizedState;if(de!==null){var me=de.dehydrated;me!==null&&Na(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}en||s.flags&512&&tm(s)}catch(ue){bt(s,s.return,ue)}}if(s===i){ve=null;break}if(l=s.sibling,l!==null){l.return=s.return,ve=l;break}ve=s.return}}function Lw(i){for(;ve!==null;){var s=ve;if(s===i){ve=null;break}var l=s.sibling;if(l!==null){l.return=s.return,ve=l;break}ve=s.return}}function Dw(i){for(;ve!==null;){var s=ve;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{xc(4,s)}catch(U){bt(s,l,U)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var E=s.return;try{f.componentDidMount()}catch(U){bt(s,E,U)}}var b=s.return;try{tm(s)}catch(U){bt(s,b,U)}break;case 5:var w=s.return;try{tm(s)}catch(U){bt(s,w,U)}}}catch(U){bt(s,s.return,U)}if(s===i){ve=null;break}var L=s.sibling;if(L!==null){L.return=s.return,ve=L;break}ve=s.return}}var w9=Math.ceil,wc=H.ReactCurrentDispatcher,im=H.ReactCurrentOwner,zn=H.ReactCurrentBatchConfig,Je=0,Ht=null,kt=null,qt=0,Nn=0,gs=ci(0),Pt=0,Ja=null,no=0,_c=0,om=0,Za=null,yn=null,sm=0,Es=1/0,zr=null,vc=!1,am=null,gi=null,Sc=!1,Ei=null,Ac=0,eu=0,um=null,Cc=-1,kc=0;function on(){return(Je&6)!==0?_t():Cc!==-1?Cc:Cc=_t()}function yi(i){return(i.mode&1)===0?1:(Je&2)!==0&&qt!==0?qt&-qt:o9.transition!==null?(kc===0&&(kc=kT()),kc):(i=nt,i!==0||(i=window.event,i=i===void 0?16:FT(i.type)),i)}function ir(i,s,l,f){if(50<eu)throw eu=0,um=null,Error(n(185));va(i,l,f),((Je&2)===0||i!==Ht)&&(i===Ht&&((Je&2)===0&&(_c|=l),Pt===4&&bi(i,qt)),bn(i,f),l===1&&Je===0&&(s.mode&1)===0&&(Es=_t()+500,nc&&fi()))}function bn(i,s){var l=i.callbackNode;oM(i,s);var f=Fl(i,i===Ht?qt:0);if(f===0)l!==null&&ST(l),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(l!=null&&ST(l),s===1)i.tag===0?i9(Fw.bind(null,i)):wx(Fw.bind(null,i)),e9(function(){(Je&6)===0&&fi()}),l=null;else{switch(NT(f)){case 1:l=zh;break;case 4:l=AT;break;case 16:l=Pl;break;case 536870912:l=CT;break;default:l=Pl}l=qw(l,Mw.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function Mw(i,s){if(Cc=-1,kc=0,(Je&6)!==0)throw Error(n(327));var l=i.callbackNode;if(ys()&&i.callbackNode!==l)return null;var f=Fl(i,i===Ht?qt:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=Nc(i,f);else{s=f;var E=Je;Je|=2;var b=Uw();(Ht!==i||qt!==s)&&(zr=null,Es=_t()+500,io(i,s));do try{S9();break}catch(L){Bw(i,L)}while(!0);Ap(),wc.current=b,Je=E,kt!==null?s=0:(Ht=null,qt=0,s=Pt)}if(s!==0){if(s===2&&(E=jh(i),E!==0&&(f=E,s=lm(i,E))),s===1)throw l=Ja,io(i,0),bi(i,f),bn(i,_t()),l;if(s===6)bi(i,f);else{if(E=i.current.alternate,(f&30)===0&&!_9(E)&&(s=Nc(i,f),s===2&&(b=jh(i),b!==0&&(f=b,s=lm(i,b))),s===1))throw l=Ja,io(i,0),bi(i,f),bn(i,_t()),l;switch(i.finishedWork=E,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:oo(i,yn,zr);break;case 3:if(bi(i,f),(f&130023424)===f&&(s=sm+500-_t(),10<s)){if(Fl(i,0)!==0)break;if(E=i.suspendedLanes,(E&f)!==f){on(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=mp(oo.bind(null,i,yn,zr),s);break}oo(i,yn,zr);break;case 4:if(bi(i,f),(f&4194240)===f)break;for(s=i.eventTimes,E=-1;0<f;){var w=31-Jn(f);b=1<<w,w=s[w],w>E&&(E=w),f&=~b}if(f=E,f=_t()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*w9(f/1960))-f,10<f){i.timeoutHandle=mp(oo.bind(null,i,yn,zr),f);break}oo(i,yn,zr);break;case 5:oo(i,yn,zr);break;default:throw Error(n(329))}}}return bn(i,_t()),i.callbackNode===l?Mw.bind(null,i):null}function lm(i,s){var l=Za;return i.current.memoizedState.isDehydrated&&(io(i,s).flags|=256),i=Nc(i,s),i!==2&&(s=yn,yn=l,s!==null&&cm(s)),i}function cm(i){yn===null?yn=i:yn.push.apply(yn,i)}function _9(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var f=0;f<l.length;f++){var E=l[f],b=E.getSnapshot;E=E.value;try{if(!Zn(b(),E))return!1}catch(w){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function bi(i,s){for(s&=~om,s&=~_c,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-Jn(s),f=1<<l;i[l]=-1,s&=~f}}function Fw(i){if((Je&6)!==0)throw Error(n(327));ys();var s=Fl(i,0);if((s&1)===0)return bn(i,_t()),null;var l=Nc(i,s);if(i.tag!==0&&l===2){var f=jh(i);f!==0&&(s=f,l=lm(i,f))}if(l===1)throw l=Ja,io(i,0),bi(i,s),bn(i,_t()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,oo(i,yn,zr),bn(i,_t()),null}function dm(i,s){var l=Je;Je|=1;try{return i(s)}finally{Je=l,Je===0&&(Es=_t()+500,nc&&fi())}}function ro(i){Ei!==null&&Ei.tag===0&&(Je&6)===0&&ys();var s=Je;Je|=1;var l=zn.transition,f=nt;try{if(zn.transition=null,nt=1,i)return i()}finally{nt=f,zn.transition=l,Je=s,(Je&6)===0&&fi()}}function fm(){Nn=gs.current,ct(gs)}function io(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,ZM(l)),kt!==null)for(l=kt.return;l!==null;){var f=l;switch(xp(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&ec();break;case 3:hs(),ct(mn),ct(Xt),Lp();break;case 5:Rp(f);break;case 4:hs();break;case 13:ct(gt);break;case 19:ct(gt);break;case 10:Cp(f.type._context);break;case 22:case 23:fm()}l=l.return}if(Ht=i,kt=i=Ti(i.current,null),qt=Nn=s,Pt=0,Ja=null,om=_c=no=0,yn=Za=null,Zi!==null){for(s=0;s<Zi.length;s++)if(l=Zi[s],f=l.interleaved,f!==null){l.interleaved=null;var E=f.next,b=l.pending;if(b!==null){var w=b.next;b.next=E,f.next=w}l.pending=f}Zi=null}return i}function Bw(i,s){do{var l=kt;try{if(Ap(),fc.current=gc,hc){for(var f=Et.memoizedState;f!==null;){var E=f.queue;E!==null&&(E.pending=null),f=f.next}hc=!1}if(to=0,Ut=Rt=Et=null,Ya=!1,Wa=0,im.current=null,l===null||l.return===null){Pt=1,Ja=s,kt=null;break}e:{var b=i,w=l.return,L=l,U=s;if(s=qt,L.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var te=U,de=L,me=de.tag;if((de.mode&1)===0&&(me===0||me===11||me===15)){var ue=de.alternate;ue?(de.updateQueue=ue.updateQueue,de.memoizedState=ue.memoizedState,de.lanes=ue.lanes):(de.updateQueue=null,de.memoizedState=null)}var we=lw(w);if(we!==null){we.flags&=-257,cw(we,w,L,b,s),we.mode&1&&uw(b,te,s),s=we,U=te;var Se=s.updateQueue;if(Se===null){var Ce=new Set;Ce.add(U),s.updateQueue=Ce}else Se.add(U);break e}else{if((s&1)===0){uw(b,te,s),hm();break e}U=Error(n(426))}}else if(pt&&L.mode&1){var vt=lw(w);if(vt!==null){(vt.flags&65536)===0&&(vt.flags|=256),cw(vt,w,L,b,s),vp(ps(U,L));break e}}b=U=ps(U,L),Pt!==4&&(Pt=2),Za===null?Za=[b]:Za.push(b),b=w;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var q=sw(b,U,s);Px(b,q);break e;case 1:L=U;var j=b.type,G=b.stateNode;if((b.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||G!==null&&typeof G.componentDidCatch=="function"&&(gi===null||!gi.has(G)))){b.flags|=65536,s&=-s,b.lanes|=s;var ye=aw(b,L,s);Px(b,ye);break e}}b=b.return}while(b!==null)}zw(l)}catch(Ne){s=Ne,kt===l&&l!==null&&(kt=l=l.return);continue}break}while(!0)}function Uw(){var i=wc.current;return wc.current=gc,i===null?gc:i}function hm(){(Pt===0||Pt===3||Pt===2)&&(Pt=4),Ht===null||(no&268435455)===0&&(_c&268435455)===0||bi(Ht,qt)}function Nc(i,s){var l=Je;Je|=2;var f=Uw();(Ht!==i||qt!==s)&&(zr=null,io(i,s));do try{v9();break}catch(E){Bw(i,E)}while(!0);if(Ap(),Je=l,wc.current=f,kt!==null)throw Error(n(261));return Ht=null,qt=0,Pt}function v9(){for(;kt!==null;)Hw(kt)}function S9(){for(;kt!==null&&!Q8();)Hw(kt)}function Hw(i){var s=Vw(i.alternate,i,Nn);i.memoizedProps=i.pendingProps,s===null?zw(i):kt=s,im.current=null}function zw(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=E9(l,s,Nn),l!==null){kt=l;return}}else{if(l=y9(l,s),l!==null){l.flags&=32767,kt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Pt=6,kt=null;return}}if(s=s.sibling,s!==null){kt=s;return}kt=s=i}while(s!==null);Pt===0&&(Pt=5)}function oo(i,s,l){var f=nt,E=zn.transition;try{zn.transition=null,nt=1,A9(i,s,l,f)}finally{zn.transition=E,nt=f}return null}function A9(i,s,l,f){do ys();while(Ei!==null);if((Je&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=l.lanes|l.childLanes;if(sM(i,b),i===Ht&&(kt=Ht=null,qt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Sc||(Sc=!0,qw(Pl,function(){return ys(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=zn.transition,zn.transition=null;var w=nt;nt=1;var L=Je;Je|=4,im.current=null,T9(i,l),Iw(l,i),YM(hp),Hl=!!fp,hp=fp=null,i.current=l,x9(l),X8(),Je=L,nt=w,zn.transition=b}else i.current=l;if(Sc&&(Sc=!1,Ei=i,Ac=E),b=i.pendingLanes,b===0&&(gi=null),eM(l.stateNode),bn(i,_t()),s!==null)for(f=i.onRecoverableError,l=0;l<s.length;l++)E=s[l],f(E.value,{componentStack:E.stack,digest:E.digest});if(vc)throw vc=!1,i=am,am=null,i;return(Ac&1)!==0&&i.tag!==0&&ys(),b=i.pendingLanes,(b&1)!==0?i===um?eu++:(eu=0,um=i):eu=0,fi(),null}function ys(){if(Ei!==null){var i=NT(Ac),s=zn.transition,l=nt;try{if(zn.transition=null,nt=16>i?16:i,Ei===null)var f=!1;else{if(i=Ei,Ei=null,Ac=0,(Je&6)!==0)throw Error(n(331));var E=Je;for(Je|=4,ve=i.current;ve!==null;){var b=ve,w=b.child;if((ve.flags&16)!==0){var L=b.deletions;if(L!==null){for(var U=0;U<L.length;U++){var te=L[U];for(ve=te;ve!==null;){var de=ve;switch(de.tag){case 0:case 11:case 15:Xa(8,de,b)}var me=de.child;if(me!==null)me.return=de,ve=me;else for(;ve!==null;){de=ve;var ue=de.sibling,we=de.return;if(Aw(de),de===te){ve=null;break}if(ue!==null){ue.return=we,ve=ue;break}ve=we}}}var Se=b.alternate;if(Se!==null){var Ce=Se.child;if(Ce!==null){Se.child=null;do{var vt=Ce.sibling;Ce.sibling=null,Ce=vt}while(Ce!==null)}}ve=b}}if((b.subtreeFlags&2064)!==0&&w!==null)w.return=b,ve=w;else e:for(;ve!==null;){if(b=ve,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Xa(9,b,b.return)}var q=b.sibling;if(q!==null){q.return=b.return,ve=q;break e}ve=b.return}}var j=i.current;for(ve=j;ve!==null;){w=ve;var G=w.child;if((w.subtreeFlags&2064)!==0&&G!==null)G.return=w,ve=G;else e:for(w=j;ve!==null;){if(L=ve,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:xc(9,L)}}catch(Ne){bt(L,L.return,Ne)}if(L===w){ve=null;break e}var ye=L.sibling;if(ye!==null){ye.return=L.return,ve=ye;break e}ve=L.return}}if(Je=E,fi(),Tr&&typeof Tr.onPostCommitFiberRoot=="function")try{Tr.onPostCommitFiberRoot(Ll,i)}catch(Ne){}f=!0}return f}finally{nt=l,zn.transition=s}}return!1}function jw(i,s,l){s=ps(l,s),s=sw(i,s,1),i=pi(i,s,1),s=on(),i!==null&&(va(i,1,s),bn(i,s))}function bt(i,s,l){if(i.tag===3)jw(i,i,l);else for(;s!==null;){if(s.tag===3){jw(s,i,l);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(gi===null||!gi.has(f))){i=ps(l,i),i=aw(s,i,1),s=pi(s,i,1),i=on(),s!==null&&(va(s,1,i),bn(s,i));break}}s=s.return}}function C9(i,s,l){var f=i.pingCache;f!==null&&f.delete(s),s=on(),i.pingedLanes|=i.suspendedLanes&l,Ht===i&&(qt&l)===l&&(Pt===4||Pt===3&&(qt&130023424)===qt&&500>_t()-sm?io(i,0):om|=l),bn(i,s)}function $w(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ml,Ml<<=1,(Ml&130023424)===0&&(Ml=4194304)));var l=on();i=Br(i,s),i!==null&&(va(i,s,l),bn(i,l))}function k9(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),$w(i,l)}function N9(i,s){var l=0;switch(i.tag){case 13:var f=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),$w(i,l)}var Vw;Vw=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||mn.current)En=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return En=!1,g9(i,s,l);En=(i.flags&131072)!==0}else En=!1,pt&&(s.flags&1048576)!==0&&_x(s,ic,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;bc(i,s),i=s.pendingProps;var E=ss(s,Xt.current);fs(s,l),E=Fp(null,s,f,i,E,l);var b=Bp();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,gn(f)?(b=!0,tc(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Op(s),E.updater=Ec,s.stateNode=E,E._reactInternals=s,Vp(s,f,i,l),s=Gp(null,s,f,!0,b,l)):(s.tag=0,pt&&b&&Tp(s),rn(null,s,E,l),s=s.child),s;case 16:f=s.elementType;e:{switch(bc(i,s),i=s.pendingProps,E=f._init,f=E(f._payload),s.type=f,E=s.tag=I9(f),i=tr(f,i),E){case 0:s=Wp(null,s,f,i,l);break e;case 1:s=gw(null,s,f,i,l);break e;case 11:s=dw(null,s,f,i,l);break e;case 14:s=fw(null,s,f,tr(f.type,i),l);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:tr(f,E),Wp(i,s,f,E,l);case 1:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:tr(f,E),gw(i,s,f,E,l);case 3:e:{if(Ew(s),i===null)throw Error(n(387));f=s.pendingProps,b=s.memoizedState,E=b.element,Rx(i,s),cc(s,f,null,l);var w=s.memoizedState;if(f=w.element,b.isDehydrated)if(b={element:f,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=ps(Error(n(423)),s),s=yw(i,s,f,l,E);break e}else if(f!==E){E=ps(Error(n(424)),s),s=yw(i,s,f,l,E);break e}else for(kn=li(s.stateNode.containerInfo.firstChild),Cn=s,pt=!0,er=null,l=Ox(s,null,f,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ls(),f===E){s=Hr(i,s,l);break e}rn(i,s,f,l)}s=s.child}return s;case 5:return Dx(s),i===null&&_p(s),f=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,w=E.children,pp(f,E)?w=null:b!==null&&pp(f,b)&&(s.flags|=32),mw(i,s),rn(i,s,w,l),s.child;case 6:return i===null&&_p(s),null;case 13:return bw(i,s,l);case 4:return Ip(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=cs(s,null,f,l):rn(i,s,f,l),s.child;case 11:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:tr(f,E),dw(i,s,f,E,l);case 7:return rn(i,s,s.pendingProps,l),s.child;case 8:return rn(i,s,s.pendingProps.children,l),s.child;case 12:return rn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(f=s.type._context,E=s.pendingProps,b=s.memoizedProps,w=E.value,ut(ac,f._currentValue),f._currentValue=w,b!==null)if(Zn(b.value,w)){if(b.children===E.children&&!mn.current){s=Hr(i,s,l);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var L=b.dependencies;if(L!==null){w=b.child;for(var U=L.firstContext;U!==null;){if(U.context===f){if(b.tag===1){U=Ur(-1,l&-l),U.tag=2;var te=b.updateQueue;if(te!==null){te=te.shared;var de=te.pending;de===null?U.next=U:(U.next=de.next,de.next=U),te.pending=U}}b.lanes|=l,U=b.alternate,U!==null&&(U.lanes|=l),kp(b.return,l,s),L.lanes|=l;break}U=U.next}}else if(b.tag===10)w=b.type===s.type?null:b.child;else if(b.tag===18){if(w=b.return,w===null)throw Error(n(341));w.lanes|=l,L=w.alternate,L!==null&&(L.lanes|=l),kp(w,l,s),w=b.sibling}else w=b.child;if(w!==null)w.return=b;else for(w=b;w!==null;){if(w===s){w=null;break}if(b=w.sibling,b!==null){b.return=w.return,w=b;break}w=w.return}b=w}rn(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,f=s.pendingProps.children,fs(s,l),E=Un(E),f=f(E),s.flags|=1,rn(i,s,f,l),s.child;case 14:return f=s.type,E=tr(f,s.pendingProps),E=tr(f.type,E),fw(i,s,f,E,l);case 15:return hw(i,s,s.type,s.pendingProps,l);case 17:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:tr(f,E),bc(i,s),s.tag=1,gn(f)?(i=!0,tc(s)):i=!1,fs(s,l),iw(s,f,E),Vp(s,f,E,l),Gp(null,s,f,!0,i,l);case 19:return xw(i,s,l);case 22:return pw(i,s,l)}throw Error(n(156,s.tag))};function qw(i,s){return vT(i,s)}function O9(i,s,l,f){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jn(i,s,l,f){return new O9(i,s,l,f)}function pm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function I9(i){if(typeof i=="function")return pm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===se)return 11;if(i===fe)return 14}return 2}function Ti(i,s){var l=i.alternate;return l===null?(l=jn(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Oc(i,s,l,f,E,b){var w=2;if(f=i,typeof i=="function")pm(i)&&(w=1);else if(typeof i=="string")w=5;else e:switch(i){case K:return so(l.children,E,b,s);case ce:w=8,E|=8;break;case be:return i=jn(12,l,s,E|2),i.elementType=be,i.lanes=b,i;case J:return i=jn(13,l,s,E),i.elementType=J,i.lanes=b,i;case re:return i=jn(19,l,s,E),i.elementType=re,i.lanes=b,i;case he:return Ic(l,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case z:w=10;break e;case X:w=9;break e;case se:w=11;break e;case fe:w=14;break e;case ke:w=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=jn(w,l,s,E),s.elementType=i,s.type=f,s.lanes=b,s}function so(i,s,l,f){return i=jn(7,i,f,s),i.lanes=l,i}function Ic(i,s,l,f){return i=jn(22,i,f,s),i.elementType=he,i.lanes=l,i.stateNode={isHidden:!1},i}function mm(i,s,l){return i=jn(6,i,null,s),i.lanes=l,i}function gm(i,s,l){return s=jn(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function R9(i,s,l,f,E){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=$h(0),this.expirationTimes=$h(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$h(0),this.identifierPrefix=f,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function Em(i,s,l,f,E,b,w,L,U){return i=new R9(i,s,l,L,U),s===1?(s=1,b===!0&&(s|=8)):s=0,b=jn(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:f,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Op(b),i}function P9(i,s,l){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,key:f==null?null:""+f,children:i,containerInfo:s,implementation:l}}function Yw(i){if(!i)return di;i=i._reactInternals;e:{if(Gi(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(gn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(gn(l))return Tx(i,l,s)}return s}function Ww(i,s,l,f,E,b,w,L,U){return i=Em(l,f,!0,i,E,b,w,L,U),i.context=Yw(null),l=i.current,f=on(),E=yi(l),b=Ur(f,E),b.callback=s!=null?s:null,pi(l,b,E),i.current.lanes=E,va(i,E,f),bn(i,f),i}function Rc(i,s,l,f){var E=s.current,b=on(),w=yi(E);return l=Yw(l),s.context===null?s.context=l:s.pendingContext=l,s=Ur(b,w),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=pi(E,s,w),i!==null&&(ir(i,E,w,b),lc(i,E,w)),w}function Pc(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Gw(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function ym(i,s){Gw(i,s),(i=i.alternate)&&Gw(i,s)}function L9(){return null}var Kw=typeof reportError=="function"?reportError:function(i){console.error(i)};function bm(i){this._internalRoot=i}Lc.prototype.render=bm.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Rc(i,s,null,null)},Lc.prototype.unmount=bm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;ro(function(){Rc(null,i,null,null)}),s[Lr]=null}};function Lc(i){this._internalRoot=i}Lc.prototype.unstable_scheduleHydration=function(i){if(i){var s=RT();i={blockedOn:null,target:i,priority:s};for(var l=0;l<si.length&&s!==0&&s<si[l].priority;l++);si.splice(l,0,i),l===0&&DT(i)}};function Tm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Dc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Qw(){}function D9(i,s,l,f,E){if(E){if(typeof f=="function"){var b=f;f=function(){var te=Pc(w);b.call(te)}}var w=Ww(s,f,i,0,null,!1,!1,"",Qw);return i._reactRootContainer=w,i[Lr]=w.current,Ba(i.nodeType===8?i.parentNode:i),ro(),w}for(;E=i.lastChild;)i.removeChild(E);if(typeof f=="function"){var L=f;f=function(){var te=Pc(U);L.call(te)}}var U=Em(i,0,!1,null,null,!1,!1,"",Qw);return i._reactRootContainer=U,i[Lr]=U.current,Ba(i.nodeType===8?i.parentNode:i),ro(function(){Rc(s,U,l,f)}),U}function Mc(i,s,l,f,E){var b=l._reactRootContainer;if(b){var w=b;if(typeof E=="function"){var L=E;E=function(){var U=Pc(w);L.call(U)}}Rc(s,w,i,E)}else w=D9(l,s,i,E,f);return Pc(w)}OT=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=_a(s.pendingLanes);l!==0&&(Vh(s,l|1),bn(s,_t()),(Je&6)===0&&(Es=_t()+500,fi()))}break;case 13:ro(function(){var f=Br(i,1);if(f!==null){var E=on();ir(f,i,1,E)}}),ym(i,1)}},qh=function(i){if(i.tag===13){var s=Br(i,134217728);if(s!==null){var l=on();ir(s,i,134217728,l)}ym(i,134217728)}},IT=function(i){if(i.tag===13){var s=yi(i),l=Br(i,s);if(l!==null){var f=on();ir(l,i,s,f)}ym(i,s)}},RT=function(){return nt},PT=function(i,s){var l=nt;try{return nt=i,s()}finally{nt=l}},Fh=function(i,s,l){switch(s){case"input":if(Wo(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var f=l[s];if(f!==i&&f.form===i.form){var E=Zl(f);if(!E)throw Error(n(90));Yi(f),Wo(f,E)}}}break;case"textarea":Nl(i,l);break;case"select":s=l.value,s!=null&&ti(i,!!l.multiple,s,!1)}},ET=dm,yT=ro;var M9={usingClientEntryPoint:!1,Events:[za,is,Zl,mT,gT,dm]},tu={findFiberByHostInstance:Ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},F9={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:H.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=wT(i),i===null?null:i.stateNode},findFiberByHostInstance:tu.findFiberByHostInstance||L9,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var Fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fc.isDisabled&&Fc.supportsFiber)try{Ll=Fc.inject(F9),Tr=Fc}catch(i){}}return ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M9,ln.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Tm(s))throw Error(n(200));return P9(i,s,null,l)},ln.createRoot=function(i,s){if(!Tm(i))throw Error(n(299));var l=!1,f="",E=Kw;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=Em(i,1,!1,null,null,l,!1,f,E),i[Lr]=s.current,Ba(i.nodeType===8?i.parentNode:i),new bm(s)},ln.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=wT(s),i=i===null?null:i.stateNode,i},ln.flushSync=function(i){return ro(i)},ln.hydrate=function(i,s,l){if(!Dc(s))throw Error(n(200));return Mc(null,i,s,!0,l)},ln.hydrateRoot=function(i,s,l){if(!Tm(i))throw Error(n(405));var f=l!=null&&l.hydratedSources||null,E=!1,b="",w=Kw;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),s=Ww(s,null,i,1,l!=null?l:null,E,!1,b,w),i[Lr]=s.current,Ba(i),f)for(i=0;i<f.length;i++)l=f[i],E=l._getVersion,E=E(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,E]:s.mutableSourceEagerHydrationData.push(l,E);return new Lc(s)},ln.render=function(i,s,l){if(!Dc(s))throw Error(n(200));return Mc(null,i,s,!1,l)},ln.unmountComponentAtNode=function(i){if(!Dc(i))throw Error(n(40));return i._reactRootContainer?(ro(function(){Mc(null,null,i,!1,function(){i._reactRootContainer=null,i[Lr]=null})}),!0):!1},ln.unstable_batchedUpdates=dm,ln.unstable_renderSubtreeIntoContainer=function(i,s,l,f){if(!Dc(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Mc(i,s,l,!1,f)},ln.version="18.3.1-next-f1338f8080-20240426",ln}var F0;function B0(){if(F0)return vd.exports;F0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),vd.exports=CS(),vd.exports}var Os=B0();function U0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=U0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=U0(e))&&(r&&(r+=" "),r+=t);return r}var H0={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},z0=wi.createContext&&wi.createContext(H0),kS=["attr","size","title"];function NS(e,t){if(e==null)return{};var n=OS(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OS(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Au(){return Au=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Au.apply(this,arguments)}function j0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Cu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j0(Object(n),!0).forEach(function(r){IS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IS(e,t,n){return t=RS(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RS(e){var t=PS(e,"string");return typeof t=="symbol"?t:t+""}function PS(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $0(e){return e&&e.map((t,n)=>wi.createElement(t.tag,Cu({key:n},t.attr),$0(t.child)))}function mt(e){return t=>wi.createElement(LS,Au({attr:Cu({},e.attr)},t),$0(e.child))}function LS(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=NS(e,kS),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),wi.createElement("svg",Au({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Cu(Cu({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&wi.createElement("title",null,a),e.children)};return z0!==void 0?wi.createElement(z0.Consumer,null,n=>t(n)):t(H0)}function DS(e){return mt({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function MS(e){return mt({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function FS(e){return mt({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const ar=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:_.jsx("button",{className:$(e,`${M}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?_.jsx("img",{className:$(`${M}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),BS="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",US=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=Nt(),o=r==="messaging",a=o?"Open Commerce Client":"Open Copilot",u=o?_.jsx(FS,{className:$(t,`${M}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||BS,alt:"Copilot",className:$(t,`${M}-minimized-icon-img`)});return _.jsx(ar,{className:$(t,`${M}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},HS=()=>{const{globalClassName:e,themeVariables:t}=Nt(),n=()=>{vu(!1),Ci(!0)};return Os.createPortal(_.jsx("div",{className:$(e,`${M}-minimized-container`),style:t,children:_.jsx(US,{onClick:n})}),document.body)};function zS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function Ar(){const e=ee.useContext(C0);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const jS=e=>({[`${Sr}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Sr}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem"});function V0(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function $S(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function q0(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function VS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function qS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function YS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function WS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function GS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function KS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function Y0(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}const ku=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>_.jsx("button",{className:$(`${M}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),QS=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?_.jsx("img",{className:$(`${M}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(q0,{size:"16px"})},XS=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return _.jsx(ar,{className:$(e,n,`cim-${r}-component`,`${M}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:_.jsx(q0,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(ku,{className:$(e,n,`cim-${r}-component`,`${M}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&_.jsx(QS,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function pF(){}function mF(){}function W0(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function G0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const JS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ZS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eA={};function K0(e,t){return(eA.jsx?ZS:JS).test(e)}const tA=/[ \t\n\f\r]/g;function nA(e){return typeof e=="object"?e.type==="text"?Q0(e.value):!1:Q0(e)}function Q0(e){return e.replace(tA,"")===""}let Is=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Is.prototype.normal={},Is.prototype.property={},Is.prototype.space=void 0;function X0(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Is(n,r,t)}function Rs(e){return e.toLowerCase()}let cn=class{constructor(t,n){this.attribute=n,this.property=t}};cn.prototype.attribute="",cn.prototype.booleanish=!1,cn.prototype.boolean=!1,cn.prototype.commaOrSpaceSeparated=!1,cn.prototype.commaSeparated=!1,cn.prototype.defined=!1,cn.prototype.mustUseProperty=!1,cn.prototype.number=!1,cn.prototype.overloadedBoolean=!1,cn.prototype.property="",cn.prototype.spaceSeparated=!1,cn.prototype.space=void 0;let rA=0;const je=Ni(),At=Ni(),Cd=Ni(),ge=Ni(),st=Ni(),po=Ni(),Tn=Ni();function Ni(){return nu(2,++rA)}const kd=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:At,commaOrSpaceSeparated:Tn,commaSeparated:po,number:ge,overloadedBoolean:Cd,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),Nd=Object.keys(kd);let Od=class extends cn{constructor(t,n,r,o){let a=-1;if(super(t,n),J0(this,"space",o),typeof r=="number")for(;++a<Nd.length;){const u=Nd[a];J0(this,Nd[a],(r&kd[u])===kd[u])}}};Od.prototype.defined=!0;function J0(e,t,n){n&&(e[t]=n)}function mo(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Od(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Rs(r)]=r,n[Rs(a.attribute)]=r}return new Is(t,n,e.space)}const Z0=mo({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},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function eg(e,t){return t in e?e[t]:t}function tg(e,t){return eg(e,t.toLowerCase())}const iA=mo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:po,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:st,autoFocus:je,autoPlay:je,blocking:st,capture:null,charSet:null,checked:je,cite:null,className:st,cols:ge,colSpan:null,content:null,contentEditable:At,controls:je,controlsList:st,coords:ge|po,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:Cd,draggable:At,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:st,height:ge,hidden:Cd,high:ge,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:st,itemRef:st,itemScope:je,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:ge,pattern:null,ping:st,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:st,required:je,reversed:je,rows:ge,rowSpan:ge,sandbox:st,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,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:je,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:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:je,noHref:je,noShade:je,noWrap:je,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:je,disableRemotePlayback:je,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:tg}),oA=mo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Tn,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:je,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:po,g2:po,glyphName:po,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:Tn,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:Tn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Tn,rev:Tn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Tn,requiredFeatures:Tn,requiredFonts:Tn,requiredFormats:Tn,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:Tn,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:Tn,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:Tn,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},space:"svg",transform:eg}),ng=mo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),rg=mo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:tg}),ig=mo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),sA={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},aA=/[A-Z]/g,og=/-[a-z]/g,uA=/^data[-\w.:]+$/i;function Id(e,t){const n=Rs(t);let r=t,o=cn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uA.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(og,cA);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!og.test(a)){let u=a.replace(aA,lA);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Od}return new o(r,t)}function lA(e){return"-"+e.toLowerCase()}function cA(e){return e.charAt(1).toUpperCase()}const Nu=X0([Z0,iA,ng,rg,ig],"html"),go=X0([Z0,oA,ng,rg,ig],"svg");function sg(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ag(e){return e.join(" ").trim()}var Eo={},Rd,ug;function dA(){if(ug)return Rd;ug=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
24
+ `,h="/",p="*",g="",T="comment",y="declaration";Rd=function(S,A){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];A=A||{};var C=1,O=1;function R(J){var re=J.match(t);re&&(C+=re.length);var fe=J.lastIndexOf(d);O=~fe?J.length-fe:O+J.length}function H(){var J={line:C,column:O};return function(re){return re.position=new W(J),ce(),re}}function W(J){this.start=J,this.end={line:C,column:O},this.source=A.source}W.prototype.content=S;function F(J){var re=new Error(A.source+":"+C+":"+O+": "+J);if(re.reason=J,re.filename=A.source,re.line=C,re.column=O,re.source=S,!A.silent)throw re}function K(J){var re=J.exec(S);if(re){var fe=re[0];return R(fe),S=S.slice(fe.length),re}}function ce(){K(n)}function be(J){var re;for(J=J||[];re=z();)re!==!1&&J.push(re);return J}function z(){var J=H();if(!(h!=S.charAt(0)||p!=S.charAt(1))){for(var re=2;g!=S.charAt(re)&&(p!=S.charAt(re)||h!=S.charAt(re+1));)++re;if(re+=2,g===S.charAt(re-1))return F("End of comment missing");var fe=S.slice(2,re-2);return O+=2,R(fe),S=S.slice(re),O+=2,J({type:T,comment:fe})}}function X(){var J=H(),re=K(r);if(re){if(z(),!K(o))return F("property missing ':'");var fe=K(a),ke=J({type:y,property:x(re[0].replace(e,g)),value:fe?x(fe[0].replace(e,g)):g});return K(u),ke}}function se(){var J=[];be(J);for(var re;re=X();)re!==!1&&(J.push(re),be(J));return J}return ce(),se()};function x(S){return S?S.replace(c,g):g}return Rd}var lg;function fA(){if(lg)return Eo;lg=1;var e=Eo&&Eo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.default=n;var t=e(dA());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,p=d.value;c?o(h,p,d):p&&(a=a||{},a[h]=p)}}),a}return Eo}var Ps={},cg;function hA(){if(cg)return Ps;cg=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},u=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),a(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,u))};return Ps.camelCase=d,Ps}var Ls,dg;function pA(){if(dg)return Ls;dg=1;var e=Ls&&Ls.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(fA()),n=hA();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,Ls=r,Ls}var mA=pA();const gA=We(mA),Ou=fg("end"),ur=fg("start");function fg(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function hg(e){const t=ur(e),n=Ou(e);if(t&&n)return{start:t,end:n}}function Ds(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?pg(e.position):"start"in e||"end"in e?pg(e):"line"in e||"column"in e?Pd(e):""}function Pd(e){return mg(e&&e.line)+":"+mg(e&&e.column)}function pg(e){return Pd(e&&e.start)+"-"+Pd(e&&e.end)}function mg(e){return e&&typeof e=="number"?e:1}class Wt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=B({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=Ds(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Wt.prototype.file="",Wt.prototype.name="",Wt.prototype.reason="",Wt.prototype.message="",Wt.prototype.stack="",Wt.prototype.column=void 0,Wt.prototype.line=void 0,Wt.prototype.ancestors=void 0,Wt.prototype.cause=void 0,Wt.prototype.fatal=void 0,Wt.prototype.place=void 0,Wt.prototype.ruleId=void 0,Wt.prototype.source=void 0;const Ld={}.hasOwnProperty,EA=new Map,yA=/[A-Z]/g,bA=new Set(["table","tbody","thead","tfoot","tr"]),TA=new Set(["td","th"]),gg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xA(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=NA(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=kA(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?go:Nu,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Eg(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Eg(e,t,n){if(t.type==="element")return wA(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return _A(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return SA(e,t,n);if(t.type==="mdxjsEsm")return vA(e,t);if(t.type==="root")return AA(e,t,n);if(t.type==="text")return CA(e,t)}function wA(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=go,e.schema=o),e.ancestors.push(t);const a=bg(e,t.tagName,!1),u=OA(e,t);let c=Md(e,t);return bA.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!nA(d):!0})),yg(e,u,a,t),Dd(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function _A(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ms(e,t.position)}function vA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ms(e,t.position)}function SA(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=go,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:bg(e,t.name,!0),u=IA(e,t),c=Md(e,t);return yg(e,u,a,t),Dd(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function AA(e,t,n){const r={};return Dd(r,Md(e,t)),e.create(t,e.Fragment,r,n)}function CA(e,t){return t.value}function yg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Dd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function kA(e,t,n){return r;function r(o,a,u,c){const h=Array.isArray(u.children)?n:t;return c?h(a,u,c):h(a,u)}}function NA(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=ur(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function OA(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Ld.call(t.properties,o)){const a=RA(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&TA.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function IA(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Ms(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Ms(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Md(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:EA;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const h=o.get(d)||0;u=d+"-"+h,o.set(d,h+1)}}const c=Eg(e,a,u);c!==void 0&&n.push(c)}return n}function RA(e,t,n){const r=Id(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?G0(n):ag(n)),r.property==="style"){let o=typeof n=="object"?n:PA(e,String(n));return e.stylePropertyNameCase==="css"&&(o=LA(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?sA[r.property]||r.property:r.attribute,n]}}function PA(e,t){try{return gA(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Wt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=gg+"#cannot-parse-style-attribute",o}}function bg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=K0(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=K0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Ld.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ms(e)}function Ms(e,t){const n=new Wt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=gg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function LA(e){const t={};let n;for(n in e)Ld.call(e,n)&&(t[DA(n)]=e[n]);return t}function DA(e){let t=e.replace(yA,MA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function MA(e){return"-"+e.toLowerCase()}const Fd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},FA={};function Bd(e,t){const n=FA,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Tg(e,r,o)}function Tg(e,t,n){if(BA(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return xg(e.children,t,n)}return Array.isArray(e)?xg(e,t,n):""}function xg(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Tg(e[o],t,n);return r.join("")}function BA(e){return!!(e&&typeof e=="object")}const wg=document.createElement("i");function Ud(e){const t="&"+e+";";wg.innerHTML=t;const n=wg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function xn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function Rn(e,t){return e.length>0?(xn(e,e.length,0,t),e):t}const _g={}.hasOwnProperty;function vg(e){const t={};let n=-1;for(;++n<e.length;)UA(t,e[n]);return t}function UA(e,t){let n;for(n in t){const o=(_g.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){_g.call(o,u)||(o[u]=[]);const c=a[u];HA(o[u],Array.isArray(c)?c:c?[c]:[])}}}function HA(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);xn(e,0,0,r)}function Sg(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nn=qr(/[A-Za-z]/),Gt=qr(/[\dA-Za-z]/),zA=qr(/[#-'*+\--9=?A-Z^-~]/);function Iu(e){return e!==null&&(e<32||e===127)}const Hd=qr(/\d/),jA=qr(/[\dA-Fa-f]/),$A=qr(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function it(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const Ru=qr(new RegExp("\\p{P}|\\p{S}","u")),Oi=qr(/\s/);function qr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function yo(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Gt(e.charCodeAt(n+1))&&Gt(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Qe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ge(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ge(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const VA={tokenize:qA};function qA(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Qe(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const YA={tokenize:WA},Ag={tokenize:GA};function WA(e){const t=this,n=[];let r=0,o,a,u;return c;function c(R){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,d,h)(R)}return h(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&O();const H=t.events.length;let W=H,F;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){F=t.events[W][1].end;break}C(r);let K=H;for(;K<t.events.length;)t.events[K][1].end=B({},F),K++;return xn(t.events,W+1,0,t.events.slice(H)),t.events.length=K,h(R)}return c(R)}function h(R){if(r===n.length){if(!o)return T(R);if(o.currentConstruct&&o.currentConstruct.concrete)return x(R);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ag,p,g)(R)}function p(R){return o&&O(),C(r),T(R)}function g(R){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(R)}function T(R){return t.containerState={},e.attempt(Ag,y,x)(R)}function y(R){return r++,n.push([t.currentConstruct,t.containerState]),T(R)}function x(R){if(R===null){o&&O(),C(0),e.consume(R);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(R)}function S(R){if(R===null){A(e.exit("chunkFlow"),!0),C(0),e.consume(R);return}return Le(R)?(e.consume(R),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),S)}function A(R,H){const W=t.sliceStream(R);if(H&&W.push(null),R.previous=a,a&&(a.next=R),a=R,o.defineSkip(R.start),o.write(W),t.parser.lazy[R.start.line]){let F=o.events.length;for(;F--;)if(o.events[F][1].start.offset<u&&(!o.events[F][1].end||o.events[F][1].end.offset>u))return;const K=t.events.length;let ce=K,be,z;for(;ce--;)if(t.events[ce][0]==="exit"&&t.events[ce][1].type==="chunkFlow"){if(be){z=t.events[ce][1].end;break}be=!0}for(C(r),F=K;F<t.events.length;)t.events[F][1].end=B({},z),F++;xn(t.events,ce+1,0,t.events.slice(K)),t.events.length=F}}function C(R){let H=n.length;for(;H-- >R;){const W=n[H];t.containerState=W[1],W[0].exit.call(t,e)}n.length=R}function O(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function GA(e,t,n){return Qe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function bo(e){if(e===null||it(e)||Oi(e))return 1;if(Ru(e))return 2}function Pu(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const zd={name:"attention",resolveAll:KA,tokenize:QA};function KA(e,t){let n=-1,r,o,a,u,c,d,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g=B({},e[r][1].end),T=B({},e[n][1].start);Cg(g,-d),Cg(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:g,end:B({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:B({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:B({},e[r][1].end),end:B({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:B({},u.start),end:B({},c.end)},e[r][1].end=B({},u.start),e[n][1].start=B({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Rn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Rn(h,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),h=Rn(h,Pu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Rn(h,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=Rn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,xn(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function QA(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=bo(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const h=e.exit("attentionSequence"),p=bo(d),g=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return h._open=!!(a===42?g:g&&(o||!T)),h._close=!!(a===42?T:T&&(p||!g)),t(d)}}function Cg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const XA={name:"autolink",tokenize:JA};function JA(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return nn(y)?(e.consume(y),u):y===64?n(y):h(y)}function u(y){return y===43||y===45||y===46||Gt(y)?(r=1,c(y)):h(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Gt(y))&&r++<32?(e.consume(y),c):(r=0,h(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Iu(y)?n(y):(e.consume(y),d)}function h(y){return y===64?(e.consume(y),p):zA(y)?(e.consume(y),h):n(y)}function p(y){return Gt(y)?g(y):n(y)}function g(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):T(y)}function T(y){if((y===45||Gt(y))&&r++<63){const x=y===45?T:g;return e.consume(y),x}return n(y)}}const Fs={partial:!0,tokenize:ZA};function ZA(e,t,n){return r;function r(a){return Ge(a)?Qe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const kg={continuation:{tokenize:tC},exit:nC,name:"blockQuote",tokenize:eC};function eC(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ge(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function tC(e,t,n){const r=this;return o;function o(u){return Ge(u)?Qe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(kg,t,n)(u)}}function nC(e){e.exit("blockQuote")}const Ng={name:"characterEscape",tokenize:rC};function rC(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return $A(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Og={name:"characterReference",tokenize:iC};function iC(e,t,n){const r=this;let o=0,a,u;return c;function c(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,u=Gt,p(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=jA,p):(e.enter("characterReferenceValue"),a=7,u=Hd,p(g))}function p(g){if(g===59&&o){const T=e.exit("characterReferenceValue");return u===Gt&&!Ud(r.sliceSerialize(T))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(g)&&o++<a?(e.consume(g),p):n(g)}}const Ig={partial:!0,tokenize:sC},Rg={concrete:!0,name:"codeFenced",tokenize:oC};function oC(e,t,n){const r=this,o={partial:!0,tokenize:W};let a=0,u=0,c;return d;function d(F){return h(F)}function h(F){const K=r.events[r.events.length-1];return a=K&&K[1].type==="linePrefix"?K[2].sliceSerialize(K[1],!0).length:0,c=F,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(F)}function p(F){return F===c?(u++,e.consume(F),p):u<3?n(F):(e.exit("codeFencedFenceSequence"),Ge(F)?Qe(e,g,"whitespace")(F):g(F))}function g(F){return F===null||Le(F)?(e.exit("codeFencedFence"),r.interrupt?t(F):e.check(Ig,S,H)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(F))}function T(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(F)):Ge(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qe(e,y,"whitespace")(F)):F===96&&F===c?n(F):(e.consume(F),T)}function y(F){return F===null||Le(F)?g(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(F))}function x(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(F)):F===96&&F===c?n(F):(e.consume(F),x)}function S(F){return e.attempt(o,H,A)(F)}function A(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),C}function C(F){return a>0&&Ge(F)?Qe(e,O,"linePrefix",a+1)(F):O(F)}function O(F){return F===null||Le(F)?e.check(Ig,S,H)(F):(e.enter("codeFlowValue"),R(F))}function R(F){return F===null||Le(F)?(e.exit("codeFlowValue"),O(F)):(e.consume(F),R)}function H(F){return e.exit("codeFenced"),t(F)}function W(F,K,ce){let be=0;return z;function z(fe){return F.enter("lineEnding"),F.consume(fe),F.exit("lineEnding"),X}function X(fe){return F.enter("codeFencedFence"),Ge(fe)?Qe(F,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(fe):se(fe)}function se(fe){return fe===c?(F.enter("codeFencedFenceSequence"),J(fe)):ce(fe)}function J(fe){return fe===c?(be++,F.consume(fe),J):be>=u?(F.exit("codeFencedFenceSequence"),Ge(fe)?Qe(F,re,"whitespace")(fe):re(fe)):ce(fe)}function re(fe){return fe===null||Le(fe)?(F.exit("codeFencedFence"),K(fe)):ce(fe)}}}function sC(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const jd={name:"codeIndented",tokenize:uC},aC={partial:!0,tokenize:lC};function uC(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Qe(e,a,"linePrefix",5)(h)}function a(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):Le(h)?e.attempt(aC,u,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Le(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function lC(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Qe(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const cC={name:"codeText",previous:fC,resolve:dC,tokenize:hC};function dC(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function fC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function hC(e,t,n){let r=0,o,a;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),c(g)}function c(g){return g===96?(e.consume(g),r++,c):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(a=e.enter("codeTextSequence"),o=0,p(g)):Le(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Le(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function p(g){return g===96?(e.consume(g),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(a.type="codeTextData",h(g))}}class pC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Bs(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Bs(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Bs(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Bs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Bs(this.left,n.reverse())}}}function Bs(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Pg(e){const t={};let n=-1,r,o,a,u,c,d,h;const p=new pC(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,mC(p,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=B({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return xn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function mC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],h={};let p,g,T=-1,y=n,x=0,S=0;const A=[S];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),g&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=y,y=y.next}for(y=n;++T<c.length;)c[T][0]==="exit"&&c[T-1][0]==="enter"&&c[T][1].type===c[T-1][1].type&&c[T][1].start.line!==c[T][1].end.line&&(S=T+1,A.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),T=A.length;T--;){const C=c.slice(A[T],A[T+1]),O=a.pop();d.push([O,O+C.length-1]),e.splice(O,2,C)}for(d.reverse(),T=-1;++T<d.length;)h[x+d[T][0]]=x+d[T][1],x+=d[T][1]-d[T][0]-1;return h}const gC={resolve:yC,tokenize:bC},EC={partial:!0,tokenize:TC};function yC(e){return Pg(e),e}function bC(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(EC,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function TC(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Qe(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function Lg(e,t,n,r,o,a,u,c,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return g;function g(C){return C===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(C),e.exit(a),T):C===null||C===32||C===41||Iu(C)?n(C):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(C))}function T(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(C))}function y(C){return C===62?(e.exit("chunkString"),e.exit(c),T(C)):C===null||C===60||Le(C)?n(C):(e.consume(C),C===92?x:y)}function x(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function S(C){return!p&&(C===null||C===41||it(C))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(C)):p<h&&C===40?(e.consume(C),p++,S):C===41?(e.consume(C),p--,S):C===null||C===32||C===40||Iu(C)?n(C):(e.consume(C),C===92?A:S)}function A(C){return C===40||C===41||C===92?(e.consume(C),S):S(C)}}function Dg(e,t,n,r,o,a){const u=this;let c=0,d;return h;function h(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):Le(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===null||y===91||y===93||Le(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ge(y)),y===92?T:g)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,g):g(y)}}function Mg(e,t,n,r,o,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),h(T))}function h(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Le(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Qe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Le(T)?(e.exit("chunkString"),h(T)):(e.consume(T),T===92?g:p)}function g(T){return T===u||T===92?(e.consume(T),p):p(T)}}function Us(e,t){let n;return r;function r(o){return Le(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ge(o)?Qe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const xC={name:"definition",tokenize:_C},wC={partial:!0,tokenize:vC};function _C(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return Dg.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=Yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return it(y)?Us(e,h)(y):h(y)}function h(y){return Lg(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(wC,g,g)(y)}function g(y){return Ge(y)?Qe(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Le(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function vC(e,t,n){return r;function r(c){return it(c)?Us(e,o)(c):n(c)}function o(c){return Mg(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ge(c)?Qe(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const SC={name:"hardBreakEscape",tokenize:AC};function AC(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const CC={name:"headingAtx",resolve:kC,tokenize:NC};function kC(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},xn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function NC(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||it(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Le(p)?(e.exit("atxHeading"),t(p)):Ge(p)?Qe(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||it(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const OC=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Fg=["pre","script","style","textarea"],IC={concrete:!0,name:"htmlFlow",resolveTo:LC,tokenize:DC},RC={partial:!0,tokenize:FC},PC={partial:!0,tokenize:MC};function LC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function DC(e,t,n){const r=this;let o,a,u,c,d;return h;function h(N){return p(N)}function p(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),g}function g(N){return N===33?(e.consume(N),T):N===47?(e.consume(N),a=!0,S):N===63?(e.consume(N),o=3,r.interrupt?t:v):nn(N)?(e.consume(N),u=String.fromCharCode(N),A):n(N)}function T(N){return N===45?(e.consume(N),o=2,y):N===91?(e.consume(N),o=5,c=0,x):nn(N)?(e.consume(N),o=4,r.interrupt?t:v):n(N)}function y(N){return N===45?(e.consume(N),r.interrupt?t:v):n(N)}function x(N){const xe="CDATA[";return N===xe.charCodeAt(c++)?(e.consume(N),c===xe.length?r.interrupt?t:se:x):n(N)}function S(N){return nn(N)?(e.consume(N),u=String.fromCharCode(N),A):n(N)}function A(N){if(N===null||N===47||N===62||it(N)){const xe=N===47,Re=u.toLowerCase();return!xe&&!a&&Fg.includes(Re)?(o=1,r.interrupt?t(N):se(N)):OC.includes(u.toLowerCase())?(o=6,xe?(e.consume(N),C):r.interrupt?t(N):se(N)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):a?O(N):R(N))}return N===45||Gt(N)?(e.consume(N),u+=String.fromCharCode(N),A):n(N)}function C(N){return N===62?(e.consume(N),r.interrupt?t:se):n(N)}function O(N){return Ge(N)?(e.consume(N),O):z(N)}function R(N){return N===47?(e.consume(N),z):N===58||N===95||nn(N)?(e.consume(N),H):Ge(N)?(e.consume(N),R):z(N)}function H(N){return N===45||N===46||N===58||N===95||Gt(N)?(e.consume(N),H):W(N)}function W(N){return N===61?(e.consume(N),F):Ge(N)?(e.consume(N),W):R(N)}function F(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),d=N,K):Ge(N)?(e.consume(N),F):ce(N)}function K(N){return N===d?(e.consume(N),d=null,be):N===null||Le(N)?n(N):(e.consume(N),K)}function ce(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||it(N)?W(N):(e.consume(N),ce)}function be(N){return N===47||N===62||Ge(N)?R(N):n(N)}function z(N){return N===62?(e.consume(N),X):n(N)}function X(N){return N===null||Le(N)?se(N):Ge(N)?(e.consume(N),X):n(N)}function se(N){return N===45&&o===2?(e.consume(N),ke):N===60&&o===1?(e.consume(N),he):N===62&&o===4?(e.consume(N),P):N===63&&o===3?(e.consume(N),v):N===93&&o===5?(e.consume(N),oe):Le(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(RC,Z,J)(N)):N===null||Le(N)?(e.exit("htmlFlowData"),J(N)):(e.consume(N),se)}function J(N){return e.check(PC,re,Z)(N)}function re(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),fe}function fe(N){return N===null||Le(N)?J(N):(e.enter("htmlFlowData"),se(N))}function ke(N){return N===45?(e.consume(N),v):se(N)}function he(N){return N===47?(e.consume(N),u="",Q):se(N)}function Q(N){if(N===62){const xe=u.toLowerCase();return Fg.includes(xe)?(e.consume(N),P):se(N)}return nn(N)&&u.length<8?(e.consume(N),u+=String.fromCharCode(N),Q):se(N)}function oe(N){return N===93?(e.consume(N),v):se(N)}function v(N){return N===62?(e.consume(N),P):N===45&&o===2?(e.consume(N),v):se(N)}function P(N){return N===null||Le(N)?(e.exit("htmlFlowData"),Z(N)):(e.consume(N),P)}function Z(N){return e.exit("htmlFlow"),t(N)}}function MC(e,t,n){const r=this;return o;function o(u){return Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function FC(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Fs,t,n)}}const BC={name:"htmlText",tokenize:UC};function UC(e,t,n){const r=this;let o,a,u;return c;function c(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),d}function d(v){return v===33?(e.consume(v),h):v===47?(e.consume(v),W):v===63?(e.consume(v),R):nn(v)?(e.consume(v),ce):n(v)}function h(v){return v===45?(e.consume(v),p):v===91?(e.consume(v),a=0,x):nn(v)?(e.consume(v),O):n(v)}function p(v){return v===45?(e.consume(v),y):n(v)}function g(v){return v===null?n(v):v===45?(e.consume(v),T):Le(v)?(u=g,he(v)):(e.consume(v),g)}function T(v){return v===45?(e.consume(v),y):g(v)}function y(v){return v===62?ke(v):v===45?T(v):g(v)}function x(v){const P="CDATA[";return v===P.charCodeAt(a++)?(e.consume(v),a===P.length?S:x):n(v)}function S(v){return v===null?n(v):v===93?(e.consume(v),A):Le(v)?(u=S,he(v)):(e.consume(v),S)}function A(v){return v===93?(e.consume(v),C):S(v)}function C(v){return v===62?ke(v):v===93?(e.consume(v),C):S(v)}function O(v){return v===null||v===62?ke(v):Le(v)?(u=O,he(v)):(e.consume(v),O)}function R(v){return v===null?n(v):v===63?(e.consume(v),H):Le(v)?(u=R,he(v)):(e.consume(v),R)}function H(v){return v===62?ke(v):R(v)}function W(v){return nn(v)?(e.consume(v),F):n(v)}function F(v){return v===45||Gt(v)?(e.consume(v),F):K(v)}function K(v){return Le(v)?(u=K,he(v)):Ge(v)?(e.consume(v),K):ke(v)}function ce(v){return v===45||Gt(v)?(e.consume(v),ce):v===47||v===62||it(v)?be(v):n(v)}function be(v){return v===47?(e.consume(v),ke):v===58||v===95||nn(v)?(e.consume(v),z):Le(v)?(u=be,he(v)):Ge(v)?(e.consume(v),be):ke(v)}function z(v){return v===45||v===46||v===58||v===95||Gt(v)?(e.consume(v),z):X(v)}function X(v){return v===61?(e.consume(v),se):Le(v)?(u=X,he(v)):Ge(v)?(e.consume(v),X):be(v)}function se(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),o=v,J):Le(v)?(u=se,he(v)):Ge(v)?(e.consume(v),se):(e.consume(v),re)}function J(v){return v===o?(e.consume(v),o=void 0,fe):v===null?n(v):Le(v)?(u=J,he(v)):(e.consume(v),J)}function re(v){return v===null||v===34||v===39||v===60||v===61||v===96?n(v):v===47||v===62||it(v)?be(v):(e.consume(v),re)}function fe(v){return v===47||v===62||it(v)?be(v):n(v)}function ke(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),t):n(v)}function he(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Q}function Q(v){return Ge(v)?Qe(e,oe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):oe(v)}function oe(v){return e.enter("htmlTextData"),u(v)}}const $d={name:"labelEnd",resolveAll:$C,resolveTo:VC,tokenize:qC},HC={tokenize:YC},zC={tokenize:WC},jC={tokenize:GC};function $C(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&xn(e,0,e.length,n),e}function VC(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},h={type:"label",start:B({},e[a][1].start),end:B({},e[u][1].end)},p={type:"labelText",start:B({},e[a+r+2][1].end),end:B({},e[u-2][1].start)};return c=[["enter",d,t],["enter",h,t]],c=Rn(c,e.slice(a+1,a+r+3)),c=Rn(c,[["enter",p,t]]),c=Rn(c,Pu(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Rn(c,[["exit",p,t],e[u-2],e[u-1],["exit",h,t]]),c=Rn(c,e.slice(u+1)),c=Rn(c,[["exit",d,t]]),xn(e,a,e.length,c),e}function qC(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(T){return a?a._inactive?g(T):(u=r.parser.defined.includes(Yn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(HC,p,u?p:g)(T):T===91?e.attempt(zC,p,u?h:g)(T):u?p(T):g(T)}function h(T){return e.attempt(jC,p,g)(T)}function p(T){return t(T)}function g(T){return a._balanced=!0,n(T)}}function YC(e,t,n){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return it(g)?Us(e,a)(g):a(g)}function a(g){return g===41?p(g):Lg(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return it(g)?Us(e,d)(g):p(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?Mg(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function h(g){return it(g)?Us(e,p)(g):p(g)}function p(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function WC(e,t,n){const r=this;return o;function o(c){return Dg.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function GC(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const KC={name:"labelStartImage",resolveAll:$d.resolveAll,tokenize:QC};function QC(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const XC={name:"labelStartLink",resolveAll:$d.resolveAll,tokenize:JC};function JC(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Vd={name:"lineEnding",tokenize:ZC};function ZC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qe(e,t,"linePrefix")}}const Lu={name:"thematicBreak",tokenize:ek};function ek(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),u(h)}function u(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Le(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ge(h)?Qe(e,c,"whitespace")(h):c(h))}}const dn={continuation:{tokenize:ik},exit:sk,name:"list",tokenize:rk},tk={partial:!0,tokenize:ak},nk={partial:!0,tokenize:ok};function rk(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Hd(y)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Lu,n,h)(y):h(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Hd(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),h(y)):n(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Fs,r.interrupt?n:p,e.attempt(tk,T,g))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function g(y){return Ge(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),T):n(y)}function T(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function ik(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Fs,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qe(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ge(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(nk,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qe(e,e.attempt(dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function ok(e,t,n){const r=this;return Qe(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function sk(e){e.exit(this.containerState.type)}function ak(e,t,n){const r=this;return Qe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Ge(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Bg={name:"setextUnderline",resolveTo:uk,tokenize:lk};function uk(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:B({},e[r][1].start),end:B({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=B({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function lk(e,t,n){const r=this;let o;return a;function a(h){let p=r.events.length,g;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){g=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),o=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ge(h)?Qe(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Le(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const ck={tokenize:dk};function dk(e){const t=this,n=e.attempt(Fs,r,e.attempt(this.parser.constructs.flowInitial,o,Qe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(gC,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const fk={resolveAll:Hg()},hk=Ug("string"),pk=Ug("text");function Ug(e){return{resolveAll:Hg(e==="text"?mk:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return h(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const g=o[p];let T=-1;if(g)for(;++T<g.length;){const y=g[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function Hg(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function mk(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const h=o[a];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)d=!0,c++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:B({},r.end)};r.end=B({},h.start),r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const gk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:xC},disable:{null:[]},document:{42:dn,43:dn,45:dn,48:dn,49:dn,50:dn,51:dn,52:dn,53:dn,54:dn,55:dn,56:dn,57:dn,62:kg},flow:{35:CC,42:Lu,45:[Bg,Lu],60:IC,61:Bg,95:Lu,96:Rg,126:Rg},flowInitial:{[-2]:jd,[-1]:jd,32:jd},insideSpan:{null:[zd,fk]},string:{38:Og,92:Ng},text:{[-5]:Vd,[-4]:Vd,[-3]:Vd,33:KC,38:Og,42:zd,60:[XA,BC],91:XC,92:[SC,Ng],93:$d,95:zd,96:cC}},Symbol.toStringTag,{value:"Module"}));function Ek(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:K(W),check:K(F),consume:O,enter:R,exit:H,interrupt:K(F,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:x,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:g};let p=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function g(X){return u=Rn(u,X),A(),u[u.length-1]!==null?[]:(ce(t,0),h.events=Pu(a,h.events,h),h.events)}function T(X,se){return bk(y(X),se)}function y(X){return yk(u,X)}function x(){const{_bufferIndex:X,_index:se,line:J,column:re,offset:fe}=r;return{_bufferIndex:X,_index:se,line:J,column:re,offset:fe}}function S(X){o[X.line]=X.column,z()}function A(){let X;for(;r._index<u.length;){const se=u[r._index];if(typeof se=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<se.length;)C(se.charCodeAt(r._bufferIndex));else C(se)}}function C(X){p=p(X)}function O(X){Le(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,z()):X!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=X}function R(X,se){const J=se||{};return J.type=X,J.start=x(),h.events.push(["enter",J,h]),c.push(J),J}function H(X){const se=c.pop();return se.end=x(),h.events.push(["exit",se,h]),se}function W(X,se){ce(X,se.from)}function F(X,se){se.restore()}function K(X,se){return J;function J(re,fe,ke){let he,Q,oe,v;return Array.isArray(re)?Z(re):"tokenize"in re?Z([re]):P(re);function P(Oe){return Be;function Be(_e){const $e=_e!==null&&Oe[_e],ot=_e!==null&&Oe.null,pn=[...Array.isArray($e)?$e:$e?[$e]:[],...Array.isArray(ot)?ot:ot?[ot]:[]];return Z(pn)(_e)}}function Z(Oe){return he=Oe,Q=0,Oe.length===0?ke:N(Oe[Q])}function N(Oe){return Be;function Be(_e){return v=be(),oe=Oe,Oe.partial||(h.currentConstruct=Oe),Oe.name&&h.parser.constructs.disable.null.includes(Oe.name)?Re():Oe.tokenize.call(se?Object.assign(Object.create(h),se):h,d,xe,Re)(_e)}}function xe(Oe){return X(oe,v),fe}function Re(Oe){return v.restore(),++Q<he.length?N(he[Q]):ke}}}function ce(X,se){X.resolveAll&&!a.includes(X)&&a.push(X),X.resolve&&xn(h.events,se,h.events.length-se,X.resolve(h.events.slice(se),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function be(){const X=x(),se=h.previous,J=h.currentConstruct,re=h.events.length,fe=Array.from(c);return{from:re,restore:ke};function ke(){r=X,h.previous=se,h.currentConstruct=J,h.events.length=re,c=fe,z()}}function z(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function yk(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function bk(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
25
25
  `;break}case-3:{u=`\r
26
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function Tk(e){const r={constructs:_g([gk,...(e||{}).extensions||[]]),content:o(VA),defined:[],document:o(YA),flow:o(ck),lazy:{},string:o(hk),text:o(pk)};return r;function o(a){return u;function u(c){return Ek(r,a,c)}}}function xk(e){for(;!Rg(e););return e}const Hg=/[\0\t\n\r]/g;function wk(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let h,p,E,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),E=0,t="",n&&(a.charCodeAt(0)===65279&&E++,n=void 0);E<a.length;){if(Hg.lastIndex=E,h=Hg.exec(a),T=h&&h.index!==void 0?h.index:a.length,y=a.charCodeAt(T),!h){t=a.slice(E);break}if(y===10&&E===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),E<T&&(d.push(a.slice(E,T)),e+=T-E),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}E=T+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const _k=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vk(e){return e.replace(_k,Sk)}function Sk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return vg(n.slice(a?2:1),a?16:10)}return Ud(n)||e}const zg={}.hasOwnProperty;function Ak(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Ck(n)(xk(Tk(n).document().write(wk()(e,t,!0))))}function Ck(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Go),autolinkProtocol:be,autolinkEmail:be,atxHeading:a(Ea),blockQuote:a(ot),characterEscape:be,characterReference:be,codeFenced:a(pn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(pn,u),codeText:a(Yi,u),codeTextData:be,data:be,codeFlowValue:be,definition:a(Zr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Xn),hardBreakEscape:a(ya),hardBreakTrailing:a(ya),htmlFlow:a(Wo,u),htmlFlowData:be,htmlText:a(Wo,u),htmlTextData:be,image:a(Cl),label:u,link:a(Go),listItem:a(ti),listItemValue:T,listOrdered:a(ei,E),listUnordered:a(ei),paragraph:a(ba),reference:N,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Ea),strong:a(kl),thematicBreak:a(Ol)},exit:{atxHeading:d(),atxHeadingSequence:W,autolink:d(),autolinkEmail:$e,autolinkProtocol:_e,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:Oe,characterReference:Be,codeFenced:d(A),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:z,codeIndented:d(C),codeText:d(fe),codeTextData:z,data:z,definition:d(),definitionDestinationString:H,definitionLabelString:O,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(se),hardBreakTrailing:d(se),htmlFlow:d(te),htmlFlowData:z,htmlText:d(re),htmlTextData:z,image:d(he),label:oe,labelText:Q,lineEnding:ee,link:d(ke),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:xe,resourceDestinationString:_,resourceTitleString:P,resource:X,setextHeading:d(ce),setextHeadingLineSequence:K,setextHeadingText:M,strong:d(),thematicBreak:d()}};jg(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){let Te={type:"root",children:[]};const Ue={stack:[Te],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:p,data:n},Ye=[];let Xe=-1;for(;++Xe<ie.length;)if(ie[Xe][1].type==="listOrdered"||ie[Xe][1].type==="listUnordered")if(ie[Xe][0]==="enter")Ye.push(Xe);else{const jt=Ye.pop();Xe=o(ie,jt,Xe)}for(Xe=-1;++Xe<ie.length;){const jt=t[ie[Xe][0]];zg.call(jt,ie[Xe][1].type)&&jt[ie[Xe][1].type].call(Object.assign({sliceSerialize:ie[Xe][2].sliceSerialize},Ue),ie[Xe][1])}if(Ue.tokenStack.length>0){const jt=Ue.tokenStack[Ue.tokenStack.length-1];(jt[1]||$g).call(Ue,void 0,jt[0])}for(Te.position={start:Yr(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:Yr(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)Te=t.transforms[Xe](Te)||Te;return Te}function o(ie,Te,Ue){let Ye=Te-1,Xe=-1,jt=!1,Pr,Mn,ni,Wi;for(;++Ye<=Ue;){const $t=ie[Ye];switch($t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$t[0]==="enter"?Xe++:Xe--,Wi=void 0;break}case"lineEndingBlank":{$t[0]==="enter"&&(Pr&&!Wi&&!Xe&&!ni&&(ni=Ye),Wi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Wi=void 0}if(!Xe&&$t[0]==="enter"&&$t[1].type==="listItemPrefix"||Xe===-1&&$t[0]==="exit"&&($t[1].type==="listUnordered"||$t[1].type==="listOrdered")){if(Pr){let br=Ye;for(Mn=void 0;br--;){const Sn=ie[br];if(Sn[1].type==="lineEnding"||Sn[1].type==="lineEndingBlank"){if(Sn[0]==="exit")continue;Mn&&(ie[Mn][1].type="lineEndingBlank",jt=!0),Sn[1].type="lineEnding",Mn=br}else if(!(Sn[1].type==="linePrefix"||Sn[1].type==="blockQuotePrefix"||Sn[1].type==="blockQuotePrefixWhitespace"||Sn[1].type==="blockQuoteMarker"||Sn[1].type==="listItemIndent"))break}ni&&(!Mn||ni<Mn)&&(Pr._spread=!0),Pr.end=Object.assign({},Mn?ie[Mn][1].start:$t[1].end),ie.splice(Mn||Ye,0,["exit",Pr,$t[2]]),Ye++,Ue++}if($t[1].type==="listItemPrefix"){const br={type:"listItem",_spread:!1,start:Object.assign({},$t[1].start),end:void 0};Pr=br,ie.splice(Ye,0,["enter",br,$t[2]]),Ye++,Ue++,ni=void 0,Wi=!0}}}return ie[Te][1]._spread=jt,Ue}function a(ie,Te){return Ue;function Ue(Ye){c.call(this,ie(Ye),Ye),Te&&Te.call(this,Ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ie,Te,Ue){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([Te,Ue||void 0]),ie.position={start:Yr(Te.start),end:void 0}}function d(ie){return Te;function Te(Ue){ie&&ie.call(this,Ue),h.call(this,Ue)}}function h(ie,Te){const Ue=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==ie.type&&(Te?Te.call(this,ie,Ye[0]):(Ye[1]||$g).call(this,ie,Ye[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Ds({start:ie.start,end:ie.end})+"): it’s not open");Ue.position.end=Yr(ie.end)}function p(){return Bd(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function T(ie){if(this.data.expectingFirstListItemValue){const Te=this.stack[this.stack.length-2];Te.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.lang=ie}function x(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.meta=ie}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie.replace(/(\r?\n|\r)$/g,"")}function O(ie){const Te=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=Te,Ue.identifier=Yn(this.sliceSerialize(ie)).toLowerCase()}function R(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.title=ie}function H(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.url=ie}function W(ie){const Te=this.stack[this.stack.length-1];if(!Te.depth){const Ue=this.sliceSerialize(ie).length;Te.depth=Ue}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function K(ie){const Te=this.stack[this.stack.length-1];Te.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function ce(){this.data.setextHeadingSlurpLineEnding=void 0}function be(ie){const Ue=this.stack[this.stack.length-1].children;let Ye=Ue[Ue.length-1];(!Ye||Ye.type!=="text")&&(Ye=Nl(),Ye.position={start:Yr(ie.start),end:void 0},Ue.push(Ye)),this.stack.push(Ye)}function z(ie){const Te=this.stack.pop();Te.value+=this.sliceSerialize(ie),Te.position.end=Yr(ie.end)}function ee(ie){const Te=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ue=Te.children[Te.children.length-1];Ue.position.end=Yr(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Te.type)&&(be.call(this,ie),z.call(this,ie))}function se(){this.data.atHardBreak=!0}function te(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie}function re(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie}function fe(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie}function ke(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const Te=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=Te,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function he(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const Te=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=Te,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function Q(ie){const Te=this.sliceSerialize(ie),Ue=this.stack[this.stack.length-2];Ue.label=vk(Te),Ue.identifier=Yn(Te).toLowerCase()}function oe(){const ie=this.stack[this.stack.length-1],Te=this.resume(),Ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ue.type==="link"){const Ye=ie.children;Ue.children=Ye}else Ue.alt=Te}function _(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.url=ie}function P(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.title=ie}function X(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function xe(ie){const Te=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=Te,Ue.identifier=Yn(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function Re(ie){this.data.characterReferenceType=ie.type}function Oe(ie){const Te=this.sliceSerialize(ie),Ue=this.data.characterReferenceType;let Ye;Ue?(Ye=vg(Te,Ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=Ud(Te);const Xe=this.stack[this.stack.length-1];Xe.value+=Ye}function Be(ie){const Te=this.stack.pop();Te.position.end=Yr(ie.end)}function _e(ie){z.call(this,ie);const Te=this.stack[this.stack.length-1];Te.url=this.sliceSerialize(ie)}function $e(ie){z.call(this,ie);const Te=this.stack[this.stack.length-1];Te.url="mailto:"+this.sliceSerialize(ie)}function ot(){return{type:"blockquote",children:[]}}function pn(){return{type:"code",lang:null,meta:null,value:""}}function Yi(){return{type:"inlineCode",value:""}}function Zr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Xn(){return{type:"emphasis",children:[]}}function Ea(){return{type:"heading",depth:0,children:[]}}function ya(){return{type:"break"}}function Wo(){return{type:"html",value:""}}function Cl(){return{type:"image",title:null,url:"",alt:null}}function Go(){return{type:"link",title:null,url:"",children:[]}}function ei(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function ti(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function ba(){return{type:"paragraph",children:[]}}function kl(){return{type:"strong",children:[]}}function Nl(){return{type:"text",value:""}}function Ol(){return{type:"thematicBreak"}}}function Yr(e){return{line:e.line,column:e.column,offset:e.offset}}function jg(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jg(e,r):kk(e,r)}}function kk(e,t){let n;for(n in t)if(zg.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function $g(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ds({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ds({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ds({start:t.start,end:t.end})+") is still open")}function Nk(e){const t=this;t.parser=n;function n(r){return Ak(r,ae(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function Ok(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ik(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
26
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function Tk(e){const r={constructs:vg([gk,...(e||{}).extensions||[]]),content:o(VA),defined:[],document:o(YA),flow:o(ck),lazy:{},string:o(hk),text:o(pk)};return r;function o(a){return u;function u(c){return Ek(r,a,c)}}}function xk(e){for(;!Pg(e););return e}const zg=/[\0\t\n\r]/g;function wk(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let h,p,g,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),g=0,t="",n&&(a.charCodeAt(0)===65279&&g++,n=void 0);g<a.length;){if(zg.lastIndex=g,h=zg.exec(a),T=h&&h.index!==void 0?h.index:a.length,y=a.charCodeAt(T),!h){t=a.slice(g);break}if(y===10&&g===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),g<T&&(d.push(a.slice(g,T)),e+=T-g),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}g=T+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const _k=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vk(e){return e.replace(_k,Sk)}function Sk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return Sg(n.slice(a?2:1),a?16:10)}return Ud(n)||e}const jg={}.hasOwnProperty;function Ak(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Ck(n)(xk(Tk(n).document().write(wk()(e,t,!0))))}function Ck(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Go),autolinkProtocol:be,autolinkEmail:be,atxHeading:a(Ea),blockQuote:a(ot),characterEscape:be,characterReference:be,codeFenced:a(pn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(pn,u),codeText:a(Yi,u),codeTextData:be,data:be,codeFlowValue:be,definition:a(Zr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Xn),hardBreakEscape:a(ya),hardBreakTrailing:a(ya),htmlFlow:a(Wo,u),htmlFlowData:be,htmlText:a(Wo,u),htmlTextData:be,image:a(Cl),label:u,link:a(Go),listItem:a(ti),listItemValue:T,listOrdered:a(ei,g),listUnordered:a(ei),paragraph:a(ba),reference:N,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Ea),strong:a(kl),thematicBreak:a(Ol)},exit:{atxHeading:d(),atxHeadingSequence:W,autolink:d(),autolinkEmail:$e,autolinkProtocol:_e,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:Oe,characterReference:Be,codeFenced:d(A),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:z,codeIndented:d(C),codeText:d(fe),codeTextData:z,data:z,definition:d(),definitionDestinationString:H,definitionLabelString:O,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(se),hardBreakTrailing:d(se),htmlFlow:d(J),htmlFlowData:z,htmlText:d(re),htmlTextData:z,image:d(he),label:oe,labelText:Q,lineEnding:X,link:d(ke),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:xe,resourceDestinationString:v,resourceTitleString:P,resource:Z,setextHeading:d(ce),setextHeadingLineSequence:K,setextHeadingText:F,strong:d(),thematicBreak:d()}};$g(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){let Te={type:"root",children:[]};const Ue={stack:[Te],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:p,data:n},Ye=[];let Xe=-1;for(;++Xe<ie.length;)if(ie[Xe][1].type==="listOrdered"||ie[Xe][1].type==="listUnordered")if(ie[Xe][0]==="enter")Ye.push(Xe);else{const jt=Ye.pop();Xe=o(ie,jt,Xe)}for(Xe=-1;++Xe<ie.length;){const jt=t[ie[Xe][0]];jg.call(jt,ie[Xe][1].type)&&jt[ie[Xe][1].type].call(Object.assign({sliceSerialize:ie[Xe][2].sliceSerialize},Ue),ie[Xe][1])}if(Ue.tokenStack.length>0){const jt=Ue.tokenStack[Ue.tokenStack.length-1];(jt[1]||Vg).call(Ue,void 0,jt[0])}for(Te.position={start:Yr(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:Yr(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)Te=t.transforms[Xe](Te)||Te;return Te}function o(ie,Te,Ue){let Ye=Te-1,Xe=-1,jt=!1,Pr,Mn,ni,Wi;for(;++Ye<=Ue;){const $t=ie[Ye];switch($t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$t[0]==="enter"?Xe++:Xe--,Wi=void 0;break}case"lineEndingBlank":{$t[0]==="enter"&&(Pr&&!Wi&&!Xe&&!ni&&(ni=Ye),Wi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Wi=void 0}if(!Xe&&$t[0]==="enter"&&$t[1].type==="listItemPrefix"||Xe===-1&&$t[0]==="exit"&&($t[1].type==="listUnordered"||$t[1].type==="listOrdered")){if(Pr){let br=Ye;for(Mn=void 0;br--;){const Sn=ie[br];if(Sn[1].type==="lineEnding"||Sn[1].type==="lineEndingBlank"){if(Sn[0]==="exit")continue;Mn&&(ie[Mn][1].type="lineEndingBlank",jt=!0),Sn[1].type="lineEnding",Mn=br}else if(!(Sn[1].type==="linePrefix"||Sn[1].type==="blockQuotePrefix"||Sn[1].type==="blockQuotePrefixWhitespace"||Sn[1].type==="blockQuoteMarker"||Sn[1].type==="listItemIndent"))break}ni&&(!Mn||ni<Mn)&&(Pr._spread=!0),Pr.end=Object.assign({},Mn?ie[Mn][1].start:$t[1].end),ie.splice(Mn||Ye,0,["exit",Pr,$t[2]]),Ye++,Ue++}if($t[1].type==="listItemPrefix"){const br={type:"listItem",_spread:!1,start:Object.assign({},$t[1].start),end:void 0};Pr=br,ie.splice(Ye,0,["enter",br,$t[2]]),Ye++,Ue++,ni=void 0,Wi=!0}}}return ie[Te][1]._spread=jt,Ue}function a(ie,Te){return Ue;function Ue(Ye){c.call(this,ie(Ye),Ye),Te&&Te.call(this,Ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ie,Te,Ue){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([Te,Ue||void 0]),ie.position={start:Yr(Te.start),end:void 0}}function d(ie){return Te;function Te(Ue){ie&&ie.call(this,Ue),h.call(this,Ue)}}function h(ie,Te){const Ue=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==ie.type&&(Te?Te.call(this,ie,Ye[0]):(Ye[1]||Vg).call(this,ie,Ye[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Ds({start:ie.start,end:ie.end})+"): it’s not open");Ue.position.end=Yr(ie.end)}function p(){return Bd(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function T(ie){if(this.data.expectingFirstListItemValue){const Te=this.stack[this.stack.length-2];Te.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.lang=ie}function x(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.meta=ie}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie.replace(/(\r?\n|\r)$/g,"")}function O(ie){const Te=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=Te,Ue.identifier=Yn(this.sliceSerialize(ie)).toLowerCase()}function R(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.title=ie}function H(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.url=ie}function W(ie){const Te=this.stack[this.stack.length-1];if(!Te.depth){const Ue=this.sliceSerialize(ie).length;Te.depth=Ue}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function K(ie){const Te=this.stack[this.stack.length-1];Te.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function ce(){this.data.setextHeadingSlurpLineEnding=void 0}function be(ie){const Ue=this.stack[this.stack.length-1].children;let Ye=Ue[Ue.length-1];(!Ye||Ye.type!=="text")&&(Ye=Nl(),Ye.position={start:Yr(ie.start),end:void 0},Ue.push(Ye)),this.stack.push(Ye)}function z(ie){const Te=this.stack.pop();Te.value+=this.sliceSerialize(ie),Te.position.end=Yr(ie.end)}function X(ie){const Te=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ue=Te.children[Te.children.length-1];Ue.position.end=Yr(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Te.type)&&(be.call(this,ie),z.call(this,ie))}function se(){this.data.atHardBreak=!0}function J(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie}function re(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie}function fe(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie}function ke(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const Te=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=Te,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function he(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const Te=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=Te,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function Q(ie){const Te=this.sliceSerialize(ie),Ue=this.stack[this.stack.length-2];Ue.label=vk(Te),Ue.identifier=Yn(Te).toLowerCase()}function oe(){const ie=this.stack[this.stack.length-1],Te=this.resume(),Ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ue.type==="link"){const Ye=ie.children;Ue.children=Ye}else Ue.alt=Te}function v(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.url=ie}function P(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.title=ie}function Z(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function xe(ie){const Te=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=Te,Ue.identifier=Yn(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function Re(ie){this.data.characterReferenceType=ie.type}function Oe(ie){const Te=this.sliceSerialize(ie),Ue=this.data.characterReferenceType;let Ye;Ue?(Ye=Sg(Te,Ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=Ud(Te);const Xe=this.stack[this.stack.length-1];Xe.value+=Ye}function Be(ie){const Te=this.stack.pop();Te.position.end=Yr(ie.end)}function _e(ie){z.call(this,ie);const Te=this.stack[this.stack.length-1];Te.url=this.sliceSerialize(ie)}function $e(ie){z.call(this,ie);const Te=this.stack[this.stack.length-1];Te.url="mailto:"+this.sliceSerialize(ie)}function ot(){return{type:"blockquote",children:[]}}function pn(){return{type:"code",lang:null,meta:null,value:""}}function Yi(){return{type:"inlineCode",value:""}}function Zr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Xn(){return{type:"emphasis",children:[]}}function Ea(){return{type:"heading",depth:0,children:[]}}function ya(){return{type:"break"}}function Wo(){return{type:"html",value:""}}function Cl(){return{type:"image",title:null,url:"",alt:null}}function Go(){return{type:"link",title:null,url:"",children:[]}}function ei(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function ti(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function ba(){return{type:"paragraph",children:[]}}function kl(){return{type:"strong",children:[]}}function Nl(){return{type:"text",value:""}}function Ol(){return{type:"thematicBreak"}}}function Yr(e){return{line:e.line,column:e.column,offset:e.offset}}function $g(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?$g(e,r):kk(e,r)}}function kk(e,t){let n;for(n in t)if(jg.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Vg(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ds({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ds({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ds({start:t.start,end:t.end})+") is still open")}function Nk(e){const t=this;t.parser=n;function n(r){return Ak(r,ae(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function Ok(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ik(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
27
  `}]}function Rk(e,t){const n=t.value?t.value+`
28
- `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function Pk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=yo(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function Mk(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fk(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Vg(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function Bk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vg(e,t);const o={src:yo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function Uk(e,t){const n={src:yo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Hk(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function zk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vg(e,t);const o={href:yo(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function jk(e,t){const n={href:yo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $k(e,t,n){const r=e.all(t),o=n?Vk(n):qg(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let E;p&&p.type==="element"&&p.tagName==="p"?E=p:(E={type:"element",tagName:"p",properties:{},children:[]},r.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
28
+ `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function Pk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=yo(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function Mk(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fk(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function qg(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function Bk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qg(e,t);const o={src:yo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function Uk(e,t){const n={src:yo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Hk(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function zk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qg(e,t);const o={href:yo(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function jk(e,t){const n={href:yo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $k(e,t,n){const r=e.all(t),o=n?Vk(n):Yg(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let g;p&&p.type==="element"&&p.tagName==="p"?g=p:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
29
29
  `}),p.type==="element"&&p.tagName==="p"&&!o?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
30
- `});const h={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,h),e.applyData(t,h)}function Vk(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=qg(n[r])}return t}function qg(e){const t=e.spread;return t==null?e.children.length>1:t}function qk(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Yk(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wk(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Gk(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kk(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=ur(t.children[1]),d=Ou(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function Qk(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const h=[];for(;++d<c;){const E=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let x={type:"element",tagName:a,properties:T,children:[]};E&&(x.children=e.all(E),e.patch(E,x),x=e.applyData(E,x)),h.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function Xk(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Yg=9,Wg=32;function Jk(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(Gg(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(Gg(t.slice(o),o>0,!1)),a.join("")}function Gg(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===Yg||a===Wg;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===Yg||a===Wg;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function Zk(e,t){const n={type:"text",value:Jk(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function e3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const t3={blockquote:Ok,break:Ik,code:Rk,delete:Pk,emphasis:Lk,footnoteReference:Dk,heading:Mk,html:Fk,imageReference:Bk,image:Uk,inlineCode:Hk,linkReference:zk,link:jk,listItem:$k,list:qk,paragraph:Yk,root:Wk,strong:Gk,table:Kk,tableCell:Xk,tableRow:Qk,text:Zk,thematicBreak:e3,toml:Du,yaml:Du,definition:Du,footnoteDefinition:Du};function Du(){}const Kg=-1,Mu=0,Hs=1,Fu=2,qd=3,Yd=4,Wd=5,Gd=6,Qg=7,Xg=8,Jg=typeof self=="object"?self:globalThis,n3=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case Mu:case Kg:return n(u,o);case Hs:{const c=n([],o);for(const d of u)c.push(r(d));return c}case Fu:{const c=n({},o);for(const[d,h]of u)c[r(d)]=r(h);return c}case qd:return n(new Date(u),o);case Yd:{const{source:c,flags:d}=u;return n(new RegExp(c,d),o)}case Wd:{const c=n(new Map,o);for(const[d,h]of u)c.set(r(d),r(h));return c}case Gd:{const c=n(new Set,o);for(const d of u)c.add(r(d));return c}case Qg:{const{name:c,message:d}=u;return n(new Jg[c](d),o)}case Xg:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new Jg[a](u),o)};return r},Zg=e=>n3(new Map,e)(0),To="",{toString:r3}={},{keys:i3}=Object,zs=e=>{const t=typeof e;if(t!=="object"||!e)return[Mu,t];const n=r3.call(e).slice(8,-1);switch(n){case"Array":return[Hs,To];case"Object":return[Fu,To];case"Date":return[qd,To];case"RegExp":return[Yd,To];case"Map":return[Wd,To];case"Set":return[Gd,To];case"DataView":return[Hs,n]}return n.includes("Array")?[Hs,n]:n.includes("Error")?[Qg,n]:[Fu,n]},Bu=([e,t])=>e===Mu&&(t==="function"||t==="symbol"),o3=(e,t,n,r)=>{const o=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=zs(u);switch(c){case Mu:{let p=u;switch(d){case"bigint":c=Xg,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([Kg],u)}return o([c,p],u)}case Hs:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),o([d,[...T]],u)}const p=[],E=o([c,p],u);for(const T of u)p.push(a(T));return E}case Fu:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],E=o([c,p],u);for(const T of i3(u))(e||!Bu(zs(u[T])))&&p.push([a(T),a(u[T])]);return E}case qd:return o([c,u.toISOString()],u);case Yd:{const{source:p,flags:E}=u;return o([c,{source:p,flags:E}],u)}case Wd:{const p=[],E=o([c,p],u);for(const[T,y]of u)(e||!(Bu(zs(T))||Bu(zs(y))))&&p.push([a(T),a(y)]);return E}case Gd:{const p=[],E=o([c,p],u);for(const T of u)(e||!Bu(zs(T)))&&p.push(a(T));return E}}const{message:h}=u;return o([c,{name:d,message:h}],u)};return a},e1=(e,{json:t,lossy:n}={})=>{const r=[];return o3(!(t||n),!!t,new Map,r)(e),r},Ii=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Zg(e1(e,t)):structuredClone(e):(e,t)=>Zg(e1(e,t));function s3(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function a3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function u3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||s3,r=e.options.footnoteBackLabel||a3,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const p=e.all(h),E=String(h.identifier).toUpperCase(),T=yo(E.toLowerCase());let y=0;const x=[],v=e.footnoteCounts.get(E);for(;v!==void 0&&++y<=v;){x.length>0&&x.push({type:"text",value:" "});let O=typeof n=="string"?n:n(d,y);typeof O=="string"&&(O={type:"text",value:O}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const O=A.children[A.children.length-1];O&&O.type==="text"?O.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...x)}else p.push(...x);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(h,C),c.push(C)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:ae(F({},Ii(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
30
+ `});const h={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,h),e.applyData(t,h)}function Vk(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Yg(n[r])}return t}function Yg(e){const t=e.spread;return t==null?e.children.length>1:t}function qk(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Yk(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wk(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Gk(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kk(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=ur(t.children[1]),d=Ou(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function Qk(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const h=[];for(;++d<c;){const g=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let x={type:"element",tagName:a,properties:T,children:[]};g&&(x.children=e.all(g),e.patch(g,x),x=e.applyData(g,x)),h.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function Xk(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Wg=9,Gg=32;function Jk(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(Kg(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(Kg(t.slice(o),o>0,!1)),a.join("")}function Kg(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===Wg||a===Gg;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===Wg||a===Gg;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function Zk(e,t){const n={type:"text",value:Jk(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function e3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const t3={blockquote:Ok,break:Ik,code:Rk,delete:Pk,emphasis:Lk,footnoteReference:Dk,heading:Mk,html:Fk,imageReference:Bk,image:Uk,inlineCode:Hk,linkReference:zk,link:jk,listItem:$k,list:qk,paragraph:Yk,root:Wk,strong:Gk,table:Kk,tableCell:Xk,tableRow:Qk,text:Zk,thematicBreak:e3,toml:Du,yaml:Du,definition:Du,footnoteDefinition:Du};function Du(){}const Qg=-1,Mu=0,Hs=1,Fu=2,qd=3,Yd=4,Wd=5,Gd=6,Xg=7,Jg=8,Zg=typeof self=="object"?self:globalThis,n3=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case Mu:case Qg:return n(u,o);case Hs:{const c=n([],o);for(const d of u)c.push(r(d));return c}case Fu:{const c=n({},o);for(const[d,h]of u)c[r(d)]=r(h);return c}case qd:return n(new Date(u),o);case Yd:{const{source:c,flags:d}=u;return n(new RegExp(c,d),o)}case Wd:{const c=n(new Map,o);for(const[d,h]of u)c.set(r(d),r(h));return c}case Gd:{const c=n(new Set,o);for(const d of u)c.add(r(d));return c}case Xg:{const{name:c,message:d}=u;return n(new Zg[c](d),o)}case Jg:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new Zg[a](u),o)};return r},e1=e=>n3(new Map,e)(0),To="",{toString:r3}={},{keys:i3}=Object,zs=e=>{const t=typeof e;if(t!=="object"||!e)return[Mu,t];const n=r3.call(e).slice(8,-1);switch(n){case"Array":return[Hs,To];case"Object":return[Fu,To];case"Date":return[qd,To];case"RegExp":return[Yd,To];case"Map":return[Wd,To];case"Set":return[Gd,To];case"DataView":return[Hs,n]}return n.includes("Array")?[Hs,n]:n.includes("Error")?[Xg,n]:[Fu,n]},Bu=([e,t])=>e===Mu&&(t==="function"||t==="symbol"),o3=(e,t,n,r)=>{const o=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=zs(u);switch(c){case Mu:{let p=u;switch(d){case"bigint":c=Jg,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([Qg],u)}return o([c,p],u)}case Hs:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),o([d,[...T]],u)}const p=[],g=o([c,p],u);for(const T of u)p.push(a(T));return g}case Fu:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],g=o([c,p],u);for(const T of i3(u))(e||!Bu(zs(u[T])))&&p.push([a(T),a(u[T])]);return g}case qd:return o([c,u.toISOString()],u);case Yd:{const{source:p,flags:g}=u;return o([c,{source:p,flags:g}],u)}case Wd:{const p=[],g=o([c,p],u);for(const[T,y]of u)(e||!(Bu(zs(T))||Bu(zs(y))))&&p.push([a(T),a(y)]);return g}case Gd:{const p=[],g=o([c,p],u);for(const T of u)(e||!Bu(zs(T)))&&p.push(a(T));return g}}const{message:h}=u;return o([c,{name:d,message:h}],u)};return a},t1=(e,{json:t,lossy:n}={})=>{const r=[];return o3(!(t||n),!!t,new Map,r)(e),r},Ii=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?e1(t1(e,t)):structuredClone(e):(e,t)=>e1(t1(e,t));function s3(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function a3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function u3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||s3,r=e.options.footnoteBackLabel||a3,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const p=e.all(h),g=String(h.identifier).toUpperCase(),T=yo(g.toLowerCase());let y=0;const x=[],S=e.footnoteCounts.get(g);for(;S!==void 0&&++y<=S;){x.length>0&&x.push({type:"text",value:" "});let O=typeof n=="string"?n:n(d,y);typeof O=="string"&&(O={type:"text",value:O}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const O=A.children[A.children.length-1];O&&O.type==="text"?O.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...x)}else p.push(...x);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(h,C),c.push(C)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:ae(B({},Ii(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
31
31
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
32
- `}]}}const Uu=(function(e){if(e==null)return f3;if(typeof e=="function")return Hu(e);if(typeof e=="object")return Array.isArray(e)?l3(e):c3(e);if(typeof e=="string")return d3(e);throw new Error("Expected function, string, or object as test")});function l3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Uu(e[n]);return Hu(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function c3(e){const t=e;return Hu(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function d3(e){return Hu(t);function t(n){return n&&n.type===e}}function Hu(e){return t;function t(n,r,o){return!!(h3(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function f3(){return!0}function h3(e){return e!==null&&typeof e=="object"&&"type"in e}function _F(e){return e}const t1=[],p3=!0,Kd=!1,m3="skip";function n1(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=Uu(o),u=r?-1:1;c(e,void 0,[])();function c(d,h,p){const E=d&&typeof d=="object"?d:{};if(typeof E.type=="string"){const y=typeof E.tagName=="string"?E.tagName:typeof E.name=="string"?E.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=t1,x,v,A;if((!t||a(d,h,p[p.length-1]||void 0))&&(y=g3(n(d,p)),y[0]===Kd))return y;if("children"in d&&d.children){const C=d;if(C.children&&y[0]!==m3)for(v=(r?C.children.length:-1)+u,A=p.concat(C);v>-1&&v<C.children.length;){const O=C.children[v];if(x=c(O,v,A)(),x[0]===Kd)return x;v=typeof x[1]=="number"?x[1]:v+u}}return y}}}function g3(e){return Array.isArray(e)?e:typeof e=="number"?[p3,e]:e==null?t1:[e]}function zu(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),n1(e,a,c,o);function c(d,h){const p=h[h.length-1],E=p?p.children.indexOf(d):void 0;return u(d,E,p)}}const Qd={}.hasOwnProperty,E3={};function y3(e,t){const n=t||E3,r=new Map,o=new Map,a=new Map,u=F(F({},t3),n.handlers),c={all:h,applyData:T3,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:b3,wrap:w3};return zu(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const E=p.type==="definition"?r:o,T=String(p.identifier).toUpperCase();E.has(T)||E.set(T,p)}}),c;function d(p,E){const T=p.type,y=c.handlers[T];if(Qd.call(c.handlers,T)&&y)return y(c,p,E);if(c.options.passThrough&&c.options.passThrough.includes(T)){if("children"in p){const v=p,{children:A}=v,C=sn(v,["children"]),O=Ii(C);return O.children=c.all(p),O}return Ii(p)}return(c.options.unknownHandler||x3)(c,p,E)}function h(p){const E=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const x=c.one(T[y],p);if(x){if(y&&T[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=r1(x.value)),!Array.isArray(x)&&x.type==="element")){const v=x.children[0];v&&v.type==="text"&&(v.value=r1(v.value))}Array.isArray(x)?E.push(...x):E.push(x)}}}return E}}function b3(e,t){e.position&&(t.position=fg(e))}function T3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,Ii(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function x3(e,t){const n=t.data||{},r="value"in t&&!(Qd.call(n,"hProperties")||Qd.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function w3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
32
+ `}]}}const Uu=(function(e){if(e==null)return f3;if(typeof e=="function")return Hu(e);if(typeof e=="object")return Array.isArray(e)?l3(e):c3(e);if(typeof e=="string")return d3(e);throw new Error("Expected function, string, or object as test")});function l3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Uu(e[n]);return Hu(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function c3(e){const t=e;return Hu(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function d3(e){return Hu(t);function t(n){return n&&n.type===e}}function Hu(e){return t;function t(n,r,o){return!!(h3(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function f3(){return!0}function h3(e){return e!==null&&typeof e=="object"&&"type"in e}function SF(e){return e}const n1=[],p3=!0,Kd=!1,m3="skip";function r1(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=Uu(o),u=r?-1:1;c(e,void 0,[])();function c(d,h,p){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const y=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=n1,x,S,A;if((!t||a(d,h,p[p.length-1]||void 0))&&(y=g3(n(d,p)),y[0]===Kd))return y;if("children"in d&&d.children){const C=d;if(C.children&&y[0]!==m3)for(S=(r?C.children.length:-1)+u,A=p.concat(C);S>-1&&S<C.children.length;){const O=C.children[S];if(x=c(O,S,A)(),x[0]===Kd)return x;S=typeof x[1]=="number"?x[1]:S+u}}return y}}}function g3(e){return Array.isArray(e)?e:typeof e=="number"?[p3,e]:e==null?n1:[e]}function zu(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),r1(e,a,c,o);function c(d,h){const p=h[h.length-1],g=p?p.children.indexOf(d):void 0;return u(d,g,p)}}const Qd={}.hasOwnProperty,E3={};function y3(e,t){const n=t||E3,r=new Map,o=new Map,a=new Map,u=B(B({},t3),n.handlers),c={all:h,applyData:T3,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:b3,wrap:w3};return zu(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const g=p.type==="definition"?r:o,T=String(p.identifier).toUpperCase();g.has(T)||g.set(T,p)}}),c;function d(p,g){const T=p.type,y=c.handlers[T];if(Qd.call(c.handlers,T)&&y)return y(c,p,g);if(c.options.passThrough&&c.options.passThrough.includes(T)){if("children"in p){const S=p,{children:A}=S,C=sn(S,["children"]),O=Ii(C);return O.children=c.all(p),O}return Ii(p)}return(c.options.unknownHandler||x3)(c,p,g)}function h(p){const g=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const x=c.one(T[y],p);if(x){if(y&&T[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=i1(x.value)),!Array.isArray(x)&&x.type==="element")){const S=x.children[0];S&&S.type==="text"&&(S.value=i1(S.value))}Array.isArray(x)?g.push(...x):g.push(x)}}}return g}}function b3(e,t){e.position&&(t.position=hg(e))}function T3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,Ii(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function x3(e,t){const n=t.data||{},r="value"in t&&!(Qd.call(n,"hProperties")||Qd.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function w3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
33
33
  `});++r<e.length;)r&&n.push({type:"text",value:`
34
34
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
35
- `}),n}function r1(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function i1(e,t){const n=y3(e,t),r=n.one(e,void 0),o=u3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
36
- `},o),a}function _3(e,t){return e&&"run"in e?function(n,r){return Ve(this,null,function*(){const o=i1(n,F({file:r},t));yield e.run(o,r)})}:function(n,r){return i1(n,F({file:r},e||t))}}function o1(e){if(e)throw e}var Xd,s1;function v3(){if(s1)return Xd;s1=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 T;for(T in h);return typeof T=="undefined"||e.call(h,T)},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 Xd=function d(){var h,p,E,T,y,x,v=arguments[0],A=1,C=arguments.length,O=!1;for(typeof v=="boolean"&&(O=v,v=arguments[1]||{},A=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});A<C;++A)if(h=arguments[A],h!=null)for(p in h)E=c(v,p),T=c(h,p),v!==T&&(O&&T&&(a(T)||(y=o(T)))?(y?(y=!1,x=E&&o(E)?E:[]):x=E&&a(E)?E:{},u(v,{name:p,newValue:d(O,x,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},Xd}var S3=v3();const Jd=We(S3);function Zd(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 A3(){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?C3(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 C3(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 lr={basename:k3,dirname:N3,extname:O3,join:I3,sep:"/"};function k3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');js(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 N3(e){if(js(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 O3(e){js(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 I3(...e){let t=-1,n;for(;++t<e.length;)js(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":R3(n)}function R3(e){js(e);const t=e.codePointAt(0)===47;let n=P3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function P3(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 js(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const L3={cwd:D3};function D3(){return"/"}function ef(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function M3(e){if(typeof e=="string")e=new URL(e);else if(!ef(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 F3(e)}function F3(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 tf=["history","path","basename","stem","extname","dirname"];class a1{constructor(t){let n;t?ef(t)?n={path:t}:typeof t=="string"||B3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":L3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<tf.length;){const a=tf[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)tf.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?lr.basename(this.path):void 0}set basename(t){rf(t,"basename"),nf(t,"basename"),this.path=lr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?lr.dirname(this.path):void 0}set dirname(t){u1(this.basename,"dirname"),this.path=lr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?lr.extname(this.path):void 0}set extname(t){if(nf(t,"extname"),u1(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=lr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ef(t)&&(t=M3(t)),rf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?lr.basename(this.path,this.extname):void 0}set stem(t){rf(t,"stem"),nf(t,"stem"),this.path=lr.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 Wt(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 nf(e,t){if(e&&e.includes(lr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+lr.sep+"`")}function rf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function u1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function B3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const U3=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),H3={}.hasOwnProperty;class of extends U3{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=A3()}copy(){const t=new of;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Jd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(uf("data",this.frozen),this.namespace[t]=n,this):H3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(uf("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=ju(t),r=this.parser||this.Parser;return sf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),sf("process",this.parser||this.Parser),af("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=ju(t),d=r.parse(c);r.run(d,c,function(p,E,T){if(p||!E||!T)return h(p);const y=E,x=r.stringify(y,T);$3(x)?T.value=x:T.result=x,h(p,T)});function h(p,E){p||!E?u(p):a?a(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),sf("processSync",this.parser||this.Parser),af("processSync",this.compiler||this.Compiler),this.process(t,o),c1("processSync","process",n),r;function o(a,u){n=!0,o1(a),r=u}}run(t,n,r){l1(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=ju(n);o.run(t,d,h);function h(p,E,T){const y=E||t;p?c(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),c1("runSync","run",r),o;function a(u,c){o1(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=ju(n),o=this.compiler||this.Compiler;return af("stringify",o),l1(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(uf("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=Jd(!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,T=-1;for(;++E<r.length;)if(r[E][0]===h){T=E;break}if(T===-1)r.push([h,...p]);else if(p.length>0){let[y,...x]=p;const v=r[T][1];Zd(v)&&Zd(y)&&(y=Jd(!0,v,y)),r[T]=[h,y,...x]}}}}const z3=new of().freeze();function sf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function af(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function uf(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 l1(e){if(!Zd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function c1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ju(e){return j3(e)?e:new a1(e)}function j3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function $3(e){return typeof e=="string"||V3(e)}function V3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const q3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",d1=[],f1={allowDangerousHtml:!0},Y3=/^(https?|ircs?|mailto|xmpp)$/i,W3=[{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 h1(e){const t=G3(e),n=K3(e);return Q3(t.runSync(t.parse(n),n),e)}function G3(e){const t=e.rehypePlugins||d1,n=e.remarkPlugins||d1,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),f1):f1;return z3().use(Nk).use(n).use(_3,r).use(t)}function K3(e){const t=e.children||"",n=new a1;return typeof t=="string"&&(n.value=t),n}function Q3(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||X3;for(const p of W3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+q3+p.id,void 0);return zu(e,h),xA(e,{Fragment:S.Fragment,components:o,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function h(p,E,T){if(p.type==="raw"&&T&&typeof E=="number")return u?T.children.splice(E,1):T.children[E]={type:"text",value:p.value},E;if(p.type==="element"){let y;for(y in Fd)if(Object.hasOwn(Fd,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],v=Fd[y];(v===null||v.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,T)),y&&T&&typeof E=="number")return c&&p.children?T.children.splice(E,1,...p.children):T.children.splice(E,1),E}}}function X3(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||Y3.test(e.slice(0,t))?e:""}const p1=/[#.]/g;function J3(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){p1.lastIndex=o;const c=p1.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 m1(e,t,n){const r=n?nN(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=J3(a,t);const h=d.tagName.toLowerCase(),p=r?r.get(h):void 0;if(d.tagName=p||h,Z3(u))c.unshift(u);else for(const[E,T]of Object.entries(u))eN(e,d.properties,E,T)}for(const h of c)lf(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function Z3(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 eN(e,t,n,r){const o=Id(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=og(r):o.commaSeparated?a=Y0(r):o.commaOrSpaceSeparated?a=og(Y0(r).join(" ")):a=g1(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?tN(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(g1(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function lf(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)lf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?lf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function g1(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Rs(n)===Rs(t)))return!0}return n}function tN(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function nN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const rN=["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"],iN=m1(Nu,"div"),oN=m1(go,"g",rN);function sN(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=E1(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=E1(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 E1(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/"},y1={}.hasOwnProperty,aN=Object.prototype;function uN(e,t){const n=t||{};return cf({file:n.file||void 0,location:!1,schema:n.space==="svg"?go:Nu,verbose:n.verbose||!1},e)}function cf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},$u(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:b1(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=sN(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"},$u(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},$u(e,r,n),n}default:return n=lN(e,t),n}}function b1(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=cf(e,t[n]);r.push(o)}return r}function lN(e,t){const n=e.schema;e.schema=t.namespaceURI===Ri.svg?go:Nu;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;y1.call(aN,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?oN:iN)(t.tagName,o,b1(e,t.childNodes));if($u(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&xo(d.startTag),p=d&&d.endTag&&xo(d.endTag),E=cf(e,c.content);h&&p&&e.file&&(E.position={start:h.end,end:p.start}),u.content=E}return e.schema=n,u}function $u(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=cN(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function cN(e,t,n){const r=xo(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)y1.call(n.attrs,u)&&(a[Id(e.schema,u).property]=xo(n.attrs[u]));n.startTag;const c=xo(n.startTag),d=n.endTag?xo(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=a,t.data={position:h}}}return r}function xo(e){const t=T1({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=T1({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function T1(e){return e.line&&e.column?e:void 0}class $s{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}$s.prototype.property={},$s.prototype.normal={},$s.prototype.space=null;function x1(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 $s(n,r,t)}function df(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 dN=0;const ze=Pi(),Ct=Pi(),w1=Pi(),Ee=Pi(),at=Pi(),wo=Pi(),wn=Pi();function Pi(){return nu(2,++dN)}const ff=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Ct,commaOrSpaceSeparated:wn,commaSeparated:wo,number:Ee,overloadedBoolean:w1,spaceSeparated:at},Symbol.toStringTag,{value:"Module"})),hf=Object.keys(ff);class pf extends Pn{constructor(t,n,r,o){let a=-1;if(super(t,n),_1(this,"space",o),typeof r=="number")for(;++a<hf.length;){const u=hf[a];_1(this,hf[a],(r&ff[u])===ff[u])}}}pf.prototype.defined=!0;function _1(e,t,n){n&&(e[t]=n)}const fN={}.hasOwnProperty;function _o(e){const t={},n={};let r;for(r in e.properties)if(fN.call(e.properties,r)){const o=e.properties[r],a=new pf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[df(r)]=r,n[df(a.attribute)]=r}return new $s(t,n,e.space)}const v1=_o({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}}),S1=_o({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function A1(e,t){return t in e?e[t]:t}function C1(e,t){return A1(e,t.toLowerCase())}const k1=_o({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:C1,properties:{xmlns:null,xmlnsXLink:null}}),N1=_o({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ct,ariaAutoComplete:null,ariaBusy:Ct,ariaChecked:Ct,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:at,ariaCurrent:null,ariaDescribedBy:at,ariaDetails:null,ariaDisabled:Ct,ariaDropEffect:at,ariaErrorMessage:null,ariaExpanded:Ct,ariaFlowTo:at,ariaGrabbed:Ct,ariaHasPopup:null,ariaHidden:Ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:at,ariaLevel:Ee,ariaLive:null,ariaModal:Ct,ariaMultiLine:Ct,ariaMultiSelectable:Ct,ariaOrientation:null,ariaOwns:at,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Ct,ariaReadOnly:Ct,ariaRelevant:null,ariaRequired:Ct,ariaRoleDescription:at,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Ct,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null}}),hN=_o({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:C1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:wo,acceptCharset:at,accessKey:at,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:at,autoFocus:ze,autoPlay:ze,blocking:at,capture:null,charSet:null,checked:ze,cite:null,className:at,cols:Ee,colSpan:null,content:null,contentEditable:Ct,controls:ze,controlsList:at,coords:Ee|wo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:w1,draggable:Ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:at,height:Ee,hidden:ze,high:Ee,href:null,hrefLang:null,htmlFor:at,httpEquiv:at,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:at,itemRef:at,itemScope:ze,itemType:at,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,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:Ee,pattern:null,ping:at,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:at,required:ze,reversed:ze,rows:Ee,rowSpan:Ee,sandbox:at,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Ct,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:Ct,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:at,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,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:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Ct,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:Ee,security:null,unselectable:null}}),pN=_o({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:A1,properties:{about:wn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:at,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:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,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:wo,g2:wo,glyphName:wo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,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:Ee,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:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:at,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,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:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,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:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),mN=/^data[-\w.:]+$/i,O1=/-[a-z]/g,gN=/[A-Z]/g;function EN(e,t){const n=df(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"&&mN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(O1,bN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!O1.test(a)){let u=a.replace(gN,yN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=pf}return new o(r,t)}function yN(e){return"-"+e.toLowerCase()}function bN(e){return e.charAt(1).toUpperCase()}const TN=x1([S1,v1,k1,N1,hN],"html"),I1=x1([S1,v1,k1,N1,pN],"svg"),R1={}.hasOwnProperty;function P1(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&R1.call(o,e)){const d=String(o[e]);u=R1.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 xN={},wN={}.hasOwnProperty,L1=P1("type",{handlers:{root:vN,element:NN,text:CN,comment:kN,doctype:AN}});function _N(e,t){const r=(t||xN).space;return L1(e,r==="svg"?I1:TN)}function vN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=mf(e.children,n,t),vo(e,n),n}function SN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=mf(e.children,n,t),vo(e,n),n}function AN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return vo(e,t),t}function CN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return vo(e,t),t}function kN(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return vo(e,t),t}function NN(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=I1);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&wN.call(e.properties,a)){const d=ON(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=mf(e.children,c,r),vo(e,c),e.tagName==="template"&&e.content&&(c.content=SN(e.content,r)),c}function ON(e,t,n){const r=EN(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?W0(n):sg(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 mf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=L1(e[r],n);a.parentNode=t,o.push(a)}return o}function vo(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 IN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],RN=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 k;(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"})(k||(k={}));const fn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function D1(e){return e>=55296&&e<=57343}function PN(e){return e>=56320&&e<=57343}function LN(e,t){return(e-55296)*1024+9216+t}function M1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function F1(e){return e>=64976&&e<=65007||RN.has(e)}var ne;(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"})(ne||(ne={}));const DN=65536;class MN{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=DN,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(PN(n))return this.pos++,this._addGap(),LN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,k.EOF;return this._err(ne.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,k.EOF;const r=this.html.charCodeAt(n);return r===k.CARRIAGE_RETURN?k.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,k.EOF;let t=this.html.charCodeAt(this.pos);return t===k.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,k.LINE_FEED):t===k.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,D1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===k.LINE_FEED||t===k.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){M1(t)?this._err(ne.controlCharacterInInputStream):F1(t)&&this._err(ne.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var qe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(qe||(qe={}));function B1(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 FN=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))),BN=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 UN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=BN.get(e))!==null&&t!==void 0?t:e}var Dt;(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"})(Dt||(Dt={}));const HN=32;var Wr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Wr||(Wr={}));function gf(e){return e>=Dt.ZERO&&e<=Dt.NINE}function zN(e){return e>=Dt.UPPER_A&&e<=Dt.UPPER_F||e>=Dt.LOWER_A&&e<=Dt.LOWER_F}function jN(e){return e>=Dt.UPPER_A&&e<=Dt.UPPER_Z||e>=Dt.LOWER_A&&e<=Dt.LOWER_Z||gf(e)}function $N(e){return e===Dt.EQUALS||jN(e)}var Mt;(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"})(Mt||(Mt={}));var Cr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Cr||(Cr={}));class VN{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Mt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Cr.Strict}startEntity(t){this.decodeMode=t,this.state=Mt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Mt.EntityStart:return t.charCodeAt(n)===Dt.NUM?(this.state=Mt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Mt.NamedEntity,this.stateNamedEntity(t,n));case Mt.NumericStart:return this.stateNumericStart(t,n);case Mt.NumericDecimal:return this.stateNumericDecimal(t,n);case Mt.NumericHex:return this.stateNumericHex(t,n);case Mt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|HN)===Dt.LOWER_X?(this.state=Mt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Mt.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(gf(o)||zN(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(gf(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===Dt.SEMI)this.consumed+=1;else if(this.decodeMode===Cr.Strict)return 0;return this.emitCodePoint(UN(this.result),this.consumed),this.errors&&(t!==Dt.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&Wr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=qN(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Cr.Attribute&&(a===0||$N(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Wr.VALUE_LENGTH)>>14,a!==0){if(u===Dt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Cr.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]&Wr.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]&~Wr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Mt.NamedEntity:return this.result!==0&&(this.decodeMode!==Cr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Mt.NumericDecimal:return this.emitNumericEntity(0,2);case Mt.NumericHex:return this.emitNumericEntity(0,3);case Mt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Mt.EntityStart:return 0}}}function qN(e,t,n,r){const o=(t&Wr.BRANCH_LENGTH)>>7,a=t&Wr.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 Y;(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"})(Y||(Y={}));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 YN=new Map([[Y.A,m.A],[Y.ADDRESS,m.ADDRESS],[Y.ANNOTATION_XML,m.ANNOTATION_XML],[Y.APPLET,m.APPLET],[Y.AREA,m.AREA],[Y.ARTICLE,m.ARTICLE],[Y.ASIDE,m.ASIDE],[Y.B,m.B],[Y.BASE,m.BASE],[Y.BASEFONT,m.BASEFONT],[Y.BGSOUND,m.BGSOUND],[Y.BIG,m.BIG],[Y.BLOCKQUOTE,m.BLOCKQUOTE],[Y.BODY,m.BODY],[Y.BR,m.BR],[Y.BUTTON,m.BUTTON],[Y.CAPTION,m.CAPTION],[Y.CENTER,m.CENTER],[Y.CODE,m.CODE],[Y.COL,m.COL],[Y.COLGROUP,m.COLGROUP],[Y.DD,m.DD],[Y.DESC,m.DESC],[Y.DETAILS,m.DETAILS],[Y.DIALOG,m.DIALOG],[Y.DIR,m.DIR],[Y.DIV,m.DIV],[Y.DL,m.DL],[Y.DT,m.DT],[Y.EM,m.EM],[Y.EMBED,m.EMBED],[Y.FIELDSET,m.FIELDSET],[Y.FIGCAPTION,m.FIGCAPTION],[Y.FIGURE,m.FIGURE],[Y.FONT,m.FONT],[Y.FOOTER,m.FOOTER],[Y.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[Y.FORM,m.FORM],[Y.FRAME,m.FRAME],[Y.FRAMESET,m.FRAMESET],[Y.H1,m.H1],[Y.H2,m.H2],[Y.H3,m.H3],[Y.H4,m.H4],[Y.H5,m.H5],[Y.H6,m.H6],[Y.HEAD,m.HEAD],[Y.HEADER,m.HEADER],[Y.HGROUP,m.HGROUP],[Y.HR,m.HR],[Y.HTML,m.HTML],[Y.I,m.I],[Y.IMG,m.IMG],[Y.IMAGE,m.IMAGE],[Y.INPUT,m.INPUT],[Y.IFRAME,m.IFRAME],[Y.KEYGEN,m.KEYGEN],[Y.LABEL,m.LABEL],[Y.LI,m.LI],[Y.LINK,m.LINK],[Y.LISTING,m.LISTING],[Y.MAIN,m.MAIN],[Y.MALIGNMARK,m.MALIGNMARK],[Y.MARQUEE,m.MARQUEE],[Y.MATH,m.MATH],[Y.MENU,m.MENU],[Y.META,m.META],[Y.MGLYPH,m.MGLYPH],[Y.MI,m.MI],[Y.MO,m.MO],[Y.MN,m.MN],[Y.MS,m.MS],[Y.MTEXT,m.MTEXT],[Y.NAV,m.NAV],[Y.NOBR,m.NOBR],[Y.NOFRAMES,m.NOFRAMES],[Y.NOEMBED,m.NOEMBED],[Y.NOSCRIPT,m.NOSCRIPT],[Y.OBJECT,m.OBJECT],[Y.OL,m.OL],[Y.OPTGROUP,m.OPTGROUP],[Y.OPTION,m.OPTION],[Y.P,m.P],[Y.PARAM,m.PARAM],[Y.PLAINTEXT,m.PLAINTEXT],[Y.PRE,m.PRE],[Y.RB,m.RB],[Y.RP,m.RP],[Y.RT,m.RT],[Y.RTC,m.RTC],[Y.RUBY,m.RUBY],[Y.S,m.S],[Y.SCRIPT,m.SCRIPT],[Y.SEARCH,m.SEARCH],[Y.SECTION,m.SECTION],[Y.SELECT,m.SELECT],[Y.SOURCE,m.SOURCE],[Y.SMALL,m.SMALL],[Y.SPAN,m.SPAN],[Y.STRIKE,m.STRIKE],[Y.STRONG,m.STRONG],[Y.STYLE,m.STYLE],[Y.SUB,m.SUB],[Y.SUMMARY,m.SUMMARY],[Y.SUP,m.SUP],[Y.TABLE,m.TABLE],[Y.TBODY,m.TBODY],[Y.TEMPLATE,m.TEMPLATE],[Y.TEXTAREA,m.TEXTAREA],[Y.TFOOT,m.TFOOT],[Y.TD,m.TD],[Y.TH,m.TH],[Y.THEAD,m.THEAD],[Y.TITLE,m.TITLE],[Y.TR,m.TR],[Y.TRACK,m.TRACK],[Y.TT,m.TT],[Y.U,m.U],[Y.UL,m.UL],[Y.SVG,m.SVG],[Y.VAR,m.VAR],[Y.WBR,m.WBR],[Y.XMP,m.XMP]]);function So(e){var t;return(t=YN.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const pe=m,WN={[le.HTML]:new Set([pe.ADDRESS,pe.APPLET,pe.AREA,pe.ARTICLE,pe.ASIDE,pe.BASE,pe.BASEFONT,pe.BGSOUND,pe.BLOCKQUOTE,pe.BODY,pe.BR,pe.BUTTON,pe.CAPTION,pe.CENTER,pe.COL,pe.COLGROUP,pe.DD,pe.DETAILS,pe.DIR,pe.DIV,pe.DL,pe.DT,pe.EMBED,pe.FIELDSET,pe.FIGCAPTION,pe.FIGURE,pe.FOOTER,pe.FORM,pe.FRAME,pe.FRAMESET,pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6,pe.HEAD,pe.HEADER,pe.HGROUP,pe.HR,pe.HTML,pe.IFRAME,pe.IMG,pe.INPUT,pe.LI,pe.LINK,pe.LISTING,pe.MAIN,pe.MARQUEE,pe.MENU,pe.META,pe.NAV,pe.NOEMBED,pe.NOFRAMES,pe.NOSCRIPT,pe.OBJECT,pe.OL,pe.P,pe.PARAM,pe.PLAINTEXT,pe.PRE,pe.SCRIPT,pe.SECTION,pe.SELECT,pe.SOURCE,pe.STYLE,pe.SUMMARY,pe.TABLE,pe.TBODY,pe.TD,pe.TEMPLATE,pe.TEXTAREA,pe.TFOOT,pe.TH,pe.THEAD,pe.TITLE,pe.TR,pe.TRACK,pe.UL,pe.WBR,pe.XMP]),[le.MATHML]:new Set([pe.MI,pe.MO,pe.MN,pe.MS,pe.MTEXT,pe.ANNOTATION_XML]),[le.SVG]:new Set([pe.TITLE,pe.FOREIGN_OBJECT,pe.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},Ef=new Set([pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6]);Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT;var I;(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"})(I||(I={}));const wt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function GN(e){return e>=k.DIGIT_0&&e<=k.DIGIT_9}function Vs(e){return e>=k.LATIN_CAPITAL_A&&e<=k.LATIN_CAPITAL_Z}function KN(e){return e>=k.LATIN_SMALL_A&&e<=k.LATIN_SMALL_Z}function Gr(e){return KN(e)||Vs(e)}function U1(e){return Gr(e)||GN(e)}function Vu(e){return e+32}function H1(e){return e===k.SPACE||e===k.LINE_FEED||e===k.TABULATION||e===k.FORM_FEED}function z1(e){return H1(e)||e===k.SOLIDUS||e===k.GREATER_THAN_SIGN}function QN(e){return e===k.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:D1(e)?ne.surrogateCharacterReference:F1(e)?ne.noncharacterCharacterReference:M1(e)||e===k.CARRIAGE_RETURN?ne.controlCharacterReference:null}class XN{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=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new MN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new VN(FN,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ne.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ne.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=QN(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:qe.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qe.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:qe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(B1(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(ne.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=So(t.tagName),t.type===qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ne.endTagWithAttributes),t.selfClosing&&this._err(ne.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case qe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:qe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=H1(t)?qe.WHITESPACE_CHARACTER:t===k.NULL?qe.NULL_CHARACTER:qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Cr.Attribute:Cr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitCodePoint(t);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case k.AMPERSAND:{this._startCharacterReference();break}case k.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case k.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Gr(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case k.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case k.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case k.QUESTION_MARK:{this._err(ne.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case k.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Gr(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case k.GREATER_THAN_SIGN:{this._err(ne.missingEndTagName),this.state=I.DATA;break}case k.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.tagName+=ft;break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Vs(t)?Vu(t):t)}}_stateRcdataLessThanSign(t){t===k.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Gr(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case k.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case k.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===k.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Gr(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case k.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case k.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Gr(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===k.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===k.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===k.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Gr(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Gr(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&z1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===k.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&z1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._err(ne.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:{this._err(ne.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.name+=ft;break}default:this.currentAttr.name+=String.fromCodePoint(Vs(t)?Vu(t):t)}}_stateAfterAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case k.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case k.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case k.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:case k.EQUALS_SIGN:case k.GRAVE_ACCENT:{this._err(ne.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case k.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case k.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case k.NULL:{this._err(ne.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=I.COMMENT_START):this._consumeSequenceIfMatch(fn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(fn.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(fn.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(fn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ne.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case k.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=ft;break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case k.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case k.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===k.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===k.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==k.GREATER_THAN_SIGN&&t!==k.EOF&&this._err(ne.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case k.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case k.HYPHEN_MINUS:{n.data+="-";break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case k.GREATER_THAN_SIGN:{this._err(ne.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case k.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Vs(t))this._createDoctypeToken(String.fromCharCode(Vu(t))),this.state=I.DOCTYPE_NAME;else switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.NULL:{this._err(ne.unexpectedNullCharacter),this._createDoctypeToken(ft),this.state=I.DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.EOF:{this._err(ne.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=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.name+=ft;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Vs(t)?Vu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(fn.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(fn.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ne.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=ft;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.EOF:{this._err(ne.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 k.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=ft;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.EOF:{this._err(ne.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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.QUOTATION_MARK:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=ft;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.EOF:{this._err(ne.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 k.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=ft;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.EOF:{this._err(ne.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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.NULL:{this._err(ne.unexpectedNullCharacter);break}case k.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case k.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case k.EOF:{this._err(ne.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===k.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case k.GREATER_THAN_SIGN:{this.state=I.DATA;break}case k.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.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(k.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&U1(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){U1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===k.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const j1=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),$1=new Set([...j1,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),qu=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),JN=new Set([...qu,m.OL,m.UL]),ZN=new Set([...qu,m.BUTTON]),V1=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),q1=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),eO=new Set([m.TR,m.TEMPLATE,m.HTML]),tO=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),nO=new Set([m.TABLE,m.TEMPLATE,m.HTML]),rO=new Set([m.TD,m.TH]);class iO{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(Ef,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(rO,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(nO,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(tO,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(eO,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(q1.has(o))return!1;break}case le.MATHML:{if(V1.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,qu)}hasInListItemScope(t){return this.hasInDynamicScope(t,JN)}hasInButtonScope(t){return this.hasInDynamicScope(t,ZN)}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(Ef.has(n))return!0;if(qu.has(n))return!1;break}case le.SVG:{if(q1.has(n))return!1;break}case le.MATHML:{if(V1.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&&j1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&$1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&$1.has(this.currentTagId);)this.pop()}}const yf=3;var cr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(cr||(cr={}));const Y1={type:cr.Marker};class oO{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===cr.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<yf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<yf)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>=yf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Y1)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:cr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:cr.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(Y1);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===cr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===cr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===cr.Element&&n.element===t)}}const Kr={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};Kr.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(Kr.isTextNode(n)){n.value+=t;return}}Kr.appendChild(e,Kr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Kr.isTextNode(r)?r.value+=t:Kr.insertBefore(e,Kr.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=F(F({},e.sourceCodeLocation),t)}},W1="html",sO="about:legacy-compat",aO="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",G1=["+//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//"],uO=[...G1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],lO=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),K1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],cO=[...K1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Q1(e,t){return t.some(n=>e.startsWith(n))}function dO(e){return e.name===W1&&e.publicId===null&&(e.systemId===null||e.systemId===sO)}function fO(e){if(e.name!==W1)return Ln.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===aO)return Ln.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),lO.has(n))return Ln.QUIRKS;let r=t===null?uO:G1;if(Q1(n,r))return Ln.QUIRKS;if(r=t===null?K1:cO,Q1(n,r))return Ln.LIMITED_QUIRKS}return Ln.NO_QUIRKS}const X1={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},hO="definitionurl",pO="definitionURL",mO=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])),gO=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}]]),EO=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])),yO=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 bO(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===Li.COLOR||r===Li.SIZE||r===Li.FACE)||yO.has(t)}function J1(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===hO){e.attrs[t].name=pO;break}}function Z1(e){for(let t=0;t<e.attrs.length;t++){const n=mO.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function bf(e){for(let t=0;t<e.attrs.length;t++){const n=gO.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 TO(e){const t=EO.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=So(e.tagName))}function xO(e,t){return t===le.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function wO(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===X1.TEXT_HTML||o===X1.APPLICATION_XML}}return t===le.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function _O(e,t,n,r){return(!r||r===le.HTML)&&wO(e,t,n)||(!r||r===le.MATHML)&&xO(e,t)}const vO="hidden",SO=8,AO=3;var D;(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"})(D||(D={}));const CO={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},eE=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),tE={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Kr,onParseError:null};class nE{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=D.INITIAL,this.originalInsertionMode=D.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=F(F({},tE),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 XN(this.options,this),this.activeFormattingElements=new oO(this.treeAdapter),this.fragmentContextID=r?So(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new iO(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=F(F({},tE),n);t!=null||(t=r.treeAdapter.createElement(Y.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(D.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:CO,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=D.TEXT}switchToPlaintextParsing(){this.insertionMode=D.TEXT,this.originalInsertionMode=D.IN_BODY,this.tokenizer.state=wt.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)===Y.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=wt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=wt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=wt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=wt.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&&ae(F({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,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(Y.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===qe.END_TAG&&o===n.tagName?{endTag:F({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===Y.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 qe.CHARACTER:{this.onCharacter(t);break}case qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case qe.COMMENT:{this.onComment(t);break}case qe.DOCTYPE:{this.onDoctype(t);break}case qe.START_TAG:{this._processStartTag(t);break}case qe.END_TAG:{this.onEndTag(t);break}case qe.EOF:{this.onEof(t);break}case qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return _O(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===cr.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=D.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=D.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=D.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=D.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=D.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=D.IN_TABLE;return}case m.BODY:{this.insertionMode=D.IN_BODY;return}case m.FRAMESET:{this.insertionMode=D.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?D.AFTER_HEAD:D.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=D.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=D.IN_HEAD;return}break}}this.insertionMode=D.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=D.IN_SELECT_IN_TABLE;return}}this.insertionMode=D.IN_SELECT}_isElementCausesFosterParenting(t){return eE.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 WN[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){rR(this,t);return}switch(this.insertionMode){case D.INITIAL:{qs(this,t);break}case D.BEFORE_HTML:{Ys(this,t);break}case D.BEFORE_HEAD:{Ws(this,t);break}case D.IN_HEAD:{Gs(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Ks(this,t);break}case D.AFTER_HEAD:{Qs(this,t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:{iE(this,t);break}case D.TEXT:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{_f(this,t);break}case D.IN_TABLE_TEXT:{fE(this,t);break}case D.IN_COLUMN_GROUP:{Gu(this,t);break}case D.AFTER_BODY:{Xu(this,t);break}case D.AFTER_AFTER_BODY:{Ju(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){nR(this,t);return}switch(this.insertionMode){case D.INITIAL:{qs(this,t);break}case D.BEFORE_HTML:{Ys(this,t);break}case D.BEFORE_HEAD:{Ws(this,t);break}case D.IN_HEAD:{Gs(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Ks(this,t);break}case D.AFTER_HEAD:{Qs(this,t);break}case D.TEXT:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{_f(this,t);break}case D.IN_COLUMN_GROUP:{Gu(this,t);break}case D.AFTER_BODY:{Xu(this,t);break}case D.AFTER_AFTER_BODY:{Ju(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){xf(this,t);return}switch(this.insertionMode){case D.INITIAL:case D.BEFORE_HTML:case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_TEMPLATE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{xf(this,t);break}case D.IN_TABLE_TEXT:{Zs(this,t);break}case D.AFTER_BODY:{LO(this,t);break}case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{DO(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case D.INITIAL:{MO(this,t);break}case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:{this._err(t,ne.misplacedDoctype);break}case D.IN_TABLE_TEXT:{Zs(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ne.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?iR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{qs(this,t);break}case D.BEFORE_HTML:{FO(this,t);break}case D.BEFORE_HEAD:{UO(this,t);break}case D.IN_HEAD:{Wn(this,t);break}case D.IN_HEAD_NO_SCRIPT:{jO(this,t);break}case D.AFTER_HEAD:{VO(this,t);break}case D.IN_BODY:{Kt(this,t);break}case D.IN_TABLE:{Ao(this,t);break}case D.IN_TABLE_TEXT:{Zs(this,t);break}case D.IN_CAPTION:{HI(this,t);break}case D.IN_COLUMN_GROUP:{vf(this,t);break}case D.IN_TABLE_BODY:{Ku(this,t);break}case D.IN_ROW:{Qu(this,t);break}case D.IN_CELL:{$I(this,t);break}case D.IN_SELECT:{mE(this,t);break}case D.IN_SELECT_IN_TABLE:{qI(this,t);break}case D.IN_TEMPLATE:{WI(this,t);break}case D.AFTER_BODY:{KI(this,t);break}case D.IN_FRAMESET:{QI(this,t);break}case D.AFTER_FRAMESET:{JI(this,t);break}case D.AFTER_AFTER_BODY:{eR(this,t);break}case D.AFTER_AFTER_FRAMESET:{tR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?oR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{qs(this,t);break}case D.BEFORE_HTML:{BO(this,t);break}case D.BEFORE_HEAD:{HO(this,t);break}case D.IN_HEAD:{zO(this,t);break}case D.IN_HEAD_NO_SCRIPT:{$O(this,t);break}case D.AFTER_HEAD:{qO(this,t);break}case D.IN_BODY:{Wu(this,t);break}case D.TEXT:{OI(this,t);break}case D.IN_TABLE:{Xs(this,t);break}case D.IN_TABLE_TEXT:{Zs(this,t);break}case D.IN_CAPTION:{zI(this,t);break}case D.IN_COLUMN_GROUP:{jI(this,t);break}case D.IN_TABLE_BODY:{Sf(this,t);break}case D.IN_ROW:{pE(this,t);break}case D.IN_CELL:{VI(this,t);break}case D.IN_SELECT:{gE(this,t);break}case D.IN_SELECT_IN_TABLE:{YI(this,t);break}case D.IN_TEMPLATE:{GI(this,t);break}case D.AFTER_BODY:{yE(this,t);break}case D.IN_FRAMESET:{XI(this,t);break}case D.AFTER_FRAMESET:{ZI(this,t);break}case D.AFTER_AFTER_BODY:{Ju(this,t);break}}}onEof(t){switch(this.insertionMode){case D.INITIAL:{qs(this,t);break}case D.BEFORE_HTML:{Ys(this,t);break}case D.BEFORE_HEAD:{Ws(this,t);break}case D.IN_HEAD:{Gs(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Ks(this,t);break}case D.AFTER_HEAD:{Qs(this,t);break}case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{cE(this,t);break}case D.TEXT:{II(this,t);break}case D.IN_TABLE_TEXT:{Zs(this,t);break}case D.IN_TEMPLATE:{EE(this,t);break}case D.AFTER_BODY:case D.IN_FRAMESET:case D.AFTER_FRAMESET:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{wf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===k.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 D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.TEXT:case D.IN_COLUMN_GROUP:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{this._insertCharacters(t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:case D.AFTER_BODY:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{rE(this,t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{_f(this,t);break}case D.IN_TABLE_TEXT:{dE(this,t);break}}}}function kO(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):lE(e,t),n}function NO(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 OO(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>=AO;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=IO(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function IO(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 RO(e,t,n){const r=e.treeAdapter.getTagName(t),o=So(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 PO(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 Tf(e,t){for(let n=0;n<SO;n++){const r=kO(e,t);if(!r)break;const o=NO(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=OO(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&RO(e,u,a),PO(e,o,r)}}function xf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function LO(e,t){e._appendCommentNode(t,e.openElements.items[0])}function DO(e,t){e._appendCommentNode(t,e.document)}function wf(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 MO(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ln.QUIRKS:fO(t);dO(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=D.BEFORE_HTML}function qs(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ln.QUIRKS),e.insertionMode=D.BEFORE_HTML,e._processToken(t)}function FO(e,t){t.tagID===m.HTML?(e._insertElement(t,le.HTML),e.insertionMode=D.BEFORE_HEAD):Ys(e,t)}function BO(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&Ys(e,t)}function Ys(e,t){e._insertFakeRootElement(),e.insertionMode=D.BEFORE_HEAD,e._processToken(t)}function UO(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD;break}default:Ws(e,t)}}function HO(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Ws(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Ws(e,t){e._insertFakeElement(Y.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD,e._processToken(t)}function Wn(e,t){switch(t.tagID){case m.HTML:{Kt(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,wt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,wt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=D.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,wt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,wt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=D.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(D.IN_TEMPLATE);break}case m.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:Gs(e,t)}}function zO(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=D.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Gs(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Di(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,ne.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Gs(e,t){e.openElements.pop(),e.insertionMode=D.AFTER_HEAD,e._processToken(t)}function jO(e,t){switch(t.tagID){case m.HTML:{Kt(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,ne.nestedNoscriptInHead);break}default:Ks(e,t)}}function $O(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=D.IN_HEAD;break}case m.BR:{Ks(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Ks(e,t){const n=t.type===qe.EOF?ne.openElementsLeftAfterEof:ne.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=D.IN_HEAD,e._processToken(t)}function VO(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=D.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=D.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,ne.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),Wn(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:Qs(e,t)}}function qO(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Qs(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Qs(e,t){e._insertFakeElement(Y.BODY,m.BODY),e.insertionMode=D.IN_BODY,Yu(e,t)}function Yu(e,t){switch(t.type){case qe.CHARACTER:{iE(e,t);break}case qe.WHITESPACE_CHARACTER:{rE(e,t);break}case qe.COMMENT:{xf(e,t);break}case qe.START_TAG:{Kt(e,t);break}case qe.END_TAG:{Wu(e,t);break}case qe.EOF:{cE(e,t);break}}}function rE(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function iE(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function YO(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function WO(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function GO(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_FRAMESET)}function KO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function QO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ef.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function XO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function JO(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 ZO(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 eI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=wt.PLAINTEXT}function tI(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 nI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(Tf(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 rI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function iI(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(Tf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function oI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function sI(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=D.IN_TABLE}function oE(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function sE(e){const t=B1(e,Li.TYPE);return t!=null&&t.toLowerCase()===vO}function aI(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),sE(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function uI(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function lI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function cI(e,t){t.tagName=Y.IMG,t.tagID=m.IMG,oE(e,t)}function dI(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=wt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=D.TEXT}function fI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function hI(e,t){e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function aE(e,t){e._switchToTextParsing(t,wt.RAWTEXT)}function pI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===D.IN_TABLE||e.insertionMode===D.IN_CAPTION||e.insertionMode===D.IN_TABLE_BODY||e.insertionMode===D.IN_ROW||e.insertionMode===D.IN_CELL?D.IN_SELECT_IN_TABLE:D.IN_SELECT}function mI(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function gI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function EI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,le.HTML)}function yI(e,t){e._reconstructActiveFormattingElements(),J1(t),bf(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function bI(e,t){e._reconstructActiveFormattingElements(),Z1(t),bf(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function uE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function Kt(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:{rI(e,t);break}case m.A:{nI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{QO(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:{KO(e,t);break}case m.LI:case m.DD:case m.DT:{ZO(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{oE(e,t);break}case m.HR:{lI(e,t);break}case m.RB:case m.RTC:{gI(e,t);break}case m.RT:case m.RP:{EI(e,t);break}case m.PRE:case m.LISTING:{XO(e,t);break}case m.XMP:{fI(e,t);break}case m.SVG:{bI(e,t);break}case m.HTML:{YO(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:{WO(e,t);break}case m.FORM:{JO(e,t);break}case m.NOBR:{iI(e,t);break}case m.MATH:{yI(e,t);break}case m.TABLE:{sI(e,t);break}case m.INPUT:{aI(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{uI(e,t);break}case m.IMAGE:{cI(e,t);break}case m.BUTTON:{tI(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{oI(e,t);break}case m.IFRAME:{hI(e,t);break}case m.SELECT:{pI(e,t);break}case m.OPTION:case m.OPTGROUP:{mI(e,t);break}case m.NOEMBED:case m.NOFRAMES:{aE(e,t);break}case m.FRAMESET:{GO(e,t);break}case m.TEXTAREA:{dI(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?aE(e,t):uE(e,t);break}case m.PLAINTEXT:{eI(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:uE(e,t)}}function TI(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=D.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function xI(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=D.AFTER_BODY,yE(e,t))}function wI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function _I(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 vI(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(Y.P,m.P),e._closePElement()}function SI(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function AI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function CI(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function kI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function NI(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function lE(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 Wu(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:{Tf(e,t);break}case m.P:{vI(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:{wI(e,t);break}case m.LI:{SI(e);break}case m.DD:case m.DT:{AI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{CI(e);break}case m.BR:{NI(e);break}case m.BODY:{TI(e,t);break}case m.HTML:{xI(e,t);break}case m.FORM:{_I(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{kI(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:lE(e,t)}}function cE(e,t){e.tmplInsertionModeStack.length>0?EE(e,t):wf(e,t)}function OI(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 II(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _f(e,t){if(e.openElements.currentTagId!==void 0&&eE.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=D.IN_TABLE_TEXT,t.type){case qe.CHARACTER:{fE(e,t);break}case qe.WHITESPACE_CHARACTER:{dE(e,t);break}}else Js(e,t)}function RI(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_CAPTION}function PI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_COLUMN_GROUP}function LI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,m.COLGROUP),e.insertionMode=D.IN_COLUMN_GROUP,vf(e,t)}function DI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_TABLE_BODY}function MI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,m.TBODY),e.insertionMode=D.IN_TABLE_BODY,Ku(e,t)}function FI(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function BI(e,t){sE(t)?e._appendElement(t,le.HTML):Js(e,t),t.ackSelfClosing=!0}function UI(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ao(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{MI(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{Wn(e,t);break}case m.COL:{LI(e,t);break}case m.FORM:{UI(e,t);break}case m.TABLE:{FI(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{DI(e,t);break}case m.INPUT:{BI(e,t);break}case m.CAPTION:{RI(e,t);break}case m.COLGROUP:{PI(e,t);break}default:Js(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:Js(e,t)}}function Js(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Yu(e,t),e.fosterParentingEnabled=n}function dE(e,t){e.pendingCharacterTokens.push(t)}function fE(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Zs(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Js(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const hE=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function HI(e,t){const n=t.tagID;hE.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_TABLE,Ao(e,t)):Kt(e,t)}function zI(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=D.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:Wu(e,t)}}function vf(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{Wn(e,t);break}default:Gu(e,t)}}function jI(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE);break}case m.TEMPLATE:{Di(e,t);break}case m.COL:break;default:Gu(e,t)}}function Gu(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE,e._processToken(t))}function Ku(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,m.TR),e.insertionMode=D.IN_ROW,Qu(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=D.IN_TABLE,Ao(e,t));break}default:Ao(e,t)}}function Sf(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=D.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D.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 Qu(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=D.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=D.IN_TABLE_BODY,Ku(e,t));break}default:Ao(e,t)}}function pE(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY,Sf(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=D.IN_TABLE_BODY,Sf(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 $I(e,t){const n=t.tagID;hE.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),Qu(e,t)):Kt(e,t)}function VI(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=D.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),pE(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:Wu(e,t)}}function mE(e,t){switch(t.tagID){case m.HTML:{Kt(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 gE(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 qI(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)):mE(e,t)}function YI(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)):gE(e,t)}function WI(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]=D.IN_TABLE,e.insertionMode=D.IN_TABLE,Ao(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=D.IN_COLUMN_GROUP,e.insertionMode=D.IN_COLUMN_GROUP,vf(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=D.IN_TABLE_BODY,e.insertionMode=D.IN_TABLE_BODY,Ku(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=D.IN_ROW,e.insertionMode=D.IN_ROW,Qu(e,t);break}default:e.tmplInsertionModeStack[0]=D.IN_BODY,e.insertionMode=D.IN_BODY,Kt(e,t)}}function GI(e,t){t.tagID===m.TEMPLATE&&Di(e,t)}function EE(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wf(e,t)}function KI(e,t){t.tagID===m.HTML?Kt(e,t):Xu(e,t)}function yE(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=D.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 Xu(e,t)}function Xu(e,t){e.insertionMode=D.IN_BODY,Yu(e,t)}function QI(e,t){switch(t.tagID){case m.HTML:{Kt(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 XI(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=D.AFTER_FRAMESET))}function JI(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{Wn(e,t);break}}}function ZI(e,t){t.tagID===m.HTML&&(e.insertionMode=D.AFTER_AFTER_FRAMESET)}function eR(e,t){t.tagID===m.HTML?Kt(e,t):Ju(e,t)}function Ju(e,t){e.insertionMode=D.IN_BODY,Yu(e,t)}function tR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{Wn(e,t);break}}}function nR(e,t){t.chars=ft,e._insertCharacters(t)}function rR(e,t){e._insertCharacters(t),e.framesetOk=!1}function bE(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 iR(e,t){if(bO(t))bE(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?J1(t):r===le.SVG&&(TO(t),Z1(t)),bf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function oR(e,t){if(t.tagID===m.P||t.tagID===m.BR){bE(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}}}Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR;const sR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,aR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),TE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function xE(e,t){const n=ER(e),r=P1("type",{handlers:{root:uR,element:lR,text:cR,comment:_E,doctype:dR,raw:hR},unknown:pR}),o={parser:n?new nE(TE):nE.getFragmentParser(void 0,TE),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Co(o,ur());const a=n?o.parser.document:o.parser.getFragment(),u=uN(a,{file:o.options.file});return o.stitches&&zu(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 wE(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function uR(e,t){wE(e.children,t)}function lR(e,t){mR(e,t),wE(e.children,t),gR(e,t)}function cR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qe.CHARACTER,chars:e.value,location:ea(e)};Co(t,ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function dR(e,t){const n={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ea(e)};Co(t,ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function fR(e,t){t.stitches=!0;const n=yR(e);if("children"in e&&"children"in n){const r=xE({type:"root",children:e.children},t.options);n.children=r.children}_E({type:"comment",value:{stitch:n}},t)}function _E(e,t){const n=e.value,r={type:qe.COMMENT,data:n,location:ea(e)};Co(t,ur(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function hR(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,vE(t,ur(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(sR,"&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 pR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))fR(n,t);else{let r="";throw aR.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 Co(e,t){vE(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=wt.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 vE(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 mR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===wt.PLAINTEXT)return;Co(t,ur(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=_N(ae(F({},e),{children:[]}),{space:o===Ri.svg?"svg":"html"}),u={type:qe.START_TAG,tagName:n,tagID:So(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ea(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function gR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&IN.includes(n)||t.parser.tokenizer.state===wt.PLAINTEXT)return;Co(t,Ou(e));const r={type:qe.END_TAG,tagName:n,tagID:So(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ea(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===wt.RCDATA||t.parser.tokenizer.state===wt.RAWTEXT||t.parser.tokenizer.state===wt.SCRIPT_DATA)&&(t.parser.tokenizer.state=wt.DATA)}function ER(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ea(e){const t=ur(e)||{line:void 0,column:void 0,offset:void 0},n=Ou(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 yR(e){return"children"in e?Ii(ae(F({},e),{children:[]})):Ii(e)}function SE(e){return function(t,n){return xE(t,ae(F({},e),{file:n}))}}const Mi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],AE={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"]},Qr={}.hasOwnProperty;function bR(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},AE),t):AE,stack:[]},o=CE(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function CE(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return TR(e,n);case"doctype":return xR(e,n);case"element":return wR(e,n);case"root":return _R(e,n);case"text":return vR(e,n)}}}function TR(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 ta(a,t),a}}function xR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ta(n,t),n}}function wR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=kE(e,t.children),o=SR(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&&Qr.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 ta(u,t),u}function _R(e,t){const r={type:"root",children:kE(e,t.children)};return ta(r,t),r}function vR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ta(r,t),r}function kE(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=CE(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function SR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Qr.call(r,n)?r[n]:void 0,u=r&&Qr.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(Qr.call(c,h)){const p=c[h];let E=NE(e,IE(a,h),h,p);E==null&&(E=NE(e,IE(u,h),h,p)),E!=null&&(d[h]=E)}if(o&&Qr.call(o,n)){const p=o[n];for(h in p)Qr.call(p,h)&&!Qr.call(d,h)&&(d[h]=p[h])}return d}function NE(e,t,n,r){return t?Array.isArray(r)?AR(e,t,n,r):OE(e,t,n,r):void 0}function AR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=OE(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function OE(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&CR(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 CR(e,t,n){const r=e.schema.protocols&&Qr.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 ta(e,t){const n=fg(t);t.data&&(e.data=Ii(t.data)),n&&(e.position=n)}function IE(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 kR(e){return function(t){return bR(t,e)}}const RE=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return S.jsx("a",ae(F(F({className:$(e,`${B}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},NR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=Nt();return!e&&!t?null:S.jsx("div",{className:$(n,`${B}-disclaimer`),children:t?S.jsx(h1,{rehypePlugins:[SE,kR],components:{ul:({children:r})=>S.jsx("ul",{className:$(n,`${B}-ul`),children:r}),ol:({children:r})=>S.jsx("ol",{className:$(n,`${B}-ol`),children:r}),li:({children:r})=>S.jsx("li",{className:$(n,`${B}-li`),children:r}),a:({href:r,title:o,children:a})=>S.jsx(RE,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>S.jsx("img",{className:$(n,`${B}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>S.jsx("p",{className:$(n,`${B}-disclaimer-text`),children:r}),span:({children:r})=>S.jsx("span",{className:$(n,`${B}-disclaimer-text-span`),children:r})},children:t}):S.jsx("p",{className:$(n,`${B}-disclaimer-text`),children:e})})},Af=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:o,sessionExpired:a}=Ar(),{globalClassName:u,searchConfig:c}=Nt(),d=J.useRef(null),h=t||!o&&!a,p=T=>{var x;T.preventDefault();const y=(((x=d.current)==null?void 0:x.value)||"").trim();y&&(d.current.value="",r(y))},E=()=>{r("Can you connect me to a human?")};return S.jsxs("div",{className:$(u,e,`cim-${n}-component`,`${B}-search-bar-wrapper`),children:[S.jsxs("form",{className:$(u,e,`cim-${n}-component`,`${B}-search-bar`),name:`${B}-search-form`,onSubmit:p,children:[S.jsx("input",{className:$(u,e,`cim-${n}-component`,`${B}-search-input`),type:"text",ref:d,placeholder:(c==null?void 0:c.placeholder)||"Ask us anything",name:`${B}-user-input`,disabled:h}),S.jsx(XS,{className:e,globalClassName:u,searchConfig:c,componentType:n,isLoading:h}),S.jsx(ar,{className:$(u,`${B}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:h,onClick:E,icon:S.jsx(zS,{})})]}),S.jsx(NR,{})]})};function OR(e){return mt({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 PE=J.createContext({isOpen:!1}),Cf=J.createContext(null),LE=J.createContext(null),na=()=>{var n,r;const e=J.useContext(Cf),t=J.useContext(LE);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},DE=({onClearChat:e,componentType:t})=>{const n=na(),r=()=>{e(),n()};return S.jsxs("button",{className:$(`${B}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[S.jsx(OR,{}),"Clear chat"]})};function IR(e){return e==null?[]:Array.isArray(e)?e:[e]}var RR=(e,...t)=>e.concat(t),PR=(e,...t)=>e.filter(n=>!t.includes(n)),LR=e=>Array.from(new Set(e));function ME(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 DR(e,t,n={}){const{step:r=1,loop:o=!0}=n;return ME(e,t,{step:-r,loop:o})}var MR=e=>Array.isArray(e),FE=e=>e!=null&&typeof e=="object",FR=e=>FE(e)&&!MR(e),Zu=e=>typeof e=="string",ko=e=>typeof e=="function",BR=e=>e==null,UR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),HR=e=>Object.prototype.toString.call(e),BE=Function.prototype.toString,zR=BE.call(Object),jR=e=>{if(!FE(e)||HR(e)!="[object Object]"||qR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=UR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&BE.call(n)==zR},$R=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,VR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,qR=e=>$R(e)||VR(e),YR=e=>e(),WR=()=>{},kf=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function GR(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:KR,max:QR}=Math,XR=e=>Number.isNaN(e),JR=e=>XR(e)?0:e,UE=(e,t,n)=>KR(QR(JR(e),t),n);function Nf(e){if(!jR(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]=Nf(o))}return n}function Of(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function ZR(e,t){if(e==null)throw new Error(t())}function eP(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 tP=Object.defineProperty,nP=(e,t,n)=>t in e?tP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,If=(e,t,n)=>nP(e,typeof t!="symbol"?t+"":t,n),HE=()=>{},el=e=>typeof e=="object"&&e!==null,No=e=>e?"":void 0,zE=e=>e?"true":void 0,rP=1,iP=9,oP=11,Ft=e=>el(e)&&e.nodeType===rP&&typeof e.nodeName=="string",tl=e=>el(e)&&e.nodeType===iP,sP=e=>el(e)&&e===e.window,jE=e=>Ft(e)?e.localName||"":"#document";function aP(e){return["html","body","#document"].includes(jE(e))}var uP=e=>el(e)&&e.nodeType!==void 0,Fi=e=>uP(e)&&e.nodeType===oP&&"host"in e,lP=e=>Ft(e)&&e.localName==="input",cP=e=>Ft(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ra(e){if(!e)return!1;const t=e.getRootNode();return Ro(t)===e}var dP=/(textarea|select)/;function fP(e){if(e==null||!Ft(e))return!1;try{return lP(e)&&e.selectionStart!=null||dP.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Oo(e,t){var r;if(!e||!t||!Ft(e)||!Ft(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 dr(e){var t;return tl(e)?e:sP(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function hP(e){return dr(e).documentElement}function Io(e){var t,n,r;return Fi(e)?Io(e.host):tl(e)?(t=e.defaultView)!=null?t:window:Ft(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Ro(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 pP(e){if(jE(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fi(e)&&e.host||hP(e);return Fi(t)?t.host:t}function Rf(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),tl(t)||Fi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Pf=new WeakMap;function Po(e){return Pf.has(e)||Pf.set(e,Io(e).getComputedStyle(e)),Pf.get(e)}var Lf=new Set(["menu","listbox","dialog","grid","tree","region"]),mP=e=>Lf.has(e),$E=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function VE(e,t){const n=new Set,r=Rf(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=$E(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"),T=p.getAttribute("aria-modal")==="true";if(E&&mP(E)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function qE(e,t){const n=Rf(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=$E(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"),T=p.getAttribute("aria-modal")==="true";E&&Lf.has(E)&&!T&&(t(p),o(p))}}}};o(e)}function gP(e){const t=new Set;return qE(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function EP(e){const t=e.getAttribute("role");return!!(t&&Lf.has(t))}function yP(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function bP(e){var t;return yP(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function TP(e){if(!e.id)return!1;const t=Rf(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&EP(e))}var Df=()=>typeof document!="undefined";function xP(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Mf=e=>Df()&&e.test(xP()),wP=e=>Df()&&e.test(navigator.vendor),YE=()=>Df()&&!!navigator.maxTouchPoints,_P=()=>Mf(/^iPhone/i),vP=()=>Mf(/^iPad/i)||Ff()&&navigator.maxTouchPoints>1,nl=()=>_P()||vP(),SP=()=>Ff()||nl(),Ff=()=>Mf(/^Mac/i),AP=()=>SP()&&wP(/apple/i);function CP(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=CP(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var WE=e=>e.button===0,kP=e=>e.button===2||Ff()&&e.ctrlKey&&e.button===0,NP=e=>"touches"in e&&e.touches.length>0,OP={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},GE={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function IP(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=OP[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in GE&&(o=GE[o]),o}function KE(e,t="client"){const n=NP(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Bt=(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)}},QE=e=>Ft(e)&&e.tagName==="IFRAME",RP=/^(audio|video|details)$/;function XE(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var PP=e=>!Number.isNaN(XE(e)),LP=e=>XE(e)<0;function DP(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 JE(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=DP(d,t);if(h){const p=Array.from(h.querySelectorAll(rl)).filter(n),E=u.get(d);if(E!==void 0){const T=E+1;r.splice(T,0,...p),p.forEach((y,x)=>{u.set(y,T+x)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,T+x)})}o.push(...p)}}return r}var rl="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",ZE=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(rl));(n==!0||n=="if-empty"&&o.length===0)&&Ft(e)&&fr(e)&&o.unshift(e);const u=[];for(const c of o)if(fr(c)){if(QE(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...ZE(d,{getShadowRoot:r}));continue}u.push(c)}return r?JE(u,r,fr):u};function fr(e){return!Ft(e)||e.closest("[inert]")?!1:e.matches(rl)&&cP(e)}function Lo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(rl));n&&Bi(e)&&o.unshift(e);const a=[];for(const u of o)if(Bi(u)){if(QE(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Lo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=JE(a,r,Bi);return!u.length&&n?o:u}return!a.length&&n?o:a}function Bi(e){return Ft(e)&&e.tabIndex>0?!0:fr(e)&&!LP(e)}function MP(e,t={}){const n=Lo(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function FP(e,t={}){const{current:n,getShadowRoot:r}=t,o=Lo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Ro(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function ia(e){return e.tabIndex<0&&(RP.test(e.localName)||fP(e))&&!PP(e)?0:e.tabIndex}function ey(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=Lo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var BP=class nw{constructor(){If(this,"id",null),If(this,"fn_cleanup"),If(this,"cleanup",()=>{this.cancel()})}static create(){return new nw}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 Ot(e){const t=BP.create();return t.request(e),t.cleanup}function ty(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 Bf(e){const t=pP(e);return aP(t)?dr(t).body:Ft(t)&&zP(t)?t:Bf(t)}var UP=/auto|scroll|overlay|hidden|clip/,HP=new Set(["inline","contents"]);function zP(e){const t=Io(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return UP.test(n+o+r)&&!HP.has(a)}var Do="default",Uf="",il=new WeakMap;function jP(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return nl()?(Do==="default"&&(Uf=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Do="disabled"):t&&(il.set(t,t.style.userSelect),t.style.userSelect="none"),()=>$P({target:t,doc:r})}function $P(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(nl()){if(Do!=="disabled")return;Do="restoring",setTimeout(()=>{ty(()=>{Do==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Uf||""),Uf="",Do="default")})},300)}else if(t&&il.has(t)){const a=il.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),il.delete(t)}}function VP(e={}){const u=e,{defer:t,target:n}=u,r=sn(u,["defer","target"]),o=t?Ot:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(jP(ae(F({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function qP(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=KE(c),h=Math.sqrt(nu(d.x,2)+nu(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=KE(c);r({point:d,event:c})},u=[Bt(e,"pointermove",o,!1),Bt(e,"pointerup",a,!1),Bt(e,"pointercancel",a,!1),Bt(e,"contextmenu",a,!1),VP({doc:e})];return()=>{u.forEach(c=>c())}}function YP(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,T]=MP(e,{includeContainer:!0,getShadowRoot:a}),y=FP(c,{current:n,getShadowRoot:a}),x=!E&&!T;h.shiftKey&&ra(y)?(o==null||o(),p=T):h.shiftKey&&(ra(E)||x)?p=n:!h.shiftKey&&ra(n)?(o==null||o(),p=E):!h.shiftKey&&(ra(T)||x)&&(p=y),p&&(h.preventDefault(),typeof r=="function"?r(p):p.focus())}return Bt(u,"keydown",d,!0)}function WP(e,t){const c=t,{defer:n,triggerElement:r}=c,o=sn(c,["defer","triggerElement"]),a=n?Ot:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(YP(d,F({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function GP(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function ol(e,t){if(!e)return HE;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 KP(e,t,n){if(!e)return HE;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 QP(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 XP(e,t){const{timeout:n,rootNode:r}=t,o=Io(r),a=dr(r),u=new o.AbortController;return QP(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 JP=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),ZP=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,ny=e=>{const t={};let n;for(;n=ZP.exec(e);)t[n[1]]=n[2];return t},e4=(e,t)=>{if(Zu(e)){if(Zu(t))return`${e};${t}`;e=ny(e)}else Zu(t)&&(t=ny(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function It(...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]=kf(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=JP(t[o],n[o]);continue}if(o==="style"){t[o]=e4(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 vF(e){return e}var Mo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Mo||{}),Hf="__init__";function t4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>dr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Ro(t()),a=u=>t().getElementById(u);return ae(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:ra,getById:a})}function n4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Fo=()=>e=>Array.from(new Set(e)),ry=typeof globalThis.document!="undefined"?J.useLayoutEffect:J.useEffect;function sl(e){var E,T;const t=(E=e().value)!=null?E:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=J.useState(t),[o,a]=J.useState(r),u=e().value!==void 0,c=J.useRef(o);c.current=u?e().value:o;const d=J.useRef(c.current);ry(()=>{d.current=c.current},[o,e().value]);const h=y=>{var A,C;const x=d.current,v=ko(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:x}),u||a(v),n(v,x)||(C=(A=e()).onChange)==null||C.call(A,v,x)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Os.flushSync:YR)(()=>h(y))},invoke(y,x){var v,A;(A=(v=e()).onChange)==null||A.call(v,y,x)},hash(y){var x,v,A;return(A=(v=(x=e()).hash)==null?void 0:v.call(x,y))!=null?A:String(y)}}}sl.cleanup=e=>{J.useEffect(()=>e,[])},sl.ref=e=>{const t=J.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function r4(e){const t=J.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var i4=(e,t)=>{const n=J.useRef(!1),r=J.useRef(!1);J.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),J.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function al(e,t={}){var ee,se,te,re,fe,ke;const n=J.useMemo(()=>{const{id:he,ids:Q,getRootNode:oe}=t;return t4({id:he,ids:Q,getRootNode:oe})},[t]),r=(...he)=>{e.debug&&console.log(...he)},o=(se=(ee=e.props)==null?void 0:ee.call(e,{props:Nf(t),scope:n}))!=null?se:t,a=o4(o),u=(te=e.context)==null?void 0:te.call(e,{prop:a,bindable:sl,scope:n,flush:oy,getContext(){return d},getComputed(){return W},getRefs(){return v},getEvent(){return y()}}),c=iy(u),d={get(he){var Q;return(Q=c.current)==null?void 0:Q[he].ref.current},set(he,Q){var oe;(oe=c.current)==null||oe[he].set(Q)},initial(he){var Q;return(Q=c.current)==null?void 0:Q[he].initial},hash(he){var oe,_;const Q=(oe=c.current)==null?void 0:oe[he].get();return(_=c.current)==null?void 0:_[he].hash(Q)}},h=J.useRef(new Map),p=J.useRef(null),E=J.useRef(null),T=J.useRef({type:""}),y=()=>ae(F({},T.current),{current(){return T.current},previous(){return E.current}}),x=()=>ae(F({},M),{matches(...he){return he.includes(M.ref.current)},hasTag(he){var Q,oe;return!!((oe=(Q=e.states[M.ref.current])==null?void 0:Q.tags)!=null&&oe.includes(he))}}),v=r4((fe=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?fe:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:z,action:C,guard:O,track:i4,refs:v,computed:W,flush:oy,scope:n,choose:H}),C=he=>{const Q=ko(he)?he(A()):he;if(!Q)return;const oe=Q.map(_=>{var X,N;const P=(N=(X=e.implementations)==null?void 0:X.actions)==null?void 0:N[_];return P||Of(`[zag-js] No implementation found for action "${JSON.stringify(_)}"`),P});for(const _ of oe)_==null||_(A())},O=he=>{var Q,oe;return ko(he)?he(A()):(oe=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:oe[he](A())},R=he=>{const Q=ko(he)?he(A()):he;if(!Q)return;const oe=Q.map(P=>{var N,xe;const X=(xe=(N=e.implementations)==null?void 0:N.effects)==null?void 0:xe[P];return X||Of(`[zag-js] No implementation found for effect "${JSON.stringify(P)}"`),X}),_=[];for(const P of oe){const X=P==null?void 0:P(A());X&&_.push(X)}return()=>_.forEach(P=>P==null?void 0:P())},H=he=>IR(he).find(Q=>{let oe=!Q.guard;return Zu(Q.guard)?oe=!!O(Q.guard):ko(Q.guard)&&(oe=Q.guard(A())),oe}),W=he=>{ZR(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[he];return Q({context:d,event:y(),prop:a,refs:v,scope:n,computed:W})},M=sl(()=>({defaultValue:e.initialState({prop:a}),onChange(he,Q){var _,P,X,N;if(Q){const xe=h.current.get(Q);xe==null||xe(),h.current.delete(Q)}Q&&C((_=e.states[Q])==null?void 0:_.exit),C((P=p.current)==null?void 0:P.actions);const oe=R((X=e.states[he])==null?void 0:X.effects);if(oe&&h.current.set(he,oe),Q===Hf){C(e.entry);const xe=R(e.effects);xe&&h.current.set(Hf,xe)}C((N=e.states[he])==null?void 0:N.entry)}})),K=J.useRef(void 0),ce=J.useRef(Mo.NotStarted);ry(()=>{queueMicrotask(()=>{var P;const oe=ce.current===Mo.Started;ce.current=Mo.Started,r(oe?"rehydrating...":"initializing...");const _=(P=K.current)!=null?P:M.initial;M.invoke(_,oe?M.get():Hf)});const he=h.current,Q=M.ref.current;return()=>{r("unmounting..."),K.current=Q,ce.current=Mo.Stopped,he.forEach(oe=>oe==null?void 0:oe()),h.current=new Map,p.current=null,queueMicrotask(()=>{C(e.exit)})}},[]);const be=()=>"ref"in M?M.ref.current:M.get(),z=he=>{queueMicrotask(()=>{var N,xe,Re,Oe,Be;if(ce.current!==Mo.Started)return;E.current=T.current,T.current=he;let Q=be();const oe=(Re=(N=e.states[Q].on)==null?void 0:N[he.type])!=null?Re:(xe=e.on)==null?void 0:xe[he.type],_=H(oe);if(!_)return;p.current=_;const P=(Oe=_.target)!=null?Oe:Q;r("transition",he.type,_.target||Q,`(${_.actions})`);const X=P!==Q;X?Os.flushSync(()=>M.set(P)):_.reenter&&!X?M.invoke(Q,Q):C((Be=_.actions)!=null?Be:[])})};return(ke=e.watch)==null||ke.call(e,A()),{state:x(),send:z,context:d,prop:a,scope:n,refs:v,computed:W,event:y(),getStatus:()=>ce.current}}function iy(e){const t=J.useRef(e);return t.current=e,t}function o4(e){const t=iy(e);return function(r){return t.current[r]}}function oy(e){queueMicrotask(()=>{Os.flushSync(()=>e())})}var zf=n4(e=>e);function ul(...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 s4(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 jf=e=>{const t=J.memo(J.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=sn(h,["asChild","children"]);if(!o)return J.createElement(e,ae(F({},u),{ref:r}),a);if(!J.isValidElement(a))return null;const c=J.Children.only(a),d=s4(c);return J.cloneElement(c,ae(F({},It(u,c.props)),{ref:r?ul(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Qt=(()=>{const e=new Map;return new Proxy(jf,{apply(t,n,r){return jf(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,jf(r)),e.get(r)}})})();function a4(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=J.createContext(u);c.displayName=t;function d(){var p;const h=J.useContext(c);if(!h&&n){const E=new Error(a!=null?a:a4(r,o));throw E.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,E,d),E}return h}return[c.Provider,d,c]}const[u4,$f]=Ui({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[sy,oa]=Ui({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),ay=J.forwardRef((e,t)=>{const n=$f(),r=oa(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(Qt.div,ae(F({},o),{ref:ul(r.ref,t)}))});ay.displayName="PopoverContent";const uy=J.forwardRef((e,t)=>{const n=$f(),r=oa(),o=It(n.getPositionerProps(),e);return r.unmounted?null:S.jsx(Qt.div,ae(F({},o),{ref:t}))});uy.displayName="PopoverPositioner";const sa=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},F({},e)]),ly=e=>sa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function l4(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 c4={props({props:e}){return ae(F({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Po(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"});Ot(()=>{var c,d;const u=ll(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})=>{Ot(()=>{e.set("prevAnimationName",ll(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,T;((T=(E=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:E[0])!=null?T:d.target)===o&&e.set("prevAnimationName",ll(t.get("styles")))},u=d=>{const h=ll(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=ol(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),ty(()=>c())}}}}};function ll(e){return(e==null?void 0:e.animationName)||"none"}Fo()(["onExitComplete","present","immediate"]);function d4(e,t={}){const{sync:n=!1}=t,r=f4(e);return J.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 f4(e){const t=J.useRef(e);return t.current=e,t}const Vf=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=sn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=J.useRef(!1),c=ae(F({},a),{present:r,onExitComplete:d4(e.onExitComplete)}),d=al(c4,c),h=l4(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(h4(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="${Bo(e)}"][data-part="${Bo(r)}"]`,`& [data-scope="${Bo(e)}"][data-part="${Bo(r)}"]`].join(", "),attrs:{"data-scope":Bo(e),"data-part":Bo(r)}}}),{})}),Bo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),h4=e=>e.length===0;const p4=["top","right","bottom","left"],Xr=Math.min,_n=Math.max,cl=Math.round,dl=Math.floor,hr=e=>({x:e,y:e}),m4={left:"right",right:"left",bottom:"top",top:"bottom"},g4={start:"end",end:"start"};function qf(e,t,n){return _n(e,Xr(t,n))}function kr(e,t){return typeof e=="function"?e(t):e}function Nr(e){return e.split("-")[0]}function Uo(e){return e.split("-")[1]}function Yf(e){return e==="x"?"y":"x"}function Wf(e){return e==="y"?"height":"width"}const E4=new Set(["top","bottom"]);function pr(e){return E4.has(Nr(e))?"y":"x"}function Gf(e){return Yf(pr(e))}function y4(e,t,n){n===void 0&&(n=!1);const r=Uo(e),o=Gf(e),a=Wf(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=fl(u)),[u,fl(u)]}function b4(e){const t=fl(e);return[Kf(e),t,Kf(t)]}function Kf(e){return e.replace(/start|end/g,t=>g4[t])}const cy=["left","right"],dy=["right","left"],T4=["top","bottom"],x4=["bottom","top"];function w4(e,t,n){switch(e){case"top":case"bottom":return n?t?dy:cy:t?cy:dy;case"left":case"right":return t?T4:x4;default:return[]}}function _4(e,t,n,r){const o=Uo(e);let a=w4(Nr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Kf)))),a}function fl(e){return e.replace(/left|right|bottom|top/g,t=>m4[t])}function v4(e){return F({top:0,right:0,bottom:0,left:0},e)}function fy(e){return typeof e!="number"?v4(e):{top:e,right:e,bottom:e,left:e}}function hl(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 hy(e,t,n){let{reference:r,floating:o}=e;const a=pr(t),u=Gf(t),c=Wf(u),d=Nr(t),h=a==="y",p=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:E};break;case"left":y={x:r.x-o.width,y:E};break;default:y={x:r.x,y:r.y}}switch(Uo(t)){case"start":y[u]-=T*(n&&h?-1:1);break;case"end":y[u]+=T*(n&&h?-1:1);break}return y}const S4=(e,t,n)=>Ve(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}=hy(h,r,d),T=r,y={},x=0;for(let v=0;v<c.length;v++){const{name:A,fn:C}=c[v],{x:O,y:R,data:H,reset:W}=yield C({x:p,y:E,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});p=O!=null?O:p,E=R!=null?R:E,y=ae(F({},y),{[A]:F(F({},y[A]),H)}),W&&x<=50&&(x++,typeof W=="object"&&(W.placement&&(T=W.placement),W.rects&&(h=W.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):W.rects),{x:p,y:E}=hy(h,T,d)),v=-1)}return{x:p,y:E,placement:T,strategy:o,middlewareData:y}});function aa(e,t){return Ve(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:T=!1,padding:y=0}=kr(t,e),x=fy(y),A=c[T?E==="floating"?"reference":"floating":E],C=hl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.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,R=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),H=(yield a.isElement==null?void 0:a.isElement(R))?(yield a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},W=hl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:O,offsetParent:R,strategy:d}):O);return{top:(C.top-W.top+x.top)/H.y,bottom:(W.bottom-C.bottom+x.bottom)/H.y,left:(C.left-W.left+x.left)/H.x,right:(W.right-C.right+x.right)/H.x}})}const A4=e=>({name:"arrow",options:e,fn(n){return Ve(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:p,padding:E=0}=kr(e,n)||{};if(p==null)return{};const T=fy(E),y={x:r,y:o},x=Gf(a),v=Wf(x),A=yield c.getDimensions(p),C=x==="y",O=C?"top":"left",R=C?"bottom":"right",H=C?"clientHeight":"clientWidth",W=u.reference[v]+u.reference[x]-y[x]-u.floating[v],M=y[x]-u.reference[x],K=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ce=K?K[H]:0;(!ce||!(yield c.isElement==null?void 0:c.isElement(K)))&&(ce=d.floating[H]||u.floating[v]);const be=W/2-M/2,z=ce/2-A[v]/2-1,ee=Xr(T[O],z),se=Xr(T[R],z),te=ee,re=ce-A[v]-se,fe=ce/2-A[v]/2+be,ke=qf(te,fe,re),he=!h.arrow&&Uo(a)!=null&&fe!==ke&&u.reference[v]/2-(fe<te?ee:se)-A[v]/2<0,Q=he?fe<te?fe-te:fe-re:0;return{[x]:y[x]+Q,data:F({[x]:ke,centerOffset:fe-ke-Q},he&&{alignmentOffset:Q}),reset:he}})}}),C4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ve(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:p}=n,fe=kr(e,n),{mainAxis:E=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:A=!0}=fe,C=sn(fe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const O=Nr(a),R=pr(d),H=Nr(d)===d,W=yield h.isRTL==null?void 0:h.isRTL(p.floating),M=y||(H||!A?[fl(d)]:b4(d)),K=v!=="none";!y&&K&&M.push(..._4(d,A,v,W));const ce=[d,...M],be=yield aa(n,C),z=[];let ee=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&z.push(be[O]),T){const ke=y4(a,c,W);z.push(be[ke[0]],be[ke[1]])}if(ee=[...ee,{placement:a,overflows:z}],!z.every(ke=>ke<=0)){var se,te;const ke=(((se=u.flip)==null?void 0:se.index)||0)+1,he=ce[ke];if(he&&(!(T==="alignment"?R!==pr(he):!1)||ee.every(_=>pr(_.placement)===R?_.overflows[0]>0:!0)))return{data:{index:ke,overflows:ee},reset:{placement:he}};let Q=(te=ee.filter(oe=>oe.overflows[0]<=0).sort((oe,_)=>oe.overflows[1]-_.overflows[1])[0])==null?void 0:te.placement;if(!Q)switch(x){case"bestFit":{var re;const oe=(re=ee.filter(_=>{if(K){const P=pr(_.placement);return P===R||P==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(P=>P>0).reduce((P,X)=>P+X,0)]).sort((_,P)=>_[1]-P[1])[0])==null?void 0:re[0];oe&&(Q=oe);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function py(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function my(e){return p4.some(t=>e[t]>=0)}const k4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ve(this,null,function*(){const{rects:r}=n,u=kr(e,n),{strategy:o="referenceHidden"}=u,a=sn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield aa(n,ae(F({},a),{elementContext:"reference"})),d=py(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:my(d)}}}case"escaped":{const c=yield aa(n,ae(F({},a),{altBoundary:!0})),d=py(c,r.floating);return{data:{escapedOffsets:d,escaped:my(d)}}}default:return{}}})}}},gy=new Set(["left","top"]);function N4(e,t){return Ve(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Nr(n),c=Uo(n),d=pr(n)==="y",h=gy.has(u)?-1:1,p=a&&d?-1:1,E=kr(t,e);let{mainAxis:T,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:T*h}:{x:T*h,y:y*p}})}const O4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ve(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield N4(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:ae(F({},h),{placement:c})}})}}},I4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ve(this,null,function*(){const{x:r,y:o,placement:a}=n,C=kr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:O=>{let{x:R,y:H}=O;return{x:R,y:H}}}}=C,h=sn(C,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},E=yield aa(n,h),T=pr(Nr(a)),y=Yf(T);let x=p[y],v=p[T];if(u){const O=y==="y"?"top":"left",R=y==="y"?"bottom":"right",H=x+E[O],W=x-E[R];x=qf(H,x,W)}if(c){const O=T==="y"?"top":"left",R=T==="y"?"bottom":"right",H=v+E[O],W=v-E[R];v=qf(H,v,W)}const A=d.fn(ae(F({},n),{[y]:x,[T]:v}));return ae(F({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[y]:u,[T]:c}}})})}}},R4=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}=kr(e,t),p={x:n,y:r},E=pr(o),T=Yf(E);let y=p[T],x=p[E];const v=kr(c,t),A=typeof v=="number"?{mainAxis:v,crossAxis:0}:F({mainAxis:0,crossAxis:0},v);if(d){const R=T==="y"?"height":"width",H=a.reference[T]-a.floating[R]+A.mainAxis,W=a.reference[T]+a.reference[R]-A.mainAxis;y<H?y=H:y>W&&(y=W)}if(h){var C,O;const R=T==="y"?"width":"height",H=gy.has(Nr(o)),W=a.reference[E]-a.floating[R]+(H&&((C=u.offset)==null?void 0:C[E])||0)+(H?0:A.crossAxis),M=a.reference[E]+a.reference[R]+(H?0:((O=u.offset)==null?void 0:O[E])||0)-(H?A.crossAxis:0);x<W?x=W:x>M&&(x=M)}return{[T]:y,[E]:x}}}},P4=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ve(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,ee=kr(e,n),{apply:h=()=>{}}=ee,p=sn(ee,["apply"]),E=yield aa(n,p),T=Nr(a),y=Uo(a),x=pr(a)==="y",{width:v,height:A}=u.floating;let C,O;T==="top"||T==="bottom"?(C=T,O=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(O=T,C=y==="end"?"top":"bottom");const R=A-E.top-E.bottom,H=v-E.left-E.right,W=Xr(A-E[C],R),M=Xr(v-E[O],H),K=!n.middlewareData.shift;let ce=W,be=M;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(be=H),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ce=R),K&&!y){const se=_n(E.left,0),te=_n(E.right,0),re=_n(E.top,0),fe=_n(E.bottom,0);x?be=v-2*(se!==0||te!==0?se+te:_n(E.left,E.right)):ce=A-2*(re!==0||fe!==0?re+fe:_n(E.top,E.bottom))}yield h(ae(F({},n),{availableWidth:be,availableHeight:ce}));const z=yield c.getDimensions(d.floating);return v!==z.width||A!==z.height?{reset:{rects:!0}}:{}})}}};function pl(){return typeof window!="undefined"}function Ho(e){return Ey(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mr(e){var t;return(t=(Ey(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ey(e){return pl()?e instanceof Node||e instanceof vn(e).Node:!1}function Kn(e){return pl()?e instanceof Element||e instanceof vn(e).Element:!1}function gr(e){return pl()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function yy(e){return!pl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}const L4=new Set(["inline","contents"]);function ua(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!L4.has(o)}const D4=new Set(["table","td","th"]);function M4(e){return D4.has(Ho(e))}const F4=[":popover-open",":modal"];function ml(e){return F4.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const B4=["transform","translate","scale","rotate","perspective"],U4=["transform","translate","scale","rotate","perspective","filter"],H4=["paint","layout","strict","content"];function Qf(e){const t=Xf(),n=Kn(e)?Qn(e):e;return B4.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)||U4.some(r=>(n.willChange||"").includes(r))||H4.some(r=>(n.contain||"").includes(r))}function z4(e){let t=Jr(e);for(;gr(t)&&!zo(t);){if(Qf(t))return t;if(ml(t))return null;t=Jr(t)}return null}function Xf(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const j4=new Set(["html","body","#document"]);function zo(e){return j4.has(Ho(e))}function Qn(e){return vn(e).getComputedStyle(e)}function gl(e){return Kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jr(e){if(Ho(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yy(e)&&e.host||mr(e);return yy(t)?t.host:t}function by(e){const t=Jr(e);return zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:gr(t)&&ua(t)?t:by(t)}function la(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=by(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=vn(o);if(a){const c=Jf(u);return t.concat(u,u.visualViewport||[],ua(o)?o:[],c&&n?la(c):[])}return t.concat(o,la(o,[],n))}function Jf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ty(e){const t=Qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=gr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=cl(n)!==a||cl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Zf(e){return Kn(e)?e:e.contextElement}function jo(e){const t=Zf(e);if(!gr(t))return hr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ty(t);let u=(a?cl(n.width):n.width)/r,c=(a?cl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const $4=hr(0);function xy(e){const t=vn(e);return!Xf()||!t.visualViewport?$4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function V4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function zi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Zf(e);let u=hr(1);t&&(r?Kn(r)&&(u=jo(r)):u=jo(e));const c=V4(a,n,r)?xy(a):hr(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 T=vn(a),y=r&&Kn(r)?vn(r):r;let x=T,v=Jf(x);for(;v&&r&&y!==x;){const A=jo(v),C=v.getBoundingClientRect(),O=Qn(v),R=C.left+(v.clientLeft+parseFloat(O.paddingLeft))*A.x,H=C.top+(v.clientTop+parseFloat(O.paddingTop))*A.y;d*=A.x,h*=A.y,p*=A.x,E*=A.y,d+=R,h+=H,x=vn(v),v=Jf(x)}}return hl({width:p,height:E,x:d,y:h})}function El(e,t){const n=gl(e).scrollLeft;return t?t.left+n:zi(mr(e)).left+n}function wy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-El(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function q4(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=mr(r),c=t?ml(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=hr(1);const p=hr(0),E=gr(r);if((E||!E&&!a)&&((Ho(r)!=="body"||ua(u))&&(d=gl(r)),gr(r))){const y=zi(r);h=jo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!E&&!a?wy(u,d):hr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+T.x,y:n.y*h.y-d.scrollTop*h.y+p.y+T.y}}function Y4(e){return Array.from(e.getClientRects())}function W4(e){const t=mr(e),n=gl(e),r=e.ownerDocument.body,o=_n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+El(e);const c=-n.scrollTop;return Qn(r).direction==="rtl"&&(u+=_n(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const _y=25;function G4(e,t){const n=vn(e),r=mr(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=Xf();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const h=El(r);if(h<=0){const p=r.ownerDocument,E=p.body,T=getComputedStyle(E),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,x=Math.abs(r.clientWidth-E.clientWidth-y);x<=_y&&(a-=x)}else h<=_y&&(a+=h);return{width:a,height:u,x:c,y:d}}const K4=new Set(["absolute","fixed"]);function Q4(e,t){const n=zi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=gr(e)?jo(e):hr(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 vy(e,t,n){let r;if(t==="viewport")r=G4(e,n);else if(t==="document")r=W4(mr(e));else if(Kn(t))r=Q4(t,n);else{const o=xy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return hl(r)}function Sy(e,t){const n=Jr(e);return n===t||!Kn(n)||zo(n)?!1:Qn(n).position==="fixed"||Sy(n,t)}function X4(e,t){const n=t.get(e);if(n)return n;let r=la(e,[],!1).filter(c=>Kn(c)&&Ho(c)!=="body"),o=null;const a=Qn(e).position==="fixed";let u=a?Jr(e):e;for(;Kn(u)&&!zo(u);){const c=Qn(u),d=Qf(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&K4.has(o.position)||ua(u)&&!d&&Sy(e,u))?r=r.filter(p=>p!==u):o=c,u=Jr(u)}return t.set(e,r),r}function J4(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?ml(t)?[]:X4(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,p)=>{const E=vy(t,p,o);return h.top=_n(E.top,h.top),h.right=Xr(E.right,h.right),h.bottom=Xr(E.bottom,h.bottom),h.left=_n(E.left,h.left),h},vy(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Z4(e){const{width:t,height:n}=Ty(e);return{width:t,height:n}}function e6(e,t,n){const r=gr(t),o=mr(t),a=n==="fixed",u=zi(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=hr(0);function h(){d.x=El(o)}if(r||!r&&!a)if((Ho(t)!=="body"||ua(o))&&(c=gl(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?wy(o,c):hr(0),E=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:E,y:T,width:u.width,height:u.height}}function eh(e){return Qn(e).position==="static"}function Ay(e,t){if(!gr(e)||Qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return mr(e)===n&&(n=n.ownerDocument.body),n}function Cy(e,t){const n=vn(e);if(ml(e))return n;if(!gr(e)){let o=Jr(e);for(;o&&!zo(o);){if(Kn(o)&&!eh(o))return o;o=Jr(o)}return n}let r=Ay(e,t);for(;r&&M4(r)&&eh(r);)r=Ay(r,t);return r&&zo(r)&&eh(r)&&!Qf(r)?n:r||z4(e)||n}const t6=function(e){return Ve(this,null,function*(){const t=this.getOffsetParent||Cy,n=this.getDimensions,r=yield n(e.floating);return{reference:e6(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function n6(e){return Qn(e).direction==="rtl"}const r6={convertOffsetParentRelativeRectToViewportRelativeRect:q4,getDocumentElement:mr,getClippingRect:J4,getOffsetParent:Cy,getElementRects:t6,getClientRects:Y4,getDimensions:Z4,getScale:jo,isElement:Kn,isRTL:n6};function ky(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function i6(e,t){let n=null,r;const o=mr(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:T,height:y}=h;if(c||t(),!T||!y)return;const x=dl(E),v=dl(o.clientWidth-(p+T)),A=dl(o.clientHeight-(E+y)),C=dl(p),R={rootMargin:-x+"px "+-v+"px "+-A+"px "+-C+"px",threshold:_n(0,Xr(1,d))||1};let H=!0;function W(M){const K=M[0].intersectionRatio;if(K!==d){if(!H)return u();K?u(!1,K):r=setTimeout(()=>{u(!1,1e-7)},1e3)}K===1&&!ky(h,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(W,ae(F({},R),{root:o.ownerDocument}))}catch(M){n=new IntersectionObserver(W,R)}n.observe(e)}return u(!0),a}function o6(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=Zf(e),p=o||a?[...h?la(h):[],...la(t)]:[];p.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),a&&C.addEventListener("resize",n)});const E=h&&c?i6(h,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(C=>{let[O]=C;O&&O.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var R;(R=y)==null||R.observe(t)})),n()}),h&&!d&&y.observe(h),y.observe(t));let x,v=d?zi(e):null;d&&A();function A(){const C=zi(e);v&&!ky(v,C)&&n(),v=C,x=requestAnimationFrame(A)}return n(),()=>{var C;p.forEach(O=>{o&&O.removeEventListener("scroll",n),a&&O.removeEventListener("resize",n)}),E==null||E(),(C=y)==null||C.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const s6=O4,a6=I4,u6=C4,l6=P4,c6=k4,d6=A4,f6=R4,h6=(e,t,n)=>{const r=new Map,o=F({platform:r6},n),a=ae(F({},o.platform),{_c:r});return S4(e,t,ae(F({},o),{platform:a}))};function Ny(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 ae(F({},o),{toJSON:()=>o})}function p6(e){if(!e)return Ny();const{x:t,y:n,width:r,height:o}=e;return Ny(t,n,r,o)}function m6(e,t){return{contextElement:Ft(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?p6(r):n.getBoundingClientRect()}}}var ca=e=>({variable:e,reference:`var(${e})`}),Or={arrowSize:ca("--arrow-size"),arrowSizeHalf:ca("--arrow-size-half"),arrowBg:ca("--arrow-background"),transformOrigin:ca("--transform-origin"),arrowOffset:ca("--arrow-offset")},g6=e=>e==="top"||e==="bottom"?"y":"x";function E6(e,t){return{name:"transformOrigin",fn(n){var be,z,ee,se,te;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=g6(d),p=((be=o.arrow)==null?void 0:be.x)||0,E=((z=o.arrow)==null?void 0:z.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+T/2,v=E+y/2,A=Math.abs(((ee=o.shift)==null?void 0:ee.y)||0),C=u.reference.height/2,O=y/2,R=(te=(se=e.offset)==null?void 0:se.mainAxis)!=null?te:e.gutter,H=typeof R=="number"?R+O:R!=null?R:O,W=A>H,M={top:`${x}px calc(100% + ${H}px)`,bottom:`${x}px ${-H}px`,left:`calc(100% + ${H}px) ${v}px`,right:`${-H}px ${v}px`}[d],K=`${x}px ${u.reference.y+C-c}px`,ce=!!e.overlap&&h==="y"&&W;return r.floating.style.setProperty(Or.transformOrigin.variable,ce?K:M),{data:{transformOrigin:ce?K:M}}}}}var y6={name:"rects",fn({rects:e}){return{data:e}}},b6=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% + ${Or.arrowOffset.reference})`}),{}}}};function T6(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var x6={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Oy(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function th(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function w6(e,t,n){const r=e||t.createElement("div");return d6({element:r,padding:n.arrowPadding})}function _6(e,t){var n;if(!BR((n=t.offset)!=null?n:t.gutter))return s6(({placement:r})=>{var p,E,T,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}=T6(r),d=c?void 0:t.shift,h=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Nf({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function v6(e){if(!e.flip)return;const t=th(e.boundary);return u6(ae(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function S6(e){if(!e.slide&&!e.overlap)return;const t=th(e.boundary);return a6(ae(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:f6()}))}function A6(e){return l6({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 C6(e){var t;if(e.hideWhenDetached)return c6({strategy:"referenceHidden",boundary:(t=th(e.boundary))!=null?t:"clippingAncestors"})}function k6(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function N6(e,t,n={}){const r=m6(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},x6,n),a=t.querySelector("[data-part=arrow]"),u=[_6(a,o),v6(o),S6(o),w6(a,t.ownerDocument,o),b6(a),E6({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),A6(o),C6(o),y6],{placement:c,strategy:d,onComplete:h,onPositioned:p}=o,E=()=>Ve(null,null,function*(){var H;if(!r||!t)return;const v=yield h6(r,t,{placement:c,middleware:u,strategy:d});h==null||h(v),p==null||p({placed:!0});const A=Io(t),C=Oy(A,v.x),O=Oy(A,v.y);t.style.setProperty("--x",`${C}px`),t.style.setProperty("--y",`${O}px`),o.hideWhenDetached&&(((H=v.middlewareData.hide)==null?void 0:H.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const R=t.firstElementChild;if(R){const W=Po(R);t.style.setProperty("--z-index",W.zIndex)}}),T=()=>Ve(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),p==null||p({placed:!0})):yield E()}),y=k6(o.listeners),x=o.listeners?o6(r,t,T,y):WR;return T(),()=>{x==null||x(),p==null||p({placed:!1})}}function Iy(e,t,n={}){const c=n,{defer:r}=c,o=sn(c,["defer"]),a=r?Ot:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(N6(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var O6={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function I6(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Or.arrowSize.reference,height:Or.arrowSize.reference,[Or.arrowSizeHalf.variable]:`calc(${Or.arrowSize.reference} / 2)`,[Or.arrowOffset.variable]:`calc(${Or.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?O6[t.split("-")[0]]:void 0,background:Or.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 $o=new WeakMap,yl=new WeakMap,bl={},nh=0,Ry=e=>e&&(e.host||Ry(e.parentNode)),R6=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ry(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),P6=new Set(["script","output","status","next-route-announcer"]),L6=e=>P6.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),D6=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=R6(n,Array.isArray(e)?e:[e]);bl[r]||(bl[r]=new WeakMap);const c=bl[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&&Ft(y)&&qE(y,x=>{E(x)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(h.has(x))T(x);else try{if(L6(x))return;const A=x.getAttribute(o)==="true",C=($o.get(x)||0)+1,O=(c.get(x)||0)+1;$o.set(x,C),c.set(x,O),d.push(x),C===1&&A&&yl.set(x,!0),O===1&&x.setAttribute(r,""),A||x.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",x,v)}})};return T(n),h.clear(),nh++,()=>{d.forEach(y=>{const x=$o.get(y)-1,v=c.get(y)-1;$o.set(y,x),c.set(y,v),x||(yl.has(y)||y.removeAttribute(o),yl.delete(y)),v||y.removeAttribute(r)}),nh--,nh||($o=new WeakMap,$o=new WeakMap,yl=new WeakMap,bl={})}},M6=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,F6=(e,t=M6(e),n="data-aria-hidden",r=!0)=>{if(t)return D6(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},B6=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Py(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(F6(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function U6(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 H6(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 Ly="pointerdown.outside",Dy="focus.outside";function z6(e){for(const t of e)if(Ft(t)&&fr(t))return!0;return!1}var My=e=>"clientY"in e;function j6(e,t){if(!My(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 $6(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Fy(e,t){if(!t||!My(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 $6(u,c)?r||a:!1}function V6(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=dr(e),h=Io(e),p=U6(h),E=H6(h);function T(R,H){if(!Ft(H)||!H.isConnected||Oo(e,H)||j6(e,R)||c&&VE(e,H))return!1;const W=d.querySelector(`[aria-controls="${e.id}"]`);if(W){const K=Bf(W);if(Fy(R,K))return!1}const M=Bf(e);return Fy(R,M)?!1:!(n!=null&&n(H))}const y=new Set,x=Fi(e==null?void 0:e.getRootNode());function v(R){function H(W){var be,z;const M=u&&!YE()?Ot:ee=>ee(),K=W!=null?W:R,ce=(z=(be=K==null?void 0:K.composedPath)==null?void 0:be.call(K))!=null?z:[K==null?void 0:K.target];M(()=>{const ee=x?ce[0]:Gn(R);if(!(!e||!T(R,ee))){if(o||a){const se=kf(o,a);e.addEventListener(Ly,se,{once:!0})}By(e,Ly,{bubbles:!1,cancelable:!0,detail:{originalEvent:K,contextmenu:kP(K),focusable:z6(ce),target:ee}})}})}R.pointerType==="touch"?(y.forEach(W=>W()),y.add(Bt(d,"click",H,{once:!0})),y.add(E.addEventListener("click",H,{once:!0})),y.add(p.addEventListener("click",H,{once:!0}))):H()}const A=new Set,C=setTimeout(()=>{A.add(Bt(d,"pointerdown",v,!0)),A.add(E.addEventListener("pointerdown",v,!0)),A.add(p.addEventListener("pointerdown",v,!0))},0);function O(R){(u?Ot:W=>W())(()=>{var K,ce;const W=(ce=(K=R==null?void 0:R.composedPath)==null?void 0:K.call(R))!=null?ce:[R==null?void 0:R.target],M=x?W[0]:Gn(R);if(!(!e||!T(R,M))){if(r||a){const be=kf(r,a);e.addEventListener(Dy,be,{once:!0})}By(e,Dy,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:fr(M),target:M}})}})}return YE()||(A.add(Bt(d,"focusin",O,!0)),A.add(E.addEventListener("focusin",O,!0)),A.add(p.addEventListener("focusin",O,!0))),()=>{clearTimeout(C),y.forEach(R=>R()),A.forEach(R=>R())}}function q6(e,t){const{defer:n}=t,r=n?Ot:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(V6(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function By(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function Y6(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Bt(dr(e),"keydown",n,{capture:!0})}var Uy="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=>Oo(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Oo(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];G6(e,Uy,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),W6(e,Uy,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function W6(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 G6(e,t,n){e.addEventListener(t,n,{once:!0})}var Hy;function zy(){Dn.layers.forEach(({node:e})=>{e.style.pointerEvents=Dn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function K6(e){e.style.pointerEvents=""}function Q6(e,t){const n=dr(e),r=[];return Dn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Hy=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=XP(()=>{const c=o();return Ft(c)?c:null},{timeout:1e3});a.then(c=>r.push(ol(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Dn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Hy,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function X6(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Of("[@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),zy();function p(v){var C,O;const A=Gn(v.detail.originalEvent);Dn.isBelowPointerBlockingLayer(e)||Dn.isInBranch(A)||((C=t.onPointerDownOutside)==null||C.call(t,v),(O=t.onInteractOutside)==null||O.call(t,v),!v.defaultPrevented&&(c&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function E(v){var C,O;const A=Gn(v.detail.originalEvent);Dn.isInBranch(A)||((C=t.onFocusOutside)==null||C.call(t,v),(O=t.onInteractOutside)==null||O.call(t,v),!v.defaultPrevented&&(c&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function T(v){var A;Dn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var R;if(!e)return!1;const A=typeof u=="function"?u():u,C=Array.isArray(A)?A:[A],O=(R=t.persistentElements)==null?void 0:R.map(H=>H()).filter(Ft);return O&&C.push(...O),C.some(H=>Oo(H,v))||Dn.isInNestedLayer(e,v)}const x=[a?Q6(e,t.persistentElements):void 0,Y6(e,T),q6(e,{exclude:y,onFocusOutside:E,onPointerDownOutside:p,defer:t.defer})];return()=>{Dn.remove(e),zy(),K6(e),x.forEach(v=>v==null?void 0:v())}}function jy(e,t){const{defer:n}=t,r=n?Ot:a=>a(),o=[];return o.push(r(()=>{const a=ko(e)?e():e;o.push(X6(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var J6=Object.defineProperty,Z6=(e,t,n)=>t in e?J6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ht=(e,t,n)=>Z6(e,typeof t!="symbol"?t+"":t,n),$y={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()}},eL=[],tL=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||tl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(ia(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=>ia(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(fa(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}fa(this.config.allowOutsideClick,r)||r.preventDefault()}}),ht(this,"handleClick",r=>{const o=Gn(r);this.findContainerIndex(o,r)>=0||fa(this.config.clickOutsideDeactivates,r)||fa(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;da(r)&&r.preventDefault(),this.tryFocus(a)}}),ht(this,"handleEscapeKey",r=>{nL(r)&&fa(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 bP(h)?!0:h.id&&!this.state.containers.some(p=>p.contains(h))?TP(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&&!fr(r)){const o=Ro(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!==Ro(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,rL(r)&&r.select()}}),ht(this,"deactivate",r=>{if(!this.state.active)return this;const o=F({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),$y.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=()=>{Vy(()=>{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||fr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(p=d),p>=0){const E=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[E];c=ia(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else da(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||fr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(p=d),p>=0){const E=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[E];c=ia(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else da(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||eL;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return da(r)&&!r.shiftKey},isKeyBackward(r){return da(r)&&r.shiftKey}},t);this.doc=n.document||dr(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=>{gP(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?VE(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Lo(e,{getShadowRoot:this.config.getShadowRoot}),n=ZE(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(ia(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 T=n.indexOf(h);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(Bi(n[y]))return n[y]}else for(let y=T-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 $y.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Vy(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Bt(this.doc,"focusin",this.handleFocus,!0),Bt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Bt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Bt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Bt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Bt(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=Ro(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)}},da=e=>e.key==="Tab",fa=(e,...t)=>typeof e=="function"?e(...t):e,nL=e=>!e.isComposing&&e.key==="Escape",Vy=e=>setTimeout(e,0),rL=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function qy(e,t={}){let n;const r=Ot(()=>{const o=typeof e=="function"?e():e;if(o){n=new tL(o,ae(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:dr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var rh="data-scroll-lock";function iL(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Yy(e){const t=Po(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Wy(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(rh))return;const u=Yy(r)||Yy(o),c=n.innerWidth-r.clientWidth;o.setAttribute(rh,"");const d=()=>KP(r,"--scrollbar-width",`${c}px`),h=iL(r),p=()=>{const x={overflow:"hidden"};return!u&&c>0&&(x[h]=`${c}px`),ol(o,x)},E=()=>{var W,M;const{scrollX:x,scrollY:v,visualViewport:A}=n,C=(W=A==null?void 0:A.offsetLeft)!=null?W:0,O=(M=A==null?void 0:A.offsetTop)!=null?M:0,R={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(O))}px`,left:`${-(x-Math.floor(C))}px`,right:"0"};!u&&c>0&&(R[h]=`${c}px`);const H=ol(o,R);return()=>{H==null||H(),n.scrollTo({left:x,top:v,behavior:"instant"})}},T=[d(),nl()?E():p()];return()=>{T.forEach(x=>x==null?void 0:x()),o.removeAttribute(rh)}}var oL=Hi("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Er=oL.build(),Gy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Ky=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},ih=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Qy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},sL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},oh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},sh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},aL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Xy=e=>e.getById(Gy(e)),Vo=e=>e.getById(Ky(e)),qo=e=>e.getById(ih(e)),Jy=e=>e.getById(Qy(e)),uL=e=>e.getById(oh(e)),lL=e=>e.getById(sh(e));function cL(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"),T=I6(ae(F({},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(ae(F({id:sL(c)},Er.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(ae(F({},Er.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(ae(F({},Er.anchor.attrs),{dir:u("dir"),id:Gy(c)}))},getTriggerProps(){return t.button(ae(F({},Er.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:Ky(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ih(c),onPointerDown(y){WE(y)&&AP()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(ae(F({},Er.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ae(F({id:Qy(c)},Er.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(ae(F({},Er.content.attrs),{dir:u("dir"),id:ih(c),tabIndex:-1,role:"dialog","aria-modal":zE(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":No(d),"aria-labelledby":E.title?oh(c):void 0,"aria-describedby":E.description?sh(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(ae(F({},Er.title.attrs),{id:oh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ae(F({},Er.description.attrs),{id:sh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ae(F({},Er.closeTrigger.attrs),{dir:u("dir"),id:aL(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var dL={props({props:e}){return ae(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=Xy(n))!=null?a:Vo(n);return Iy(r,()=>Jy(n),ae(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>qo(n);let o=!0;return jy(r,{type:"popover",pointerBlocking:t("modal"),exclude:Vo(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:WP(()=>qo(t),{triggerElement:Vo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Py(()=>[qo(t),Vo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Wy(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?qy(()=>qo(t),{initialFocus:()=>ey({root:qo(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=Xy(n))!=null?u:Vo(n);Iy(o,()=>Jy(n),ae(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Ot(()=>{Object.assign(e.get("renderedElements"),{title:!!uL(t),description:!!lL(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Ot(()=>{const n=ey({root:qo(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||Ot(()=>{const a=Vo(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})}}}};Fo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[AF,Tl]=Ui({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[CF,ah]=Ui({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),fL=e=>{const t=J.useId(),{getRootNode:n}=Tl(),{dir:r}=ah(),o=F({id:t,dir:r,getRootNode:n},e),a=al(dL,o);return cL(a,zf)},hL=e=>{const[t,u]=ly(e),c=u,{children:n}=c,r=sn(c,["children"]),o=fL(r),a=Vf(It({present:o.open},t));return S.jsx(u4,{value:o,children:S.jsx(sy,{value:a,children:n})})},Zy=J.forwardRef((e,t)=>{const n=$f(),r=oa(),o=It(ae(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return S.jsx(Qt.button,ae(F({},o),{ref:t}))});Zy.displayName="PopoverTrigger";function pL(e){return mt({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 mL(e){return mt({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 eb(e){return mt({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 tb(e){return mt({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 nb(e){return mt({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 gL=({className:e,componentType:t,children:n})=>{const[r,o]=J.useState(!1),{globalClassName:a}=Nt(),u=h=>{o(h.open)},c=J.useCallback(()=>{o(!1)},[]),d=J.useMemo(()=>({closeMenu:c}),[c]);return S.jsxs(hL,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[S.jsx(Zy,{"aria-label":`Overflow menu for ${t}`,className:$(`${B}-overflow-menu-button-trigger`,`${B}-icon-button`,a,e,`cim-${t}-component`),children:S.jsx(nb,{})}),S.jsx(uy,{children:S.jsx(ay,{className:$(`${B}-overflow-menu-list`,a,`cim-${t}-component`),children:S.jsx(LE.Provider,{value:d,children:n})})})]})};function rb(e){return mt({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 ib(e){return mt({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[EL,ji]=Ui({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),uh=J.forwardRef((e,t)=>{const n=ji(),r=It(n.getControlProps(),e);return S.jsx(Qt.div,ae(F(F({},r),e),{ref:t}))});uh.displayName="CarouselControl";const lh=J.forwardRef((e,t)=>{const[n,r]=sa()(e,["readOnly","index"]),o=ji(),a=It(o.getIndicatorProps(n),r);return S.jsx(Qt.button,ae(F({},a),{ref:t}))});lh.displayName="CarouselIndicator";const ch=J.forwardRef((e,t)=>{const n=ji(),r=It(n.getIndicatorGroupProps(),e);return S.jsx(Qt.div,ae(F({},r),{ref:t}))});ch.displayName="CarouselIndicatorGroup";const dh=J.forwardRef((e,t)=>{const[n,r]=sa()(e,["index","snapAlign"]),o=ji(),a=It(o.getItemProps(n),r);return S.jsx(Qt.div,ae(F({},a),{ref:t}))});dh.displayName="CarouselItem";const fh=J.forwardRef((e,t)=>{const n=ji(),r=It(n.getItemGroupProps(),e);return S.jsx(Qt.div,ae(F({},r),{ref:t}))});fh.displayName="CarouselItemGroup";const hh=J.forwardRef((e,t)=>{const n=ji(),r=It(n.getNextTriggerProps(),e);return S.jsx(Qt.button,ae(F({},r),{ref:t}))});hh.displayName="CarouselNextTrigger";const ph=J.forwardRef((e,t)=>{const n=ji(),r=It(n.getPrevTriggerProps(),e);return S.jsx(Qt.button,ae(F({},r),{ref:t}))});ph.displayName="CarouselPrevTrigger";function yL(e){const t=Po(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let x=parseFloat(T);return/%/.test(T)&&(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 bL(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 ob(e){let t=[];for(const n of e.children)t=t.concat(n,ob(n));return t}function sb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?ob(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(!bL(n,E,u))continue;const T=Po(p);let[y,x]=T.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const v=a==="x"?x:y,A=E[c]-n[c]+e[h];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+E[d]/2});break;case"end":r[a].end.push({node:p,position:A+E[d]});break}}}return r}function ab(e){const t=e.getBoundingClientRect(),n=yL(e),r=sb(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:ub([...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(lb(0,o.x))),y:ub([...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(lb(0,o.y)))}}function TL(e,t,n){const r=sb(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var ub=e=>[...new Set(e)],lb=(e,t)=>n=>Math.max(e,Math.min(t,n)),xL=Hi("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Ir=xL.build(),wL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},_L=(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}`},xl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},vL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},SL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},AL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},cb=(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(xl(e)),db=e=>GP(hn(e),"[data-part=item]"),CL=(e,t)=>e.getById(cb(e,t)),fb=e=>{const t=hn(e);if(!t)return;const n=Lo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function kL(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"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),v=c("slidesPerPage"),A=c("padding"),C=c("translations");return{isPlaying:d,isDragging:h,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:E,getProgress(){return x/y.length},scrollToIndex(O,R){a({type:"INDEX.SET",index:O,instant:R})},scrollTo(O,R){a({type:"PAGE.SET",index:O,instant:R})},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(ae(F({},Ir.root.attrs),{id:wL(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":v,"--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(ae(F({},Ir.itemGroup.attrs),{id:xl(u),"data-orientation":c("orientation"),"data-dragging":No(h),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(O){Oo(O.currentTarget,Gn(O))&&a({type:"VIEWPORT.FOCUS"})},onBlur(O){Oo(O.currentTarget,O.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(O){if(O.defaultPrevented||!c("allowMouseDrag")||!WE(O))return;const R=Gn(O);fr(R)&&R!==O.currentTarget||(O.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:GR(O=>{const R=c("orientation")==="horizontal"?"deltaX":"deltaY";O[R]<0&&!o("canScrollPrev")||O[R]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:A,[T?"paddingInline":"paddingBlock"]:A,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(O){const R=r.get("slidesInView").includes(O.index);return t.element(ae(F({},Ir.item.attrs),{id:_L(u,O.index),dir:c("dir"),role:"group","data-index":O.index,"data-inview":No(R),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":C.item(O.index,c("slideCount")),"aria-hidden":zE(!R),style:{scrollSnapAlign:(()=>{var ce;const H=(ce=O.snapAlign)!=null?ce:"start",W=c("slidesPerMove"),M=W==="auto"?Math.floor(c("slidesPerPage")):W;return(O.index+M)%M===0?H:void 0})()}}))},getControlProps(){return t.element(ae(F({},Ir.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(ae(F({},Ir.prevTrigger.attrs),{id:SL(u),type:"button",disabled:!E,dir:c("dir"),"aria-label":C.prevTrigger,"data-orientation":c("orientation"),"aria-controls":xl(u),onClick(O){O.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ae(F({},Ir.nextTrigger.attrs),{dir:c("dir"),id:vL(u),type:"button","aria-label":C.nextTrigger,"data-orientation":c("orientation"),"aria-controls":xl(u),disabled:!p,onClick(O){O.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ae(F({},Ir.indicatorGroup.attrs),{dir:c("dir"),id:AL(u),"data-orientation":c("orientation"),onKeyDown(O){if(O.defaultPrevented)return;const R="indicator",H={ArrowDown(K){T||(a({type:"PAGE.NEXT",src:R}),K.preventDefault())},ArrowUp(K){T||(a({type:"PAGE.PREV",src:R}),K.preventDefault())},ArrowRight(K){T&&(a({type:"PAGE.NEXT",src:R}),K.preventDefault())},ArrowLeft(K){T&&(a({type:"PAGE.PREV",src:R}),K.preventDefault())},Home(K){a({type:"PAGE.SET",index:0,src:R}),K.preventDefault()},End(K){a({type:"PAGE.SET",index:y.length-1,src:R}),K.preventDefault()}},W=IP(O,{dir:c("dir"),orientation:c("orientation")}),M=H[W];M==null||M(O)}}))},getIndicatorProps(O){return t.button(ae(F({},Ir.indicator.attrs),{dir:c("dir"),id:cb(u,O.index),type:"button","data-orientation":c("orientation"),"data-index":O.index,"data-readonly":No(O.readOnly),"data-current":No(O.index===x),"aria-label":C.indicator(O.index),onClick(R){R.defaultPrevented||O.readOnly||a({type:"PAGE.SET",index:O.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ae(F({},Ir.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":No(d),"aria-label":d?C.autoplayStop:C.autoplayStart,onClick(O){O.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var NL={props({props:e}){return eP(e,["slideCount"],"carousel"),ae(F({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:F({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:OL(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 FR(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"}),fb(e)});return fb(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"})};Ot(()=>{o(),Ot(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return db(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 T;const p=h.target,E=Number((T=p.dataset.index)!=null?T:"-1");return E==null||Number.isNaN(E)||E===-1?d:h.isIntersecting?RR(d,E):PR(d,E)},n.get("slidesInView"));n.set("slidesInView",LR(c))},{root:r,threshold:t("inViewThreshold")});return db(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=hn(n);return r?Bt(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 Bt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return qP(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 Bt(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=UE((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=ME(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=DR(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=TL(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=UE(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=ab(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=ab(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]);Ot(()=>{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=CL(n,e.get("page"));r&&Ot(()=>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 OL(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}Fo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Fo()(["index","readOnly"]),Fo()(["index","snapAlign"]);const IL=e=>{const t=J.useId(),{getRootNode:n}=Tl(),{dir:r}=ah(),o=F({id:t,dir:r,getRootNode:n},e),a=al(NL,o);return kL(a,zf)},mh=J.forwardRef((e,t)=>{const[n,r]=sa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=IL(n),a=It(o.getRootProps(),r);return S.jsx(EL,{value:o,children:S.jsx(Qt.div,ae(F({},a),{ref:t}))})});mh.displayName="CarouselRoot";const RL=180,PL=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},LL=({globalClassName:e,className:t,itemMinWidth:n=RL,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),T=E.length,y=J.useRef(null),[x,v]=J.useState(0),{width:A}=yS();J.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[A,T]);const C=PL(r),O=n+C,R=x>0?(x+C)/O:1,H=Math.max(1,Math.floor(R));if(T===0)return null;const W=T>H,M=Math.ceil(T/H),K=W?Math.max(1,R):H;return S.jsxs(mh,{ref:y,className:$(e,t,`${B}-carousel`),slidesPerPage:K,slidesPerMove:H,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":h,children:[S.jsx(fh,{className:$(e,`${B}-carousel__item-group`,{"carousel-row-container":!W}),children:E.map((ce,be)=>S.jsx(dh,{index:be,className:$(e,`${B}-carousel__item`),children:ce},be))}),c&&W&&S.jsxs(uh,{className:$(e,`${B}-carousel__control`),children:[S.jsx(ph,{className:$(e,`${B}-carousel__prev-trigger`),"aria-label":"Previous slide",children:S.jsx(eb,{size:"16px"})}),S.jsx(hh,{className:$(e,`${B}-carousel__next-trigger`),"aria-label":"Next slide",children:S.jsx(tb,{size:"16px"})})]}),u&&W&&S.jsx(ch,{className:$(e,`${B}-carousel__indicator-group`),children:Array.from({length:M},(ce,be)=>S.jsx(lh,{index:be,className:$(e,`${B}-carousel__indicator`),"aria-label":`Go to slide group ${be+1}`},be))})]})},DL=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>S.jsx("button",{"aria-label":t,title:t,className:$(e,`${B}-close-button`),disabled:r,onClick:n,children:S.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:S.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"})})}),[ML,FL]=Ui({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),BL=e=>sa()(e,["lazyMount","unmountOnExit"]),[UL,ha]=Ui({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),hb=J.forwardRef((e,t)=>{const n=ha(),r=FL(),o=Vf(ae(F({},r),{present:n.open})),a=It(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:S.jsx(Qt.div,ae(F({},a),{ref:ul(o.ref,t)}))});hb.displayName="DialogBackdrop";const gh=J.forwardRef((e,t)=>{const n=ha(),r=oa(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(Qt.div,ae(F({},o),{ref:ul(r.ref,t)}))});gh.displayName="DialogContent";const Eh=J.forwardRef((e,t)=>{const n=ha(),r=It(n.getDescriptionProps(),e);return S.jsx(Qt.div,ae(F({},r),{ref:t}))});Eh.displayName="DialogDescription";const yh=J.forwardRef((e,t)=>{const n=ha(),r=It(n.getPositionerProps(),e);return oa().unmounted?null:S.jsx(Qt.div,ae(F({},r),{ref:t}))});yh.displayName="DialogPositioner";var HL=Hi("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),$i=HL.build(),pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},mb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},bh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},gb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Th=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},wl=e=>e.getById(bh(e)),zL=e=>e.getById(pb(e)),jL=e=>e.getById(mb(e)),$L=e=>e.getById(gb(e)),VL=e=>e.getById(Th(e)),qL=e=>e.getById(xh(e)),YL=e=>e.getById(Eb(e));function WL(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(ae(F({},$i.trigger.attrs),{dir:a("dir"),id:gb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":bh(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ae(F({},$i.backdrop.attrs),{dir:a("dir"),hidden:!d,id:mb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ae(F({},$i.positioner.attrs),{dir:a("dir"),id:pb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(ae(F({},$i.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:bh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:Th(u),"aria-describedby":h.description?xh(u):void 0}))},getTitleProps(){return t.element(ae(F({},$i.title.attrs),{dir:a("dir"),id:Th(u)}))},getDescriptionProps(){return t.element(ae(F({},$i.description.attrs),{dir:a("dir"),id:xh(u)}))},getCloseTriggerProps(){return t.button(ae(F({},$i.closeTrigger.attrs),{dir:a("dir"),id:Eb(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var GL={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>YL(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return F({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return jy(()=>wl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[$L(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 Wy(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?qy(()=>wl(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")?Py(()=>[wl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Ot(()=>{e.set("rendered",{title:!!VL(t),description:!!qL(t)})})},syncZIndex({scope:e}){Ot(()=>{const t=wl(e);if(!t)return;const n=Po(t);[zL(e),jL(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})}}}};Fo()(["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 KL=e=>{const t=J.useId(),{getRootNode:n}=Tl(),{dir:r}=ah(),o=F({id:t,getRootNode:n,dir:r},e),a=al(GL,o);return WL(a,zf)},yb=e=>{const[t,c]=ly(e),d=c,{children:n}=d,r=sn(d,["children"]),[o]=BL(t),a=KL(r),u=Vf(It({present:a.open},t));return S.jsx(UL,{value:a,children:S.jsx(ML,{value:o,children:S.jsx(sy,{value:u,children:n})})})},bb=J.forwardRef((e,t)=>{const n=ha(),r=It(n.getTitleProps(),e);return S.jsx(Qt.h2,ae(F({},r),{ref:t}))});bb.displayName="DialogTitle";const QL=({children:e})=>{const[t,n]=J.useState(!1),r=J.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=J.useMemo(()=>({isOpen:t}),[t]);return S.jsx(Cf.Provider,{value:r,children:S.jsx(PE.Provider,{value:o,children:e})})},Tb=()=>J.useContext(PE),xb=()=>{const e=J.useContext(Cf);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},XL=`${B}-overflow-menu-button-trigger`,JL=({componentType:e,children:t})=>{const{isOpen:n}=Tb(),{closeMenu:r}=xb(),{globalClassName:o}=Nt(),a=J.useRef(null);return J.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const h=d.target;h instanceof Element&&h.closest(`.${XL}`)||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?S.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:$(`${B}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},ZL=({componentType:e,className:t})=>{const{toggleMenu:n}=xb(),{isOpen:r}=Tb(),{globalClassName:o}=Nt();return S.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:$(`${B}-overflow-menu-button-trigger`,`${B}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:S.jsx(nb,{})})},eD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Nt(),{previousComponentType:r}=ki(),o=na(),a=()=>{Su(r||"dialog"),o()};return t?S.jsx(ar,{className:$(n,`${B}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:S.jsx(rb,{})}):S.jsxs("button",{className:$(n,`${B}-overflow-menu-button`,`${B}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(rb,{}),"Show ",r||"dialog"]})},tD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Nt(),{isModalFullscreen:r}=ki(),o=na(),a=()=>{wd(!r),o()},u=r?GS:KS,c="Toggle Fullscreen";return t?S.jsx(ar,{ariaLabel:c,title:c,className:$(n,`${B}-modal-fullscreen-button`,`cim-${e}-component`),icon:S.jsx(u,{}),onClick:a}):S.jsxs("button",{className:$(n,`${B}-overflow-menu-button`,`${B}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(u,{}),c]})},nD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Nt(),{dialogPosition:r}=ki(),o=na(),a=r==="bottom-left",u=()=>{_d(a?"bottom-right":"bottom-left"),o()},c=a?mL:pL,d=a?"Move right":"Move left";return t?S.jsx(ar,{className:$(n,`${B}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:S.jsx(c,{})}):S.jsxs("button",{className:$(n,`${B}-overflow-menu-button`,`${B}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[S.jsx(c,{}),d]})},wb=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=Nt(),{mode:a}=ki(),u=a==="standalone",c=e==="modal",d=c?eD:Sb,h=c?tD:nD,p=J.useMemo(()=>r?jS(r):{},[r]);return S.jsx(QL,{children:S.jsxs("div",{className:$(o,`${B}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[S.jsxs("div",{className:$(o,`${B}-${e}-header`,{standalone:u,embedded:!u}),style:p,children:[(r==null?void 0:r.logoUrl)&&S.jsx("img",{alt:"",role:"img",className:$(o,`${B}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),S.jsx(bb,{className:$(o,`${B}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),S.jsxs("div",{className:$(o,`${B}-${e}-controls`),children:[S.jsx(d,{componentType:e,isIcon:!0}),S.jsx(ZL,{componentType:e}),S.jsx(DL,{className:$(o,`cim-${e}-component`),onClick:n})]})]}),S.jsxs(JL,{componentType:e,children:[S.jsx(h,{componentType:e}),S.jsx(oD,{componentType:e}),S.jsx(DE,{componentType:e,onClearChat:t})]})]})})},_b="USD",pa=(e,t)=>{if(typeof e!="number"||Number.isNaN(e))return null;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e)}catch(n){return`${e}`}},rD=({retailPrice:e,discountPrice:t,currencyCode:n=_b})=>{const r=n||_b,o=typeof t=="number"&&typeof e=="number"&&t<e,a=o?t:e||t||null,u=o?e:null;return{price:pa(a,r),comparePrice:pa(u,r),hasDiscount:o}},vb=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:o,className:a})=>{const{price:u,comparePrice:c,hasDiscount:d}=rD({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const h=typeof r=="string"?{fontSize:r}:{};return S.jsxs("div",{className:$(o,a,`${B}-price`),style:h,children:[S.jsx("span",{className:$(o,`${B}-price__amount`),children:u}),d&&c&&S.jsx("span",{className:$(o,`${B}-price__compare`),children:c})]})},iD=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return S.jsx("div",{className:$(t,`${B}-suggestion-container ${u}`,e),children:n.map(d=>o?S.jsx(ku,{disabled:r,className:$(t,`${B}-suggestion-button standalone`),onClick:c(d),children:d},d):S.jsx("button",{disabled:r,className:$(t,`${B}-suggestion-button embedded`),onClick:c(d),children:d},d))})},oD=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=Nt();if(!r)return null;const o=()=>{Ci(!1),vu(!0)};return t?S.jsx(ar,{className:$(n,`${B}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:S.jsx($0,{})}):S.jsxs("button",{className:$(n,`${B}-overflow-menu-button`,`${B}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[S.jsx($0,{}),"Minimize"]})},Sb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Nt(),r=na(),o=()=>{Su("modal"),r()};return t?S.jsx(ar,{className:$(n,`${B}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:S.jsx(ib,{})}):S.jsxs("button",{className:$(n,`${B}-overflow-menu-button`,`${B}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[S.jsx(ib,{}),"Show modal"]})},sD=["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"],aD=3e3,uD=400,lD=({globalClassName:e,isWidgetStandalone:t,messages:n=sD})=>{const[r,o]=J.useState(0),[a,u]=J.useState(!0);return J.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{o(h=>(h+1)%n.length),u(!0)},uD)},aD);return()=>{clearInterval(d),clearTimeout(c)}},[n.length]),S.jsxs("div",{className:$(e,`${B}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[S.jsxs("div",{className:`${B}-connecting-pulse-wrapper`,children:[S.jsx("div",{className:`${B}-connecting-pulse`}),S.jsx("div",{className:`${B}-connecting-ring`})]}),S.jsx("span",{className:$(`${B}-connecting-text`,a&&`${B}-connecting-text--visible`),children:n[r]})]})},cD=({shouldShow:e,loadingText:t})=>e?S.jsx("span",{className:`${B}-processing-text`,children:t}):null,dD=({shouldShow:e})=>e?S.jsxs(S.Fragment,{children:[S.jsx("div",{className:`${B}-processing-shimmer-bar`}),S.jsx("div",{className:`${B}-processing-shimmer-bar`}),S.jsx("div",{className:`${B}-processing-shimmer-bar`})]}):null,wh=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>S.jsxs("div",{className:$(e,`${B}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[S.jsx(cD,{shouldShow:!!n,loadingText:n}),S.jsx(dD,{shouldShow:!n})]});function Ab(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 fD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function hD(e,t,n){const o=Uu((n||{}).ignore||[]),a=pD(t);let u=-1;for(;++u<a.length;)n1(e,"text",c);function c(h,p){let E=-1,T;for(;++E<p.length;){const y=p[E],x=T?T.children:void 0;if(o(y,x?x.indexOf(y):void 0,T))return;T=y}if(T)return d(h,p)}function d(h,p){const E=p[p.length-1],T=a[u][0],y=a[u][1];let x=0;const A=E.children.indexOf(h);let C=!1,O=[];T.lastIndex=0;let R=T.exec(h.value);for(;R;){const H=R.index,W={index:R.index,input:R.input,stack:[...p,h]};let M=y(...R,W);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?T.lastIndex=H+1:(x!==H&&O.push({type:"text",value:h.value.slice(x,H)}),Array.isArray(M)?O.push(...M):M&&O.push(M),x=H+R[0].length,C=!0),!T.global)break;R=T.exec(h.value)}return C?(x<h.value.length&&O.push({type:"text",value:h.value.slice(x)}),E.children.splice(A,1,...O)):O=[h],A+O.length}}function pD(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([mD(o[0]),gD(o[1])])}return t}function mD(e){return typeof e=="string"?new RegExp(fD(e),"g"):e}function gD(e){return typeof e=="function"?e:function(){return e}}const _h="phrasing",vh=["autolink","link","image","label"];function ED(){return{transforms:[vD],enter:{literalAutolink:bD,literalAutolinkEmail:Sh,literalAutolinkHttp:Sh,literalAutolinkWww:Sh},exit:{literalAutolink:_D,literalAutolinkEmail:wD,literalAutolinkHttp:TD,literalAutolinkWww:xD}}}function yD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_h,notInConstruct:vh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_h,notInConstruct:vh},{character:":",before:"[ps]",after:"\\/",inConstruct:_h,notInConstruct:vh}]}}function bD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sh(e){this.config.enter.autolinkProtocol.call(this,e)}function TD(e){this.config.exit.autolinkProtocol.call(this,e)}function xD(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 wD(e){this.config.exit.autolinkEmail.call(this,e)}function _D(e){this.exit(e)}function vD(e){hD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,SD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),AD]],{ignore:["link","linkReference"]})}function SD(e,t,n,r,o){let a="";if(!Cb(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!CD(n)))return!1;const u=kD(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 AD(e,t,n,r){return!Cb(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 kD(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=Ab(e,"(");let a=Ab(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 Cb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Oi(n)||Ru(n))&&(!t||n!==47)}kb.peek=FD;function ND(){this.buffer()}function OD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ID(){this.buffer()}function RD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function PD(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 LD(e){this.exit(e)}function DD(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 MD(e){this.exit(e)}function FD(){return"["}function kb(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 BD(){return{enter:{gfmFootnoteCallString:ND,gfmFootnoteCall:OD,gfmFootnoteDefinitionLabelString:ID,gfmFootnoteDefinition:RD},exit:{gfmFootnoteCallString:PD,gfmFootnoteCall:LD,gfmFootnoteDefinitionLabelString:DD,gfmFootnoteDefinition:MD}}}function UD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:kb},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
- `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?Nb:HD))),h(),d}}function HD(e,t,n){return t===0?e:Nb(e,t,n)}function Nb(e,t,n){return(n?"":" ")+e}const zD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ob.peek=YD;function jD(){return{canContainEols:["delete"],enter:{strikethrough:VD},exit:{strikethrough:qD}}}function $D(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zD}],handlers:{delete:Ob}}}function VD(e){this.enter({type:"delete",children:[]},e)}function qD(e){this.exit(e)}function Ob(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,ae(F({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function YD(){return"~"}function WD(e){return e.length}function GD(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||WD,a=[],u=[],c=[],d=[];let h=0,p=-1;for(;++p<e.length;){const v=[],A=[];let C=-1;for(e[p].length>h&&(h=e[p].length);++C<e[p].length;){const O=KD(e[p][C]);if(n.alignDelimiters!==!1){const R=o(O);A[C]=R,(d[C]===void 0||R>d[C])&&(d[C]=R)}v.push(O)}u[p]=v,c[p]=A}let E=-1;if(typeof r=="object"&&"length"in r)for(;++E<h;)a[E]=Ib(r[E]);else{const v=Ib(r);for(;++E<h;)a[E]=v}E=-1;const T=[],y=[];for(;++E<h;){const v=a[E];let A="",C="";v===99?(A=":",C=":"):v===108?A=":":v===114&&(C=":");let O=n.alignDelimiters===!1?1:Math.max(1,d[E]-A.length-C.length);const R=A+"-".repeat(O)+C;n.alignDelimiters!==!1&&(O=A.length+O+C.length,O>d[E]&&(d[E]=O),y[E]=O),T[E]=R}u.splice(1,0,T),c.splice(1,0,y),p=-1;const x=[];for(;++p<u.length;){const v=u[p],A=c[p];E=-1;const C=[];for(;++E<h;){const O=v[E]||"";let R="",H="";if(n.alignDelimiters!==!1){const W=d[E]-(A[E]||0),M=a[E];M===114?R=" ".repeat(W):M===99?W%2?(R=" ".repeat(W/2+.5),H=" ".repeat(W/2-.5)):(R=" ".repeat(W/2),H=R):H=" ".repeat(W)}n.delimiterStart!==!1&&!E&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&O==="")&&(n.delimiterStart!==!1||E)&&C.push(" "),n.alignDelimiters!==!1&&C.push(R),C.push(O),n.alignDelimiters!==!1&&C.push(H),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||E!==h-1)&&C.push("|")}x.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return x.join(`
35
+ `}),n}function i1(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function o1(e,t){const n=y3(e,t),r=n.one(e,void 0),o=u3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
36
+ `},o),a}function _3(e,t){return e&&"run"in e?function(n,r){return Ve(this,null,function*(){const o=o1(n,B({file:r},t));yield e.run(o,r)})}:function(n,r){return o1(n,B({file:r},e||t))}}function s1(e){if(e)throw e}var Xd,a1;function v3(){if(a1)return Xd;a1=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"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!g)return!1;var T;for(T in h);return typeof T=="undefined"||e.call(h,T)},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 Xd=function d(){var h,p,g,T,y,x,S=arguments[0],A=1,C=arguments.length,O=!1;for(typeof S=="boolean"&&(O=S,S=arguments[1]||{},A=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});A<C;++A)if(h=arguments[A],h!=null)for(p in h)g=c(S,p),T=c(h,p),S!==T&&(O&&T&&(a(T)||(y=o(T)))?(y?(y=!1,x=g&&o(g)?g:[]):x=g&&a(g)?g:{},u(S,{name:p,newValue:d(O,x,T)})):typeof T!="undefined"&&u(S,{name:p,newValue:T}));return S},Xd}var S3=v3();const Jd=We(S3);function Zd(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 A3(){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 g=-1;if(d){u(d);return}for(;++g<o.length;)(h[g]===null||h[g]===void 0)&&(h[g]=o[g]);o=h,p?C3(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 C3(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 lr={basename:k3,dirname:N3,extname:O3,join:I3,sep:"/"};function k3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');js(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 N3(e){if(js(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 O3(e){js(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 I3(...e){let t=-1,n;for(;++t<e.length;)js(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":R3(n)}function R3(e){js(e);const t=e.codePointAt(0)===47;let n=P3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function P3(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 js(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const L3={cwd:D3};function D3(){return"/"}function ef(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function M3(e){if(typeof e=="string")e=new URL(e);else if(!ef(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 F3(e)}function F3(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 tf=["history","path","basename","stem","extname","dirname"];class u1{constructor(t){let n;t?ef(t)?n={path:t}:typeof t=="string"||B3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":L3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<tf.length;){const a=tf[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)tf.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?lr.basename(this.path):void 0}set basename(t){rf(t,"basename"),nf(t,"basename"),this.path=lr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?lr.dirname(this.path):void 0}set dirname(t){l1(this.basename,"dirname"),this.path=lr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?lr.extname(this.path):void 0}set extname(t){if(nf(t,"extname"),l1(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=lr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ef(t)&&(t=M3(t)),rf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?lr.basename(this.path,this.extname):void 0}set stem(t){rf(t,"stem"),nf(t,"stem"),this.path=lr.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 Wt(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 nf(e,t){if(e&&e.includes(lr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+lr.sep+"`")}function rf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function l1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function B3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const U3=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),H3={}.hasOwnProperty;class of extends U3{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=A3()}copy(){const t=new of;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Jd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(uf("data",this.frozen),this.namespace[t]=n,this):H3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(uf("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=ju(t),r=this.parser||this.Parser;return sf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),sf("process",this.parser||this.Parser),af("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=ju(t),d=r.parse(c);r.run(d,c,function(p,g,T){if(p||!g||!T)return h(p);const y=g,x=r.stringify(y,T);$3(x)?T.value=x:T.result=x,h(p,T)});function h(p,g){p||!g?u(p):a?a(g):n(void 0,g)}}}processSync(t){let n=!1,r;return this.freeze(),sf("processSync",this.parser||this.Parser),af("processSync",this.compiler||this.Compiler),this.process(t,o),d1("processSync","process",n),r;function o(a,u){n=!0,s1(a),r=u}}run(t,n,r){c1(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=ju(n);o.run(t,d,h);function h(p,g,T){const y=g||t;p?c(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),d1("runSync","run",r),o;function a(u,c){s1(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=ju(n),o=this.compiler||this.Compiler;return af("stringify",o),c1(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(uf("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,...g]=h;d(p,g)}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=Jd(!0,o.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const g=h[p];a(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let g=-1,T=-1;for(;++g<r.length;)if(r[g][0]===h){T=g;break}if(T===-1)r.push([h,...p]);else if(p.length>0){let[y,...x]=p;const S=r[T][1];Zd(S)&&Zd(y)&&(y=Jd(!0,S,y)),r[T]=[h,y,...x]}}}}const z3=new of().freeze();function sf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function af(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function uf(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 c1(e){if(!Zd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function d1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ju(e){return j3(e)?e:new u1(e)}function j3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function $3(e){return typeof e=="string"||V3(e)}function V3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const q3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",f1=[],h1={allowDangerousHtml:!0},Y3=/^(https?|ircs?|mailto|xmpp)$/i,W3=[{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 p1(e){const t=G3(e),n=K3(e);return Q3(t.runSync(t.parse(n),n),e)}function G3(e){const t=e.rehypePlugins||f1,n=e.remarkPlugins||f1,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),h1):h1;return z3().use(Nk).use(n).use(_3,r).use(t)}function K3(e){const t=e.children||"",n=new u1;return typeof t=="string"&&(n.value=t),n}function Q3(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||X3;for(const p of W3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+q3+p.id,void 0);return zu(e,h),xA(e,{Fragment:_.Fragment,components:o,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function h(p,g,T){if(p.type==="raw"&&T&&typeof g=="number")return u?T.children.splice(g,1):T.children[g]={type:"text",value:p.value},g;if(p.type==="element"){let y;for(y in Fd)if(Object.hasOwn(Fd,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],S=Fd[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 g=="number"&&(y=!r(p,g,T)),y&&T&&typeof g=="number")return c&&p.children?T.children.splice(g,1,...p.children):T.children.splice(g,1),g}}}function X3(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||Y3.test(e.slice(0,t))?e:""}const m1=/[#.]/g;function J3(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){m1.lastIndex=o;const c=m1.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 g1(e,t,n){const r=n?nN(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=J3(a,t);const h=d.tagName.toLowerCase(),p=r?r.get(h):void 0;if(d.tagName=p||h,Z3(u))c.unshift(u);else for(const[g,T]of Object.entries(u))eN(e,d.properties,g,T)}for(const h of c)lf(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function Z3(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 eN(e,t,n,r){const o=Id(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=sg(r):o.commaSeparated?a=W0(r):o.commaOrSpaceSeparated?a=sg(W0(r).join(" ")):a=E1(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?tN(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(E1(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function lf(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)lf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?lf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function E1(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Rs(n)===Rs(t)))return!0}return n}function tN(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function nN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const rN=["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"],iN=g1(Nu,"div"),oN=g1(go,"g",rN);function sN(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=y1(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=y1(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 y1(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/"},b1={}.hasOwnProperty,aN=Object.prototype;function uN(e,t){const n=t||{};return cf({file:n.file||void 0,location:!1,schema:n.space==="svg"?go:Nu,verbose:n.verbose||!1},e)}function cf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},$u(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:T1(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=sN(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"},$u(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},$u(e,r,n),n}default:return n=lN(e,t),n}}function T1(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=cf(e,t[n]);r.push(o)}return r}function lN(e,t){const n=e.schema;e.schema=t.namespaceURI===Ri.svg?go:Nu;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;b1.call(aN,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?oN:iN)(t.tagName,o,T1(e,t.childNodes));if($u(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&xo(d.startTag),p=d&&d.endTag&&xo(d.endTag),g=cf(e,c.content);h&&p&&e.file&&(g.position={start:h.end,end:p.start}),u.content=g}return e.schema=n,u}function $u(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=cN(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function cN(e,t,n){const r=xo(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)b1.call(n.attrs,u)&&(a[Id(e.schema,u).property]=xo(n.attrs[u]));n.startTag;const c=xo(n.startTag),d=n.endTag?xo(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=a,t.data={position:h}}}return r}function xo(e){const t=x1({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=x1({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function x1(e){return e.line&&e.column?e:void 0}class $s{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}$s.prototype.property={},$s.prototype.normal={},$s.prototype.space=null;function w1(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 $s(n,r,t)}function df(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 dN=0;const ze=Pi(),Ct=Pi(),_1=Pi(),Ee=Pi(),at=Pi(),wo=Pi(),wn=Pi();function Pi(){return nu(2,++dN)}const ff=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Ct,commaOrSpaceSeparated:wn,commaSeparated:wo,number:Ee,overloadedBoolean:_1,spaceSeparated:at},Symbol.toStringTag,{value:"Module"})),hf=Object.keys(ff);class pf extends Pn{constructor(t,n,r,o){let a=-1;if(super(t,n),v1(this,"space",o),typeof r=="number")for(;++a<hf.length;){const u=hf[a];v1(this,hf[a],(r&ff[u])===ff[u])}}}pf.prototype.defined=!0;function v1(e,t,n){n&&(e[t]=n)}const fN={}.hasOwnProperty;function _o(e){const t={},n={};let r;for(r in e.properties)if(fN.call(e.properties,r)){const o=e.properties[r],a=new pf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[df(r)]=r,n[df(a.attribute)]=r}return new $s(t,n,e.space)}const S1=_o({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}}),A1=_o({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function C1(e,t){return t in e?e[t]:t}function k1(e,t){return C1(e,t.toLowerCase())}const N1=_o({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:k1,properties:{xmlns:null,xmlnsXLink:null}}),O1=_o({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ct,ariaAutoComplete:null,ariaBusy:Ct,ariaChecked:Ct,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:at,ariaCurrent:null,ariaDescribedBy:at,ariaDetails:null,ariaDisabled:Ct,ariaDropEffect:at,ariaErrorMessage:null,ariaExpanded:Ct,ariaFlowTo:at,ariaGrabbed:Ct,ariaHasPopup:null,ariaHidden:Ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:at,ariaLevel:Ee,ariaLive:null,ariaModal:Ct,ariaMultiLine:Ct,ariaMultiSelectable:Ct,ariaOrientation:null,ariaOwns:at,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Ct,ariaReadOnly:Ct,ariaRelevant:null,ariaRequired:Ct,ariaRoleDescription:at,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Ct,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null}}),hN=_o({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:k1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:wo,acceptCharset:at,accessKey:at,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:at,autoFocus:ze,autoPlay:ze,blocking:at,capture:null,charSet:null,checked:ze,cite:null,className:at,cols:Ee,colSpan:null,content:null,contentEditable:Ct,controls:ze,controlsList:at,coords:Ee|wo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:_1,draggable:Ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:at,height:Ee,hidden:ze,high:Ee,href:null,hrefLang:null,htmlFor:at,httpEquiv:at,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:at,itemRef:at,itemScope:ze,itemType:at,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,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:Ee,pattern:null,ping:at,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:at,required:ze,reversed:ze,rows:Ee,rowSpan:Ee,sandbox:at,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Ct,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:Ct,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:at,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,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:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Ct,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:Ee,security:null,unselectable:null}}),pN=_o({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:C1,properties:{about:wn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:at,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:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,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:wo,g2:wo,glyphName:wo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,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:Ee,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:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:at,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,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:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,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:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),mN=/^data[-\w.:]+$/i,I1=/-[a-z]/g,gN=/[A-Z]/g;function EN(e,t){const n=df(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"&&mN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(I1,bN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!I1.test(a)){let u=a.replace(gN,yN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=pf}return new o(r,t)}function yN(e){return"-"+e.toLowerCase()}function bN(e){return e.charAt(1).toUpperCase()}const TN=w1([A1,S1,N1,O1,hN],"html"),R1=w1([A1,S1,N1,O1,pN],"svg"),P1={}.hasOwnProperty;function L1(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&P1.call(o,e)){const d=String(o[e]);u=P1.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 xN={},wN={}.hasOwnProperty,D1=L1("type",{handlers:{root:vN,element:NN,text:CN,comment:kN,doctype:AN}});function _N(e,t){const r=(t||xN).space;return D1(e,r==="svg"?R1:TN)}function vN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=mf(e.children,n,t),vo(e,n),n}function SN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=mf(e.children,n,t),vo(e,n),n}function AN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return vo(e,t),t}function CN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return vo(e,t),t}function kN(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return vo(e,t),t}function NN(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=R1);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&wN.call(e.properties,a)){const d=ON(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=mf(e.children,c,r),vo(e,c),e.tagName==="template"&&e.content&&(c.content=SN(e.content,r)),c}function ON(e,t,n){const r=EN(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?G0(n):ag(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 mf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=D1(e[r],n);a.parentNode=t,o.push(a)}return o}function vo(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 IN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],RN=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 k;(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"})(k||(k={}));const fn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function M1(e){return e>=55296&&e<=57343}function PN(e){return e>=56320&&e<=57343}function LN(e,t){return(e-55296)*1024+9216+t}function F1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function B1(e){return e>=64976&&e<=65007||RN.has(e)}var ne;(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"})(ne||(ne={}));const DN=65536;class MN{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=DN,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(PN(n))return this.pos++,this._addGap(),LN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,k.EOF;return this._err(ne.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,k.EOF;const r=this.html.charCodeAt(n);return r===k.CARRIAGE_RETURN?k.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,k.EOF;let t=this.html.charCodeAt(this.pos);return t===k.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,k.LINE_FEED):t===k.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,M1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===k.LINE_FEED||t===k.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){F1(t)?this._err(ne.controlCharacterInInputStream):B1(t)&&this._err(ne.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var qe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(qe||(qe={}));function U1(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 FN=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))),BN=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 UN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=BN.get(e))!==null&&t!==void 0?t:e}var Dt;(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"})(Dt||(Dt={}));const HN=32;var Wr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Wr||(Wr={}));function gf(e){return e>=Dt.ZERO&&e<=Dt.NINE}function zN(e){return e>=Dt.UPPER_A&&e<=Dt.UPPER_F||e>=Dt.LOWER_A&&e<=Dt.LOWER_F}function jN(e){return e>=Dt.UPPER_A&&e<=Dt.UPPER_Z||e>=Dt.LOWER_A&&e<=Dt.LOWER_Z||gf(e)}function $N(e){return e===Dt.EQUALS||jN(e)}var Mt;(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"})(Mt||(Mt={}));var Cr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Cr||(Cr={}));class VN{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Mt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Cr.Strict}startEntity(t){this.decodeMode=t,this.state=Mt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Mt.EntityStart:return t.charCodeAt(n)===Dt.NUM?(this.state=Mt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Mt.NamedEntity,this.stateNamedEntity(t,n));case Mt.NumericStart:return this.stateNumericStart(t,n);case Mt.NumericDecimal:return this.stateNumericDecimal(t,n);case Mt.NumericHex:return this.stateNumericHex(t,n);case Mt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|HN)===Dt.LOWER_X?(this.state=Mt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Mt.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(gf(o)||zN(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(gf(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===Dt.SEMI)this.consumed+=1;else if(this.decodeMode===Cr.Strict)return 0;return this.emitCodePoint(UN(this.result),this.consumed),this.errors&&(t!==Dt.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&Wr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=qN(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Cr.Attribute&&(a===0||$N(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Wr.VALUE_LENGTH)>>14,a!==0){if(u===Dt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Cr.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]&Wr.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]&~Wr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Mt.NamedEntity:return this.result!==0&&(this.decodeMode!==Cr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Mt.NumericDecimal:return this.emitNumericEntity(0,2);case Mt.NumericHex:return this.emitNumericEntity(0,3);case Mt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Mt.EntityStart:return 0}}}function qN(e,t,n,r){const o=(t&Wr.BRANCH_LENGTH)>>7,a=t&Wr.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 Y;(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"})(Y||(Y={}));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 YN=new Map([[Y.A,m.A],[Y.ADDRESS,m.ADDRESS],[Y.ANNOTATION_XML,m.ANNOTATION_XML],[Y.APPLET,m.APPLET],[Y.AREA,m.AREA],[Y.ARTICLE,m.ARTICLE],[Y.ASIDE,m.ASIDE],[Y.B,m.B],[Y.BASE,m.BASE],[Y.BASEFONT,m.BASEFONT],[Y.BGSOUND,m.BGSOUND],[Y.BIG,m.BIG],[Y.BLOCKQUOTE,m.BLOCKQUOTE],[Y.BODY,m.BODY],[Y.BR,m.BR],[Y.BUTTON,m.BUTTON],[Y.CAPTION,m.CAPTION],[Y.CENTER,m.CENTER],[Y.CODE,m.CODE],[Y.COL,m.COL],[Y.COLGROUP,m.COLGROUP],[Y.DD,m.DD],[Y.DESC,m.DESC],[Y.DETAILS,m.DETAILS],[Y.DIALOG,m.DIALOG],[Y.DIR,m.DIR],[Y.DIV,m.DIV],[Y.DL,m.DL],[Y.DT,m.DT],[Y.EM,m.EM],[Y.EMBED,m.EMBED],[Y.FIELDSET,m.FIELDSET],[Y.FIGCAPTION,m.FIGCAPTION],[Y.FIGURE,m.FIGURE],[Y.FONT,m.FONT],[Y.FOOTER,m.FOOTER],[Y.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[Y.FORM,m.FORM],[Y.FRAME,m.FRAME],[Y.FRAMESET,m.FRAMESET],[Y.H1,m.H1],[Y.H2,m.H2],[Y.H3,m.H3],[Y.H4,m.H4],[Y.H5,m.H5],[Y.H6,m.H6],[Y.HEAD,m.HEAD],[Y.HEADER,m.HEADER],[Y.HGROUP,m.HGROUP],[Y.HR,m.HR],[Y.HTML,m.HTML],[Y.I,m.I],[Y.IMG,m.IMG],[Y.IMAGE,m.IMAGE],[Y.INPUT,m.INPUT],[Y.IFRAME,m.IFRAME],[Y.KEYGEN,m.KEYGEN],[Y.LABEL,m.LABEL],[Y.LI,m.LI],[Y.LINK,m.LINK],[Y.LISTING,m.LISTING],[Y.MAIN,m.MAIN],[Y.MALIGNMARK,m.MALIGNMARK],[Y.MARQUEE,m.MARQUEE],[Y.MATH,m.MATH],[Y.MENU,m.MENU],[Y.META,m.META],[Y.MGLYPH,m.MGLYPH],[Y.MI,m.MI],[Y.MO,m.MO],[Y.MN,m.MN],[Y.MS,m.MS],[Y.MTEXT,m.MTEXT],[Y.NAV,m.NAV],[Y.NOBR,m.NOBR],[Y.NOFRAMES,m.NOFRAMES],[Y.NOEMBED,m.NOEMBED],[Y.NOSCRIPT,m.NOSCRIPT],[Y.OBJECT,m.OBJECT],[Y.OL,m.OL],[Y.OPTGROUP,m.OPTGROUP],[Y.OPTION,m.OPTION],[Y.P,m.P],[Y.PARAM,m.PARAM],[Y.PLAINTEXT,m.PLAINTEXT],[Y.PRE,m.PRE],[Y.RB,m.RB],[Y.RP,m.RP],[Y.RT,m.RT],[Y.RTC,m.RTC],[Y.RUBY,m.RUBY],[Y.S,m.S],[Y.SCRIPT,m.SCRIPT],[Y.SEARCH,m.SEARCH],[Y.SECTION,m.SECTION],[Y.SELECT,m.SELECT],[Y.SOURCE,m.SOURCE],[Y.SMALL,m.SMALL],[Y.SPAN,m.SPAN],[Y.STRIKE,m.STRIKE],[Y.STRONG,m.STRONG],[Y.STYLE,m.STYLE],[Y.SUB,m.SUB],[Y.SUMMARY,m.SUMMARY],[Y.SUP,m.SUP],[Y.TABLE,m.TABLE],[Y.TBODY,m.TBODY],[Y.TEMPLATE,m.TEMPLATE],[Y.TEXTAREA,m.TEXTAREA],[Y.TFOOT,m.TFOOT],[Y.TD,m.TD],[Y.TH,m.TH],[Y.THEAD,m.THEAD],[Y.TITLE,m.TITLE],[Y.TR,m.TR],[Y.TRACK,m.TRACK],[Y.TT,m.TT],[Y.U,m.U],[Y.UL,m.UL],[Y.SVG,m.SVG],[Y.VAR,m.VAR],[Y.WBR,m.WBR],[Y.XMP,m.XMP]]);function So(e){var t;return(t=YN.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const pe=m,WN={[le.HTML]:new Set([pe.ADDRESS,pe.APPLET,pe.AREA,pe.ARTICLE,pe.ASIDE,pe.BASE,pe.BASEFONT,pe.BGSOUND,pe.BLOCKQUOTE,pe.BODY,pe.BR,pe.BUTTON,pe.CAPTION,pe.CENTER,pe.COL,pe.COLGROUP,pe.DD,pe.DETAILS,pe.DIR,pe.DIV,pe.DL,pe.DT,pe.EMBED,pe.FIELDSET,pe.FIGCAPTION,pe.FIGURE,pe.FOOTER,pe.FORM,pe.FRAME,pe.FRAMESET,pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6,pe.HEAD,pe.HEADER,pe.HGROUP,pe.HR,pe.HTML,pe.IFRAME,pe.IMG,pe.INPUT,pe.LI,pe.LINK,pe.LISTING,pe.MAIN,pe.MARQUEE,pe.MENU,pe.META,pe.NAV,pe.NOEMBED,pe.NOFRAMES,pe.NOSCRIPT,pe.OBJECT,pe.OL,pe.P,pe.PARAM,pe.PLAINTEXT,pe.PRE,pe.SCRIPT,pe.SECTION,pe.SELECT,pe.SOURCE,pe.STYLE,pe.SUMMARY,pe.TABLE,pe.TBODY,pe.TD,pe.TEMPLATE,pe.TEXTAREA,pe.TFOOT,pe.TH,pe.THEAD,pe.TITLE,pe.TR,pe.TRACK,pe.UL,pe.WBR,pe.XMP]),[le.MATHML]:new Set([pe.MI,pe.MO,pe.MN,pe.MS,pe.MTEXT,pe.ANNOTATION_XML]),[le.SVG]:new Set([pe.TITLE,pe.FOREIGN_OBJECT,pe.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},Ef=new Set([pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6]);Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT;var I;(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"})(I||(I={}));const wt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function GN(e){return e>=k.DIGIT_0&&e<=k.DIGIT_9}function Vs(e){return e>=k.LATIN_CAPITAL_A&&e<=k.LATIN_CAPITAL_Z}function KN(e){return e>=k.LATIN_SMALL_A&&e<=k.LATIN_SMALL_Z}function Gr(e){return KN(e)||Vs(e)}function H1(e){return Gr(e)||GN(e)}function Vu(e){return e+32}function z1(e){return e===k.SPACE||e===k.LINE_FEED||e===k.TABULATION||e===k.FORM_FEED}function j1(e){return z1(e)||e===k.SOLIDUS||e===k.GREATER_THAN_SIGN}function QN(e){return e===k.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:M1(e)?ne.surrogateCharacterReference:B1(e)?ne.noncharacterCharacterReference:F1(e)||e===k.CARRIAGE_RETURN?ne.controlCharacterReference:null}class XN{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=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new MN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new VN(FN,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ne.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ne.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=QN(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:qe.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qe.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:qe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(U1(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(ne.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=So(t.tagName),t.type===qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ne.endTagWithAttributes),t.selfClosing&&this._err(ne.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case qe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:qe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=z1(t)?qe.WHITESPACE_CHARACTER:t===k.NULL?qe.NULL_CHARACTER:qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Cr.Attribute:Cr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitCodePoint(t);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case k.AMPERSAND:{this._startCharacterReference();break}case k.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case k.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Gr(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case k.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case k.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case k.QUESTION_MARK:{this._err(ne.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case k.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Gr(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case k.GREATER_THAN_SIGN:{this._err(ne.missingEndTagName),this.state=I.DATA;break}case k.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.tagName+=ft;break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Vs(t)?Vu(t):t)}}_stateRcdataLessThanSign(t){t===k.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Gr(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case k.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case k.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===k.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Gr(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case k.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case k.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Gr(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===k.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===k.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===k.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Gr(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Gr(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&j1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===k.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&j1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._err(ne.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:{this._err(ne.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.name+=ft;break}default:this.currentAttr.name+=String.fromCodePoint(Vs(t)?Vu(t):t)}}_stateAfterAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case k.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case k.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case k.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:case k.EQUALS_SIGN:case k.GRAVE_ACCENT:{this._err(ne.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case k.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case k.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case k.NULL:{this._err(ne.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=I.COMMENT_START):this._consumeSequenceIfMatch(fn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(fn.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(fn.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(fn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ne.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case k.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=ft;break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case k.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case k.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===k.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===k.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==k.GREATER_THAN_SIGN&&t!==k.EOF&&this._err(ne.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case k.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case k.HYPHEN_MINUS:{n.data+="-";break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case k.GREATER_THAN_SIGN:{this._err(ne.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case k.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Vs(t))this._createDoctypeToken(String.fromCharCode(Vu(t))),this.state=I.DOCTYPE_NAME;else switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.NULL:{this._err(ne.unexpectedNullCharacter),this._createDoctypeToken(ft),this.state=I.DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.EOF:{this._err(ne.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=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.name+=ft;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Vs(t)?Vu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(fn.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(fn.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ne.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=ft;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.EOF:{this._err(ne.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 k.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=ft;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.EOF:{this._err(ne.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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.QUOTATION_MARK:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=ft;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.EOF:{this._err(ne.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 k.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=ft;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.EOF:{this._err(ne.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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case k.NULL:{this._err(ne.unexpectedNullCharacter);break}case k.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case k.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case k.EOF:{this._err(ne.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===k.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case k.GREATER_THAN_SIGN:{this.state=I.DATA;break}case k.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.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(k.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&H1(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){H1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===k.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const $1=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),V1=new Set([...$1,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),qu=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),JN=new Set([...qu,m.OL,m.UL]),ZN=new Set([...qu,m.BUTTON]),q1=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),Y1=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),eO=new Set([m.TR,m.TEMPLATE,m.HTML]),tO=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),nO=new Set([m.TABLE,m.TEMPLATE,m.HTML]),rO=new Set([m.TD,m.TH]);class iO{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(Ef,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(rO,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(nO,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(tO,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(eO,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(Y1.has(o))return!1;break}case le.MATHML:{if(q1.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,qu)}hasInListItemScope(t){return this.hasInDynamicScope(t,JN)}hasInButtonScope(t){return this.hasInDynamicScope(t,ZN)}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(Ef.has(n))return!0;if(qu.has(n))return!1;break}case le.SVG:{if(Y1.has(n))return!1;break}case le.MATHML:{if(q1.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&&$1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&V1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&V1.has(this.currentTagId);)this.pop()}}const yf=3;var cr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(cr||(cr={}));const W1={type:cr.Marker};class oO{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===cr.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<yf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<yf)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>=yf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(W1)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:cr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:cr.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(W1);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===cr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===cr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===cr.Element&&n.element===t)}}const Kr={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};Kr.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(Kr.isTextNode(n)){n.value+=t;return}}Kr.appendChild(e,Kr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Kr.isTextNode(r)?r.value+=t:Kr.insertBefore(e,Kr.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=B(B({},e.sourceCodeLocation),t)}},G1="html",sO="about:legacy-compat",aO="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",K1=["+//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//"],uO=[...K1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],lO=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Q1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],cO=[...Q1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function X1(e,t){return t.some(n=>e.startsWith(n))}function dO(e){return e.name===G1&&e.publicId===null&&(e.systemId===null||e.systemId===sO)}function fO(e){if(e.name!==G1)return Ln.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===aO)return Ln.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),lO.has(n))return Ln.QUIRKS;let r=t===null?uO:K1;if(X1(n,r))return Ln.QUIRKS;if(r=t===null?Q1:cO,X1(n,r))return Ln.LIMITED_QUIRKS}return Ln.NO_QUIRKS}const J1={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},hO="definitionurl",pO="definitionURL",mO=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])),gO=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}]]),EO=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])),yO=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 bO(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===Li.COLOR||r===Li.SIZE||r===Li.FACE)||yO.has(t)}function Z1(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===hO){e.attrs[t].name=pO;break}}function eE(e){for(let t=0;t<e.attrs.length;t++){const n=mO.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function bf(e){for(let t=0;t<e.attrs.length;t++){const n=gO.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 TO(e){const t=EO.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=So(e.tagName))}function xO(e,t){return t===le.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function wO(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===J1.TEXT_HTML||o===J1.APPLICATION_XML}}return t===le.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function _O(e,t,n,r){return(!r||r===le.HTML)&&wO(e,t,n)||(!r||r===le.MATHML)&&xO(e,t)}const vO="hidden",SO=8,AO=3;var D;(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"})(D||(D={}));const CO={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},tE=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),nE={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Kr,onParseError:null};class rE{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=D.INITIAL,this.originalInsertionMode=D.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=B(B({},nE),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 XN(this.options,this),this.activeFormattingElements=new oO(this.treeAdapter),this.fragmentContextID=r?So(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new iO(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=B(B({},nE),n);t!=null||(t=r.treeAdapter.createElement(Y.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(D.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:CO,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=D.TEXT}switchToPlaintextParsing(){this.insertionMode=D.TEXT,this.originalInsertionMode=D.IN_BODY,this.tokenizer.state=wt.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)===Y.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=wt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=wt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=wt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=wt.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&&ae(B({},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(Y.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===qe.END_TAG&&o===n.tagName?{endTag:B({},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)===Y.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 qe.CHARACTER:{this.onCharacter(t);break}case qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case qe.COMMENT:{this.onComment(t);break}case qe.DOCTYPE:{this.onDoctype(t);break}case qe.START_TAG:{this._processStartTag(t);break}case qe.END_TAG:{this.onEndTag(t);break}case qe.EOF:{this.onEof(t);break}case qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return _O(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===cr.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=D.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=D.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=D.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=D.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=D.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=D.IN_TABLE;return}case m.BODY:{this.insertionMode=D.IN_BODY;return}case m.FRAMESET:{this.insertionMode=D.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?D.AFTER_HEAD:D.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=D.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=D.IN_HEAD;return}break}}this.insertionMode=D.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=D.IN_SELECT_IN_TABLE;return}}this.insertionMode=D.IN_SELECT}_isElementCausesFosterParenting(t){return tE.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 WN[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){rR(this,t);return}switch(this.insertionMode){case D.INITIAL:{qs(this,t);break}case D.BEFORE_HTML:{Ys(this,t);break}case D.BEFORE_HEAD:{Ws(this,t);break}case D.IN_HEAD:{Gs(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Ks(this,t);break}case D.AFTER_HEAD:{Qs(this,t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:{oE(this,t);break}case D.TEXT:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{_f(this,t);break}case D.IN_TABLE_TEXT:{hE(this,t);break}case D.IN_COLUMN_GROUP:{Gu(this,t);break}case D.AFTER_BODY:{Xu(this,t);break}case D.AFTER_AFTER_BODY:{Ju(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){nR(this,t);return}switch(this.insertionMode){case D.INITIAL:{qs(this,t);break}case D.BEFORE_HTML:{Ys(this,t);break}case D.BEFORE_HEAD:{Ws(this,t);break}case D.IN_HEAD:{Gs(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Ks(this,t);break}case D.AFTER_HEAD:{Qs(this,t);break}case D.TEXT:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{_f(this,t);break}case D.IN_COLUMN_GROUP:{Gu(this,t);break}case D.AFTER_BODY:{Xu(this,t);break}case D.AFTER_AFTER_BODY:{Ju(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){xf(this,t);return}switch(this.insertionMode){case D.INITIAL:case D.BEFORE_HTML:case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_TEMPLATE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{xf(this,t);break}case D.IN_TABLE_TEXT:{Zs(this,t);break}case D.AFTER_BODY:{LO(this,t);break}case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{DO(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case D.INITIAL:{MO(this,t);break}case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:{this._err(t,ne.misplacedDoctype);break}case D.IN_TABLE_TEXT:{Zs(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ne.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?iR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{qs(this,t);break}case D.BEFORE_HTML:{FO(this,t);break}case D.BEFORE_HEAD:{UO(this,t);break}case D.IN_HEAD:{Wn(this,t);break}case D.IN_HEAD_NO_SCRIPT:{jO(this,t);break}case D.AFTER_HEAD:{VO(this,t);break}case D.IN_BODY:{Kt(this,t);break}case D.IN_TABLE:{Ao(this,t);break}case D.IN_TABLE_TEXT:{Zs(this,t);break}case D.IN_CAPTION:{HI(this,t);break}case D.IN_COLUMN_GROUP:{vf(this,t);break}case D.IN_TABLE_BODY:{Ku(this,t);break}case D.IN_ROW:{Qu(this,t);break}case D.IN_CELL:{$I(this,t);break}case D.IN_SELECT:{gE(this,t);break}case D.IN_SELECT_IN_TABLE:{qI(this,t);break}case D.IN_TEMPLATE:{WI(this,t);break}case D.AFTER_BODY:{KI(this,t);break}case D.IN_FRAMESET:{QI(this,t);break}case D.AFTER_FRAMESET:{JI(this,t);break}case D.AFTER_AFTER_BODY:{eR(this,t);break}case D.AFTER_AFTER_FRAMESET:{tR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?oR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{qs(this,t);break}case D.BEFORE_HTML:{BO(this,t);break}case D.BEFORE_HEAD:{HO(this,t);break}case D.IN_HEAD:{zO(this,t);break}case D.IN_HEAD_NO_SCRIPT:{$O(this,t);break}case D.AFTER_HEAD:{qO(this,t);break}case D.IN_BODY:{Wu(this,t);break}case D.TEXT:{OI(this,t);break}case D.IN_TABLE:{Xs(this,t);break}case D.IN_TABLE_TEXT:{Zs(this,t);break}case D.IN_CAPTION:{zI(this,t);break}case D.IN_COLUMN_GROUP:{jI(this,t);break}case D.IN_TABLE_BODY:{Sf(this,t);break}case D.IN_ROW:{mE(this,t);break}case D.IN_CELL:{VI(this,t);break}case D.IN_SELECT:{EE(this,t);break}case D.IN_SELECT_IN_TABLE:{YI(this,t);break}case D.IN_TEMPLATE:{GI(this,t);break}case D.AFTER_BODY:{bE(this,t);break}case D.IN_FRAMESET:{XI(this,t);break}case D.AFTER_FRAMESET:{ZI(this,t);break}case D.AFTER_AFTER_BODY:{Ju(this,t);break}}}onEof(t){switch(this.insertionMode){case D.INITIAL:{qs(this,t);break}case D.BEFORE_HTML:{Ys(this,t);break}case D.BEFORE_HEAD:{Ws(this,t);break}case D.IN_HEAD:{Gs(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Ks(this,t);break}case D.AFTER_HEAD:{Qs(this,t);break}case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{dE(this,t);break}case D.TEXT:{II(this,t);break}case D.IN_TABLE_TEXT:{Zs(this,t);break}case D.IN_TEMPLATE:{yE(this,t);break}case D.AFTER_BODY:case D.IN_FRAMESET:case D.AFTER_FRAMESET:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{wf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===k.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 D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.TEXT:case D.IN_COLUMN_GROUP:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{this._insertCharacters(t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:case D.AFTER_BODY:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{iE(this,t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{_f(this,t);break}case D.IN_TABLE_TEXT:{fE(this,t);break}}}}function kO(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):cE(e,t),n}function NO(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 OO(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>=AO;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=IO(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function IO(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 RO(e,t,n){const r=e.treeAdapter.getTagName(t),o=So(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 PO(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 Tf(e,t){for(let n=0;n<SO;n++){const r=kO(e,t);if(!r)break;const o=NO(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=OO(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&RO(e,u,a),PO(e,o,r)}}function xf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function LO(e,t){e._appendCommentNode(t,e.openElements.items[0])}function DO(e,t){e._appendCommentNode(t,e.document)}function wf(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 MO(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ln.QUIRKS:fO(t);dO(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=D.BEFORE_HTML}function qs(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ln.QUIRKS),e.insertionMode=D.BEFORE_HTML,e._processToken(t)}function FO(e,t){t.tagID===m.HTML?(e._insertElement(t,le.HTML),e.insertionMode=D.BEFORE_HEAD):Ys(e,t)}function BO(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&Ys(e,t)}function Ys(e,t){e._insertFakeRootElement(),e.insertionMode=D.BEFORE_HEAD,e._processToken(t)}function UO(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD;break}default:Ws(e,t)}}function HO(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Ws(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Ws(e,t){e._insertFakeElement(Y.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD,e._processToken(t)}function Wn(e,t){switch(t.tagID){case m.HTML:{Kt(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,wt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,wt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=D.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,wt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,wt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=D.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(D.IN_TEMPLATE);break}case m.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:Gs(e,t)}}function zO(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=D.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Gs(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Di(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,ne.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Gs(e,t){e.openElements.pop(),e.insertionMode=D.AFTER_HEAD,e._processToken(t)}function jO(e,t){switch(t.tagID){case m.HTML:{Kt(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,ne.nestedNoscriptInHead);break}default:Ks(e,t)}}function $O(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=D.IN_HEAD;break}case m.BR:{Ks(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Ks(e,t){const n=t.type===qe.EOF?ne.openElementsLeftAfterEof:ne.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=D.IN_HEAD,e._processToken(t)}function VO(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=D.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=D.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,ne.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),Wn(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:Qs(e,t)}}function qO(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Qs(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Qs(e,t){e._insertFakeElement(Y.BODY,m.BODY),e.insertionMode=D.IN_BODY,Yu(e,t)}function Yu(e,t){switch(t.type){case qe.CHARACTER:{oE(e,t);break}case qe.WHITESPACE_CHARACTER:{iE(e,t);break}case qe.COMMENT:{xf(e,t);break}case qe.START_TAG:{Kt(e,t);break}case qe.END_TAG:{Wu(e,t);break}case qe.EOF:{dE(e,t);break}}}function iE(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function oE(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function YO(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function WO(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function GO(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_FRAMESET)}function KO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function QO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ef.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function XO(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function JO(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 ZO(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 eI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=wt.PLAINTEXT}function tI(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 nI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(Tf(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 rI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function iI(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(Tf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function oI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function sI(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=D.IN_TABLE}function sE(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function aE(e){const t=U1(e,Li.TYPE);return t!=null&&t.toLowerCase()===vO}function aI(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),aE(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function uI(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function lI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function cI(e,t){t.tagName=Y.IMG,t.tagID=m.IMG,sE(e,t)}function dI(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=wt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=D.TEXT}function fI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function hI(e,t){e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function uE(e,t){e._switchToTextParsing(t,wt.RAWTEXT)}function pI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===D.IN_TABLE||e.insertionMode===D.IN_CAPTION||e.insertionMode===D.IN_TABLE_BODY||e.insertionMode===D.IN_ROW||e.insertionMode===D.IN_CELL?D.IN_SELECT_IN_TABLE:D.IN_SELECT}function mI(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function gI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function EI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,le.HTML)}function yI(e,t){e._reconstructActiveFormattingElements(),Z1(t),bf(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function bI(e,t){e._reconstructActiveFormattingElements(),eE(t),bf(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function lE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function Kt(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:{rI(e,t);break}case m.A:{nI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{QO(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:{KO(e,t);break}case m.LI:case m.DD:case m.DT:{ZO(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{sE(e,t);break}case m.HR:{lI(e,t);break}case m.RB:case m.RTC:{gI(e,t);break}case m.RT:case m.RP:{EI(e,t);break}case m.PRE:case m.LISTING:{XO(e,t);break}case m.XMP:{fI(e,t);break}case m.SVG:{bI(e,t);break}case m.HTML:{YO(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:{WO(e,t);break}case m.FORM:{JO(e,t);break}case m.NOBR:{iI(e,t);break}case m.MATH:{yI(e,t);break}case m.TABLE:{sI(e,t);break}case m.INPUT:{aI(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{uI(e,t);break}case m.IMAGE:{cI(e,t);break}case m.BUTTON:{tI(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{oI(e,t);break}case m.IFRAME:{hI(e,t);break}case m.SELECT:{pI(e,t);break}case m.OPTION:case m.OPTGROUP:{mI(e,t);break}case m.NOEMBED:case m.NOFRAMES:{uE(e,t);break}case m.FRAMESET:{GO(e,t);break}case m.TEXTAREA:{dI(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?uE(e,t):lE(e,t);break}case m.PLAINTEXT:{eI(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:lE(e,t)}}function TI(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=D.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function xI(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=D.AFTER_BODY,bE(e,t))}function wI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function _I(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 vI(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(Y.P,m.P),e._closePElement()}function SI(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function AI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function CI(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function kI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function NI(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function cE(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 Wu(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:{Tf(e,t);break}case m.P:{vI(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:{wI(e,t);break}case m.LI:{SI(e);break}case m.DD:case m.DT:{AI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{CI(e);break}case m.BR:{NI(e);break}case m.BODY:{TI(e,t);break}case m.HTML:{xI(e,t);break}case m.FORM:{_I(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{kI(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:cE(e,t)}}function dE(e,t){e.tmplInsertionModeStack.length>0?yE(e,t):wf(e,t)}function OI(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 II(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _f(e,t){if(e.openElements.currentTagId!==void 0&&tE.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=D.IN_TABLE_TEXT,t.type){case qe.CHARACTER:{hE(e,t);break}case qe.WHITESPACE_CHARACTER:{fE(e,t);break}}else Js(e,t)}function RI(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_CAPTION}function PI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_COLUMN_GROUP}function LI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,m.COLGROUP),e.insertionMode=D.IN_COLUMN_GROUP,vf(e,t)}function DI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_TABLE_BODY}function MI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,m.TBODY),e.insertionMode=D.IN_TABLE_BODY,Ku(e,t)}function FI(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function BI(e,t){aE(t)?e._appendElement(t,le.HTML):Js(e,t),t.ackSelfClosing=!0}function UI(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ao(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{MI(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{Wn(e,t);break}case m.COL:{LI(e,t);break}case m.FORM:{UI(e,t);break}case m.TABLE:{FI(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{DI(e,t);break}case m.INPUT:{BI(e,t);break}case m.CAPTION:{RI(e,t);break}case m.COLGROUP:{PI(e,t);break}default:Js(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:Js(e,t)}}function Js(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Yu(e,t),e.fosterParentingEnabled=n}function fE(e,t){e.pendingCharacterTokens.push(t)}function hE(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Zs(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Js(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const pE=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function HI(e,t){const n=t.tagID;pE.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_TABLE,Ao(e,t)):Kt(e,t)}function zI(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=D.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:Wu(e,t)}}function vf(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{Wn(e,t);break}default:Gu(e,t)}}function jI(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE);break}case m.TEMPLATE:{Di(e,t);break}case m.COL:break;default:Gu(e,t)}}function Gu(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE,e._processToken(t))}function Ku(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,m.TR),e.insertionMode=D.IN_ROW,Qu(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=D.IN_TABLE,Ao(e,t));break}default:Ao(e,t)}}function Sf(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=D.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D.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 Qu(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=D.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=D.IN_TABLE_BODY,Ku(e,t));break}default:Ao(e,t)}}function mE(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY,Sf(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=D.IN_TABLE_BODY,Sf(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 $I(e,t){const n=t.tagID;pE.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),Qu(e,t)):Kt(e,t)}function VI(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=D.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),mE(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:Wu(e,t)}}function gE(e,t){switch(t.tagID){case m.HTML:{Kt(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 EE(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 qI(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)):gE(e,t)}function YI(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)):EE(e,t)}function WI(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]=D.IN_TABLE,e.insertionMode=D.IN_TABLE,Ao(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=D.IN_COLUMN_GROUP,e.insertionMode=D.IN_COLUMN_GROUP,vf(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=D.IN_TABLE_BODY,e.insertionMode=D.IN_TABLE_BODY,Ku(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=D.IN_ROW,e.insertionMode=D.IN_ROW,Qu(e,t);break}default:e.tmplInsertionModeStack[0]=D.IN_BODY,e.insertionMode=D.IN_BODY,Kt(e,t)}}function GI(e,t){t.tagID===m.TEMPLATE&&Di(e,t)}function yE(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wf(e,t)}function KI(e,t){t.tagID===m.HTML?Kt(e,t):Xu(e,t)}function bE(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=D.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 Xu(e,t)}function Xu(e,t){e.insertionMode=D.IN_BODY,Yu(e,t)}function QI(e,t){switch(t.tagID){case m.HTML:{Kt(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 XI(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=D.AFTER_FRAMESET))}function JI(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{Wn(e,t);break}}}function ZI(e,t){t.tagID===m.HTML&&(e.insertionMode=D.AFTER_AFTER_FRAMESET)}function eR(e,t){t.tagID===m.HTML?Kt(e,t):Ju(e,t)}function Ju(e,t){e.insertionMode=D.IN_BODY,Yu(e,t)}function tR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{Wn(e,t);break}}}function nR(e,t){t.chars=ft,e._insertCharacters(t)}function rR(e,t){e._insertCharacters(t),e.framesetOk=!1}function TE(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 iR(e,t){if(bO(t))TE(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?Z1(t):r===le.SVG&&(TO(t),eE(t)),bf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function oR(e,t){if(t.tagID===m.P||t.tagID===m.BR){TE(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}}}Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR;const sR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,aR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),xE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function wE(e,t){const n=ER(e),r=L1("type",{handlers:{root:uR,element:lR,text:cR,comment:vE,doctype:dR,raw:hR},unknown:pR}),o={parser:n?new rE(xE):rE.getFragmentParser(void 0,xE),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Co(o,ur());const a=n?o.parser.document:o.parser.getFragment(),u=uN(a,{file:o.options.file});return o.stitches&&zu(u,"comment",function(c,d,h){const p=c;if(p.value.stitch&&h&&d!==void 0){const g=h.children;return g[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function _E(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function uR(e,t){_E(e.children,t)}function lR(e,t){mR(e,t),_E(e.children,t),gR(e,t)}function cR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qe.CHARACTER,chars:e.value,location:ea(e)};Co(t,ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function dR(e,t){const n={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ea(e)};Co(t,ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function fR(e,t){t.stitches=!0;const n=yR(e);if("children"in e&&"children"in n){const r=wE({type:"root",children:e.children},t.options);n.children=r.children}vE({type:"comment",value:{stitch:n}},t)}function vE(e,t){const n=e.value,r={type:qe.COMMENT,data:n,location:ea(e)};Co(t,ur(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function hR(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,SE(t,ur(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(sR,"&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 pR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))fR(n,t);else{let r="";throw aR.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 Co(e,t){SE(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=wt.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 SE(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 mR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===wt.PLAINTEXT)return;Co(t,ur(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=_N(ae(B({},e),{children:[]}),{space:o===Ri.svg?"svg":"html"}),u={type:qe.START_TAG,tagName:n,tagID:So(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ea(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function gR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&IN.includes(n)||t.parser.tokenizer.state===wt.PLAINTEXT)return;Co(t,Ou(e));const r={type:qe.END_TAG,tagName:n,tagID:So(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ea(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===wt.RCDATA||t.parser.tokenizer.state===wt.RAWTEXT||t.parser.tokenizer.state===wt.SCRIPT_DATA)&&(t.parser.tokenizer.state=wt.DATA)}function ER(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ea(e){const t=ur(e)||{line:void 0,column:void 0,offset:void 0},n=Ou(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 yR(e){return"children"in e?Ii(ae(B({},e),{children:[]})):Ii(e)}function AE(e){return function(t,n){return wE(t,ae(B({},e),{file:n}))}}const Mi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],CE={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"]},Qr={}.hasOwnProperty;function bR(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},CE),t):CE,stack:[]},o=kE(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function kE(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return TR(e,n);case"doctype":return xR(e,n);case"element":return wR(e,n);case"root":return _R(e,n);case"text":return vR(e,n)}}}function TR(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 ta(a,t),a}}function xR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ta(n,t),n}}function wR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=NE(e,t.children),o=SR(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&&Qr.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 ta(u,t),u}function _R(e,t){const r={type:"root",children:NE(e,t.children)};return ta(r,t),r}function vR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ta(r,t),r}function NE(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=kE(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function SR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Qr.call(r,n)?r[n]:void 0,u=r&&Qr.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(Qr.call(c,h)){const p=c[h];let g=OE(e,RE(a,h),h,p);g==null&&(g=OE(e,RE(u,h),h,p)),g!=null&&(d[h]=g)}if(o&&Qr.call(o,n)){const p=o[n];for(h in p)Qr.call(p,h)&&!Qr.call(d,h)&&(d[h]=p[h])}return d}function OE(e,t,n,r){return t?Array.isArray(r)?AR(e,t,n,r):IE(e,t,n,r):void 0}function AR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=IE(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function IE(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&CR(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 CR(e,t,n){const r=e.schema.protocols&&Qr.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 ta(e,t){const n=hg(t);t.data&&(e.data=Ii(t.data)),n&&(e.position=n)}function RE(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 kR(e){return function(t){return bR(t,e)}}const PE=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return _.jsx("a",ae(B(B({className:$(e,`${M}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},NR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=Nt();return!e&&!t?null:_.jsx("div",{className:$(n,`${M}-disclaimer`),children:t?_.jsx(p1,{rehypePlugins:[AE,kR],components:{ul:({children:r})=>_.jsx("ul",{className:$(n,`${M}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:$(n,`${M}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:$(n,`${M}-li`),children:r}),a:({href:r,title:o,children:a})=>_.jsx(PE,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>_.jsx("img",{className:$(n,`${M}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>_.jsx("p",{className:$(n,`${M}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:$(n,`${M}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:$(n,`${M}-disclaimer-text`),children:e})})},Af=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:o,sessionExpired:a}=Ar(),{globalClassName:u,searchConfig:c}=Nt(),d=ee.useRef(null),h=t||!o&&!a,p=T=>{var x;T.preventDefault();const y=(((x=d.current)==null?void 0:x.value)||"").trim();y&&(d.current.value="",r(y))},g=()=>{r("Can you connect me to a human?")};return _.jsxs("div",{className:$(u,e,`cim-${n}-component`,`${M}-search-bar-wrapper`),children:[_.jsxs("form",{className:$(u,e,`cim-${n}-component`,`${M}-search-bar`),name:`${M}-search-form`,onSubmit:p,children:[_.jsx("input",{className:$(u,e,`cim-${n}-component`,`${M}-search-input`),type:"text",ref:d,placeholder:(c==null?void 0:c.placeholder)||"Ask us anything",name:`${M}-user-input`,disabled:h}),_.jsx(XS,{className:e,globalClassName:u,searchConfig:c,componentType:n,isLoading:h}),_.jsx(ar,{className:$(u,`${M}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:h,onClick:g,icon:_.jsx(zS,{})})]}),_.jsx(NR,{})]})};function OR(e){return mt({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 LE=ee.createContext({isOpen:!1}),Cf=ee.createContext(null),DE=ee.createContext(null),na=()=>{var n,r;const e=ee.useContext(Cf),t=ee.useContext(DE);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},ME=({onClearChat:e,componentType:t})=>{const n=na(),r=()=>{e(),n()};return _.jsxs("button",{className:$(`${M}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(OR,{}),"Clear chat"]})};function IR(e){return e==null?[]:Array.isArray(e)?e:[e]}var RR=(e,...t)=>e.concat(t),PR=(e,...t)=>e.filter(n=>!t.includes(n)),LR=e=>Array.from(new Set(e));function FE(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 DR(e,t,n={}){const{step:r=1,loop:o=!0}=n;return FE(e,t,{step:-r,loop:o})}var MR=e=>Array.isArray(e),BE=e=>e!=null&&typeof e=="object",FR=e=>BE(e)&&!MR(e),Zu=e=>typeof e=="string",ko=e=>typeof e=="function",BR=e=>e==null,UR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),HR=e=>Object.prototype.toString.call(e),UE=Function.prototype.toString,zR=UE.call(Object),jR=e=>{if(!BE(e)||HR(e)!="[object Object]"||qR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=UR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&UE.call(n)==zR},$R=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,VR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,qR=e=>$R(e)||VR(e),YR=e=>e(),WR=()=>{},kf=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function GR(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:KR,max:QR}=Math,XR=e=>Number.isNaN(e),JR=e=>XR(e)?0:e,HE=(e,t,n)=>KR(QR(JR(e),t),n);function Nf(e){if(!jR(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]=Nf(o))}return n}function Of(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function ZR(e,t){if(e==null)throw new Error(t())}function eP(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 tP=Object.defineProperty,nP=(e,t,n)=>t in e?tP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,If=(e,t,n)=>nP(e,typeof t!="symbol"?t+"":t,n),zE=()=>{},el=e=>typeof e=="object"&&e!==null,No=e=>e?"":void 0,jE=e=>e?"true":void 0,rP=1,iP=9,oP=11,Ft=e=>el(e)&&e.nodeType===rP&&typeof e.nodeName=="string",tl=e=>el(e)&&e.nodeType===iP,sP=e=>el(e)&&e===e.window,$E=e=>Ft(e)?e.localName||"":"#document";function aP(e){return["html","body","#document"].includes($E(e))}var uP=e=>el(e)&&e.nodeType!==void 0,Fi=e=>uP(e)&&e.nodeType===oP&&"host"in e,lP=e=>Ft(e)&&e.localName==="input",cP=e=>Ft(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ra(e){if(!e)return!1;const t=e.getRootNode();return Ro(t)===e}var dP=/(textarea|select)/;function fP(e){if(e==null||!Ft(e))return!1;try{return lP(e)&&e.selectionStart!=null||dP.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Oo(e,t){var r;if(!e||!t||!Ft(e)||!Ft(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 dr(e){var t;return tl(e)?e:sP(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function hP(e){return dr(e).documentElement}function Io(e){var t,n,r;return Fi(e)?Io(e.host):tl(e)?(t=e.defaultView)!=null?t:window:Ft(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Ro(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 pP(e){if($E(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fi(e)&&e.host||hP(e);return Fi(t)?t.host:t}function Rf(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),tl(t)||Fi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Pf=new WeakMap;function Po(e){return Pf.has(e)||Pf.set(e,Io(e).getComputedStyle(e)),Pf.get(e)}var Lf=new Set(["menu","listbox","dialog","grid","tree","region"]),mP=e=>Lf.has(e),VE=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function qE(e,t){const n=new Set,r=Rf(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=VE(c);for(const h of d){if(!h||n.has(h))continue;n.add(h);const p=r.getElementById(h);if(p){const g=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(g&&mP(g)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function YE(e,t){const n=Rf(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=VE(c);for(const h of d){if(!h||r.has(h))continue;r.add(h);const p=n.getElementById(h);if(p){const g=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";g&&Lf.has(g)&&!T&&(t(p),o(p))}}}};o(e)}function gP(e){const t=new Set;return YE(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function EP(e){const t=e.getAttribute("role");return!!(t&&Lf.has(t))}function yP(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function bP(e){var t;return yP(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function TP(e){if(!e.id)return!1;const t=Rf(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&EP(e))}var Df=()=>typeof document!="undefined";function xP(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Mf=e=>Df()&&e.test(xP()),wP=e=>Df()&&e.test(navigator.vendor),WE=()=>Df()&&!!navigator.maxTouchPoints,_P=()=>Mf(/^iPhone/i),vP=()=>Mf(/^iPad/i)||Ff()&&navigator.maxTouchPoints>1,nl=()=>_P()||vP(),SP=()=>Ff()||nl(),Ff=()=>Mf(/^Mac/i),AP=()=>SP()&&wP(/apple/i);function CP(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=CP(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var GE=e=>e.button===0,kP=e=>e.button===2||Ff()&&e.ctrlKey&&e.button===0,NP=e=>"touches"in e&&e.touches.length>0,OP={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},KE={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function IP(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=OP[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in KE&&(o=KE[o]),o}function QE(e,t="client"){const n=NP(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Bt=(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)}},XE=e=>Ft(e)&&e.tagName==="IFRAME",RP=/^(audio|video|details)$/;function JE(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var PP=e=>!Number.isNaN(JE(e)),LP=e=>JE(e)<0;function DP(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 ZE(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=DP(d,t);if(h){const p=Array.from(h.querySelectorAll(rl)).filter(n),g=u.get(d);if(g!==void 0){const T=g+1;r.splice(T,0,...p),p.forEach((y,x)=>{u.set(y,T+x)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,T+x)})}o.push(...p)}}return r}var rl="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",ey=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(rl));(n==!0||n=="if-empty"&&o.length===0)&&Ft(e)&&fr(e)&&o.unshift(e);const u=[];for(const c of o)if(fr(c)){if(XE(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...ey(d,{getShadowRoot:r}));continue}u.push(c)}return r?ZE(u,r,fr):u};function fr(e){return!Ft(e)||e.closest("[inert]")?!1:e.matches(rl)&&cP(e)}function Lo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(rl));n&&Bi(e)&&o.unshift(e);const a=[];for(const u of o)if(Bi(u)){if(XE(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Lo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=ZE(a,r,Bi);return!u.length&&n?o:u}return!a.length&&n?o:a}function Bi(e){return Ft(e)&&e.tabIndex>0?!0:fr(e)&&!LP(e)}function MP(e,t={}){const n=Lo(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function FP(e,t={}){const{current:n,getShadowRoot:r}=t,o=Lo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Ro(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function ia(e){return e.tabIndex<0&&(RP.test(e.localName)||fP(e))&&!PP(e)?0:e.tabIndex}function ty(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=Lo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var BP=class n2{constructor(){If(this,"id",null),If(this,"fn_cleanup"),If(this,"cleanup",()=>{this.cancel()})}static create(){return new n2}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 Ot(e){const t=BP.create();return t.request(e),t.cleanup}function ny(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 Bf(e){const t=pP(e);return aP(t)?dr(t).body:Ft(t)&&zP(t)?t:Bf(t)}var UP=/auto|scroll|overlay|hidden|clip/,HP=new Set(["inline","contents"]);function zP(e){const t=Io(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return UP.test(n+o+r)&&!HP.has(a)}var Do="default",Uf="",il=new WeakMap;function jP(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return nl()?(Do==="default"&&(Uf=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Do="disabled"):t&&(il.set(t,t.style.userSelect),t.style.userSelect="none"),()=>$P({target:t,doc:r})}function $P(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(nl()){if(Do!=="disabled")return;Do="restoring",setTimeout(()=>{ny(()=>{Do==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Uf||""),Uf="",Do="default")})},300)}else if(t&&il.has(t)){const a=il.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),il.delete(t)}}function VP(e={}){const u=e,{defer:t,target:n}=u,r=sn(u,["defer","target"]),o=t?Ot:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(jP(ae(B({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function qP(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=QE(c),h=Math.sqrt(nu(d.x,2)+nu(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=QE(c);r({point:d,event:c})},u=[Bt(e,"pointermove",o,!1),Bt(e,"pointerup",a,!1),Bt(e,"pointercancel",a,!1),Bt(e,"contextmenu",a,!1),VP({doc:e})];return()=>{u.forEach(c=>c())}}function YP(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[g,T]=MP(e,{includeContainer:!0,getShadowRoot:a}),y=FP(c,{current:n,getShadowRoot:a}),x=!g&&!T;h.shiftKey&&ra(y)?(o==null||o(),p=T):h.shiftKey&&(ra(g)||x)?p=n:!h.shiftKey&&ra(n)?(o==null||o(),p=g):!h.shiftKey&&(ra(T)||x)&&(p=y),p&&(h.preventDefault(),typeof r=="function"?r(p):p.focus())}return Bt(u,"keydown",d,!0)}function WP(e,t){const c=t,{defer:n,triggerElement:r}=c,o=sn(c,["defer","triggerElement"]),a=n?Ot:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(YP(d,B({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function GP(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function ol(e,t){if(!e)return zE;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 KP(e,t,n){if(!e)return zE;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 QP(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 XP(e,t){const{timeout:n,rootNode:r}=t,o=Io(r),a=dr(r),u=new o.AbortController;return QP(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 JP=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),ZP=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,ry=e=>{const t={};let n;for(;n=ZP.exec(e);)t[n[1]]=n[2];return t},e4=(e,t)=>{if(Zu(e)){if(Zu(t))return`${e};${t}`;e=ry(e)}else Zu(t)&&(t=ry(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function It(...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]=kf(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=JP(t[o],n[o]);continue}if(o==="style"){t[o]=e4(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 AF(e){return e}var Mo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Mo||{}),Hf="__init__";function t4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>dr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Ro(t()),a=u=>t().getElementById(u);return ae(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:ra,getById:a})}function n4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Fo=()=>e=>Array.from(new Set(e)),iy=typeof globalThis.document!="undefined"?ee.useLayoutEffect:ee.useEffect;function sl(e){var g,T;const t=(g=e().value)!=null?g:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=ee.useState(t),[o,a]=ee.useState(r),u=e().value!==void 0,c=ee.useRef(o);c.current=u?e().value:o;const d=ee.useRef(c.current);iy(()=>{d.current=c.current},[o,e().value]);const h=y=>{var A,C;const x=d.current,S=ko(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:x}),u||a(S),n(S,x)||(C=(A=e()).onChange)==null||C.call(A,S,x)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Os.flushSync:YR)(()=>h(y))},invoke(y,x){var S,A;(A=(S=e()).onChange)==null||A.call(S,y,x)},hash(y){var x,S,A;return(A=(S=(x=e()).hash)==null?void 0:S.call(x,y))!=null?A:String(y)}}}sl.cleanup=e=>{ee.useEffect(()=>e,[])},sl.ref=e=>{const t=ee.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function r4(e){const t=ee.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var i4=(e,t)=>{const n=ee.useRef(!1),r=ee.useRef(!1);ee.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),ee.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function al(e,t={}){var X,se,J,re,fe,ke;const n=ee.useMemo(()=>{const{id:he,ids:Q,getRootNode:oe}=t;return t4({id:he,ids:Q,getRootNode:oe})},[t]),r=(...he)=>{e.debug&&console.log(...he)},o=(se=(X=e.props)==null?void 0:X.call(e,{props:Nf(t),scope:n}))!=null?se:t,a=o4(o),u=(J=e.context)==null?void 0:J.call(e,{prop:a,bindable:sl,scope:n,flush:sy,getContext(){return d},getComputed(){return W},getRefs(){return S},getEvent(){return y()}}),c=oy(u),d={get(he){var Q;return(Q=c.current)==null?void 0:Q[he].ref.current},set(he,Q){var oe;(oe=c.current)==null||oe[he].set(Q)},initial(he){var Q;return(Q=c.current)==null?void 0:Q[he].initial},hash(he){var oe,v;const Q=(oe=c.current)==null?void 0:oe[he].get();return(v=c.current)==null?void 0:v[he].hash(Q)}},h=ee.useRef(new Map),p=ee.useRef(null),g=ee.useRef(null),T=ee.useRef({type:""}),y=()=>ae(B({},T.current),{current(){return T.current},previous(){return g.current}}),x=()=>ae(B({},F),{matches(...he){return he.includes(F.ref.current)},hasTag(he){var Q,oe;return!!((oe=(Q=e.states[F.ref.current])==null?void 0:Q.tags)!=null&&oe.includes(he))}}),S=r4((fe=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?fe:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:z,action:C,guard:O,track:i4,refs:S,computed:W,flush:sy,scope:n,choose:H}),C=he=>{const Q=ko(he)?he(A()):he;if(!Q)return;const oe=Q.map(v=>{var Z,N;const P=(N=(Z=e.implementations)==null?void 0:Z.actions)==null?void 0:N[v];return P||Of(`[zag-js] No implementation found for action "${JSON.stringify(v)}"`),P});for(const v of oe)v==null||v(A())},O=he=>{var Q,oe;return ko(he)?he(A()):(oe=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:oe[he](A())},R=he=>{const Q=ko(he)?he(A()):he;if(!Q)return;const oe=Q.map(P=>{var N,xe;const Z=(xe=(N=e.implementations)==null?void 0:N.effects)==null?void 0:xe[P];return Z||Of(`[zag-js] No implementation found for effect "${JSON.stringify(P)}"`),Z}),v=[];for(const P of oe){const Z=P==null?void 0:P(A());Z&&v.push(Z)}return()=>v.forEach(P=>P==null?void 0:P())},H=he=>IR(he).find(Q=>{let oe=!Q.guard;return Zu(Q.guard)?oe=!!O(Q.guard):ko(Q.guard)&&(oe=Q.guard(A())),oe}),W=he=>{ZR(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[he];return Q({context:d,event:y(),prop:a,refs:S,scope:n,computed:W})},F=sl(()=>({defaultValue:e.initialState({prop:a}),onChange(he,Q){var v,P,Z,N;if(Q){const xe=h.current.get(Q);xe==null||xe(),h.current.delete(Q)}Q&&C((v=e.states[Q])==null?void 0:v.exit),C((P=p.current)==null?void 0:P.actions);const oe=R((Z=e.states[he])==null?void 0:Z.effects);if(oe&&h.current.set(he,oe),Q===Hf){C(e.entry);const xe=R(e.effects);xe&&h.current.set(Hf,xe)}C((N=e.states[he])==null?void 0:N.entry)}})),K=ee.useRef(void 0),ce=ee.useRef(Mo.NotStarted);iy(()=>{queueMicrotask(()=>{var P;const oe=ce.current===Mo.Started;ce.current=Mo.Started,r(oe?"rehydrating...":"initializing...");const v=(P=K.current)!=null?P:F.initial;F.invoke(v,oe?F.get():Hf)});const he=h.current,Q=F.ref.current;return()=>{r("unmounting..."),K.current=Q,ce.current=Mo.Stopped,he.forEach(oe=>oe==null?void 0:oe()),h.current=new Map,p.current=null,queueMicrotask(()=>{C(e.exit)})}},[]);const be=()=>"ref"in F?F.ref.current:F.get(),z=he=>{queueMicrotask(()=>{var N,xe,Re,Oe,Be;if(ce.current!==Mo.Started)return;g.current=T.current,T.current=he;let Q=be();const oe=(Re=(N=e.states[Q].on)==null?void 0:N[he.type])!=null?Re:(xe=e.on)==null?void 0:xe[he.type],v=H(oe);if(!v)return;p.current=v;const P=(Oe=v.target)!=null?Oe:Q;r("transition",he.type,v.target||Q,`(${v.actions})`);const Z=P!==Q;Z?Os.flushSync(()=>F.set(P)):v.reenter&&!Z?F.invoke(Q,Q):C((Be=v.actions)!=null?Be:[])})};return(ke=e.watch)==null||ke.call(e,A()),{state:x(),send:z,context:d,prop:a,scope:n,refs:S,computed:W,event:y(),getStatus:()=>ce.current}}function oy(e){const t=ee.useRef(e);return t.current=e,t}function o4(e){const t=oy(e);return function(r){return t.current[r]}}function sy(e){queueMicrotask(()=>{Os.flushSync(()=>e())})}var zf=n4(e=>e);function ul(...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 s4(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 jf=e=>{const t=ee.memo(ee.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=sn(h,["asChild","children"]);if(!o)return ee.createElement(e,ae(B({},u),{ref:r}),a);if(!ee.isValidElement(a))return null;const c=ee.Children.only(a),d=s4(c);return ee.cloneElement(c,ae(B({},It(u,c.props)),{ref:r?ul(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Qt=(()=>{const e=new Map;return new Proxy(jf,{apply(t,n,r){return jf(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,jf(r)),e.get(r)}})})();function a4(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=ee.createContext(u);c.displayName=t;function d(){var p;const h=ee.useContext(c);if(!h&&n){const g=new Error(a!=null?a:a4(r,o));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return h}return[c.Provider,d,c]}const[u4,$f]=Ui({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[ay,oa]=Ui({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),uy=ee.forwardRef((e,t)=>{const n=$f(),r=oa(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Qt.div,ae(B({},o),{ref:ul(r.ref,t)}))});uy.displayName="PopoverContent";const ly=ee.forwardRef((e,t)=>{const n=$f(),r=oa(),o=It(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(Qt.div,ae(B({},o),{ref:t}))});ly.displayName="PopoverPositioner";const sa=()=>(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]},[{},B({},e)]),cy=e=>sa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function l4(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 c4={props({props:e}){return ae(B({},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",Po(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"});Ot(()=>{var c,d;const u=ll(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})=>{Ot(()=>{e.set("prevAnimationName",ll(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,g,T;((T=(g=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:g[0])!=null?T:d.target)===o&&e.set("prevAnimationName",ll(t.get("styles")))},u=d=>{const h=ll(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=ol(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),ny(()=>c())}}}}};function ll(e){return(e==null?void 0:e.animationName)||"none"}Fo()(["onExitComplete","present","immediate"]);function d4(e,t={}){const{sync:n=!1}=t,r=f4(e);return ee.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 f4(e){const t=ee.useRef(e);return t.current=e,t}const Vf=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=sn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=ee.useRef(!1),c=ae(B({},a),{present:r,onExitComplete:d4(e.onExitComplete)}),d=al(c4,c),h=l4(d);h.present&&(u.current=!0);const p=!h.present&&!u.current&&t||n&&!h.present&&u.current,g=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:g,present:h.present,unmounted:p}};var Hi=(e,t=[])=>({parts:(...n)=>{if(h4(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="${Bo(e)}"][data-part="${Bo(r)}"]`,`& [data-scope="${Bo(e)}"][data-part="${Bo(r)}"]`].join(", "),attrs:{"data-scope":Bo(e),"data-part":Bo(r)}}}),{})}),Bo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),h4=e=>e.length===0;const p4=["top","right","bottom","left"],Xr=Math.min,_n=Math.max,cl=Math.round,dl=Math.floor,hr=e=>({x:e,y:e}),m4={left:"right",right:"left",bottom:"top",top:"bottom"},g4={start:"end",end:"start"};function qf(e,t,n){return _n(e,Xr(t,n))}function kr(e,t){return typeof e=="function"?e(t):e}function Nr(e){return e.split("-")[0]}function Uo(e){return e.split("-")[1]}function Yf(e){return e==="x"?"y":"x"}function Wf(e){return e==="y"?"height":"width"}const E4=new Set(["top","bottom"]);function pr(e){return E4.has(Nr(e))?"y":"x"}function Gf(e){return Yf(pr(e))}function y4(e,t,n){n===void 0&&(n=!1);const r=Uo(e),o=Gf(e),a=Wf(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=fl(u)),[u,fl(u)]}function b4(e){const t=fl(e);return[Kf(e),t,Kf(t)]}function Kf(e){return e.replace(/start|end/g,t=>g4[t])}const dy=["left","right"],fy=["right","left"],T4=["top","bottom"],x4=["bottom","top"];function w4(e,t,n){switch(e){case"top":case"bottom":return n?t?fy:dy:t?dy:fy;case"left":case"right":return t?T4:x4;default:return[]}}function _4(e,t,n,r){const o=Uo(e);let a=w4(Nr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Kf)))),a}function fl(e){return e.replace(/left|right|bottom|top/g,t=>m4[t])}function v4(e){return B({top:0,right:0,bottom:0,left:0},e)}function hy(e){return typeof e!="number"?v4(e):{top:e,right:e,bottom:e,left:e}}function hl(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 py(e,t,n){let{reference:r,floating:o}=e;const a=pr(t),u=Gf(t),c=Wf(u),d=Nr(t),h=a==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-o.width,y:g};break;default:y={x:r.x,y:r.y}}switch(Uo(t)){case"start":y[u]-=T*(n&&h?-1:1);break;case"end":y[u]+=T*(n&&h?-1:1);break}return y}const S4=(e,t,n)=>Ve(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:g}=py(h,r,d),T=r,y={},x=0;for(let S=0;S<c.length;S++){const{name:A,fn:C}=c[S],{x:O,y:R,data:H,reset:W}=yield C({x:p,y:g,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});p=O!=null?O:p,g=R!=null?R:g,y=ae(B({},y),{[A]:B(B({},y[A]),H)}),W&&x<=50&&(x++,typeof W=="object"&&(W.placement&&(T=W.placement),W.rects&&(h=W.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):W.rects),{x:p,y:g}=py(h,T,d)),S=-1)}return{x:p,y:g,placement:T,strategy:o,middlewareData:y}});function aa(e,t){return Ve(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:g="floating",altBoundary:T=!1,padding:y=0}=kr(t,e),x=hy(y),A=c[T?g==="floating"?"reference":"floating":g],C=hl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),O=g==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,R=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),H=(yield a.isElement==null?void 0:a.isElement(R))?(yield a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},W=hl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:O,offsetParent:R,strategy:d}):O);return{top:(C.top-W.top+x.top)/H.y,bottom:(W.bottom-C.bottom+x.bottom)/H.y,left:(C.left-W.left+x.left)/H.x,right:(W.right-C.right+x.right)/H.x}})}const A4=e=>({name:"arrow",options:e,fn(n){return Ve(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:p,padding:g=0}=kr(e,n)||{};if(p==null)return{};const T=hy(g),y={x:r,y:o},x=Gf(a),S=Wf(x),A=yield c.getDimensions(p),C=x==="y",O=C?"top":"left",R=C?"bottom":"right",H=C?"clientHeight":"clientWidth",W=u.reference[S]+u.reference[x]-y[x]-u.floating[S],F=y[x]-u.reference[x],K=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ce=K?K[H]:0;(!ce||!(yield c.isElement==null?void 0:c.isElement(K)))&&(ce=d.floating[H]||u.floating[S]);const be=W/2-F/2,z=ce/2-A[S]/2-1,X=Xr(T[O],z),se=Xr(T[R],z),J=X,re=ce-A[S]-se,fe=ce/2-A[S]/2+be,ke=qf(J,fe,re),he=!h.arrow&&Uo(a)!=null&&fe!==ke&&u.reference[S]/2-(fe<J?X:se)-A[S]/2<0,Q=he?fe<J?fe-J:fe-re:0;return{[x]:y[x]+Q,data:B({[x]:ke,centerOffset:fe-ke-Q},he&&{alignmentOffset:Q}),reset:he}})}}),C4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ve(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:p}=n,fe=kr(e,n),{mainAxis:g=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:A=!0}=fe,C=sn(fe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const O=Nr(a),R=pr(d),H=Nr(d)===d,W=yield h.isRTL==null?void 0:h.isRTL(p.floating),F=y||(H||!A?[fl(d)]:b4(d)),K=S!=="none";!y&&K&&F.push(..._4(d,A,S,W));const ce=[d,...F],be=yield aa(n,C),z=[];let X=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&z.push(be[O]),T){const ke=y4(a,c,W);z.push(be[ke[0]],be[ke[1]])}if(X=[...X,{placement:a,overflows:z}],!z.every(ke=>ke<=0)){var se,J;const ke=(((se=u.flip)==null?void 0:se.index)||0)+1,he=ce[ke];if(he&&(!(T==="alignment"?R!==pr(he):!1)||X.every(v=>pr(v.placement)===R?v.overflows[0]>0:!0)))return{data:{index:ke,overflows:X},reset:{placement:he}};let Q=(J=X.filter(oe=>oe.overflows[0]<=0).sort((oe,v)=>oe.overflows[1]-v.overflows[1])[0])==null?void 0:J.placement;if(!Q)switch(x){case"bestFit":{var re;const oe=(re=X.filter(v=>{if(K){const P=pr(v.placement);return P===R||P==="y"}return!0}).map(v=>[v.placement,v.overflows.filter(P=>P>0).reduce((P,Z)=>P+Z,0)]).sort((v,P)=>v[1]-P[1])[0])==null?void 0:re[0];oe&&(Q=oe);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function my(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gy(e){return p4.some(t=>e[t]>=0)}const k4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ve(this,null,function*(){const{rects:r}=n,u=kr(e,n),{strategy:o="referenceHidden"}=u,a=sn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield aa(n,ae(B({},a),{elementContext:"reference"})),d=my(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:gy(d)}}}case"escaped":{const c=yield aa(n,ae(B({},a),{altBoundary:!0})),d=my(c,r.floating);return{data:{escapedOffsets:d,escaped:gy(d)}}}default:return{}}})}}},Ey=new Set(["left","top"]);function N4(e,t){return Ve(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Nr(n),c=Uo(n),d=pr(n)==="y",h=Ey.has(u)?-1:1,p=a&&d?-1:1,g=kr(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof x=="number"&&(y=c==="end"?x*-1:x),d?{x:y*p,y:T*h}:{x:T*h,y:y*p}})}const O4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ve(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield N4(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:ae(B({},h),{placement:c})}})}}},I4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ve(this,null,function*(){const{x:r,y:o,placement:a}=n,C=kr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:O=>{let{x:R,y:H}=O;return{x:R,y:H}}}}=C,h=sn(C,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},g=yield aa(n,h),T=pr(Nr(a)),y=Yf(T);let x=p[y],S=p[T];if(u){const O=y==="y"?"top":"left",R=y==="y"?"bottom":"right",H=x+g[O],W=x-g[R];x=qf(H,x,W)}if(c){const O=T==="y"?"top":"left",R=T==="y"?"bottom":"right",H=S+g[O],W=S-g[R];S=qf(H,S,W)}const A=d.fn(ae(B({},n),{[y]:x,[T]:S}));return ae(B({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[y]:u,[T]:c}}})})}}},R4=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}=kr(e,t),p={x:n,y:r},g=pr(o),T=Yf(g);let y=p[T],x=p[g];const S=kr(c,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:B({mainAxis:0,crossAxis:0},S);if(d){const R=T==="y"?"height":"width",H=a.reference[T]-a.floating[R]+A.mainAxis,W=a.reference[T]+a.reference[R]-A.mainAxis;y<H?y=H:y>W&&(y=W)}if(h){var C,O;const R=T==="y"?"width":"height",H=Ey.has(Nr(o)),W=a.reference[g]-a.floating[R]+(H&&((C=u.offset)==null?void 0:C[g])||0)+(H?0:A.crossAxis),F=a.reference[g]+a.reference[R]+(H?0:((O=u.offset)==null?void 0:O[g])||0)-(H?A.crossAxis:0);x<W?x=W:x>F&&(x=F)}return{[T]:y,[g]:x}}}},P4=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ve(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,X=kr(e,n),{apply:h=()=>{}}=X,p=sn(X,["apply"]),g=yield aa(n,p),T=Nr(a),y=Uo(a),x=pr(a)==="y",{width:S,height:A}=u.floating;let C,O;T==="top"||T==="bottom"?(C=T,O=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(O=T,C=y==="end"?"top":"bottom");const R=A-g.top-g.bottom,H=S-g.left-g.right,W=Xr(A-g[C],R),F=Xr(S-g[O],H),K=!n.middlewareData.shift;let ce=W,be=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(be=H),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ce=R),K&&!y){const se=_n(g.left,0),J=_n(g.right,0),re=_n(g.top,0),fe=_n(g.bottom,0);x?be=S-2*(se!==0||J!==0?se+J:_n(g.left,g.right)):ce=A-2*(re!==0||fe!==0?re+fe:_n(g.top,g.bottom))}yield h(ae(B({},n),{availableWidth:be,availableHeight:ce}));const z=yield c.getDimensions(d.floating);return S!==z.width||A!==z.height?{reset:{rects:!0}}:{}})}}};function pl(){return typeof window!="undefined"}function Ho(e){return yy(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mr(e){var t;return(t=(yy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yy(e){return pl()?e instanceof Node||e instanceof vn(e).Node:!1}function Kn(e){return pl()?e instanceof Element||e instanceof vn(e).Element:!1}function gr(e){return pl()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function by(e){return!pl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}const L4=new Set(["inline","contents"]);function ua(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!L4.has(o)}const D4=new Set(["table","td","th"]);function M4(e){return D4.has(Ho(e))}const F4=[":popover-open",":modal"];function ml(e){return F4.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const B4=["transform","translate","scale","rotate","perspective"],U4=["transform","translate","scale","rotate","perspective","filter"],H4=["paint","layout","strict","content"];function Qf(e){const t=Xf(),n=Kn(e)?Qn(e):e;return B4.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)||U4.some(r=>(n.willChange||"").includes(r))||H4.some(r=>(n.contain||"").includes(r))}function z4(e){let t=Jr(e);for(;gr(t)&&!zo(t);){if(Qf(t))return t;if(ml(t))return null;t=Jr(t)}return null}function Xf(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const j4=new Set(["html","body","#document"]);function zo(e){return j4.has(Ho(e))}function Qn(e){return vn(e).getComputedStyle(e)}function gl(e){return Kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jr(e){if(Ho(e)==="html")return e;const t=e.assignedSlot||e.parentNode||by(e)&&e.host||mr(e);return by(t)?t.host:t}function Ty(e){const t=Jr(e);return zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:gr(t)&&ua(t)?t:Ty(t)}function la(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ty(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=vn(o);if(a){const c=Jf(u);return t.concat(u,u.visualViewport||[],ua(o)?o:[],c&&n?la(c):[])}return t.concat(o,la(o,[],n))}function Jf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xy(e){const t=Qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=gr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=cl(n)!==a||cl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Zf(e){return Kn(e)?e:e.contextElement}function jo(e){const t=Zf(e);if(!gr(t))return hr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=xy(t);let u=(a?cl(n.width):n.width)/r,c=(a?cl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const $4=hr(0);function wy(e){const t=vn(e);return!Xf()||!t.visualViewport?$4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function V4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function zi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Zf(e);let u=hr(1);t&&(r?Kn(r)&&(u=jo(r)):u=jo(e));const c=V4(a,n,r)?wy(a):hr(0);let d=(o.left+c.x)/u.x,h=(o.top+c.y)/u.y,p=o.width/u.x,g=o.height/u.y;if(a){const T=vn(a),y=r&&Kn(r)?vn(r):r;let x=T,S=Jf(x);for(;S&&r&&y!==x;){const A=jo(S),C=S.getBoundingClientRect(),O=Qn(S),R=C.left+(S.clientLeft+parseFloat(O.paddingLeft))*A.x,H=C.top+(S.clientTop+parseFloat(O.paddingTop))*A.y;d*=A.x,h*=A.y,p*=A.x,g*=A.y,d+=R,h+=H,x=vn(S),S=Jf(x)}}return hl({width:p,height:g,x:d,y:h})}function El(e,t){const n=gl(e).scrollLeft;return t?t.left+n:zi(mr(e)).left+n}function _y(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-El(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function q4(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=mr(r),c=t?ml(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=hr(1);const p=hr(0),g=gr(r);if((g||!g&&!a)&&((Ho(r)!=="body"||ua(u))&&(d=gl(r)),gr(r))){const y=zi(r);h=jo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!g&&!a?_y(u,d):hr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+T.x,y:n.y*h.y-d.scrollTop*h.y+p.y+T.y}}function Y4(e){return Array.from(e.getClientRects())}function W4(e){const t=mr(e),n=gl(e),r=e.ownerDocument.body,o=_n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+El(e);const c=-n.scrollTop;return Qn(r).direction==="rtl"&&(u+=_n(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const vy=25;function G4(e,t){const n=vn(e),r=mr(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=Xf();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const h=El(r);if(h<=0){const p=r.ownerDocument,g=p.body,T=getComputedStyle(g),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,x=Math.abs(r.clientWidth-g.clientWidth-y);x<=vy&&(a-=x)}else h<=vy&&(a+=h);return{width:a,height:u,x:c,y:d}}const K4=new Set(["absolute","fixed"]);function Q4(e,t){const n=zi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=gr(e)?jo(e):hr(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 Sy(e,t,n){let r;if(t==="viewport")r=G4(e,n);else if(t==="document")r=W4(mr(e));else if(Kn(t))r=Q4(t,n);else{const o=wy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return hl(r)}function Ay(e,t){const n=Jr(e);return n===t||!Kn(n)||zo(n)?!1:Qn(n).position==="fixed"||Ay(n,t)}function X4(e,t){const n=t.get(e);if(n)return n;let r=la(e,[],!1).filter(c=>Kn(c)&&Ho(c)!=="body"),o=null;const a=Qn(e).position==="fixed";let u=a?Jr(e):e;for(;Kn(u)&&!zo(u);){const c=Qn(u),d=Qf(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&K4.has(o.position)||ua(u)&&!d&&Ay(e,u))?r=r.filter(p=>p!==u):o=c,u=Jr(u)}return t.set(e,r),r}function J4(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?ml(t)?[]:X4(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,p)=>{const g=Sy(t,p,o);return h.top=_n(g.top,h.top),h.right=Xr(g.right,h.right),h.bottom=Xr(g.bottom,h.bottom),h.left=_n(g.left,h.left),h},Sy(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Z4(e){const{width:t,height:n}=xy(e);return{width:t,height:n}}function e6(e,t,n){const r=gr(t),o=mr(t),a=n==="fixed",u=zi(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=hr(0);function h(){d.x=El(o)}if(r||!r&&!a)if((Ho(t)!=="body"||ua(o))&&(c=gl(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?_y(o,c):hr(0),g=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:g,y:T,width:u.width,height:u.height}}function eh(e){return Qn(e).position==="static"}function Cy(e,t){if(!gr(e)||Qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return mr(e)===n&&(n=n.ownerDocument.body),n}function ky(e,t){const n=vn(e);if(ml(e))return n;if(!gr(e)){let o=Jr(e);for(;o&&!zo(o);){if(Kn(o)&&!eh(o))return o;o=Jr(o)}return n}let r=Cy(e,t);for(;r&&M4(r)&&eh(r);)r=Cy(r,t);return r&&zo(r)&&eh(r)&&!Qf(r)?n:r||z4(e)||n}const t6=function(e){return Ve(this,null,function*(){const t=this.getOffsetParent||ky,n=this.getDimensions,r=yield n(e.floating);return{reference:e6(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function n6(e){return Qn(e).direction==="rtl"}const r6={convertOffsetParentRelativeRectToViewportRelativeRect:q4,getDocumentElement:mr,getClippingRect:J4,getOffsetParent:ky,getElementRects:t6,getClientRects:Y4,getDimensions:Z4,getScale:jo,isElement:Kn,isRTL:n6};function Ny(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function i6(e,t){let n=null,r;const o=mr(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:g,width:T,height:y}=h;if(c||t(),!T||!y)return;const x=dl(g),S=dl(o.clientWidth-(p+T)),A=dl(o.clientHeight-(g+y)),C=dl(p),R={rootMargin:-x+"px "+-S+"px "+-A+"px "+-C+"px",threshold:_n(0,Xr(1,d))||1};let H=!0;function W(F){const K=F[0].intersectionRatio;if(K!==d){if(!H)return u();K?u(!1,K):r=setTimeout(()=>{u(!1,1e-7)},1e3)}K===1&&!Ny(h,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(W,ae(B({},R),{root:o.ownerDocument}))}catch(F){n=new IntersectionObserver(W,R)}n.observe(e)}return u(!0),a}function o6(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=Zf(e),p=o||a?[...h?la(h):[],...la(t)]:[];p.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),a&&C.addEventListener("resize",n)});const g=h&&c?i6(h,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(C=>{let[O]=C;O&&O.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var R;(R=y)==null||R.observe(t)})),n()}),h&&!d&&y.observe(h),y.observe(t));let x,S=d?zi(e):null;d&&A();function A(){const C=zi(e);S&&!Ny(S,C)&&n(),S=C,x=requestAnimationFrame(A)}return n(),()=>{var C;p.forEach(O=>{o&&O.removeEventListener("scroll",n),a&&O.removeEventListener("resize",n)}),g==null||g(),(C=y)==null||C.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const s6=O4,a6=I4,u6=C4,l6=P4,c6=k4,d6=A4,f6=R4,h6=(e,t,n)=>{const r=new Map,o=B({platform:r6},n),a=ae(B({},o.platform),{_c:r});return S4(e,t,ae(B({},o),{platform:a}))};function Oy(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 ae(B({},o),{toJSON:()=>o})}function p6(e){if(!e)return Oy();const{x:t,y:n,width:r,height:o}=e;return Oy(t,n,r,o)}function m6(e,t){return{contextElement:Ft(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?p6(r):n.getBoundingClientRect()}}}var ca=e=>({variable:e,reference:`var(${e})`}),Or={arrowSize:ca("--arrow-size"),arrowSizeHalf:ca("--arrow-size-half"),arrowBg:ca("--arrow-background"),transformOrigin:ca("--transform-origin"),arrowOffset:ca("--arrow-offset")},g6=e=>e==="top"||e==="bottom"?"y":"x";function E6(e,t){return{name:"transformOrigin",fn(n){var be,z,X,se,J;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=g6(d),p=((be=o.arrow)==null?void 0:be.x)||0,g=((z=o.arrow)==null?void 0:z.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+T/2,S=g+y/2,A=Math.abs(((X=o.shift)==null?void 0:X.y)||0),C=u.reference.height/2,O=y/2,R=(J=(se=e.offset)==null?void 0:se.mainAxis)!=null?J:e.gutter,H=typeof R=="number"?R+O:R!=null?R:O,W=A>H,F={top:`${x}px calc(100% + ${H}px)`,bottom:`${x}px ${-H}px`,left:`calc(100% + ${H}px) ${S}px`,right:`${-H}px ${S}px`}[d],K=`${x}px ${u.reference.y+C-c}px`,ce=!!e.overlap&&h==="y"&&W;return r.floating.style.setProperty(Or.transformOrigin.variable,ce?K:F),{data:{transformOrigin:ce?K:F}}}}}var y6={name:"rects",fn({rects:e}){return{data:e}}},b6=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% + ${Or.arrowOffset.reference})`}),{}}}};function T6(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var x6={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Iy(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function th(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function w6(e,t,n){const r=e||t.createElement("div");return d6({element:r,padding:n.arrowPadding})}function _6(e,t){var n;if(!BR((n=t.offset)!=null?n:t.gutter))return s6(({placement:r})=>{var p,g,T,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(g=(p=t.offset)==null?void 0:p.mainAxis)!=null?g:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=T6(r),d=c?void 0:t.shift,h=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Nf({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function v6(e){if(!e.flip)return;const t=th(e.boundary);return u6(ae(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function S6(e){if(!e.slide&&!e.overlap)return;const t=th(e.boundary);return a6(ae(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:f6()}))}function A6(e){return l6({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 C6(e){var t;if(e.hideWhenDetached)return c6({strategy:"referenceHidden",boundary:(t=th(e.boundary))!=null?t:"clippingAncestors"})}function k6(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function N6(e,t,n={}){const r=m6(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},x6,n),a=t.querySelector("[data-part=arrow]"),u=[_6(a,o),v6(o),S6(o),w6(a,t.ownerDocument,o),b6(a),E6({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),A6(o),C6(o),y6],{placement:c,strategy:d,onComplete:h,onPositioned:p}=o,g=()=>Ve(null,null,function*(){var H;if(!r||!t)return;const S=yield h6(r,t,{placement:c,middleware:u,strategy:d});h==null||h(S),p==null||p({placed:!0});const A=Io(t),C=Iy(A,S.x),O=Iy(A,S.y);t.style.setProperty("--x",`${C}px`),t.style.setProperty("--y",`${O}px`),o.hideWhenDetached&&(((H=S.middlewareData.hide)==null?void 0:H.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const R=t.firstElementChild;if(R){const W=Po(R);t.style.setProperty("--z-index",W.zIndex)}}),T=()=>Ve(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=k6(o.listeners),x=o.listeners?o6(r,t,T,y):WR;return T(),()=>{x==null||x(),p==null||p({placed:!1})}}function Ry(e,t,n={}){const c=n,{defer:r}=c,o=sn(c,["defer"]),a=r?Ot:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(N6(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var O6={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function I6(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Or.arrowSize.reference,height:Or.arrowSize.reference,[Or.arrowSizeHalf.variable]:`calc(${Or.arrowSize.reference} / 2)`,[Or.arrowOffset.variable]:`calc(${Or.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?O6[t.split("-")[0]]:void 0,background:Or.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 $o=new WeakMap,yl=new WeakMap,bl={},nh=0,Py=e=>e&&(e.host||Py(e.parentNode)),R6=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Py(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),P6=new Set(["script","output","status","next-route-announcer"]),L6=e=>P6.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),D6=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=R6(n,Array.isArray(e)?e:[e]);bl[r]||(bl[r]=new WeakMap);const c=bl[r],d=[],h=new Set,p=new Set(u),g=y=>{!y||h.has(y)||(h.add(y),g(y.parentNode))};u.forEach(y=>{g(y),a&&Ft(y)&&YE(y,x=>{g(x)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(h.has(x))T(x);else try{if(L6(x))return;const A=x.getAttribute(o)==="true",C=($o.get(x)||0)+1,O=(c.get(x)||0)+1;$o.set(x,C),c.set(x,O),d.push(x),C===1&&A&&yl.set(x,!0),O===1&&x.setAttribute(r,""),A||x.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",x,S)}})};return T(n),h.clear(),nh++,()=>{d.forEach(y=>{const x=$o.get(y)-1,S=c.get(y)-1;$o.set(y,x),c.set(y,S),x||(yl.has(y)||y.removeAttribute(o),yl.delete(y)),S||y.removeAttribute(r)}),nh--,nh||($o=new WeakMap,$o=new WeakMap,yl=new WeakMap,bl={})}},M6=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,F6=(e,t=M6(e),n="data-aria-hidden",r=!0)=>{if(t)return D6(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},B6=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Ly(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(F6(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function U6(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 H6(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 Dy="pointerdown.outside",My="focus.outside";function z6(e){for(const t of e)if(Ft(t)&&fr(t))return!0;return!1}var Fy=e=>"clientY"in e;function j6(e,t){if(!Fy(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 $6(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function By(e,t){if(!t||!Fy(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 $6(u,c)?r||a:!1}function V6(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=dr(e),h=Io(e),p=U6(h),g=H6(h);function T(R,H){if(!Ft(H)||!H.isConnected||Oo(e,H)||j6(e,R)||c&&qE(e,H))return!1;const W=d.querySelector(`[aria-controls="${e.id}"]`);if(W){const K=Bf(W);if(By(R,K))return!1}const F=Bf(e);return By(R,F)?!1:!(n!=null&&n(H))}const y=new Set,x=Fi(e==null?void 0:e.getRootNode());function S(R){function H(W){var be,z;const F=u&&!WE()?Ot:X=>X(),K=W!=null?W:R,ce=(z=(be=K==null?void 0:K.composedPath)==null?void 0:be.call(K))!=null?z:[K==null?void 0:K.target];F(()=>{const X=x?ce[0]:Gn(R);if(!(!e||!T(R,X))){if(o||a){const se=kf(o,a);e.addEventListener(Dy,se,{once:!0})}Uy(e,Dy,{bubbles:!1,cancelable:!0,detail:{originalEvent:K,contextmenu:kP(K),focusable:z6(ce),target:X}})}})}R.pointerType==="touch"?(y.forEach(W=>W()),y.add(Bt(d,"click",H,{once:!0})),y.add(g.addEventListener("click",H,{once:!0})),y.add(p.addEventListener("click",H,{once:!0}))):H()}const A=new Set,C=setTimeout(()=>{A.add(Bt(d,"pointerdown",S,!0)),A.add(g.addEventListener("pointerdown",S,!0)),A.add(p.addEventListener("pointerdown",S,!0))},0);function O(R){(u?Ot:W=>W())(()=>{var K,ce;const W=(ce=(K=R==null?void 0:R.composedPath)==null?void 0:K.call(R))!=null?ce:[R==null?void 0:R.target],F=x?W[0]:Gn(R);if(!(!e||!T(R,F))){if(r||a){const be=kf(r,a);e.addEventListener(My,be,{once:!0})}Uy(e,My,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:fr(F),target:F}})}})}return WE()||(A.add(Bt(d,"focusin",O,!0)),A.add(g.addEventListener("focusin",O,!0)),A.add(p.addEventListener("focusin",O,!0))),()=>{clearTimeout(C),y.forEach(R=>R()),A.forEach(R=>R())}}function q6(e,t){const{defer:n}=t,r=n?Ot:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(V6(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function Uy(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function Y6(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Bt(dr(e),"keydown",n,{capture:!0})}var Hy="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=>Oo(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Oo(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];G6(e,Hy,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),W6(e,Hy,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function W6(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 G6(e,t,n){e.addEventListener(t,n,{once:!0})}var zy;function jy(){Dn.layers.forEach(({node:e})=>{e.style.pointerEvents=Dn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function K6(e){e.style.pointerEvents=""}function Q6(e,t){const n=dr(e),r=[];return Dn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(zy=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=XP(()=>{const c=o();return Ft(c)?c:null},{timeout:1e3});a.then(c=>r.push(ol(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Dn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=zy,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function X6(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Of("[@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),jy();function p(S){var C,O;const A=Gn(S.detail.originalEvent);Dn.isBelowPointerBlockingLayer(e)||Dn.isInBranch(A)||((C=t.onPointerDownOutside)==null||C.call(t,S),(O=t.onInteractOutside)==null||O.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function g(S){var C,O;const A=Gn(S.detail.originalEvent);Dn.isInBranch(A)||((C=t.onFocusOutside)==null||C.call(t,S),(O=t.onInteractOutside)==null||O.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function T(S){var A;Dn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var R;if(!e)return!1;const A=typeof u=="function"?u():u,C=Array.isArray(A)?A:[A],O=(R=t.persistentElements)==null?void 0:R.map(H=>H()).filter(Ft);return O&&C.push(...O),C.some(H=>Oo(H,S))||Dn.isInNestedLayer(e,S)}const x=[a?Q6(e,t.persistentElements):void 0,Y6(e,T),q6(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{Dn.remove(e),jy(),K6(e),x.forEach(S=>S==null?void 0:S())}}function $y(e,t){const{defer:n}=t,r=n?Ot:a=>a(),o=[];return o.push(r(()=>{const a=ko(e)?e():e;o.push(X6(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var J6=Object.defineProperty,Z6=(e,t,n)=>t in e?J6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ht=(e,t,n)=>Z6(e,typeof t!="symbol"?t+"":t,n),Vy={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()}},eL=[],tL=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||tl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(ia(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(g=>g===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=>ia(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(fa(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}fa(this.config.allowOutsideClick,r)||r.preventDefault()}}),ht(this,"handleClick",r=>{const o=Gn(r);this.findContainerIndex(o,r)>=0||fa(this.config.clickOutsideDeactivates,r)||fa(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;da(r)&&r.preventDefault(),this.tryFocus(a)}}),ht(this,"handleEscapeKey",r=>{nL(r)&&fa(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 bP(h)?!0:h.id&&!this.state.containers.some(p=>p.contains(h))?TP(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&&!fr(r)){const o=Ro(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!==Ro(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,rL(r)&&r.select()}}),ht(this,"deactivate",r=>{if(!this.state.active)return this;const o=B({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(),Vy.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=()=>{qy(()=>{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:g})=>u===g);if(p<0&&((h==null?void 0:h.container)===u||fr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(p=d),p>=0){const g=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[g];c=ia(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else da(o)||(c=h==null?void 0:h.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:g})=>u===g);if(p<0&&((h==null?void 0:h.container)===u||fr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(p=d),p>=0){const g=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[g];c=ia(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else da(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||eL;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return da(r)&&!r.shiftKey},isKeyBackward(r){return da(r)&&r.shiftKey}},t);this.doc=n.document||dr(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=>{gP(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?qE(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Lo(e,{getShadowRoot:this.config.getShadowRoot}),n=ey(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(ia(t[h])>0){c=!0;break}function d(h,p=!0){const g=t.indexOf(h);if(g>=0)return t[g+(p?1:-1)];const T=n.indexOf(h);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(Bi(n[y]))return n[y]}else for(let y=T-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 Vy.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?qy(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Bt(this.doc,"focusin",this.handleFocus,!0),Bt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Bt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Bt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Bt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Bt(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=Ro(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)}},da=e=>e.key==="Tab",fa=(e,...t)=>typeof e=="function"?e(...t):e,nL=e=>!e.isComposing&&e.key==="Escape",qy=e=>setTimeout(e,0),rL=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Yy(e,t={}){let n;const r=Ot(()=>{const o=typeof e=="function"?e():e;if(o){n=new tL(o,ae(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:dr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var rh="data-scroll-lock";function iL(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Wy(e){const t=Po(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Gy(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(rh))return;const u=Wy(r)||Wy(o),c=n.innerWidth-r.clientWidth;o.setAttribute(rh,"");const d=()=>KP(r,"--scrollbar-width",`${c}px`),h=iL(r),p=()=>{const x={overflow:"hidden"};return!u&&c>0&&(x[h]=`${c}px`),ol(o,x)},g=()=>{var W,F;const{scrollX:x,scrollY:S,visualViewport:A}=n,C=(W=A==null?void 0:A.offsetLeft)!=null?W:0,O=(F=A==null?void 0:A.offsetTop)!=null?F:0,R={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(O))}px`,left:`${-(x-Math.floor(C))}px`,right:"0"};!u&&c>0&&(R[h]=`${c}px`);const H=ol(o,R);return()=>{H==null||H(),n.scrollTo({left:x,top:S,behavior:"instant"})}},T=[d(),nl()?g():p()];return()=>{T.forEach(x=>x==null?void 0:x()),o.removeAttribute(rh)}}var oL=Hi("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Er=oL.build(),Ky=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Qy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},ih=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Xy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},sL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},oh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},sh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},aL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Jy=e=>e.getById(Ky(e)),Vo=e=>e.getById(Qy(e)),qo=e=>e.getById(ih(e)),Zy=e=>e.getById(Xy(e)),uL=e=>e.getById(oh(e)),lL=e=>e.getById(sh(e));function cL(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"),g=r.get("renderedElements"),T=I6(ae(B({},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(ae(B({id:sL(c)},Er.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(ae(B({},Er.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(ae(B({},Er.anchor.attrs),{dir:u("dir"),id:Ky(c)}))},getTriggerProps(){return t.button(ae(B({},Er.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:Qy(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ih(c),onPointerDown(y){GE(y)&&AP()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(ae(B({},Er.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ae(B({id:Xy(c)},Er.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(ae(B({},Er.content.attrs),{dir:u("dir"),id:ih(c),tabIndex:-1,role:"dialog","aria-modal":jE(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":No(d),"aria-labelledby":g.title?oh(c):void 0,"aria-describedby":g.description?sh(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(ae(B({},Er.title.attrs),{id:oh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ae(B({},Er.description.attrs),{id:sh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ae(B({},Er.closeTrigger.attrs),{dir:u("dir"),id:aL(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var dL={props({props:e}){return ae(B({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:B({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=Jy(n))!=null?a:Vo(n);return Ry(r,()=>Zy(n),ae(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>qo(n);let o=!0;return $y(r,{type:"popover",pointerBlocking:t("modal"),exclude:Vo(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:WP(()=>qo(t),{triggerElement:Vo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Ly(()=>[qo(t),Vo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Gy(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Yy(()=>qo(t),{initialFocus:()=>ty({root:qo(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=Jy(n))!=null?u:Vo(n);Ry(o,()=>Zy(n),ae(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Ot(()=>{Object.assign(e.get("renderedElements"),{title:!!uL(t),description:!!lL(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Ot(()=>{const n=ty({root:qo(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||Ot(()=>{const a=Vo(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})}}}};Fo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[kF,Tl]=Ui({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[NF,ah]=Ui({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),fL=e=>{const t=ee.useId(),{getRootNode:n}=Tl(),{dir:r}=ah(),o=B({id:t,dir:r,getRootNode:n},e),a=al(dL,o);return cL(a,zf)},hL=e=>{const[t,u]=cy(e),c=u,{children:n}=c,r=sn(c,["children"]),o=fL(r),a=Vf(It({present:o.open},t));return _.jsx(u4,{value:o,children:_.jsx(ay,{value:a,children:n})})},eb=ee.forwardRef((e,t)=>{const n=$f(),r=oa(),o=It(ae(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(Qt.button,ae(B({},o),{ref:t}))});eb.displayName="PopoverTrigger";function pL(e){return mt({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 mL(e){return mt({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 tb(e){return mt({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 nb(e){return mt({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 rb(e){return mt({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 gL=({className:e,componentType:t,children:n})=>{const[r,o]=ee.useState(!1),{globalClassName:a}=Nt(),u=h=>{o(h.open)},c=ee.useCallback(()=>{o(!1)},[]),d=ee.useMemo(()=>({closeMenu:c}),[c]);return _.jsxs(hL,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(eb,{"aria-label":`Overflow menu for ${t}`,className:$(`${M}-overflow-menu-button-trigger`,`${M}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(rb,{})}),_.jsx(ly,{children:_.jsx(uy,{className:$(`${M}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(DE.Provider,{value:d,children:n})})})]})};function ib(e){return mt({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 ob(e){return mt({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[EL,ji]=Ui({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),uh=ee.forwardRef((e,t)=>{const n=ji(),r=It(n.getControlProps(),e);return _.jsx(Qt.div,ae(B(B({},r),e),{ref:t}))});uh.displayName="CarouselControl";const lh=ee.forwardRef((e,t)=>{const[n,r]=sa()(e,["readOnly","index"]),o=ji(),a=It(o.getIndicatorProps(n),r);return _.jsx(Qt.button,ae(B({},a),{ref:t}))});lh.displayName="CarouselIndicator";const ch=ee.forwardRef((e,t)=>{const n=ji(),r=It(n.getIndicatorGroupProps(),e);return _.jsx(Qt.div,ae(B({},r),{ref:t}))});ch.displayName="CarouselIndicatorGroup";const dh=ee.forwardRef((e,t)=>{const[n,r]=sa()(e,["index","snapAlign"]),o=ji(),a=It(o.getItemProps(n),r);return _.jsx(Qt.div,ae(B({},a),{ref:t}))});dh.displayName="CarouselItem";const fh=ee.forwardRef((e,t)=>{const n=ji(),r=It(n.getItemGroupProps(),e);return _.jsx(Qt.div,ae(B({},r),{ref:t}))});fh.displayName="CarouselItemGroup";const hh=ee.forwardRef((e,t)=>{const n=ji(),r=It(n.getNextTriggerProps(),e);return _.jsx(Qt.button,ae(B({},r),{ref:t}))});hh.displayName="CarouselNextTrigger";const ph=ee.forwardRef((e,t)=>{const n=ji(),r=It(n.getPrevTriggerProps(),e);return _.jsx(Qt.button,ae(B({},r),{ref:t}))});ph.displayName="CarouselPrevTrigger";function yL(e){const t=Po(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let x=parseFloat(T);return/%/.test(T)&&(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),g=c(u,n.height);return{x:{before:d,after:p},y:{before:h,after:g}}}function bL(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 sb(e){let t=[];for(const n of e.children)t=t.concat(n,sb(n));return t}function ab(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?sb(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 g=p.getBoundingClientRect();if(!bL(n,g,u))continue;const T=Po(p);let[y,x]=T.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const S=a==="x"?x:y,A=g[c]-n[c]+e[h];switch(S){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+g[d]/2});break;case"end":r[a].end.push({node:p,position:A+g[d]});break}}}return r}function ub(e){const t=e.getBoundingClientRect(),n=yL(e),r=ab(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:lb([...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(cb(0,o.x))),y:lb([...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(cb(0,o.y)))}}function TL(e,t,n){const r=ab(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var lb=e=>[...new Set(e)],cb=(e,t)=>n=>Math.max(e,Math.min(t,n)),xL=Hi("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Ir=xL.build(),wL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},_L=(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}`},xl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},vL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},SL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},AL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},db=(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(xl(e)),fb=e=>GP(hn(e),"[data-part=item]"),CL=(e,t)=>e.getById(db(e,t)),hb=e=>{const t=hn(e);if(!t)return;const n=Lo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function kL(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"),g=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),S=c("slidesPerPage"),A=c("padding"),C=c("translations");return{isPlaying:d,isDragging:h,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:g,getProgress(){return x/y.length},scrollToIndex(O,R){a({type:"INDEX.SET",index:O,instant:R})},scrollTo(O,R){a({type:"PAGE.SET",index:O,instant:R})},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(ae(B({},Ir.root.attrs),{id:wL(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(ae(B({},Ir.itemGroup.attrs),{id:xl(u),"data-orientation":c("orientation"),"data-dragging":No(h),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(O){Oo(O.currentTarget,Gn(O))&&a({type:"VIEWPORT.FOCUS"})},onBlur(O){Oo(O.currentTarget,O.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(O){if(O.defaultPrevented||!c("allowMouseDrag")||!GE(O))return;const R=Gn(O);fr(R)&&R!==O.currentTarget||(O.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:GR(O=>{const R=c("orientation")==="horizontal"?"deltaX":"deltaY";O[R]<0&&!o("canScrollPrev")||O[R]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:A,[T?"paddingInline":"paddingBlock"]:A,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(O){const R=r.get("slidesInView").includes(O.index);return t.element(ae(B({},Ir.item.attrs),{id:_L(u,O.index),dir:c("dir"),role:"group","data-index":O.index,"data-inview":No(R),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":C.item(O.index,c("slideCount")),"aria-hidden":jE(!R),style:{scrollSnapAlign:(()=>{var ce;const H=(ce=O.snapAlign)!=null?ce:"start",W=c("slidesPerMove"),F=W==="auto"?Math.floor(c("slidesPerPage")):W;return(O.index+F)%F===0?H:void 0})()}}))},getControlProps(){return t.element(ae(B({},Ir.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(ae(B({},Ir.prevTrigger.attrs),{id:SL(u),type:"button",disabled:!g,dir:c("dir"),"aria-label":C.prevTrigger,"data-orientation":c("orientation"),"aria-controls":xl(u),onClick(O){O.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ae(B({},Ir.nextTrigger.attrs),{dir:c("dir"),id:vL(u),type:"button","aria-label":C.nextTrigger,"data-orientation":c("orientation"),"aria-controls":xl(u),disabled:!p,onClick(O){O.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ae(B({},Ir.indicatorGroup.attrs),{dir:c("dir"),id:AL(u),"data-orientation":c("orientation"),onKeyDown(O){if(O.defaultPrevented)return;const R="indicator",H={ArrowDown(K){T||(a({type:"PAGE.NEXT",src:R}),K.preventDefault())},ArrowUp(K){T||(a({type:"PAGE.PREV",src:R}),K.preventDefault())},ArrowRight(K){T&&(a({type:"PAGE.NEXT",src:R}),K.preventDefault())},ArrowLeft(K){T&&(a({type:"PAGE.PREV",src:R}),K.preventDefault())},Home(K){a({type:"PAGE.SET",index:0,src:R}),K.preventDefault()},End(K){a({type:"PAGE.SET",index:y.length-1,src:R}),K.preventDefault()}},W=IP(O,{dir:c("dir"),orientation:c("orientation")}),F=H[W];F==null||F(O)}}))},getIndicatorProps(O){return t.button(ae(B({},Ir.indicator.attrs),{dir:c("dir"),id:db(u,O.index),type:"button","data-orientation":c("orientation"),"data-index":O.index,"data-readonly":No(O.readOnly),"data-current":No(O.index===x),"aria-label":C.indicator(O.index),onClick(R){R.defaultPrevented||O.readOnly||a({type:"PAGE.SET",index:O.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ae(B({},Ir.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":No(d),"aria-label":d?C.autoplayStop:C.autoplayStart,onClick(O){O.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var NL={props({props:e}){return eP(e,["slideCount"],"carousel"),ae(B({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:B({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:OL(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 FR(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"}),hb(e)});return hb(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"})};Ot(()=>{o(),Ot(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return fb(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 T;const p=h.target,g=Number((T=p.dataset.index)!=null?T:"-1");return g==null||Number.isNaN(g)||g===-1?d:h.isIntersecting?RR(d,g):PR(d,g)},n.get("slidesInView"));n.set("slidesInView",LR(c))},{root:r,threshold:t("inViewThreshold")});return fb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=hn(n);return r?Bt(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 Bt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return qP(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 Bt(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=HE((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=FE(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=DR(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=TL(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=HE(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=ub(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=ub(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]);Ot(()=>{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=CL(n,e.get("page"));r&&Ot(()=>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 OL(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}Fo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Fo()(["index","readOnly"]),Fo()(["index","snapAlign"]);const IL=e=>{const t=ee.useId(),{getRootNode:n}=Tl(),{dir:r}=ah(),o=B({id:t,dir:r,getRootNode:n},e),a=al(NL,o);return kL(a,zf)},mh=ee.forwardRef((e,t)=>{const[n,r]=sa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=IL(n),a=It(o.getRootProps(),r);return _.jsx(EL,{value:o,children:_.jsx(Qt.div,ae(B({},a),{ref:t}))})});mh.displayName="CarouselRoot";const RL=180,PL=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},LL=({globalClassName:e,className:t,itemMinWidth:n=RL,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 g=Array.from(p),T=g.length,y=ee.useRef(null),[x,S]=ee.useState(0),{width:A}=yS();ee.useLayoutEffect(()=>{y.current&&S(y.current.getBoundingClientRect().width)},[A,T]);const C=PL(r),O=n+C,R=x>0?(x+C)/O:1,H=Math.max(1,Math.floor(R));if(T===0)return null;const W=T>H,F=Math.ceil(T/H),K=W?Math.max(1,R):H;return _.jsxs(mh,{ref:y,className:$(e,t,`${M}-carousel`),slidesPerPage:K,slidesPerMove:H,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":h,children:[_.jsx(fh,{className:$(e,`${M}-carousel__item-group`,{"carousel-row-container":!W}),children:g.map((ce,be)=>_.jsx(dh,{index:be,className:$(e,`${M}-carousel__item`),children:ce},be))}),c&&W&&_.jsxs(uh,{className:$(e,`${M}-carousel__control`),children:[_.jsx(ph,{className:$(e,`${M}-carousel__prev-trigger`),"aria-label":"Previous slide",children:_.jsx(tb,{size:"16px"})}),_.jsx(hh,{className:$(e,`${M}-carousel__next-trigger`),"aria-label":"Next slide",children:_.jsx(nb,{size:"16px"})})]}),u&&W&&_.jsx(ch,{className:$(e,`${M}-carousel__indicator-group`),children:Array.from({length:F},(ce,be)=>_.jsx(lh,{index:be,className:$(e,`${M}-carousel__indicator`),"aria-label":`Go to slide group ${be+1}`},be))})]})},DL=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:$(e,`${M}-close-button`),disabled:r,onClick:n,children:_.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.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"})})}),[ML,FL]=Ui({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),BL=e=>sa()(e,["lazyMount","unmountOnExit"]),[UL,ha]=Ui({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),pb=ee.forwardRef((e,t)=>{const n=ha(),r=FL(),o=Vf(ae(B({},r),{present:n.open})),a=It(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:_.jsx(Qt.div,ae(B({},a),{ref:ul(o.ref,t)}))});pb.displayName="DialogBackdrop";const gh=ee.forwardRef((e,t)=>{const n=ha(),r=oa(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Qt.div,ae(B({},o),{ref:ul(r.ref,t)}))});gh.displayName="DialogContent";const Eh=ee.forwardRef((e,t)=>{const n=ha(),r=It(n.getDescriptionProps(),e);return _.jsx(Qt.div,ae(B({},r),{ref:t}))});Eh.displayName="DialogDescription";const yh=ee.forwardRef((e,t)=>{const n=ha(),r=It(n.getPositionerProps(),e);return oa().unmounted?null:_.jsx(Qt.div,ae(B({},r),{ref:t}))});yh.displayName="DialogPositioner";var HL=Hi("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),$i=HL.build(),mb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},gb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},bh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Th=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},yb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},wl=e=>e.getById(bh(e)),zL=e=>e.getById(mb(e)),jL=e=>e.getById(gb(e)),$L=e=>e.getById(Eb(e)),VL=e=>e.getById(Th(e)),qL=e=>e.getById(xh(e)),YL=e=>e.getById(yb(e));function WL(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(ae(B({},$i.trigger.attrs),{dir:a("dir"),id:Eb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":bh(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ae(B({},$i.backdrop.attrs),{dir:a("dir"),hidden:!d,id:gb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ae(B({},$i.positioner.attrs),{dir:a("dir"),id:mb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(ae(B({},$i.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:bh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:Th(u),"aria-describedby":h.description?xh(u):void 0}))},getTitleProps(){return t.element(ae(B({},$i.title.attrs),{dir:a("dir"),id:Th(u)}))},getDescriptionProps(){return t.element(ae(B({},$i.description.attrs),{dir:a("dir"),id:xh(u)}))},getCloseTriggerProps(){return t.button(ae(B({},$i.closeTrigger.attrs),{dir:a("dir"),id:yb(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var GL={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>YL(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return B({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 $y(()=>wl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[$L(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 Gy(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Yy(()=>wl(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")?Ly(()=>[wl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Ot(()=>{e.set("rendered",{title:!!VL(t),description:!!qL(t)})})},syncZIndex({scope:e}){Ot(()=>{const t=wl(e);if(!t)return;const n=Po(t);[zL(e),jL(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})}}}};Fo()(["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 KL=e=>{const t=ee.useId(),{getRootNode:n}=Tl(),{dir:r}=ah(),o=B({id:t,getRootNode:n,dir:r},e),a=al(GL,o);return WL(a,zf)},bb=e=>{const[t,c]=cy(e),d=c,{children:n}=d,r=sn(d,["children"]),[o]=BL(t),a=KL(r),u=Vf(It({present:a.open},t));return _.jsx(UL,{value:a,children:_.jsx(ML,{value:o,children:_.jsx(ay,{value:u,children:n})})})},Tb=ee.forwardRef((e,t)=>{const n=ha(),r=It(n.getTitleProps(),e);return _.jsx(Qt.h2,ae(B({},r),{ref:t}))});Tb.displayName="DialogTitle";const QL=({children:e})=>{const[t,n]=ee.useState(!1),r=ee.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=ee.useMemo(()=>({isOpen:t}),[t]);return _.jsx(Cf.Provider,{value:r,children:_.jsx(LE.Provider,{value:o,children:e})})},xb=()=>ee.useContext(LE),wb=()=>{const e=ee.useContext(Cf);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},XL=`${M}-overflow-menu-button-trigger`,JL=({componentType:e,children:t})=>{const{isOpen:n}=xb(),{closeMenu:r}=wb(),{globalClassName:o}=Nt(),a=ee.useRef(null);return ee.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const h=d.target;h instanceof Element&&h.closest(`.${XL}`)||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?_.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:$(`${M}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},ZL=({componentType:e,className:t})=>{const{toggleMenu:n}=wb(),{isOpen:r}=xb(),{globalClassName:o}=Nt();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:$(`${M}-overflow-menu-button-trigger`,`${M}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:_.jsx(rb,{})})},eD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Nt(),{previousComponentType:r}=ki(),o=na(),a=()=>{Su(r||"dialog"),o()};return t?_.jsx(ar,{className:$(n,`${M}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(ib,{})}):_.jsxs("button",{className:$(n,`${M}-overflow-menu-button`,`${M}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(ib,{}),"Show ",r||"dialog"]})},tD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Nt(),{isModalFullscreen:r}=ki(),o=na(),a=()=>{wd(!r),o()},u=r?GS:KS,c="Toggle Fullscreen";return t?_.jsx(ar,{ariaLabel:c,title:c,className:$(n,`${M}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:$(n,`${M}-overflow-menu-button`,`${M}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),c]})},nD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Nt(),{dialogPosition:r}=ki(),o=na(),a=r==="bottom-left",u=()=>{_d(a?"bottom-right":"bottom-left"),o()},c=a?mL:pL,d=a?"Move right":"Move left";return t?_.jsx(ar,{className:$(n,`${M}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(c,{})}):_.jsxs("button",{className:$(n,`${M}-overflow-menu-button`,`${M}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(c,{}),d]})},_b=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=Nt(),{mode:a}=ki(),u=a==="standalone",c=e==="modal",d=c?eD:Sb,h=c?tD:nD,p=ee.useMemo(()=>r?jS(r):{},[r]);return _.jsx(QL,{children:_.jsxs("div",{className:$(o,`${M}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:$(o,`${M}-${e}-header`,{standalone:u,embedded:!u}),style:p,children:[(r==null?void 0:r.logoUrl)&&_.jsx("img",{alt:"",role:"img",className:$(o,`${M}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),_.jsx(Tb,{className:$(o,`${M}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),_.jsxs("div",{className:$(o,`${M}-${e}-controls`),children:[_.jsx(d,{componentType:e,isIcon:!0}),_.jsx(ZL,{componentType:e}),_.jsx(DL,{className:$(o,`cim-${e}-component`),onClick:n})]})]}),_.jsxs(JL,{componentType:e,children:[_.jsx(h,{componentType:e}),_.jsx(oD,{componentType:e}),_.jsx(ME,{componentType:e,onClearChat:t})]})]})})},vb="USD",pa=(e,t)=>{if(typeof e!="number"||Number.isNaN(e))return null;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e)}catch(n){return`${e}`}},rD=({retailPrice:e,discountPrice:t,currencyCode:n=vb})=>{const r=n||vb,o=typeof t=="number"&&typeof e=="number"&&t<e,a=o?t:e||t||null,u=o?e:null;return{price:pa(a,r),comparePrice:pa(u,r),hasDiscount:o}},wh=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:o,className:a})=>{const{price:u,comparePrice:c,hasDiscount:d}=rD({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const h=typeof r=="string"?{fontSize:r}:{};return _.jsxs("div",{className:$(o,a,`${M}-price`),style:h,children:[_.jsx("span",{className:$(o,`${M}-price__amount`),children:u}),d&&c&&_.jsx("span",{className:$(o,`${M}-price__compare`),children:c})]})},iD=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return _.jsx("div",{className:$(t,`${M}-suggestion-container ${u}`,e),children:n.map(d=>o?_.jsx(ku,{disabled:r,className:$(t,`${M}-suggestion-button standalone`),onClick:c(d),children:d},d):_.jsx("button",{disabled:r,className:$(t,`${M}-suggestion-button embedded`),onClick:c(d),children:d},d))})},oD=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=Nt();if(!r)return null;const o=()=>{Ci(!1),vu(!0)};return t?_.jsx(ar,{className:$(n,`${M}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:_.jsx(V0,{})}):_.jsxs("button",{className:$(n,`${M}-overflow-menu-button`,`${M}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(V0,{}),"Minimize"]})},Sb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Nt(),r=na(),o=()=>{Su("modal"),r()};return t?_.jsx(ar,{className:$(n,`${M}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:_.jsx(ob,{})}):_.jsxs("button",{className:$(n,`${M}-overflow-menu-button`,`${M}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(ob,{}),"Show modal"]})},sD=["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"],aD=3e3,uD=400,lD=({globalClassName:e,isWidgetStandalone:t,messages:n=sD})=>{const[r,o]=ee.useState(0),[a,u]=ee.useState(!0);return ee.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{o(h=>(h+1)%n.length),u(!0)},uD)},aD);return()=>{clearInterval(d),clearTimeout(c)}},[n.length]),_.jsxs("div",{className:$(e,`${M}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[_.jsxs("div",{className:`${M}-connecting-pulse-wrapper`,children:[_.jsx("div",{className:`${M}-connecting-pulse`}),_.jsx("div",{className:`${M}-connecting-ring`})]}),_.jsx("span",{className:$(`${M}-connecting-text`,a&&`${M}-connecting-text--visible`),children:n[r]})]})},cD=({shouldShow:e,loadingText:t})=>e?_.jsx("span",{className:`${M}-processing-text`,children:t}):null,dD=({shouldShow:e})=>e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:`${M}-processing-shimmer-bar`}),_.jsx("div",{className:`${M}-processing-shimmer-bar`}),_.jsx("div",{className:`${M}-processing-shimmer-bar`})]}):null,_h=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>_.jsxs("div",{className:$(e,`${M}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[_.jsx(cD,{shouldShow:!!n,loadingText:n}),_.jsx(dD,{shouldShow:!n})]});function Ab(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 fD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function hD(e,t,n){const o=Uu((n||{}).ignore||[]),a=pD(t);let u=-1;for(;++u<a.length;)r1(e,"text",c);function c(h,p){let g=-1,T;for(;++g<p.length;){const y=p[g],x=T?T.children:void 0;if(o(y,x?x.indexOf(y):void 0,T))return;T=y}if(T)return d(h,p)}function d(h,p){const g=p[p.length-1],T=a[u][0],y=a[u][1];let x=0;const A=g.children.indexOf(h);let C=!1,O=[];T.lastIndex=0;let R=T.exec(h.value);for(;R;){const H=R.index,W={index:R.index,input:R.input,stack:[...p,h]};let F=y(...R,W);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?T.lastIndex=H+1:(x!==H&&O.push({type:"text",value:h.value.slice(x,H)}),Array.isArray(F)?O.push(...F):F&&O.push(F),x=H+R[0].length,C=!0),!T.global)break;R=T.exec(h.value)}return C?(x<h.value.length&&O.push({type:"text",value:h.value.slice(x)}),g.children.splice(A,1,...O)):O=[h],A+O.length}}function pD(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([mD(o[0]),gD(o[1])])}return t}function mD(e){return typeof e=="string"?new RegExp(fD(e),"g"):e}function gD(e){return typeof e=="function"?e:function(){return e}}const vh="phrasing",Sh=["autolink","link","image","label"];function ED(){return{transforms:[vD],enter:{literalAutolink:bD,literalAutolinkEmail:Ah,literalAutolinkHttp:Ah,literalAutolinkWww:Ah},exit:{literalAutolink:_D,literalAutolinkEmail:wD,literalAutolinkHttp:TD,literalAutolinkWww:xD}}}function yD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vh,notInConstruct:Sh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vh,notInConstruct:Sh},{character:":",before:"[ps]",after:"\\/",inConstruct:vh,notInConstruct:Sh}]}}function bD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ah(e){this.config.enter.autolinkProtocol.call(this,e)}function TD(e){this.config.exit.autolinkProtocol.call(this,e)}function xD(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 wD(e){this.config.exit.autolinkEmail.call(this,e)}function _D(e){this.exit(e)}function vD(e){hD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,SD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),AD]],{ignore:["link","linkReference"]})}function SD(e,t,n,r,o){let a="";if(!Cb(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!CD(n)))return!1;const u=kD(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 AD(e,t,n,r){return!Cb(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 kD(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=Ab(e,"(");let a=Ab(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 Cb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Oi(n)||Ru(n))&&(!t||n!==47)}kb.peek=FD;function ND(){this.buffer()}function OD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ID(){this.buffer()}function RD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function PD(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 LD(e){this.exit(e)}function DD(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 MD(e){this.exit(e)}function FD(){return"["}function kb(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 BD(){return{enter:{gfmFootnoteCallString:ND,gfmFootnoteCall:OD,gfmFootnoteDefinitionLabelString:ID,gfmFootnoteDefinition:RD},exit:{gfmFootnoteCallString:PD,gfmFootnoteCall:LD,gfmFootnoteDefinitionLabelString:DD,gfmFootnoteDefinition:MD}}}function UD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:kb},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
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?Nb:HD))),h(),d}}function HD(e,t,n){return t===0?e:Nb(e,t,n)}function Nb(e,t,n){return(n?"":" ")+e}const zD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ob.peek=YD;function jD(){return{canContainEols:["delete"],enter:{strikethrough:VD},exit:{strikethrough:qD}}}function $D(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zD}],handlers:{delete:Ob}}}function VD(e){this.enter({type:"delete",children:[]},e)}function qD(e){this.exit(e)}function Ob(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,ae(B({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function YD(){return"~"}function WD(e){return e.length}function GD(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||WD,a=[],u=[],c=[],d=[];let h=0,p=-1;for(;++p<e.length;){const S=[],A=[];let C=-1;for(e[p].length>h&&(h=e[p].length);++C<e[p].length;){const O=KD(e[p][C]);if(n.alignDelimiters!==!1){const R=o(O);A[C]=R,(d[C]===void 0||R>d[C])&&(d[C]=R)}S.push(O)}u[p]=S,c[p]=A}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<h;)a[g]=Ib(r[g]);else{const S=Ib(r);for(;++g<h;)a[g]=S}g=-1;const T=[],y=[];for(;++g<h;){const S=a[g];let A="",C="";S===99?(A=":",C=":"):S===108?A=":":S===114&&(C=":");let O=n.alignDelimiters===!1?1:Math.max(1,d[g]-A.length-C.length);const R=A+"-".repeat(O)+C;n.alignDelimiters!==!1&&(O=A.length+O+C.length,O>d[g]&&(d[g]=O),y[g]=O),T[g]=R}u.splice(1,0,T),c.splice(1,0,y),p=-1;const x=[];for(;++p<u.length;){const S=u[p],A=c[p];g=-1;const C=[];for(;++g<h;){const O=S[g]||"";let R="",H="";if(n.alignDelimiters!==!1){const W=d[g]-(A[g]||0),F=a[g];F===114?R=" ".repeat(W):F===99?W%2?(R=" ".repeat(W/2+.5),H=" ".repeat(W/2-.5)):(R=" ".repeat(W/2),H=R):H=" ".repeat(W)}n.delimiterStart!==!1&&!g&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&O==="")&&(n.delimiterStart!==!1||g)&&C.push(" "),n.alignDelimiters!==!1&&C.push(R),C.push(O),n.alignDelimiters!==!1&&C.push(H),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&C.push("|")}x.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return x.join(`
39
39
  `)}function KD(e){return e==null?"":String(e)}function Ib(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 QD(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()),XD);return o(),u}function XD(e,t,n){return">"+(n?"":" ")+e}function JD(e,t){return Rb(e,t.inConstruct,!0)&&!Rb(e,t.notInConstruct,!1)}function Rb(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 Pb(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
40
40
  `&&JD(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
- `}function ZD(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function e5(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function t5(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function n5(e,t,n,r){const o=t5(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(e5(e,n)){const E=n.enter("codeIndented"),T=n.indentLines(a,r5);return E(),T}const c=n.createTracker(r),d=o.repeat(Math.max(ZD(a,o)+1,3)),h=n.enter("codeFenced");let p=c.move(d);if(e.lang){const E=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,F({before:p,after:" ",encode:["`"]},c.current()))),E()}if(e.lang&&e.meta){const E=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,F({before:p,after:`
42
- `,encode:["`"]},c.current()))),E()}return p+=c.move(`
41
+ `}function ZD(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function e5(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function t5(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function n5(e,t,n,r){const o=t5(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(e5(e,n)){const g=n.enter("codeIndented"),T=n.indentLines(a,r5);return g(),T}const c=n.createTracker(r),d=o.repeat(Math.max(ZD(a,o)+1,3)),h=n.enter("codeFenced");let p=c.move(d);if(e.lang){const g=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,B({before:p,after:" ",encode:["`"]},c.current()))),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,B({before:p,after:`
42
+ `,encode:["`"]},c.current()))),g()}return p+=c.move(`
43
43
  `),a&&(p+=c.move(a+`
44
- `)),p+=c.move(d),h(),p}function r5(e,t,n){return(n?"":" ")+e}function Ah(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function i5(e,t,n,r){const o=Ah(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),F({before:h,after:"]"},d.current()))),h+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,F({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,F({before:h,after:e.title?" ":`
45
- `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,F({before:h,after:o},d.current()))),h+=d.move(o),c()),u(),h}function o5(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ma(e){return"&#x"+e.toString(16).toUpperCase()+";"}function _l(e,t,n){const r=bo(e),o=bo(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Lb.peek=s5;function Lb(e,t,n,r){const o=o5(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let d=u.move(n.containerPhrasing(e,F({after:o,before:c},u.current())));const h=d.charCodeAt(0),p=_l(r.before.charCodeAt(r.before.length-1),h,o);p.inside&&(d=ma(h)+d.slice(1));const E=d.charCodeAt(d.length-1),T=_l(r.after.charCodeAt(0),E,o);T.inside&&(d=d.slice(0,-1)+ma(E));const y=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function s5(e,t,n){return n.options.emphasis||"*"}function a5(e,t){let n=!1;return zu(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Kd}),!!((!e.depth||e.depth<3)&&Bd(e)&&(t.options.setext||n))}function u5(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(a5(e,n)){const p=n.enter("headingSetext"),E=n.enter("phrasing"),T=n.containerPhrasing(e,ae(F({},a.current()),{before:`
44
+ `)),p+=c.move(d),h(),p}function r5(e,t,n){return(n?"":" ")+e}function Ch(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function i5(e,t,n,r){const o=Ch(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),B({before:h,after:"]"},d.current()))),h+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,B({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,B({before:h,after:e.title?" ":`
45
+ `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,B({before:h,after:o},d.current()))),h+=d.move(o),c()),u(),h}function o5(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ma(e){return"&#x"+e.toString(16).toUpperCase()+";"}function _l(e,t,n){const r=bo(e),o=bo(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Lb.peek=s5;function Lb(e,t,n,r){const o=o5(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let d=u.move(n.containerPhrasing(e,B({after:o,before:c},u.current())));const h=d.charCodeAt(0),p=_l(r.before.charCodeAt(r.before.length-1),h,o);p.inside&&(d=ma(h)+d.slice(1));const g=d.charCodeAt(d.length-1),T=_l(r.after.charCodeAt(0),g,o);T.inside&&(d=d.slice(0,-1)+ma(g));const y=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function s5(e,t,n){return n.options.emphasis||"*"}function a5(e,t){let n=!1;return zu(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Kd}),!!((!e.depth||e.depth<3)&&Bd(e)&&(t.options.setext||n))}function u5(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(a5(e,n)){const p=n.enter("headingSetext"),g=n.enter("phrasing"),T=n.containerPhrasing(e,ae(B({},a.current()),{before:`
46
46
  `,after:`
47
- `}));return E(),p(),T+`
47
+ `}));return g(),p(),T+`
48
48
  `+(o===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
49
- `))+1))}const u="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let h=n.containerPhrasing(e,F({before:"# ",after:`
50
- `},a.current()));return/^[\t ]/.test(h)&&(h=ma(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,n.options.closeAtx&&(h+=" "+u),d(),c(),h}Db.peek=l5;function Db(e){return e.value||""}function l5(){return"<"}Mb.peek=c5;function Mb(e,t,n,r){const o=Ah(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,F({before:h,after:"]"},d.current()))),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,F({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,F({before:h,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,F({before:h,after:o},d.current()))),h+=d.move(o),c()),h+=d.move(")"),u(),h}function c5(){return"!"}Fb.peek=d5;function Fb(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const h=n.safe(e.alt,F({before:d,after:"]"},c.current()));d+=c.move(h+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!h||h!==E?d+=c.move(E+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function d5(){return"!"}Bb.peek=f5;function Bb(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return o+r+o}function f5(){return"`"}function Ub(e,t){const n=Bd(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Hb.peek=h5;function Hb(e,t,n,r){const o=Ah(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(Ub(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let E=u.move("<");return E+=u.move(n.containerPhrasing(e,F({before:E,after:">"},u.current()))),E+=u.move(">"),c(),n.stack=p,E}c=n.enter("link"),d=n.enter("label");let h=u.move("[");return h+=u.move(n.containerPhrasing(e,F({before:h,after:"]("},u.current()))),h+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(n.safe(e.url,F({before:h,after:">"},u.current()))),h+=u.move(">")):(d=n.enter("destinationRaw"),h+=u.move(n.safe(e.url,F({before:h,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),h+=u.move(" "+o),h+=u.move(n.safe(e.title,F({before:h,after:o},u.current()))),h+=u.move(o),d()),h+=u.move(")"),c(),h}function h5(e,t,n){return Ub(e,n)?"<":"["}zb.peek=p5;function zb(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const h=n.containerPhrasing(e,F({before:d,after:"]"},c.current()));d+=c.move(h+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!h||h!==E?d+=c.move(E+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function p5(){return"["}function Ch(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function m5(e){const t=Ch(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function g5(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function jb(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function E5(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?g5(n):Ch(n);const c=e.ordered?u==="."?")":".":m5(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),jb(n)===u&&p){let E=-1;for(;++E<e.children.length;){const T=e.children[E];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const h=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),h}function y5(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function b5(e,t,n,r){const o=y5(n);let a=n.bulletCurrent||Ch(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),p);return d(),h;function p(E,T,y){return T?(y?"":" ".repeat(u))+E:(y?a:a+" ".repeat(u-a.length))+E}}function T5(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const x5=Uu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function w5(e,t,n,r){return(e.children.some(function(u){return x5(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function _5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}$b.peek=v5;function $b(e,t,n,r){const o=_5(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,F({after:o,before:c},u.current())));const h=d.charCodeAt(0),p=_l(r.before.charCodeAt(r.before.length-1),h,o);p.inside&&(d=ma(h)+d.slice(1));const E=d.charCodeAt(d.length-1),T=_l(r.after.charCodeAt(0),E,o);T.inside&&(d=d.slice(0,-1)+ma(E));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function v5(e,t,n){return n.options.strong||"*"}function S5(e,t,n,r){return n.safe(e.value,r)}function A5(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function C5(e,t,n){const r=(jb(n)+(n.options.ruleSpaces?" ":"")).repeat(A5(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Vb={blockquote:QD,break:Pb,code:n5,definition:i5,emphasis:Lb,hardBreak:Pb,heading:u5,html:Db,image:Mb,imageReference:Fb,inlineCode:Bb,link:Hb,linkReference:zb,list:E5,listItem:b5,paragraph:T5,root:w5,strong:$b,text:S5,thematicBreak:C5};function k5(){return{enter:{table:N5,tableData:qb,tableHeader:qb,tableRow:I5},exit:{codeText:R5,table:O5,tableData:kh,tableHeader:kh,tableRow:kh}}}function N5(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function O5(e){this.exit(e),this.data.inTable=void 0}function I5(e){this.enter({type:"tableRow",children:[]},e)}function kh(e){this.exit(e)}function qb(e){this.enter({type:"tableCell",children:[]},e)}function R5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,P5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function P5(e,t){return t==="|"?t:e}function L5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
51
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:c}};function u(y,x,v,A){return h(p(y,v,A),y.align)}function c(y,x,v,A){const C=E(y,v,A),O=h([C]);return O.slice(0,O.indexOf(`
52
- `))}function d(y,x,v,A){const C=v.enter("tableCell"),O=v.enter("phrasing"),R=v.containerPhrasing(y,ae(F({},A),{before:a,after:a}));return O(),C(),R}function h(y,x){return GD(y,{align:x,alignDelimiters:r,padding:n,stringLength:o})}function p(y,x,v){const A=y.children;let C=-1;const O=[],R=x.enter("table");for(;++C<A.length;)O[C]=E(A[C],x,v);return R(),O}function E(y,x,v){const A=y.children;let C=-1;const O=[],R=x.enter("tableRow");for(;++C<A.length;)O[C]=d(A[C],y,x,v);return R(),O}function T(y,x,v){let A=Vb.inlineCode(y,x,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function D5(){return{exit:{taskListCheckValueChecked:Yb,taskListCheckValueUnchecked:Yb,paragraph:F5}}}function M5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:B5}}}function Yb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function F5(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function B5(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=Vb.listItem(e,t,n,F(F({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(p){return p+u}}function U5(){return[ED(),BD(),jD(),k5(),D5()]}function H5(e){return{extensions:[yD(),UD(e),$D(),L5(e),M5()]}}const z5={tokenize:W5,partial:!0},Wb={tokenize:G5,partial:!0},Gb={tokenize:K5,partial:!0},Kb={tokenize:Q5,partial:!0},j5={tokenize:X5,partial:!0},Qb={name:"wwwAutolink",tokenize:q5,previous:Jb},Xb={name:"protocolAutolink",tokenize:Y5,previous:Zb},Rr={name:"emailAutolink",tokenize:V5,previous:eT},yr={};function $5(){return{text:yr}}let Vi=48;for(;Vi<123;)yr[Vi]=Rr,Vi++,Vi===58?Vi=65:Vi===91&&(Vi=97);yr[43]=Rr,yr[45]=Rr,yr[46]=Rr,yr[95]=Rr,yr[72]=[Rr,Xb],yr[104]=[Rr,Xb],yr[87]=[Rr,Qb],yr[119]=[Rr,Qb];function V5(e,t,n){const r=this;let o,a;return u;function u(E){return!Nh(E)||!eT.call(r,r.previous)||Oh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return Nh(E)?(e.consume(E),c):E===64?(e.consume(E),d):n(E)}function d(E){return E===46?e.check(j5,p,h)(E):E===45||E===95||Gt(E)?(a=!0,e.consume(E),d):p(E)}function h(E){return e.consume(E),o=!0,d}function p(E){return a&&o&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function q5(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!Jb.call(r,r.previous)||Oh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(z5,e.attempt(Wb,e.attempt(Gb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function Y5(e,t,n){const r=this;let o="",a=!1;return u;function u(E){return(E===72||E===104)&&Zb.call(r,r.previous)&&!Oh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(nn(E)&&o.length<5)return o+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const T=o.toLowerCase();if(T==="http"||T==="https")return e.consume(E),d}return n(E)}function d(E){return E===47?(e.consume(E),a?h:(a=!0,d)):n(E)}function h(E){return E===null||Iu(E)||it(E)||Oi(E)||Ru(E)?n(E):e.attempt(Wb,e.attempt(Gb,p),n)(E)}function p(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function W5(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function G5(e,t,n){let r,o,a;return u;function u(h){return h===46||h===95?e.check(Kb,d,c)(h):h===null||it(h)||Oi(h)||h!==45&&Ru(h)?d(h):(a=!0,e.consume(h),u)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),u}function d(h){return o||r||!a?n(h):t(h)}}function K5(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(Kb,t,a)(u):u===null||it(u)||Oi(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function Q5(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||it(c)||Oi(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||it(c)||Oi(c)?t(c):r(c)}function a(c){return nn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):nn(c)?(e.consume(c),u):n(c)}}function X5(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Gt(a)?n(a):t(a)}}function Jb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||it(e)}function Zb(e){return!nn(e)}function eT(e){return!(e===47||Nh(e))}function Nh(e){return e===43||e===45||e===46||e===95||Gt(e)}function Oh(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const J5={tokenize:s8,partial:!0};function Z5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:r8,continuation:{tokenize:i8},exit:o8}},text:{91:{name:"gfmFootnoteCall",tokenize:n8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:e8,resolveTo:t8}}}}function e8(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const h=Yn(r.sliceSerialize({start:u.end,end:r.now()}));return h.codePointAt(0)!==94||!a.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function t8(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function n8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),d}function d(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(E){if(a>999||E===93&&!u||E===null||E===91||it(E))return n(E);if(E===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(Yn(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return it(E)||(u=!0),a++,e.consume(E),E===92?p:h}function p(E){return E===91||E===92||E===93?(e.consume(E),a++,h):h(E)}}function r8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(x)}function p(x){if(u>999||x===93&&!c||x===null||x===91||it(x))return n(x);if(x===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=Yn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return it(x)||(c=!0),u++,e.consume(x),x===92?E:p}function E(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}function T(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),o.includes(a)||o.push(a),Qe(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function i8(e,t,n){return e.check(Fs,t,e.attempt(J5,t,n))}function o8(e){e.exit("gfmFootnoteDefinition")}function s8(e,t,n){const r=this;return Qe(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function a8(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let h=d;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[d][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[d][1].end)},E={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,c],["enter",u[h][1],c],["exit",u[h][1],c],["enter",E,c]],y=c.parser.constructs.insideSpan.null;y&&xn(T,T.length,0,Pu(y,u.slice(h+1,d),c)),xn(T,T.length,0,[["exit",E,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),xn(u,h-1,d-h+3,T),d=h+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const h=this.previous,p=this.events;let E=0;return T;function T(x){return h===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const v=bo(h);if(x===126)return E>1?d(x):(u.consume(x),E++,y);if(E<2&&!n)return d(x);const A=u.exit("strikethroughSequenceTemporary"),C=bo(x);return A._open=!C||C===2&&!!v,A._close=!v||v===2&&!!C,c(x)}}}class u8{constructor(){this.map=[]}add(t,n,r){l8(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function l8(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function c8(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function d8(){return{flow:{null:{name:"table",tokenize:f8,resolveAll:h8}}}}function f8(e,t,n){const r=this;let o=0,a=0,u;return c;function c(z){let ee=r.events.length-1;for(;ee>-1;){const re=r.events[ee][1].type;if(re==="lineEnding"||re==="linePrefix")ee--;else break}const se=ee>-1?r.events[ee][1].type:null,te=se==="tableHead"||se==="tableRow"?M:d;return te===M&&r.parser.lazy[r.now().line]?n(z):te(z)}function d(z){return e.enter("tableHead"),e.enter("tableRow"),h(z)}function h(z){return z===124||(u=!0,a+=1),p(z)}function p(z){return z===null?n(z):Le(z)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),y):n(z):Ge(z)?Qe(e,p,"whitespace")(z):(a+=1,u&&(u=!1,o+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),E(z)))}function E(z){return z===null||z===124||it(z)?(e.exit("data"),p(z)):(e.consume(z),z===92?T:E)}function T(z){return z===92||z===124?(e.consume(z),E):E(z)}function y(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),u=!1,Ge(z)?Qe(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):x(z))}function x(z){return z===45||z===58?A(z):z===124?(u=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),v):W(z)}function v(z){return Ge(z)?Qe(e,A,"whitespace")(z):A(z)}function A(z){return z===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),C):z===45?(a+=1,C(z)):z===null||Le(z)?H(z):W(z)}function C(z){return z===45?(e.enter("tableDelimiterFiller"),O(z)):W(z)}function O(z){return z===45?(e.consume(z),O):z===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(z))}function R(z){return Ge(z)?Qe(e,H,"whitespace")(z):H(z)}function H(z){return z===124?x(z):z===null||Le(z)?!u||o!==a?W(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):W(z)}function W(z){return n(z)}function M(z){return e.enter("tableRow"),K(z)}function K(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),K):z===null||Le(z)?(e.exit("tableRow"),t(z)):Ge(z)?Qe(e,K,"whitespace")(z):(e.enter("data"),ce(z))}function ce(z){return z===null||z===124||it(z)?(e.exit("data"),K(z)):(e.consume(z),z===92?be:ce)}function be(z){return z===92||z===124?(e.consume(z),ce):ce(z)}}function h8(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,h,p,E;const T=new u8;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(c=!1,d!==0&&(tT(T,t,d,h,p),p=void 0,d=0),h={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",h,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,E=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",p,t]])),o=x.type==="tableDelimiterRow"?2:p?3:1):o&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],E=vl(T,t,a,o,void 0,E),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],E=vl(T,t,a,o,void 0,E)),a=u,u=[a[1],n,0,0])):x.type==="tableHead"?(c=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],E=vl(T,t,a,o,n,E)):u[1]!==0&&(E=vl(T,t,u,o,n,E)),o=0):o&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&tT(T,t,d,h,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=c8(t.events,n))}return e}function vl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Yo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Yo(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const h=Yo(t.events,n[2]),p=Yo(t.events,n[3]),E={type:c,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",E,t]]),r!==2){const T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,v=n[3]-n[2]-1;e.add(x,v,[])}}e.add(n[3]+1,0,[["exit",E,t]])}return o!==void 0&&(a.end=Object.assign({},Yo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function tT(e,t,n,r,o){const a=[],u=Yo(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function Yo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const p8={name:"tasklistCheck",tokenize:g8};function m8(){return{text:{91:p8}}}function g8(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return it(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Le(d)?t(d):Ge(d)?e.check({tokenize:E8},t,n)(d):n(d)}}function E8(e,t,n){return Qe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function y8(e){return _g([$5(),Z5(),a8(e),d8(),m8()])}const b8={};function T8(e){const t=this,n=e||b8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(y8(n)),a.push(U5()),u.push(H5(n))}const x8=()=>S.jsx("span",{className:`${B}-blinking-cursor`,children:S.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:S.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Ih=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>S.jsx(h1,{remarkPlugins:[T8],rehypePlugins:[SE],components:{h1:({children:o})=>S.jsx("h1",{className:$(e,`${B}-header h1`),children:o}),h2:({children:o})=>S.jsx("h2",{className:$(e,`${B}-header h2`),children:o}),h3:({children:o})=>S.jsx("h3",{className:$(e,`${B}-header h3`),children:o}),ul:({children:o})=>S.jsx("ul",{className:$(e,`${B}-ul`),children:o}),ol:({children:o})=>S.jsx("ol",{className:$(e,`${B}-ol`),children:o}),li:({children:o})=>S.jsx("li",{className:$(e,`${B}-li`),children:o}),a:({href:o,children:a})=>S.jsx(RE,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>S.jsx("div",{className:$(e,`${B}-table-container`),children:S.jsx("table",{className:$(e,`${B}-table`),children:o})}),thead:({children:o})=>S.jsx("thead",{className:$(e,`${B}-thead`),children:o}),tbody:({children:o})=>S.jsx("tbody",{className:$(e,`${B}-tbody`),children:o}),tr:({children:o})=>S.jsx("tr",{className:$(e,`${B}-tr`),children:o}),th:({children:o})=>S.jsx("th",{className:$(e,`${B}-th`),children:o}),td:({children:o})=>S.jsx("td",{className:$(e,`${B}-td`),children:o}),span:({className:o,children:a})=>o===`${B}-blinking-cursor`?S.jsx(x8,{}):S.jsx("span",{children:a})},children:r+(n?`<span className='${B}-blinking-cursor'></span>`:"")}),nT=({product:e,globalClassName:t,isFullWidth:n,openLinksInNewTab:r})=>{const{name:o,imageUrl:a,productPageUrl:u,price:c,discountPrice:d,compareAtPrice:h,currencyCode:p}=e,E=typeof d=="number"&&typeof c=="number"&&d<c,T=E?c:h!=null?h:c,y=E?d:c;return S.jsxs("div",{className:$(t,`${B}-msg-product-card`,{"card-full-width":n}),children:[S.jsx("div",{className:$(t,`${B}-msg-product-card__image-wrapper`),children:a&&(u?S.jsx("a",{href:u,target:r?"_blank":"_self",rel:"noopener","aria-label":`Go to product page for ${o}`,children:S.jsx("img",{className:$(t,`${B}-msg-product-card__image`),src:a,alt:o||"Product image",loading:"lazy"})}):S.jsx("img",{className:$(t,`${B}-msg-product-card__image`),src:a,alt:o||"Product image",loading:"lazy"}))}),S.jsxs("div",{className:$(t,`${B}-msg-product-card__content`),children:[u?S.jsx("a",{href:u,target:r?"_blank":"_self",rel:"noopener",className:$(t,`${B}-msg-product-card__title-link`),"aria-label":`Go to product page for ${o}`,children:o}):S.jsx("p",{className:$(t,`${B}-msg-product-card__title`),children:o}),S.jsx("div",{className:$(t,`${B}-msg-product-card__price-row`),children:S.jsx(vb,{globalClassName:t,retailPrice:T,discountPrice:y,currencyCode:p})})]})]})},rT=e=>({id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,currencyCode:e.data.currencyCode}),w8=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o})=>{if(t.length===1){const a=t[0];return S.jsxs("div",{children:[e&&S.jsx("p",{className:$(n,`${B}-product-carousel-title`),children:e}),S.jsx(nT,{product:rT(a),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isFullWidth:!o})]})}return S.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&S.jsx("p",{className:$(n,`${B}-product-carousel-title`),children:e}),S.jsx(LL,{globalClassName:n,spacing:o?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(a=>S.jsx(nT,{product:rT(a),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o},a.id))})]})},iT=({code:e,globalClassName:t})=>S.jsxs("span",{className:$(t,`${B}-cart-chip`),children:[S.jsx(q0,{"aria-hidden":"true"}),S.jsx("span",{children:e})]}),qi=({label:e,badge:t,value:n,currencyCode:r,globalClassName:o,emphasized:a,isDiscount:u,fallback:c})=>{let d;if(typeof n=="number")n===0&&!u?d="Free":d=pa(u?-n:n,r);else if(c)d=c;else return null;return S.jsxs("div",{className:$(o,`${B}-cart-total-row`,{emphasized:a}),children:[S.jsxs("span",{className:$(o,`${B}-cart-total-label`),children:[e,t&&S.jsx("span",{className:$(o,`${B}-cart-total-badge`),children:t})]}),S.jsx("span",{className:$(o,`${B}-cart-total-value`),children:d})]})},_8=({item:e,currencyCode:t,loading:n,globalClassName:r,onRemove:o})=>{var u,c,d;const a=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return S.jsxs("li",{className:$(r,`${B}-cart-item`),children:[e.imageUrl&&S.jsx("div",{className:$(r,`${B}-cart-item-image`),children:S.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),S.jsxs("div",{className:$(r,`${B}-cart-item-details`),children:[S.jsx("p",{className:$(r,`${B}-cart-item-name`),children:e.name}),S.jsxs("div",{className:$(r,`${B}-cart-item-attrs`),children:[((u=e.variants)!=null?u:[]).map(h=>S.jsxs("p",{className:$(r,`${B}-cart-item-attr`),children:[h.lbl,": ",h.value]},`${h.type}-${h.value}`)),((c=e.promotions)!=null?c:[]).map(h=>S.jsxs("p",{className:$(r,`${B}-cart-item-attr`),children:["Promotion: ",h]},h))]}),((d=e.coupons)!=null?d:[]).length>0&&S.jsx("div",{className:$(r,`${B}-cart-chips`),children:e.coupons.map(h=>S.jsx(iT,{code:h,globalClassName:r},h))}),S.jsxs("span",{className:$(r,`${B}-cart-item-price`),children:[a&&S.jsx("span",{className:$(r,`${B}-cart-item-original-price`),children:pa(e.originalSubtotal,t)}),S.jsx("span",{className:$(r,`${B}-cart-item-final-price`),children:pa(e.itemSubtotal,t)})]}),S.jsxs("div",{className:$(r,`${B}-cart-item-footer`),children:[S.jsxs("span",{className:$(r,`${B}-cart-item-qty`),children:["Qty: ",e.quantity]}),S.jsx("button",{type:"button",className:$(r,`${B}-cart-item-remove`),disabled:n,onClick:()=>o(e),children:"Remove"})]})]})]})},v8=({cart:e,globalClassName:t,openLinksInNewTab:n})=>{const{sendMessage:r,loading:o}=Ar(),[a,u]=J.useState(!0),[c,d]=J.useState(""),{items:h=[],currencyCode:p="USD",subtotal:E,total:T,taxes:y,shippingCost:x,shippingDiscount:v,shippingPromotions:A=[],promotionsDiscount:C,promotions:O=[],couponsDiscount:R,couponsApplied:H=[],bodyMessage:W,footerMessage:M,checkoutButtonUrl:K}=e,ce=z=>{o||r(`Remove ${z.name} from my cart`)},be=()=>{const z=c.trim();!z||o||(r(`Apply coupon code ${z}`),d(""))};return S.jsxs("div",{className:$(t,`${B}-cart`),children:[S.jsxs("div",{className:$(t,`${B}-cart-box`),children:[W&&S.jsxs("button",{type:"button",className:$(t,`${B}-cart-summary`),"aria-expanded":a,onClick:()=>u(z=>!z),children:[S.jsx("span",{className:$(t,`${B}-cart-summary-text`),children:S.jsx(Ih,{text:W,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),S.jsx("span",{className:$(t,`${B}-cart-summary-toggle`),"aria-hidden":"true",children:a?S.jsx(YS,{}):S.jsx(WS,{})})]}),a&&S.jsxs("div",{className:$(t,`${B}-cart-expanded`),children:[S.jsx("ul",{className:$(t,`${B}-cart-items`),children:h.map(z=>S.jsx(_8,{item:z,currencyCode:p,loading:o,globalClassName:t,onRemove:ce},z.itemId))}),H.length>0&&S.jsx("div",{className:$(t,`${B}-cart-chips`,`${B}-cart-applied-coupons`),children:H.map(z=>S.jsx(iT,{code:z,globalClassName:t},z))}),S.jsxs("div",{className:$(t,`${B}-cart-totals`),children:[S.jsx(qi,{label:"Subtotal",value:E,currencyCode:p,globalClassName:t}),S.jsx(qi,{label:"Coupon",value:R,currencyCode:p,globalClassName:t,isDiscount:!0}),S.jsx(qi,{label:"Promotions",badge:O[0],value:C,currencyCode:p,globalClassName:t,isDiscount:!0}),S.jsx(qi,{label:"Shipping",value:x,currencyCode:p,globalClassName:t,fallback:"TBD"}),S.jsx(qi,{label:"Shipping Discount",badge:A[0],value:v,currencyCode:p,globalClassName:t,isDiscount:!0}),S.jsx(qi,{label:"Tax",value:y,currencyCode:p,globalClassName:t,fallback:"TBD"}),S.jsx(qi,{label:"Total",value:T,currencyCode:p,globalClassName:t,emphasized:!0})]})]})]}),S.jsxs("div",{className:$(t,`${B}-cart-coupon`),children:[S.jsxs("div",{className:$(t,`${B}-cart-coupon-field`),children:[S.jsx("span",{className:$(t,`${B}-cart-coupon-icon`),"aria-hidden":"true",children:S.jsx(q0,{})}),S.jsx("input",{type:"text",className:$(t,`${B}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:c,disabled:o,onChange:z=>d(z.target.value),onKeyDown:z=>{z.key==="Enter"&&(z.preventDefault(),be())}})]}),S.jsx("button",{type:"button",className:$(t,`${B}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:o||!c.trim(),onClick:be,children:S.jsx(qS,{"aria-hidden":"true"})})]}),K&&S.jsxs("a",{className:$(t,`${B}-cart-checkout-button`),href:K,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[S.jsx($S,{"aria-hidden":"true"}),S.jsx("span",{children:"Checkout"})]}),S.jsx("p",{className:$(t,`${B}-cart-footer`),children:M||"Shipping and taxes calculated at checkout."})]})};function S8(e){return mt({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"},child:[]}]})(e)}const A8=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return S.jsxs(mh,{className:$(n,`${B}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[S.jsx(fh,{className:$(n,`${B}-pdp-gallery__item-group`),children:e.map((o,a)=>S.jsx(dh,{index:a,className:$(n,`${B}-pdp-gallery__item`),children:S.jsx("img",{className:$(n,`${B}-pdp-gallery__image`),src:o,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,loading:"lazy"})},o))}),r&&S.jsxs(uh,{className:$(n,`${B}-pdp-gallery__control`),children:[S.jsx(ph,{className:$(n,`${B}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:S.jsx(eb,{size:"16px"})}),S.jsx(hh,{className:$(n,`${B}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:S.jsx(tb,{size:"16px"})})]}),r&&S.jsx(ch,{className:$(n,`${B}-pdp-gallery__indicator-group`),children:e.map((o,a)=>S.jsx(lh,{index:a,className:$(n,`${B}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},ga="color",Rh=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,oT=e=>e.replace(/(^|\/)large\//,"$1medium/"),sT=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===ga&&n.vals.includes(t)),C8=(e,t)=>{var c,d;const n=((c=e.imgGroups)!=null?c:[]).filter(h=>h.viewType==="large"),r=t&&n.find(h=>sT(h,t)),o=n.find(h=>h.vattr===null),a=r||o||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(h=>Rh(e.baseUrl,oT(h.url)));return u.length>0?u:e.imageUrl?[Rh(e.baseUrl,oT(e.imageUrl))]:[]},k8=(e,t)=>{var o,a,u;const n=((o=e.imgGroups)!=null?o:[]).find(c=>c.viewType==="swatch"&&sT(c,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?Rh(e.baseUrl,r):""},Sl=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(o=>{var a;return((a=o.vars)==null?void 0:a[t])!==n||o.ord===!1?!1:Object.entries(r).every(([u,c])=>{var d;return u===t||((d=o.vars)==null?void 0:d[u])===c})}),N8=(e,t)=>{const n=Object.keys(t);return n.length===0?!0:!e||e.length===0?!1:e.some(r=>r.ord!==!1&&n.every(o=>{var a;return((a=r.vars)==null?void 0:a[o])===t[o]}))},O8=(e,t,n,r,o)=>{if(!e||e.length===0)return ae(F({},o),{[n]:r});const a=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length&&Object.entries(o).every(([h,p])=>{var E;return h===n||((E=c.vars)==null?void 0:E[h])===p})});if(a)return F({},a.vars);const u=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length});return u?F({},u.vars):ae(F({},o),{[n]:r})},I8=(e,t)=>{var o,a,u,c;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(o=e.id)!=null?o:null;if(!e.vmat||e.vmat.length===0)return(a=e.id)!=null?a:null;const r=e.vmat.find(d=>d.ord!==!1&&Object.entries(t).every(([h,p])=>{var E;return((E=d.vars)==null?void 0:E[h])===p}));return(c=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?c:null},R8=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([o,a])=>{var u;return((u=r.vars)==null?void 0:u[o])===a}));return n!=null&&n.pr?n.pr:e.pr},P8=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const o=r.opts.find(u=>Sl(e.vmat,r.id,u.val)),a=o!=null?o:r.opts[0];a&&(t[r.id]=a.val)}return t},L8=({product:e,globalClassName:t,openLinksInNewTab:n})=>{var te,re,fe,ke,he,Q,oe;const{sendMessage:r,loading:o}=Ar(),a=e.data,u=(te=a.vattr)!=null?te:[],[c,d]=J.useState(()=>P8(a)),h=N8(a.vmat,c),p=(fe=(re=a.quantity)==null?void 0:re.minQuantity)!=null?fe:1,E=(he=(ke=a.quantity)==null?void 0:ke.maxQuantity)!=null?he:Number.POSITIVE_INFINITY,T=(oe=(Q=a.quantity)==null?void 0:Q.increment)!=null?oe:1,[y,x]=J.useState(p),v=c[ga],A=J.useMemo(()=>C8(a,v),[a,v]),C=J.useMemo(()=>R8(a,c),[a,c]),O=u.find(_=>_.id===ga),R=u.filter(_=>_.id!==ga),H=(_,P)=>()=>{d(X=>{const N=!Sl(a.vmat,_,P,X);return _===ga||N?O8(a.vmat,u,_,P,X):ae(F({},X),{[_]:P})})},W=()=>{if(o)return;const _=I8(a,c),P=u.map(Be=>{const _e=c[Be.id],$e=Be.opts.find(ot=>ot.val===_e);return $e?`${Be.lbl||Be.id}: ${$e.name||_e}`:null}).filter(Boolean).join(", "),X=y>1?`Add ${y} of`:"Add",N=a.name||"this product",xe=P?` (${P})`:"",Re=_?` [SKU: ${_}]`:"",Oe=`${X} ${N} to my cart${xe}${Re}`;r(Oe)},M=!h||y-T<p,K=!h||y+T>E,ce=_=>{var X;const P=c[_.id];return(X=_.opts.find(N=>N.val===P))==null?void 0:X.name},be=()=>x(_=>Math.max(p,_-T)),z=()=>x(_=>Math.min(E,_+T)),ee=_=>S.jsxs("div",{className:$(t,`${B}-msg-pdp__variant`),children:[S.jsxs("div",{className:$(t,`${B}-msg-pdp__variant-label`),children:[S.jsx("span",{id:`variant-label-${_.id}`,className:$(t,`${B}-msg-pdp__variant-name`),children:_.lbl||_.id}),ce(_)&&S.jsx("span",{className:$(t,`${B}-msg-pdp__variant-value`),children:ce(_)})]}),S.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${_.id}`,className:$(t,`${B}-msg-pdp__chips`),children:_.opts.map(P=>{const X=Sl(a.vmat,_.id,P.val,c),N=c[_.id]===P.val;return S.jsxs("label",{className:$(`${B}-msg-pdp__chip`,{selected:N,unavailable:!X}),children:[S.jsx("input",{type:"radio",name:`variant-${_.id}`,value:P.val,checked:N,"aria-description":X?void 0:"unavailable",onChange:H(_.id,P.val),className:`${B}-msg-pdp__radio-input`}),S.jsx("span",{children:P.name||P.val})]},P.val)})})]},_.id),se=_=>S.jsxs("div",{className:$(t,`${B}-msg-pdp__variant`),children:[S.jsxs("div",{className:$(t,`${B}-msg-pdp__variant-label`),children:[S.jsx("span",{id:`variant-label-${_.id}`,className:$(t,`${B}-msg-pdp__variant-name`),children:_.lbl||"Color"}),ce(_)&&S.jsx("span",{className:$(t,`${B}-msg-pdp__variant-value`),children:ce(_)})]}),S.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${_.id}`,className:$(t,`${B}-msg-pdp__swatches`),children:_.opts.map(P=>{const X=Sl(a.vmat,_.id,P.val,c),N=c[_.id]===P.val,xe=k8(a,P.val);return xe?S.jsxs("label",{className:$(`${B}-msg-pdp__swatch`,{selected:N,unavailable:!X}),children:[S.jsx("input",{type:"radio",name:`variant-${_.id}`,value:P.val,checked:N,"aria-label":P.name||P.val,"aria-description":X?void 0:"unavailable",onChange:H(_.id,P.val),className:`${B}-msg-pdp__radio-input`}),S.jsx("img",{className:$(t,`${B}-msg-pdp__swatch-image`),src:xe,alt:P.name||P.val,loading:"lazy"})]},P.val):S.jsxs("label",{className:$(`${B}-msg-pdp__chip`,{selected:N,unavailable:!X}),children:[S.jsx("input",{type:"radio",name:`variant-${_.id}`,value:P.val,checked:N,"aria-description":X?void 0:"unavailable",onChange:H(_.id,P.val),className:`${B}-msg-pdp__radio-input`}),S.jsx("span",{children:P.name||P.val})]},P.val)})})]});return S.jsx("div",{className:$(t,`${B}-msg-pdp`),children:S.jsxs("div",{className:$(t,`${B}-msg-pdp__card`),children:[S.jsx("div",{className:$(t,`${B}-msg-pdp__gallery`),children:S.jsx(A8,{images:A,altText:a.name,globalClassName:t})}),S.jsxs("div",{className:$(t,`${B}-msg-pdp__content`),children:[a.slugUrl?S.jsx("a",{href:a.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:$(t,`${B}-msg-pdp__title-link`),"aria-label":`Go to product page for ${a.name}`,children:a.name}):S.jsx("p",{className:$(t,`${B}-msg-pdp__title`),children:a.name}),S.jsx(vb,{globalClassName:t,className:`${B}-msg-pdp__price`,retailPrice:C==null?void 0:C.orig,discountPrice:(C==null?void 0:C.cur)||(C==null?void 0:C.prom),currencyCode:a.ccy,fontSize:"14px"}),a.dscr&&S.jsx("p",{className:$(t,`${B}-msg-pdp__description`),children:a.dscr}),O&&se(O),R.map(ee),S.jsxs("div",{className:$(t,`${B}-msg-pdp__variant`),children:[S.jsxs("div",{className:$(t,`${B}-msg-pdp__variant-label`),children:[S.jsx("span",{className:$(t,`${B}-msg-pdp__variant-name`),children:"Quantity"}),S.jsx("span",{className:$(t,`${B}-msg-pdp__variant-value`),children:y})]}),S.jsxs("div",{className:$(t,`${B}-msg-pdp__stepper`),children:[S.jsx(ar,{className:`${B}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:S.jsx(DS,{}),disabled:M,onClick:be}),S.jsx("span",{className:$(t,`${B}-msg-pdp__quantity`),children:y}),S.jsx(ar,{className:`${B}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:S.jsx(MS,{}),disabled:K,onClick:z})]})]}),S.jsxs("div",{className:$(t,`${B}-msg-pdp__actions`),children:[S.jsxs(ku,{className:`${B}-msg-pdp__express-pay`,disabled:!0,children:[S.jsx(S8,{size:"16px"})," Pay"]}),S.jsx(ku,{className:`${B}-msg-pdp__add-to-cart`,disabled:!h||o,onClick:W,children:o?"Adding...":"Add to cart"})]})]})]})})},aT=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:o,loading:a}=Ar();return S.jsx(S.Fragment,{children:e.response.map((u,c)=>{var d,h,p,E,T,y,x,v,A,C,O,R,H,W,M,K;switch(u.type){case"markdown":return S.jsx(Ih,{text:(h=(d=u.data)==null?void 0:d.content)!=null?h:"",globalClassName:t,openLinksInNewTab:n,showIsLoading:!1},`${u.type}-${(p=u.index)!=null?p:c}`);case"product_carousel":return S.jsx(w8,{title:(T=(E=u.data)==null?void 0:E.title)!=null?T:"",products:(x=(y=u.data)==null?void 0:y.products)!=null?x:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${u.type}-${(v=u.index)!=null?v:c}`);case"product_tile":return S.jsx(L8,{product:u.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${u.type}-${(A=u.index)!=null?A:c}`);case"cart":{const ce=(R=(O=(C=u.data)==null?void 0:C.cart)==null?void 0:O.cartSummary)==null?void 0:R.cartDetails;return ce?S.jsx(v8,{cart:ce,productsToHighlight:u.data.products_to_highlight,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${u.type}-${(H=u.index)!=null?H:c}`):null}case"suggestions":return S.jsx("div",{style:{marginTop:"0.5rem"},children:S.jsx(iD,{disabled:a,suggestions:(M=(W=u.data)==null?void 0:W.display_text)!=null?M:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:o})},`${u.type}-${(K=u.index)!=null?K:c}`);default:return null}})})},D8=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:o}=Nt(),a=J.useMemo(()=>{try{const c=JSON.parse(e.content);return Array.isArray(c==null?void 0:c.response)?c:null}catch(c){return null}},[e.content]),u=J.useMemo(()=>{const c="Oops, I had trouble with your request.";if(typeof e.content!="string")return o==null||o.warn("Message content is not richtext format. Showing fallback text.",e.content),c;const d=e.content.trim();try{const h=JSON.parse(d);if(typeof h=="object"&&h!==null)return o==null||o.debug("Detected JSON object instead of array of responses in message content",e.content),h.text||h.message||c}catch(h){if(d.startsWith("{")||d.startsWith("["))return o==null||o.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),c}return e.content||c},[o,e.content]);switch(e.role){case"user":return S.jsx("div",{className:$(t,`${B}-message`,r?"standalone":"embedded"),children:S.jsx("div",{className:$(t,`${B}-user-message`,r?"standalone":"embedded"),children:S.jsxs("div",{className:$(t,`${B}-user-message-row`,r?"standalone":"embedded"),children:[S.jsx("span",{className:$(t,`${B}-message-icon user-message-icon`,r?"standalone":"embedded"),children:S.jsx(VS,{})}),S.jsx("p",{className:$(t,`${B}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return S.jsx("div",{className:$(t,`${B}-message-group`,r?"standalone":"embedded"),children:S.jsx("div",{className:`${B}-message-group-child`,children:a?S.jsx(aT,{content:a,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):S.jsx(Ih,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return S.jsx("div",{className:$(t,`${B}-message`,r?"standalone":"embedded"),children:S.jsx("p",{className:$(t,`${B}-reset-message`),children:e.content})})}},Ph=({isWidgetStandalone:e})=>{const{globalClassName:t,openLinksInNewTab:n}=Nt(),{messages:r,streamingBlocks:o,isAgentTyping:a,loading:u,progressMessage:c,connectionStatus:d}=Ar(),h=J.useRef(null),p=r.length>0,E=o.length>0,T=p&&(u||a)&&!E,y=d==="reconnecting"&&!T;return J.useEffect(()=>{var x;(x=h.current)==null||x.scrollIntoView({behavior:"smooth"})},[r,o]),S.jsxs(S.Fragment,{children:[u&&!p&&S.jsx(lD,{globalClassName:t,isWidgetStandalone:e}),r.map(x=>S.jsx(D8,{message:x,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},x.id)),E&&S.jsxs("div",{className:$(t,`${B}-message-group`,e?"standalone":"embedded"),children:[S.jsx(aT,{content:{response:o},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(u||a)&&S.jsx(wh,{globalClassName:t,isWidgetStandalone:e})]}),T&&S.jsx(wh,{globalClassName:t,isWidgetStandalone:e,loadingText:c}),y&&S.jsx(wh,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),S.jsx("div",{ref:h})]})},uT=()=>{const{globalClassName:e,themeVariables:t}=Nt(),{isAgentTyping:n,sendMessage:r,resetConversation:o}=Ar(),a=n;return S.jsxs("div",{className:$(e,`${B}-container`,`${B}-embedded-chat`),style:t,children:[S.jsx("div",{className:$(e,`${B}-message-container`,"embedded"),children:S.jsx(Ph,{isWidgetStandalone:!1})}),S.jsx(Af,{componentType:"chat",className:"embedded-chat",isLoading:a,onSubmit:u=>r(u)}),S.jsx("div",{className:$(`${B}-embedded-chat-menu`),children:S.jsxs(gL,{componentType:"chat",children:[S.jsx(Sb,{componentType:"chat"}),S.jsx(DE,{componentType:"chat",onClearChat:o})]})})]})},lT=e=>{var d;const{children:t,disabled:n}=e,[r,o]=J.useState((d=e.container)==null?void 0:d.current),a=J.useSyncExternalStore(F8,()=>!1,()=>!0),{getRootNode:u}=Tl();if(J.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),a||n)return S.jsx(S.Fragment,{children:t});const c=r!=null?r:M8(u);return S.jsx(S.Fragment,{children:J.Children.map(t,h=>Os.createPortal(h,c))})},M8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Fi(n)?n:dr(t).body},F8=()=>()=>{},cT=()=>{const{globalClassName:e,themeVariables:t}=Nt(),{mode:n,status:r,dialogPosition:o,isDialogFullHeight:a,dialogWidth:u}=ki(),{loading:c,isAgentTyping:d,sendMessage:h,resetConversation:p}=Ar(),{isOpen:E}=r||{},T=!!r.isOpen,y=n==="standalone",x=d||c,v=()=>{Ci(!1)};return S.jsx(yb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:T,children:S.jsx(lT,{children:S.jsx(yh,{className:$(e,`${B}-container`,`${B}-dialog`,o,a&&"full-height"),style:F(F({},t),u&&{width:u}),children:S.jsxs(gh,{className:$(e,`${B}-dialog-content`,{standalone:y,embedded:!y}),children:[S.jsx(wb,{componentType:"dialog",onClearChat:p,onClose:v}),S.jsx(Eh,{className:$(e,`${B}-message-container`,{standalone:y,embedded:!y}),children:S.jsx(Ph,{isWidgetStandalone:y,isOpen:E})}),S.jsx(Af,{componentType:"dialog",isLoading:x,onSubmit:A=>h(A)})]})})})})},dT=()=>{const{globalClassName:e,themeVariables:t}=Nt(),{mode:n,status:r,isModalFullscreen:o}=ki(),{isAgentTyping:a,sendMessage:u,resetConversation:c}=Ar(),{isOpen:d}=r||{},h=!!r.isOpen,p=n==="standalone",E=a,T=({open:x})=>{Ci(x)},y=()=>{Ci(!1)};return h?S.jsx(yb,{lazyMount:!0,unmountOnExit:!0,open:h,onOpenChange:T,children:S.jsx(lT,{children:S.jsxs("div",{className:$(e,`${B}-modal-container`),style:t,children:[S.jsx(hb,{className:$(e,`${B}-modal-backdrop`)}),S.jsx(yh,{className:$(e,`${B}-container`,`${B}-modal`,{fullscreen:o,standalone:p,embedded:!p}),children:S.jsxs(gh,{className:$(e,`${B}-modal-content`,{standalone:p,embedded:!p}),children:[S.jsx(wb,{componentType:"modal",onClearChat:c,onClose:y}),S.jsx(Eh,{className:$(e,`${B}-message-container`,{standalone:p,embedded:!p}),children:S.jsx(Ph,{isWidgetStandalone:p,isOpen:d})}),S.jsx(Af,{componentType:"modal",isLoading:E,onSubmit:x=>u(x)})]})})]})})}):null},B8=()=>{const e=ki(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?S.jsx(HS,{}):t==="dialog"?S.jsx(cT,{}):t==="modal"?S.jsx(dT,{}):S.jsx(uT,{})},Lh=e=>S.jsx(R0,ae(F({},e),{children:S.jsx(B8,{})}));var Al={},fT;function U8(){if(fT)return Al;fT=1;var e=F0();return Al.createRoot=e.createRoot,Al.hydrateRoot=e.hydrateRoot,Al}var hT=U8();const H8=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=sn(o,["elementId","timeout"]);let a;const u=(d,h)=>{var p;for(const E of d)if(E.type==="childList"&&E.addedNodes.length)for(const T of E.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Ai(!0,"log","Target element found, rendering Messaging Widget"),h.disconnect(),clearTimeout(a),(p=hT.createRoot(T))==null||p.render(S.jsx(Lh,ae(F({},n),{mode:"messaging"}))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ai(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},z8=r=>{var o=r,{timeout:e,elementId:t}=o,n=sn(o,["timeout","elementId"]);if(!n.messagingConfig){Ai(!0,"error","Messaging Widget requires messagingConfig");return}if(!n.messagingConfig.scrt2Url||!n.messagingConfig.orgId||!n.messagingConfig.esDeveloperName){Ai(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const a=document.getElementById(t);if(!a){Ai(!0,"warn","Container element not found for id:",t),Ai(!0,"warn","Beginning observation for element"),H8(F({elementId:t,timeout:e},n));return}hT.createRoot(a).render(S.jsx(Lh,ae(F({},n),{mode:"messaging"})))},j8={components:{setEntryType:O0,toggleWidgetOpen:Ci,toggleWidgetMinimized:vu,toggleModalFullscreen:wd,setWidgetType:Su,setWidgetDialogPosition:_d}};Ie.AgentForceWidget=Lh,Ie.AgentforceWidgetProvider=R0,Ie.MessagingDialog=cT,Ie.MessagingEmbed=uT,Ie.MessagingModal=dT,Ie.MessagingProvider=N0,Ie.eventHandlers=j8,Ie.injectMessagingWidget=z8,Ie.useMessaging=Ar,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})}));
49
+ `))+1))}const u="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let h=n.containerPhrasing(e,B({before:"# ",after:`
50
+ `},a.current()));return/^[\t ]/.test(h)&&(h=ma(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,n.options.closeAtx&&(h+=" "+u),d(),c(),h}Db.peek=l5;function Db(e){return e.value||""}function l5(){return"<"}Mb.peek=c5;function Mb(e,t,n,r){const o=Ch(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,B({before:h,after:"]"},d.current()))),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,B({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,B({before:h,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,B({before:h,after:o},d.current()))),h+=d.move(o),c()),h+=d.move(")"),u(),h}function c5(){return"!"}Fb.peek=d5;function Fb(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const h=n.safe(e.alt,B({before:d,after:"]"},c.current()));d+=c.move(h+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const g=n.safe(n.associationId(e),B({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!h||h!==g?d+=c.move(g+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function d5(){return"!"}Bb.peek=f5;function Bb(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return o+r+o}function f5(){return"`"}function Ub(e,t){const n=Bd(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Hb.peek=h5;function Hb(e,t,n,r){const o=Ch(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(Ub(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let g=u.move("<");return g+=u.move(n.containerPhrasing(e,B({before:g,after:">"},u.current()))),g+=u.move(">"),c(),n.stack=p,g}c=n.enter("link"),d=n.enter("label");let h=u.move("[");return h+=u.move(n.containerPhrasing(e,B({before:h,after:"]("},u.current()))),h+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(n.safe(e.url,B({before:h,after:">"},u.current()))),h+=u.move(">")):(d=n.enter("destinationRaw"),h+=u.move(n.safe(e.url,B({before:h,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),h+=u.move(" "+o),h+=u.move(n.safe(e.title,B({before:h,after:o},u.current()))),h+=u.move(o),d()),h+=u.move(")"),c(),h}function h5(e,t,n){return Ub(e,n)?"<":"["}zb.peek=p5;function zb(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const h=n.containerPhrasing(e,B({before:d,after:"]"},c.current()));d+=c.move(h+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const g=n.safe(n.associationId(e),B({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!h||h!==g?d+=c.move(g+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function p5(){return"["}function kh(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function m5(e){const t=kh(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function g5(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function jb(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function E5(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?g5(n):kh(n);const c=e.ordered?u==="."?")":".":m5(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),jb(n)===u&&p){let g=-1;for(;++g<e.children.length;){const T=e.children[g];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const h=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),h}function y5(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function b5(e,t,n,r){const o=y5(n);let a=n.bulletCurrent||kh(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),p);return d(),h;function p(g,T,y){return T?(y?"":" ".repeat(u))+g:(y?a:a+" ".repeat(u-a.length))+g}}function T5(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const x5=Uu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function w5(e,t,n,r){return(e.children.some(function(u){return x5(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function _5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}$b.peek=v5;function $b(e,t,n,r){const o=_5(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,B({after:o,before:c},u.current())));const h=d.charCodeAt(0),p=_l(r.before.charCodeAt(r.before.length-1),h,o);p.inside&&(d=ma(h)+d.slice(1));const g=d.charCodeAt(d.length-1),T=_l(r.after.charCodeAt(0),g,o);T.inside&&(d=d.slice(0,-1)+ma(g));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function v5(e,t,n){return n.options.strong||"*"}function S5(e,t,n,r){return n.safe(e.value,r)}function A5(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function C5(e,t,n){const r=(jb(n)+(n.options.ruleSpaces?" ":"")).repeat(A5(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Vb={blockquote:QD,break:Pb,code:n5,definition:i5,emphasis:Lb,hardBreak:Pb,heading:u5,html:Db,image:Mb,imageReference:Fb,inlineCode:Bb,link:Hb,linkReference:zb,list:E5,listItem:b5,paragraph:T5,root:w5,strong:$b,text:S5,thematicBreak:C5};function k5(){return{enter:{table:N5,tableData:qb,tableHeader:qb,tableRow:I5},exit:{codeText:R5,table:O5,tableData:Nh,tableHeader:Nh,tableRow:Nh}}}function N5(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function O5(e){this.exit(e),this.data.inTable=void 0}function I5(e){this.enter({type:"tableRow",children:[]},e)}function Nh(e){this.exit(e)}function qb(e){this.enter({type:"tableCell",children:[]},e)}function R5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,P5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function P5(e,t){return t==="|"?t:e}function L5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
51
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:c}};function u(y,x,S,A){return h(p(y,S,A),y.align)}function c(y,x,S,A){const C=g(y,S,A),O=h([C]);return O.slice(0,O.indexOf(`
52
+ `))}function d(y,x,S,A){const C=S.enter("tableCell"),O=S.enter("phrasing"),R=S.containerPhrasing(y,ae(B({},A),{before:a,after:a}));return O(),C(),R}function h(y,x){return GD(y,{align:x,alignDelimiters:r,padding:n,stringLength:o})}function p(y,x,S){const A=y.children;let C=-1;const O=[],R=x.enter("table");for(;++C<A.length;)O[C]=g(A[C],x,S);return R(),O}function g(y,x,S){const A=y.children;let C=-1;const O=[],R=x.enter("tableRow");for(;++C<A.length;)O[C]=d(A[C],y,x,S);return R(),O}function T(y,x,S){let A=Vb.inlineCode(y,x,S);return S.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function D5(){return{exit:{taskListCheckValueChecked:Yb,taskListCheckValueUnchecked:Yb,paragraph:F5}}}function M5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:B5}}}function Yb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function F5(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function B5(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=Vb.listItem(e,t,n,B(B({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(p){return p+u}}function U5(){return[ED(),BD(),jD(),k5(),D5()]}function H5(e){return{extensions:[yD(),UD(e),$D(),L5(e),M5()]}}const z5={tokenize:W5,partial:!0},Wb={tokenize:G5,partial:!0},Gb={tokenize:K5,partial:!0},Kb={tokenize:Q5,partial:!0},j5={tokenize:X5,partial:!0},Qb={name:"wwwAutolink",tokenize:q5,previous:Jb},Xb={name:"protocolAutolink",tokenize:Y5,previous:Zb},Rr={name:"emailAutolink",tokenize:V5,previous:eT},yr={};function $5(){return{text:yr}}let Vi=48;for(;Vi<123;)yr[Vi]=Rr,Vi++,Vi===58?Vi=65:Vi===91&&(Vi=97);yr[43]=Rr,yr[45]=Rr,yr[46]=Rr,yr[95]=Rr,yr[72]=[Rr,Xb],yr[104]=[Rr,Xb],yr[87]=[Rr,Qb],yr[119]=[Rr,Qb];function V5(e,t,n){const r=this;let o,a;return u;function u(g){return!Oh(g)||!eT.call(r,r.previous)||Ih(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return Oh(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(j5,p,h)(g):g===45||g===95||Gt(g)?(a=!0,e.consume(g),d):p(g)}function h(g){return e.consume(g),o=!0,d}function p(g){return a&&o&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function q5(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!Jb.call(r,r.previous)||Ih(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(z5,e.attempt(Wb,e.attempt(Gb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function Y5(e,t,n){const r=this;let o="",a=!1;return u;function u(g){return(g===72||g===104)&&Zb.call(r,r.previous)&&!Ih(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(nn(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const T=o.toLowerCase();if(T==="http"||T==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),a?h:(a=!0,d)):n(g)}function h(g){return g===null||Iu(g)||it(g)||Oi(g)||Ru(g)?n(g):e.attempt(Wb,e.attempt(Gb,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function W5(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function G5(e,t,n){let r,o,a;return u;function u(h){return h===46||h===95?e.check(Kb,d,c)(h):h===null||it(h)||Oi(h)||h!==45&&Ru(h)?d(h):(a=!0,e.consume(h),u)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),u}function d(h){return o||r||!a?n(h):t(h)}}function K5(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(Kb,t,a)(u):u===null||it(u)||Oi(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function Q5(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||it(c)||Oi(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||it(c)||Oi(c)?t(c):r(c)}function a(c){return nn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):nn(c)?(e.consume(c),u):n(c)}}function X5(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Gt(a)?n(a):t(a)}}function Jb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||it(e)}function Zb(e){return!nn(e)}function eT(e){return!(e===47||Oh(e))}function Oh(e){return e===43||e===45||e===46||e===95||Gt(e)}function Ih(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const J5={tokenize:s8,partial:!0};function Z5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:r8,continuation:{tokenize:i8},exit:o8}},text:{91:{name:"gfmFootnoteCall",tokenize:n8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:e8,resolveTo:t8}}}}function e8(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const h=Yn(r.sliceSerialize({start:u.end,end:r.now()}));return h.codePointAt(0)!==94||!a.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function t8(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function n8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(a>999||g===93&&!u||g===null||g===91||it(g))return n(g);if(g===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(Yn(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return it(g)||(u=!0),a++,e.consume(g),g===92?p:h}function p(g){return g===91||g===92||g===93?(e.consume(g),a++,h):h(g)}}function r8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(x)}function p(x){if(u>999||x===93&&!c||x===null||x===91||it(x))return n(x);if(x===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Yn(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return it(x)||(c=!0),u++,e.consume(x),x===92?g:p}function g(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}function T(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),o.includes(a)||o.push(a),Qe(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function i8(e,t,n){return e.check(Fs,t,e.attempt(J5,t,n))}function o8(e){e.exit("gfmFootnoteDefinition")}function s8(e,t,n){const r=this;return Qe(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function a8(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let h=d;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[d][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[d][1].end)},g={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,c],["enter",u[h][1],c],["exit",u[h][1],c],["enter",g,c]],y=c.parser.constructs.insideSpan.null;y&&xn(T,T.length,0,Pu(y,u.slice(h+1,d),c)),xn(T,T.length,0,[["exit",g,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),xn(u,h-1,d-h+3,T),d=h+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const h=this.previous,p=this.events;let g=0;return T;function T(x){return h===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const S=bo(h);if(x===126)return g>1?d(x):(u.consume(x),g++,y);if(g<2&&!n)return d(x);const A=u.exit("strikethroughSequenceTemporary"),C=bo(x);return A._open=!C||C===2&&!!S,A._close=!S||S===2&&!!C,c(x)}}}class u8{constructor(){this.map=[]}add(t,n,r){l8(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function l8(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function c8(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function d8(){return{flow:{null:{name:"table",tokenize:f8,resolveAll:h8}}}}function f8(e,t,n){const r=this;let o=0,a=0,u;return c;function c(z){let X=r.events.length-1;for(;X>-1;){const re=r.events[X][1].type;if(re==="lineEnding"||re==="linePrefix")X--;else break}const se=X>-1?r.events[X][1].type:null,J=se==="tableHead"||se==="tableRow"?F:d;return J===F&&r.parser.lazy[r.now().line]?n(z):J(z)}function d(z){return e.enter("tableHead"),e.enter("tableRow"),h(z)}function h(z){return z===124||(u=!0,a+=1),p(z)}function p(z){return z===null?n(z):Le(z)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),y):n(z):Ge(z)?Qe(e,p,"whitespace")(z):(a+=1,u&&(u=!1,o+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g(z)))}function g(z){return z===null||z===124||it(z)?(e.exit("data"),p(z)):(e.consume(z),z===92?T:g)}function T(z){return z===92||z===124?(e.consume(z),g):g(z)}function y(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),u=!1,Ge(z)?Qe(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):x(z))}function x(z){return z===45||z===58?A(z):z===124?(u=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),S):W(z)}function S(z){return Ge(z)?Qe(e,A,"whitespace")(z):A(z)}function A(z){return z===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),C):z===45?(a+=1,C(z)):z===null||Le(z)?H(z):W(z)}function C(z){return z===45?(e.enter("tableDelimiterFiller"),O(z)):W(z)}function O(z){return z===45?(e.consume(z),O):z===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(z))}function R(z){return Ge(z)?Qe(e,H,"whitespace")(z):H(z)}function H(z){return z===124?x(z):z===null||Le(z)?!u||o!==a?W(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):W(z)}function W(z){return n(z)}function F(z){return e.enter("tableRow"),K(z)}function K(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),K):z===null||Le(z)?(e.exit("tableRow"),t(z)):Ge(z)?Qe(e,K,"whitespace")(z):(e.enter("data"),ce(z))}function ce(z){return z===null||z===124||it(z)?(e.exit("data"),K(z)):(e.consume(z),z===92?be:ce)}function be(z){return z===92||z===124?(e.consume(z),ce):ce(z)}}function h8(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,h,p,g;const T=new u8;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(c=!1,d!==0&&(tT(T,t,d,h,p),p=void 0,d=0),h={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",h,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,g=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",p,t]])),o=x.type==="tableDelimiterRow"?2:p?3:1):o&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],g=vl(T,t,a,o,void 0,g),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],g=vl(T,t,a,o,void 0,g)),a=u,u=[a[1],n,0,0])):x.type==="tableHead"?(c=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],g=vl(T,t,a,o,n,g)):u[1]!==0&&(g=vl(T,t,u,o,n,g)),o=0):o&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&tT(T,t,d,h,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=c8(t.events,n))}return e}function vl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Yo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Yo(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const h=Yo(t.events,n[2]),p=Yo(t.events,n[3]),g={type:c,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",g,t]]),r!==2){const T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,S=n[3]-n[2]-1;e.add(x,S,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return o!==void 0&&(a.end=Object.assign({},Yo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function tT(e,t,n,r,o){const a=[],u=Yo(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function Yo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const p8={name:"tasklistCheck",tokenize:g8};function m8(){return{text:{91:p8}}}function g8(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return it(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Le(d)?t(d):Ge(d)?e.check({tokenize:E8},t,n)(d):n(d)}}function E8(e,t,n){return Qe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function y8(e){return vg([$5(),Z5(),a8(e),d8(),m8()])}const b8={};function T8(e){const t=this,n=e||b8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(y8(n)),a.push(U5()),u.push(H5(n))}const x8=()=>_.jsx("span",{className:`${M}-blinking-cursor`,children:_.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Rh=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>_.jsx(p1,{remarkPlugins:[T8],rehypePlugins:[AE],components:{h1:({children:o})=>_.jsx("h1",{className:$(e,`${M}-header h1`),children:o}),h2:({children:o})=>_.jsx("h2",{className:$(e,`${M}-header h2`),children:o}),h3:({children:o})=>_.jsx("h3",{className:$(e,`${M}-header h3`),children:o}),ul:({children:o})=>_.jsx("ul",{className:$(e,`${M}-ul`),children:o}),ol:({children:o})=>_.jsx("ol",{className:$(e,`${M}-ol`),children:o}),li:({children:o})=>_.jsx("li",{className:$(e,`${M}-li`),children:o}),a:({href:o,children:a})=>_.jsx(PE,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>_.jsx("div",{className:$(e,`${M}-table-container`),children:_.jsx("table",{className:$(e,`${M}-table`),children:o})}),thead:({children:o})=>_.jsx("thead",{className:$(e,`${M}-thead`),children:o}),tbody:({children:o})=>_.jsx("tbody",{className:$(e,`${M}-tbody`),children:o}),tr:({children:o})=>_.jsx("tr",{className:$(e,`${M}-tr`),children:o}),th:({children:o})=>_.jsx("th",{className:$(e,`${M}-th`),children:o}),td:({children:o})=>_.jsx("td",{className:$(e,`${M}-td`),children:o}),span:({className:o,children:a})=>o===`${M}-blinking-cursor`?_.jsx(x8,{}):_.jsx("span",{children:a})},children:r+(n?`<span className='${M}-blinking-cursor'></span>`:"")}),nT=({product:e,globalClassName:t,isFullWidth:n,openLinksInNewTab:r})=>{const{name:o,imageUrl:a,productPageUrl:u,price:c,discountPrice:d,compareAtPrice:h,currencyCode:p}=e,g=typeof d=="number"&&typeof c=="number"&&d<c,T=g?c:h!=null?h:c,y=g?d:c;return _.jsxs("div",{className:$(t,`${M}-msg-product-card`,{"card-full-width":n}),children:[_.jsx("div",{className:$(t,`${M}-msg-product-card__image-wrapper`),children:a&&(u?_.jsx("a",{href:u,target:r?"_blank":"_self",rel:"noopener","aria-label":`Go to product page for ${o}`,children:_.jsx("img",{className:$(t,`${M}-msg-product-card__image`),src:a,alt:o||"Product image",loading:"lazy"})}):_.jsx("img",{className:$(t,`${M}-msg-product-card__image`),src:a,alt:o||"Product image",loading:"lazy"}))}),_.jsxs("div",{className:$(t,`${M}-msg-product-card__content`),children:[u?_.jsx("a",{href:u,target:r?"_blank":"_self",rel:"noopener",className:$(t,`${M}-msg-product-card__title-link`),"aria-label":`Go to product page for ${o}`,children:o}):_.jsx("p",{className:$(t,`${M}-msg-product-card__title`),children:o}),_.jsx("div",{className:$(t,`${M}-msg-product-card__price-row`),children:_.jsx(wh,{globalClassName:t,retailPrice:T,discountPrice:y,currencyCode:p})})]})]})},rT=e=>({id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,currencyCode:e.data.currencyCode}),w8=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o})=>{if(t.length===1){const a=t[0];return _.jsxs("div",{children:[e&&_.jsx("p",{className:$(n,`${M}-product-carousel-title`),children:e}),_.jsx(nT,{product:rT(a),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isFullWidth:!o})]})}return _.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&_.jsx("p",{className:$(n,`${M}-product-carousel-title`),children:e}),_.jsx(LL,{globalClassName:n,spacing:o?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(a=>_.jsx(nT,{product:rT(a),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o},a.id))})]})},iT=({code:e,globalClassName:t})=>_.jsxs("span",{className:$(t,`${M}-cart-chip`),children:[_.jsx(Y0,{"aria-hidden":"true"}),_.jsx("span",{children:e})]}),qi=({label:e,badge:t,value:n,currencyCode:r,globalClassName:o,emphasized:a,isDiscount:u,fallback:c})=>{let d;if(typeof n=="number")n===0&&!u?d="Free":d=pa(u?-n:n,r);else if(c)d=c;else return null;return _.jsxs("div",{className:$(o,`${M}-cart-total-row`,{emphasized:a}),children:[_.jsxs("span",{className:$(o,`${M}-cart-total-label`),children:[e,t&&_.jsx("span",{className:$(o,`${M}-cart-total-badge`),children:t})]}),_.jsx("span",{className:$(o,`${M}-cart-total-value`),children:d})]})},_8=({item:e,currencyCode:t,loading:n,globalClassName:r,onRemove:o})=>{var u,c,d;const a=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:$(r,`${M}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:$(r,`${M}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:$(r,`${M}-cart-item-details`),children:[_.jsx("p",{className:$(r,`${M}-cart-item-name`),children:e.name}),_.jsxs("div",{className:$(r,`${M}-cart-item-attrs`),children:[((u=e.variants)!=null?u:[]).map(h=>_.jsxs("p",{className:$(r,`${M}-cart-item-attr`),children:[h.lbl,": ",h.value]},`${h.type}-${h.value}`)),((c=e.promotions)!=null?c:[]).map(h=>_.jsxs("p",{className:$(r,`${M}-cart-item-attr`),children:["Promotion: ",h]},h))]}),((d=e.coupons)!=null?d:[]).length>0&&_.jsx("div",{className:$(r,`${M}-cart-chips`),children:e.coupons.map(h=>_.jsx(iT,{code:h,globalClassName:r},h))}),_.jsxs("span",{className:$(r,`${M}-cart-item-price`),children:[a&&_.jsx("span",{className:$(r,`${M}-cart-item-original-price`),children:pa(e.originalSubtotal,t)}),_.jsx("span",{className:$(r,`${M}-cart-item-final-price`),children:pa(e.itemSubtotal,t)})]}),_.jsxs("div",{className:$(r,`${M}-cart-item-footer`),children:[_.jsxs("span",{className:$(r,`${M}-cart-item-qty`),children:["Qty: ",e.quantity]}),_.jsx("button",{type:"button",className:$(r,`${M}-cart-item-remove`),disabled:n,onClick:()=>o(e),children:"Remove"})]})]})]})},v8=({cart:e,globalClassName:t,openLinksInNewTab:n})=>{const{sendMessage:r,loading:o}=Ar(),[a,u]=ee.useState(!0),[c,d]=ee.useState(""),{items:h=[],currencyCode:p="USD",subtotal:g,total:T,taxes:y,shippingCost:x,shippingDiscount:S,shippingPromotions:A=[],promotionsDiscount:C,promotions:O=[],couponsDiscount:R,couponsApplied:H=[],bodyMessage:W,footerMessage:F,checkoutButtonUrl:K}=e,ce=z=>{o||r(`Remove ${z.name} from my cart`)},be=()=>{const z=c.trim();!z||o||(r(`Apply coupon code ${z}`),d(""))};return _.jsxs("div",{className:$(t,`${M}-cart`),children:[_.jsxs("div",{className:$(t,`${M}-cart-box`),children:[W&&_.jsxs("button",{type:"button",className:$(t,`${M}-cart-summary`),"aria-expanded":a,onClick:()=>u(z=>!z),children:[_.jsx("span",{className:$(t,`${M}-cart-summary-text`),children:_.jsx(Rh,{text:W,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),_.jsx("span",{className:$(t,`${M}-cart-summary-toggle`),"aria-hidden":"true",children:a?_.jsx(YS,{}):_.jsx(WS,{})})]}),a&&_.jsxs("div",{className:$(t,`${M}-cart-expanded`),children:[_.jsx("ul",{className:$(t,`${M}-cart-items`),children:h.map(z=>_.jsx(_8,{item:z,currencyCode:p,loading:o,globalClassName:t,onRemove:ce},z.itemId))}),H.length>0&&_.jsx("div",{className:$(t,`${M}-cart-chips`,`${M}-cart-applied-coupons`),children:H.map(z=>_.jsx(iT,{code:z,globalClassName:t},z))}),_.jsxs("div",{className:$(t,`${M}-cart-totals`),children:[_.jsx(qi,{label:"Subtotal",value:g,currencyCode:p,globalClassName:t}),_.jsx(qi,{label:"Coupon",value:R,currencyCode:p,globalClassName:t,isDiscount:!0}),_.jsx(qi,{label:"Promotions",badge:O[0],value:C,currencyCode:p,globalClassName:t,isDiscount:!0}),_.jsx(qi,{label:"Shipping",value:x,currencyCode:p,globalClassName:t,fallback:"TBD"}),_.jsx(qi,{label:"Shipping Discount",badge:A[0],value:S,currencyCode:p,globalClassName:t,isDiscount:!0}),_.jsx(qi,{label:"Tax",value:y,currencyCode:p,globalClassName:t,fallback:"TBD"}),_.jsx(qi,{label:"Total",value:T,currencyCode:p,globalClassName:t,emphasized:!0})]})]})]}),_.jsxs("div",{className:$(t,`${M}-cart-coupon`),children:[_.jsxs("div",{className:$(t,`${M}-cart-coupon-field`),children:[_.jsx("span",{className:$(t,`${M}-cart-coupon-icon`),"aria-hidden":"true",children:_.jsx(Y0,{})}),_.jsx("input",{type:"text",className:$(t,`${M}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:c,disabled:o,onChange:z=>d(z.target.value),onKeyDown:z=>{z.key==="Enter"&&(z.preventDefault(),be())}})]}),_.jsx("button",{type:"button",className:$(t,`${M}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:o||!c.trim(),onClick:be,children:_.jsx(qS,{"aria-hidden":"true"})})]}),K&&_.jsxs("a",{className:$(t,`${M}-cart-checkout-button`),href:K,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[_.jsx($S,{"aria-hidden":"true"}),_.jsx("span",{children:"Checkout"})]}),_.jsx("p",{className:$(t,`${M}-cart-footer`),children:F||"Shipping and taxes calculated at checkout."})]})};function S8(e){return mt({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"},child:[]}]})(e)}const A8=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return _.jsxs(mh,{className:$(n,`${M}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[_.jsx(fh,{className:$(n,`${M}-pdp-gallery__item-group`),children:e.map((o,a)=>_.jsx(dh,{index:a,className:$(n,`${M}-pdp-gallery__item`),children:_.jsx("img",{className:$(n,`${M}-pdp-gallery__image`),src:o,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,loading:"lazy"})},o))}),r&&_.jsxs(uh,{className:$(n,`${M}-pdp-gallery__control`),children:[_.jsx(ph,{className:$(n,`${M}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:_.jsx(tb,{size:"16px"})}),_.jsx(hh,{className:$(n,`${M}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:_.jsx(nb,{size:"16px"})})]}),r&&_.jsx(ch,{className:$(n,`${M}-pdp-gallery__indicator-group`),children:e.map((o,a)=>_.jsx(lh,{index:a,className:$(n,`${M}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},ga="color",Ph=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,oT=e=>e.replace(/(^|\/)large\//,"$1medium/"),sT=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===ga&&n.vals.includes(t)),C8=(e,t)=>{var c,d;const n=((c=e.imgGroups)!=null?c:[]).filter(h=>h.viewType==="large"),r=t&&n.find(h=>sT(h,t)),o=n.find(h=>h.vattr===null),a=r||o||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(h=>Ph(e.baseUrl,oT(h.url)));return u.length>0?u:e.imageUrl?[Ph(e.baseUrl,oT(e.imageUrl))]:[]},k8=(e,t)=>{var o,a,u;const n=((o=e.imgGroups)!=null?o:[]).find(c=>c.viewType==="swatch"&&sT(c,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?Ph(e.baseUrl,r):""},Sl=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(o=>{var a;return((a=o.vars)==null?void 0:a[t])!==n||o.ord===!1?!1:Object.entries(r).every(([u,c])=>{var d;return u===t||((d=o.vars)==null?void 0:d[u])===c})}),N8=(e,t)=>{const n=Object.keys(t);return n.length===0?!0:!e||e.length===0?!1:e.some(r=>r.ord!==!1&&n.every(o=>{var a;return((a=r.vars)==null?void 0:a[o])===t[o]}))},O8=(e,t,n,r,o)=>{if(!e||e.length===0)return ae(B({},o),{[n]:r});const a=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length&&Object.entries(o).every(([h,p])=>{var g;return h===n||((g=c.vars)==null?void 0:g[h])===p})});if(a)return B({},a.vars);const u=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length});return u?B({},u.vars):ae(B({},o),{[n]:r})},I8=(e,t)=>{var o,a,u,c;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(o=e.id)!=null?o:null;if(!e.vmat||e.vmat.length===0)return(a=e.id)!=null?a:null;const r=e.vmat.find(d=>d.ord!==!1&&Object.entries(t).every(([h,p])=>{var g;return((g=d.vars)==null?void 0:g[h])===p}));return(c=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?c:null},R8=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([o,a])=>{var u;return((u=r.vars)==null?void 0:u[o])===a}));return n!=null&&n.pr?n.pr:e.pr},P8=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const o=r.opts.find(u=>Sl(e.vmat,r.id,u.val)),a=o!=null?o:r.opts[0];a&&(t[r.id]=a.val)}return t},L8=({product:e,globalClassName:t,openLinksInNewTab:n})=>{var J,re,fe,ke,he,Q,oe;const{sendMessage:r,loading:o}=Ar(),a=e.data,u=(J=a.vattr)!=null?J:[],[c,d]=ee.useState(()=>P8(a)),h=N8(a.vmat,c),p=(fe=(re=a.quantity)==null?void 0:re.minQuantity)!=null?fe:1,g=(he=(ke=a.quantity)==null?void 0:ke.maxQuantity)!=null?he:Number.POSITIVE_INFINITY,T=(oe=(Q=a.quantity)==null?void 0:Q.increment)!=null?oe:1,[y,x]=ee.useState(p),S=c[ga],A=ee.useMemo(()=>C8(a,S),[a,S]),C=ee.useMemo(()=>R8(a,c),[a,c]),O=u.find(v=>v.id===ga),R=u.filter(v=>v.id!==ga),H=(v,P)=>()=>{d(Z=>{const N=!Sl(a.vmat,v,P,Z);return v===ga||N?O8(a.vmat,u,v,P,Z):ae(B({},Z),{[v]:P})})},W=()=>{if(o)return;const v=I8(a,c),P=u.map(Be=>{const _e=c[Be.id],$e=Be.opts.find(ot=>ot.val===_e);return $e?`${Be.lbl||Be.id}: ${$e.name||_e}`:null}).filter(Boolean).join(", "),Z=y>1?`Add ${y} of`:"Add",N=a.name||"this product",xe=P?` (${P})`:"",Re=v?` [SKU: ${v}]`:"",Oe=`${Z} ${N} to my cart${xe}${Re}`;r(Oe)},F=!h||y-T<p,K=!h||y+T>g,ce=v=>{var Z;const P=c[v.id];return(Z=v.opts.find(N=>N.val===P))==null?void 0:Z.name},be=()=>x(v=>Math.max(p,v-T)),z=()=>x(v=>Math.min(g,v+T)),X=v=>_.jsxs("div",{className:$(t,`${M}-msg-pdp__variant`),children:[_.jsxs("div",{className:$(t,`${M}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${v.id}`,className:$(t,`${M}-msg-pdp__variant-name`),children:v.lbl||v.id}),ce(v)&&_.jsx("span",{className:$(t,`${M}-msg-pdp__variant-value`),children:ce(v)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${v.id}`,className:$(t,`${M}-msg-pdp__chips`),children:v.opts.map(P=>{const Z=Sl(a.vmat,v.id,P.val,c),N=c[v.id]===P.val;return _.jsxs("label",{className:$(`${M}-msg-pdp__chip`,{selected:N,unavailable:!Z}),children:[_.jsx("input",{type:"radio",name:`variant-${v.id}`,value:P.val,checked:N,"aria-description":Z?void 0:"unavailable",onChange:H(v.id,P.val),className:`${M}-msg-pdp__radio-input`}),_.jsx("span",{children:P.name||P.val})]},P.val)})})]},v.id),se=v=>_.jsxs("div",{className:$(t,`${M}-msg-pdp__variant`),children:[_.jsxs("div",{className:$(t,`${M}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${v.id}`,className:$(t,`${M}-msg-pdp__variant-name`),children:v.lbl||"Color"}),ce(v)&&_.jsx("span",{className:$(t,`${M}-msg-pdp__variant-value`),children:ce(v)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${v.id}`,className:$(t,`${M}-msg-pdp__swatches`),children:v.opts.map(P=>{const Z=Sl(a.vmat,v.id,P.val,c),N=c[v.id]===P.val,xe=k8(a,P.val);return xe?_.jsxs("label",{className:$(`${M}-msg-pdp__swatch`,{selected:N,unavailable:!Z}),children:[_.jsx("input",{type:"radio",name:`variant-${v.id}`,value:P.val,checked:N,"aria-label":P.name||P.val,"aria-description":Z?void 0:"unavailable",onChange:H(v.id,P.val),className:`${M}-msg-pdp__radio-input`}),_.jsx("img",{className:$(t,`${M}-msg-pdp__swatch-image`),src:xe,alt:P.name||P.val,loading:"lazy"})]},P.val):_.jsxs("label",{className:$(`${M}-msg-pdp__chip`,{selected:N,unavailable:!Z}),children:[_.jsx("input",{type:"radio",name:`variant-${v.id}`,value:P.val,checked:N,"aria-description":Z?void 0:"unavailable",onChange:H(v.id,P.val),className:`${M}-msg-pdp__radio-input`}),_.jsx("span",{children:P.name||P.val})]},P.val)})})]});return _.jsx("div",{className:$(t,`${M}-msg-pdp`),children:_.jsxs("div",{className:$(t,`${M}-msg-pdp__card`),children:[_.jsx("div",{className:$(t,`${M}-msg-pdp__gallery`),children:_.jsx(A8,{images:A,altText:a.name,globalClassName:t})}),_.jsxs("div",{className:$(t,`${M}-msg-pdp__content`),children:[a.slugUrl?_.jsx("a",{href:a.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:$(t,`${M}-msg-pdp__title-link`),"aria-label":`Go to product page for ${a.name}`,children:a.name}):_.jsx("p",{className:$(t,`${M}-msg-pdp__title`),children:a.name}),_.jsx(wh,{globalClassName:t,className:`${M}-msg-pdp__price`,retailPrice:C==null?void 0:C.orig,discountPrice:(C==null?void 0:C.cur)||(C==null?void 0:C.prom),currencyCode:a.ccy,fontSize:"14px"}),a.dscr&&_.jsx("p",{className:$(t,`${M}-msg-pdp__description`),children:a.dscr}),O&&se(O),R.map(X),_.jsxs("div",{className:$(t,`${M}-msg-pdp__variant`),children:[_.jsxs("div",{className:$(t,`${M}-msg-pdp__variant-label`),children:[_.jsx("span",{className:$(t,`${M}-msg-pdp__variant-name`),children:"Quantity"}),_.jsx("span",{className:$(t,`${M}-msg-pdp__variant-value`),children:y})]}),_.jsxs("div",{className:$(t,`${M}-msg-pdp__stepper`),children:[_.jsx(ar,{className:`${M}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:_.jsx(DS,{}),disabled:F,onClick:be}),_.jsx("span",{className:$(t,`${M}-msg-pdp__quantity`),children:y}),_.jsx(ar,{className:`${M}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:_.jsx(MS,{}),disabled:K,onClick:z})]})]}),_.jsxs("div",{className:$(t,`${M}-msg-pdp__actions`),children:[_.jsxs(ku,{className:`${M}-msg-pdp__express-pay`,disabled:!0,children:[_.jsx(S8,{size:"16px"})," Pay"]}),_.jsx(ku,{className:`${M}-msg-pdp__add-to-cart`,disabled:!h||o,onClick:W,children:o?"Adding...":"Add to cart"})]})]})]})})},D8=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},M8=({products:e,table:t,globalClassName:n,openLinksInNewTab:r})=>{if(!e.length)return null;const o=`auto repeat(${e.length}, 1fr)`,a=`${90+e.length*140}px`;return _.jsx("div",{className:$(n,`${M}-product-comparison`),children:_.jsxs("div",{className:`${M}-product-comparison__grid`,style:{gridTemplateColumns:o,minWidth:a},children:[_.jsxs("div",{className:`${M}-product-comparison__header`,children:[_.jsx("div",{className:`${M}-product-comparison__header-spacer`}),e.map(u=>{var d,h,p,g;const c=D8(u);return _.jsxs("div",{className:$(n,`${M}-product-comparison__product-col`),children:[c&&_.jsx("img",{className:$(n,`${M}-product-comparison__image`),src:c,alt:u.name||"Product image",loading:"eager"}),u.slugUrl?_.jsx("a",{href:u.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:$(n,`${M}-product-comparison__name`),"aria-label":`Go to product page for ${u.name}`,children:u.name}):_.jsx("span",{className:$(n,`${M}-product-comparison__name`),children:u.name}),_.jsx(wh,{globalClassName:n,retailPrice:(d=u.pr)==null?void 0:d.orig,discountPrice:(g=(h=u.pr)==null?void 0:h.prom)!=null?g:(p=u.pr)==null?void 0:p.cur,currencyCode:u.ccy,fontSize:"0.875rem"})]},u.id)})]}),_.jsx("div",{className:`${M}-product-comparison__table`,children:t.map(u=>_.jsxs("div",{className:`${M}-product-comparison__row`,children:[_.jsx("div",{className:$(n,`${M}-product-comparison__row-label`),children:u.row_name}),u.values.map((c,d)=>_.jsx("div",{className:$(n,`${M}-product-comparison__row-value`),children:c},`${u.row_name}-${d}`))]},u.row_name))})]})})},aT=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:o,loading:a}=Ar();return _.jsx(_.Fragment,{children:e.response.map((u,c)=>{var d,h,p,g,T,y,x,S,A,C,O,R,H,W,F,K,ce,be,z,X,se;switch(u.type){case"markdown":return _.jsx(Rh,{text:(h=(d=u.data)==null?void 0:d.content)!=null?h:"",globalClassName:t,openLinksInNewTab:n,showIsLoading:!1},`${u.type}-${(p=u.index)!=null?p:c}`);case"product_carousel":return _.jsx(w8,{title:(T=(g=u.data)==null?void 0:g.title)!=null?T:"",products:(x=(y=u.data)==null?void 0:y.products)!=null?x:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${u.type}-${(S=u.index)!=null?S:c}`);case"product_tile":return _.jsx(L8,{product:u.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${u.type}-${(A=u.index)!=null?A:c}`);case"product_comparison":return _.jsx(M8,{products:(O=(C=u.data)==null?void 0:C.products)!=null?O:[],table:(H=(R=u.data)==null?void 0:R.table)!=null?H:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${u.type}-${(W=u.index)!=null?W:c}`);case"cart":{const J=(ce=(K=(F=u.data)==null?void 0:F.cart)==null?void 0:K.cartSummary)==null?void 0:ce.cartDetails;return J?_.jsx(v8,{cart:J,productsToHighlight:u.data.products_to_highlight,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${u.type}-${(be=u.index)!=null?be:c}`):null}case"suggestions":return _.jsx("div",{style:{marginTop:"0.5rem"},children:_.jsx(iD,{disabled:a,suggestions:(X=(z=u.data)==null?void 0:z.display_text)!=null?X:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:o})},`${u.type}-${(se=u.index)!=null?se:c}`);default:return null}})})},F8=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:o}=Nt(),a=ee.useMemo(()=>{try{const c=JSON.parse(e.content);return Array.isArray(c==null?void 0:c.response)?c:null}catch(c){return null}},[e.content]),u=ee.useMemo(()=>{const c="Oops, I had trouble with your request.";if(typeof e.content!="string")return o==null||o.warn("Message content is not richtext format. Showing fallback text.",e.content),c;const d=e.content.trim();try{const h=JSON.parse(d);if(typeof h=="object"&&h!==null)return o==null||o.debug("Detected JSON object instead of array of responses in message content",e.content),h.text||h.message||c}catch(h){if(d.startsWith("{")||d.startsWith("["))return o==null||o.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),c}return e.content||c},[o,e.content]);switch(e.role){case"user":return _.jsx("div",{className:$(t,`${M}-message`,r?"standalone":"embedded"),children:_.jsx("div",{className:$(t,`${M}-user-message`,r?"standalone":"embedded"),children:_.jsxs("div",{className:$(t,`${M}-user-message-row`,r?"standalone":"embedded"),children:[_.jsx("span",{className:$(t,`${M}-message-icon user-message-icon`,r?"standalone":"embedded"),children:_.jsx(VS,{})}),_.jsx("p",{className:$(t,`${M}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return _.jsx("div",{className:$(t,`${M}-message-group`,r?"standalone":"embedded"),children:_.jsx("div",{className:`${M}-message-group-child`,children:a?_.jsx(aT,{content:a,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):_.jsx(Rh,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return _.jsx("div",{className:$(t,`${M}-message`,r?"standalone":"embedded"),children:_.jsx("p",{className:$(t,`${M}-reset-message`),children:e.content})})}},Lh=({isWidgetStandalone:e})=>{const{globalClassName:t,openLinksInNewTab:n}=Nt(),{messages:r,streamingBlocks:o,isAgentTyping:a,loading:u,progressMessage:c,connectionStatus:d}=Ar(),h=ee.useRef(null),p=r.length>0,g=o.length>0,T=p&&(u||a)&&!g,y=d==="reconnecting"&&!T;return ee.useEffect(()=>{var x;(x=h.current)==null||x.scrollIntoView({behavior:"smooth"})},[r,o]),_.jsxs(_.Fragment,{children:[u&&!p&&_.jsx(lD,{globalClassName:t,isWidgetStandalone:e}),r.map(x=>_.jsx(F8,{message:x,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},x.id)),g&&_.jsxs("div",{className:$(t,`${M}-message-group`,e?"standalone":"embedded"),children:[_.jsx(aT,{content:{response:o},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(u||a)&&_.jsx(_h,{globalClassName:t,isWidgetStandalone:e})]}),T&&_.jsx(_h,{globalClassName:t,isWidgetStandalone:e,loadingText:c}),y&&_.jsx(_h,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),_.jsx("div",{ref:h})]})},uT=()=>{const{globalClassName:e,themeVariables:t}=Nt(),{isAgentTyping:n,sendMessage:r,resetConversation:o}=Ar(),a=n;return _.jsxs("div",{className:$(e,`${M}-container`,`${M}-embedded-chat`),style:t,children:[_.jsx("div",{className:$(e,`${M}-message-container`,"embedded"),children:_.jsx(Lh,{isWidgetStandalone:!1})}),_.jsx(Af,{componentType:"chat",className:"embedded-chat",isLoading:a,onSubmit:u=>r(u)}),_.jsx("div",{className:$(`${M}-embedded-chat-menu`),children:_.jsxs(gL,{componentType:"chat",children:[_.jsx(Sb,{componentType:"chat"}),_.jsx(ME,{componentType:"chat",onClearChat:o})]})})]})},lT=e=>{var d;const{children:t,disabled:n}=e,[r,o]=ee.useState((d=e.container)==null?void 0:d.current),a=ee.useSyncExternalStore(U8,()=>!1,()=>!0),{getRootNode:u}=Tl();if(ee.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const c=r!=null?r:B8(u);return _.jsx(_.Fragment,{children:ee.Children.map(t,h=>Os.createPortal(h,c))})},B8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Fi(n)?n:dr(t).body},U8=()=>()=>{},cT=()=>{const{globalClassName:e,themeVariables:t}=Nt(),{mode:n,status:r,dialogPosition:o,isDialogFullHeight:a,dialogWidth:u}=ki(),{loading:c,isAgentTyping:d,sendMessage:h,resetConversation:p}=Ar(),{isOpen:g}=r||{},T=!!r.isOpen,y=n==="standalone",x=d||c,S=()=>{Ci(!1)};return _.jsx(bb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:T,children:_.jsx(lT,{children:_.jsx(yh,{className:$(e,`${M}-container`,`${M}-dialog`,o,a&&"full-height"),style:B(B({},t),u&&{width:u}),children:_.jsxs(gh,{className:$(e,`${M}-dialog-content`,{standalone:y,embedded:!y}),children:[_.jsx(_b,{componentType:"dialog",onClearChat:p,onClose:S}),_.jsx(Eh,{className:$(e,`${M}-message-container`,{standalone:y,embedded:!y}),children:_.jsx(Lh,{isWidgetStandalone:y,isOpen:g})}),_.jsx(Af,{componentType:"dialog",isLoading:x,onSubmit:A=>h(A)})]})})})})},dT=()=>{const{globalClassName:e,themeVariables:t}=Nt(),{mode:n,status:r,isModalFullscreen:o}=ki(),{isAgentTyping:a,sendMessage:u,resetConversation:c}=Ar(),{isOpen:d}=r||{},h=!!r.isOpen,p=n==="standalone",g=a,T=({open:x})=>{Ci(x)},y=()=>{Ci(!1)};return h?_.jsx(bb,{lazyMount:!0,unmountOnExit:!0,open:h,onOpenChange:T,children:_.jsx(lT,{children:_.jsxs("div",{className:$(e,`${M}-modal-container`),style:t,children:[_.jsx(pb,{className:$(e,`${M}-modal-backdrop`)}),_.jsx(yh,{className:$(e,`${M}-container`,`${M}-modal`,{fullscreen:o,standalone:p,embedded:!p}),children:_.jsxs(gh,{className:$(e,`${M}-modal-content`,{standalone:p,embedded:!p}),children:[_.jsx(_b,{componentType:"modal",onClearChat:c,onClose:y}),_.jsx(Eh,{className:$(e,`${M}-message-container`,{standalone:p,embedded:!p}),children:_.jsx(Lh,{isWidgetStandalone:p,isOpen:d})}),_.jsx(Af,{componentType:"modal",isLoading:g,onSubmit:x=>u(x)})]})})]})})}):null},H8=()=>{const e=ki(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(HS,{}):t==="dialog"?_.jsx(cT,{}):t==="modal"?_.jsx(dT,{}):_.jsx(uT,{})},Dh=e=>_.jsx(P0,ae(B({},e),{children:_.jsx(H8,{})}));var Al={},fT;function z8(){if(fT)return Al;fT=1;var e=B0();return Al.createRoot=e.createRoot,Al.hydrateRoot=e.hydrateRoot,Al}var hT=z8();const j8=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=sn(o,["elementId","timeout"]);let a;const u=(d,h)=>{var p;for(const g of d)if(g.type==="childList"&&g.addedNodes.length)for(const T of g.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Ai(!0,"log","Target element found, rendering Messaging Widget"),h.disconnect(),clearTimeout(a),(p=hT.createRoot(T))==null||p.render(_.jsx(Dh,ae(B({},n),{mode:"messaging"}))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ai(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},$8=r=>{var o=r,{timeout:e,elementId:t}=o,n=sn(o,["timeout","elementId"]);if(!n.messagingConfig){Ai(!0,"error","Messaging Widget requires messagingConfig");return}if(!n.messagingConfig.scrt2Url||!n.messagingConfig.orgId||!n.messagingConfig.esDeveloperName){Ai(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const a=document.getElementById(t);if(!a){Ai(!0,"warn","Container element not found for id:",t),Ai(!0,"warn","Beginning observation for element"),j8(B({elementId:t,timeout:e},n));return}hT.createRoot(a).render(_.jsx(Dh,ae(B({},n),{mode:"messaging"})))},V8={components:{setEntryType:I0,toggleWidgetOpen:Ci,toggleWidgetMinimized:vu,toggleModalFullscreen:wd,setWidgetType:Su,setWidgetDialogPosition:_d}};Ie.AgentForceWidget=Dh,Ie.AgentforceWidgetProvider=P0,Ie.MessagingDialog=cT,Ie.MessagingEmbed=uT,Ie.MessagingModal=dT,Ie.MessagingProvider=O0,Ie.eventHandlers=V8,Ie.injectMessagingWidget=$8,Ie.useMessaging=Ar,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})}));