@cimulate/copilot-widget 1.27.0 → 1.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,52 +1,52 @@
1
- (function(De,je){typeof exports=="object"&&typeof module!="undefined"?je(exports):typeof define=="function"&&define.amd?define(["exports"],je):(De=typeof globalThis!="undefined"?globalThis:De||self,je(De.CimulateMessaging={}))})(this,(function(De){"use strict";var n7=Object.defineProperty,r7=Object.defineProperties;var i7=Object.getOwnPropertyDescriptors;var ad=Object.getOwnPropertySymbols;var n2=Object.prototype.hasOwnProperty,r2=Object.prototype.propertyIsEnumerable;var Fo=(De,je)=>(je=Symbol[De])?je:Symbol.for("Symbol."+De),s7=De=>{throw TypeError(De)},ud=Math.pow,Jm=(De,je,Ke)=>je in De?n7(De,je,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):De[je]=Ke,U=(De,je)=>{for(var Ke in je||(je={}))n2.call(je,Ke)&&Jm(De,Ke,je[Ke]);if(ad)for(var Ke of ad(je))r2.call(je,Ke)&&Jm(De,Ke,je[Ke]);return De},ue=(De,je)=>r7(De,i7(je));var pn=(De,je)=>{var Ke={};for(var lt in De)n2.call(De,lt)&&je.indexOf(lt)<0&&(Ke[lt]=De[lt]);if(De!=null&&ad)for(var lt of ad(De))je.indexOf(lt)<0&&r2.call(De,lt)&&(Ke[lt]=De[lt]);return Ke};var Ge=(De,je,Ke)=>Jm(De,typeof je!="symbol"?je+"":je,Ke);var ze=(De,je,Ke)=>new Promise((lt,vt)=>{var pt=mt=>{try{Yt(Ke.next(mt))}catch(ln){vt(ln)}},Fe=mt=>{try{Yt(Ke.throw(mt))}catch(ln){vt(ln)}},Yt=mt=>mt.done?lt(mt.value):Promise.resolve(mt.value).then(pt,Fe);Yt((Ke=Ke.apply(De,je)).next())}),ws=function(De,je){this[0]=De,this[1]=je},Zm=(De,je,Ke)=>{var lt=(Yt,mt,ln,Kn)=>{try{var Di=Ke[Yt](mt),Ss=(mt=Di.value)instanceof ws,vs=Di.done;Promise.resolve(Ss?mt[0]:mt).then(mn=>Ss?lt(Yt==="return"?Yt:"next",mt[1]?{done:mn.done,value:mn.value}:mn,ln,Kn):ln({value:mn,done:vs})).catch(mn=>lt("throw",mn,ln,Kn))}catch(mn){Kn(mn)}},vt=(Yt,mt,ln,Kn)=>Fe[Yt]=Di=>(mt=new Promise((Ss,vs,mn)=>(mn=()=>lt(Yt,Di,Ss,vs),pt?pt.then(mn):mn())),Kn=()=>pt===ln&&(pt=0),pt=ln=mt.then(Kn,Kn),mt),pt,Fe={};return Ke=Ke.apply(De,je),Fe[Fo("asyncIterator")]=()=>Fe,vt("next"),vt("throw"),vt("return"),Fe},e0=De=>{var je=De[Fo("asyncIterator")],Ke=!1,lt,vt={};return je==null?(je=De[Fo("iterator")](),lt=pt=>vt[pt]=Fe=>je[pt](Fe)):(je=je.call(De),lt=pt=>vt[pt]=Fe=>{if(Ke){if(Ke=!1,pt==="throw")throw Fe;return Fe}return Ke=!0,{done:!1,value:new ws(new Promise(Yt=>{var mt=je[pt](Fe);mt instanceof Object||s7("Object expected"),Yt(mt)}),1)}}),vt[Fo("iterator")]=()=>vt,lt("next"),"throw"in je?lt("throw"):vt.throw=pt=>{throw pt},"return"in je&&lt("return"),vt},i2=(De,je,Ke)=>(je=De[Fo("asyncIterator")])?je.call(De):(De=De[Fo("iterator")](),je={},Ke=(lt,vt)=>(vt=De[lt])&&(je[lt]=pt=>new Promise((Fe,Yt,mt)=>(pt=vt.call(De,pt),mt=pt.done,Promise.resolve(pt.value).then(ln=>Fe({value:ln,done:mt}),Yt)))),Ke("next"),Ke("return"),je);var je=document.createElement("style");je.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;z-index:9999;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;font-size:.875rem;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}.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__image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-border-color, #d1d5db)}.cim-widget-msg-product-card__image-placeholder svg{width:40%;height:40%}button.cim-widget-msg-product-card__image-button{width:100%;height:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;display:block}button.cim-widget-msg-product-card__image-button:disabled{cursor:default}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:50%}.cim-widget-msg-product-card__content-header{display:grid;gap:8px}.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;cursor:pointer}button.cim-widget-msg-product-card__title-link{padding:0;border:none;background:none;text-align:left;width:100%}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}button.cim-widget-msg-product-card__title-link:disabled{cursor:default;text-decoration:none}.cim-widget-msg-product-card__description{font-size:12px}@media(min-width:576px){.cim-widget-msg-product-card__description{display:-webkit-box;line-clamp:4;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}.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-product-carousel-item{display:flex;flex-direction:column;p.cim-widget-product-carousel-caption{font-size:11px;line-height:1.3;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);margin:.25rem .5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart-express:not(.cim-widget-cart-express-ready) .cim-widget-cart-express-frame{visibility:hidden;pointer-events:none}.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:1rem;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)}@media(min-width:768px){.cim-widget-cart-expanded-standalone{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-cart-expanded-standalone .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-cart-expanded-standalone .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px}.cim-widget-cart-expanded-standalone .cim-widget-cart-total-row{gap:12px}}.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:1rem;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:.875rem;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;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:1rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:1rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.cim-widget-cart-qty-heading{font-size:.9375rem;font-weight:400;margin-bottom:0}.cim-widget-cart-qty-input-wrapper{display:flex;align-items:center;justify-content:flex-start}.cim-widget-cart-qty-input{width:45px;height:36px;padding:6px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:var(--cim-widget-bg-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);font-family:inherit;font-size:.9375rem;font-weight:400;text-align:center;transition:border-color .15s ease;box-sizing:border-box}.cim-widget-cart-qty-input:hover:not(:disabled){border-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 40%,var(--cim-widget-border-color, #d1d5db))}.cim-widget-cart-qty-input:focus{outline:none;border-color:var(--cim-widget-primary-color, #2563eb);box-shadow:0 0 0 2px color-mix(in srgb,var(--cim-widget-primary-color, #2563eb) 20%,transparent)}.cim-widget-cart-qty-input:disabled{opacity:.5;cursor:not-allowed}.cim-widget-cart-qty-spinner{width:18px;height:18px;animation:cim-widget-spin 1s linear infinite}@keyframes cim-widget-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cim-widget-cart-item-remove{padding:0;border:none;background:transparent;font-family:inherit;font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap;cursor:pointer;transition:opacity .15s ease;text-decoration:underline}.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-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:4px;animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;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:1.125rem;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-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.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;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.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__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-product-comparison__footer{display:contents}.cim-widget-product-comparison__footer-cell{padding:12px 8px;border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__add-to-cart{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;white-space:nowrap;background-color:transparent;color:var(--cim-widget-primary-color, #3182ce)}.cim-widget-product-comparison__add-to-cart:hover{background-color:transparent}.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-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.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{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@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{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.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{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.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.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.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}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
2
- /*$vite$:1*/`,document.head.appendChild(je);function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt={exports:{}},vt={},pt={exports:{}},Fe={};var Yt;function mt(){if(Yt)return Fe;Yt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function A(D,J,P){this.props=D,this.context=J,this.refs=v,this.updater=P||y}A.prototype.isReactComponent={},A.prototype.setState=function(D,J){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,J,"setState")},A.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function S(){}S.prototype=A.prototype;function k(D,J,P){this.props=D,this.context=J,this.refs=v,this.updater=P||y}var I=k.prototype=new S;I.constructor=k,x(I,A.prototype),I.isPureReactComponent=!0;var j=Array.isArray,Y=Object.prototype.hasOwnProperty,R={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function ie(D,J,P){var Se,Me={},_e=null,ne=null;if(J!=null)for(Se in J.ref!==void 0&&(ne=J.ref),J.key!==void 0&&(_e=""+J.key),J)Y.call(J,Se)&&!W.hasOwnProperty(Se)&&(Me[Se]=J[Se]);var Ee=arguments.length-2;if(Ee===1)Me.children=P;else if(1<Ee){for(var re=Array(Ee),ve=0;ve<Ee;ve++)re[ve]=arguments[ve+2];Me.children=re}if(D&&D.defaultProps)for(Se in Ee=D.defaultProps,Ee)Me[Se]===void 0&&(Me[Se]=Ee[Se]);return{$$typeof:e,type:D,key:_e,ref:ne,props:Me,_owner:R.current}}function de(D,J){return{$$typeof:e,type:D.type,key:J,ref:D.ref,props:D.props,_owner:D._owner}}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function se(D){var J={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(P){return J[P]})}var ee=/\/+/g;function xe(D,J){return typeof D=="object"&&D!==null&&D.key!=null?se(""+D.key):J.toString(36)}function fe(D,J,P,Se,Me){var _e=typeof D;(_e==="undefined"||_e==="boolean")&&(D=null);var ne=!1;if(D===null)ne=!0;else switch(_e){case"string":case"number":ne=!0;break;case"object":switch(D.$$typeof){case e:case t:ne=!0}}if(ne)return ne=D,Me=Me(ne),D=Se===""?"."+xe(ne,0):Se,j(Me)?(P="",D!=null&&(P=D.replace(ee,"$&/")+"/"),fe(Me,J,P,"",function(ve){return ve})):Me!=null&&($(Me)&&(Me=de(Me,P+(!Me.key||ne&&ne.key===Me.key?"":(""+Me.key).replace(ee,"$&/")+"/")+D)),J.push(Me)),1;if(ne=0,Se=Se===""?".":Se+":",j(D))for(var Ee=0;Ee<D.length;Ee++){_e=D[Ee];var re=Se+xe(_e,Ee);ne+=fe(_e,J,P,re,Me)}else if(re=T(D),typeof re=="function")for(D=re.call(D),Ee=0;!(_e=D.next()).done;)_e=_e.value,re=Se+xe(_e,Ee++),ne+=fe(_e,J,P,re,Me);else if(_e==="object")throw J=String(D),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return ne}function ce(D,J,P){if(D==null)return D;var Se=[],Me=0;return fe(D,Se,"","",function(_e){return J.call(P,_e,Me++)}),Se}function he(D){if(D._status===-1){var J=D._result;J=J(),J.then(function(P){(D._status===0||D._status===-1)&&(D._status=1,D._result=P)},function(P){(D._status===0||D._status===-1)&&(D._status=2,D._result=P)}),D._status===-1&&(D._status=0,D._result=J)}if(D._status===1)return D._result.default;throw D._result}var le={current:null},K={transition:null},ae={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:K,ReactCurrentOwner:R};function N(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:ce,forEach:function(D,J,P){ce(D,function(){J.apply(this,arguments)},P)},count:function(D){var J=0;return ce(D,function(){J++}),J},toArray:function(D){return ce(D,function(J){return J})||[]},only:function(D){if(!$(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Fe.Component=A,Fe.Fragment=n,Fe.Profiler=s,Fe.PureComponent=k,Fe.StrictMode=r,Fe.Suspense=d,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ae,Fe.act=N,Fe.cloneElement=function(D,J,P){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var Se=x({},D.props),Me=D.key,_e=D.ref,ne=D._owner;if(J!=null){if(J.ref!==void 0&&(_e=J.ref,ne=R.current),J.key!==void 0&&(Me=""+J.key),D.type&&D.type.defaultProps)var Ee=D.type.defaultProps;for(re in J)Y.call(J,re)&&!W.hasOwnProperty(re)&&(Se[re]=J[re]===void 0&&Ee!==void 0?Ee[re]:J[re])}var re=arguments.length-2;if(re===1)Se.children=P;else if(1<re){Ee=Array(re);for(var ve=0;ve<re;ve++)Ee[ve]=arguments[ve+2];Se.children=Ee}return{$$typeof:e,type:D.type,key:Me,ref:_e,props:Se,_owner:ne}},Fe.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:a,_context:D},D.Consumer=D},Fe.createElement=ie,Fe.createFactory=function(D){var J=ie.bind(null,D);return J.type=D,J},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(D){return{$$typeof:l,render:D}},Fe.isValidElement=$,Fe.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:he}},Fe.memo=function(D,J){return{$$typeof:f,type:D,compare:J===void 0?null:J}},Fe.startTransition=function(D){var J=K.transition;K.transition={};try{D()}finally{K.transition=J}},Fe.unstable_act=N,Fe.useCallback=function(D,J){return le.current.useCallback(D,J)},Fe.useContext=function(D){return le.current.useContext(D)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(D){return le.current.useDeferredValue(D)},Fe.useEffect=function(D,J){return le.current.useEffect(D,J)},Fe.useId=function(){return le.current.useId()},Fe.useImperativeHandle=function(D,J,P){return le.current.useImperativeHandle(D,J,P)},Fe.useInsertionEffect=function(D,J){return le.current.useInsertionEffect(D,J)},Fe.useLayoutEffect=function(D,J){return le.current.useLayoutEffect(D,J)},Fe.useMemo=function(D,J){return le.current.useMemo(D,J)},Fe.useReducer=function(D,J,P){return le.current.useReducer(D,J,P)},Fe.useRef=function(D){return le.current.useRef(D)},Fe.useState=function(D){return le.current.useState(D)},Fe.useSyncExternalStore=function(D,J,P){return le.current.useSyncExternalStore(D,J,P)},Fe.useTransition=function(){return le.current.useTransition()},Fe.version="18.3.1",Fe}var ln;function Kn(){return ln||(ln=1,pt.exports=mt()),pt.exports}var Di;function Ss(){if(Di)return vt;Di=1;var e=Kn(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(l,d,f){var p,m={},T=null,y=null;f!==void 0&&(T=""+f),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)&&(m[p]=d[p]);if(l&&l.defaultProps)for(p in d=l.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:l,key:T,ref:y,props:m,_owner:s.current}}return vt.Fragment=n,vt.jsx=u,vt.jsxs=u,vt}var vs;function mn(){return vs||(vs=1,lt.exports=Ss()),lt.exports}var _=mn();const gr=Object.create(null);gr.open="0",gr.close="1",gr.ping="2",gr.pong="3",gr.message="4",gr.upgrade="5",gr.noop="6";const pu=Object.create(null);Object.keys(gr).forEach(e=>{pu[gr[e]]=e});const ld={type:"error",data:"parser error"},t0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n0=typeof ArrayBuffer=="function",r0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cd=({type:e,data:t},n,r)=>t0&&t instanceof Blob?n?r(t):i0(t,r):n0&&(t instanceof ArrayBuffer||r0(t))?n?r(t):i0(new Blob([t]),r):r(gr[e]+(t||"")),i0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function s0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let dd;function u2(e,t){if(t0&&e.data instanceof Blob)return e.data.arrayBuffer().then(s0).then(t);if(n0&&(e.data instanceof ArrayBuffer||r0(e.data)))return t(s0(e.data));cd(e,!1,n=>{dd||(dd=new TextEncoder),t(dd.encode(n))})}const o0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<o0.length;e++)Bo[o0.charCodeAt(e)]=e;const l2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Bo[e.charCodeAt(r)],u=Bo[e.charCodeAt(r+1)],l=Bo[e.charCodeAt(r+2)],d=Bo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|l>>2,p[s++]=(l&3)<<6|d&63;return f},c2=typeof ArrayBuffer=="function",fd=(e,t)=>{if(typeof e!="string")return{type:"message",data:a0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:d2(e.substring(1),t)}:pu[n]?e.length>1?{type:pu[n],data:e.substring(1)}:{type:pu[n]}:ld},d2=(e,t)=>{if(c2){const n=l2(e);return a0(n,t)}else return{base64:!0,data:e}},a0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,u0="",f2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{cd(a,!1,l=>{r[u]=l,++s===n&&t(r.join(u0))})})},h2=(e,t)=>{const n=e.split(u0),r=[];for(let s=0;s<n.length;s++){const a=fd(n[s],t);if(r.push(a),a.type==="error")break}return r};function p2(){return new TransformStream({transform(e,t){u2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let hd;function mu(e){return e.reduce((t,n)=>t+n.length,0)}function gu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=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 m2(e,t){hd||(hd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,l){for(n.push(u);;){if(r===0){if(mu(n)<1)break;const d=gu(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(mu(n)<2)break;const d=gu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(mu(n)<8)break;const d=gu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(ld);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(mu(n)<s)break;const d=gu(n,s);l.enqueue(fd(a?d:hd.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(ld);break}}}})}const l0=4;function It(e){if(e)return g2(e)}function g2(e){for(var t in It.prototype)e[t]=It.prototype[t];return e}It.prototype.on=It.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},It.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},It.prototype.off=It.prototype.removeListener=It.prototype.removeAllListeners=It.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,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this},It.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,s=n.length;r<s;++r)n[r].apply(this,t)}return this},It.prototype.emitReserved=It.prototype.emit,It.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},It.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Eu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Hn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),E2="arraybuffer";function o7(){}function c0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const y2=Hn.setTimeout,T2=Hn.clearTimeout;function yu(e,t){t.useNativeTimers?(e.setTimeoutFn=y2.bind(Hn),e.clearTimeoutFn=T2.bind(Hn)):(e.setTimeoutFn=Hn.setTimeout.bind(Hn),e.clearTimeoutFn=Hn.clearTimeout.bind(Hn))}const b2=1.33;function _2(e){return typeof e=="string"?x2(e):Math.ceil((e.byteLength||e.size)*b2)}function x2(e){let t=0,n=0;for(let r=0,s=e.length;r<s;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 d0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function w2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function S2(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class v2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class pd extends It{constructor(t){super(),this.writable=!1,yu(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 v2(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=fd(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=w2(t);return n.length?"?"+n:""}}class A2 extends pd{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)};h2(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,f2(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]=d0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let f0=!1;try{f0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const N2=f0;function k2(){}class C2 extends A2{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",(s,a)=>{this.onError("xhr post error",s,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 Er extends It{constructor(t,n,r){super(),this.createRequest=t,yu(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=c0(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 s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(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 s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.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(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=Er.requestsCount++,Er.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=k2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Er.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(Er.requestsCount=0,Er.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",h0);else if(typeof addEventListener=="function"){const e="onpagehide"in Hn?"pagehide":"unload";addEventListener(e,h0,!1)}}function h0(){for(let e in Er.requests)Er.requests.hasOwnProperty(e)&&Er.requests[e].abort()}const O2=(function(){const e=p0({xdomain:!1});return e&&e.responseType!==null})();class I2 extends C2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=O2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Er(p0,this.uri(),t)}}function p0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||N2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Hn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const m0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class P2 extends pd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=m0?{}:c0(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(s){return this.emitReserved("error",s)}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],s=n===t.length-1;cd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Eu(()=>{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]=d0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const md=Hn.WebSocket||Hn.MozWebSocket;class R2 extends P2{createSocket(t,n,r){return m0?new md(t,n,r):n?new md(t,n):new md(t)}doWrite(t,n){this.ws.send(n)}}class L2 extends pd{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=m2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=p2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:l,value:d})=>{l||(this.onPacket(d),a())}).catch(l=>{})};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],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Eu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const D2={websocket:R2,webtransport:L2,polling:I2},M2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,F2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gd(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 s=M2.exec(e||""),a={},u=14;for(;u--;)a[F2[u]]=s[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=B2(a,a.path),a.queryKey=U2(a,a.query),a}function B2(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 U2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Ed=typeof addEventListener=="function"&&typeof removeEventListener=="function",Tu=[];Ed&&addEventListener("offline",()=>{Tu.forEach(e=>e())},!1);class ti extends It{constructor(t,n){if(super(),this.binaryType=E2,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=gd(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=gd(n.host).host);yu(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 s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=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=S2(this.opts.query)),Ed&&(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"})},Tu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=l0,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&&ti.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",ti.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 s=this.writeBuffer[r].data;if(s&&(n+=_2(s)),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,Eu(()=>{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,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=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),s&&this.once("flush",s),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(ti.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(),Ed&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Tu.indexOf(this._offlineEventListener);r!==-1&&Tu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ti.protocol=l0;class H2 extends ti{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;ti.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ti.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=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function l(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",l),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",l),this.once("close",d),this.once("upgrading",f),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 j2=class extends H2{constructor(t,n={}){const r=typeof t=="object",s=r?U({},t):U({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>D2[a]).filter(a=>!!a)),super(r?s:t,s)}};function z2(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=gd(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 $2=typeof ArrayBuffer=="function",V2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,g0=Object.prototype.toString,q2=typeof Blob=="function"||typeof Blob!="undefined"&&g0.call(Blob)==="[object BlobConstructor]",Y2=typeof File=="function"||typeof File!="undefined"&&g0.call(File)==="[object FileConstructor]";function yd(e){return $2&&(e instanceof ArrayBuffer||V2(e))||q2&&e instanceof Blob||Y2&&e instanceof File}function bu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(bu(e[n]))return!0;return!1}if(yd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return bu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&bu(e[n]))return!0;return!1}function W2(e){const t=[],n=e.data,r=e;return r.data=_u(n,t),r.attachments=t.length,{packet:r,buffers:t}}function _u(e,t,n){if(!e)return e;if(yd(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=_u(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return _u(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=_u(e[s],t));return r}return e}function G2(e,t){return e.data=Td(e.data,t),delete e.attachments,e}function Td(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]=Td(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Td(e[n],t));return e}const X2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var et;(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"})(et||(et={}));class Q2{constructor(t){this.replacer=t}encode(t){return(t.type===et.EVENT||t.type===et.ACK)&&bu(t)?this.encodeAsBinary({type:t.type===et.EVENT?et.BINARY_EVENT:et.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===et.BINARY_EVENT||t.type===et.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=W2(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class bd extends It{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===et.BINARY_EVENT;r||n.type===et.BINARY_ACK?(n.type=r?et.EVENT:et.ACK,this.reconstructor=new K2(n)):super.emitReserved("decoded",n)}else if(yd(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(et[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===et.BINARY_EVENT||r.type===et.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 l=Number(u);if(!J2(l)||l<1)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}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 s=t.charAt(n+1);if(s!==""&&Number(s)==s){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(bd.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 et.CONNECT:return E0(n);case et.DISCONNECT:return n===void 0;case et.CONNECT_ERROR:return typeof n=="string"||E0(n);case et.EVENT:case et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&X2.indexOf(n[0])===-1);case et.ACK:case et.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class K2{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=G2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const J2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function E0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Z2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:bd,Encoder:Q2,get PacketType(){return et}},Symbol.toStringTag,{value:"Module"}));function Jn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const eS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class y0 extends It{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=[Jn(t,"open",this.onopen.bind(this)),Jn(t,"packet",this.onpacket.bind(this)),Jn(t,"error",this.onerror.bind(this)),Jn(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,s,a;if(eS.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:et.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const l=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!l||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},s),u=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,l)=>u?s(u):r(l);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((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(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:et.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 et.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 et.EVENT:case et.BINARY_EVENT:this.onevent(t);break;case et.ACK:case et.BINARY_ACK:this.onack(t);break;case et.DISCONNECT:this.ondisconnect();break;case et.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(...s){r||(r=!0,n.packet({type:et.ACK,id:t,data:s}))}}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:et.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 As(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}As.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},As.prototype.reset=function(){this.attempts=0},As.prototype.setMin=function(e){this.ms=e},As.prototype.setMax=function(e){this.max=e},As.prototype.setJitter=function(e){this.jitter=e};class _d extends It{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,yu(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 As({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||Z2;this.encoder=new s.Encoder,this.decoder=new s.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 j2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=Jn(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=Jn(n,"error",a);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},l);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),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(Jn(t,"ping",this.onping.bind(this)),Jn(t,"data",this.ondata.bind(this)),Jn(t,"error",this.onerror.bind(this)),Jn(t,"close",this.onclose.bind(this)),Jn(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){Eu(()=>{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 y0(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(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):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 Uo={};function xd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=z2(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Uo[s]&&a in Uo[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new _d(r,t):(Uo[s]||(Uo[s]=new _d(r,t)),d=Uo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(xd,{Manager:_d,Socket:y0,io:xd,connect:xd});const T0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&T0.call(Blob),typeof File=="function"||typeof File!="undefined"&&T0.call(File);var b0;(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"})(b0||(b0={}));var H=Kn();const Mi=Ke(H);let tS=class{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,s;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((s=this.onceListeners.get(t))==null?void 0:s.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 s=this.onceListeners.get(t);if(s){for(const a of s)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}};class nS{constructor(t,n,r,s,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=s,this.logger=a,this.controller=null,this.reading=!1}connect(){return ze(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:ue(U({},this.headers),{Accept:"text/event-stream","Cache-Control":"no-cache"}),signal:this.controller.signal});if(!t.ok){this.reading=!1;const n=yield t.text().catch(()=>t.statusText);throw new Error(`SSE connection failed (${t.status}): ${n}`)}if(!t.body)throw this.reading=!1,new Error("SSE response has no body stream");this.readStream(t.body)})}disconnect(){this.reading=!1,this.controller&&(this.controller.abort(),this.controller=null)}get isConnected(){return this.reading}readStream(t){return ze(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let s="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let l;for(s+=r.decode(a,{stream:!0}),s=s.replace(/\r\n/g,`
1
+ (function(Me,Ve){typeof exports=="object"&&typeof module!="undefined"?Ve(exports):typeof define=="function"&&define.amd?define(["exports"],Ve):(Me=typeof globalThis!="undefined"?globalThis:Me||self,Ve(Me.CimulateMessaging={}))})(this,(function(Me){"use strict";var l7=Object.defineProperty,c7=Object.defineProperties;var d7=Object.getOwnPropertyDescriptors;var ud=Object.getOwnPropertySymbols;var i2=Object.prototype.hasOwnProperty,s2=Object.prototype.propertyIsEnumerable;var jo=(Me,Ve)=>(Ve=Symbol[Me])?Ve:Symbol.for("Symbol."+Me),f7=Me=>{throw TypeError(Me)},ld=Math.pow,e0=(Me,Ve,Ze)=>Ve in Me?l7(Me,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):Me[Ve]=Ze,H=(Me,Ve)=>{for(var Ze in Ve||(Ve={}))i2.call(Ve,Ze)&&e0(Me,Ze,Ve[Ze]);if(ud)for(var Ze of ud(Ve))s2.call(Ve,Ze)&&e0(Me,Ze,Ve[Ze]);return Me},ce=(Me,Ve)=>c7(Me,d7(Ve));var En=(Me,Ve)=>{var Ze={};for(var ct in Me)i2.call(Me,ct)&&Ve.indexOf(ct)<0&&(Ze[ct]=Me[ct]);if(Me!=null&&ud)for(var ct of ud(Me))Ve.indexOf(ct)<0&&s2.call(Me,ct)&&(Ze[ct]=Me[ct]);return Ze};var Xe=(Me,Ve,Ze)=>e0(Me,typeof Ve!="symbol"?Ve+"":Ve,Ze);var Ue=(Me,Ve,Ze)=>new Promise((ct,vt)=>{var gt=Et=>{try{Xt(Ze.next(Et))}catch(fn){vt(fn)}},Fe=Et=>{try{Xt(Ze.throw(Et))}catch(fn){vt(fn)}},Xt=Et=>Et.done?ct(Et.value):Promise.resolve(Et.value).then(gt,Fe);Xt((Ze=Ze.apply(Me,Ve)).next())}),vs=function(Me,Ve){this[0]=Me,this[1]=Ve},t0=(Me,Ve,Ze)=>{var ct=(Xt,Et,fn,er)=>{try{var Di=Ze[Xt](Et),As=(Et=Di.value)instanceof vs,Ns=Di.done;Promise.resolve(As?Et[0]:Et).then(yn=>As?ct(Xt==="return"?Xt:"next",Et[1]?{done:yn.done,value:yn.value}:yn,fn,er):fn({value:yn,done:Ns})).catch(yn=>ct("throw",yn,fn,er))}catch(yn){er(yn)}},vt=(Xt,Et,fn,er)=>Fe[Xt]=Di=>(Et=new Promise((As,Ns,yn)=>(yn=()=>ct(Xt,Di,As,Ns),gt?gt.then(yn):yn())),er=()=>gt===fn&&(gt=0),gt=fn=Et.then(er,er),Et),gt,Fe={};return Ze=Ze.apply(Me,Ve),Fe[jo("asyncIterator")]=()=>Fe,vt("next"),vt("throw"),vt("return"),Fe},n0=Me=>{var Ve=Me[jo("asyncIterator")],Ze=!1,ct,vt={};return Ve==null?(Ve=Me[jo("iterator")](),ct=gt=>vt[gt]=Fe=>Ve[gt](Fe)):(Ve=Ve.call(Me),ct=gt=>vt[gt]=Fe=>{if(Ze){if(Ze=!1,gt==="throw")throw Fe;return Fe}return Ze=!0,{done:!1,value:new vs(new Promise(Xt=>{var Et=Ve[gt](Fe);Et instanceof Object||f7("Object expected"),Xt(Et)}),1)}}),vt[jo("iterator")]=()=>vt,ct("next"),"throw"in Ve?ct("throw"):vt.throw=gt=>{throw gt},"return"in Ve&&ct("return"),vt},o2=(Me,Ve,Ze)=>(Ve=Me[jo("asyncIterator")])?Ve.call(Me):(Me=Me[jo("iterator")](),Ve={},Ze=(ct,vt)=>(vt=Me[ct])&&(Ve[ct]=gt=>new Promise((Fe,Xt,Et)=>(gt=vt.call(Me,gt),Et=gt.done,Promise.resolve(gt.value).then(fn=>Fe({value:fn,done:Et}),Xt)))),Ze("next"),Ze("return"),Ve);var Ve=document.createElement("style");Ve.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;z-index:9999;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;font-size:.875rem;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}.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__image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-border-color, #d1d5db)}.cim-widget-msg-product-card__image-placeholder svg{width:40%;height:40%}button.cim-widget-msg-product-card__image-button{width:100%;height:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;display:block}button.cim-widget-msg-product-card__image-button:disabled{cursor:default}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:50%}.cim-widget-msg-product-card__content-header{display:grid;gap:8px}.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;cursor:pointer}button.cim-widget-msg-product-card__title-link{padding:0;border:none;background:none;text-align:left;width:100%}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}button.cim-widget-msg-product-card__title-link:disabled{cursor:default;text-decoration:none}.cim-widget-msg-product-card__description{font-size:12px}@media(min-width:576px){.cim-widget-msg-product-card__description{display:-webkit-box;line-clamp:4;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}.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-product-carousel-item{display:flex;flex-direction:column;p.cim-widget-product-carousel-caption{font-size:11px;line-height:1.3;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);margin:.25rem .5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart-express:not(.cim-widget-cart-express-ready) .cim-widget-cart-express-frame{visibility:hidden;pointer-events:none}.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:1rem;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)}@media(min-width:768px){.cim-widget-embedded-chat .cim-widget-cart-expanded,.cim-widget-modal.standalone .cim-widget-cart-expanded{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-items-section,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-totals,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-total-row,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-total-row{gap:12px}}.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:1rem;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:.875rem;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;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:1rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:1rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.cim-widget-cart-qty-heading{font-size:.9375rem;font-weight:400;margin-bottom:0}.cim-widget-cart-qty-input-wrapper{display:flex;align-items:center;justify-content:flex-start}.cim-widget-cart-qty-input{width:45px;height:36px;padding:6px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:var(--cim-widget-bg-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);font-family:inherit;font-size:.9375rem;font-weight:400;text-align:center;transition:border-color .15s ease;box-sizing:border-box}.cim-widget-cart-qty-input:hover:not(:disabled){border-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 40%,var(--cim-widget-border-color, #d1d5db))}.cim-widget-cart-qty-input:focus{outline:none;border-color:var(--cim-widget-primary-color, #2563eb);box-shadow:0 0 0 2px color-mix(in srgb,var(--cim-widget-primary-color, #2563eb) 20%,transparent)}.cim-widget-cart-qty-input:disabled{opacity:.5;cursor:not-allowed}.cim-widget-cart-qty-spinner{width:18px;height:18px;animation:cim-widget-spin 1s linear infinite}@keyframes cim-widget-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cim-widget-cart-item-remove{padding:0;border:none;background:transparent;font-family:inherit;font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap;cursor:pointer;transition:opacity .15s ease;text-decoration:underline}.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-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:4px;animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;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:1.125rem;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-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.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;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.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__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-product-comparison__footer{display:contents}.cim-widget-product-comparison__footer-cell{padding:12px 8px;border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__add-to-cart{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;white-space:nowrap;background-color:transparent;color:var(--cim-widget-primary-color, #3182ce)}.cim-widget-product-comparison__add-to-cart:hover{background-color:transparent}.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-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.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{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@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{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.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{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.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.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.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}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
2
+ /*$vite$:1*/`,document.head.appendChild(Ve);function Ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}},vt={},gt={exports:{}},Fe={};var Xt;function Et(){if(Xt)return Fe;Xt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=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"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,A={};function v(D,ee,P){this.props=D,this.context=ee,this.refs=A,this.updater=P||y}v.prototype.isReactComponent={},v.prototype.setState=function(D,ee){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,ee,"setState")},v.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function w(){}w.prototype=v.prototype;function k(D,ee,P){this.props=D,this.context=ee,this.refs=A,this.updater=P||y}var C=k.prototype=new w;C.constructor=k,x(C,v.prototype),C.isPureReactComponent=!0;var j=Array.isArray,G=Object.prototype.hasOwnProperty,L={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function ie(D,ee,P){var ve,Ce={},he=null,Le=null;if(ee!=null)for(ve in ee.ref!==void 0&&(Le=ee.ref),ee.key!==void 0&&(he=""+ee.key),ee)G.call(ee,ve)&&!W.hasOwnProperty(ve)&&(Ce[ve]=ee[ve]);var Be=arguments.length-2;if(Be===1)Ce.children=P;else if(1<Be){for(var Ge=Array(Be),dt=0;dt<Be;dt++)Ge[dt]=arguments[dt+2];Ce.children=Ge}if(D&&D.defaultProps)for(ve in Be=D.defaultProps,Be)Ce[ve]===void 0&&(Ce[ve]=Be[ve]);return{$$typeof:e,type:D,key:he,ref:Le,props:Ce,_owner:L.current}}function fe(D,ee){return{$$typeof:e,type:D.type,key:ee,ref:D.ref,props:D.props,_owner:D._owner}}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function le(D){var ee={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(P){return ee[P]})}var Z=/\/+/g;function Ae(D,ee){return typeof D=="object"&&D!==null&&D.key!=null?le(""+D.key):ee.toString(36)}function de(D,ee,P,ve,Ce){var he=typeof D;(he==="undefined"||he==="boolean")&&(D=null);var Le=!1;if(D===null)Le=!0;else switch(he){case"string":case"number":Le=!0;break;case"object":switch(D.$$typeof){case e:case t:Le=!0}}if(Le)return Le=D,Ce=Ce(Le),D=ve===""?"."+Ae(Le,0):ve,j(Ce)?(P="",D!=null&&(P=D.replace(Z,"$&/")+"/"),de(Ce,ee,P,"",function(dt){return dt})):Ce!=null&&($(Ce)&&(Ce=fe(Ce,P+(!Ce.key||Le&&Le.key===Ce.key?"":(""+Ce.key).replace(Z,"$&/")+"/")+D)),ee.push(Ce)),1;if(Le=0,ve=ve===""?".":ve+":",j(D))for(var Be=0;Be<D.length;Be++){he=D[Be];var Ge=ve+Ae(he,Be);Le+=de(he,ee,P,Ge,Ce)}else if(Ge=b(D),typeof Ge=="function")for(D=Ge.call(D),Be=0;!(he=D.next()).done;)he=he.value,Ge=ve+Ae(he,Be++),Le+=de(he,ee,P,Ge,Ce);else if(he==="object")throw ee=String(D),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return Le}function oe(D,ee,P){if(D==null)return D;var ve=[],Ce=0;return de(D,ve,"","",function(he){return ee.call(P,he,Ce++)}),ve}function Se(D){if(D._status===-1){var ee=D._result;ee=ee(),ee.then(function(P){(D._status===0||D._status===-1)&&(D._status=1,D._result=P)},function(P){(D._status===0||D._status===-1)&&(D._status=2,D._result=P)}),D._status===-1&&(D._status=0,D._result=ee)}if(D._status===1)return D._result.default;throw D._result}var se={current:null},Y={transition:null},ae={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:Y,ReactCurrentOwner:L};function N(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:oe,forEach:function(D,ee,P){oe(D,function(){ee.apply(this,arguments)},P)},count:function(D){var ee=0;return oe(D,function(){ee++}),ee},toArray:function(D){return oe(D,function(ee){return ee})||[]},only:function(D){if(!$(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Fe.Component=v,Fe.Fragment=n,Fe.Profiler=s,Fe.PureComponent=k,Fe.StrictMode=r,Fe.Suspense=d,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ae,Fe.act=N,Fe.cloneElement=function(D,ee,P){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var ve=x({},D.props),Ce=D.key,he=D.ref,Le=D._owner;if(ee!=null){if(ee.ref!==void 0&&(he=ee.ref,Le=L.current),ee.key!==void 0&&(Ce=""+ee.key),D.type&&D.type.defaultProps)var Be=D.type.defaultProps;for(Ge in ee)G.call(ee,Ge)&&!W.hasOwnProperty(Ge)&&(ve[Ge]=ee[Ge]===void 0&&Be!==void 0?Be[Ge]:ee[Ge])}var Ge=arguments.length-2;if(Ge===1)ve.children=P;else if(1<Ge){Be=Array(Ge);for(var dt=0;dt<Ge;dt++)Be[dt]=arguments[dt+2];ve.children=Be}return{$$typeof:e,type:D.type,key:Ce,ref:he,props:ve,_owner:Le}},Fe.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:a,_context:D},D.Consumer=D},Fe.createElement=ie,Fe.createFactory=function(D){var ee=ie.bind(null,D);return ee.type=D,ee},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(D){return{$$typeof:c,render:D}},Fe.isValidElement=$,Fe.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:Se}},Fe.memo=function(D,ee){return{$$typeof:f,type:D,compare:ee===void 0?null:ee}},Fe.startTransition=function(D){var ee=Y.transition;Y.transition={};try{D()}finally{Y.transition=ee}},Fe.unstable_act=N,Fe.useCallback=function(D,ee){return se.current.useCallback(D,ee)},Fe.useContext=function(D){return se.current.useContext(D)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(D){return se.current.useDeferredValue(D)},Fe.useEffect=function(D,ee){return se.current.useEffect(D,ee)},Fe.useId=function(){return se.current.useId()},Fe.useImperativeHandle=function(D,ee,P){return se.current.useImperativeHandle(D,ee,P)},Fe.useInsertionEffect=function(D,ee){return se.current.useInsertionEffect(D,ee)},Fe.useLayoutEffect=function(D,ee){return se.current.useLayoutEffect(D,ee)},Fe.useMemo=function(D,ee){return se.current.useMemo(D,ee)},Fe.useReducer=function(D,ee,P){return se.current.useReducer(D,ee,P)},Fe.useRef=function(D){return se.current.useRef(D)},Fe.useState=function(D){return se.current.useState(D)},Fe.useSyncExternalStore=function(D,ee,P){return se.current.useSyncExternalStore(D,ee,P)},Fe.useTransition=function(){return se.current.useTransition()},Fe.version="18.3.1",Fe}var fn;function er(){return fn||(fn=1,gt.exports=Et()),gt.exports}var Di;function As(){if(Di)return vt;Di=1;var e=er(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=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,f){var p,m={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:y,props:m,_owner:s.current}}return vt.Fragment=n,vt.jsx=u,vt.jsxs=u,vt}var Ns;function yn(){return Ns||(Ns=1,ct.exports=As()),ct.exports}var _=yn();const Er=Object.create(null);Er.open="0",Er.close="1",Er.ping="2",Er.pong="3",Er.message="4",Er.upgrade="5",Er.noop="6";const Tu=Object.create(null);Object.keys(Er).forEach(e=>{Tu[Er[e]]=e});const cd={type:"error",data:"parser error"},r0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",i0=typeof ArrayBuffer=="function",s0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,dd=({type:e,data:t},n,r)=>r0&&t instanceof Blob?n?r(t):o0(t,r):i0&&(t instanceof ArrayBuffer||s0(t))?n?r(t):o0(new Blob([t]),r):r(Er[e]+(t||"")),o0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function a0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let fd;function c2(e,t){if(r0&&e.data instanceof Blob)return e.data.arrayBuffer().then(a0).then(t);if(i0&&(e.data instanceof ArrayBuffer||s0(e.data)))return t(a0(e.data));dd(e,!1,n=>{fd||(fd=new TextEncoder),t(fd.encode(n))})}const u0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<u0.length;e++)zo[u0.charCodeAt(e)]=e;const d2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=zo[e.charCodeAt(r)],u=zo[e.charCodeAt(r+1)],c=zo[e.charCodeAt(r+2)],d=zo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|c>>2,p[s++]=(c&3)<<6|d&63;return f},f2=typeof ArrayBuffer=="function",hd=(e,t)=>{if(typeof e!="string")return{type:"message",data:l0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:h2(e.substring(1),t)}:Tu[n]?e.length>1?{type:Tu[n],data:e.substring(1)}:{type:Tu[n]}:cd},h2=(e,t)=>{if(f2){const n=d2(e);return l0(n,t)}else return{base64:!0,data:e}},l0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,c0="",p2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{dd(a,!1,c=>{r[u]=c,++s===n&&t(r.join(c0))})})},m2=(e,t)=>{const n=e.split(c0),r=[];for(let s=0;s<n.length;s++){const a=hd(n[s],t);if(r.push(a),a.type==="error")break}return r};function g2(){return new TransformStream({transform(e,t){c2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let pd;function bu(e){return e.reduce((t,n)=>t+n.length,0)}function xu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=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 E2(e,t){pd||(pd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(bu(n)<1)break;const d=xu(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(bu(n)<2)break;const d=xu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(bu(n)<8)break;const d=xu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(cd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(bu(n)<s)break;const d=xu(n,s);c.enqueue(hd(a?d:pd.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(cd);break}}}})}const d0=4;function Pt(e){if(e)return y2(e)}function y2(e){for(var t in Pt.prototype)e[t]=Pt.prototype[t];return e}Pt.prototype.on=Pt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Pt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Pt.prototype.off=Pt.prototype.removeListener=Pt.prototype.removeAllListeners=Pt.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,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Pt.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,s=n.length;r<s;++r)n[r].apply(this,t)}return this},Pt.prototype.emitReserved=Pt.prototype.emit,Pt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Pt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const _u=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),$n=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),T2="arraybuffer";function h7(){}function f0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const b2=$n.setTimeout,x2=$n.clearTimeout;function wu(e,t){t.useNativeTimers?(e.setTimeoutFn=b2.bind($n),e.clearTimeoutFn=x2.bind($n)):(e.setTimeoutFn=$n.setTimeout.bind($n),e.clearTimeoutFn=$n.clearTimeout.bind($n))}const _2=1.33;function w2(e){return typeof e=="string"?S2(e):Math.ceil((e.byteLength||e.size)*_2)}function S2(e){let t=0,n=0;for(let r=0,s=e.length;r<s;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 h0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function v2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function A2(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class N2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class md extends Pt{constructor(t){super(),this.writable=!1,wu(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 N2(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=hd(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=v2(t);return n.length?"?"+n:""}}class k2 extends md{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)};m2(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,p2(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]=h0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let p0=!1;try{p0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const C2=p0;function O2(){}class I2 extends k2{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",(s,a)=>{this.onError("xhr post error",s,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 yr extends Pt{constructor(t,n,r){super(),this.createRequest=t,wu(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=f0(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 s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(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 s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.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(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=yr.requestsCount++,yr.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=O2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete yr.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(yr.requestsCount=0,yr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",m0);else if(typeof addEventListener=="function"){const e="onpagehide"in $n?"pagehide":"unload";addEventListener(e,m0,!1)}}function m0(){for(let e in yr.requests)yr.requests.hasOwnProperty(e)&&yr.requests[e].abort()}const P2=(function(){const e=g0({xdomain:!1});return e&&e.responseType!==null})();class R2 extends I2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=P2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new yr(g0,this.uri(),t)}}function g0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||C2))return new XMLHttpRequest}catch(n){}if(!t)try{return new $n[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const E0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class L2 extends md{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=E0?{}:f0(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(s){return this.emitReserved("error",s)}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],s=n===t.length-1;dd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&_u(()=>{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]=h0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const gd=$n.WebSocket||$n.MozWebSocket;class D2 extends L2{createSocket(t,n,r){return E0?new gd(t,n,r):n?new gd(t,n):new gd(t)}doWrite(t,n){this.ws.send(n)}}class M2 extends md{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=E2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=g2();s.readable.pipeTo(t.writable),this._writer=s.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],s=n===t.length-1;this._writer.write(r).then(()=>{s&&_u(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const F2={websocket:D2,webtransport:M2,polling:R2},B2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,U2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ed(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 s=B2.exec(e||""),a={},u=14;for(;u--;)a[U2[u]]=s[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=H2(a,a.path),a.queryKey=j2(a,a.query),a}function H2(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 j2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const yd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Su=[];yd&&addEventListener("offline",()=>{Su.forEach(e=>e())},!1);class ti extends Pt{constructor(t,n){if(super(),this.binaryType=T2,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=Ed(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=Ed(n.host).host);wu(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 s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=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=A2(this.opts.query)),yd&&(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"})},Su.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=d0,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&&ti.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",ti.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 s=this.writeBuffer[r].data;if(s&&(n+=w2(s)),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,_u(()=>{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,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=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),s&&this.once("flush",s),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(ti.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(),yd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Su.indexOf(this._offlineEventListener);r!==-1&&Su.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ti.protocol=d0;class z2 extends ti{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;ti.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ti.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const b=new Error("probe error: "+m);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",f),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 $2=class extends z2{constructor(t,n={}){const r=typeof t=="object",s=r?H({},t):H({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>F2[a]).filter(a=>!!a)),super(r?s:t,s)}};function V2(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=Ed(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 q2=typeof ArrayBuffer=="function",Y2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,y0=Object.prototype.toString,W2=typeof Blob=="function"||typeof Blob!="undefined"&&y0.call(Blob)==="[object BlobConstructor]",G2=typeof File=="function"||typeof File!="undefined"&&y0.call(File)==="[object FileConstructor]";function Td(e){return q2&&(e instanceof ArrayBuffer||Y2(e))||W2&&e instanceof Blob||G2&&e instanceof File}function vu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(vu(e[n]))return!0;return!1}if(Td(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&vu(e[n]))return!0;return!1}function X2(e){const t=[],n=e.data,r=e;return r.data=Au(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Au(e,t,n){if(!e)return e;if(Td(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=Au(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Au(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Au(e[s],t));return r}return e}function Q2(e,t){return e.data=bd(e.data,t),delete e.attachments,e}function bd(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]=bd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=bd(e[n],t));return e}const K2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var tt;(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"})(tt||(tt={}));class J2{constructor(t){this.replacer=t}encode(t){return(t.type===tt.EVENT||t.type===tt.ACK)&&vu(t)?this.encodeAsBinary({type:t.type===tt.EVENT?tt.BINARY_EVENT:tt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===tt.BINARY_EVENT||t.type===tt.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=X2(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class xd extends Pt{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===tt.BINARY_EVENT;r||n.type===tt.BINARY_ACK?(n.type=r?tt.EVENT:tt.ACK,this.reconstructor=new Z2(n)):super.emitReserved("decoded",n)}else if(Td(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(tt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===tt.BINARY_EVENT||r.type===tt.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(!eS(c)||c<1)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 s=t.charAt(n+1);if(s!==""&&Number(s)==s){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(xd.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 tt.CONNECT:return T0(n);case tt.DISCONNECT:return n===void 0;case tt.CONNECT_ERROR:return typeof n=="string"||T0(n);case tt.EVENT:case tt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&K2.indexOf(n[0])===-1);case tt.ACK:case tt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Z2{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=Q2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const eS=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function T0(e){return Object.prototype.toString.call(e)==="[object Object]"}const tS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:xd,Encoder:J2,get PacketType(){return tt}},Symbol.toStringTag,{value:"Module"}));function tr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const nS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class b0 extends Pt{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=[tr(t,"open",this.onopen.bind(this)),tr(t,"packet",this.onpacket.bind(this)),tr(t,"error",this.onerror.bind(this)),tr(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,s,a;if(nS.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:tt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.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 s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===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"))},s),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,c)=>u?s(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((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(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:tt.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 tt.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 tt.EVENT:case tt.BINARY_EVENT:this.onevent(t);break;case tt.ACK:case tt.BINARY_ACK:this.onack(t);break;case tt.DISCONNECT:this.ondisconnect();break;case tt.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(...s){r||(r=!0,n.packet({type:tt.ACK,id:t,data:s}))}}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:tt.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 ks(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}ks.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},ks.prototype.reset=function(){this.attempts=0},ks.prototype.setMin=function(e){this.ms=e},ks.prototype.setMax=function(e){this.max=e},ks.prototype.setJitter=function(e){this.jitter=e};class _d extends Pt{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,wu(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 ks({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||tS;this.encoder=new s.Encoder,this.decoder=new s.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 $2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=tr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=tr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),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(tr(t,"ping",this.onping.bind(this)),tr(t,"data",this.ondata.bind(this)),tr(t,"error",this.onerror.bind(this)),tr(t,"close",this.onclose.bind(this)),tr(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){_u(()=>{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 b0(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(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):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 $o={};function wd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=V2(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=$o[s]&&a in $o[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new _d(r,t):($o[s]||($o[s]=new _d(r,t)),d=$o[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(wd,{Manager:_d,Socket:b0,io:wd,connect:wd});const x0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&x0.call(Blob),typeof File=="function"||typeof File!="undefined"&&x0.call(File);var _0;(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"})(_0||(_0={}));var B=er();const Mi=Ze(B);let rS=class{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,s;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((s=this.onceListeners.get(t))==null?void 0:s.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 s=this.onceListeners.get(t);if(s){for(const a of s)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}};class iS{constructor(t,n,r,s,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=s,this.logger=a,this.controller=null,this.reading=!1}connect(){return Ue(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:ce(H({},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 Ue(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let s="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let c;for(s+=r.decode(a,{stream:!0}),s=s.replace(/\r\n/g,`
3
3
  `).replace(/\r/g,`
4
- `);(l=s.indexOf(`
4
+ `);(c=s.indexOf(`
5
5
 
6
- `))>=0;){const d=s.slice(0,l);s=s.slice(l+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(`
6
+ `))>=0;){const d=s.slice(0,c);s=s.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 s=r.join(`
8
- `);this.logger.debug(`SSE event: ${n}`,s.slice(0,200)),this.onEvent(n,s)}}class Fr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let rS=class extends Fr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class _0 extends Fr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let wd=class extends Fr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class iS{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 sS extends tS{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,l,d,f,p,m,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=s.maxRetries)!=null?u:3,timeout:(l=s.timeout)!=null?l:15e3,maxReconnectAttempts:(d=s.maxReconnectAttempts)!=null?d:5,reconnectDelay:(f=s.reconnectDelay)!=null?f:2e3,enableLogging:(p=s.enableLogging)!=null?p:!1,platform:(m=s.platform)!=null?m:"Web",capabilitiesVersion:(T=s.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 iS(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 ze(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 ze(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 ze(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Fr("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 ze(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 ze(this,null,function*(){var u,l,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(),s="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",s);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(l=a.openConversationsFound)!=null?l:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return ze(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 s=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${s?`?${s}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}retrieveConversationTranscript(t){return ze(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new Fr("No active conversation. Call createConversation() first or pass a conversationId.","unknown");const r=`/iamessage/api/v2/conversation/${n}/transcript?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`;return this.executeRequest("GET",r,void 0,{responseType:"blob"})})}resumeConversation(t){if(this.assertConnected(),!t)throw new Fr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return ze(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 ze(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 nS(n,r,(s,a)=>this.handleSSEEvent(s,a),s=>this.handleSSEClose(s),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(()=>ze(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 s=r instanceof Error?r.message:String(r);if(s.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: ${s}`),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(s){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||"",s=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:s,failureType:s?void 0:r,raw:n}),s||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var l;const n=t.conversationEntry;if(!n)return;const r=((l=n.sender)==null?void 0:l.role)||"";if(r==="EndUser"||r==="Customer")return;const s=this.parseEntryPayload(n),a=this.getNestedValue(s,"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:s})}handleStreamingToken(t){let n,r,s,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),l=this.getNestedValue(u,"streamingToken");a=this.getNestedString(l,"token","text")||this.getNestedString(l,"token","content")||"";const d=this.getNestedValue(l,"sequenceNumber");typeof d=="number"&&(n=d);const f=this.getNestedString(l,"targetMessageIdentifier");f&&(r=f);const p=this.getNestedString(l,"tokenType");p&&(s=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",U(U(U({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),s?{tokenType:s}:{})):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),s=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(s,"progressMessage","text")||this.getNestedString(s,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(s,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var a,u,l,d,f;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries,s=(a=t.conversationEntry)==null?void 0:a.identifier;if(r&&r.length>0)r.forEach((p,m)=>{var A,S,k;const T=p.participant,y=p.displayName||(T==null?void 0:T.displayName)||((A=t.conversationEntry)==null?void 0:A.senderDisplayName)||"Agent",x=(T==null?void 0:T.role)||((k=(S=t.conversationEntry)==null?void 0:S.sender)==null?void 0:k.role)||"",v=p.operation||p.event||"";this.emit("participant_changed",U({conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(v)},s?{entryId:r.length>1?`${s}:${m}`:s}:{}))});else{const p=((u=t.conversationEntry)==null?void 0:u.senderDisplayName)||n.participantName||((l=n.participant)==null?void 0:l.displayName)||"Agent",m=n.operation||n.event||"";this.emit("participant_changed",U({conversationId:this._conversationId||"",participant:{role:((f=(d=t.conversationEntry)==null?void 0:d.sender)==null?void 0:f.role)||"",name:p},action:this.normalizeParticipantAction(m)},s?{entryId:s}:{}))}}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 ze(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 wd("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,s){return ze(this,null,function*(){const a=(s==null?void 0:s.useAuth)!==!1;let u=0;for(;;){let l;try{const d=new AbortController;l=setTimeout(()=>d.abort(),(s==null?void 0:s.timeout)||this.timeout);const f=U({"Content-Type":"application/json"},s==null?void 0:s.headers);a&&this._accessToken&&(f.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const m=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(l),!m.ok){const T=yield m.text().catch(()=>m.statusText);if(m.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new wd(`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 wd(`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 rS(`Request ${t} ${n} failed (${m.status}): ${T}`,m.status,T)}return m.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield m.blob():m.text().then(T=>T?JSON.parse(T):null)}catch(d){if(clearTimeout(l),d instanceof Fr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new _0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),p=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(m=>setTimeout(m,p));continue}throw new _0(`Network error: ${d.message}`,u,{cause:d})}throw new Fr(`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 Fr("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 s of n){if(r==null||typeof r!="object")return;r=r[s]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}}const C="cim-widget",Cn=`--${C}`,ni={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},oS=(e=ni)=>({[`${Cn}-primary-color`]:e.primaryColor||ni.primaryColor,[`${Cn}-secondary-color`]:e.secondaryColor||ni.secondaryColor,[`${Cn}-font-color`]:e.fontColor||ni.fontColor,[`${Cn}-font-family`]:e.fontFamily||ni.fontFamily,[`${Cn}-background-color`]:e.backgroundColor||ni.backgroundColor,[`${Cn}-border-color`]:e.borderColor||ni.borderColor,[`${Cn}-border-radius`]:e.borderRadius||ni.borderRadius});function x0(e,t){return function(){return e.apply(t,arguments)}}const{toString:aS}=Object.prototype,{getPrototypeOf:Ns}=Object,{iterator:Ho,toStringTag:w0}=Symbol,xu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),jo=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),xu(n,t))return!0;n=Ns(n)}return!1},uS=(e,t)=>e!=null&&jo(e,t)?e[t]:void 0,Sd=(e=>t=>{const n=aS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zn=e=>(e=e.toLowerCase(),t=>Sd(t)===e),wu=e=>t=>typeof t===e,{isArray:Fi}=Array,ks=wu("undefined");function Cs(e){return e!==null&&!ks(e)&&e.constructor!==null&&!ks(e.constructor)&&gn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const S0=Zn("ArrayBuffer");function lS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&S0(e.buffer),t}const cS=wu("string"),gn=wu("function"),v0=wu("number"),Os=e=>e!==null&&typeof e=="object",dS=e=>e===!0||e===!1,Su=e=>{if(!Os(e))return!1;const t=Ns(e);return(t===null||t===Object.prototype||Ns(t)===null)&&!jo(e,w0)&&!jo(e,Ho)},fS=e=>{if(!Os(e)||Cs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},hS=Zn("Date"),pS=Zn("File"),mS=e=>!!(e&&typeof e.uri!="undefined"),gS=e=>e&&typeof e.getParts!="undefined",ES=Zn("Blob"),yS=Zn("FileList"),TS=e=>Os(e)&&gn(e.pipe);function bS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const A0=bS(),N0=typeof A0.FormData!="undefined"?A0.FormData:void 0,_S=e=>{if(!e)return!1;if(N0&&e instanceof N0)return!0;const t=Ns(e);if(!t||t===Object.prototype||!gn(e.append))return!1;const n=Sd(e);return n==="formdata"||n==="object"&&gn(e.toString)&&e.toString()==="[object FormData]"},xS=Zn("URLSearchParams"),[wS,SS,vS,AS]=["ReadableStream","Request","Response","Headers"].map(Zn),NS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Fi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Cs(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let l;for(r=0;r<u;r++)l=a[r],t.call(null,e[l],l,e)}}function k0(e,t){if(Cs(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Bi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,C0=e=>!ks(e)&&e!==Bi;function vd(...e){const{caseless:t,skipUndefined:n}=C0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&k0(r,u)||u,d=xu(r,l)?r[l]:void 0;Su(d)&&Su(a)?r[l]=vd(d,a):Su(a)?r[l]=vd({},a):Fi(a)?r[l]=a.slice():(!n||!ks(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||Cs(l)||(zo(l,s),typeof l!="object"||Fi(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];US.call(l,p)&&s(l[p],p)}}return r}const kS=(e,t,n,{allOwnKeys:r}={})=>(zo(t,(s,a)=>{n&&gn(s)?Object.defineProperty(e,a,{__proto__:null,value:x0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),CS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),OS=(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)},IS=(e,t,n,r)=>{let s,a,u;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=n!==!1&&Ns(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},PS=(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},RS=e=>{if(!e)return null;if(Fi(e))return e;let t=e.length;if(!v0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},LS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ns(Uint8Array)),DS=(e,t)=>{const r=(e&&e[Ho]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},MS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},FS=Zn("HTMLFormElement"),BS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:US}=Object.prototype,HS=Zn("RegExp"),O0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};zo(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},jS=e=>{O0(e,(t,n)=>{if(gn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(gn(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+"'")})}})},zS=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Fi(e)?r(e):r(String(e).split(t)),n},$S=()=>{},VS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function qS(e){return!!(e&&gn(e.append)&&e[w0]==="FormData"&&e[Ho])}const YS=e=>{const t=new WeakSet,n=r=>{if(Os(r)){if(t.has(r))return;if(Cs(r))return r;if(!("toJSON"in r)){t.add(r);const s=Fi(r)?[]:{};return zo(r,(a,u)=>{const l=n(a);!ks(l)&&(s[u]=l)}),t.delete(r),s}}return r};return n(e)},WS=Zn("AsyncFunction"),GS=e=>e&&(Os(e)||gn(e))&&gn(e.then)&&gn(e.catch),I0=((e,t)=>e?setImmediate:t?((n,r)=>(Bi.addEventListener("message",({source:s,data:a})=>{s===Bi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Bi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",gn(Bi.postMessage)),XS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Bi):typeof process!="undefined"&&process.nextTick||I0,P0=e=>e!=null&&gn(e[Ho]),q={isArray:Fi,isArrayBuffer:S0,isBuffer:Cs,isFormData:_S,isArrayBufferView:lS,isString:cS,isNumber:v0,isBoolean:dS,isObject:Os,isPlainObject:Su,isEmptyObject:fS,isReadableStream:wS,isRequest:SS,isResponse:vS,isHeaders:AS,isUndefined:ks,isDate:hS,isFile:pS,isReactNativeBlob:mS,isReactNative:gS,isBlob:ES,isRegExp:HS,isFunction:gn,isStream:TS,isURLSearchParams:xS,isTypedArray:LS,isFileList:yS,forEach:zo,merge:vd,extend:kS,trim:NS,stripBOM:CS,inherits:OS,toFlatObject:IS,kindOf:Sd,kindOfTest:Zn,endsWith:PS,toArray:RS,forEachEntry:DS,matchAll:MS,isHTMLForm:FS,hasOwnProperty:xu,hasOwnProp:xu,hasOwnInPrototypeChain:jo,getSafeProp:uS,reduceDescriptors:O0,freezeMethods:jS,toObjectSet:zS,toCamelCase:BS,noop:$S,toFiniteNumber:VS,findKey:k0,global:Bi,isContextDefined:C0,isSpecCompliantForm:qS,toJSONObject:YS,isAsyncFn:WS,isThenable:GS,setImmediate:I0,asap:XS,isIterable:P0,isSafeIterable:e=>e!=null&&jo(e,Ho)&&P0(e)},QS=q.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"]),KS=e=>{const t={};let n,r,s;return e&&e.split(`
9
- `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&QS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function JS(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 ZS=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ev=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ad(e,t){return q.isArray(e)?e.map(n=>Ad(n,t)):JS(String(e).replace(t,""))}const tv=e=>Ad(e,ZS),nv=e=>Ad(e,ev);function R0(e){const t=Object.create(null);return q.forEach(e.toJSON(),(n,r)=>{t[r]=nv(n)}),t}const L0=Symbol("internals");function $o(e){return e&&String(e).trim().toLowerCase()}function vu(e){return e===!1||e==null?e:q.isArray(e)?e.map(vu):tv(String(e))}function rv(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 iv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Nd(e,t,n,r,s){if(q.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function sv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ov(e,t){const n=q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,a,u){return this[r].call(this,t,s,a,u)},configurable:!0})})}let Jt=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(l,d,f){const p=$o(d);if(!p)return;const m=q.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=vu(l))}const u=(l,d)=>q.forEach(l,(f,p)=>a(f,p,d));if(q.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(q.isString(t)&&(t=t.trim())&&!iv(t))u(KS(t),n);else if(q.isObject(t)&&q.isSafeIterable(t)){let l=Object.create(null),d,f;for(const p of t){if(!q.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],q.hasOwnProp(l,f)?(d=l[f],l[f]=q.isArray(d)?[...d,p[1]]:[d,p[1]]):l[f]=p[1]}u(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=$o(t),t){const r=q.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return rv(s);if(q.isFunction(n))return n.call(this,s,r);if(q.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=$o(t),t){const r=q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Nd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=$o(u),u){const l=q.findKey(r,u);l&&(!n||Nd(r,r[l],l,n))&&(delete r[l],s=!0)}}return q.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||Nd(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return q.forEach(this,(s,a)=>{const u=q.findKey(r,a);if(u){n[u]=vu(s),delete n[a];return}const l=t?sv(a):String(a).trim();l!==a&&delete n[a],n[l]=vu(s),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return q.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&q.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(s=>r.set(s)),r}static accessor(t){const r=(this[L0]=this[L0]={accessors:{}}).accessors,s=this.prototype;function a(u){const l=$o(u);r[l]||(ov(s,u),r[l]=!0)}return q.isArray(t)?t.forEach(a):a(t),this}};Jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(Jt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),q.freezeMethods(Jt);const av="[REDACTED ****]";function uv(e){if(q.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(q.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function lv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||q.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof Jt&&(a=a.toJSON()),r.push(a);let u;if(q.isArray(a))u=[],a.forEach((l,d)=>{const f=s(l);q.isUndefined(f)||(u[d]=f)});else{if(!q.isPlainObject(a)&&uv(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?av:s(d);q.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return s(e)}let Ne=class s2 extends Error{static from(t,n,r,s,a,u){const l=new s2(t.message,n||t.code,r,s,a);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),u&&Object.assign(l,u),l}constructor(t,n,r,s,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),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&q.hasOwnProp(t,"redact")?t.redact:void 0,r=q.isArray(n)&&n.length>0?lv(t,n):q.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}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ne.ERR_BAD_OPTION="ERR_BAD_OPTION",Ne.ECONNABORTED="ECONNABORTED",Ne.ETIMEDOUT="ETIMEDOUT",Ne.ECONNREFUSED="ECONNREFUSED",Ne.ERR_NETWORK="ERR_NETWORK",Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ne.ERR_DEPRECATED="ERR_DEPRECATED",Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ne.ERR_CANCELED="ERR_CANCELED",Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ne.ERR_INVALID_URL="ERR_INVALID_URL",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const cv=null,D0=100;function kd(e){return q.isPlainObject(e)||q.isArray(e)}function M0(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function Cd(e,t,n){return e?e.concat(t).map(function(s,a){return s=M0(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function dv(e){return q.isArray(e)&&!e.some(kd)}const fv=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Au(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,I){return!q.isUndefined(I[k])});const r=n.metaTokens,s=n.visitor||x,a=n.dots,u=n.indexes,l=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?D0:n.maxDepth,f=l&&q.isSpecCompliantForm(t),p=[];if(!q.isFunction(s))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(q.isDate(S))return S.toISOString();if(q.isBoolean(S))return S.toString();if(!f&&q.isBlob(S))throw new Ne("Blob is not supported. Use a Buffer instead.");if(q.isArrayBuffer(S)||q.isTypedArray(S)){if(f&&typeof l=="function")return new l([S]);if(typeof Buffer!="undefined")return Buffer.from(S);throw new Ne("Blob is not supported. Use a Buffer instead.",Ne.ERR_NOT_SUPPORT)}return S}function T(S){if(S>d)throw new Ne("Object is too deeply nested ("+S+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(S,k){if(d===1/0)return JSON.stringify(S);const I=[];return JSON.stringify(S,function(Y,R){if(!q.isObject(R))return R;for(;I.length&&I[I.length-1]!==this;)I.pop();return I.push(R),T(k+I.length-1),R})}function x(S,k,I){let j=S;if(q.isReactNative(t)&&q.isReactNativeBlob(S))return t.append(Cd(I,k,a),m(S)),!1;if(S&&!I&&typeof S=="object"){if(q.endsWith(k,"{}"))k=r?k:k.slice(0,-2),S=y(S,1);else if(q.isArray(S)&&dv(S)||(q.isFileList(S)||q.endsWith(k,"[]"))&&(j=q.toArray(S)))return k=M0(k),j.forEach(function(R,W){!(q.isUndefined(R)||R===null)&&t.append(u===!0?Cd([k],W,a):u===null?k:k+"[]",m(R))}),!1}return kd(S)?!0:(t.append(Cd(I,k,a),m(S)),!1)}const v=Object.assign(fv,{defaultVisitor:x,convertValue:m,isVisitable:kd});function A(S,k,I=0){if(!q.isUndefined(S)){if(T(I),p.indexOf(S)!==-1)throw new Error("Circular reference detected in "+k.join("."));p.push(S),q.forEach(S,function(Y,R){(!(q.isUndefined(Y)||Y===null)&&s.call(t,Y,q.isString(R)?R.trim():R,k,v))===!0&&A(Y,k?k.concat(R):[R],I+1)}),p.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return A(e),t}function F0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Od(e,t){this._pairs=[],e&&Au(e,this,t)}const B0=Od.prototype;B0.append=function(t,n){this._pairs.push([t,n])},B0.toString=function(t){const n=t?r=>t.call(this,r,F0):F0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function hv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function U0(e,t,n){if(!t)return e;e=e||"";const r=q.isFunction(n)?{serialize:n}:n,s=q.getSafeProp(r,"encode")||hv,a=q.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=q.isURLSearchParams(t)?t.toString():new Od(t,r).toString(s),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class H0{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){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Id={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},pv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Od,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Pd=typeof window!="undefined"&&typeof document!="undefined",Rd=typeof navigator=="object"&&navigator||void 0,mv=Pd&&(!Rd||["ReactNative","NativeScript","NS"].indexOf(Rd.product)<0),gv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ev=Pd&&window.location.href||"http://localhost",Wt=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pd,hasStandardBrowserEnv:mv,hasStandardBrowserWebWorkerEnv:gv,navigator:Rd,origin:Ev},Symbol.toStringTag,{value:"Module"}))),pv);function yv(e,t){return Au(e,new Wt.classes.URLSearchParams,U({visitor:function(n,r,s,a){return Wt.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const j0=D0;function z0(e){if(e>j0)throw new Ne("FormData field is too deeply nested ("+e+" levels). Max depth: "+j0,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Tv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)z0(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function bv(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function $0(e){function t(n,r,s,a){z0(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&q.isArray(s)?s.length:u,d?(q.hasOwnProp(s,u)?s[u]=q.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!l):((!q.hasOwnProp(s,u)||!q.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&q.isArray(s[u])&&(s[u]=bv(s[u])),!l)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,s)=>{t(Tv(r),s,n,0)}),n}return null}const Is=(e,t)=>e!=null&&q.hasOwnProp(e,t)?e[t]:void 0;function _v(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Vo={transitional:Id,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=q.isObject(t);if(a&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return s?JSON.stringify($0(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Is(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return yv(t,d).toString();if((l=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Is(this,"env"),p=f&&f.FormData;return Au(l?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),_v(t)):t}],transformResponse:[function(t){const n=Is(this,"transitional")||Vo.transitional,r=n&&n.forcedJSONParsing,s=Is(this,"responseType"),a=s==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!s||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Is(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,Is(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wt.classes.FormData,Blob:Wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch","query"],e=>{Vo.headers[e]={}});function Ld(e,t){const n=this||Vo,r=t||n,s=Jt.from(r.headers);let a=r.data;return q.forEach(e,function(l){a=l.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function V0(e){return!!(e&&e.__CANCEL__)}let qo=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function q0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function xv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function wv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,T=0;for(;m!==s;)T+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(T*1e3/y):void 0}}function Sv(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const Nu=(e,t,n=3)=>{let r=0;const s=wv(50,250);return Sv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,l=a.lengthComputable?a.total:void 0,d=l!=null?Math.min(u,l):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-d)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},Y0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},W0=e=>(...t)=>q.asap(()=>e(...t)),vv=Wt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Wt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Wt.origin),Wt.navigator&&/(msie|trident)/i.test(Wt.navigator.userAgent)):()=>!0,Av=Wt.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];q.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),q.isString(r)&&l.push(`path=${r}`),q.isString(s)&&l.push(`domain=${s}`),a===!0&&l.push("secure"),q.isString(u)&&l.push(`SameSite=${u}`),document.cookie=l.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+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Nv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function kv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Cv=/^https?:(?!\/\/)/i,Ov=/[\t\n\r]/g;function Iv(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Pv(e){return Iv(e).replace(Ov,"")}function G0(e,t){if(typeof e=="string"&&Cv.test(Pv(e)))throw new Ne('Invalid URL: missing "//" after protocol',Ne.ERR_INVALID_URL,t)}function X0(e,t,n,r){G0(t,r);let s=!Nv(t);return e&&(s||n===!1)?(G0(e,r),kv(e,t)):t}const Q0=e=>e instanceof Jt?U({},e):e;function Ui(e,t){e=e||{},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(p,m,T,y){return q.isPlainObject(p)&&q.isPlainObject(m)?q.merge.call({caseless:y},p,m):q.isPlainObject(m)?q.merge({},m):q.isArray(m)?m.slice():m}function s(p,m,T,y){if(q.isUndefined(m)){if(!q.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!q.isUndefined(m))return r(void 0,m)}function u(p,m){if(q.isUndefined(m)){if(!q.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=q.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!q.isUndefined(m))if(q.isPlainObject(m)){if(q.hasOwnProp(m,p))return m[p]}else return;const T=q.hasOwnProp(e,"transitional")?e.transitional:void 0;if(q.isPlainObject(T)&&q.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(q.hasOwnProp(t,T))return r(p,m);if(q.hasOwnProp(e,T))return r(void 0,p)}const f={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:d,headers:(p,m,T)=>s(Q0(p),Q0(m),T,!0)};return q.forEach(Object.keys(U(U({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=q.hasOwnProp(f,m)?f[m]:s,y=q.hasOwnProp(e,m)?e[m]:void 0,x=q.hasOwnProp(t,m)?t[m]:void 0,v=T(y,x,m);q.isUndefined(v)&&T!==d||(n[m]=v)}),q.hasOwnProp(t,"validateStatus")&&q.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(q.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const Rv=["content-type","content-length"];function Lv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{Rv.includes(r.toLowerCase())&&e.set(r,s)})}const Dv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function K0(e){const t=Ui({},e),n=T=>q.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=Jt.from(l),t.url=U0(X0(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=q.getSafeProp(d,"username")||"",y=q.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(T+":"+(y?Dv(y):"")))}catch(x){throw Ne.from(x,Ne.ERR_BAD_OPTION_VALUE,e)}}if(q.isFormData(r)&&(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv||q.isReactNative(r)?l.setContentType(void 0):q.isFunction(r.getHeaders)&&Lv(l,r.getHeaders(),n("formDataHeaderPolicy"))),Wt.hasStandardBrowserEnv&&(q.isFunction(s)&&(s=s(t)),s===!0||s==null&&vv(t.url))){const y=a&&u&&Av.read(u);y&&l.set(a,y)}return t}const Mv=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=K0(e);let a=s.data;const u=Jt.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=s,p,m,T,y,x;function v(){y&&y(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function S(){if(!A)return;const I=Jt.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),Y={data:!l||l==="text"||l==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:I,config:e,request:A};q0(function(W){n(W),v()},function(W){r(W),v()},Y),A=null}"onloadend"in A?A.onloadend=S:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(S)},A.onabort=function(){A&&(r(new Ne("Request aborted",Ne.ECONNABORTED,e,A)),v(),A=null)},A.onerror=function(j){const Y=j&&j.message?j.message:"Network Error",R=new Ne(Y,Ne.ERR_NETWORK,e,A);R.event=j||null,r(R),v(),A=null},A.ontimeout=function(){let j=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const Y=s.transitional||Id;s.timeoutErrorMessage&&(j=s.timeoutErrorMessage),r(new Ne(j,Y.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,A)),v(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&q.forEach(R0(u),function(j,Y){A.setRequestHeader(Y,j)}),q.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),l&&l!=="json"&&(A.responseType=s.responseType),f&&([T,x]=Nu(f,!0),A.addEventListener("progress",T)),d&&A.upload&&([m,y]=Nu(d),A.upload.addEventListener("progress",m),A.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=I=>{A&&(r(!I||I.type?new qo(null,e,A):I),A.abort(),v(),A=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const k=xv(s.url);if(k&&!Wt.protocols.includes(k)){r(new Ne("Unsupported protocol "+k+":",Ne.ERR_BAD_REQUEST,e)),v();return}A.send(a||null)})},Fv=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Ne?f:new qo(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ne(`timeout of ${t}ms exceeded`,Ne.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:l}=n;return l.unsubscribe=()=>q.asap(u),l},Bv=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Uv=function(e,t){return Zm(this,null,function*(){try{for(var n=i2(Hv(e)),r,s,a;r=!(s=yield new ws(n.next())).done;r=!1){const u=s.value;yield*e0(Bv(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new ws(s.call(n)))}finally{if(a)throw a[0]}}})},Hv=function(e){return Zm(this,null,function*(){if(e[Symbol.asyncIterator]){yield*e0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new ws(t.read());if(n)break;yield r}}finally{yield new ws(t.cancel())}})},J0=(e,t,n,r)=>{const s=Uv(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return ze(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){l(),f.close();return}let T=m.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw l(p),p}})},cancel(f){return l(f),s.return()}},{highWaterMark:2})},ku=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,jv=(e,t,n)=>t+2<n&&ku(e.charCodeAt(t+1))&&ku(e.charCodeAt(t+2));function zv(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 l=r.length;for(let y=0;y<l;y++)if(r.charCodeAt(y)===37&&y+2<l){const x=r.charCodeAt(y+1),v=r.charCodeAt(y+2);ku(x)&&ku(v)&&(u-=2,y+=2)}let d=0,f=l-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const T=Math.floor(u/4)*3-(d||0);return T>0?T:0}let a=0;for(let u=0,l=r.length;u<l;u++){const d=r.charCodeAt(u);if(d===37&&jv(r,u,l))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<l){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Dd="1.18.1",Z0=64*1024,{isFunction:Cu}=q,$v=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),eg=e=>{if(!q.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},tg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Vv=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},qv=e=>{const t=q.global!==void 0&&q.global!==null?q.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=q.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,l=s?Cu(s):typeof fetch=="function",d=Cu(a),f=Cu(u);if(!l)return!1;const p=l&&Cu(n),m=l&&(typeof r=="function"?(S=>k=>S.encode(k))(new r):S=>ze(null,null,function*(){return new Uint8Array(yield new a(S).arrayBuffer())})),T=d&&p&&tg(()=>{let S=!1;const k=new a(Wt.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),I=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),S&&!I}),y=f&&p&&tg(()=>q.isReadableStream(new u("").body)),x={stream:y&&(S=>S.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!x[S]&&(x[S]=(k,I)=>{let j=k&&k[S];if(j)return j.call(k);throw new Ne(`Response type '${S}' is not supported`,Ne.ERR_NOT_SUPPORT,I)})});const v=S=>ze(null,null,function*(){if(S==null)return 0;if(q.isBlob(S))return S.size;if(q.isSpecCompliantForm(S))return(yield new a(Wt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(q.isArrayBufferView(S)||q.isArrayBuffer(S))return S.byteLength;if(q.isURLSearchParams(S)&&(S=S+""),q.isString(S))return(yield m(S)).byteLength}),A=(S,k)=>ze(null,null,function*(){const I=q.toFiniteNumber(S.getContentLength());return I==null?v(k):I});return S=>ze(null,null,function*(){let{url:k,method:I,data:j,signal:Y,cancelToken:R,timeout:W,onDownloadProgress:ie,onUploadProgress:de,responseType:$,headers:se,withCredentials:ee="same-origin",fetchOptions:xe,maxContentLength:fe,maxBodyLength:ce}=K0(S);const he=q.isNumber(fe)&&fe>-1,le=q.isNumber(ce)&&ce>-1,K=_e=>q.hasOwnProp(S,_e)?S[_e]:void 0;let ae=s||fetch;$=$?($+"").toLowerCase():"text";let N=Fv([Y,R&&R.toAbortSignal()],W),D=null;const J=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let P,Se=null;const Me=()=>new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,S,D);try{let _e;const ne=K("auth");if(ne){const Pe=q.getSafeProp(ne,"username")||"",Et=q.getSafeProp(ne,"password")||"";_e={username:Pe,password:Et}}if(Vv(k)){const Pe=new URL(k,Wt.origin);if(!_e&&(Pe.username||Pe.password)){const Et=eg(Pe.username),Ln=eg(Pe.password);_e={username:Et,password:Ln}}(Pe.username||Pe.password)&&(Pe.username="",Pe.password="",k=Pe.href)}if(_e&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa($v((_e.username||"")+":"+(_e.password||""))))),he&&typeof k=="string"&&k.startsWith("data:")&&zv(k)>fe)throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,D);if(le&&I!=="get"&&I!=="head"){const Pe=yield v(j);if(typeof Pe=="number"&&isFinite(Pe)&&(P=Pe,Pe>ce))throw Me()}const Ee=le&&(q.isReadableStream(j)||q.isStream(j)),re=(Pe,Et,Ln)=>J0(Pe,Z0,wn=>{if(le&&wn>ce)throw Se=Me();Et&&Et(wn)},Ln);if(T&&I!=="get"&&I!=="head"&&(de||Ee)){if(P=P==null?yield A(se,j):P,P!==0||Ee){let Pe=new a(k,{method:"POST",body:j,duplex:"half"}),Et;if(q.isFormData(j)&&(Et=Pe.headers.get("content-type"))&&se.setContentType(Et),Pe.body){const[Ln,wn]=de&&Y0(P,Nu(W0(de)))||[];j=re(Pe.body,Ln,wn)}}}else if(Ee&&!d&&p&&I!=="get"&&I!=="head")j=re(j);else if(Ee&&d&&!T&&I!=="get"&&I!=="head")throw new Ne("Stream request bodies are not supported by the current fetch implementation",Ne.ERR_NOT_SUPPORT,S,D);q.isString(ee)||(ee=ee?"include":"omit");const ve=d&&"credentials"in a.prototype;if(q.isFormData(j)){const Pe=se.getContentType();Pe&&/^multipart\/form-data/i.test(Pe)&&!/boundary=/i.test(Pe)&&se.delete("content-type")}se.set("User-Agent","axios/"+Dd,!1);const $e=ue(U({},xe),{signal:N,method:I.toUpperCase(),headers:R0(se.normalize()),body:j,duplex:"half",credentials:ve?ee:void 0});D=d&&new a(k,$e);let gt=yield d?ae(D,xe):ae(k,$e);const Ce=Jt.from(gt.headers);if(he){const Pe=q.toFiniteNumber(Ce.getContentLength());if(Pe!=null&&Pe>fe)throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,D)}const We=y&&($==="stream"||$==="response");if(y&&gt.body&&(ie||he||We&&J)){const Pe={};["status","statusText","headers"].forEach(ur=>{Pe[ur]=gt[ur]});const Et=q.toFiniteNumber(Ce.getContentLength()),[Ln,wn]=ie&&Y0(Et,Nu(W0(ie),!0))||[];let ar=0;const Or=ur=>{if(he&&(ar=ur,ar>fe))throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,D);Ln&&Ln(ur)};gt=new u(J0(gt.body,Z0,Or,()=>{wn&&wn(),J&&J()}),Pe)}$=$||"text";let Ze=yield x[q.findKey(x,$)||"text"](gt,S);if(he&&!y&&!We){let Pe;if(Ze!=null&&(typeof Ze.byteLength=="number"?Pe=Ze.byteLength:typeof Ze.size=="number"?Pe=Ze.size:typeof Ze=="string"&&(Pe=typeof r=="function"?new r().encode(Ze).byteLength:Ze.length)),typeof Pe=="number"&&Pe>fe)throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,D)}return!We&&J&&J(),yield new Promise((Pe,Et)=>{q0(Pe,Et,{data:Ze,headers:Jt.from(gt.headers),status:gt.status,statusText:gt.statusText,config:S,request:D})})}catch(_e){if(J&&J(),N&&N.aborted&&N.reason instanceof Ne){const ne=N.reason;throw ne.config=S,D&&(ne.request=D),_e!==ne&&Object.defineProperty(ne,"cause",{__proto__:null,value:_e,writable:!0,enumerable:!1,configurable:!0}),ne}if(Se)throw D&&!Se.request&&(Se.request=D),Se;if(_e instanceof Ne)throw D&&!_e.request&&(_e.request=D),_e;if(_e&&_e.name==="TypeError"&&/Load failed|fetch/i.test(_e.message)){const ne=new Ne("Network Error",Ne.ERR_NETWORK,S,D,_e&&_e.response);throw Object.defineProperty(ne,"cause",{__proto__:null,value:_e.cause||_e,writable:!0,enumerable:!1,configurable:!0}),ne}throw Ne.from(_e,_e&&_e.code,S,D,_e&&_e.response)}})},Yv=new Map,ng=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,l=u,d,f,p=Yv;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:qv(t)),p=f;return f};ng();const Md={http:cv,xhr:Mv,fetch:{get:ng}};q.forEach(Md,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const rg=e=>`- ${e}`,Wv=e=>q.isFunction(e)||e===null||e===!1;function Gv(e,t){e=q.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(s=r,!Wv(r)&&(s=Md[(l=String(r)).toLowerCase()],s===void 0))throw new Ne(`Unknown adapter '${l}'`);if(s&&(q.isFunction(s)||(s=s.get(t))))break;a[l||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=n?u.length>1?`since :
11
- `+u.map(rg).join(`
12
- `):" "+rg(u[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+l,Ne.ERR_NOT_SUPPORT)}return s}const ig={getAdapter:Gv,adapters:Md};function Fd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qo(null,e)}function sg(e){return Fd(e),e.headers=Jt.from(e.headers),e.data=Ld.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ig.getAdapter(e.adapter||Vo.adapter,e)(e).then(function(r){Fd(e),e.response=r;try{r.data=Ld.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Jt.from(r.headers),r},function(r){if(!V0(r)&&(Fd(e),r&&r.response)){e.response=r.response;try{r.response.data=Ld.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Jt.from(r.response.headers)}return Promise.reject(r)})}const Ou={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ou[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const og={};Ou.transitional=function(t,n,r){function s(a,u){return"[Axios v"+Dd+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new Ne(s(u," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!og[u]&&(og[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,l):!0}},Ou.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Xv(e,t,n){if(typeof e!="object"||e===null)throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const l=e[a],d=l===void 0||u(l,a,e);if(d!==!0)throw new Ne("option "+a+" must be "+d,Ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const Iu={assertOptions:Xv,validators:Ou},Zt=Iu.validators;let Hi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new H0,response:new H0}}request(t,n){return ze(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
8
+ `);this.logger.debug(`SSE event: ${n}`,s.slice(0,200)),this.onEvent(n,s)}}class Fr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let sS=class extends Fr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class w0 extends Fr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let Sd=class extends Fr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class oS{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)}}const aS="0Mw";let uS=class extends rS{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,c,d,f,p,m,b;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=s.maxRetries)!=null?u:3,timeout:(c=s.timeout)!=null?c:15e3,maxReconnectAttempts:(d=s.maxReconnectAttempts)!=null?d:5,reconnectDelay:(f=s.reconnectDelay)!=null?f:2e3,enableLogging:(p=s.enableLogging)!=null?p:!1,platform:(m=s.platform)!=null?m:"Web",capabilitiesVersion:(b=s.capabilitiesVersion)!=null?b:"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 oS(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 Ue(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 Ue(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 Ue(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Fr("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 Ue(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 Ue(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(),s="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",s);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 Ue(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 s=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${s?`?${s}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}retrieveConversationTranscript(t){return Ue(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new Fr("No active conversation. Call createConversation() first or pass a conversationId.","unknown");const r=`/iamessage/api/v2/conversation/${n}/transcript?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`;return this.executeRequest("GET",r,void 0,{responseType:"blob"})})}resumeConversation(t){if(this.assertConnected(),!t)throw new Fr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return Ue(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 Ue(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 iS(n,r,(s,a)=>this.handleSSEEvent(s,a),s=>this.handleSSEClose(s),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(()=>Ue(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 s=r instanceof Error?r.message:String(r);if(s.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: ${s}`),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(s){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||"",s=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:s,failureType:s?void 0:r,raw:n}),s||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 s=this.parseEntryPayload(n),a=this.getNestedValue(s,"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:s,messagingSessionId:this.extractMessagingSessionId(n)})}handleStreamingToken(t){let n,r,s,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 f=this.getNestedString(c,"targetMessageIdentifier");f&&(r=f);const p=this.getNestedString(c,"tokenType");p&&(s=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",H(H(H({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),s?{tokenType:s}:{})):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),s=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(s,"progressMessage","text")||this.getNestedString(s,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(s,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var a,u,c,d,f;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries,s=(a=t.conversationEntry)==null?void 0:a.identifier;if(r&&r.length>0)r.forEach((p,m)=>{var v,w,k;const b=p.participant,y=p.displayName||(b==null?void 0:b.displayName)||((v=t.conversationEntry)==null?void 0:v.senderDisplayName)||"Agent",x=(b==null?void 0:b.role)||((k=(w=t.conversationEntry)==null?void 0:w.sender)==null?void 0:k.role)||"",A=p.operation||p.event||"";this.emit("participant_changed",H({conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(A)},s?{entryId:r.length>1?`${s}:${m}`:s}:{}))});else{const p=((u=t.conversationEntry)==null?void 0:u.senderDisplayName)||n.participantName||((c=n.participant)==null?void 0:c.displayName)||"Agent",m=n.operation||n.event||"";this.emit("participant_changed",H({conversationId:this._conversationId||"",participant:{role:((f=(d=t.conversationEntry)==null?void 0:d.sender)==null?void 0:f.role)||"",name:p},action:this.normalizeParticipantAction(m)},s?{entryId:s}:{}))}}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 Ue(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 Sd("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,s){return Ue(this,null,function*(){const a=(s==null?void 0:s.useAuth)!==!1;let u=0;for(;;){let c;try{const d=new AbortController;c=setTimeout(()=>d.abort(),(s==null?void 0:s.timeout)||this.timeout);const f=H({"Content-Type":"application/json"},s==null?void 0:s.headers);a&&this._accessToken&&(f.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const m=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(c),!m.ok){const b=yield m.text().catch(()=>m.statusText);if(m.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new Sd(`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 Sd(`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 sS(`Request ${t} ${n} failed (${m.status}): ${b}`,m.status,b)}return m.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield m.blob():m.text().then(b=>b?JSON.parse(b):null)}catch(d){if(clearTimeout(c),d instanceof Fr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new w0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),p=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(m=>setTimeout(m,p));continue}throw new w0(`Network error: ${d.message}`,u,{cause:d})}throw new Fr(`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 Fr("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}}extractMessagingSessionId(t){var n;return(n=t.relatedRecords)==null?void 0:n.find(r=>r.startsWith(aS))}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 s of n){if(r==null||typeof r!="object")return;r=r[s]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}};const O="cim-widget",Rn=`--${O}`,ni={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},lS=(e=ni)=>({[`${Rn}-primary-color`]:e.primaryColor||ni.primaryColor,[`${Rn}-secondary-color`]:e.secondaryColor||ni.secondaryColor,[`${Rn}-font-color`]:e.fontColor||ni.fontColor,[`${Rn}-font-family`]:e.fontFamily||ni.fontFamily,[`${Rn}-background-color`]:e.backgroundColor||ni.backgroundColor,[`${Rn}-border-color`]:e.borderColor||ni.borderColor,[`${Rn}-border-radius`]:e.borderRadius||ni.borderRadius});function S0(e,t){return function(){return e.apply(t,arguments)}}const{toString:cS}=Object.prototype,{getPrototypeOf:Cs}=Object,{iterator:Vo,toStringTag:v0}=Symbol,Nu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),qo=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Nu(n,t))return!0;n=Cs(n)}return!1},dS=(e,t)=>e!=null&&qo(e,t)?e[t]:void 0,vd=(e=>t=>{const n=cS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),nr=e=>(e=e.toLowerCase(),t=>vd(t)===e),ku=e=>t=>typeof t===e,{isArray:Fi}=Array,Os=ku("undefined");function Is(e){return e!==null&&!Os(e)&&e.constructor!==null&&!Os(e.constructor)&&Tn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const A0=nr("ArrayBuffer");function fS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&A0(e.buffer),t}const hS=ku("string"),Tn=ku("function"),N0=ku("number"),Ps=e=>e!==null&&typeof e=="object",pS=e=>e===!0||e===!1,Cu=e=>{if(!Ps(e))return!1;const t=Cs(e);return(t===null||t===Object.prototype||Cs(t)===null)&&!qo(e,v0)&&!qo(e,Vo)},mS=e=>{if(!Ps(e)||Is(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},gS=nr("Date"),ES=nr("File"),yS=e=>!!(e&&typeof e.uri!="undefined"),TS=e=>e&&typeof e.getParts!="undefined",bS=nr("Blob"),xS=nr("FileList"),_S=e=>Ps(e)&&Tn(e.pipe);function wS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const k0=wS(),C0=typeof k0.FormData!="undefined"?k0.FormData:void 0,SS=e=>{if(!e)return!1;if(C0&&e instanceof C0)return!0;const t=Cs(e);if(!t||t===Object.prototype||!Tn(e.append))return!1;const n=vd(e);return n==="formdata"||n==="object"&&Tn(e.toString)&&e.toString()==="[object FormData]"},vS=nr("URLSearchParams"),[AS,NS,kS,CS]=["ReadableStream","Request","Response","Headers"].map(nr),OS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Fi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Is(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 O0(e,t){if(Is(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Bi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,I0=e=>!Os(e)&&e!==Bi;function Ad(...e){const{caseless:t,skipUndefined:n}=I0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&O0(r,u)||u,d=Nu(r,c)?r[c]:void 0;Cu(d)&&Cu(a)?r[c]=Ad(d,a):Cu(a)?r[c]=Ad({},a):Fi(a)?r[c]=a.slice():(!n||!Os(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||Is(c)||(Yo(c,s),typeof c!="object"||Fi(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let f=0;f<d.length;f++){const p=d[f];zS.call(c,p)&&s(c[p],p)}}return r}const IS=(e,t,n,{allOwnKeys:r}={})=>(Yo(t,(s,a)=>{n&&Tn(s)?Object.defineProperty(e,a,{__proto__:null,value:S0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),PS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),RS=(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)},LS=(e,t,n,r)=>{let s,a,u;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&Cs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},DS=(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},MS=e=>{if(!e)return null;if(Fi(e))return e;let t=e.length;if(!N0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},FS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Cs(Uint8Array)),BS=(e,t)=>{const r=(e&&e[Vo]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},US=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},HS=nr("HTMLFormElement"),jS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:zS}=Object.prototype,$S=nr("RegExp"),P0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Yo(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},VS=e=>{P0(e,(t,n)=>{if(Tn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Tn(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+"'")})}})},qS=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Fi(e)?r(e):r(String(e).split(t)),n},YS=()=>{},WS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function GS(e){return!!(e&&Tn(e.append)&&e[v0]==="FormData"&&e[Vo])}const XS=e=>{const t=new WeakSet,n=r=>{if(Ps(r)){if(t.has(r))return;if(Is(r))return r;if(!("toJSON"in r)){t.add(r);const s=Fi(r)?[]:{};return Yo(r,(a,u)=>{const c=n(a);!Os(c)&&(s[u]=c)}),t.delete(r),s}}return r};return n(e)},QS=nr("AsyncFunction"),KS=e=>e&&(Ps(e)||Tn(e))&&Tn(e.then)&&Tn(e.catch),R0=((e,t)=>e?setImmediate:t?((n,r)=>(Bi.addEventListener("message",({source:s,data:a})=>{s===Bi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Bi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Tn(Bi.postMessage)),JS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Bi):typeof process!="undefined"&&process.nextTick||R0,L0=e=>e!=null&&Tn(e[Vo]),q={isArray:Fi,isArrayBuffer:A0,isBuffer:Is,isFormData:SS,isArrayBufferView:fS,isString:hS,isNumber:N0,isBoolean:pS,isObject:Ps,isPlainObject:Cu,isEmptyObject:mS,isReadableStream:AS,isRequest:NS,isResponse:kS,isHeaders:CS,isUndefined:Os,isDate:gS,isFile:ES,isReactNativeBlob:yS,isReactNative:TS,isBlob:bS,isRegExp:$S,isFunction:Tn,isStream:_S,isURLSearchParams:vS,isTypedArray:FS,isFileList:xS,forEach:Yo,merge:Ad,extend:IS,trim:OS,stripBOM:PS,inherits:RS,toFlatObject:LS,kindOf:vd,kindOfTest:nr,endsWith:DS,toArray:MS,forEachEntry:BS,matchAll:US,isHTMLForm:HS,hasOwnProperty:Nu,hasOwnProp:Nu,hasOwnInPrototypeChain:qo,getSafeProp:dS,reduceDescriptors:P0,freezeMethods:VS,toObjectSet:qS,toCamelCase:jS,noop:YS,toFiniteNumber:WS,findKey:O0,global:Bi,isContextDefined:I0,isSpecCompliantForm:GS,toJSONObject:XS,isAsyncFn:QS,isThenable:KS,setImmediate:R0,asap:JS,isIterable:L0,isSafeIterable:e=>e!=null&&qo(e,Vo)&&L0(e)},ZS=q.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"]),ev=e=>{const t={};let n,r,s;return e&&e.split(`
9
+ `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&ZS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function tv(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 nv=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),rv=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Nd(e,t){return q.isArray(e)?e.map(n=>Nd(n,t)):tv(String(e).replace(t,""))}const iv=e=>Nd(e,nv),sv=e=>Nd(e,rv);function D0(e){const t=Object.create(null);return q.forEach(e.toJSON(),(n,r)=>{t[r]=sv(n)}),t}const M0=Symbol("internals");function Wo(e){return e&&String(e).trim().toLowerCase()}function Ou(e){return e===!1||e==null?e:q.isArray(e)?e.map(Ou):iv(String(e))}function ov(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 av=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function kd(e,t,n,r,s){if(q.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function uv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function lv(e,t){const n=q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,a,u){return this[r].call(this,t,s,a,u)},configurable:!0})})}let tn=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(c,d,f){const p=Wo(d);if(!p)return;const m=q.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=Ou(c))}const u=(c,d)=>q.forEach(c,(f,p)=>a(f,p,d));if(q.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(q.isString(t)&&(t=t.trim())&&!av(t))u(ev(t),n);else if(q.isObject(t)&&q.isSafeIterable(t)){let c=Object.create(null),d,f;for(const p of t){if(!q.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],q.hasOwnProp(c,f)?(d=c[f],c[f]=q.isArray(d)?[...d,p[1]]:[d,p[1]]):c[f]=p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=Wo(t),t){const r=q.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return ov(s);if(q.isFunction(n))return n.call(this,s,r);if(q.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Wo(t),t){const r=q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||kd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=Wo(u),u){const c=q.findKey(r,u);c&&(!n||kd(r,r[c],c,n))&&(delete r[c],s=!0)}}return q.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||kd(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return q.forEach(this,(s,a)=>{const u=q.findKey(r,a);if(u){n[u]=Ou(s),delete n[a];return}const c=t?uv(a):String(a).trim();c!==a&&delete n[a],n[c]=Ou(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return q.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&q.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(s=>r.set(s)),r}static accessor(t){const r=(this[M0]=this[M0]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=Wo(u);r[c]||(lv(s,u),r[c]=!0)}return q.isArray(t)?t.forEach(a):a(t),this}};tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),q.freezeMethods(tn);const cv="[REDACTED ****]";function dv(e){if(q.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(q.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function fv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||q.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof tn&&(a=a.toJSON()),r.push(a);let u;if(q.isArray(a))u=[],a.forEach((c,d)=>{const f=s(c);q.isUndefined(f)||(u[d]=f)});else{if(!q.isPlainObject(a)&&dv(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?cv:s(d);q.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}let Ne=class a2 extends Error{static from(t,n,r,s,a,u){const c=new a2(t.message,n||t.code,r,s,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,s,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),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&q.hasOwnProp(t,"redact")?t.redact:void 0,r=q.isArray(n)&&n.length>0?fv(t,n):q.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}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ne.ERR_BAD_OPTION="ERR_BAD_OPTION",Ne.ECONNABORTED="ECONNABORTED",Ne.ETIMEDOUT="ETIMEDOUT",Ne.ECONNREFUSED="ECONNREFUSED",Ne.ERR_NETWORK="ERR_NETWORK",Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ne.ERR_DEPRECATED="ERR_DEPRECATED",Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ne.ERR_CANCELED="ERR_CANCELED",Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ne.ERR_INVALID_URL="ERR_INVALID_URL",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const hv=null,F0=100;function Cd(e){return q.isPlainObject(e)||q.isArray(e)}function B0(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function Od(e,t,n){return e?e.concat(t).map(function(s,a){return s=B0(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function pv(e){return q.isArray(e)&&!e.some(Cd)}const mv=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Iu(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,C){return!q.isUndefined(C[k])});const r=n.metaTokens,s=n.visitor||x,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?F0:n.maxDepth,f=c&&q.isSpecCompliantForm(t),p=[];if(!q.isFunction(s))throw new TypeError("visitor must be a function");function m(w){if(w===null)return"";if(q.isDate(w))return w.toISOString();if(q.isBoolean(w))return w.toString();if(!f&&q.isBlob(w))throw new Ne("Blob is not supported. Use a Buffer instead.");if(q.isArrayBuffer(w)||q.isTypedArray(w)){if(f&&typeof c=="function")return new c([w]);if(typeof Buffer!="undefined")return Buffer.from(w);throw new Ne("Blob is not supported. Use a Buffer instead.",Ne.ERR_NOT_SUPPORT)}return w}function b(w){if(w>d)throw new Ne("Object is too deeply nested ("+w+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(w,k){if(d===1/0)return JSON.stringify(w);const C=[];return JSON.stringify(w,function(G,L){if(!q.isObject(L))return L;for(;C.length&&C[C.length-1]!==this;)C.pop();return C.push(L),b(k+C.length-1),L})}function x(w,k,C){let j=w;if(q.isReactNative(t)&&q.isReactNativeBlob(w))return t.append(Od(C,k,a),m(w)),!1;if(w&&!C&&typeof w=="object"){if(q.endsWith(k,"{}"))k=r?k:k.slice(0,-2),w=y(w,1);else if(q.isArray(w)&&pv(w)||(q.isFileList(w)||q.endsWith(k,"[]"))&&(j=q.toArray(w)))return k=B0(k),j.forEach(function(L,W){!(q.isUndefined(L)||L===null)&&t.append(u===!0?Od([k],W,a):u===null?k:k+"[]",m(L))}),!1}return Cd(w)?!0:(t.append(Od(C,k,a),m(w)),!1)}const A=Object.assign(mv,{defaultVisitor:x,convertValue:m,isVisitable:Cd});function v(w,k,C=0){if(!q.isUndefined(w)){if(b(C),p.indexOf(w)!==-1)throw new Error("Circular reference detected in "+k.join("."));p.push(w),q.forEach(w,function(G,L){(!(q.isUndefined(G)||G===null)&&s.call(t,G,q.isString(L)?L.trim():L,k,A))===!0&&v(G,k?k.concat(L):[L],C+1)}),p.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return v(e),t}function U0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Id(e,t){this._pairs=[],e&&Iu(e,this,t)}const H0=Id.prototype;H0.append=function(t,n){this._pairs.push([t,n])},H0.toString=function(t){const n=t?r=>t.call(this,r,U0):U0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function gv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function j0(e,t,n){if(!t)return e;e=e||"";const r=q.isFunction(n)?{serialize:n}:n,s=q.getSafeProp(r,"encode")||gv,a=q.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=q.isURLSearchParams(t)?t.toString():new Id(t,r).toString(s),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class z0{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){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Pd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Ev={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Id,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Rd=typeof window!="undefined"&&typeof document!="undefined",Ld=typeof navigator=="object"&&navigator||void 0,yv=Rd&&(!Ld||["ReactNative","NativeScript","NS"].indexOf(Ld.product)<0),Tv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bv=Rd&&window.location.href||"http://localhost",Qt=H(H({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rd,hasStandardBrowserEnv:yv,hasStandardBrowserWebWorkerEnv:Tv,navigator:Ld,origin:bv},Symbol.toStringTag,{value:"Module"}))),Ev);function xv(e,t){return Iu(e,new Qt.classes.URLSearchParams,H({visitor:function(n,r,s,a){return Qt.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const $0=F0;function V0(e){if(e>$0)throw new Ne("FormData field is too deeply nested ("+e+" levels). Max depth: "+$0,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function _v(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)V0(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function wv(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function q0(e){function t(n,r,s,a){V0(a);let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&q.isArray(s)?s.length:u,d?(q.hasOwnProp(s,u)?s[u]=q.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!q.hasOwnProp(s,u)||!q.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&q.isArray(s[u])&&(s[u]=wv(s[u])),!c)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,s)=>{t(_v(r),s,n,0)}),n}return null}const Rs=(e,t)=>e!=null&&q.hasOwnProp(e,t)?e[t]:void 0;function Sv(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Go={transitional:Pd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=q.isObject(t);if(a&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return s?JSON.stringify(q0(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=Rs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return xv(t,d).toString();if((c=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Rs(this,"env"),p=f&&f.FormData;return Iu(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),Sv(t)):t}],transformResponse:[function(t){const n=Rs(this,"transitional")||Go.transitional,r=n&&n.forcedJSONParsing,s=Rs(this,"responseType"),a=s==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Rs(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,Rs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qt.classes.FormData,Blob:Qt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch","query"],e=>{Go.headers[e]={}});function Dd(e,t){const n=this||Go,r=t||n,s=tn.from(r.headers);let a=r.data;return q.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Y0(e){return!!(e&&e.__CANCEL__)}let Xo=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function W0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function vv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Av(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,b=0;for(;m!==s;)b+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(b*1e3/y):void 0}}function Nv(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const Pu=(e,t,n=3)=>{let r=0;const s=Av(50,250);return Nv(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,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},G0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},X0=e=>(...t)=>q.asap(()=>e(...t)),kv=Qt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Qt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Qt.origin),Qt.navigator&&/(msie|trident)/i.test(Qt.navigator.userAgent)):()=>!0,Cv=Qt.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];q.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),q.isString(r)&&c.push(`path=${r}`),q.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),q.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+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ov(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Iv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Pv=/^https?:(?!\/\/)/i,Rv=/[\t\n\r]/g;function Lv(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Dv(e){return Lv(e).replace(Rv,"")}function Q0(e,t){if(typeof e=="string"&&Pv.test(Dv(e)))throw new Ne('Invalid URL: missing "//" after protocol',Ne.ERR_INVALID_URL,t)}function K0(e,t,n,r){Q0(t,r);let s=!Ov(t);return e&&(s||n===!1)?(Q0(e,r),Iv(e,t)):t}const J0=e=>e instanceof tn?H({},e):e;function Ui(e,t){e=e||{},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(p,m,b,y){return q.isPlainObject(p)&&q.isPlainObject(m)?q.merge.call({caseless:y},p,m):q.isPlainObject(m)?q.merge({},m):q.isArray(m)?m.slice():m}function s(p,m,b,y){if(q.isUndefined(m)){if(!q.isUndefined(p))return r(void 0,p,b,y)}else return r(p,m,b,y)}function a(p,m){if(!q.isUndefined(m))return r(void 0,m)}function u(p,m){if(q.isUndefined(m)){if(!q.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p){const m=q.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!q.isUndefined(m))if(q.isPlainObject(m)){if(q.hasOwnProp(m,p))return m[p]}else return;const b=q.hasOwnProp(e,"transitional")?e.transitional:void 0;if(q.isPlainObject(b)&&q.hasOwnProp(b,p))return b[p]}function d(p,m,b){if(q.hasOwnProp(t,b))return r(p,m);if(q.hasOwnProp(e,b))return r(void 0,p)}const f={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:d,headers:(p,m,b)=>s(J0(p),J0(m),b,!0)};return q.forEach(Object.keys(H(H({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const b=q.hasOwnProp(f,m)?f[m]:s,y=q.hasOwnProp(e,m)?e[m]:void 0,x=q.hasOwnProp(t,m)?t[m]:void 0,A=b(y,x,m);q.isUndefined(A)&&b!==d||(n[m]=A)}),q.hasOwnProp(t,"validateStatus")&&q.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(q.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const Mv=["content-type","content-length"];function Fv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{Mv.includes(r.toLowerCase())&&e.set(r,s)})}const Bv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Z0(e){const t=Ui({},e),n=b=>q.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=tn.from(c),t.url=j0(K0(f,m,p,t),n("params"),n("paramsSerializer")),d){const b=q.getSafeProp(d,"username")||"",y=q.getSafeProp(d,"password")||"";try{c.set("Authorization","Basic "+btoa(b+":"+(y?Bv(y):"")))}catch(x){throw Ne.from(x,Ne.ERR_BAD_OPTION_VALUE,e)}}if(q.isFormData(r)&&(Qt.hasStandardBrowserEnv||Qt.hasStandardBrowserWebWorkerEnv||q.isReactNative(r)?c.setContentType(void 0):q.isFunction(r.getHeaders)&&Fv(c,r.getHeaders(),n("formDataHeaderPolicy"))),Qt.hasStandardBrowserEnv&&(q.isFunction(s)&&(s=s(t)),s===!0||s==null&&kv(t.url))){const y=a&&u&&Cv.read(u);y&&c.set(a,y)}return t}const Uv=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=Z0(e);let a=s.data;const u=tn.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,m,b,y,x;function A(){y&&y(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function w(){if(!v)return;const C=tn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),G={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:C,config:e,request:v};W0(function(W){n(W),A()},function(W){r(W),A()},G),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(w)},v.onabort=function(){v&&(r(new Ne("Request aborted",Ne.ECONNABORTED,e,v)),A(),v=null)},v.onerror=function(j){const G=j&&j.message?j.message:"Network Error",L=new Ne(G,Ne.ERR_NETWORK,e,v);L.event=j||null,r(L),A(),v=null},v.ontimeout=function(){let j=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const G=s.transitional||Pd;s.timeoutErrorMessage&&(j=s.timeoutErrorMessage),r(new Ne(j,G.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,v)),A(),v=null},a===void 0&&u.setContentType(null),"setRequestHeader"in v&&q.forEach(D0(u),function(j,G){v.setRequestHeader(G,j)}),q.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),c&&c!=="json"&&(v.responseType=s.responseType),f&&([b,x]=Pu(f,!0),v.addEventListener("progress",b)),d&&v.upload&&([m,y]=Pu(d),v.upload.addEventListener("progress",m),v.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=C=>{v&&(r(!C||C.type?new Xo(null,e,v):C),v.abort(),A(),v=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const k=vv(s.url);if(k&&!Qt.protocols.includes(k)){r(new Ne("Unsupported protocol "+k+":",Ne.ERR_BAD_REQUEST,e)),A();return}v.send(a||null)})},Hv=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Ne?f:new Xo(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ne(`timeout of ${t}ms exceeded`,Ne.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>q.asap(u),c},jv=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},zv=function(e,t){return t0(this,null,function*(){try{for(var n=o2($v(e)),r,s,a;r=!(s=yield new vs(n.next())).done;r=!1){const u=s.value;yield*n0(jv(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new vs(s.call(n)))}finally{if(a)throw a[0]}}})},$v=function(e){return t0(this,null,function*(){if(e[Symbol.asyncIterator]){yield*n0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new vs(t.read());if(n)break;yield r}}finally{yield new vs(t.cancel())}})},eg=(e,t,n,r)=>{const s=zv(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Ue(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){c(),f.close();return}let b=m.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}})},cancel(f){return c(f),s.return()}},{highWaterMark:2})},Ru=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Vv=(e,t,n)=>t+2<n&&Ru(e.charCodeAt(t+1))&&Ru(e.charCodeAt(t+2));function qv(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),A=r.charCodeAt(y+2);Ru(x)&&Ru(A)&&(u-=2,y+=2)}let d=0,f=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);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d===37&&Vv(r,u,c))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Md="1.18.1",tg=64*1024,{isFunction:Lu}=q,Yv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),ng=e=>{if(!q.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},rg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Wv=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Gv=e=>{const t=q.global!==void 0&&q.global!==null?q.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=q.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,c=s?Lu(s):typeof fetch=="function",d=Lu(a),f=Lu(u);if(!c)return!1;const p=c&&Lu(n),m=c&&(typeof r=="function"?(w=>k=>w.encode(k))(new r):w=>Ue(null,null,function*(){return new Uint8Array(yield new a(w).arrayBuffer())})),b=d&&p&&rg(()=>{let w=!1;const k=new a(Qt.origin,{body:new n,method:"POST",get duplex(){return w=!0,"half"}}),C=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),w&&!C}),y=f&&p&&rg(()=>q.isReadableStream(new u("").body)),x={stream:y&&(w=>w.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!x[w]&&(x[w]=(k,C)=>{let j=k&&k[w];if(j)return j.call(k);throw new Ne(`Response type '${w}' is not supported`,Ne.ERR_NOT_SUPPORT,C)})});const A=w=>Ue(null,null,function*(){if(w==null)return 0;if(q.isBlob(w))return w.size;if(q.isSpecCompliantForm(w))return(yield new a(Qt.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(q.isArrayBufferView(w)||q.isArrayBuffer(w))return w.byteLength;if(q.isURLSearchParams(w)&&(w=w+""),q.isString(w))return(yield m(w)).byteLength}),v=(w,k)=>Ue(null,null,function*(){const C=q.toFiniteNumber(w.getContentLength());return C==null?A(k):C});return w=>Ue(null,null,function*(){let{url:k,method:C,data:j,signal:G,cancelToken:L,timeout:W,onDownloadProgress:ie,onUploadProgress:fe,responseType:$,headers:le,withCredentials:Z="same-origin",fetchOptions:Ae,maxContentLength:de,maxBodyLength:oe}=Z0(w);const Se=q.isNumber(de)&&de>-1,se=q.isNumber(oe)&&oe>-1,Y=he=>q.hasOwnProp(w,he)?w[he]:void 0;let ae=s||fetch;$=$?($+"").toLowerCase():"text";let N=Hv([G,L&&L.toAbortSignal()],W),D=null;const ee=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let P,ve=null;const Ce=()=>new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,w,D);try{let he;const Le=Y("auth");if(Le){const K=q.getSafeProp(Le,"username")||"",ne=q.getSafeProp(Le,"password")||"";he={username:K,password:ne}}if(Wv(k)){const K=new URL(k,Qt.origin);if(!he&&(K.username||K.password)){const ne=ng(K.username),ge=ng(K.password);he={username:ne,password:ge}}(K.username||K.password)&&(K.username="",K.password="",k=K.href)}if(he&&(le.delete("authorization"),le.set("Authorization","Basic "+btoa(Yv((he.username||"")+":"+(he.password||""))))),Se&&typeof k=="string"&&k.startsWith("data:")&&qv(k)>de)throw new Ne("maxContentLength size of "+de+" exceeded",Ne.ERR_BAD_RESPONSE,w,D);if(se&&C!=="get"&&C!=="head"){const K=yield A(j);if(typeof K=="number"&&isFinite(K)&&(P=K,K>oe))throw Ce()}const Be=se&&(q.isReadableStream(j)||q.isStream(j)),Ge=(K,ne,ge)=>eg(K,tg,je=>{if(se&&je>oe)throw ve=Ce();ne&&ne(je)},ge);if(b&&C!=="get"&&C!=="head"&&(fe||Be)){if(P=P==null?yield v(le,j):P,P!==0||Be){let K=new a(k,{method:"POST",body:j,duplex:"half"}),ne;if(q.isFormData(j)&&(ne=K.headers.get("content-type"))&&le.setContentType(ne),K.body){const[ge,je]=fe&&G0(P,Pu(X0(fe)))||[];j=Ge(K.body,ge,je)}}}else if(Be&&!d&&p&&C!=="get"&&C!=="head")j=Ge(j);else if(Be&&d&&!b&&C!=="get"&&C!=="head")throw new Ne("Stream request bodies are not supported by the current fetch implementation",Ne.ERR_NOT_SUPPORT,w,D);q.isString(Z)||(Z=Z?"include":"omit");const dt=d&&"credentials"in a.prototype;if(q.isFormData(j)){const K=le.getContentType();K&&/^multipart\/form-data/i.test(K)&&!/boundary=/i.test(K)&&le.delete("content-type")}le.set("User-Agent","axios/"+Md,!1);const qt=ce(H({},Ae),{signal:N,method:C.toUpperCase(),headers:D0(le.normalize()),body:j,duplex:"half",credentials:dt?Z:void 0});D=d&&new a(k,qt);let Dt=yield d?ae(D,Ae):ae(k,qt);const An=tn.from(Dt.headers);if(Se){const K=q.toFiniteNumber(An.getContentLength());if(K!=null&&K>de)throw new Ne("maxContentLength size of "+de+" exceeded",Ne.ERR_BAD_RESPONSE,w,D)}const Ee=y&&($==="stream"||$==="response");if(y&&Dt.body&&(ie||Se||Ee&&ee)){const K={};["status","statusText","headers"].forEach(Nn=>{K[Nn]=Dt[Nn]});const ne=q.toFiniteNumber(An.getContentLength()),[ge,je]=ie&&G0(ne,Pu(X0(ie),!0))||[];let Qe=0;const Ct=Nn=>{if(Se&&(Qe=Nn,Qe>de))throw new Ne("maxContentLength size of "+de+" exceeded",Ne.ERR_BAD_RESPONSE,w,D);ge&&ge(Nn)};Dt=new u(eg(Dt.body,tg,Ct,()=>{je&&je(),ee&&ee()}),K)}$=$||"text";let ke=yield x[q.findKey(x,$)||"text"](Dt,w);if(Se&&!y&&!Ee){let K;if(ke!=null&&(typeof ke.byteLength=="number"?K=ke.byteLength:typeof ke.size=="number"?K=ke.size:typeof ke=="string"&&(K=typeof r=="function"?new r().encode(ke).byteLength:ke.length)),typeof K=="number"&&K>de)throw new Ne("maxContentLength size of "+de+" exceeded",Ne.ERR_BAD_RESPONSE,w,D)}return!Ee&&ee&&ee(),yield new Promise((K,ne)=>{W0(K,ne,{data:ke,headers:tn.from(Dt.headers),status:Dt.status,statusText:Dt.statusText,config:w,request:D})})}catch(he){if(ee&&ee(),N&&N.aborted&&N.reason instanceof Ne){const Le=N.reason;throw Le.config=w,D&&(Le.request=D),he!==Le&&Object.defineProperty(Le,"cause",{__proto__:null,value:he,writable:!0,enumerable:!1,configurable:!0}),Le}if(ve)throw D&&!ve.request&&(ve.request=D),ve;if(he instanceof Ne)throw D&&!he.request&&(he.request=D),he;if(he&&he.name==="TypeError"&&/Load failed|fetch/i.test(he.message)){const Le=new Ne("Network Error",Ne.ERR_NETWORK,w,D,he&&he.response);throw Object.defineProperty(Le,"cause",{__proto__:null,value:he.cause||he,writable:!0,enumerable:!1,configurable:!0}),Le}throw Ne.from(he,he&&he.code,w,D,he&&he.response)}})},Xv=new Map,ig=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,c=u,d,f,p=Xv;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:Gv(t)),p=f;return f};ig();const Fd={http:hv,xhr:Uv,fetch:{get:ig}};q.forEach(Fd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const sg=e=>`- ${e}`,Qv=e=>q.isFunction(e)||e===null||e===!1;function Kv(e,t){e=q.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(s=r,!Qv(r)&&(s=Fd[(c=String(r)).toLowerCase()],s===void 0))throw new Ne(`Unknown adapter '${c}'`);if(s&&(q.isFunction(s)||(s=s.get(t))))break;a[c||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
11
+ `+u.map(sg).join(`
12
+ `):" "+sg(u[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+c,Ne.ERR_NOT_SUPPORT)}return s}const og={getAdapter:Kv,adapters:Fd};function Bd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xo(null,e)}function ag(e){return Bd(e),e.headers=tn.from(e.headers),e.data=Dd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),og.getAdapter(e.adapter||Go.adapter,e)(e).then(function(r){Bd(e),e.response=r;try{r.data=Dd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=tn.from(r.headers),r},function(r){if(!Y0(r)&&(Bd(e),r&&r.response)){e.response=r.response;try{r.response.data=Dd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=tn.from(r.response.headers)}return Promise.reject(r)})}const Du={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Du[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ug={};Du.transitional=function(t,n,r){function s(a,u){return"[Axios v"+Md+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Ne(s(u," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!ug[u]&&(ug[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},Du.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Jv(e,t,n){if(typeof e!="object"||e===null)throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],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 Ne("option "+a+" must be "+d,Ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const Mu={assertOptions:Jv,validators:Du},nn=Mu.validators;let Hi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new z0,response:new z0}}request(t,n){return Ue(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
13
13
  `);return u===-1?"":s.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
14
- `),l=u===-1?-1:a.indexOf(`
15
- `,u+1),d=l===-1?"":a.slice(l+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=Ui(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Iu.assertOptions(r,{silentJSONParsing:Zt.transitional(Zt.boolean),forcedJSONParsing:Zt.transitional(Zt.boolean),clarifyTimeoutError:Zt.transitional(Zt.boolean),legacyInterceptorReqResOrdering:Zt.transitional(Zt.boolean),advertiseZstdAcceptEncoding:Zt.transitional(Zt.boolean),validateStatusUndefinedResolves:Zt.transitional(Zt.boolean)},!1),s!=null&&(q.isFunction(s)?n.paramsSerializer={serialize:s}:Iu.assertOptions(s,{encode:Zt.function,serialize:Zt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Iu.assertOptions(n,{baseUrl:Zt.spelling("baseURL"),withXsrfToken:Zt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&q.merge(a.common,a[n.method]);a&&q.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=Jt.concat(u,a);const l=[];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||Id;A&&A.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const f=[];this.interceptors.response.forEach(function(v){f.push(v.fulfilled,v.rejected)});let p,m=0,T;if(!d){const x=[sg.bind(this),void 0];for(x.unshift(...l),x.push(...f),T=x.length,p=Promise.resolve(n);m<T;)p=p.then(x[m++],x[m++]);return p}T=l.length;let y=n;for(;m<T;){const x=l[m++],v=l[m++];try{y=x(y)}catch(A){v.call(this,A);break}}try{p=sg.call(this,y)}catch(x){return Promise.reject(x)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=Ui(this.defaults,t);const n=X0(t.baseURL,t.url,t.allowAbsoluteUrls,t);return U0(n,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(n,r){return this.request(Ui(r||{},{method:t,url:n,data:r&&q.hasOwnProp(r,"data")?r.data:void 0}))}}),q.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(Ui(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Hi.prototype[t]=n(),t!=="query"&&(Hi.prototype[t+"Form"]=n(!0))});let Qv=class o2{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(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(l=>{r.subscribe(l),a=l}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,l){r.reason||(r.reason=new qo(a,u,l),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 o2(function(s){t=s}),cancel:t}}};function Kv(e){return function(n){return e.apply(null,n)}}function Jv(e){return q.isObject(e)&&e.isAxiosError===!0}const Bd={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(Bd).forEach(([e,t])=>{Bd[t]=e});function ag(e){const t=new Hi(e),n=x0(Hi.prototype.request,t);return q.extend(n,Hi.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ag(Ui(e,s))},n}const Nt=ag(Vo);Nt.Axios=Hi,Nt.CanceledError=qo,Nt.CancelToken=Qv,Nt.isCancel=V0,Nt.VERSION=Dd,Nt.toFormData=Au,Nt.AxiosError=Ne,Nt.Cancel=Nt.CanceledError,Nt.all=function(t){return Promise.all(t)},Nt.spread=Kv,Nt.isAxiosError=Jv,Nt.mergeConfig=Ui,Nt.AxiosHeaders=Jt,Nt.formToJSON=e=>$0(q.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=ig.getAdapter,Nt.HttpStatusCode=Bd,Nt.default=Nt;const{Axios:h7,AxiosError:p7,CanceledError:m7,isCancel:g7,CancelToken:E7,VERSION:y7,all:T7,Cancel:b7,isAxiosError:_7,spread:x7,toFormData:w7,AxiosHeaders:S7,HttpStatusCode:v7,formToJSON:A7,getAdapter:N7,mergeConfig:k7,create:C7}=Nt;class Zv{constructor(t,n,r,s=!1,a,u){Ge(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ge(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ge(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ge(this,"baseApiUrl");Ge(this,"headers",{});Ge(this,"fetchConfig",()=>ze(this,null,function*(){try{const t=yield Nt.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}}));Ge(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.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,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class eA{constructor(t,n,r,s=!1,a,u){Ge(this,"apiService");Ge(this,"config",null);Ge(this,"getConfig",()=>ze(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}}));Ge(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ge(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ge(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ge(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ge(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ge(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ge(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ge(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ge(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ge(this,"getProductField",t=>this.config?this.config[t]:"");Ge(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Zv(t,n,r,s,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 Pt=(e,t,n,...r)=>{if(!e)return;const s=["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]",s,n,...r)};class tA{constructor(t=!1){Ge(this,"isDevelopment");Ge(this,"_log",(t,n,...r)=>{Pt(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 nA={copilot:"Your Search Assistant",messaging:"Commerce Client"},ug=H.createContext(null),rA=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:T,searchConfig:y,suggestionButtonConfig:x,progressStepsLimit:v=3,messageAlignment:A="start",autoScroll:S=!0,showProductDescription:k=!1,componentConfig:I,conversationHistory:j,resetConversationMessage:Y="",apiKey:R,apiToken:W,baseUrl:ie,customerId:de,tenantId:$,theme:se,isDevelopment:ee,__features:xe,routingAttributes:fe,enableDownloadTranscript:ce=!0,enableEscalationToAgent:he=!1,showProductCaptions:le=!1,children:K})=>{const ae=e==="messaging",N=H.useMemo(()=>{const ne=fe==null?void 0:fe.isCartMgmtSupported;return ne===!0||ne==="true"},[fe]),D=H.useMemo(()=>ae?{config:null}:new eA(ie,R,W,ee,de,$),[ae,ie,R,W,ee,de,$]),J=H.useMemo(()=>new tA(ee),[ee]);H.useEffect(()=>{ae||!D||D.config||D.getConfig()},[D,ae]);const P=H.useMemo(()=>oS(se),[se]),Se=H.useMemo(()=>{const ne=(y==null?void 0:y.placeholder)||m,Ee=(y==null?void 0:y.buttonLabel)||T;let re="icon";return y!=null&&y.buttonType?re=y.buttonType:T&&(re="text"),ue(U({},y||{}),{placeholder:ne,buttonLabel:Ee,buttonType:re})},[y,m,T]),Me=H.useMemo(()=>ue(U({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||nA[e!=null?e:"copilot"]}),[r,t,n,e]),_e=H.useMemo(()=>({configModule:D,mode:e!=null?e:"copilot",headerConfig:Me,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:P,logger:J,searchConfig:Se,suggestionButtonConfig:x,progressStepsLimit:v,messageAlignment:A,autoScroll:S,showProductDescription:!!k,enableMinimize:!!(I!=null&&I.enableMinimize),enableDownloadTranscript:ce,enableEscalationToAgent:he,showProductCaptions:!!le,resetConversationMessage:Y,conversationHistory:{sinceHours:typeof(j==null?void 0:j.sinceHours)=="number"?j.sinceHours:1,limit:j==null?void 0:j.limit},features:xe,isCartMgmtSupported:N}),[D,e,Me,a,s,f,p,l,d,u,Se,x,A,S,k,I,ce,he,le,Y,J,P,j,xe,N]);return _.jsx(ug.Provider,{value:_e,children:K})},at=()=>{const e=H.useContext(ug);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},lg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],ji=-1;function cg(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 lg.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:ji,data:{content:e}}}function dg(e){let t;try{t=JSON.parse(e)}catch(s){return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.type!="string"||!lg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return ue(U({},n),{type:n.type,index:r})}function fg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function iA(e){return e.type==="markdown"&&e.index===ji?!fg(e.data.content):!0}function sA(e,t){if(t.index===ji){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===ji&&t.type==="markdown"){const a={type:"markdown",index:ji,data:{content:s.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(s=>s.index===t.index);return[...n>=0?e.map((s,a)=>a===n?t:s):[...e,t]].sort((s,a)=>s.index-a.index)}function hg(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const pg={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1,isSilentRequest:!1};function oA(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return U(ue(U({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ue(U({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return ue(U({},e),{conversationId:t.id});case"ADD_MESSAGE":return hg(e.messages,t.message)?e:ue(U({},e),{messages:[...e.messages,ue(U({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{if(e.isSilentRequest)return e;const n=cg(t.token);return n?ue(U({},e),{streamingBlocks:sA(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null,isSilentRequest:!1};if(hg(e.messages,t.message))return U(U({},e),n);const r=ue(U({},t.message),{type:"FLUSH_STREAMING"}),s=[...e.messages].reverse().find(l=>l.role==="user"),a=(s==null?void 0:s.silent)===!0;let u=!1;try{const l=JSON.parse(r.content);if(typeof l=="object"&&l!==null&&"response"in l){const{response:d}=l;u=Array.isArray(d)&&d.some(f=>typeof f=="object"&&f!==null&&"type"in f&&f.type==="cart")}}catch(l){}if(u&&a){let l=-1;for(let d=e.messages.length-1;d>=0;d--)try{const f=JSON.parse(e.messages[d].content);if(typeof f!="object"||f===null||!("response"in f))continue;const{response:p}=f;if(Array.isArray(p)&&p.some(m=>typeof m=="object"&&m!==null&&"type"in m&&m.type==="cart")){l=d;break}}catch(f){}if(l!==-1){const d=[...e.messages];return d[l]=ue(U({},r),{id:e.messages[l].id}),U(ue(U({},e),{messages:d}),n)}}return U(ue(U({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return ue(U({},e),{isAgentTyping:e.isSilentRequest?!1:t.isTyping,loading:e.isSilentRequest?e.loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return U(ue(U({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.isSilentRequest||e.progressSteps[e.progressSteps.length-1]===t.message?e:ue(U({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return ue(U({},e),{routingResult:t.result});case"SET_ERROR":return ue(U({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return ue(U({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return ue(U({},e),{sendError:null});case"LOAD_HISTORY":return ue(U({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return ue(U({},e),{sessionExpired:t.expired});case"SET_SILENT_REQUEST":return ue(U({},e),{isSilentRequest:t.isSilent});case"RESET":return ue(U({},pg),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const mg=H.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,sendMessage:()=>{},addToCart:()=>{},resetConversation:()=>{},retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>ze(null,null,function*(){})}),aA=4320*60*1e3;function Ud(e,t){return`cim_af_conv_${e}_${t}`}function Hd(e,t){return Date.now()-e>t}function uA(e,t,n){try{const r=Ud(e,t),s=sessionStorage.getItem(r);if(!s)return null;const a=JSON.parse(s);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"||Hd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Pu(e,t,n){try{const r=Ud(e,t),s={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(s))}catch(r){}}function jd(e,t){try{const n=Ud(e,t);sessionStorage.removeItem(n)}catch(n){}}function zd(e,t){return`cim_af_ct_${e}_${t}`}function lA(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(dA(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function cA(e){const t=lA(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function dA(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function gg(e,t){try{const n=zd(e,t),r=sessionStorage.getItem(n);if(!r)return null;const s=JSON.parse(r);if(!s||typeof s!="object"||!("accessToken"in s)||!("lastEventId"in s)||!("storedAt"in s))return null;const a=s;return typeof a.accessToken!="string"||!a.accessToken||typeof a.lastEventId!="string"||!a.lastEventId||typeof a.storedAt!="number"?null:cA(a.accessToken)==="expired"?(sessionStorage.removeItem(n),null):a}catch(n){return null}}function fA(e,t,n,r){try{const s=zd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(s,JSON.stringify(a))}catch(s){}}function hA(e,t){try{const n=zd(e,t);sessionStorage.removeItem(n)}catch(n){}}function pA(e,t){return`cim_af_conv_${e}_${t}`}function mA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=pA(e,t);return new BroadcastChannel(n)}catch(n){return null}}function gA(e,t=500){return e?new Promise(n=>{let r=!1;const s=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var l;r||((l=u.data)==null?void 0:l.type)==="conversation_response"&&(r=!0,clearTimeout(s),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(s),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function EA(e,t,n){if(!e)return()=>{};function r(s){var a;if((a=s.data)!=null&&a.type)switch(s.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(l){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function yA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function TA(e){if(e)try{e.close()}catch(t){}}function bA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function _A(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Eg(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 xA(e){if(e.entryType!=="Message")return null;const n=_A(e.entryPayload).abstractMessage;if(!n)return null;const r=Eg(n,"staticContent","text")||Eg(n,"content","text")||"";if(!r)return null;const s=bA(e.sender.role);return{id:e.identifier,serverId:e.identifier,role:s,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function wA(e){const t=[];for(const n of e){const r=xA(n);r&&t.push(r)}return t}const yg="onCimulateWidgetReady",SA=5e3;function Ru(e={}){const{routingAttributes:t,timeoutMs:n=SA}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=U({},t!=null?t:{});return new Promise(s=>{const a={settled:!1},u=()=>{if(a.settled)return;a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer);const p=Object.keys(r).length>0;s(p?r:t)},l={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(yg,{detail:l,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function vA(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=H.useRef(null),u=H.useRef(null),l=H.useRef(null),d=s.sinceHours*60*60*1e3,f=aA,p=H.useCallback(()=>(l.current||(l.current=gA(a.current)),l.current),[]);H.useEffect(()=>{const S=mA(t,n);a.current=S,l.current=null;const k=EA(S,()=>{const I=u.current;if(!I)return null;const j=gg(t,n);return{conversationId:I,continuationToken:j==null?void 0:j.accessToken,lastEventId:j==null?void 0:j.lastEventId}},()=>{jd(t,n),u.current=null});return()=>{k(),TA(S),a.current=null}},[t,n]);const m=H.useCallback((S,k)=>ze(null,null,function*(){var Y;const I=(Y=k==null?void 0:k.createIfMissing)!=null?Y:!0;let j=uA(t,n,f);if(!j){const R=yield p();R&&!Hd(R.storedAt,f)&&(j=R)}if(!j){if(!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const R=yield S.createConversation(yield Ru({routingAttributes:r}));return Pu(t,n,R),u.current=R,{conversationId:R,restoredMessages:[],resumed:!1,outcome:"created"}}try{const W=(yield S.listConversations({conversationId:j.conversationId,startTimestamp:Date.now()-f})).conversations.find(de=>de.conversationId===j.conversationId&&!de.isConversationClosed);if(!W){if(jd(t,n),!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const de=yield S.createConversation(yield Ru({routingAttributes:r}));return Pu(t,n,de),u.current=de,{conversationId:de,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}}S.resumeConversation(W.conversationId),u.current=W.conversationId,Pu(t,n,W.conversationId);let ie=[];try{const de=yield S.listConversationEntries(W.conversationId,{limit:s.limit,startTimestamp:Date.now()-d,direction:"FromStart"});ie=wA(de.conversationEntries)}catch(de){}return{conversationId:W.conversationId,restoredMessages:ie,resumed:!0,outcome:"resumed"}}catch(R){return{conversationId:j.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:R}}}),[t,n,r,s,d,f,p]),T=H.useCallback(S=>{Pu(t,n,S),u.current=S},[t,n]),y=H.useCallback(()=>{jd(t,n),hA(t,n),yA(a.current),u.current=null},[t,n]),x=H.useCallback(()=>{const S=gg(t,n);return S?{continuationToken:S.accessToken,lastEventId:S.lastEventId}:null},[t,n]),v=H.useCallback(()=>ze(null,null,function*(){const S=yield p();return!(S!=null&&S.continuationToken)||Hd(S.storedAt,f)?null:{continuationToken:S.continuationToken,lastEventId:S.lastEventId}}),[f,p]),A=H.useCallback(S=>ze(null,null,function*(){try{const{accessToken:k,lastEventId:I}=yield S.generateContinuationToken();fA(t,n,k,I)}catch(k){}}),[t,n]);return{initializeConversation:m,persistConversationId:T,clearPersistedConversation:y,getStoredConnectOptions:x,getPeerConnectOptions:v,persistContinuationToken:A}}const yr={default:"Something went wrong. Please try again.",server:"Something went wrong. Please try again.",rateLimit:"We are getting a lot of requests right now. Please try again in a moment.",network:"You are offline or we couldn't reach the assistant. Check connection and try again.",interrupted:"Something went wrong. Please try again.",connect:"You are offline or we couldn't reach the assistant. Check connection and try again.",lost:"You are offline or we couldn't reach the assistant. Check connection and try again.",routing:"Something went wrong. Please try again."};function AA(e){if(!e||typeof e!="object")return{};const t=e;return{type:typeof t.type=="string"?t.type:void 0,statusCode:typeof t.statusCode=="number"?t.statusCode:void 0}}function Ps(e){const{type:t,statusCode:n}=AA(e);if(t==="api"&&typeof n=="number")return n===429?yr.rateLimit:n>=500?yr.server:yr.default;switch(t){case"network":return yr.network;case"sse":return yr.interrupted;case"auth":return yr.connect;default:return yr.default}}function Tg(e){switch(e.code){case"MAX_RECONNECT":return yr.lost;case"ROUTING_FAILED":return yr.routing;default:return yr.connect}}const NA="Your session ended due to inactivity. Starting a new session…",kA=300*1e3,CA=2e3;function bg(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)}function _g(e){if(bg(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function OA(e){var T;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((T=e.variants)!=null?T:[]).filter(y=>y.value),s=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=s?` (${s})`:"",l=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",f=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${l}`;return{prompt:p,display:m}}const xg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,children:f})=>{const{logger:p,conversationHistory:m}=at(),[T,y]=H.useReducer(oA,pg),x=H.useRef(T);x.current=T;const v=vA({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:m}),A=H.useRef(null),S=H.useRef(l),k=H.useRef(d),I=H.useRef(u),j=H.useRef(!1),Y=H.useRef(!1),R=H.useRef(0),W=H.useRef(0),ie=H.useRef(0),de=H.useRef(null),$=H.useRef(null);S.current=l,k.current=d,I.current=u,H.useEffect(()=>{const ne=new sS({baseURL:e,orgId:t,esDeveloperName:n,options:U({enableLogging:a},s?{capabilitiesVersion:s}:{})});A.current=ne,ne.on("connected",()=>{var re;y({type:"SET_CONNECTION_STATUS",status:"connected"}),(re=I.current)==null||re.call(I)}),ne.on("disconnected",()=>{y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),ne.on("reconnecting",()=>{y({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),ne.on("message",re=>{var $e;const ve=ue(U({id:re.messageId||crypto.randomUUID()},re.messageId?{serverId:re.messageId}:{}),{role:"agent",content:re.content,timestamp:re.timestamp,sender:re.sender,raw:re});p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:ve.id,tokensBeforeFlush:R.current,streamedFinalOnly:R.current===0}),R.current=0,y({type:"FLUSH_STREAMING",message:ve}),($e=S.current)==null||$e.call(S,ve)}),ne.on("streaming_token",re=>{if(R.current+=1,p!=null&&p.isDevelopment){const ve=cg(re.token);ve?ve.index===ji?p.debug("🦜 streaming_token fragment (reassembled downstream)",{token:re.token}):p.debug("🦜 streaming_token parsed",{type:ve.type,index:ve.index,outputName:ve.type==="tool_results"?ve.output_name:void 0}):p.debug("🦜 streaming_token empty",{token:re.token})}y({type:"APPEND_STREAMING_TOKEN",token:re.token})}),ne.on("typing_started",()=>{y({type:"SET_AGENT_TYPING",isTyping:!0})}),ne.on("typing_stopped",()=>{y({type:"SET_AGENT_TYPING",isTyping:!1})}),ne.on("progress_indicator",re=>{y({type:"ADD_PROGRESS_STEP",message:re.message})}),ne.on("routing_result",re=>{var ve;if(y({type:"SET_ROUTING_RESULT",result:re}),!re.isSuccessful){const $e=`Routing failed: ${re.failureType||"unknown"}`;y({type:"SET_ERROR",error:Tg({code:"ROUTING_FAILED"})}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(ve=k.current)==null||ve.call(k,$e)}}),ne.on("participant_changed",re=>{if(re.participant.name==="Automated Process")return;const ve=ue(U({id:crypto.randomUUID()},re.entryId?{serverId:re.entryId}:{}),{role:"system",content:re.action==="add"?`${re.participant.name||"Agent"} joined the conversation`:`${re.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:re}),y({type:"ADD_MESSAGE",message:ve})}),ne.on("conversation_closed",()=>{const re={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};y({type:"ADD_MESSAGE",message:re}),y({type:"SET_CONVERSATION_ID",id:null}),v.clearPersistedConversation()}),ne.on("error",re=>{var ve;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:re}),re.code==="SESSION_EXPIRED"){Y.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:Tg(re)}),re.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(ve=k.current)==null||ve.call(k,re.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"});const Ee=()=>ze(null,null,function*(){let re=v.getStoredConnectOptions(),ve=!1;re||(re=yield v.getPeerConnectOptions(),ve=!!re);try{yield ne.connect(re!=null?re:void 0)}catch(gt){if(re&&_g(gt))p==null||p.log("Stored token expired on connect — falling back to fresh connect"),ve||v.clearPersistedConversation(),yield ne.connect();else throw gt}yield v.persistContinuationToken(ne);const $e=yield v.initializeConversation(ne);if(p==null||p.log("🦜 initial connect complete",{conversationId:$e.conversationId,resumed:$e.resumed,outcome:$e.outcome,restoredMessages:$e.restoredMessages.length}),$e.outcome==="unverified-error"){$e.conversationId&&(ne.resumeConversation($e.conversationId),y({type:"SET_CONVERSATION_ID",id:$e.conversationId}));return}y({type:"SET_CONVERSATION_ID",id:$e.conversationId}),$e.resumed&&$e.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:$e.restoredMessages})});return $.current=Ee,Ee().catch(re=>{var ve;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:Ps(re)}),(ve=k.current)==null||ve.call(k,re.message)}),()=>{ne.disconnect(),ne.off(),A.current=null,$.current=null}},[e,t,n,s]);const se=H.useCallback(()=>ze(null,null,function*(){const ne=A.current;if(!ne)return!1;const Ee=v.getStoredConnectOptions();if(!Ee)return p==null||p.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;p==null||p.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{ne.disconnect(),yield ne.connect(Ee)}catch(ve){if(_g(ve))return p==null||p.log("🦜 attemptResume: token expired (401) — will start fresh",{error:ve instanceof Error?ve.message:String(ve)}),!1;throw p==null||p.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:ve instanceof Error?ve.message:String(ve)}),ve}yield v.persistContinuationToken(ne);const re=yield v.initializeConversation(ne,{createIfMissing:!1});return re.outcome==="not-found-or-closed"||!re.conversationId?(p==null||p.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(re.outcome==="unverified-error"&&(p==null||p.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:re.conversationId}),ne.resumeConversation(re.conversationId)),p==null||p.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:re.conversationId}),y({type:"SET_CONVERSATION_ID",id:re.conversationId}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(re.conversationId),Y.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[v,p]),ee=H.useCallback(ne=>ze(null,null,function*(){var re;const Ee=A.current;if(Ee){y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""});try{yield Ee.sendMessage(ne)}catch(ve){y({type:"SET_SEND_ERROR",error:{text:ne,message:Ps(ve)}}),(re=k.current)==null||re.call(k,ve instanceof Error?ve.message:String(ve))}}}),[]),xe=H.useCallback(ne=>ze(null,null,function*(){var re;const Ee=A.current;if(!(!Ee||j.current)){j.current=!0;try{if(yield se()){ne&&(yield ee(ne));return}p==null||p.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),Y.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:NA,timestamp:new Date().toISOString()}}),v.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),Ee.disconnect(),yield Ee.connect(),yield v.persistContinuationToken(Ee);const ve=yield Ee.createConversation(yield Ru({routingAttributes:r}));p==null||p.log("🦜 recoverExpiredSession: new conversation created",{conversationId:ve}),y({type:"SET_CONVERSATION_ID",id:ve}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(ve),ne&&(yield ee(ne))}catch(ve){const $e=ve instanceof Error?ve.message:String(ve);y({type:"SET_ERROR",error:Ps(ve)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(re=k.current)==null||re.call(k,$e)}finally{j.current=!1}}}),[r,v,se,ee,p]),fe=H.useRef(xe);fe.current=xe;const ce=H.useCallback(()=>ze(null,null,function*(){const ne=A.current;if(!ne||j.current)return;if(!x.current.conversationId&&!Y.current){ne.reconnect();return}j.current=!0;const Ee=ze(null,null,function*(){try{(yield se())||(Y.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(re){Y.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{j.current=!1,de.current=null}});de.current=Ee,yield Ee}),[se]),he=H.useRef(ce);he.current=ce,H.useEffect(()=>{const ne=()=>{const Ce=Date.now();Ce-ie.current<CA||(ie.current=Ce,he.current())},Ee=()=>{if(document.visibilityState==="hidden"){W.current=Date.now();return}const Ce=A.current;if(!Ce)return;const We=W.current?Date.now()-W.current:0;W.current=0,(Y.current||!Ce.isConnected||We>kA)&&ne()},re=Ce=>{Ce.persisted&&ne()},ve=()=>{W.current=Date.now()},$e=()=>ne(),gt=()=>ne();return document.addEventListener("visibilitychange",Ee),window.addEventListener("pageshow",re),window.addEventListener("pagehide",ve),document.addEventListener("resume",$e),window.addEventListener("online",gt),()=>{document.removeEventListener("visibilitychange",Ee),window.removeEventListener("pageshow",re),window.removeEventListener("pagehide",ve),document.removeEventListener("resume",$e),window.removeEventListener("online",gt)}},[]);const le=H.useCallback((ne,Ee)=>{const re=A.current;if(re){if(Y.current){fe.current(ne);return}re.sendMessage(ne).catch(ve=>{var $e;if(bg(ve)){fe.current(ne);return}y({type:"SET_SEND_ERROR",error:Ee(Ps(ve))}),($e=k.current)==null||$e.call(k,ve.message)})}},[]),K=H.useCallback(ne=>{const Ee=de.current;if(Ee){Ee.then(ne);return}ne()},[]),ae=H.useCallback((ne,Ee,re)=>{if(!A.current)return;const $e={id:crypto.randomUUID(),role:"user",content:Ee!=null?Ee:ne,timestamp:new Date().toISOString(),silent:re==null?void 0:re.silent};y({type:"CLEAR_SEND_ERROR"}),y({type:"ADD_MESSAGE",message:$e}),re!=null&&re.silent?y({type:"SET_SILENT_REQUEST",isSilent:!0}):(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""})),K(()=>le(ne,gt=>({text:ne,displayContent:Ee,message:gt})))},[le,K]),N=H.useCallback((ne,Ee)=>{ne.trim()&&ae(ne,void 0,Ee)},[ae]),D=H.useCallback(ne=>{if(!A.current)return;const{prompt:Ee,display:re}=OA(ne);ae(Ee,re)},[ae]),J=H.useCallback(()=>{const ne=A.current,Ee=x.current.sendError;!ne||!Ee||K(()=>{j.current||(y({type:"CLEAR_SEND_ERROR"}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),le(Ee.text,re=>ue(U({},Ee),{message:re})))})},[le,K]),P=H.useCallback(()=>{const ne=A.current,Ee=$.current;!ne||!Ee||(Y.current=!1,ne.disconnect(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),Ee().catch(re=>{var ve;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:Ps(re)}),(ve=k.current)==null||ve.call(k,re.message)}))},[]),Se=H.useCallback(()=>{const ne=A.current;ne&&(Y.current=!1,v.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),ne.endConversation().then(()=>(ne.disconnect(),ne.connect())).then(()=>ze(null,null,function*(){return yield v.persistContinuationToken(ne),ne.createConversation(yield Ru({routingAttributes:r}))})).then(Ee=>{y({type:"SET_CONVERSATION_ID",id:Ee}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(Ee)}).catch(Ee=>{var re;y({type:"SET_ERROR",error:Ps(Ee)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(re=k.current)==null||re.call(k,Ee.message)}))},[r,v]),Me=H.useCallback(()=>ze(null,null,function*(){var ve;const ne=A.current;if(!ne)return;const Ee=yield ne.retrieveConversationTranscript(),re=URL.createObjectURL(Ee);try{const $e=document.createElement("a");$e.href=re,$e.download=`transcript-${(ve=ne.conversationId)!=null?ve:"conversation"}.pdf`,document.body.appendChild($e),$e.click(),$e.remove()}finally{URL.revokeObjectURL(re)}}),[]),_e=H.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,progressSteps:T.progressSteps,error:T.error,sendError:T.sendError,loading:T.loading,sessionExpired:T.sessionExpired,sendMessage:N,addToCart:D,resetConversation:Se,retryLastMessage:J,retryConnection:P,downloadTranscript:Me}),[T,N,D,Se,J,P,Me]);return _.jsx(mg.Provider,{value:_e,children:f})};var wg=Symbol.for("immer-nothing"),Sg=Symbol.for("immer-draftable"),On=Symbol.for("immer-state");function er(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Rs=Object.getPrototypeOf;function Ls(e){return!!e&&!!e[On]}function zi(e){var t;return e?vg(e)||Array.isArray(e)||!!e[Sg]||!!((t=e.constructor)!=null&&t[Sg])||Yo(e)||Mu(e):!1}var IA=Object.prototype.constructor.toString();function vg(e){if(!e||typeof e!="object")return!1;const t=Rs(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===IA}function Lu(e,t){Du(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Du(e){const t=e[On];return t?t.type_:Array.isArray(e)?1:Yo(e)?2:Mu(e)?3:0}function $d(e,t){return Du(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ag(e,t,n){const r=Du(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function PA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Yo(e){return e instanceof Map}function Mu(e){return e instanceof Set}function $i(e){return e.copy_||e.base_}function Vd(e,t){if(Yo(e))return new Map(e);if(Mu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=vg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[On];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],l=r[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(Rs(e),r)}else{const r=Rs(e);if(r!==null&&n)return U({},e);const s=Object.create(r);return Object.assign(s,e)}}function qd(e,t=!1){return Bu(e)||Ls(e)||!zi(e)||(Du(e)>1&&Object.defineProperties(e,{set:{value:Fu},add:{value:Fu},clear:{value:Fu},delete:{value:Fu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>qd(n,!0))),e}function Fu(){er(2)}function Bu(e){return Object.isFrozen(e)}var RA={};function Vi(e){const t=RA[e];return t||er(0,e),t}var Wo;function Ng(){return Wo}function LA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function kg(e,t){t&&(Vi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yd(e){Wd(e),e.drafts_.forEach(DA),e.drafts_=null}function Wd(e){e===Wo&&(Wo=e.parent_)}function Cg(e){return Wo=LA(Wo,e)}function DA(e){const t=e[On];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Og(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[On].modified_&&(Yd(t),er(4)),zi(e)&&(e=Uu(t,e),t.parent_||Hu(t,e)),t.patches_&&Vi("Patches").generateReplacementPatches_(n[On].base_,e,t.patches_,t.inversePatches_)):e=Uu(t,n,[]),Yd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wg?e:void 0}function Uu(e,t,n){if(Bu(t))return t;const r=t[On];if(!r)return Lu(t,(s,a)=>Ig(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Hu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),Lu(a,(l,d)=>Ig(e,r,s,l,d,n,u)),Hu(e,s,!1),n&&e.patches_&&Vi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Ig(e,t,n,r,s,a,u){if(Ls(s)){const l=a&&t&&t.type_!==3&&!$d(t.assigned_,r)?a.concat(r):void 0,d=Uu(e,s,l);if(Ag(n,r,d),Ls(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(zi(s)&&!Bu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Uu(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Yo(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Hu(e,s)}}function Hu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qd(t,n)}function MA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Ng(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Gd;n&&(s=[r],a=Go);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var Gd={get(e,t){if(t===On)return e;const n=$i(e);if(!$d(n,t))return FA(e,n,t);const r=n[t];return e.finalized_||!zi(r)?r:r===Xd(e.base_,t)?(Kd(e),e.copy_[t]=Jd(r,e)):r},has(e,t){return t in $i(e)},ownKeys(e){return Reflect.ownKeys($i(e))},set(e,t,n){const r=Pg($i(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Xd($i(e),t),a=s==null?void 0:s[On];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(PA(n,s)&&(n!==void 0||$d(e.base_,t)))return!0;Kd(e),Qd(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Xd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Kd(e),Qd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=$i(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){er(11)},getPrototypeOf(e){return Rs(e.base_)},setPrototypeOf(){er(12)}},Go={};Lu(Gd,(e,t)=>{Go[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Go.deleteProperty=function(e,t){return Go.set.call(this,e,t,void 0)},Go.set=function(e,t,n){return Gd.set.call(this,e[0],t,n,e[0])};function Xd(e,t){const n=e[On];return(n?$i(n):e)[t]}function FA(e,t,n){var s;const r=Pg(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Pg(e,t){if(!(t in e))return;let n=Rs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Rs(n)}}function Qd(e){e.modified_||(e.modified_=!0,e.parent_&&Qd(e.parent_))}function Kd(e){e.copy_||(e.copy_=Vd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var BA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&er(6),r!==void 0&&typeof r!="function"&&er(7);let s;if(zi(t)){const a=Cg(this),u=Jd(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?Yd(a):Wd(a)}return kg(a,r),Og(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===wg&&(s=void 0),this.autoFreeze_&&qd(s,!0),r){const a=[],u=[];Vi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else er(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,d=>t(d,...l));let r,s;return[this.produce(t,n,(u,l)=>{r=u,s=l}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){zi(e)||er(8),Ls(e)&&(e=UA(e));const t=Cg(this),n=Jd(e,void 0);return n[On].isManual_=!0,Wd(t),n}finishDraft(e,t){const n=e&&e[On];(!n||!n.isManual_)&&er(9);const{scope_:r}=n;return kg(r,t),Og(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Vi("Patches").applyPatches_;return Ls(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Jd(e,t){const n=Yo(e)?Vi("MapSet").proxyMap_(e,t):Mu(e)?Vi("MapSet").proxySet_(e,t):MA(e,t);return(t?t.scope_:Ng()).drafts_.push(n),n}function UA(e){return Ls(e)||er(10,e),Rg(e)}function Rg(e){if(!zi(e)||Bu(e))return e;const t=e[On];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Vd(e,!0);return Lu(n,(r,s)=>{Ag(n,r,Rg(s))}),t&&(t.finalized_=!1),n}var HA=new BA,jA=HA.produce;function zA(e,t,n){var r=H.useMemo(function(){return jA(e)},[e]);return H.useReducer(r,t,n)}const ft={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},Lg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1},Dg=H.createContext(null),Mg=H.createContext(null),$A=({children:e,dispatch:t})=>{const n=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),s=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),l=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),f=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),p=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),m=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),T=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=H.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,s,a,u,l,d,f,p,m,T]);return _.jsx(Mg.Provider,{value:y,children:e})},VA=(e,t)=>{const{type:n,payload:r}=t;switch(n){case ft.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case ft.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case ft.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case ft.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case ft.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case ft.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case ft.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case ft.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case ft.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case ft.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case ft.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case ft.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case ft.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case ft.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case ft.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},qA=({promptsConfig:e,children:t})=>{const[n,r]=zA(VA,U(U({},Lg),e||{}));return _.jsx(Dg.Provider,{value:n,children:_.jsx($A,{dispatch:r,children:t})})};function YA(){var e=H.useRef(!0);return e.current?(e.current=!1,!0):e.current}function WA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function GA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Zd=typeof window!="undefined",ju=function(e){H.useEffect(e,[])},XA=function(e){var t=H.useRef(e);t.current=e,ju(function(){return function(){return t.current()}})},QA=function(e){var t=H.useRef(0),n=H.useState(e),r=n[0],s=n[1],a=H.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return XA(function(){cancelAnimationFrame(t.current)}),[r,a]},KA=function(e,t){return e===t};function JA(e,t){t===void 0&&(t=KA);var n=H.useRef(),r=H.useRef(e),s=YA();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var ZA=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,l=QA({width:Zd?window.innerWidth:r,height:Zd?window.innerHeight:a}),d=l[0],f=l[1];return H.useEffect(function(){if(Zd){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return WA(window,"resize",p),function(){GA(window,"resize",p)}}},[]),d};const Fg="cimulate",ef=`${Fg}:ui-state-update`,tf=`${Fg}:prompts-state-update`,eN=e=>{window.addEventListener(ef,e)},tN=e=>{window.removeEventListener(ef,e)},nN=(e,t)=>{const n=new CustomEvent(ef,{detail:{property:e,value:t}});window.dispatchEvent(n)},Bg=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);st.entryTypeProxy.entryType=e},Br=e=>{const t=st.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;st.statusProxy.isOpen=n,n&&(st.statusProxy.isMinimized=!1)},zu=e=>{const t=st.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;st.statusProxy.isMinimized=n,n&&(st.statusProxy.isOpen=!1)},nf=e=>{st.modalProxy.isFullscreen=e},$u=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);st.statusProxy.type=e,e==="dialog"||e==="chat"?st.modeProxy.mode="embedded":st.modeProxy.mode="standalone"},rf=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(", ")}.`);st.dialogProxy.position=e},rN=e=>{const t=st.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;st.dialogProxy.isFullHeight=n};class iN{constructor(){Ge(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}});Ge(this,"connectedProxy");Ge(this,"modeProxy");Ge(this,"entryTypeProxy");Ge(this,"statusProxy");Ge(this,"dialogProxy");Ge(this,"modalProxy",{isFullscreen:!1});Ge(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ge(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return nN(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 st=new iN,Ug=H.createContext({mode:st.modeProxy.mode,entryType:st.entryType,status:st.statusProxy,dialogPosition:st.dialogProxy.position,isDialogFullHeight:st.dialogProxy.isFullHeight,dialogWidth:st.dialogProxy.width,isModalFullscreen:st.modalProxy.isFullscreen,previousComponentType:st.statusProxy.type}),sN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=H.useState(e!=null?e:st.entryTypeProxy.entryType),[u,l]=H.useState(st.modeProxy.mode),[d,f]=H.useState({type:n||st.statusProxy.type,isOpen:st.statusProxy.isOpen,isMinimized:st.statusProxy.isMinimized}),[p,m]=H.useState(st.dialogProxy.position),[T,y]=H.useState(st.dialogProxy.isFullHeight),[x,v]=H.useState(st.dialogProxy.width),[A,S]=H.useState(st.modalProxy.isFullscreen),k=JA(d.type);H.useEffect(()=>{const j=Y=>{const{property:R,value:W}=Y.detail||{};if(!(!R||W===void 0)){if(R==="mode"){l(W);return}if(R==="entryType"){a(W);return}if(R==="isMinimized"){f(ie=>ue(U({},ie),{isMinimized:W}));return}if(R==="isOpen"){f(ie=>ue(U({},ie),{isOpen:W}));return}if(R==="type"){f(ie=>ue(U({},ie),{type:W}));return}if(R==="position"){m(W);return}if(R==="isFullHeight"){y(W);return}if(R==="width"){v(W);return}if(R==="isFullscreen"){S(W);return}}};return eN(j),()=>{tN(j)}},[]),ju(()=>{e&&Bg(e)}),ju(()=>{const j=n||(t==null?void 0:t.type);j&&$u(j),t&&"isOpen"in t&&Br(!!t.isOpen),t&&"isMinimized"in t&&zu(!!t.isMinimized)}),ju(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:j}=t.options;j&&rf(j),"dialogFullHeight"in t.options&&rN(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&nf(!!t.options.isModalFullscreen)});const I=H.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:k||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:x,isModalFullscreen:A}),[u,s,d,k,p,T,x,A]);return _.jsx(Ug.Provider,{value:I,children:r})},oN=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){Pt(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){Pt(!0,"error",`[CimulateOverrides] Override URL must use HTTPS, got ${r.protocol}. Using default components.`),t({});return}const s=document.createElement("script");s.src=e,s.async=!0,s.crossOrigin="anonymous";let a=!1;const u=()=>{a=!0,clearTimeout(l)};s.onload=()=>{if(a)return;u();const d=window.CimulateOverrides;d&&typeof d=="object"?(Pt(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(Pt(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),Pt(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,Pt(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),Hg=H.createContext({overrides:{},isInitialized:!1}),aN=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=H.useState({}),[a,u]=H.useState(!1);H.useEffect(()=>{ze(null,null,function*(){let f={};e?(Pt(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield oN(e)):t&&typeof t=="object"?(Pt(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(Pt(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=H.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return _.jsx(Hg.Provider,{value:l,children:n})},jg=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:l,openLinksInNewTab:d,globalClassName:f,isDevelopment:p=!1,componentType:m,componentConfig:T,entryType:y,entryMessage:x,disclaimerText:v,disclaimerMarkdown:A,clientContext:S,searchPlaceholder:k,searchButtonLabel:I,searchConfig:j,suggestionButtonConfig:Y,messageAlignment:R,autoScroll:W,promptsConfig:ie,showProductDescription:de,resetConversationMessage:$,conversationHistory:se,messagingConfig:ee,overrides:xe,overridesUrl:fe,inlineOverrides:ce,__features:he,children:le})=>_.jsx(rA,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:x,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:k,searchButtonLabel:I,searchConfig:j,suggestionButtonConfig:Y,messageAlignment:R,autoScroll:W,showProductDescription:de,componentConfig:T,clientContext:S,disclaimerMarkdown:A,disclaimerText:v,resetConversationMessage:$,conversationHistory:se,isDevelopment:p,__features:he,progressStepsLimit:ee==null?void 0:ee.progressStepsLimit,routingAttributes:ee==null?void 0:ee.routingAttributes,enableDownloadTranscript:ee==null?void 0:ee.enableDownloadTranscript,enableEscalationToAgent:ee==null?void 0:ee.enableEscalationToAgent,showProductCaptions:ee==null?void 0:ee.showProductCaptions,children:_.jsx(sN,{entryType:y,componentConfig:T,componentType:m,children:_.jsx(qA,{promptsConfig:ie,children:_.jsx(aN,{overridesUrl:fe,inlineOverrides:ce||xe,children:_.jsx(xg,{scrt2Url:(ee==null?void 0:ee.scrt2Url)||"",orgId:(ee==null?void 0:ee.orgId)||"",esDeveloperName:(ee==null?void 0:ee.esDeveloperName)||"",routingAttributes:(ee==null?void 0:ee.routingAttributes)||{},capabilitiesVersion:ee==null?void 0:ee.capabilitiesVersion,enableLogging:p,children:le})})})})}),ri=()=>{const e=H.useContext(Ug);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var sf={exports:{}},En={},of={exports:{}},af={};var zg;function uN(){return zg||(zg=1,(function(e){function t(K,ae){var N=K.length;K.push(ae);e:for(;0<N;){var D=N-1>>>1,J=K[D];if(0<s(J,ae))K[D]=ae,K[N]=J,N=D;else break e}}function n(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var ae=K[0],N=K.pop();if(N!==ae){K[0]=N;e:for(var D=0,J=K.length,P=J>>>1;D<P;){var Se=2*(D+1)-1,Me=K[Se],_e=Se+1,ne=K[_e];if(0>s(Me,N))_e<J&&0>s(ne,Me)?(K[D]=ne,K[_e]=N,D=_e):(K[D]=Me,K[Se]=N,D=Se);else if(_e<J&&0>s(ne,N))K[D]=ne,K[_e]=N,D=_e;else break e}}return ae}function s(K,ae){var N=K.sortIndex-ae.sortIndex;return N!==0?N:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var d=[],f=[],p=1,m=null,T=3,y=!1,x=!1,v=!1,A=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(K){for(var ae=n(f);ae!==null;){if(ae.callback===null)r(f);else if(ae.startTime<=K)r(f),ae.sortIndex=ae.expirationTime,t(d,ae);else break;ae=n(f)}}function j(K){if(v=!1,I(K),!x)if(n(d)!==null)x=!0,he(Y);else{var ae=n(f);ae!==null&&le(j,ae.startTime-K)}}function Y(K,ae){x=!1,v&&(v=!1,S(ie),ie=-1),y=!0;var N=T;try{for(I(ae),m=n(d);m!==null&&(!(m.expirationTime>ae)||K&&!se());){var D=m.callback;if(typeof D=="function"){m.callback=null,T=m.priorityLevel;var J=D(m.expirationTime<=ae);ae=e.unstable_now(),typeof J=="function"?m.callback=J:m===n(d)&&r(d),I(ae)}else r(d);m=n(d)}if(m!==null)var P=!0;else{var Se=n(f);Se!==null&&le(j,Se.startTime-ae),P=!1}return P}finally{m=null,T=N,y=!1}}var R=!1,W=null,ie=-1,de=5,$=-1;function se(){return!(e.unstable_now()-$<de)}function ee(){if(W!==null){var K=e.unstable_now();$=K;var ae=!0;try{ae=W(!0,K)}finally{ae?xe():(R=!1,W=null)}}else R=!1}var xe;if(typeof k=="function")xe=function(){k(ee)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,ce=fe.port2;fe.port1.onmessage=ee,xe=function(){ce.postMessage(null)}}else xe=function(){A(ee,0)};function he(K){W=K,R||(R=!0,xe())}function le(K,ae){ie=A(function(){K(e.unstable_now())},ae)}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(K){K.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,he(Y))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(K){switch(T){case 1:case 2:case 3:var ae=3;break;default:ae=T}var N=T;T=ae;try{return K()}finally{T=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,ae){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var N=T;T=K;try{return ae()}finally{T=N}},e.unstable_scheduleCallback=function(K,ae,N){var D=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?D+N:D):N=D,K){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=N+J,K={id:p++,callback:ae,priorityLevel:K,startTime:N,expirationTime:J,sortIndex:-1},N>D?(K.sortIndex=N,t(f,K),n(d)===null&&K===n(f)&&(v?(S(ie),ie=-1):v=!0,le(j,N-D))):(K.sortIndex=J,t(d,K),x||y||(x=!0,he(Y))),K},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(K){var ae=T;return function(){var N=T;T=ae;try{return K.apply(this,arguments)}finally{T=N}}}})(af)),af}var $g;function lN(){return $g||($g=1,of.exports=uN()),of.exports}var Vg;function cN(){if(Vg)return En;Vg=1;var e=Kn(),t=lN();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var l=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[: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={},m={};function T(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,c,h){if(c!==null&&c.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,o,c,h){if(o===null||typeof o=="undefined"||y(i,o,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function v(i,o,c,h,E,b,w){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=c,this.propertyName=i,this.type=o,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 o=i[0];A[o]=new v(o,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 S=/[\-:]([a-z])/g;function k(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 o=i.replace(S,k);A[o]=new v(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(S,k);A[o]=new v(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(S,k);A[o]=new v(o,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 I(i,o,c,h){var E=A.hasOwnProperty(o)?A[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(x(o,c,E,h)&&(c=null),h||E===null?T(o)&&(c===null?i.removeAttribute(o):i.setAttribute(o,""+c)):E.mustUseProperty?i[E.propertyName]=c===null?E.type===3?!1:"":c:(o=E.attributeName,h=E.attributeNamespace,c===null?i.removeAttribute(o):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,h?i.setAttributeNS(h,o,c):i.setAttribute(o,c))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),R=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),se=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),xe=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),he=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),K=Symbol.iterator;function ae(i){return i===null||typeof i!="object"?null:(i=K&&i[K]||i["@@iterator"],typeof i=="function"?i:null)}var N=Object.assign,D;function J(i){if(D===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);D=o&&o[1]||""}return`
17
- `+D+i}var P=!1;function Se(i,o){if(!i||P)return"";P=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Z){var h=Z}Reflect.construct(i,[],o)}else{try{o.call()}catch(Z){h=Z}i.call(o.prototype)}else{try{throw Error()}catch(Z){h=Z}i()}}catch(Z){if(Z&&h&&typeof Z.stack=="string"){for(var E=Z.stack.split(`
18
- `),b=h.stack.split(`
19
- `),w=E.length-1,M=b.length-1;1<=w&&0<=M&&E[w]!==b[M];)M--;for(;1<=w&&0<=M;w--,M--)if(E[w]!==b[M]){if(w!==1||M!==1)do if(w--,M--,0>M||E[w]!==b[M]){var z=`
20
- `+E[w].replace(" at new "," at ");return i.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",i.displayName)),z}while(1<=w&&0<=M);break}}}finally{P=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?J(i):""}function Me(i){switch(i.tag){case 5:return J(i.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return i=Se(i.type,!1),i;case 11:return i=Se(i.type.render,!1),i;case 1:return i=Se(i.type,!0),i;default:return""}}function _e(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 W:return"Fragment";case R:return"Portal";case de:return"Profiler";case ie:return"StrictMode";case xe:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case ee:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ce:return o=i.displayName||null,o!==null?o:_e(i.type)||"Memo";case he:o=i._payload,i=i._init;try{return _e(i(o))}catch(c){}}return null}function ne(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _e(o);case 8:return o===ie?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Ee(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function re(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ve(i){var o=re(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof c!="undefined"&&typeof c.get=="function"&&typeof c.set=="function"){var E=c.get,b=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(w){h=""+w,b.call(this,w)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(w){h=""+w},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function $e(i){i._valueTracker||(i._valueTracker=ve(i))}function gt(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=re(i)?i.checked?"true":"false":i.value),i=h,i!==c?(o.setValue(i),!0):!1}function Ce(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function We(i,o){var c=o.checked;return N({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Ze(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=Ee(o.value!=null?o.value:c),i._wrapperState={initialChecked:h,initialValue:c,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Pe(i,o){o=o.checked,o!=null&&I(i,"checked",o,!1)}function Et(i,o){Pe(i,o);var c=Ee(o.value),h=o.type;if(c!=null)h==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?wn(i,o.type,c):o.hasOwnProperty("defaultValue")&&wn(i,o.type,Ee(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function Ln(i,o,c){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,c||o===i.value||(i.value=o),i.defaultValue=o}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function wn(i,o,c){(o!=="number"||Ce(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var ar=Array.isArray;function Or(i,o,c,h){if(i=i.options,o){o={};for(var E=0;E<c.length;E++)o["$"+c[E]]=!0;for(c=0;c<i.length;c++)E=o.hasOwnProperty("$"+i[c].value),i[c].selected!==E&&(i[c].selected=E),E&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Ee(c),o=null,E=0;E<i.length;E++){if(i[E].value===c){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function ur(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Kl(i,o){var c=o.value;if(c==null){if(c=o.children,o=o.defaultValue,c!=null){if(o!=null)throw Error(n(92));if(ar(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:Ee(c)}}function Jl(i,o){var c=Ee(o.value),h=Ee(o.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),o.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),h!=null&&(i.defaultValue=""+h)}function Zl(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function oe(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 Ae(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?oe(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ve,Qe=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,c,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,c,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(Ve=Ve||document.createElement("div"),Ve.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ve.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function nt(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var Gt={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},Yr=["Webkit","ms","Moz","O"];Object.keys(Gt).forEach(function(i){Yr.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Gt[o]=Gt[i]})});function Vn(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||Gt.hasOwnProperty(i)&&Gt[i]?(""+o).trim():o+"px"}function mi(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=Vn(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var ls=N({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 Xt(i,o){if(o){if(ls[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Ir(i,o){if(i.indexOf("-")===-1)return typeof o.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 Dn=null;function hp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var pp=null,ho=null,po=null;function T_(i){if(i=Za(i)){if(typeof pp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=xc(o),pp(i.stateNode,i.type,o))}}function b_(i){ho?po?po.push(i):po=[i]:ho=i}function __(){if(ho){var i=ho,o=po;if(po=ho=null,T_(i),o)for(i=0;i<o.length;i++)T_(o[i])}}function x_(i,o){return i(o)}function w_(){}var mp=!1;function S_(i,o,c){if(mp)return i(o,c);mp=!0;try{return x_(i,o,c)}finally{mp=!1,(ho!==null||po!==null)&&(w_(),__())}}function Pa(i,o){var c=i.stateNode;if(c===null)return null;var h=xc(c);if(h===null)return null;c=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var gp=!1;if(l)try{var Ra={};Object.defineProperty(Ra,"passive",{get:function(){gp=!0}}),window.addEventListener("test",Ra,Ra),window.removeEventListener("test",Ra,Ra)}catch(i){gp=!1}function uF(i,o,c,h,E,b,w,M,z){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(c,Z)}catch(ge){this.onError(ge)}}var La=!1,ec=null,tc=!1,Ep=null,lF={onError:function(i){La=!0,ec=i}};function cF(i,o,c,h,E,b,w,M,z){La=!1,ec=null,uF.apply(lF,arguments)}function dF(i,o,c,h,E,b,w,M,z){if(cF.apply(this,arguments),La){if(La){var Z=ec;La=!1,ec=null}else throw Error(n(198));tc||(tc=!0,Ep=Z)}}function cs(i){var o=i,c=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(c=o.return),i=o.return;while(i)}return o.tag===3?c:null}function v_(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function A_(i){if(cs(i)!==i)throw Error(n(188))}function fF(i){var o=i.alternate;if(!o){if(o=cs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var c=i,h=o;;){var E=c.return;if(E===null)break;var b=E.alternate;if(b===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===c)return A_(E),i;if(b===h)return A_(E),o;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var w=!1,M=E.child;M;){if(M===c){w=!0,c=E,h=b;break}if(M===h){w=!0,h=E,c=b;break}M=M.sibling}if(!w){for(M=b.child;M;){if(M===c){w=!0,c=b,h=E;break}if(M===h){w=!0,h=b,c=E;break}M=M.sibling}if(!w)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:o}function N_(i){return i=fF(i),i!==null?k_(i):null}function k_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=k_(i);if(o!==null)return o;i=i.sibling}return null}var C_=t.unstable_scheduleCallback,O_=t.unstable_cancelCallback,hF=t.unstable_shouldYield,pF=t.unstable_requestPaint,Ct=t.unstable_now,mF=t.unstable_getCurrentPriorityLevel,yp=t.unstable_ImmediatePriority,I_=t.unstable_UserBlockingPriority,nc=t.unstable_NormalPriority,gF=t.unstable_LowPriority,P_=t.unstable_IdlePriority,rc=null,Pr=null;function EF(i){if(Pr&&typeof Pr.onCommitFiberRoot=="function")try{Pr.onCommitFiberRoot(rc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var lr=Math.clz32?Math.clz32:bF,yF=Math.log,TF=Math.LN2;function bF(i){return i>>>=0,i===0?32:31-(yF(i)/TF|0)|0}var ic=64,sc=4194304;function Da(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 oc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,w=c&268435455;if(w!==0){var M=w&~E;M!==0?h=Da(M):(b&=w,b!==0&&(h=Da(b)))}else w=c&~E,w!==0?h=Da(w):b!==0&&(h=Da(b));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,b=o&-o,E>=b||E===16&&(b&4194240)!==0))return o;if((h&4)!==0&&(h|=c&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)c=31-lr(o),E=1<<c,h|=i[c],o&=~E;return h}function _F(i,o){switch(i){case 1:case 2:case 4:return o+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 o+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 xF(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var w=31-lr(b),M=1<<w,z=E[w];z===-1?((M&c)===0||(M&h)!==0)&&(E[w]=_F(M,o)):z<=o&&(i.expiredLanes|=M),b&=~M}}function Tp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function R_(){var i=ic;return ic<<=1,(ic&4194240)===0&&(ic=64),i}function bp(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function Ma(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-lr(o),i[o]=c}function wF(i,o){var c=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<c;){var E=31-lr(c),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function _p(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-lr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var ut=0;function L_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var D_,xp,M_,F_,B_,wp=!1,ac=[],gi=null,Ei=null,yi=null,Fa=new Map,Ba=new Map,Ti=[],SF="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 U_(i,o){switch(i){case"focusin":case"focusout":gi=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":yi=null;break;case"pointerover":case"pointerout":Fa.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ba.delete(o.pointerId)}}function Ua(i,o,c,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},o!==null&&(o=Za(o),o!==null&&xp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function vF(i,o,c,h,E){switch(o){case"focusin":return gi=Ua(gi,i,o,c,h,E),!0;case"dragenter":return Ei=Ua(Ei,i,o,c,h,E),!0;case"mouseover":return yi=Ua(yi,i,o,c,h,E),!0;case"pointerover":var b=E.pointerId;return Fa.set(b,Ua(Fa.get(b)||null,i,o,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,Ba.set(b,Ua(Ba.get(b)||null,i,o,c,h,E)),!0}return!1}function H_(i){var o=ds(i.target);if(o!==null){var c=cs(o);if(c!==null){if(o=c.tag,o===13){if(o=v_(c),o!==null){i.blockedOn=o,B_(i.priority,function(){M_(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function uc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=vp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Dn=h,c.target.dispatchEvent(h),Dn=null}else return o=Za(c),o!==null&&xp(o),i.blockedOn=c,!1;o.shift()}return!0}function j_(i,o,c){uc(i)&&c.delete(o)}function AF(){wp=!1,gi!==null&&uc(gi)&&(gi=null),Ei!==null&&uc(Ei)&&(Ei=null),yi!==null&&uc(yi)&&(yi=null),Fa.forEach(j_),Ba.forEach(j_)}function Ha(i,o){i.blockedOn===o&&(i.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,AF)))}function ja(i){function o(E){return Ha(E,i)}if(0<ac.length){Ha(ac[0],i);for(var c=1;c<ac.length;c++){var h=ac[c];h.blockedOn===i&&(h.blockedOn=null)}}for(gi!==null&&Ha(gi,i),Ei!==null&&Ha(Ei,i),yi!==null&&Ha(yi,i),Fa.forEach(o),Ba.forEach(o),c=0;c<Ti.length;c++)h=Ti[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ti.length&&(c=Ti[0],c.blockedOn===null);)H_(c),c.blockedOn===null&&Ti.shift()}var mo=j.ReactCurrentBatchConfig,lc=!0;function NF(i,o,c,h){var E=ut,b=mo.transition;mo.transition=null;try{ut=1,Sp(i,o,c,h)}finally{ut=E,mo.transition=b}}function kF(i,o,c,h){var E=ut,b=mo.transition;mo.transition=null;try{ut=4,Sp(i,o,c,h)}finally{ut=E,mo.transition=b}}function Sp(i,o,c,h){if(lc){var E=vp(i,o,c,h);if(E===null)zp(i,o,h,cc,c),U_(i,h);else if(vF(E,i,o,c,h))h.stopPropagation();else if(U_(i,h),o&4&&-1<SF.indexOf(i)){for(;E!==null;){var b=Za(E);if(b!==null&&D_(b),b=vp(i,o,c,h),b===null&&zp(i,o,h,cc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else zp(i,o,h,null,c)}}var cc=null;function vp(i,o,c,h){if(cc=null,i=hp(h),i=ds(i),i!==null)if(o=cs(i),o===null)i=null;else if(c=o.tag,c===13){if(i=v_(o),i!==null)return i;i=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return cc=i,null}function z_(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(mF()){case yp:return 1;case I_:return 4;case nc:case gF:return 16;case P_:return 536870912;default:return 16}default:return 16}}var bi=null,Ap=null,dc=null;function $_(){if(dc)return dc;var i,o=Ap,c=o.length,h,E="value"in bi?bi.value:bi.textContent,b=E.length;for(i=0;i<c&&o[i]===E[i];i++);var w=c-i;for(h=1;h<=w&&o[c-h]===E[b-h];h++);return dc=E.slice(i,1<h?1-h:void 0)}function fc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function hc(){return!0}function V_(){return!1}function Mn(i){function o(c,h,E,b,w){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var M in i)i.hasOwnProperty(M)&&(c=i[M],this[M]=c?c(b):b[M]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?hc:V_,this.isPropagationStopped=V_,this}return N(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=hc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=hc)},persist:function(){},isPersistent:hc}),o}var go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Np=Mn(go),za=N({},go,{view:0,detail:0}),CF=Mn(za),kp,Cp,$a,pc=N({},za,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ip,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!==$a&&($a&&i.type==="mousemove"?(kp=i.screenX-$a.screenX,Cp=i.screenY-$a.screenY):Cp=kp=0,$a=i),kp)},movementY:function(i){return"movementY"in i?i.movementY:Cp}}),q_=Mn(pc),OF=N({},pc,{dataTransfer:0}),IF=Mn(OF),PF=N({},za,{relatedTarget:0}),Op=Mn(PF),RF=N({},go,{animationName:0,elapsedTime:0,pseudoElement:0}),LF=Mn(RF),DF=N({},go,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),MF=Mn(DF),FF=N({},go,{data:0}),Y_=Mn(FF),BF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},UF={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"},HF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jF(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=HF[i])?!!o[i]:!1}function Ip(){return jF}var zF=N({},za,{key:function(i){if(i.key){var o=BF[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=fc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?UF[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ip,charCode:function(i){return i.type==="keypress"?fc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?fc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),$F=Mn(zF),VF=N({},pc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),W_=Mn(VF),qF=N({},za,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ip}),YF=Mn(qF),WF=N({},go,{propertyName:0,elapsedTime:0,pseudoElement:0}),GF=Mn(WF),XF=N({},pc,{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}),QF=Mn(XF),KF=[9,13,27,32],Pp=l&&"CompositionEvent"in window,Va=null;l&&"documentMode"in document&&(Va=document.documentMode);var JF=l&&"TextEvent"in window&&!Va,G_=l&&(!Pp||Va&&8<Va&&11>=Va),X_=" ",Q_=!1;function K_(i,o){switch(i){case"keyup":return KF.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function J_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Eo=!1;function ZF(i,o){switch(i){case"compositionend":return J_(o);case"keypress":return o.which!==32?null:(Q_=!0,X_);case"textInput":return i=o.data,i===X_&&Q_?null:i;default:return null}}function eB(i,o){if(Eo)return i==="compositionend"||!Pp&&K_(i,o)?(i=$_(),dc=Ap=bi=null,Eo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return G_&&o.locale!=="ko"?null:o.data;default:return null}}var tB={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 Z_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!tB[i.type]:o==="textarea"}function ex(i,o,c,h){b_(h),o=Tc(o,"onChange"),0<o.length&&(c=new Np("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var qa=null,Ya=null;function nB(i){yx(i,0)}function mc(i){var o=xo(i);if(gt(o))return i}function rB(i,o){if(i==="change")return o}var tx=!1;if(l){var Rp;if(l){var Lp="oninput"in document;if(!Lp){var nx=document.createElement("div");nx.setAttribute("oninput","return;"),Lp=typeof nx.oninput=="function"}Rp=Lp}else Rp=!1;tx=Rp&&(!document.documentMode||9<document.documentMode)}function rx(){qa&&(qa.detachEvent("onpropertychange",ix),Ya=qa=null)}function ix(i){if(i.propertyName==="value"&&mc(Ya)){var o=[];ex(o,Ya,i,hp(i)),S_(nB,o)}}function iB(i,o,c){i==="focusin"?(rx(),qa=o,Ya=c,qa.attachEvent("onpropertychange",ix)):i==="focusout"&&rx()}function sB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return mc(Ya)}function oB(i,o){if(i==="click")return mc(o)}function aB(i,o){if(i==="input"||i==="change")return mc(o)}function uB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var cr=typeof Object.is=="function"?Object.is:uB;function Wa(i,o){if(cr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),h=Object.keys(o);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var E=c[h];if(!d.call(o,E)||!cr(i[E],o[E]))return!1}return!0}function sx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ox(i,o){var c=sx(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=o&&h>=o)return{node:c,offset:o-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=sx(c)}}function ax(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?ax(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function ux(){for(var i=window,o=Ce();o instanceof i.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch(h){c=!1}if(c)i=o.contentWindow;else break;o=Ce(i.document)}return o}function Dp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function lB(i){var o=ux(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&ax(c.ownerDocument.documentElement,c)){if(h!==null&&Dp(c)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in c)c.selectionStart=o,c.selectionEnd=Math.min(i,c.value.length);else if(i=(o=c.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=c.textContent.length,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=ox(c,b);var w=ox(c,h);E&&w&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==w.node||i.focusOffset!==w.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(o),i.extend(w.node,w.offset)):(o.setEnd(w.node,w.offset),i.addRange(o)))}}for(o=[],i=c;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<o.length;c++)i=o[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var cB=l&&"documentMode"in document&&11>=document.documentMode,yo=null,Mp=null,Ga=null,Fp=!1;function lx(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Fp||yo==null||yo!==Ce(h)||(h=yo,"selectionStart"in h&&Dp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Ga&&Wa(Ga,h)||(Ga=h,h=Tc(Mp,"onSelect"),0<h.length&&(o=new Np("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=yo)))}function gc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var To={animationend:gc("Animation","AnimationEnd"),animationiteration:gc("Animation","AnimationIteration"),animationstart:gc("Animation","AnimationStart"),transitionend:gc("Transition","TransitionEnd")},Bp={},cx={};l&&(cx=document.createElement("div").style,"AnimationEvent"in window||(delete To.animationend.animation,delete To.animationiteration.animation,delete To.animationstart.animation),"TransitionEvent"in window||delete To.transitionend.transition);function Ec(i){if(Bp[i])return Bp[i];if(!To[i])return i;var o=To[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in cx)return Bp[i]=o[c];return i}var dx=Ec("animationend"),fx=Ec("animationiteration"),hx=Ec("animationstart"),px=Ec("transitionend"),mx=new Map,gx="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 _i(i,o){mx.set(i,o),a(o,[i])}for(var Up=0;Up<gx.length;Up++){var Hp=gx[Up],dB=Hp.toLowerCase(),fB=Hp[0].toUpperCase()+Hp.slice(1);_i(dB,"on"+fB)}_i(dx,"onAnimationEnd"),_i(fx,"onAnimationIteration"),_i(hx,"onAnimationStart"),_i("dblclick","onDoubleClick"),_i("focusin","onFocus"),_i("focusout","onBlur"),_i(px,"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 Xa="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(" "),hB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xa));function Ex(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,dF(h,o,void 0,i),i.currentTarget=null}function yx(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],E=h.event;h=h.listeners;e:{var b=void 0;if(o)for(var w=h.length-1;0<=w;w--){var M=h[w],z=M.instance,Z=M.currentTarget;if(M=M.listener,z!==b&&E.isPropagationStopped())break e;Ex(E,M,Z),b=z}else for(w=0;w<h.length;w++){if(M=h[w],z=M.instance,Z=M.currentTarget,M=M.listener,z!==b&&E.isPropagationStopped())break e;Ex(E,M,Z),b=z}}}if(tc)throw i=Ep,tc=!1,Ep=null,i}function yt(i,o){var c=o[Gp];c===void 0&&(c=o[Gp]=new Set);var h=i+"__bubble";c.has(h)||(Tx(o,i,2,!1),c.add(h))}function jp(i,o,c){var h=0;o&&(h|=4),Tx(c,i,h,o)}var yc="_reactListening"+Math.random().toString(36).slice(2);function Qa(i){if(!i[yc]){i[yc]=!0,r.forEach(function(c){c!=="selectionchange"&&(hB.has(c)||jp(c,!1,i),jp(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[yc]||(o[yc]=!0,jp("selectionchange",!1,o))}}function Tx(i,o,c,h){switch(z_(o)){case 1:var E=NF;break;case 4:E=kF;break;default:E=Sp}c=E.bind(null,o,c,i),E=void 0,!gp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,c,{capture:!0,passive:E}):i.addEventListener(o,c,!0):E!==void 0?i.addEventListener(o,c,{passive:E}):i.addEventListener(o,c,!1)}function zp(i,o,c,h,E){var b=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var w=h.tag;if(w===3||w===4){var M=h.stateNode.containerInfo;if(M===E||M.nodeType===8&&M.parentNode===E)break;if(w===4)for(w=h.return;w!==null;){var z=w.tag;if((z===3||z===4)&&(z=w.stateNode.containerInfo,z===E||z.nodeType===8&&z.parentNode===E))return;w=w.return}for(;M!==null;){if(w=ds(M),w===null)return;if(z=w.tag,z===5||z===6){h=b=w;continue e}M=M.parentNode}}h=h.return}S_(function(){var Z=b,ge=hp(c),Te=[];e:{var pe=mx.get(i);if(pe!==void 0){var ke=Np,Ie=i;switch(i){case"keypress":if(fc(c)===0)break e;case"keydown":case"keyup":ke=$F;break;case"focusin":Ie="focus",ke=Op;break;case"focusout":Ie="blur",ke=Op;break;case"beforeblur":case"afterblur":ke=Op;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ke=q_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=IF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=YF;break;case dx:case fx:case hx:ke=LF;break;case px:ke=GF;break;case"scroll":ke=CF;break;case"wheel":ke=QF;break;case"copy":case"cut":case"paste":ke=MF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=W_}var Re=(o&4)!==0,Ot=!Re&&i==="scroll",G=Re?pe!==null?pe+"Capture":null:pe;Re=[];for(var V=Z,Q;V!==null;){Q=V;var we=Q.stateNode;if(Q.tag===5&&we!==null&&(Q=we,G!==null&&(we=Pa(V,G),we!=null&&Re.push(Ka(V,we,Q)))),Ot)break;V=V.return}0<Re.length&&(pe=new ke(pe,Ie,null,c,ge),Te.push({event:pe,listeners:Re}))}}if((o&7)===0){e:{if(pe=i==="mouseover"||i==="pointerover",ke=i==="mouseout"||i==="pointerout",pe&&c!==Dn&&(Ie=c.relatedTarget||c.fromElement)&&(ds(Ie)||Ie[Wr]))break e;if((ke||pe)&&(pe=ge.window===ge?ge:(pe=ge.ownerDocument)?pe.defaultView||pe.parentWindow:window,ke?(Ie=c.relatedTarget||c.toElement,ke=Z,Ie=Ie?ds(Ie):null,Ie!==null&&(Ot=cs(Ie),Ie!==Ot||Ie.tag!==5&&Ie.tag!==6)&&(Ie=null)):(ke=null,Ie=Z),ke!==Ie)){if(Re=q_,we="onMouseLeave",G="onMouseEnter",V="mouse",(i==="pointerout"||i==="pointerover")&&(Re=W_,we="onPointerLeave",G="onPointerEnter",V="pointer"),Ot=ke==null?pe:xo(ke),Q=Ie==null?pe:xo(Ie),pe=new Re(we,V+"leave",ke,c,ge),pe.target=Ot,pe.relatedTarget=Q,we=null,ds(ge)===Z&&(Re=new Re(G,V+"enter",Ie,c,ge),Re.target=Q,Re.relatedTarget=Ot,we=Re),Ot=we,ke&&Ie)t:{for(Re=ke,G=Ie,V=0,Q=Re;Q;Q=bo(Q))V++;for(Q=0,we=G;we;we=bo(we))Q++;for(;0<V-Q;)Re=bo(Re),V--;for(;0<Q-V;)G=bo(G),Q--;for(;V--;){if(Re===G||G!==null&&Re===G.alternate)break t;Re=bo(Re),G=bo(G)}Re=null}else Re=null;ke!==null&&bx(Te,pe,ke,Re,!1),Ie!==null&&Ot!==null&&bx(Te,Ot,Ie,Re,!0)}}e:{if(pe=Z?xo(Z):window,ke=pe.nodeName&&pe.nodeName.toLowerCase(),ke==="select"||ke==="input"&&pe.type==="file")var Le=rB;else if(Z_(pe))if(tx)Le=aB;else{Le=sB;var Ue=iB}else(ke=pe.nodeName)&&ke.toLowerCase()==="input"&&(pe.type==="checkbox"||pe.type==="radio")&&(Le=oB);if(Le&&(Le=Le(i,Z))){ex(Te,Le,c,ge);break e}Ue&&Ue(i,pe,Z),i==="focusout"&&(Ue=pe._wrapperState)&&Ue.controlled&&pe.type==="number"&&wn(pe,"number",pe.value)}switch(Ue=Z?xo(Z):window,i){case"focusin":(Z_(Ue)||Ue.contentEditable==="true")&&(yo=Ue,Mp=Z,Ga=null);break;case"focusout":Ga=Mp=yo=null;break;case"mousedown":Fp=!0;break;case"contextmenu":case"mouseup":case"dragend":Fp=!1,lx(Te,c,ge);break;case"selectionchange":if(cB)break;case"keydown":case"keyup":lx(Te,c,ge)}var He;if(Pp)e:{switch(i){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else Eo?K_(i,c)&&(qe="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(qe="onCompositionStart");qe&&(G_&&c.locale!=="ko"&&(Eo||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&Eo&&(He=$_()):(bi=ge,Ap="value"in bi?bi.value:bi.textContent,Eo=!0)),Ue=Tc(Z,qe),0<Ue.length&&(qe=new Y_(qe,i,null,c,ge),Te.push({event:qe,listeners:Ue}),He?qe.data=He:(He=J_(c),He!==null&&(qe.data=He)))),(He=JF?ZF(i,c):eB(i,c))&&(Z=Tc(Z,"onBeforeInput"),0<Z.length&&(ge=new Y_("onBeforeInput","beforeinput",null,c,ge),Te.push({event:ge,listeners:Z}),ge.data=He))}yx(Te,o)})}function Ka(i,o,c){return{instance:i,listener:o,currentTarget:c}}function Tc(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=Pa(i,c),b!=null&&h.unshift(Ka(i,b,E)),b=Pa(i,o),b!=null&&h.push(Ka(i,b,E))),i=i.return}return h}function bo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function bx(i,o,c,h,E){for(var b=o._reactName,w=[];c!==null&&c!==h;){var M=c,z=M.alternate,Z=M.stateNode;if(z!==null&&z===h)break;M.tag===5&&Z!==null&&(M=Z,E?(z=Pa(c,b),z!=null&&w.unshift(Ka(c,z,M))):E||(z=Pa(c,b),z!=null&&w.push(Ka(c,z,M)))),c=c.return}w.length!==0&&i.push({event:o,listeners:w})}var pB=/\r\n?/g,mB=/\u0000|\uFFFD/g;function _x(i){return(typeof i=="string"?i:""+i).replace(pB,`
21
- `).replace(mB,"")}function bc(i,o,c){if(o=_x(o),_x(i)!==o&&c)throw Error(n(425))}function _c(){}var $p=null,Vp=null;function qp(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Yp=typeof setTimeout=="function"?setTimeout:void 0,gB=typeof clearTimeout=="function"?clearTimeout:void 0,xx=typeof Promise=="function"?Promise:void 0,EB=typeof queueMicrotask=="function"?queueMicrotask:typeof xx!="undefined"?function(i){return xx.resolve(null).then(i).catch(yB)}:Yp;function yB(i){setTimeout(function(){throw i})}function Wp(i,o){var c=o,h=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(h===0){i.removeChild(E),ja(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);ja(o)}function xi(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function wx(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(o===0)return i;o--}else c==="/$"&&o++}i=i.previousSibling}return null}var _o=Math.random().toString(36).slice(2),Rr="__reactFiber$"+_o,Ja="__reactProps$"+_o,Wr="__reactContainer$"+_o,Gp="__reactEvents$"+_o,TB="__reactListeners$"+_o,bB="__reactHandles$"+_o;function ds(i){var o=i[Rr];if(o)return o;for(var c=i.parentNode;c;){if(o=c[Wr]||c[Rr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=wx(i);i!==null;){if(c=i[Rr])return c;i=wx(i)}return o}i=c,c=i.parentNode}return null}function Za(i){return i=i[Rr]||i[Wr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function xo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function xc(i){return i[Ja]||null}var Xp=[],wo=-1;function wi(i){return{current:i}}function Tt(i){0>wo||(i.current=Xp[wo],Xp[wo]=null,wo--)}function ht(i,o){wo++,Xp[wo]=i.current,i.current=o}var Si={},sn=wi(Si),Sn=wi(!1),fs=Si;function So(i,o){var c=i.type.contextTypes;if(!c)return Si;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in c)E[b]=o[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function vn(i){return i=i.childContextTypes,i!=null}function wc(){Tt(Sn),Tt(sn)}function Sx(i,o,c){if(sn.current!==Si)throw Error(n(168));ht(sn,o),ht(Sn,c)}function vx(i,o,c){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,ne(i)||"Unknown",E));return N({},c,h)}function Sc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Si,fs=sn.current,ht(sn,i),ht(Sn,Sn.current),!0}function Ax(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=vx(i,o,fs),h.__reactInternalMemoizedMergedChildContext=i,Tt(Sn),Tt(sn),ht(sn,i)):Tt(Sn),ht(Sn,c)}var Gr=null,vc=!1,Qp=!1;function Nx(i){Gr===null?Gr=[i]:Gr.push(i)}function _B(i){vc=!0,Nx(i)}function vi(){if(!Qp&&Gr!==null){Qp=!0;var i=0,o=ut;try{var c=Gr;for(ut=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}Gr=null,vc=!1}catch(E){throw Gr!==null&&(Gr=Gr.slice(i+1)),C_(yp,vi),E}finally{ut=o,Qp=!1}}return null}var vo=[],Ao=0,Ac=null,Nc=0,qn=[],Yn=0,hs=null,Xr=1,Qr="";function ps(i,o){vo[Ao++]=Nc,vo[Ao++]=Ac,Ac=i,Nc=o}function kx(i,o,c){qn[Yn++]=Xr,qn[Yn++]=Qr,qn[Yn++]=hs,hs=i;var h=Xr;i=Qr;var E=32-lr(h)-1;h&=~(1<<E),c+=1;var b=32-lr(o)+E;if(30<b){var w=E-E%5;b=(h&(1<<w)-1).toString(32),h>>=w,E-=w,Xr=1<<32-lr(o)+E|c<<E|h,Qr=b+i}else Xr=1<<b|c<<E|h,Qr=i}function Kp(i){i.return!==null&&(ps(i,1),kx(i,1,0))}function Jp(i){for(;i===Ac;)Ac=vo[--Ao],vo[Ao]=null,Nc=vo[--Ao],vo[Ao]=null;for(;i===hs;)hs=qn[--Yn],qn[Yn]=null,Qr=qn[--Yn],qn[Yn]=null,Xr=qn[--Yn],qn[Yn]=null}var Fn=null,Bn=null,xt=!1,dr=null;function Cx(i,o){var c=Qn(5,null,null,0);c.elementType="DELETED",c.stateNode=o,c.return=i,o=i.deletions,o===null?(i.deletions=[c],i.flags|=16):o.push(c)}function Ox(i,o){switch(i.tag){case 5:var c=i.type;return o=o.nodeType!==1||c.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Fn=i,Bn=xi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Fn=i,Bn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=hs!==null?{id:Xr,overflow:Qr}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=Qn(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,Fn=i,Bn=null,!0):!1;default:return!1}}function Zp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function em(i){if(xt){var o=Bn;if(o){var c=o;if(!Ox(i,o)){if(Zp(i))throw Error(n(418));o=xi(c.nextSibling);var h=Fn;o&&Ox(i,o)?Cx(h,c):(i.flags=i.flags&-4097|2,xt=!1,Fn=i)}}else{if(Zp(i))throw Error(n(418));i.flags=i.flags&-4097|2,xt=!1,Fn=i}}}function Ix(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Fn=i}function kc(i){if(i!==Fn)return!1;if(!xt)return Ix(i),xt=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!qp(i.type,i.memoizedProps)),o&&(o=Bn)){if(Zp(i))throw Px(),Error(n(418));for(;o;)Cx(i,o),o=xi(o.nextSibling)}if(Ix(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(o===0){Bn=xi(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Bn=null}}else Bn=Fn?xi(i.stateNode.nextSibling):null;return!0}function Px(){for(var i=Bn;i;)i=xi(i.nextSibling)}function No(){Bn=Fn=null,xt=!1}function tm(i){dr===null?dr=[i]:dr.push(i)}var xB=j.ReactCurrentBatchConfig;function eu(i,o,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===b?o.ref:(o=function(w){var M=E.refs;w===null?delete M[b]:M[b]=w},o._stringRef=b,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Cc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function Rx(i){var o=i._init;return o(i._payload)}function Lx(i){function o(G,V){if(i){var Q=G.deletions;Q===null?(G.deletions=[V],G.flags|=16):Q.push(V)}}function c(G,V){if(!i)return null;for(;V!==null;)o(G,V),V=V.sibling;return null}function h(G,V){for(G=new Map;V!==null;)V.key!==null?G.set(V.key,V):G.set(V.index,V),V=V.sibling;return G}function E(G,V){return G=Ri(G,V),G.index=0,G.sibling=null,G}function b(G,V,Q){return G.index=Q,i?(Q=G.alternate,Q!==null?(Q=Q.index,Q<V?(G.flags|=2,V):Q):(G.flags|=2,V)):(G.flags|=1048576,V)}function w(G){return i&&G.alternate===null&&(G.flags|=2),G}function M(G,V,Q,we){return V===null||V.tag!==6?(V=Ym(Q,G.mode,we),V.return=G,V):(V=E(V,Q),V.return=G,V)}function z(G,V,Q,we){var Le=Q.type;return Le===W?ge(G,V,Q.props.children,we,Q.key):V!==null&&(V.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===he&&Rx(Le)===V.type)?(we=E(V,Q.props),we.ref=eu(G,V,Q),we.return=G,we):(we=Zc(Q.type,Q.key,Q.props,null,G.mode,we),we.ref=eu(G,V,Q),we.return=G,we)}function Z(G,V,Q,we){return V===null||V.tag!==4||V.stateNode.containerInfo!==Q.containerInfo||V.stateNode.implementation!==Q.implementation?(V=Wm(Q,G.mode,we),V.return=G,V):(V=E(V,Q.children||[]),V.return=G,V)}function ge(G,V,Q,we,Le){return V===null||V.tag!==7?(V=xs(Q,G.mode,we,Le),V.return=G,V):(V=E(V,Q),V.return=G,V)}function Te(G,V,Q){if(typeof V=="string"&&V!==""||typeof V=="number")return V=Ym(""+V,G.mode,Q),V.return=G,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case Y:return Q=Zc(V.type,V.key,V.props,null,G.mode,Q),Q.ref=eu(G,null,V),Q.return=G,Q;case R:return V=Wm(V,G.mode,Q),V.return=G,V;case he:var we=V._init;return Te(G,we(V._payload),Q)}if(ar(V)||ae(V))return V=xs(V,G.mode,Q,null),V.return=G,V;Cc(G,V)}return null}function pe(G,V,Q,we){var Le=V!==null?V.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Le!==null?null:M(G,V,""+Q,we);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:return Q.key===Le?z(G,V,Q,we):null;case R:return Q.key===Le?Z(G,V,Q,we):null;case he:return Le=Q._init,pe(G,V,Le(Q._payload),we)}if(ar(Q)||ae(Q))return Le!==null?null:ge(G,V,Q,we,null);Cc(G,Q)}return null}function ke(G,V,Q,we,Le){if(typeof we=="string"&&we!==""||typeof we=="number")return G=G.get(Q)||null,M(V,G,""+we,Le);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case Y:return G=G.get(we.key===null?Q:we.key)||null,z(V,G,we,Le);case R:return G=G.get(we.key===null?Q:we.key)||null,Z(V,G,we,Le);case he:var Ue=we._init;return ke(G,V,Q,Ue(we._payload),Le)}if(ar(we)||ae(we))return G=G.get(Q)||null,ge(V,G,we,Le,null);Cc(V,we)}return null}function Ie(G,V,Q,we){for(var Le=null,Ue=null,He=V,qe=V=0,qt=null;He!==null&&qe<Q.length;qe++){He.index>qe?(qt=He,He=null):qt=He.sibling;var it=pe(G,He,Q[qe],we);if(it===null){He===null&&(He=qt);break}i&&He&&it.alternate===null&&o(G,He),V=b(it,V,qe),Ue===null?Le=it:Ue.sibling=it,Ue=it,He=qt}if(qe===Q.length)return c(G,He),xt&&ps(G,qe),Le;if(He===null){for(;qe<Q.length;qe++)He=Te(G,Q[qe],we),He!==null&&(V=b(He,V,qe),Ue===null?Le=He:Ue.sibling=He,Ue=He);return xt&&ps(G,qe),Le}for(He=h(G,He);qe<Q.length;qe++)qt=ke(He,G,qe,Q[qe],we),qt!==null&&(i&&qt.alternate!==null&&He.delete(qt.key===null?qe:qt.key),V=b(qt,V,qe),Ue===null?Le=qt:Ue.sibling=qt,Ue=qt);return i&&He.forEach(function(Li){return o(G,Li)}),xt&&ps(G,qe),Le}function Re(G,V,Q,we){var Le=ae(Q);if(typeof Le!="function")throw Error(n(150));if(Q=Le.call(Q),Q==null)throw Error(n(151));for(var Ue=Le=null,He=V,qe=V=0,qt=null,it=Q.next();He!==null&&!it.done;qe++,it=Q.next()){He.index>qe?(qt=He,He=null):qt=He.sibling;var Li=pe(G,He,it.value,we);if(Li===null){He===null&&(He=qt);break}i&&He&&Li.alternate===null&&o(G,He),V=b(Li,V,qe),Ue===null?Le=Li:Ue.sibling=Li,Ue=Li,He=qt}if(it.done)return c(G,He),xt&&ps(G,qe),Le;if(He===null){for(;!it.done;qe++,it=Q.next())it=Te(G,it.value,we),it!==null&&(V=b(it,V,qe),Ue===null?Le=it:Ue.sibling=it,Ue=it);return xt&&ps(G,qe),Le}for(He=h(G,He);!it.done;qe++,it=Q.next())it=ke(He,G,qe,it.value,we),it!==null&&(i&&it.alternate!==null&&He.delete(it.key===null?qe:it.key),V=b(it,V,qe),Ue===null?Le=it:Ue.sibling=it,Ue=it);return i&&He.forEach(function(t7){return o(G,t7)}),xt&&ps(G,qe),Le}function Ot(G,V,Q,we){if(typeof Q=="object"&&Q!==null&&Q.type===W&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:e:{for(var Le=Q.key,Ue=V;Ue!==null;){if(Ue.key===Le){if(Le=Q.type,Le===W){if(Ue.tag===7){c(G,Ue.sibling),V=E(Ue,Q.props.children),V.return=G,G=V;break e}}else if(Ue.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===he&&Rx(Le)===Ue.type){c(G,Ue.sibling),V=E(Ue,Q.props),V.ref=eu(G,Ue,Q),V.return=G,G=V;break e}c(G,Ue);break}else o(G,Ue);Ue=Ue.sibling}Q.type===W?(V=xs(Q.props.children,G.mode,we,Q.key),V.return=G,G=V):(we=Zc(Q.type,Q.key,Q.props,null,G.mode,we),we.ref=eu(G,V,Q),we.return=G,G=we)}return w(G);case R:e:{for(Ue=Q.key;V!==null;){if(V.key===Ue)if(V.tag===4&&V.stateNode.containerInfo===Q.containerInfo&&V.stateNode.implementation===Q.implementation){c(G,V.sibling),V=E(V,Q.children||[]),V.return=G,G=V;break e}else{c(G,V);break}else o(G,V);V=V.sibling}V=Wm(Q,G.mode,we),V.return=G,G=V}return w(G);case he:return Ue=Q._init,Ot(G,V,Ue(Q._payload),we)}if(ar(Q))return Ie(G,V,Q,we);if(ae(Q))return Re(G,V,Q,we);Cc(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,V!==null&&V.tag===6?(c(G,V.sibling),V=E(V,Q),V.return=G,G=V):(c(G,V),V=Ym(Q,G.mode,we),V.return=G,G=V),w(G)):c(G,V)}return Ot}var ko=Lx(!0),Dx=Lx(!1),Oc=wi(null),Ic=null,Co=null,nm=null;function rm(){nm=Co=Ic=null}function im(i){var o=Oc.current;Tt(Oc),i._currentValue=o}function sm(i,o,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===c)break;i=i.return}}function Oo(i,o){Ic=i,nm=Co=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(An=!0),i.firstContext=null)}function Wn(i){var o=i._currentValue;if(nm!==i)if(i={context:i,memoizedValue:o,next:null},Co===null){if(Ic===null)throw Error(n(308));Co=i,Ic.dependencies={lanes:0,firstContext:i}}else Co=Co.next=i;return o}var ms=null;function om(i){ms===null?ms=[i]:ms.push(i)}function Mx(i,o,c,h){var E=o.interleaved;return E===null?(c.next=c,om(o)):(c.next=E.next,E.next=c),o.interleaved=c,Kr(i,h)}function Kr(i,o){i.lanes|=o;var c=i.alternate;for(c!==null&&(c.lanes|=o),c=i,i=i.return;i!==null;)i.childLanes|=o,c=i.alternate,c!==null&&(c.childLanes|=o),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Ai=!1;function am(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fx(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Jr(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Ni(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(rt&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,Kr(i,c)}return E=h.interleaved,E===null?(o.next=o,om(h)):(o.next=E.next,E.next=o),h.interleaved=o,Kr(i,c)}function Pc(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,_p(i,c)}}function Bx(i,o){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var w={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=w:b=b.next=w,c=c.next}while(c!==null);b===null?E=b=o:b=b.next=o}else E=b=o;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:h.shared,effects:h.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}function Rc(i,o,c,h){var E=i.updateQueue;Ai=!1;var b=E.firstBaseUpdate,w=E.lastBaseUpdate,M=E.shared.pending;if(M!==null){E.shared.pending=null;var z=M,Z=z.next;z.next=null,w===null?b=Z:w.next=Z,w=z;var ge=i.alternate;ge!==null&&(ge=ge.updateQueue,M=ge.lastBaseUpdate,M!==w&&(M===null?ge.firstBaseUpdate=Z:M.next=Z,ge.lastBaseUpdate=z))}if(b!==null){var Te=E.baseState;w=0,ge=Z=z=null,M=b;do{var pe=M.lane,ke=M.eventTime;if((h&pe)===pe){ge!==null&&(ge=ge.next={eventTime:ke,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var Ie=i,Re=M;switch(pe=o,ke=c,Re.tag){case 1:if(Ie=Re.payload,typeof Ie=="function"){Te=Ie.call(ke,Te,pe);break e}Te=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=Re.payload,pe=typeof Ie=="function"?Ie.call(ke,Te,pe):Ie,pe==null)break e;Te=N({},Te,pe);break e;case 2:Ai=!0}}M.callback!==null&&M.lane!==0&&(i.flags|=64,pe=E.effects,pe===null?E.effects=[M]:pe.push(M))}else ke={eventTime:ke,lane:pe,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ge===null?(Z=ge=ke,z=Te):ge=ge.next=ke,w|=pe;if(M=M.next,M===null){if(M=E.shared.pending,M===null)break;pe=M,M=pe.next,pe.next=null,E.lastBaseUpdate=pe,E.shared.pending=null}}while(!0);if(ge===null&&(z=Te),E.baseState=z,E.firstBaseUpdate=Z,E.lastBaseUpdate=ge,o=E.shared.interleaved,o!==null){E=o;do w|=E.lane,E=E.next;while(E!==o)}else b===null&&(E.shared.lanes=0);ys|=w,i.lanes=w,i.memoizedState=Te}}function Ux(i,o,c){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=c,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var tu={},Lr=wi(tu),nu=wi(tu),ru=wi(tu);function gs(i){if(i===tu)throw Error(n(174));return i}function um(i,o){switch(ht(ru,o),ht(nu,i),ht(Lr,tu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:Ae(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=Ae(o,i)}Tt(Lr),ht(Lr,o)}function Io(){Tt(Lr),Tt(nu),Tt(ru)}function Hx(i){gs(ru.current);var o=gs(Lr.current),c=Ae(o,i.type);o!==c&&(ht(nu,i),ht(Lr,c))}function lm(i){nu.current===i&&(Tt(Lr),Tt(nu))}var wt=wi(0);function Lc(i){for(var o=i;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var cm=[];function dm(){for(var i=0;i<cm.length;i++)cm[i]._workInProgressVersionPrimary=null;cm.length=0}var Dc=j.ReactCurrentDispatcher,fm=j.ReactCurrentBatchConfig,Es=0,St=null,Ft=null,$t=null,Mc=!1,iu=!1,su=0,wB=0;function on(){throw Error(n(321))}function hm(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!cr(i[c],o[c]))return!1;return!0}function pm(i,o,c,h,E,b){if(Es=b,St=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Dc.current=i===null||i.memoizedState===null?NB:kB,i=c(h,E),iu){b=0;do{if(iu=!1,su=0,25<=b)throw Error(n(301));b+=1,$t=Ft=null,o.updateQueue=null,Dc.current=CB,i=c(h,E)}while(iu)}if(Dc.current=Uc,o=Ft!==null&&Ft.next!==null,Es=0,$t=Ft=St=null,Mc=!1,o)throw Error(n(300));return i}function mm(){var i=su!==0;return su=0,i}function Dr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?St.memoizedState=$t=i:$t=$t.next=i,$t}function Gn(){if(Ft===null){var i=St.alternate;i=i!==null?i.memoizedState:null}else i=Ft.next;var o=$t===null?St.memoizedState:$t.next;if(o!==null)$t=o,Ft=i;else{if(i===null)throw Error(n(310));Ft=i,i={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},$t===null?St.memoizedState=$t=i:$t=$t.next=i}return $t}function ou(i,o){return typeof o=="function"?o(i):o}function gm(i){var o=Gn(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Ft,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var w=E.next;E.next=b.next,b.next=w}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var M=w=null,z=null,Z=b;do{var ge=Z.lane;if((Es&ge)===ge)z!==null&&(z=z.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),h=Z.hasEagerState?Z.eagerState:i(h,Z.action);else{var Te={lane:ge,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};z===null?(M=z=Te,w=h):z=z.next=Te,St.lanes|=ge,ys|=ge}Z=Z.next}while(Z!==null&&Z!==b);z===null?w=h:z.next=M,cr(h,o.memoizedState)||(An=!0),o.memoizedState=h,o.baseState=w,o.baseQueue=z,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,St.lanes|=b,ys|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function Em(i){var o=Gn(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,b=o.memoizedState;if(E!==null){c.pending=null;var w=E=E.next;do b=i(b,w.action),w=w.next;while(w!==E);cr(b,o.memoizedState)||(An=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),c.lastRenderedState=b}return[b,h]}function jx(){}function zx(i,o){var c=St,h=Gn(),E=o(),b=!cr(h.memoizedState,E);if(b&&(h.memoizedState=E,An=!0),h=h.queue,ym(qx.bind(null,c,h,i),[i]),h.getSnapshot!==o||b||$t!==null&&$t.memoizedState.tag&1){if(c.flags|=2048,au(9,Vx.bind(null,c,h,E,o),void 0,null),Vt===null)throw Error(n(349));(Es&30)!==0||$x(c,o,E)}return E}function $x(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=St.updateQueue,o===null?(o={lastEffect:null,stores:null},St.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function Vx(i,o,c,h){o.value=c,o.getSnapshot=h,Yx(o)&&Wx(i)}function qx(i,o,c){return c(function(){Yx(o)&&Wx(i)})}function Yx(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!cr(i,c)}catch(h){return!0}}function Wx(i){var o=Kr(i,1);o!==null&&mr(o,i,1,-1)}function Gx(i){var o=Dr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ou,lastRenderedState:i},o.queue=i,i=i.dispatch=AB.bind(null,St,i),[o.memoizedState,i]}function au(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=St.updateQueue,o===null?(o={lastEffect:null,stores:null},St.updateQueue=o,o.lastEffect=i.next=i):(c=o.lastEffect,c===null?o.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,o.lastEffect=i)),i}function Xx(){return Gn().memoizedState}function Fc(i,o,c,h){var E=Dr();St.flags|=i,E.memoizedState=au(1|o,c,void 0,h===void 0?null:h)}function Bc(i,o,c,h){var E=Gn();h=h===void 0?null:h;var b=void 0;if(Ft!==null){var w=Ft.memoizedState;if(b=w.destroy,h!==null&&hm(h,w.deps)){E.memoizedState=au(o,c,b,h);return}}St.flags|=i,E.memoizedState=au(1|o,c,b,h)}function Qx(i,o){return Fc(8390656,8,i,o)}function ym(i,o){return Bc(2048,8,i,o)}function Kx(i,o){return Bc(4,2,i,o)}function Jx(i,o){return Bc(4,4,i,o)}function Zx(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function ew(i,o,c){return c=c!=null?c.concat([i]):null,Bc(4,4,Zx.bind(null,o,i),c)}function Tm(){}function tw(i,o){var c=Gn();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&hm(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function nw(i,o){var c=Gn();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&hm(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function rw(i,o,c){return(Es&21)===0?(i.baseState&&(i.baseState=!1,An=!0),i.memoizedState=c):(cr(c,o)||(c=R_(),St.lanes|=c,ys|=c,i.baseState=!0),o)}function SB(i,o){var c=ut;ut=c!==0&&4>c?c:4,i(!0);var h=fm.transition;fm.transition={};try{i(!1),o()}finally{ut=c,fm.transition=h}}function iw(){return Gn().memoizedState}function vB(i,o,c){var h=Ii(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},sw(i))ow(o,c);else if(c=Mx(i,o,c,h),c!==null){var E=hn();mr(c,i,h,E),aw(c,o,h)}}function AB(i,o,c){var h=Ii(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(sw(i))ow(o,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var w=o.lastRenderedState,M=b(w,c);if(E.hasEagerState=!0,E.eagerState=M,cr(M,w)){var z=o.interleaved;z===null?(E.next=E,om(o)):(E.next=z.next,z.next=E),o.interleaved=E;return}}catch(Z){}c=Mx(i,o,E,h),c!==null&&(E=hn(),mr(c,i,h,E),aw(c,o,h))}}function sw(i){var o=i.alternate;return i===St||o!==null&&o===St}function ow(i,o){iu=Mc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function aw(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,_p(i,c)}}var Uc={readContext:Wn,useCallback:on,useContext:on,useEffect:on,useImperativeHandle:on,useInsertionEffect:on,useLayoutEffect:on,useMemo:on,useReducer:on,useRef:on,useState:on,useDebugValue:on,useDeferredValue:on,useTransition:on,useMutableSource:on,useSyncExternalStore:on,useId:on,unstable_isNewReconciler:!1},NB={readContext:Wn,useCallback:function(i,o){return Dr().memoizedState=[i,o===void 0?null:o],i},useContext:Wn,useEffect:Qx,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,Fc(4194308,4,Zx.bind(null,o,i),c)},useLayoutEffect:function(i,o){return Fc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Fc(4,2,i,o)},useMemo:function(i,o){var c=Dr();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=Dr();return o=c!==void 0?c(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=vB.bind(null,St,i),[h.memoizedState,i]},useRef:function(i){var o=Dr();return i={current:i},o.memoizedState=i},useState:Gx,useDebugValue:Tm,useDeferredValue:function(i){return Dr().memoizedState=i},useTransition:function(){var i=Gx(!1),o=i[0];return i=SB.bind(null,i[1]),Dr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=St,E=Dr();if(xt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),Vt===null)throw Error(n(349));(Es&30)!==0||$x(h,o,c)}E.memoizedState=c;var b={value:c,getSnapshot:o};return E.queue=b,Qx(qx.bind(null,h,b,i),[i]),h.flags|=2048,au(9,Vx.bind(null,h,b,c,o),void 0,null),c},useId:function(){var i=Dr(),o=Vt.identifierPrefix;if(xt){var c=Qr,h=Xr;c=(h&~(1<<32-lr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=su++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=wB++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},kB={readContext:Wn,useCallback:tw,useContext:Wn,useEffect:ym,useImperativeHandle:ew,useInsertionEffect:Kx,useLayoutEffect:Jx,useMemo:nw,useReducer:gm,useRef:Xx,useState:function(){return gm(ou)},useDebugValue:Tm,useDeferredValue:function(i){var o=Gn();return rw(o,Ft.memoizedState,i)},useTransition:function(){var i=gm(ou)[0],o=Gn().memoizedState;return[i,o]},useMutableSource:jx,useSyncExternalStore:zx,useId:iw,unstable_isNewReconciler:!1},CB={readContext:Wn,useCallback:tw,useContext:Wn,useEffect:ym,useImperativeHandle:ew,useInsertionEffect:Kx,useLayoutEffect:Jx,useMemo:nw,useReducer:Em,useRef:Xx,useState:function(){return Em(ou)},useDebugValue:Tm,useDeferredValue:function(i){var o=Gn();return Ft===null?o.memoizedState=i:rw(o,Ft.memoizedState,i)},useTransition:function(){var i=Em(ou)[0],o=Gn().memoizedState;return[i,o]},useMutableSource:jx,useSyncExternalStore:zx,useId:iw,unstable_isNewReconciler:!1};function fr(i,o){if(i&&i.defaultProps){o=N({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function bm(i,o,c,h){o=i.memoizedState,c=c(h,o),c=c==null?o:N({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Hc={isMounted:function(i){return(i=i._reactInternals)?cs(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=hn(),E=Ii(i),b=Jr(h,E);b.payload=o,c!=null&&(b.callback=c),o=Ni(i,b,E),o!==null&&(mr(o,i,E,h),Pc(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=hn(),E=Ii(i),b=Jr(h,E);b.tag=1,b.payload=o,c!=null&&(b.callback=c),o=Ni(i,b,E),o!==null&&(mr(o,i,E,h),Pc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=hn(),h=Ii(i),E=Jr(c,h);E.tag=2,o!=null&&(E.callback=o),o=Ni(i,E,h),o!==null&&(mr(o,i,h,c),Pc(o,i,h))}};function uw(i,o,c,h,E,b,w){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,w):o.prototype&&o.prototype.isPureReactComponent?!Wa(c,h)||!Wa(E,b):!0}function lw(i,o,c){var h=!1,E=Si,b=o.contextType;return typeof b=="object"&&b!==null?b=Wn(b):(E=vn(o)?fs:sn.current,h=o.contextTypes,b=(h=h!=null)?So(i,E):Si),o=new o(c,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Hc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function cw(i,o,c,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,h),o.state!==i&&Hc.enqueueReplaceState(o,o.state,null)}function _m(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},am(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=Wn(b):(b=vn(o)?fs:sn.current,E.context=So(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(bm(i,o,b,c),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&Hc.enqueueReplaceState(E,E.state,null),Rc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Po(i,o){try{var c="",h=o;do c+=Me(h),h=h.return;while(h);var E=c}catch(b){E=`
22
- Error generating stack: `+b.message+`
23
- `+b.stack}return{value:i,source:o,stack:E,digest:null}}function xm(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function wm(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var OB=typeof WeakMap=="function"?WeakMap:Map;function dw(i,o,c){c=Jr(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){Wc||(Wc=!0,Bm=h),wm(i,o)},c}function fw(i,o,c){c=Jr(-1,c),c.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;c.payload=function(){return h(E)},c.callback=function(){wm(i,o)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){wm(i,o),typeof h!="function"&&(Ci===null?Ci=new Set([this]):Ci.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})}),c}function hw(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new OB;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(c)||(E.add(c),i=VB.bind(null,i,o,c),o.then(i,i))}function pw(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function mw(i,o,c,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(o=Jr(-1,1),o.tag=2,Ni(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var IB=j.ReactCurrentOwner,An=!1;function fn(i,o,c,h){o.child=i===null?Dx(o,null,c,h):ko(o,i.child,c,h)}function gw(i,o,c,h,E){c=c.render;var b=o.ref;return Oo(o,E),h=pm(i,o,c,h,b,E),c=mm(),i!==null&&!An?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Zr(i,o,E)):(xt&&c&&Kp(o),o.flags|=1,fn(i,o,h,E),o.child)}function Ew(i,o,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!qm(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=b,yw(i,o,b,h,E)):(i=Zc(c.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(b=i.child,(i.lanes&E)===0){var w=b.memoizedProps;if(c=c.compare,c=c!==null?c:Wa,c(w,h)&&i.ref===o.ref)return Zr(i,o,E)}return o.flags|=1,i=Ri(b,h),i.ref=o.ref,i.return=o,o.child=i}function yw(i,o,c,h,E){if(i!==null){var b=i.memoizedProps;if(Wa(b,h)&&i.ref===o.ref)if(An=!1,o.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(An=!0);else return o.lanes=i.lanes,Zr(i,o,E)}return Sm(i,o,c,h,E)}function Tw(i,o,c){var h=o.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},ht(Lo,Un),Un|=c;else{if((c&1073741824)===0)return i=b!==null?b.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,ht(Lo,Un),Un|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,ht(Lo,Un),Un|=h}else b!==null?(h=b.baseLanes|c,o.memoizedState=null):h=c,ht(Lo,Un),Un|=h;return fn(i,o,E,c),o.child}function bw(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function Sm(i,o,c,h,E){var b=vn(c)?fs:sn.current;return b=So(o,b),Oo(o,E),c=pm(i,o,c,h,b,E),h=mm(),i!==null&&!An?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Zr(i,o,E)):(xt&&h&&Kp(o),o.flags|=1,fn(i,o,c,E),o.child)}function _w(i,o,c,h,E){if(vn(c)){var b=!0;Sc(o)}else b=!1;if(Oo(o,E),o.stateNode===null)zc(i,o),lw(o,c,h),_m(o,c,h,E),h=!0;else if(i===null){var w=o.stateNode,M=o.memoizedProps;w.props=M;var z=w.context,Z=c.contextType;typeof Z=="object"&&Z!==null?Z=Wn(Z):(Z=vn(c)?fs:sn.current,Z=So(o,Z));var ge=c.getDerivedStateFromProps,Te=typeof ge=="function"||typeof w.getSnapshotBeforeUpdate=="function";Te||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==h||z!==Z)&&cw(o,w,h,Z),Ai=!1;var pe=o.memoizedState;w.state=pe,Rc(o,h,w,E),z=o.memoizedState,M!==h||pe!==z||Sn.current||Ai?(typeof ge=="function"&&(bm(o,c,ge,h),z=o.memoizedState),(M=Ai||uw(o,c,M,h,pe,z,Z))?(Te||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"&&(o.flags|=4194308)):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=z),w.props=h,w.state=z,w.context=Z,h=M):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{w=o.stateNode,Fx(i,o),M=o.memoizedProps,Z=o.type===o.elementType?M:fr(o.type,M),w.props=Z,Te=o.pendingProps,pe=w.context,z=c.contextType,typeof z=="object"&&z!==null?z=Wn(z):(z=vn(c)?fs:sn.current,z=So(o,z));var ke=c.getDerivedStateFromProps;(ge=typeof ke=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==Te||pe!==z)&&cw(o,w,h,z),Ai=!1,pe=o.memoizedState,w.state=pe,Rc(o,h,w,E);var Ie=o.memoizedState;M!==Te||pe!==Ie||Sn.current||Ai?(typeof ke=="function"&&(bm(o,c,ke,h),Ie=o.memoizedState),(Z=Ai||uw(o,c,Z,h,pe,Ie,z)||!1)?(ge||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(h,Ie,z),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(h,Ie,z)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Ie),w.props=h,w.state=Ie,w.context=z,h=Z):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),h=!1)}return vm(i,o,c,h,b,E)}function vm(i,o,c,h,E,b){bw(i,o);var w=(o.flags&128)!==0;if(!h&&!w)return E&&Ax(o,c,!1),Zr(i,o,b);h=o.stateNode,IB.current=o;var M=w&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&w?(o.child=ko(o,i.child,null,b),o.child=ko(o,null,M,b)):fn(i,o,M,b),o.memoizedState=h.state,E&&Ax(o,c,!0),o.child}function xw(i){var o=i.stateNode;o.pendingContext?Sx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&Sx(i,o.context,!1),um(i,o.containerInfo)}function ww(i,o,c,h,E){return No(),tm(E),o.flags|=256,fn(i,o,c,h),o.child}var Am={dehydrated:null,treeContext:null,retryLane:0};function Nm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Sw(i,o,c){var h=o.pendingProps,E=wt.current,b=!1,w=(o.flags&128)!==0,M;if((M=w)||(M=i!==null&&i.memoizedState===null?!1:(E&2)!==0),M?(b=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),ht(wt,E&1),i===null)return em(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(w=h.children,i=h.fallback,b?(h=o.mode,b=o.child,w={mode:"hidden",children:w},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=w):b=ed(w,h,0,null),i=xs(i,h,c,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=Nm(c),o.memoizedState=Am,i):km(o,w));if(E=i.memoizedState,E!==null&&(M=E.dehydrated,M!==null))return PB(i,o,w,h,M,E,c);if(b){b=h.fallback,w=o.mode,E=i.child,M=E.sibling;var z={mode:"hidden",children:h.children};return(w&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=z,o.deletions=null):(h=Ri(E,z),h.subtreeFlags=E.subtreeFlags&14680064),M!==null?b=Ri(M,b):(b=xs(b,w,c,null),b.flags|=2),b.return=o,h.return=o,h.sibling=b,o.child=h,h=b,b=o.child,w=i.child.memoizedState,w=w===null?Nm(c):{baseLanes:w.baseLanes|c,cachePool:null,transitions:w.transitions},b.memoizedState=w,b.childLanes=i.childLanes&~c,o.memoizedState=Am,h}return b=i.child,i=b.sibling,h=Ri(b,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=c),h.return=o,h.sibling=null,i!==null&&(c=o.deletions,c===null?(o.deletions=[i],o.flags|=16):c.push(i)),o.child=h,o.memoizedState=null,h}function km(i,o){return o=ed({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function jc(i,o,c,h){return h!==null&&tm(h),ko(o,i.child,null,c),i=km(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function PB(i,o,c,h,E,b,w){if(c)return o.flags&256?(o.flags&=-257,h=xm(Error(n(422))),jc(i,o,w,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(b=h.fallback,E=o.mode,h=ed({mode:"visible",children:h.children},E,0,null),b=xs(b,E,w,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&ko(o,i.child,null,w),o.child.memoizedState=Nm(w),o.memoizedState=Am,b);if((o.mode&1)===0)return jc(i,o,w,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var M=h.dgst;return h=M,b=Error(n(419)),h=xm(b,h,void 0),jc(i,o,w,h)}if(M=(w&i.childLanes)!==0,An||M){if(h=Vt,h!==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&(h.suspendedLanes|w))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,Kr(i,E),mr(h,i,E,-1))}return Vm(),h=xm(Error(n(421))),jc(i,o,w,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=qB.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Bn=xi(E.nextSibling),Fn=o,xt=!0,dr=null,i!==null&&(qn[Yn++]=Xr,qn[Yn++]=Qr,qn[Yn++]=hs,Xr=i.id,Qr=i.overflow,hs=o),o=km(o,h.children),o.flags|=4096,o)}function vw(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),sm(i.return,o,c)}function Cm(i,o,c,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(b.isBackwards=o,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=c,b.tailMode=E)}function Aw(i,o,c){var h=o.pendingProps,E=h.revealOrder,b=h.tail;if(fn(i,o,h.children,c),h=wt.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&vw(i,c,o);else if(i.tag===19)vw(i,c,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(ht(wt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(c=o.child,E=null;c!==null;)i=c.alternate,i!==null&&Lc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),Cm(o,!1,E,c,b);break;case"backwards":for(c=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Lc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Cm(o,!0,c,null,b);break;case"together":Cm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function zc(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function Zr(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),ys|=o.lanes,(c&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,c=Ri(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=Ri(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function RB(i,o,c){switch(o.tag){case 3:xw(o),No();break;case 5:Hx(o);break;case 1:vn(o.type)&&Sc(o);break;case 4:um(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;ht(Oc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(ht(wt,wt.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?Sw(i,o,c):(ht(wt,wt.current&1),i=Zr(i,o,c),i!==null?i.sibling:null);ht(wt,wt.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return Aw(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ht(wt,wt.current),h)break;return null;case 22:case 23:return o.lanes=0,Tw(i,o,c)}return Zr(i,o,c)}var Nw,Om,kw,Cw;Nw=function(i,o){for(var c=o.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Om=function(){},kw=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,gs(Lr.current);var b=null;switch(c){case"input":E=We(i,E),h=We(i,h),b=[];break;case"select":E=N({},E,{value:void 0}),h=N({},h,{value:void 0}),b=[];break;case"textarea":E=ur(i,E),h=ur(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=_c)}Xt(c,h);var w;c=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var M=E[Z];for(w in M)M.hasOwnProperty(w)&&(c||(c={}),c[w]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(s.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in h){var z=h[Z];if(M=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&z!==M&&(z!=null||M!=null))if(Z==="style")if(M){for(w in M)!M.hasOwnProperty(w)||z&&z.hasOwnProperty(w)||(c||(c={}),c[w]="");for(w in z)z.hasOwnProperty(w)&&M[w]!==z[w]&&(c||(c={}),c[w]=z[w])}else c||(b||(b=[]),b.push(Z,c)),c=z;else Z==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,M=M?M.__html:void 0,z!=null&&M!==z&&(b=b||[]).push(Z,z)):Z==="children"?typeof z!="string"&&typeof z!="number"||(b=b||[]).push(Z,""+z):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?(z!=null&&Z==="onScroll"&&yt("scroll",i),b||M===z||(b=[])):(b=b||[]).push(Z,z))}c&&(b=b||[]).push("style",c);var Z=b;(o.updateQueue=Z)&&(o.flags|=4)}},Cw=function(i,o,c,h){c!==h&&(o.flags|=4)};function uu(i,o){if(!xt)switch(i.tailMode){case"hidden":o=i.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function an(i){var o=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(o)for(var E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=c,o}function LB(i,o,c){var h=o.pendingProps;switch(Jp(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(o),null;case 1:return vn(o.type)&&wc(),an(o),null;case 3:return h=o.stateNode,Io(),Tt(Sn),Tt(sn),dm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(kc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,dr!==null&&(jm(dr),dr=null))),Om(i,o),an(o),null;case 5:lm(o);var E=gs(ru.current);if(c=o.type,i!==null&&o.stateNode!=null)kw(i,o,c,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return an(o),null}if(i=gs(Lr.current),kc(o)){h=o.stateNode,c=o.type;var b=o.memoizedProps;switch(h[Rr]=o,h[Ja]=b,i=(o.mode&1)!==0,c){case"dialog":yt("cancel",h),yt("close",h);break;case"iframe":case"object":case"embed":yt("load",h);break;case"video":case"audio":for(E=0;E<Xa.length;E++)yt(Xa[E],h);break;case"source":yt("error",h);break;case"img":case"image":case"link":yt("error",h),yt("load",h);break;case"details":yt("toggle",h);break;case"input":Ze(h,b),yt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},yt("invalid",h);break;case"textarea":Kl(h,b),yt("invalid",h)}Xt(c,b),E=null;for(var w in b)if(b.hasOwnProperty(w)){var M=b[w];w==="children"?typeof M=="string"?h.textContent!==M&&(b.suppressHydrationWarning!==!0&&bc(h.textContent,M,i),E=["children",M]):typeof M=="number"&&h.textContent!==""+M&&(b.suppressHydrationWarning!==!0&&bc(h.textContent,M,i),E=["children",""+M]):s.hasOwnProperty(w)&&M!=null&&w==="onScroll"&&yt("scroll",h)}switch(c){case"input":$e(h),Ln(h,b,!0);break;case"textarea":$e(h),Zl(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=_c)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{w=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=oe(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=w.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=w.createElement(c,{is:h.is}):(i=w.createElement(c),c==="select"&&(w=i,h.multiple?w.multiple=!0:h.size&&(w.size=h.size))):i=w.createElementNS(i,c),i[Rr]=o,i[Ja]=h,Nw(i,o,!1,!1),o.stateNode=i;e:{switch(w=Ir(c,h),c){case"dialog":yt("cancel",i),yt("close",i),E=h;break;case"iframe":case"object":case"embed":yt("load",i),E=h;break;case"video":case"audio":for(E=0;E<Xa.length;E++)yt(Xa[E],i);E=h;break;case"source":yt("error",i),E=h;break;case"img":case"image":case"link":yt("error",i),yt("load",i),E=h;break;case"details":yt("toggle",i),E=h;break;case"input":Ze(i,h),E=We(i,h),yt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=N({},h,{value:void 0}),yt("invalid",i);break;case"textarea":Kl(i,h),E=ur(i,h),yt("invalid",i);break;default:E=h}Xt(c,E),M=E;for(b in M)if(M.hasOwnProperty(b)){var z=M[b];b==="style"?mi(i,z):b==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&Qe(i,z)):b==="children"?typeof z=="string"?(c!=="textarea"||z!=="")&&nt(i,z):typeof z=="number"&&nt(i,""+z):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?z!=null&&b==="onScroll"&&yt("scroll",i):z!=null&&I(i,b,z,w))}switch(c){case"input":$e(i),Ln(i,h,!1);break;case"textarea":$e(i),Zl(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ee(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?Or(i,!!h.multiple,b,!1):h.defaultValue!=null&&Or(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=_c)}switch(c){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return an(o),null;case 6:if(i&&o.stateNode!=null)Cw(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=gs(ru.current),gs(Lr.current),kc(o)){if(h=o.stateNode,c=o.memoizedProps,h[Rr]=o,(b=h.nodeValue!==c)&&(i=Fn,i!==null))switch(i.tag){case 3:bc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&bc(h.nodeValue,c,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Rr]=o,o.stateNode=h}return an(o),null;case 13:if(Tt(wt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(xt&&Bn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)Px(),No(),o.flags|=98560,b=!1;else if(b=kc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Rr]=o}else No(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;an(o),b=!1}else dr!==null&&(jm(dr),dr=null),b=!0;if(!b)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=c,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(wt.current&1)!==0?Bt===0&&(Bt=3):Vm())),o.updateQueue!==null&&(o.flags|=4),an(o),null);case 4:return Io(),Om(i,o),i===null&&Qa(o.stateNode.containerInfo),an(o),null;case 10:return im(o.type._context),an(o),null;case 17:return vn(o.type)&&wc(),an(o),null;case 19:if(Tt(wt),b=o.memoizedState,b===null)return an(o),null;if(h=(o.flags&128)!==0,w=b.rendering,w===null)if(h)uu(b,!1);else{if(Bt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(w=Lc(i),w!==null){for(o.flags|=128,uu(b,!1),h=w.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)b=c,i=h,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}),c=c.sibling;return ht(wt,wt.current&1|2),o.child}i=i.sibling}b.tail!==null&&Ct()>Do&&(o.flags|=128,h=!0,uu(b,!1),o.lanes=4194304)}else{if(!h)if(i=Lc(w),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),uu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!w.alternate&&!xt)return an(o),null}else 2*Ct()-b.renderingStartTime>Do&&c!==1073741824&&(o.flags|=128,h=!0,uu(b,!1),o.lanes=4194304);b.isBackwards?(w.sibling=o.child,o.child=w):(c=b.last,c!==null?c.sibling=w:o.child=w,b.last=w)}return b.tail!==null?(o=b.tail,b.rendering=o,b.tail=o.sibling,b.renderingStartTime=Ct(),o.sibling=null,c=wt.current,ht(wt,h?c&1|2:c&1),o):(an(o),null);case 22:case 23:return $m(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Un&1073741824)!==0&&(an(o),o.subtreeFlags&6&&(o.flags|=8192)):an(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function DB(i,o){switch(Jp(o),o.tag){case 1:return vn(o.type)&&wc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Io(),Tt(Sn),Tt(sn),dm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return lm(o),null;case 13:if(Tt(wt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));No()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return Tt(wt),null;case 4:return Io(),null;case 10:return im(o.type._context),null;case 22:case 23:return $m(),null;case 24:return null;default:return null}}var $c=!1,un=!1,MB=typeof WeakSet=="function"?WeakSet:Set,Oe=null;function Ro(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){At(i,o,h)}else c.current=null}function Im(i,o,c){try{c()}catch(h){At(i,o,h)}}var Ow=!1;function FB(i,o){if($p=lc,i=ux(),Dp(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var E=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{c.nodeType,b.nodeType}catch(we){c=null;break e}var w=0,M=-1,z=-1,Z=0,ge=0,Te=i,pe=null;t:for(;;){for(var ke;Te!==c||E!==0&&Te.nodeType!==3||(M=w+E),Te!==b||h!==0&&Te.nodeType!==3||(z=w+h),Te.nodeType===3&&(w+=Te.nodeValue.length),(ke=Te.firstChild)!==null;)pe=Te,Te=ke;for(;;){if(Te===i)break t;if(pe===c&&++Z===E&&(M=w),pe===b&&++ge===h&&(z=w),(ke=Te.nextSibling)!==null)break;Te=pe,pe=Te.parentNode}Te=ke}c=M===-1||z===-1?null:{start:M,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for(Vp={focusedElem:i,selectionRange:c},lc=!1,Oe=o;Oe!==null;)if(o=Oe,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Oe=i;else for(;Oe!==null;){o=Oe;try{var Ie=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Ie!==null){var Re=Ie.memoizedProps,Ot=Ie.memoizedState,G=o.stateNode,V=G.getSnapshotBeforeUpdate(o.elementType===o.type?Re:fr(o.type,Re),Ot);G.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var Q=o.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(we){At(o,o.return,we)}if(i=o.sibling,i!==null){i.return=o.return,Oe=i;break}Oe=o.return}return Ie=Ow,Ow=!1,Ie}function lu(i,o,c){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var b=E.destroy;E.destroy=void 0,b!==void 0&&Im(o,c,b)}E=E.next}while(E!==h)}}function Vc(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&i)===i){var h=c.create;c.destroy=h()}c=c.next}while(c!==o)}}function Pm(i){var o=i.ref;if(o!==null){var c=i.stateNode;i.tag,i=c,typeof o=="function"?o(i):o.current=i}}function Iw(i){var o=i.alternate;o!==null&&(i.alternate=null,Iw(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Rr],delete o[Ja],delete o[Gp],delete o[TB],delete o[bB])),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 Pw(i){return i.tag===5||i.tag===3||i.tag===4}function Rw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Pw(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 Rm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.nodeType===8?c.parentNode.insertBefore(i,o):c.insertBefore(i,o):(c.nodeType===8?(o=c.parentNode,o.insertBefore(i,c)):(o=c,o.appendChild(i)),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=_c));else if(h!==4&&(i=i.child,i!==null))for(Rm(i,o,c),i=i.sibling;i!==null;)Rm(i,o,c),i=i.sibling}function Lm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Lm(i,o,c),i=i.sibling;i!==null;)Lm(i,o,c),i=i.sibling}var Qt=null,hr=!1;function ki(i,o,c){for(c=c.child;c!==null;)Lw(i,o,c),c=c.sibling}function Lw(i,o,c){if(Pr&&typeof Pr.onCommitFiberUnmount=="function")try{Pr.onCommitFiberUnmount(rc,c)}catch(M){}switch(c.tag){case 5:un||Ro(c,o);case 6:var h=Qt,E=hr;Qt=null,ki(i,o,c),Qt=h,hr=E,Qt!==null&&(hr?(i=Qt,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):Qt.removeChild(c.stateNode));break;case 18:Qt!==null&&(hr?(i=Qt,c=c.stateNode,i.nodeType===8?Wp(i.parentNode,c):i.nodeType===1&&Wp(i,c),ja(i)):Wp(Qt,c.stateNode));break;case 4:h=Qt,E=hr,Qt=c.stateNode.containerInfo,hr=!0,ki(i,o,c),Qt=h,hr=E;break;case 0:case 11:case 14:case 15:if(!un&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,w=b.destroy;b=b.tag,w!==void 0&&((b&2)!==0||(b&4)!==0)&&Im(c,o,w),E=E.next}while(E!==h)}ki(i,o,c);break;case 1:if(!un&&(Ro(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(M){At(c,o,M)}ki(i,o,c);break;case 21:ki(i,o,c);break;case 22:c.mode&1?(un=(h=un)||c.memoizedState!==null,ki(i,o,c),un=h):ki(i,o,c);break;default:ki(i,o,c)}}function Dw(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new MB),o.forEach(function(h){var E=YB.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function pr(i,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var b=i,w=o,M=w;e:for(;M!==null;){switch(M.tag){case 5:Qt=M.stateNode,hr=!1;break e;case 3:Qt=M.stateNode.containerInfo,hr=!0;break e;case 4:Qt=M.stateNode.containerInfo,hr=!0;break e}M=M.return}if(Qt===null)throw Error(n(160));Lw(b,w,E),Qt=null,hr=!1;var z=E.alternate;z!==null&&(z.return=null),E.return=null}catch(Z){At(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Mw(o,i),o=o.sibling}function Mw(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(pr(o,i),Mr(i),h&4){try{lu(3,i,i.return),Vc(3,i)}catch(Re){At(i,i.return,Re)}try{lu(5,i,i.return)}catch(Re){At(i,i.return,Re)}}break;case 1:pr(o,i),Mr(i),h&512&&c!==null&&Ro(c,c.return);break;case 5:if(pr(o,i),Mr(i),h&512&&c!==null&&Ro(c,c.return),i.flags&32){var E=i.stateNode;try{nt(E,"")}catch(Re){At(i,i.return,Re)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,w=c!==null?c.memoizedProps:b,M=i.type,z=i.updateQueue;if(i.updateQueue=null,z!==null)try{M==="input"&&b.type==="radio"&&b.name!=null&&Pe(E,b),Ir(M,w);var Z=Ir(M,b);for(w=0;w<z.length;w+=2){var ge=z[w],Te=z[w+1];ge==="style"?mi(E,Te):ge==="dangerouslySetInnerHTML"?Qe(E,Te):ge==="children"?nt(E,Te):I(E,ge,Te,Z)}switch(M){case"input":Et(E,b);break;case"textarea":Jl(E,b);break;case"select":var pe=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var ke=b.value;ke!=null?Or(E,!!b.multiple,ke,!1):pe!==!!b.multiple&&(b.defaultValue!=null?Or(E,!!b.multiple,b.defaultValue,!0):Or(E,!!b.multiple,b.multiple?[]:"",!1))}E[Ja]=b}catch(Re){At(i,i.return,Re)}}break;case 6:if(pr(o,i),Mr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Re){At(i,i.return,Re)}}break;case 3:if(pr(o,i),Mr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{ja(o.containerInfo)}catch(Re){At(i,i.return,Re)}break;case 4:pr(o,i),Mr(i);break;case 13:pr(o,i),Mr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(Fm=Ct())),h&4&&Dw(i);break;case 22:if(ge=c!==null&&c.memoizedState!==null,i.mode&1?(un=(Z=un)||ge,pr(o,i),un=Z):pr(o,i),Mr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!ge&&(i.mode&1)!==0)for(Oe=i,ge=i.child;ge!==null;){for(Te=Oe=ge;Oe!==null;){switch(pe=Oe,ke=pe.child,pe.tag){case 0:case 11:case 14:case 15:lu(4,pe,pe.return);break;case 1:Ro(pe,pe.return);var Ie=pe.stateNode;if(typeof Ie.componentWillUnmount=="function"){h=pe,c=pe.return;try{o=h,Ie.props=o.memoizedProps,Ie.state=o.memoizedState,Ie.componentWillUnmount()}catch(Re){At(h,c,Re)}}break;case 5:Ro(pe,pe.return);break;case 22:if(pe.memoizedState!==null){Uw(Te);continue}}ke!==null?(ke.return=pe,Oe=ke):Uw(Te)}ge=ge.sibling}e:for(ge=null,Te=i;;){if(Te.tag===5){if(ge===null){ge=Te;try{E=Te.stateNode,Z?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(M=Te.stateNode,z=Te.memoizedProps.style,w=z!=null&&z.hasOwnProperty("display")?z.display:null,M.style.display=Vn("display",w))}catch(Re){At(i,i.return,Re)}}}else if(Te.tag===6){if(ge===null)try{Te.stateNode.nodeValue=Z?"":Te.memoizedProps}catch(Re){At(i,i.return,Re)}}else if((Te.tag!==22&&Te.tag!==23||Te.memoizedState===null||Te===i)&&Te.child!==null){Te.child.return=Te,Te=Te.child;continue}if(Te===i)break e;for(;Te.sibling===null;){if(Te.return===null||Te.return===i)break e;ge===Te&&(ge=null),Te=Te.return}ge===Te&&(ge=null),Te.sibling.return=Te.return,Te=Te.sibling}}break;case 19:pr(o,i),Mr(i),h&4&&Dw(i);break;case 21:break;default:pr(o,i),Mr(i)}}function Mr(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(Pw(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(nt(E,""),h.flags&=-33);var b=Rw(i);Lm(i,b,E);break;case 3:case 4:var w=h.stateNode.containerInfo,M=Rw(i);Rm(i,M,w);break;default:throw Error(n(161))}}catch(z){At(i,i.return,z)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function BB(i,o,c){Oe=i,Fw(i)}function Fw(i,o,c){for(var h=(i.mode&1)!==0;Oe!==null;){var E=Oe,b=E.child;if(E.tag===22&&h){var w=E.memoizedState!==null||$c;if(!w){var M=E.alternate,z=M!==null&&M.memoizedState!==null||un;M=$c;var Z=un;if($c=w,(un=z)&&!Z)for(Oe=E;Oe!==null;)w=Oe,z=w.child,w.tag===22&&w.memoizedState!==null?Hw(E):z!==null?(z.return=w,Oe=z):Hw(E);for(;b!==null;)Oe=b,Fw(b),b=b.sibling;Oe=E,$c=M,un=Z}Bw(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Oe=b):Bw(i)}}function Bw(i){for(;Oe!==null;){var o=Oe;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:un||Vc(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!un)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:fr(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&Ux(o,b,h);break;case 3:var w=o.updateQueue;if(w!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}Ux(o,w,c)}break;case 5:var M=o.stateNode;if(c===null&&o.flags&4){c=M;var z=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&c.focus();break;case"img":z.src&&(c.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Z=o.alternate;if(Z!==null){var ge=Z.memoizedState;if(ge!==null){var Te=ge.dehydrated;Te!==null&&ja(Te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}un||o.flags&512&&Pm(o)}catch(pe){At(o,o.return,pe)}}if(o===i){Oe=null;break}if(c=o.sibling,c!==null){c.return=o.return,Oe=c;break}Oe=o.return}}function Uw(i){for(;Oe!==null;){var o=Oe;if(o===i){Oe=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Oe=c;break}Oe=o.return}}function Hw(i){for(;Oe!==null;){var o=Oe;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{Vc(4,o)}catch(z){At(o,c,z)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(z){At(o,E,z)}}var b=o.return;try{Pm(o)}catch(z){At(o,b,z)}break;case 5:var w=o.return;try{Pm(o)}catch(z){At(o,w,z)}}}catch(z){At(o,o.return,z)}if(o===i){Oe=null;break}var M=o.sibling;if(M!==null){M.return=o.return,Oe=M;break}Oe=o.return}}var UB=Math.ceil,qc=j.ReactCurrentDispatcher,Dm=j.ReactCurrentOwner,Xn=j.ReactCurrentBatchConfig,rt=0,Vt=null,Lt=null,Kt=0,Un=0,Lo=wi(0),Bt=0,cu=null,ys=0,Yc=0,Mm=0,du=null,Nn=null,Fm=0,Do=1/0,ei=null,Wc=!1,Bm=null,Ci=null,Gc=!1,Oi=null,Xc=0,fu=0,Um=null,Qc=-1,Kc=0;function hn(){return(rt&6)!==0?Ct():Qc!==-1?Qc:Qc=Ct()}function Ii(i){return(i.mode&1)===0?1:(rt&2)!==0&&Kt!==0?Kt&-Kt:xB.transition!==null?(Kc===0&&(Kc=R_()),Kc):(i=ut,i!==0||(i=window.event,i=i===void 0?16:z_(i.type)),i)}function mr(i,o,c,h){if(50<fu)throw fu=0,Um=null,Error(n(185));Ma(i,c,h),((rt&2)===0||i!==Vt)&&(i===Vt&&((rt&2)===0&&(Yc|=c),Bt===4&&Pi(i,Kt)),kn(i,h),c===1&&rt===0&&(o.mode&1)===0&&(Do=Ct()+500,vc&&vi()))}function kn(i,o){var c=i.callbackNode;xF(i,o);var h=oc(i,i===Vt?Kt:0);if(h===0)c!==null&&O_(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&O_(c),o===1)i.tag===0?_B(zw.bind(null,i)):Nx(zw.bind(null,i)),EB(function(){(rt&6)===0&&vi()}),c=null;else{switch(L_(h)){case 1:c=yp;break;case 4:c=I_;break;case 16:c=nc;break;case 536870912:c=P_;break;default:c=nc}c=Qw(c,jw.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function jw(i,o){if(Qc=-1,Kc=0,(rt&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Mo()&&i.callbackNode!==c)return null;var h=oc(i,i===Vt?Kt:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=Jc(i,h);else{o=h;var E=rt;rt|=2;var b=Vw();(Vt!==i||Kt!==o)&&(ei=null,Do=Ct()+500,bs(i,o));do try{zB();break}catch(M){$w(i,M)}while(!0);rm(),qc.current=b,rt=E,Lt!==null?o=0:(Vt=null,Kt=0,o=Bt)}if(o!==0){if(o===2&&(E=Tp(i),E!==0&&(h=E,o=Hm(i,E))),o===1)throw c=cu,bs(i,0),Pi(i,h),kn(i,Ct()),c;if(o===6)Pi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!HB(E)&&(o=Jc(i,h),o===2&&(b=Tp(i),b!==0&&(h=b,o=Hm(i,b))),o===1))throw c=cu,bs(i,0),Pi(i,h),kn(i,Ct()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:_s(i,Nn,ei);break;case 3:if(Pi(i,h),(h&130023424)===h&&(o=Fm+500-Ct(),10<o)){if(oc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){hn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Yp(_s.bind(null,i,Nn,ei),o);break}_s(i,Nn,ei);break;case 4:if(Pi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var w=31-lr(h);b=1<<w,w=o[w],w>E&&(E=w),h&=~b}if(h=E,h=Ct()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*UB(h/1960))-h,10<h){i.timeoutHandle=Yp(_s.bind(null,i,Nn,ei),h);break}_s(i,Nn,ei);break;case 5:_s(i,Nn,ei);break;default:throw Error(n(329))}}}return kn(i,Ct()),i.callbackNode===c?jw.bind(null,i):null}function Hm(i,o){var c=du;return i.current.memoizedState.isDehydrated&&(bs(i,o).flags|=256),i=Jc(i,o),i!==2&&(o=Nn,Nn=c,o!==null&&jm(o)),i}function jm(i){Nn===null?Nn=i:Nn.push.apply(Nn,i)}function HB(i){for(var o=i;;){if(o.flags&16384){var c=o.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var E=c[h],b=E.getSnapshot;E=E.value;try{if(!cr(b(),E))return!1}catch(w){return!1}}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Pi(i,o){for(o&=~Mm,o&=~Yc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-lr(o),h=1<<c;i[c]=-1,o&=~h}}function zw(i){if((rt&6)!==0)throw Error(n(327));Mo();var o=oc(i,0);if((o&1)===0)return kn(i,Ct()),null;var c=Jc(i,o);if(i.tag!==0&&c===2){var h=Tp(i);h!==0&&(o=h,c=Hm(i,h))}if(c===1)throw c=cu,bs(i,0),Pi(i,o),kn(i,Ct()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,_s(i,Nn,ei),kn(i,Ct()),null}function zm(i,o){var c=rt;rt|=1;try{return i(o)}finally{rt=c,rt===0&&(Do=Ct()+500,vc&&vi())}}function Ts(i){Oi!==null&&Oi.tag===0&&(rt&6)===0&&Mo();var o=rt;rt|=1;var c=Xn.transition,h=ut;try{if(Xn.transition=null,ut=1,i)return i()}finally{ut=h,Xn.transition=c,rt=o,(rt&6)===0&&vi()}}function $m(){Un=Lo.current,Tt(Lo)}function bs(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,gB(c)),Lt!==null)for(c=Lt.return;c!==null;){var h=c;switch(Jp(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&wc();break;case 3:Io(),Tt(Sn),Tt(sn),dm();break;case 5:lm(h);break;case 4:Io();break;case 13:Tt(wt);break;case 19:Tt(wt);break;case 10:im(h.type._context);break;case 22:case 23:$m()}c=c.return}if(Vt=i,Lt=i=Ri(i.current,null),Kt=Un=o,Bt=0,cu=null,Mm=Yc=ys=0,Nn=du=null,ms!==null){for(o=0;o<ms.length;o++)if(c=ms[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var w=b.next;b.next=E,h.next=w}c.pending=h}ms=null}return i}function $w(i,o){do{var c=Lt;try{if(rm(),Dc.current=Uc,Mc){for(var h=St.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Mc=!1}if(Es=0,$t=Ft=St=null,iu=!1,su=0,Dm.current=null,c===null||c.return===null){Bt=1,cu=o,Lt=null;break}e:{var b=i,w=c.return,M=c,z=o;if(o=Kt,M.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var Z=z,ge=M,Te=ge.tag;if((ge.mode&1)===0&&(Te===0||Te===11||Te===15)){var pe=ge.alternate;pe?(ge.updateQueue=pe.updateQueue,ge.memoizedState=pe.memoizedState,ge.lanes=pe.lanes):(ge.updateQueue=null,ge.memoizedState=null)}var ke=pw(w);if(ke!==null){ke.flags&=-257,mw(ke,w,M,b,o),ke.mode&1&&hw(b,Z,o),o=ke,z=Z;var Ie=o.updateQueue;if(Ie===null){var Re=new Set;Re.add(z),o.updateQueue=Re}else Ie.add(z);break e}else{if((o&1)===0){hw(b,Z,o),Vm();break e}z=Error(n(426))}}else if(xt&&M.mode&1){var Ot=pw(w);if(Ot!==null){(Ot.flags&65536)===0&&(Ot.flags|=256),mw(Ot,w,M,b,o),tm(Po(z,M));break e}}b=z=Po(z,M),Bt!==4&&(Bt=2),du===null?du=[b]:du.push(b),b=w;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var G=dw(b,z,o);Bx(b,G);break e;case 1:M=z;var V=b.type,Q=b.stateNode;if((b.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(Ci===null||!Ci.has(Q)))){b.flags|=65536,o&=-o,b.lanes|=o;var we=fw(b,M,o);Bx(b,we);break e}}b=b.return}while(b!==null)}Yw(c)}catch(Le){o=Le,Lt===c&&c!==null&&(Lt=c=c.return);continue}break}while(!0)}function Vw(){var i=qc.current;return qc.current=Uc,i===null?Uc:i}function Vm(){(Bt===0||Bt===3||Bt===2)&&(Bt=4),Vt===null||(ys&268435455)===0&&(Yc&268435455)===0||Pi(Vt,Kt)}function Jc(i,o){var c=rt;rt|=2;var h=Vw();(Vt!==i||Kt!==o)&&(ei=null,bs(i,o));do try{jB();break}catch(E){$w(i,E)}while(!0);if(rm(),rt=c,qc.current=h,Lt!==null)throw Error(n(261));return Vt=null,Kt=0,Bt}function jB(){for(;Lt!==null;)qw(Lt)}function zB(){for(;Lt!==null&&!hF();)qw(Lt)}function qw(i){var o=Xw(i.alternate,i,Un);i.memoizedProps=i.pendingProps,o===null?Yw(i):Lt=o,Dm.current=null}function Yw(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=LB(c,o,Un),c!==null){Lt=c;return}}else{if(c=DB(c,o),c!==null){c.flags&=32767,Lt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Bt=6,Lt=null;return}}if(o=o.sibling,o!==null){Lt=o;return}Lt=o=i}while(o!==null);Bt===0&&(Bt=5)}function _s(i,o,c){var h=ut,E=Xn.transition;try{Xn.transition=null,ut=1,$B(i,o,c,h)}finally{Xn.transition=E,ut=h}return null}function $B(i,o,c,h){do Mo();while(Oi!==null);if((rt&6)!==0)throw Error(n(327));c=i.finishedWork;var E=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=c.lanes|c.childLanes;if(wF(i,b),i===Vt&&(Lt=Vt=null,Kt=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Gc||(Gc=!0,Qw(nc,function(){return Mo(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=Xn.transition,Xn.transition=null;var w=ut;ut=1;var M=rt;rt|=4,Dm.current=null,FB(i,c),Mw(c,i),lB(Vp),lc=!!$p,Vp=$p=null,i.current=c,BB(c),pF(),rt=M,ut=w,Xn.transition=b}else i.current=c;if(Gc&&(Gc=!1,Oi=i,Xc=E),b=i.pendingLanes,b===0&&(Ci=null),EF(c.stateNode),kn(i,Ct()),o!==null)for(h=i.onRecoverableError,c=0;c<o.length;c++)E=o[c],h(E.value,{componentStack:E.stack,digest:E.digest});if(Wc)throw Wc=!1,i=Bm,Bm=null,i;return(Xc&1)!==0&&i.tag!==0&&Mo(),b=i.pendingLanes,(b&1)!==0?i===Um?fu++:(fu=0,Um=i):fu=0,vi(),null}function Mo(){if(Oi!==null){var i=L_(Xc),o=Xn.transition,c=ut;try{if(Xn.transition=null,ut=16>i?16:i,Oi===null)var h=!1;else{if(i=Oi,Oi=null,Xc=0,(rt&6)!==0)throw Error(n(331));var E=rt;for(rt|=4,Oe=i.current;Oe!==null;){var b=Oe,w=b.child;if((Oe.flags&16)!==0){var M=b.deletions;if(M!==null){for(var z=0;z<M.length;z++){var Z=M[z];for(Oe=Z;Oe!==null;){var ge=Oe;switch(ge.tag){case 0:case 11:case 15:lu(8,ge,b)}var Te=ge.child;if(Te!==null)Te.return=ge,Oe=Te;else for(;Oe!==null;){ge=Oe;var pe=ge.sibling,ke=ge.return;if(Iw(ge),ge===Z){Oe=null;break}if(pe!==null){pe.return=ke,Oe=pe;break}Oe=ke}}}var Ie=b.alternate;if(Ie!==null){var Re=Ie.child;if(Re!==null){Ie.child=null;do{var Ot=Re.sibling;Re.sibling=null,Re=Ot}while(Re!==null)}}Oe=b}}if((b.subtreeFlags&2064)!==0&&w!==null)w.return=b,Oe=w;else e:for(;Oe!==null;){if(b=Oe,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:lu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Oe=G;break e}Oe=b.return}}var V=i.current;for(Oe=V;Oe!==null;){w=Oe;var Q=w.child;if((w.subtreeFlags&2064)!==0&&Q!==null)Q.return=w,Oe=Q;else e:for(w=V;Oe!==null;){if(M=Oe,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:Vc(9,M)}}catch(Le){At(M,M.return,Le)}if(M===w){Oe=null;break e}var we=M.sibling;if(we!==null){we.return=M.return,Oe=we;break e}Oe=M.return}}if(rt=E,vi(),Pr&&typeof Pr.onPostCommitFiberRoot=="function")try{Pr.onPostCommitFiberRoot(rc,i)}catch(Le){}h=!0}return h}finally{ut=c,Xn.transition=o}}return!1}function Ww(i,o,c){o=Po(c,o),o=dw(i,o,1),i=Ni(i,o,1),o=hn(),i!==null&&(Ma(i,1,o),kn(i,o))}function At(i,o,c){if(i.tag===3)Ww(i,i,c);else for(;o!==null;){if(o.tag===3){Ww(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Ci===null||!Ci.has(h))){i=Po(c,i),i=fw(o,i,1),o=Ni(o,i,1),i=hn(),o!==null&&(Ma(o,1,i),kn(o,i));break}}o=o.return}}function VB(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=hn(),i.pingedLanes|=i.suspendedLanes&c,Vt===i&&(Kt&c)===c&&(Bt===4||Bt===3&&(Kt&130023424)===Kt&&500>Ct()-Fm?bs(i,0):Mm|=c),kn(i,o)}function Gw(i,o){o===0&&((i.mode&1)===0?o=1:(o=sc,sc<<=1,(sc&130023424)===0&&(sc=4194304)));var c=hn();i=Kr(i,o),i!==null&&(Ma(i,o,c),kn(i,c))}function qB(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),Gw(i,c)}function YB(i,o){var c=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),Gw(i,c)}var Xw;Xw=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||Sn.current)An=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return An=!1,RB(i,o,c);An=(i.flags&131072)!==0}else An=!1,xt&&(o.flags&1048576)!==0&&kx(o,Nc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;zc(i,o),i=o.pendingProps;var E=So(o,sn.current);Oo(o,c),E=pm(null,o,h,i,E,c);var b=mm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,vn(h)?(b=!0,Sc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,am(o),E.updater=Hc,o.stateNode=E,E._reactInternals=o,_m(o,h,i,c),o=vm(null,o,h,!0,b,c)):(o.tag=0,xt&&b&&Kp(o),fn(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(zc(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=GB(h),i=fr(h,i),E){case 0:o=Sm(null,o,h,i,c);break e;case 1:o=_w(null,o,h,i,c);break e;case 11:o=gw(null,o,h,i,c);break e;case 14:o=Ew(null,o,h,fr(h.type,i),c);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),Sm(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),_w(i,o,h,E,c);case 3:e:{if(xw(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,Fx(i,o),Rc(o,h,null,c);var w=o.memoizedState;if(h=w.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){E=Po(Error(n(423)),o),o=ww(i,o,h,c,E);break e}else if(h!==E){E=Po(Error(n(424)),o),o=ww(i,o,h,c,E);break e}else for(Bn=xi(o.stateNode.containerInfo.firstChild),Fn=o,xt=!0,dr=null,c=Dx(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(No(),h===E){o=Zr(i,o,c);break e}fn(i,o,h,c)}o=o.child}return o;case 5:return Hx(o),i===null&&em(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,w=E.children,qp(h,E)?w=null:b!==null&&qp(h,b)&&(o.flags|=32),bw(i,o),fn(i,o,w,c),o.child;case 6:return i===null&&em(o),null;case 13:return Sw(i,o,c);case 4:return um(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=ko(o,null,h,c):fn(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),gw(i,o,h,E,c);case 7:return fn(i,o,o.pendingProps,c),o.child;case 8:return fn(i,o,o.pendingProps.children,c),o.child;case 12:return fn(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,b=o.memoizedProps,w=E.value,ht(Oc,h._currentValue),h._currentValue=w,b!==null)if(cr(b.value,w)){if(b.children===E.children&&!Sn.current){o=Zr(i,o,c);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var M=b.dependencies;if(M!==null){w=b.child;for(var z=M.firstContext;z!==null;){if(z.context===h){if(b.tag===1){z=Jr(-1,c&-c),z.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var ge=Z.pending;ge===null?z.next=z:(z.next=ge.next,ge.next=z),Z.pending=z}}b.lanes|=c,z=b.alternate,z!==null&&(z.lanes|=c),sm(b.return,c,o),M.lanes|=c;break}z=z.next}}else if(b.tag===10)w=b.type===o.type?null:b.child;else if(b.tag===18){if(w=b.return,w===null)throw Error(n(341));w.lanes|=c,M=w.alternate,M!==null&&(M.lanes|=c),sm(w,c,o),w=b.sibling}else w=b.child;if(w!==null)w.return=b;else for(w=b;w!==null;){if(w===o){w=null;break}if(b=w.sibling,b!==null){b.return=w.return,w=b;break}w=w.return}b=w}fn(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,Oo(o,c),E=Wn(E),h=h(E),o.flags|=1,fn(i,o,h,c),o.child;case 14:return h=o.type,E=fr(h,o.pendingProps),E=fr(h.type,E),Ew(i,o,h,E,c);case 15:return yw(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),zc(i,o),o.tag=1,vn(h)?(i=!0,Sc(o)):i=!1,Oo(o,c),lw(o,h,E),_m(o,h,E,c),vm(null,o,h,!0,i,c);case 19:return Aw(i,o,c);case 22:return Tw(i,o,c)}throw Error(n(156,o.tag))};function Qw(i,o){return C_(i,o)}function WB(i,o,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qn(i,o,c,h){return new WB(i,o,c,h)}function qm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function GB(i){if(typeof i=="function")return qm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ee)return 11;if(i===ce)return 14}return 2}function Ri(i,o){var c=i.alternate;return c===null?(c=Qn(i.tag,o,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=o,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,o=i.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function Zc(i,o,c,h,E,b){var w=2;if(h=i,typeof i=="function")qm(i)&&(w=1);else if(typeof i=="string")w=5;else e:switch(i){case W:return xs(c.children,E,b,o);case ie:w=8,E|=8;break;case de:return i=Qn(12,c,o,E|2),i.elementType=de,i.lanes=b,i;case xe:return i=Qn(13,c,o,E),i.elementType=xe,i.lanes=b,i;case fe:return i=Qn(19,c,o,E),i.elementType=fe,i.lanes=b,i;case le:return ed(c,E,b,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:w=10;break e;case se:w=9;break e;case ee:w=11;break e;case ce:w=14;break e;case he:w=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=Qn(w,c,o,E),o.elementType=i,o.type=h,o.lanes=b,o}function xs(i,o,c,h){return i=Qn(7,i,h,o),i.lanes=c,i}function ed(i,o,c,h){return i=Qn(22,i,h,o),i.elementType=le,i.lanes=c,i.stateNode={isHidden:!1},i}function Ym(i,o,c){return i=Qn(6,i,null,o),i.lanes=c,i}function Wm(i,o,c){return o=Qn(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function XB(i,o,c,h,E){this.tag=o,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=bp(0),this.expirationTimes=bp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function Gm(i,o,c,h,E,b,w,M,z){return i=new XB(i,o,c,M,z),o===1?(o=1,b===!0&&(o|=8)):o=0,b=Qn(3,null,null,o),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},am(b),i}function QB(i,o,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:h==null?null:""+h,children:i,containerInfo:o,implementation:c}}function Kw(i){if(!i)return Si;i=i._reactInternals;e:{if(cs(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(vn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(vn(c))return vx(i,c,o)}return o}function Jw(i,o,c,h,E,b,w,M,z){return i=Gm(c,h,!0,i,E,b,w,M,z),i.context=Kw(null),c=i.current,h=hn(),E=Ii(c),b=Jr(h,E),b.callback=o!=null?o:null,Ni(c,b,E),i.current.lanes=E,Ma(i,E,h),kn(i,h),i}function td(i,o,c,h){var E=o.current,b=hn(),w=Ii(E);return c=Kw(c),o.context===null?o.context=c:o.pendingContext=c,o=Jr(b,w),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Ni(E,o,w),i!==null&&(mr(i,E,w,b),Pc(i,E,w)),w}function nd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Zw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function Xm(i,o){Zw(i,o),(i=i.alternate)&&Zw(i,o)}function KB(){return null}var e2=typeof reportError=="function"?reportError:function(i){console.error(i)};function Qm(i){this._internalRoot=i}rd.prototype.render=Qm.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));td(i,o,null,null)},rd.prototype.unmount=Qm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Ts(function(){td(null,i,null,null)}),o[Wr]=null}};function rd(i){this._internalRoot=i}rd.prototype.unstable_scheduleHydration=function(i){if(i){var o=F_();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Ti.length&&o!==0&&o<Ti[c].priority;c++);Ti.splice(c,0,i),c===0&&H_(i)}};function Km(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function id(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function t2(){}function JB(i,o,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var Z=nd(w);b.call(Z)}}var w=Jw(o,h,i,0,null,!1,!1,"",t2);return i._reactRootContainer=w,i[Wr]=w.current,Qa(i.nodeType===8?i.parentNode:i),Ts(),w}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var M=h;h=function(){var Z=nd(z);M.call(Z)}}var z=Gm(i,0,!1,null,null,!1,!1,"",t2);return i._reactRootContainer=z,i[Wr]=z.current,Qa(i.nodeType===8?i.parentNode:i),Ts(function(){td(o,z,c,h)}),z}function sd(i,o,c,h,E){var b=c._reactRootContainer;if(b){var w=b;if(typeof E=="function"){var M=E;E=function(){var z=nd(w);M.call(z)}}td(o,w,i,E)}else w=JB(c,o,i,E,h);return nd(w)}D_=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=Da(o.pendingLanes);c!==0&&(_p(o,c|1),kn(o,Ct()),(rt&6)===0&&(Do=Ct()+500,vi()))}break;case 13:Ts(function(){var h=Kr(i,1);if(h!==null){var E=hn();mr(h,i,1,E)}}),Xm(i,1)}},xp=function(i){if(i.tag===13){var o=Kr(i,134217728);if(o!==null){var c=hn();mr(o,i,134217728,c)}Xm(i,134217728)}},M_=function(i){if(i.tag===13){var o=Ii(i),c=Kr(i,o);if(c!==null){var h=hn();mr(c,i,o,h)}Xm(i,o)}},F_=function(){return ut},B_=function(i,o){var c=ut;try{return ut=i,o()}finally{ut=c}},pp=function(i,o,c){switch(o){case"input":if(Et(i,c),o=c.name,c.type==="radio"&&o!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<c.length;o++){var h=c[o];if(h!==i&&h.form===i.form){var E=xc(h);if(!E)throw Error(n(90));gt(h),Et(h,E)}}}break;case"textarea":Jl(i,c);break;case"select":o=c.value,o!=null&&Or(i,!!c.multiple,o,!1)}},x_=zm,w_=Ts;var ZB={usingClientEntryPoint:!1,Events:[Za,xo,xc,b_,__,zm]},hu={findFiberByHostInstance:ds,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},e7={bundleType:hu.bundleType,version:hu.version,rendererPackageName:hu.rendererPackageName,rendererConfig:hu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=N_(i),i===null?null:i.stateNode},findFiberByHostInstance:hu.findFiberByHostInstance||KB,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 od=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!od.isDisabled&&od.supportsFiber)try{rc=od.inject(e7),Pr=od}catch(i){}}return En.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ZB,En.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Km(o))throw Error(n(200));return QB(i,o,null,c)},En.createRoot=function(i,o){if(!Km(i))throw Error(n(299));var c=!1,h="",E=e2;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=Gm(i,1,!1,null,null,c,!1,h,E),i[Wr]=o.current,Qa(i.nodeType===8?i.parentNode:i),new Qm(o)},En.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=N_(o),i=i===null?null:i.stateNode,i},En.flushSync=function(i){return Ts(i)},En.hydrate=function(i,o,c){if(!id(o))throw Error(n(200));return sd(null,i,o,!0,c)},En.hydrateRoot=function(i,o,c){if(!Km(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",w=e2;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(w=c.onRecoverableError)),o=Jw(o,null,i,1,c!=null?c:null,E,!1,b,w),i[Wr]=o.current,Qa(i),h)for(i=0;i<h.length;i++)c=h[i],E=c._getVersion,E=E(c._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[c,E]:o.mutableSourceEagerHydrationData.push(c,E);return new rd(o)},En.render=function(i,o,c){if(!id(o))throw Error(n(200));return sd(null,i,o,!1,c)},En.unmountComponentAtNode=function(i){if(!id(i))throw Error(n(40));return i._reactRootContainer?(Ts(function(){sd(null,null,i,!1,function(){i._reactRootContainer=null,i[Wr]=null})}),!0):!1},En.unstable_batchedUpdates=zm,En.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!id(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return sd(i,o,c,!1,h)},En.version="18.3.1-next-f1338f8080-20240426",En}var qg;function Yg(){if(qg)return sf.exports;qg=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(),sf.exports=cN(),sf.exports}var Ds=Yg();function Wg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Wg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function F(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Wg(e))&&(r&&(r+=" "),r+=t);return r}var Gg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Xg=Mi.createContext&&Mi.createContext(Gg),dN=["attr","size","title"];function fN(e,t){if(e==null)return{};var n=hN(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hN(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 Vu(){return Vu=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},Vu.apply(this,arguments)}function Qg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function qu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qg(Object(n),!0).forEach(function(r){pN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pN(e,t,n){return t=mN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mN(e){var t=gN(e,"string");return typeof t=="symbol"?t:t+""}function gN(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 Kg(e){return e&&e.map((t,n)=>Mi.createElement(t.tag,qu({key:n},t.attr),Kg(t.child)))}function ot(e){return t=>Mi.createElement(EN,Vu({attr:qu({},e.attr)},t),Kg(e.child))}function EN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=fN(e,dN),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Mi.createElement("svg",Vu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:qu(qu({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&Mi.createElement("title",null,a),e.children)};return Xg!==void 0?Mi.createElement(Xg.Consumer,null,n=>t(n)):t(Gg)}function yN(e){return ot({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 TN(e){return ot({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 bN(e){return ot({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 tr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:_.jsx("button",{className:F(e,`${C}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?_.jsx("img",{className:F(`${C}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),_N="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",xN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=at(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?_.jsx(bN,{className:F(t,`${C}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||_N,alt:"Copilot",className:F(t,`${C}-minimized-icon-img`)});return _.jsx(tr,{className:F(t,`${C}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},wN=()=>{const{globalClassName:e,themeVariables:t}=at(),n=()=>{zu(!1),Br(!0)};return Ds.createPortal(_.jsx("div",{className:F(e,`${C}-minimized-container`),style:t,children:_.jsx(xN,{onClick:n})}),document.body)};function SN(e){return ot({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 cn(){const e=H.useContext(mg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const vN=e=>({[`${Cn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Cn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Cn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Cn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Cn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Cn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function AN(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm18.31 6-2.76 5z"},child:[]},{tag:"path",attr:{d:"M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"},child:[]}]})(e)}function NN(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8A5.87 5.87 0 0 1 6 12c0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"},child:[]}]})(e)}function Jg(e){return ot({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 kN(e){return ot({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 uf(e){return ot({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 CN(e){return ot({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 ON(e){return ot({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 IN(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function Zg(e){return ot({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 e1(e){return ot({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 PN(e){return ot({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 RN(e){return ot({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 LN(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function t1(e){return ot({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 Yu=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>_.jsx("button",{className:F(`${C}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),DN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?_.jsx("img",{className:F(`${C}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(uf,{size:"16px"})},MN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return _.jsx(tr,{className:F(e,n,`cim-${r}-component`,`${C}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:_.jsx(uf,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(Yu,{className:F(e,n,`cim-${r}-component`,`${C}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&_.jsx(DN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function O7(){}function I7(){}function n1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function r1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const FN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UN={};function i1(e,t){return(UN.jsx?BN:FN).test(e)}const HN=/[ \t\n\f\r]/g;function jN(e){return typeof e=="object"?e.type==="text"?s1(e.value):!1:s1(e)}function s1(e){return e.replace(HN,"")===""}class Xo{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Xo.prototype.normal={},Xo.prototype.property={},Xo.prototype.space=void 0;function o1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Xo(n,r,t)}function Qo(e){return e.toLowerCase()}class yn{constructor(t,n){this.attribute=n,this.property=t}}yn.prototype.attribute="",yn.prototype.booleanish=!1,yn.prototype.boolean=!1,yn.prototype.commaOrSpaceSeparated=!1,yn.prototype.commaSeparated=!1,yn.prototype.defined=!1,yn.prototype.mustUseProperty=!1,yn.prototype.number=!1,yn.prototype.overloadedBoolean=!1,yn.prototype.property="",yn.prototype.spaceSeparated=!1,yn.prototype.space=void 0;let zN=0;const Ye=Yi(),Rt=Yi(),lf=Yi(),be=Yi(),ct=Yi(),qi=Yi(),In=Yi();function Yi(){return ud(2,++zN)}const cf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ye,booleanish:Rt,commaOrSpaceSeparated:In,commaSeparated:qi,number:be,overloadedBoolean:lf,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),df=Object.keys(cf);class ff extends yn{constructor(t,n,r,s){let a=-1;if(super(t,n),a1(this,"space",s),typeof r=="number")for(;++a<df.length;){const u=df[a];a1(this,df[a],(r&cf[u])===cf[u])}}}ff.prototype.defined=!0;function a1(e,t,n){n&&(e[t]=n)}function Ms(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new ff(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Qo(r)]=r,n[Qo(a.attribute)]=r}return new Xo(t,n,e.space)}const u1=Ms({properties:{ariaActiveDescendant:null,ariaAtomic:Rt,ariaAutoComplete:null,ariaBusy:Rt,ariaChecked:Rt,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:Rt,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:Rt,ariaFlowTo:ct,ariaGrabbed:Rt,ariaHasPopup:null,ariaHidden:Rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:be,ariaLive:null,ariaModal:Rt,ariaMultiLine:Rt,ariaMultiSelectable:Rt,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:Rt,ariaReadOnly:Rt,ariaRelevant:null,ariaRequired:Rt,ariaRoleDescription:ct,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:Rt,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function l1(e,t){return t in e?e[t]:t}function c1(e,t){return l1(e,t.toLowerCase())}const $N=Ms({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qi,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Ye,allowPaymentRequest:Ye,allowUserMedia:Ye,alpha:Ye,alt:null,as:null,async:Ye,autoCapitalize:null,autoComplete:ct,autoFocus:Ye,autoPlay:Ye,blocking:ct,capture:null,charSet:null,checked:Ye,cite:null,className:ct,closedBy:null,colorSpace:null,cols:be,colSpan:be,command:null,commandFor:null,content:null,contentEditable:Rt,controls:Ye,controlsList:ct,coords:be|qi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ye,defer:Ye,dir:null,dirName:null,disabled:Ye,download:lf,draggable:Rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ye,formTarget:null,headers:ct,height:be,hidden:lf,high:be,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ye,inputMode:null,integrity:null,is:null,isMap:Ye,itemId:null,itemProp:ct,itemRef:ct,itemScope:Ye,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ye,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Ye,muted:Ye,name:null,nonce:null,noModule:Ye,noValidate:Ye,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:Ye,optimum:be,pattern:null,ping:ct,placeholder:null,playsInline:Ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ye,referrerPolicy:null,rel:ct,required:Ye,reversed:Ye,rows:be,rowSpan:be,sandbox:ct,scope:null,scoped:Ye,seamless:Ye,selected:Ye,shadowRootClonable:Ye,shadowRootCustomElementRegistry:Ye,shadowRootDelegatesFocus:Ye,shadowRootMode:null,shadowRootSerializable:Ye,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:Rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Ye,useMap:null,value:Rt,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ye,declare:Ye,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Ye,noHref:Ye,noShade:Ye,noWrap:Ye,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:Rt,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ye,disablePictureInPicture:Ye,disableRemotePlayback:Ye,exportParts:qi,part:ct,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:c1}),VN=Ms({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",maskType:"mask-type",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:In,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:ct,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:qi,g2:qi,glyphName:qi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:In,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:In,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:In,rev:In,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:In,requiredFeatures:In,requiredFonts:In,requiredFormats:In,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:In,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:In,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:In,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:l1}),d1=Ms({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()}}),f1=Ms({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:c1}),h1=Ms({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),qN={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"},YN=/[A-Z]/g,p1=/-[a-z]/g,WN=/^data[-\w.:]+$/i;function Wu(e,t){const n=Qo(t);let r=t,s=yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&WN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(p1,XN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!p1.test(a)){let u=a.replace(YN,GN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=ff}return new s(r,t)}function GN(e){return"-"+e.toLowerCase()}function XN(e){return e.charAt(1).toUpperCase()}const Ko=o1([u1,$N,d1,f1,h1],"html"),ii=o1([u1,VN,d1,f1,h1],"svg");function m1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function g1(e){return e.join(" ").trim()}var Fs={},hf,E1;function QN(){if(E1)return hf;E1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
24
- `,f="/",p="*",m="",T="comment",y="declaration";function x(A,S){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];S=S||{};var k=1,I=1;function j(fe){var ce=fe.match(t);ce&&(k+=ce.length);var he=fe.lastIndexOf(d);I=~he?fe.length-he:I+fe.length}function Y(){var fe={line:k,column:I};return function(ce){return ce.position=new R(fe),de(),ce}}function R(fe){this.start=fe,this.end={line:k,column:I},this.source=S.source}R.prototype.content=A;function W(fe){var ce=new Error(S.source+":"+k+":"+I+": "+fe);if(ce.reason=fe,ce.filename=S.source,ce.line=k,ce.column=I,ce.source=A,!S.silent)throw ce}function ie(fe){var ce=fe.exec(A);if(ce){var he=ce[0];return j(he),A=A.slice(he.length),ce}}function de(){ie(n)}function $(fe){var ce;for(fe=fe||[];ce=se();)ce!==!1&&fe.push(ce);return fe}function se(){var fe=Y();if(!(f!=A.charAt(0)||p!=A.charAt(1))){for(var ce=2;m!=A.charAt(ce)&&(p!=A.charAt(ce)||f!=A.charAt(ce+1));)++ce;if(ce+=2,m===A.charAt(ce-1))return W("End of comment missing");var he=A.slice(2,ce-2);return I+=2,j(he),A=A.slice(ce),I+=2,fe({type:T,comment:he})}}function ee(){var fe=Y(),ce=ie(r);if(ce){if(se(),!ie(s))return W("property missing ':'");var he=ie(a),le=fe({type:y,property:v(ce[0].replace(e,m)),value:he?v(he[0].replace(e,m)):m});return ie(u),le}}function xe(){var fe=[];$(fe);for(var ce;ce=ee();)ce!==!1&&(fe.push(ce),$(fe));return fe}return de(),xe()}function v(A){return A?A.replace(l,m):m}return hf=x,hf}var y1;function KN(){if(y1)return Fs;y1=1;var e=Fs&&Fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.default=n;const t=e(QN());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;l?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Fs}var Jo={},T1;function JN(){if(T1)return Jo;T1=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},l=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,l):f=f.replace(r,l),f.replace(t,u))};return Jo.camelCase=d,Jo}var Zo,b1;function ZN(){if(b1)return Zo;b1=1;var e=Zo&&Zo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(KN()),n=JN();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(l,d){l&&d&&(u[(0,n.camelCase)(l,a)]=d)}),u}return r.default=r,Zo=r,Zo}var ek=ZN();const tk=Ke(ek),Gu=_1("end"),Tr=_1("start");function _1(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 x1(e){const t=Tr(e),n=Gu(e);if(t&&n)return{start:t,end:n}}function ea(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?w1(e.position):"start"in e||"end"in e?w1(e):"line"in e||"column"in e?pf(e):""}function pf(e){return S1(e&&e.line)+":"+S1(e&&e.column)}function w1(e){return pf(e&&e.start)+"-"+pf(e&&e.end)}function S1(e){return e&&typeof e=="number"?e:1}class en extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",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=U({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=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 l=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=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=ea(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=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}en.prototype.file="",en.prototype.name="",en.prototype.reason="",en.prototype.message="",en.prototype.stack="",en.prototype.column=void 0,en.prototype.line=void 0,en.prototype.ancestors=void 0,en.prototype.cause=void 0,en.prototype.fatal=void 0,en.prototype.place=void 0,en.prototype.ruleId=void 0,en.prototype.source=void 0;const mf={}.hasOwnProperty,nk=new Map,rk=/[A-Z]/g,ik=new Set(["table","tbody","thead","tfoot","tr"]),sk=new Set(["td","th"]),v1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ok(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=pk(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=hk(n,t.jsx,t.jsxs)}const s={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"?ii:Ko,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=A1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function A1(e,t,n){if(t.type==="element")return ak(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return uk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ck(e,t,n);if(t.type==="mdxjsEsm")return lk(e,t);if(t.type==="root")return dk(e,t,n);if(t.type==="text")return fk(e,t)}function ak(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=k1(e,t.tagName,!1),u=mk(e,t);let l=Ef(e,t);return ik.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!jN(d):!0})),N1(e,u,a,t),gf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function uk(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)}ta(e,t.position)}function lk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ta(e,t.position)}function ck(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:k1(e,t.name,!0),u=gk(e,t),l=Ef(e,t);return N1(e,u,a,t),gf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function dk(e,t,n){const r={};return gf(r,Ef(e,t)),e.create(t,e.Fragment,r,n)}function fk(e,t){return t.value}function N1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function hk(e,t,n){return r;function r(s,a,u,l){const f=Array.isArray(u.children)?n:t;return l?f(a,u,l):f(a,u)}}function pk(e,t){return n;function n(r,s,a,u){const l=Array.isArray(a.children),d=Tr(r);return t(s,a,u,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function mk(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&mf.call(t.properties,s)){const a=Ek(e,s,t.properties[s]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&sk.has(t.tagName)?r=l:n[u]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function gk(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 l=u.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ta(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else ta(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Ef(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:nk;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 f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const l=A1(e,a,u);l!==void 0&&n.push(l)}return n}function Ek(e,t,n){const r=Wu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?r1(n):g1(n)),r.property==="style"){let s=typeof n=="object"?n:yk(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Tk(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?qN[r.property]||r.property:r.attribute,n]}}function yk(e,t){try{return tk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new en("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=v1+"#cannot-parse-style-attribute",s}}function k1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const l=i1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=u}else r=i1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return mf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);ta(e)}function ta(e,t){const n=new en("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=v1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Tk(e){const t={};let n;for(n in e)mf.call(e,n)&&(t[bk(n)]=e[n]);return t}function bk(e){let t=e.replace(rk,_k);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function _k(e){return"-"+e.toLowerCase()}const yf={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"]},xk={};function Tf(e,t){const n=xk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return C1(e,r,s)}function C1(e,t,n){if(wk(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 O1(e.children,t,n)}return Array.isArray(e)?O1(e,t,n):""}function O1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=C1(e[s],t,n);return r.join("")}function wk(e){return!!(e&&typeof e=="object")}const I1=document.createElement("i");function bf(e){const t="&"+e+";";I1.innerHTML=t;const n=I1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Pn(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s: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 jn(e,t){return e.length>0?(Pn(e,e.length,0,t),e):t}const P1={}.hasOwnProperty;function R1(e){const t={};let n=-1;for(;++n<e.length;)Sk(t,e[n]);return t}function Sk(e,t){let n;for(n in t){const s=(P1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){P1.call(s,u)||(s[u]=[]);const l=a[u];vk(s[u],Array.isArray(l)?l:l?[l]:[])}}}function vk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pn(e,0,0,r)}function L1(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 nr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const dn=si(/[A-Za-z]/),tn=si(/[\dA-Za-z]/),Ak=si(/[#-'*+\--9=?A-Z^-~]/);function Xu(e){return e!==null&&(e<32||e===127)}const _f=si(/\d/),Nk=si(/[\dA-Fa-f]/),kk=si(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function dt(e){return e!==null&&(e<0||e===32)}function Je(e){return e===-2||e===-1||e===32}const Qu=si(new RegExp("\\p{P}|\\p{S}","u")),Wi=si(/\s/);function si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bs(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&tn(e.charCodeAt(n+1))&&tn(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(u=String.fromCharCode(a,l),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function tt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Je(d)?(e.enter(n),l(d)):t(d)}function l(d){return Je(d)&&a++<s?(e.consume(d),l):(e.exit(n),t(d))}}const Ck={tokenize:Ok};function Ok(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),tt(e,t,"linePrefix")}function s(l){return e.enter("paragraph"),a(l)}function a(l){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(l)}function u(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Be(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const Ik={tokenize:Pk},D1={tokenize:Rk};function Pk(e){const t=this,n=[];let r=0,s,a,u;return l;function l(I){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,d,f)(I)}return f(I)}function d(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&k();const j=t.events.length;let Y=j,R;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){R=t.events[Y][1].end;break}S(r);let W=j;for(;W<t.events.length;)t.events[W][1].end=U({},R),W++;return Pn(t.events,Y+1,0,t.events.slice(j)),t.events.length=W,f(I)}return l(I)}function f(I){if(r===n.length){if(!s)return T(I);if(s.currentConstruct&&s.currentConstruct.concrete)return x(I);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(D1,p,m)(I)}function p(I){return s&&k(),S(r),T(I)}function m(I){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(I)}function T(I){return t.containerState={},e.attempt(D1,y,x)(I)}function y(I){return r++,n.push([t.currentConstruct,t.containerState]),T(I)}function x(I){if(I===null){s&&k(),S(0),e.consume(I);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),v(I)}function v(I){if(I===null){A(e.exit("chunkFlow"),!0),S(0),e.consume(I);return}return Be(I)?(e.consume(I),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(I),v)}function A(I,j){const Y=t.sliceStream(I);if(j&&Y.push(null),I.previous=a,a&&(a.next=I),a=I,s.defineSkip(I.start),s.write(Y),t.parser.lazy[I.start.line]){let R=s.events.length;for(;R--;)if(s.events[R][1].start.offset<u&&(!s.events[R][1].end||s.events[R][1].end.offset>u))return;const W=t.events.length;let ie=W,de,$;for(;ie--;)if(t.events[ie][0]==="exit"&&t.events[ie][1].type==="chunkFlow"){if(de){$=t.events[ie][1].end;break}de=!0}for(S(r),R=W;R<t.events.length;)t.events[R][1].end=U({},$),R++;Pn(t.events,ie+1,0,t.events.slice(W)),t.events.length=R}}function S(I){let j=n.length;for(;j-- >I;){const Y=n[j];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=I}function k(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function Rk(e,t,n){return tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Us(e){if(e===null||dt(e)||Wi(e))return 1;if(Qu(e))return 2}function Ku(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const xf={name:"attention",resolveAll:Lk,tokenize:Dk};function Lk(e,t){let n=-1,r,s,a,u,l,d,f,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 m=U({},e[r][1].end),T=U({},e[n][1].start);M1(m,-d),M1(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:U({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:U({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:U({},e[r][1].end),end:U({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:U({},u.start),end:U({},l.end)},e[r][1].end=U({},u.start),e[n][1].start=U({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=jn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=jn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=jn(f,Ku(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=jn(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=jn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Pn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Dk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Us(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===a)return e.consume(d),l;const f=e.exit("attentionSequence"),p=Us(d),m=!p||p===2&&s||n.includes(d),T=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function M1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Mk={name:"autolink",tokenize:Fk};function Fk(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return dn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||tn(y)?(r=1,l(y)):f(y)}function l(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||tn(y))&&r++<32?(e.consume(y),l):(r=0,f(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||Xu(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):Ak(y)?(e.consume(y),f):n(y)}function p(y){return tn(y)?m(y):n(y)}function m(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||tn(y))&&r++<63){const x=y===45?T:m;return e.consume(y),x}return n(y)}}const na={partial:!0,tokenize:Bk};function Bk(e,t,n){return r;function r(a){return Je(a)?tt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Be(a)?t(a):n(a)}}const F1={continuation:{tokenize:Hk},exit:jk,name:"blockQuote",tokenize:Uk};function Uk(e,t,n){const r=this;return s;function s(u){if(u===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Je(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function Hk(e,t,n){const r=this;return s;function s(u){return Je(u)?tt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(F1,t,n)(u)}}function jk(e){e.exit("blockQuote")}const B1={name:"characterEscape",tokenize:zk};function zk(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return kk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const U1={name:"characterReference",tokenize:$k};function $k(e,t,n){const r=this;let s=0,a,u;return l;function l(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=tn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=Nk,p):(e.enter("characterReferenceValue"),a=7,u=_f,p(m))}function p(m){if(m===59&&s){const T=e.exit("characterReferenceValue");return u===tn&&!bf(r.sliceSerialize(T))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const H1={partial:!0,tokenize:qk},j1={concrete:!0,name:"codeFenced",tokenize:Vk};function Vk(e,t,n){const r=this,s={partial:!0,tokenize:Y};let a=0,u=0,l;return d;function d(R){return f(R)}function f(R){const W=r.events[r.events.length-1];return a=W&&W[1].type==="linePrefix"?W[2].sliceSerialize(W[1],!0).length:0,l=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===l?(u++,e.consume(R),p):u<3?n(R):(e.exit("codeFencedFenceSequence"),Je(R)?tt(e,m,"whitespace")(R):m(R))}function m(R){return R===null||Be(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(H1,v,j)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(R))}function T(R){return R===null||Be(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):Je(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,y,"whitespace")(R)):R===96&&R===l?n(R):(e.consume(R),T)}function y(R){return R===null||Be(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(R))}function x(R){return R===null||Be(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===l?n(R):(e.consume(R),x)}function v(R){return e.attempt(s,j,A)(R)}function A(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),S}function S(R){return a>0&&Je(R)?tt(e,k,"linePrefix",a+1)(R):k(R)}function k(R){return R===null||Be(R)?e.check(H1,v,j)(R):(e.enter("codeFlowValue"),I(R))}function I(R){return R===null||Be(R)?(e.exit("codeFlowValue"),k(R)):(e.consume(R),I)}function j(R){return e.exit("codeFenced"),t(R)}function Y(R,W,ie){let de=0;return $;function $(ce){return R.enter("lineEnding"),R.consume(ce),R.exit("lineEnding"),se}function se(ce){return R.enter("codeFencedFence"),Je(ce)?tt(R,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ce):ee(ce)}function ee(ce){return ce===l?(R.enter("codeFencedFenceSequence"),xe(ce)):ie(ce)}function xe(ce){return ce===l?(de++,R.consume(ce),xe):de>=u?(R.exit("codeFencedFenceSequence"),Je(ce)?tt(R,fe,"whitespace")(ce):fe(ce)):ie(ce)}function fe(ce){return ce===null||Be(ce)?(R.exit("codeFencedFence"),W(ce)):ie(ce)}}}function qk(e,t,n){const r=this;return s;function s(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 wf={name:"codeIndented",tokenize:Wk},Yk={partial:!0,tokenize:Gk};function Wk(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),tt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Be(f)?e.attempt(Yk,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||Be(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function Gk(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Be(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):tt(e,a,"linePrefix",5)(u)}function a(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):Be(u)?s(u):n(u)}}const Xk={name:"codeText",previous:Kk,resolve:Qk,tokenize:Jk};function Qk(e){let t=e.length-4,n=3,r,s;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;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function Kk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Jk(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):Be(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Be(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class Zk{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 s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&ra(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),ra(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ra(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);ra(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ra(this.left,n.reverse())}}}function ra(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 z1(e){const t={};let n=-1,r,s,a,u,l,d,f;const p=new Zk(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,eC(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=U({},p.get(s)[1].start),l=p.slice(s,n),l.unshift(r),p.splice(s,n-s+1,l))}}return Pn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function eC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const l=u.events,d=[],f={};let p,m,T=-1,y=n,x=0,v=0;const A=[v];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++T<l.length;)l[T][0]==="exit"&&l[T-1][0]==="enter"&&l[T][1].type===l[T-1][1].type&&l[T][1].start.line!==l[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 S=l.slice(A[T],A[T+1]),k=a.pop();d.push([k,k+S.length-1]),e.splice(k,2,S)}for(d.reverse(),T=-1;++T<d.length;)f[x+d[T][0]]=x+d[T][1],x+=d[T][1]-d[T][0]-1;return f}const tC={resolve:rC,tokenize:iC},nC={partial:!0,tokenize:sC};function rC(e){return z1(e),e}function iC(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?a(l):Be(l)?e.check(nC,u,a)(l):(e.consume(l),s)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function u(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function sC(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),tt(e,a,"linePrefix")}function a(u){if(u===null||Be(u))return n(u);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function $1(e,t,n,r,s,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(S){return S===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(S),e.exit(a),T):S===null||S===32||S===41||Xu(S)?n(S):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(S))}function T(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===62?(e.exit("chunkString"),e.exit(l),T(S)):S===null||S===60||Be(S)?n(S):(e.consume(S),S===92?x:y)}function x(S){return S===60||S===62||S===92?(e.consume(S),y):y(S)}function v(S){return!p&&(S===null||S===41||dt(S))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(S)):p<f&&S===40?(e.consume(S),p++,v):S===41?(e.consume(S),p--,v):S===null||S===32||S===40||Xu(S)?n(S):(e.consume(S),S===92?A:v)}function A(S){return S===40||S===41||S===92?(e.consume(S),v):v(S)}}function V1(e,t,n,r,s,a){const u=this;let l=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):Be(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Be(y)||l++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Je(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function q1(e,t,n,r,s,a){let u;return l;function l(T){return T===34||T===39||T===40?(e.enter(r),e.enter(s),e.consume(T),e.exit(s),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(s),e.consume(T),e.exit(s),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Be(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),tt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Be(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function ia(e,t){let n;return r;function r(s){return Be(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Je(s)?tt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const oC={name:"definition",tokenize:uC},aC={partial:!0,tokenize:lC};function uC(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return V1.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return s=nr(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 dt(y)?ia(e,f)(y):f(y)}function f(y){return $1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(aC,m,m)(y)}function m(y){return Je(y)?tt(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Be(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function lC(e,t,n){return r;function r(l){return dt(l)?ia(e,s)(l):n(l)}function s(l){return q1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Je(l)?tt(e,u,"whitespace")(l):u(l)}function u(l){return l===null||Be(l)?t(l):n(l)}}const cC={name:"hardBreakEscape",tokenize:dC};function dC(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Be(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const fC={name:"headingAtx",resolve:hC,tokenize:pC};function hC(e,t){let n=e.length-2,r=3,s,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&&(s={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"},Pn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function pC(e,t,n){let r=0;return s;function s(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||dt(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Be(p)?(e.exit("atxHeading"),t(p)):Je(p)?tt(e,l,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),l(p))}function f(p){return p===null||p===35||dt(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const mC=["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"],Y1=["pre","script","style","textarea"],gC={concrete:!0,name:"htmlFlow",resolveTo:TC,tokenize:bC},EC={partial:!0,tokenize:xC},yC={partial:!0,tokenize:_C};function TC(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 bC(e,t,n){const r=this;let s,a,u,l,d;return f;function f(P){return p(P)}function p(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),T):P===47?(e.consume(P),a=!0,v):P===63?(e.consume(P),s=3,r.interrupt?t:N):dn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function T(P){return P===45?(e.consume(P),s=2,y):P===91?(e.consume(P),s=5,l=0,x):dn(P)?(e.consume(P),s=4,r.interrupt?t:N):n(P)}function y(P){return P===45?(e.consume(P),r.interrupt?t:N):n(P)}function x(P){const Se="CDATA[";return P===Se.charCodeAt(l++)?(e.consume(P),l===Se.length?r.interrupt?t:ee:x):n(P)}function v(P){return dn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function A(P){if(P===null||P===47||P===62||dt(P)){const Se=P===47,Me=u.toLowerCase();return!Se&&!a&&Y1.includes(Me)?(s=1,r.interrupt?t(P):ee(P)):mC.includes(u.toLowerCase())?(s=6,Se?(e.consume(P),S):r.interrupt?t(P):ee(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):a?k(P):I(P))}return P===45||tn(P)?(e.consume(P),u+=String.fromCharCode(P),A):n(P)}function S(P){return P===62?(e.consume(P),r.interrupt?t:ee):n(P)}function k(P){return Je(P)?(e.consume(P),k):$(P)}function I(P){return P===47?(e.consume(P),$):P===58||P===95||dn(P)?(e.consume(P),j):Je(P)?(e.consume(P),I):$(P)}function j(P){return P===45||P===46||P===58||P===95||tn(P)?(e.consume(P),j):Y(P)}function Y(P){return P===61?(e.consume(P),R):Je(P)?(e.consume(P),Y):I(P)}function R(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),d=P,W):Je(P)?(e.consume(P),R):ie(P)}function W(P){return P===d?(e.consume(P),d=null,de):P===null||Be(P)?n(P):(e.consume(P),W)}function ie(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||dt(P)?Y(P):(e.consume(P),ie)}function de(P){return P===47||P===62||Je(P)?I(P):n(P)}function $(P){return P===62?(e.consume(P),se):n(P)}function se(P){return P===null||Be(P)?ee(P):Je(P)?(e.consume(P),se):n(P)}function ee(P){return P===45&&s===2?(e.consume(P),he):P===60&&s===1?(e.consume(P),le):P===62&&s===4?(e.consume(P),D):P===63&&s===3?(e.consume(P),N):P===93&&s===5?(e.consume(P),ae):Be(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(EC,J,xe)(P)):P===null||Be(P)?(e.exit("htmlFlowData"),xe(P)):(e.consume(P),ee)}function xe(P){return e.check(yC,fe,J)(P)}function fe(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ce}function ce(P){return P===null||Be(P)?xe(P):(e.enter("htmlFlowData"),ee(P))}function he(P){return P===45?(e.consume(P),N):ee(P)}function le(P){return P===47?(e.consume(P),u="",K):ee(P)}function K(P){if(P===62){const Se=u.toLowerCase();return Y1.includes(Se)?(e.consume(P),D):ee(P)}return dn(P)&&u.length<8?(e.consume(P),u+=String.fromCharCode(P),K):ee(P)}function ae(P){return P===93?(e.consume(P),N):ee(P)}function N(P){return P===62?(e.consume(P),D):P===45&&s===2?(e.consume(P),N):ee(P)}function D(P){return P===null||Be(P)?(e.exit("htmlFlowData"),J(P)):(e.consume(P),D)}function J(P){return e.exit("htmlFlow"),t(P)}}function _C(e,t,n){const r=this;return s;function s(u){return Be(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 xC(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(na,t,n)}}const wC={name:"htmlText",tokenize:SC};function SC(e,t,n){const r=this;let s,a,u;return l;function l(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),Y):N===63?(e.consume(N),I):dn(N)?(e.consume(N),ie):n(N)}function f(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),a=0,x):dn(N)?(e.consume(N),k):n(N)}function p(N){return N===45?(e.consume(N),y):n(N)}function m(N){return N===null?n(N):N===45?(e.consume(N),T):Be(N)?(u=m,le(N)):(e.consume(N),m)}function T(N){return N===45?(e.consume(N),y):m(N)}function y(N){return N===62?he(N):N===45?T(N):m(N)}function x(N){const D="CDATA[";return N===D.charCodeAt(a++)?(e.consume(N),a===D.length?v:x):n(N)}function v(N){return N===null?n(N):N===93?(e.consume(N),A):Be(N)?(u=v,le(N)):(e.consume(N),v)}function A(N){return N===93?(e.consume(N),S):v(N)}function S(N){return N===62?he(N):N===93?(e.consume(N),S):v(N)}function k(N){return N===null||N===62?he(N):Be(N)?(u=k,le(N)):(e.consume(N),k)}function I(N){return N===null?n(N):N===63?(e.consume(N),j):Be(N)?(u=I,le(N)):(e.consume(N),I)}function j(N){return N===62?he(N):I(N)}function Y(N){return dn(N)?(e.consume(N),R):n(N)}function R(N){return N===45||tn(N)?(e.consume(N),R):W(N)}function W(N){return Be(N)?(u=W,le(N)):Je(N)?(e.consume(N),W):he(N)}function ie(N){return N===45||tn(N)?(e.consume(N),ie):N===47||N===62||dt(N)?de(N):n(N)}function de(N){return N===47?(e.consume(N),he):N===58||N===95||dn(N)?(e.consume(N),$):Be(N)?(u=de,le(N)):Je(N)?(e.consume(N),de):he(N)}function $(N){return N===45||N===46||N===58||N===95||tn(N)?(e.consume(N),$):se(N)}function se(N){return N===61?(e.consume(N),ee):Be(N)?(u=se,le(N)):Je(N)?(e.consume(N),se):de(N)}function ee(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),s=N,xe):Be(N)?(u=ee,le(N)):Je(N)?(e.consume(N),ee):(e.consume(N),fe)}function xe(N){return N===s?(e.consume(N),s=void 0,ce):N===null?n(N):Be(N)?(u=xe,le(N)):(e.consume(N),xe)}function fe(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||dt(N)?de(N):(e.consume(N),fe)}function ce(N){return N===47||N===62||dt(N)?de(N):n(N)}function he(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function le(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),K}function K(N){return Je(N)?tt(e,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ae(N)}function ae(N){return e.enter("htmlTextData"),u(N)}}const Sf={name:"labelEnd",resolveAll:kC,resolveTo:CC,tokenize:OC},vC={tokenize:IC},AC={tokenize:PC},NC={tokenize:RC};function kC(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 s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Pn(e,0,e.length,n),e}function CC(e,t){let n=e.length,r=0,s,a,u,l;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:U({},e[a][1].start),end:U({},e[e.length-1][1].end)},f={type:"label",start:U({},e[a][1].start),end:U({},e[u][1].end)},p={type:"labelText",start:U({},e[a+r+2][1].end),end:U({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=jn(l,e.slice(a+1,a+r+3)),l=jn(l,[["enter",p,t]]),l=jn(l,Ku(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=jn(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=jn(l,e.slice(u+1)),l=jn(l,[["exit",d,t]]),Pn(e,a,e.length,l),e}function OC(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return l;function l(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(nr(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(vC,p,u?p:m)(T):T===91?e.attempt(AC,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(NC,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function IC(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return dt(m)?ia(e,a)(m):a(m)}function a(m){return m===41?p(m):$1(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return dt(m)?ia(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?q1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return dt(m)?ia(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function PC(e,t,n){const r=this;return s;function s(l){return V1.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(nr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function RC(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const LC={name:"labelStartImage",resolveAll:Sf.resolveAll,tokenize:DC};function DC(e,t,n){const r=this;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),u):n(l)}function u(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const MC={name:"labelStartLink",resolveAll:Sf.resolveAll,tokenize:FC};function FC(e,t,n){const r=this;return s;function s(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 vf={name:"lineEnding",tokenize:BC};function BC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),tt(e,t,"linePrefix")}}const Ju={name:"thematicBreak",tokenize:UC};function UC(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,l(f)}function l(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Be(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Je(f)?tt(e,l,"whitespace")(f):l(f))}}const Tn={continuation:{tokenize:$C},exit:qC,name:"list",tokenize:zC},HC={partial:!0,tokenize:YC},jC={partial:!0,tokenize:VC};function zC(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return l;function l(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:_f(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(Ju,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return _f(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"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(na,r.interrupt?n:p,e.attempt(HC,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Je(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 $C(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(na,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tt(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Je(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(jC,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,tt(e,e.attempt(Tn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function VC(e,t,n){const r=this;return tt(e,s,"listItemIndent",r.containerState.size+1);function s(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 qC(e){e.exit(this.containerState.type)}function YC(e,t,n){const r=this;return tt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!Je(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const W1={name:"setextUnderline",resolveTo:WC,tokenize:GC};function WC(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:U({},e[r][1].start),end:U({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=U({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function GC(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===s?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),Je(f)?tt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Be(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const XC={tokenize:QC};function QC(e){const t=this,n=e.attempt(na,r,e.attempt(this.parser.constructs.flowInitial,s,tt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(tC,s)),"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 s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const KC={resolveAll:X1()},JC=G1("string"),ZC=G1("text");function G1(e){return{resolveAll:X1(e==="text"?e3:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,l);return u;function u(p){return f(p)?a(p):l(p)}function l(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let T=-1;if(m)for(;++T<m.length;){const y=m[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function X1(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function e3(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],s=t.sliceStream(r);let a=s.length,u=-1,l=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)l++,u--;if(u)break;u=-1}else if(f===-2)d=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||d||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:U({},r.end)};r.end=U({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const t3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:oC},disable:{null:[]},document:{42:Tn,43:Tn,45:Tn,48:Tn,49:Tn,50:Tn,51:Tn,52:Tn,53:Tn,54:Tn,55:Tn,56:Tn,57:Tn,62:F1},flow:{35:fC,42:Ju,45:[W1,Ju],60:gC,61:W1,95:Ju,96:j1,126:j1},flowInitial:{[-2]:wf,[-1]:wf,32:wf},insideSpan:{null:[xf,KC]},string:{38:U1,92:B1},text:{[-5]:vf,[-4]:vf,[-3]:vf,33:LC,38:U1,42:xf,60:[Mk,wC],91:MC,92:[cC,B1],93:Sf,95:xf,96:Xk}},Symbol.toStringTag,{value:"Module"}));function n3(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 s={},a=[];let u=[],l=[];const d={attempt:W(Y),check:W(R),consume:k,enter:I,exit:j,interrupt:W(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:x,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(se){return u=jn(u,se),A(),u[u.length-1]!==null?[]:(ie(t,0),f.events=Ku(a,f.events,f),f.events)}function T(se,ee){return i3(y(se),ee)}function y(se){return r3(u,se)}function x(){const{_bufferIndex:se,_index:ee,line:xe,column:fe,offset:ce}=r;return{_bufferIndex:se,_index:ee,line:xe,column:fe,offset:ce}}function v(se){s[se.line]=se.column,$()}function A(){let se;for(;r._index<u.length;){const ee=u[r._index];if(typeof ee=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<ee.length;)S(ee.charCodeAt(r._bufferIndex));else S(ee)}}function S(se){p=p(se)}function k(se){Be(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,$()):se!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=se}function I(se,ee){const xe=ee||{};return xe.type=se,xe.start=x(),f.events.push(["enter",xe,f]),l.push(xe),xe}function j(se){const ee=l.pop();return ee.end=x(),f.events.push(["exit",ee,f]),ee}function Y(se,ee){ie(se,ee.from)}function R(se,ee){ee.restore()}function W(se,ee){return xe;function xe(fe,ce,he){let le,K,ae,N;return Array.isArray(fe)?J(fe):"tokenize"in fe?J([fe]):D(fe);function D(_e){return ne;function ne(Ee){const re=Ee!==null&&_e[Ee],ve=Ee!==null&&_e.null,$e=[...Array.isArray(re)?re:re?[re]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return J($e)(Ee)}}function J(_e){return le=_e,K=0,_e.length===0?he:P(_e[K])}function P(_e){return ne;function ne(Ee){return N=de(),ae=_e,_e.partial||(f.currentConstruct=_e),_e.name&&f.parser.constructs.disable.null.includes(_e.name)?Me():_e.tokenize.call(ee?Object.assign(Object.create(f),ee):f,d,Se,Me)(Ee)}}function Se(_e){return se(ae,N),ce}function Me(_e){return N.restore(),++K<le.length?P(le[K]):he}}}function ie(se,ee){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&Pn(f.events,ee,f.events.length-ee,se.resolve(f.events.slice(ee),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function de(){const se=x(),ee=f.previous,xe=f.currentConstruct,fe=f.events.length,ce=Array.from(l);return{from:fe,restore:he};function he(){r=se,f.previous=ee,f.currentConstruct=xe,f.events.length=fe,l=ce,$()}}function $(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function r3(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const l=u[0];typeof l=="string"?u[0]=l.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function i3(e,t){let n=-1;const r=[];let s;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=`
14
+ `),c=u===-1?-1:a.indexOf(`
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=Ui(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Mu.assertOptions(r,{silentJSONParsing:nn.transitional(nn.boolean),forcedJSONParsing:nn.transitional(nn.boolean),clarifyTimeoutError:nn.transitional(nn.boolean),legacyInterceptorReqResOrdering:nn.transitional(nn.boolean),advertiseZstdAcceptEncoding:nn.transitional(nn.boolean),validateStatusUndefinedResolves:nn.transitional(nn.boolean)},!1),s!=null&&(q.isFunction(s)?n.paramsSerializer={serialize:s}:Mu.assertOptions(s,{encode:nn.function,serialize:nn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Mu.assertOptions(n,{baseUrl:nn.spelling("baseURL"),withXsrfToken:nn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&q.merge(a.common,a[n.method]);a&&q.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(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;d=d&&A.synchronous;const v=n.transitional||Pd;v&&v.legacyInterceptorReqResOrdering?c.unshift(A.fulfilled,A.rejected):c.push(A.fulfilled,A.rejected)});const f=[];this.interceptors.response.forEach(function(A){f.push(A.fulfilled,A.rejected)});let p,m=0,b;if(!d){const x=[ag.bind(this),void 0];for(x.unshift(...c),x.push(...f),b=x.length,p=Promise.resolve(n);m<b;)p=p.then(x[m++],x[m++]);return p}b=c.length;let y=n;for(;m<b;){const x=c[m++],A=c[m++];try{y=x(y)}catch(v){A.call(this,v);break}}try{p=ag.call(this,y)}catch(x){return Promise.reject(x)}for(m=0,b=f.length;m<b;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=Ui(this.defaults,t);const n=K0(t.baseURL,t.url,t.allowAbsoluteUrls,t);return j0(n,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(n,r){return this.request(Ui(r||{},{method:t,url:n,data:r&&q.hasOwnProp(r,"data")?r.data:void 0}))}}),q.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(Ui(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Hi.prototype[t]=n(),t!=="query"&&(Hi.prototype[t+"Form"]=n(!0))});let Zv=class u2{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(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new Xo(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 u2(function(s){t=s}),cancel:t}}};function eA(e){return function(n){return e.apply(null,n)}}function tA(e){return q.isObject(e)&&e.isAxiosError===!0}const Ud={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(Ud).forEach(([e,t])=>{Ud[t]=e});function lg(e){const t=new Hi(e),n=S0(Hi.prototype.request,t);return q.extend(n,Hi.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return lg(Ui(e,s))},n}const Nt=lg(Go);Nt.Axios=Hi,Nt.CanceledError=Xo,Nt.CancelToken=Zv,Nt.isCancel=Y0,Nt.VERSION=Md,Nt.toFormData=Iu,Nt.AxiosError=Ne,Nt.Cancel=Nt.CanceledError,Nt.all=function(t){return Promise.all(t)},Nt.spread=eA,Nt.isAxiosError=tA,Nt.mergeConfig=Ui,Nt.AxiosHeaders=tn,Nt.formToJSON=e=>q0(q.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=og.getAdapter,Nt.HttpStatusCode=Ud,Nt.default=Nt;const{Axios:b7,AxiosError:x7,CanceledError:_7,isCancel:w7,CancelToken:S7,VERSION:v7,all:A7,Cancel:N7,isAxiosError:k7,spread:C7,toFormData:O7,AxiosHeaders:I7,HttpStatusCode:P7,formToJSON:R7,getAdapter:L7,mergeConfig:D7,create:M7}=Nt;class nA{constructor(t,n,r,s=!1,a,u){Xe(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Xe(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Xe(this,"CIMULATE_SEARCH_API_PATH","api/v1");Xe(this,"baseApiUrl");Xe(this,"headers",{});Xe(this,"fetchConfig",()=>Ue(this,null,function*(){try{const t=yield Nt.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}}));Xe(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.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,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class rA{constructor(t,n,r,s=!1,a,u){Xe(this,"apiService");Xe(this,"config",null);Xe(this,"getConfig",()=>Ue(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}}));Xe(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Xe(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Xe(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Xe(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Xe(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Xe(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Xe(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Xe(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Xe(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Xe(this,"getProductField",t=>this.config?this.config[t]:"");Xe(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new nA(t,n,r,s,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 Rt=(e,t,n,...r)=>{if(!e)return;const s=["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]",s,n,...r)};class iA{constructor(t=!1){Xe(this,"isDevelopment");Xe(this,"_log",(t,n,...r)=>{Rt(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 sA={copilot:"Your Search Assistant",messaging:"Commerce Client"},cg=B.createContext(null),oA=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:b,searchConfig:y,suggestionButtonConfig:x,progressStepsLimit:A=3,messageAlignment:v="start",autoScroll:w=!0,showProductDescription:k=!1,componentConfig:C,conversationHistory:j,resetConversationMessage:G="",apiKey:L,apiToken:W,baseUrl:ie,customerId:fe,tenantId:$,theme:le,isDevelopment:Z,__features:Ae,routingAttributes:de,enableDownloadTranscript:oe=!0,enableEscalationToAgent:Se=!1,showProductCaptions:se=!1,children:Y})=>{const ae=e==="messaging",N=B.useMemo(()=>{const Le=de==null?void 0:de.isCartMgmtSupported;return Le===!0||Le==="true"},[de]),D=B.useMemo(()=>ae?{config:null}:new rA(ie,L,W,Z,fe,$),[ae,ie,L,W,Z,fe,$]),ee=B.useMemo(()=>new iA(Z),[Z]);B.useEffect(()=>{ae||!D||D.config||D.getConfig()},[D,ae]);const P=B.useMemo(()=>lS(le),[le]),ve=B.useMemo(()=>{const Le=(y==null?void 0:y.placeholder)||m,Be=(y==null?void 0:y.buttonLabel)||b;let Ge="icon";return y!=null&&y.buttonType?Ge=y.buttonType:b&&(Ge="text"),ce(H({},y||{}),{placeholder:Le,buttonLabel:Be,buttonType:Ge})},[y,m,b]),Ce=B.useMemo(()=>ce(H({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||sA[e!=null?e:"copilot"]}),[r,t,n,e]),he=B.useMemo(()=>({configModule:D,mode:e!=null?e:"copilot",headerConfig:Ce,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:P,logger:ee,searchConfig:ve,suggestionButtonConfig:x,progressStepsLimit:A,messageAlignment:v,autoScroll:w,showProductDescription:!!k,enableMinimize:!!(C!=null&&C.enableMinimize),enableDownloadTranscript:oe,enableEscalationToAgent:Se,showProductCaptions:!!se,resetConversationMessage:G,conversationHistory:{sinceHours:typeof(j==null?void 0:j.sinceHours)=="number"?j.sinceHours:1,limit:j==null?void 0:j.limit},features:Ae,isCartMgmtSupported:N}),[D,e,Ce,a,s,f,p,c,d,u,ve,x,v,w,k,C,oe,Se,se,G,ee,P,j,Ae,N]);return _.jsx(cg.Provider,{value:he,children:Y})},ut=()=>{const e=B.useContext(cg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},dg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],ji=-1;function fg(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 dg.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:ji,data:{content:e}}}function hg(e){let t;try{t=JSON.parse(e)}catch(s){return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.type!="string"||!dg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return ce(H({},n),{type:n.type,index:r})}function Hd(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function aA(e,t){var n,r;return(r=(n=Hd(e))==null?void 0:n.response.some(s=>s.type===t))!=null?r:!1}function pg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function uA(e){return e.type==="markdown"&&e.index===ji?!pg(e.data.content):!0}function lA(e){var s;const t=(s=Hd(e))==null?void 0:s.response;if(!t)return null;const n=t.find(a=>a.type==="product_carousel");if(n)return{kind:"search",productIds:n.data.products.map(a=>a.id)};const r=t.find(a=>a.type==="product_tile");return r?{kind:"detail",productIds:[r.data.id]}:null}function cA(e,t){if(t.index===ji){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===ji&&t.type==="markdown"){const a={type:"markdown",index:ji,data:{content:s.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(s=>s.index===t.index);return[...n>=0?e.map((s,a)=>a===n?t:s):[...e,t]].sort((s,a)=>s.index-a.index)}function mg(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const gg={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1,cartUpdating:!1};function dA(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return H(ce(H({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ce(H({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return ce(H({},e),{conversationId:t.id});case"ADD_MESSAGE":return mg(e.messages,t.message)?e:ce(H({},e),{messages:[...e.messages,ce(H({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=fg(t.token);return n?ce(H({},e),{streamingBlocks:cA(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(mg(e.messages,t.message))return H(H({},e),n);const r=ce(H({},t.message),{type:"FLUSH_STREAMING"}),s=t.replaceMessageId?e.messages.findIndex(a=>a.id===t.replaceMessageId):-1;if(s>=0){const a=[...e.messages];return a[s]=ce(H({},r),{id:e.messages[s].id}),H(ce(H({},e),{messages:a}),n)}return H(ce(H({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return ce(H({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return H(ce(H({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:ce(H({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return ce(H({},e),{routingResult:t.result});case"SET_ERROR":return ce(H({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return ce(H({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return ce(H({},e),{sendError:null});case"LOAD_HISTORY":return ce(H({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return ce(H({},e),{sessionExpired:t.expired});case"SET_CART_UPDATING":return ce(H({},e),{cartUpdating:t.isUpdating});case"RESET":return ce(H({},gg),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const Eg=B.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,cartUpdating:!1,error:null,sendError:null,sessionExpired:!1,sendMessage:()=>Ue(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>{},retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>Ue(null,null,function*(){})}),fA=4320*60*1e3;function jd(e,t){return`cim_af_conv_${e}_${t}`}function zd(e,t){return Date.now()-e>t}function hA(e,t,n){try{const r=jd(e,t),s=sessionStorage.getItem(r);if(!s)return null;const a=JSON.parse(s);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"||zd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Fu(e,t,n){try{const r=jd(e,t),s={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(s))}catch(r){}}function $d(e,t){try{const n=jd(e,t);sessionStorage.removeItem(n)}catch(n){}}function Vd(e,t){return`cim_af_ct_${e}_${t}`}function pA(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(gA(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function mA(e){const t=pA(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function gA(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function yg(e,t){try{const n=Vd(e,t),r=sessionStorage.getItem(n);if(!r)return null;const s=JSON.parse(r);if(!s||typeof s!="object"||!("accessToken"in s)||!("lastEventId"in s)||!("storedAt"in s))return null;const a=s;return typeof a.accessToken!="string"||!a.accessToken||typeof a.lastEventId!="string"||!a.lastEventId||typeof a.storedAt!="number"?null:mA(a.accessToken)==="expired"?(sessionStorage.removeItem(n),null):a}catch(n){return null}}function EA(e,t,n,r){try{const s=Vd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(s,JSON.stringify(a))}catch(s){}}function yA(e,t){try{const n=Vd(e,t);sessionStorage.removeItem(n)}catch(n){}}function TA(e,t){return`cim_af_conv_${e}_${t}`}function bA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=TA(e,t);return new BroadcastChannel(n)}catch(n){return null}}function xA(e,t=500){return e?new Promise(n=>{let r=!1;const s=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(s),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(s),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function _A(e,t,n){if(!e)return()=>{};function r(s){var a;if((a=s.data)!=null&&a.type)switch(s.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 wA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function SA(e){if(e)try{e.close()}catch(t){}}function vA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function AA(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Tg(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 NA(e){if(e.entryType!=="Message")return null;const n=AA(e.entryPayload).abstractMessage;if(!n)return null;const r=Tg(n,"staticContent","text")||Tg(n,"content","text")||"";if(!r)return null;const s=vA(e.sender.role);return{id:e.identifier,serverId:e.identifier,role:s,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function kA(e){const t=[];for(const n of e){const r=NA(n);r&&t.push(r)}return t}const bg="onCimulateWidgetReady",CA=5e3;function Bu(e={}){const{routingAttributes:t,timeoutMs:n=CA}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=H({},t!=null?t:{});return new Promise(s=>{const a={settled:!1},u=()=>{if(a.settled)return;a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer);const p=Object.keys(r).length>0;s(p?r:t)},c={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(bg,{detail:c,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function OA(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=B.useRef(null),u=B.useRef(null),c=B.useRef(null),d=s.sinceHours*60*60*1e3,f=fA,p=B.useCallback(()=>(c.current||(c.current=xA(a.current)),c.current),[]);B.useEffect(()=>{const w=bA(t,n);a.current=w,c.current=null;const k=_A(w,()=>{const C=u.current;if(!C)return null;const j=yg(t,n);return{conversationId:C,continuationToken:j==null?void 0:j.accessToken,lastEventId:j==null?void 0:j.lastEventId}},()=>{$d(t,n),u.current=null});return()=>{k(),SA(w),a.current=null}},[t,n]);const m=B.useCallback((w,k)=>Ue(null,null,function*(){var G;const C=(G=k==null?void 0:k.createIfMissing)!=null?G:!0;let j=hA(t,n,f);if(!j){const L=yield p();L&&!zd(L.storedAt,f)&&(j=L)}if(!j){if(!C)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const L=yield w.createConversation(yield Bu({routingAttributes:r}));return Fu(t,n,L),u.current=L,{conversationId:L,restoredMessages:[],resumed:!1,outcome:"created"}}try{const W=(yield w.listConversations({conversationId:j.conversationId,startTimestamp:Date.now()-f})).conversations.find(fe=>fe.conversationId===j.conversationId&&!fe.isConversationClosed);if(!W){if($d(t,n),!C)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const fe=yield w.createConversation(yield Bu({routingAttributes:r}));return Fu(t,n,fe),u.current=fe,{conversationId:fe,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}}w.resumeConversation(W.conversationId),u.current=W.conversationId,Fu(t,n,W.conversationId);let ie=[];try{const fe=yield w.listConversationEntries(W.conversationId,{limit:s.limit,startTimestamp:Date.now()-d,direction:"FromStart"});ie=kA(fe.conversationEntries)}catch(fe){}return{conversationId:W.conversationId,restoredMessages:ie,resumed:!0,outcome:"resumed"}}catch(L){return{conversationId:j.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:L}}}),[t,n,r,s,d,f,p]),b=B.useCallback(w=>{Fu(t,n,w),u.current=w},[t,n]),y=B.useCallback(()=>{$d(t,n),yA(t,n),wA(a.current),u.current=null},[t,n]),x=B.useCallback(()=>{const w=yg(t,n);return w?{continuationToken:w.accessToken,lastEventId:w.lastEventId}:null},[t,n]),A=B.useCallback(()=>Ue(null,null,function*(){const w=yield p();return!(w!=null&&w.continuationToken)||zd(w.storedAt,f)?null:{continuationToken:w.continuationToken,lastEventId:w.lastEventId}}),[f,p]),v=B.useCallback(w=>Ue(null,null,function*(){try{const{accessToken:k,lastEventId:C}=yield w.generateContinuationToken();EA(t,n,k,C)}catch(k){}}),[t,n]);return{initializeConversation:m,persistConversationId:b,clearPersistedConversation:y,getStoredConnectOptions:x,getPeerConnectOptions:A,persistContinuationToken:v}}const Tr={default:"Something went wrong. Please try again.",server:"Something went wrong. Please try again.",rateLimit:"We are getting a lot of requests right now. Please try again in a moment.",network:"You are offline or we couldn't reach the assistant. Check connection and try again.",interrupted:"Something went wrong. Please try again.",connect:"You are offline or we couldn't reach the assistant. Check connection and try again.",lost:"You are offline or we couldn't reach the assistant. Check connection and try again.",routing:"Something went wrong. Please try again."};function IA(e){if(!e||typeof e!="object")return{};const t=e;return{type:typeof t.type=="string"?t.type:void 0,statusCode:typeof t.statusCode=="number"?t.statusCode:void 0}}function zi(e){const{type:t,statusCode:n}=IA(e);if(t==="api"&&typeof n=="number")return n===429?Tr.rateLimit:n>=500?Tr.server:Tr.default;switch(t){case"network":return Tr.network;case"sse":return Tr.interrupted;case"auth":return Tr.connect;default:return Tr.default}}function xg(e){switch(e.code){case"MAX_RECONNECT":return Tr.lost;case"ROUTING_FAILED":return Tr.routing;default:return Tr.connect}}const PA="Your session ended due to inactivity. Starting a new session…",RA=300*1e3,LA=2e3,DA=1e4;function Qo(e){var t;return(t=e.find(n=>!n.timedOut))!=null?t:e[e.length-1]}function MA(e){return!e.timedOut&&!!e.options.silent&&!!e.options.reconcileMessageId}function _g(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)}function wg(e){if(_g(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function FA(e){var b;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((b=e.variants)!=null?b:[]).filter(y=>y.value),s=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=s?` (${s})`:"",c=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",f=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${c}`;return{prompt:p,display:m}}const Sg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:c,onError:d,onProductResult:f,children:p})=>{const{logger:m,conversationHistory:b}=ut(),[y,x]=B.useReducer(dA,gg),A=B.useRef(y);A.current=y;const v=OA({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:b}),w=B.useRef(null),k=B.useRef(c),C=B.useRef(d),j=B.useRef(u),G=B.useRef(f),L=B.useRef(!1),W=B.useRef(!1),ie=B.useRef(!1),fe=B.useRef(0),$=B.useRef(0),le=B.useRef(0),Z=B.useRef(null),Ae=B.useRef(null),de=B.useRef([]),oe=B.useRef(null),Se=B.useCallback(()=>{x({type:"SET_CART_UPDATING",isUpdating:de.current.some(MA)})},[]),se=B.useCallback((Ee,ke)=>{ke.outcome==="timeout"?(Ee.timedOut=!0,de.current=de.current.filter(K=>K===Ee||!K.timedOut)):de.current=de.current.filter(K=>K!==Ee),clearTimeout(Ee.timeoutId),Se(),Ee.resolve(ke)},[Se]);k.current=c,C.current=d,j.current=u,G.current=f,B.useEffect(()=>{const Ee=new uS({baseURL:e,orgId:t,esDeveloperName:n,options:H({enableLogging:a},s?{capabilitiesVersion:s}:{})});w.current=Ee,Ee.on("connected",()=>{var K;x({type:"SET_CONNECTION_STATUS",status:"connected"}),(K=j.current)==null||K.call(j)}),Ee.on("disconnected",()=>{x({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),Ee.on("reconnecting",()=>{x({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),Ee.on("message",K=>{var Nn,cs;const ne=ce(H({id:K.messageId||crypto.randomUUID()},K.messageId?{serverId:K.messageId}:{}),{role:"agent",content:K.content,timestamp:K.timestamp,sender:K.sender,raw:K});m==null||m.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:ne.id,tokensBeforeFlush:fe.current,streamedFinalOnly:fe.current===0}),fe.current=0;const ge=Qo(de.current),je=ge==null?void 0:ge.options.reconcileMessageId;x({type:"FLUSH_STREAMING",message:ne,replaceMessageId:je}),(Nn=k.current)==null||Nn.call(k,ne),ge&&se(ge,{outcome:"success"});const{messagingSessionId:Qe}=K,Ct=Qe?lA(K.content):null;Qe&&Ct&&((cs=G.current)==null||cs.call(G,{agentSessionId:Qe,kind:Ct.kind,productIds:Ct.productIds}))}),Ee.on("streaming_token",K=>{var ne;if(!((ne=Qo(de.current))!=null&&ne.options.silent)){if(fe.current+=1,m!=null&&m.isDevelopment){const ge=fg(K.token);ge?ge.index===ji?m.debug("🦜 streaming_token fragment (reassembled downstream)",{token:K.token}):m.debug("🦜 streaming_token parsed",{type:ge.type,index:ge.index,outputName:ge.type==="tool_results"?ge.output_name:void 0}):m.debug("🦜 streaming_token empty",{token:K.token})}x({type:"APPEND_STREAMING_TOKEN",token:K.token})}}),Ee.on("typing_started",()=>{var K;(K=Qo(de.current))!=null&&K.options.silent||x({type:"SET_AGENT_TYPING",isTyping:!0})}),Ee.on("typing_stopped",()=>{var K;(K=Qo(de.current))!=null&&K.options.silent||x({type:"SET_AGENT_TYPING",isTyping:!1})}),Ee.on("progress_indicator",K=>{var ne;(ne=Qo(de.current))!=null&&ne.options.silent||x({type:"ADD_PROGRESS_STEP",message:K.message})}),Ee.on("routing_result",K=>{var ne;if(x({type:"SET_ROUTING_RESULT",result:K}),!K.isSuccessful){const ge=`Routing failed: ${K.failureType||"unknown"}`;x({type:"SET_ERROR",error:xg({code:"ROUTING_FAILED"})}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(ne=C.current)==null||ne.call(C,ge)}}),Ee.on("participant_changed",K=>{if(K.participant.name==="Automated Process")return;const ne=ce(H({id:crypto.randomUUID()},K.entryId?{serverId:K.entryId}:{}),{role:"system",content:K.action==="add"?`${K.participant.name||"Agent"} joined the conversation`:`${K.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});m==null||m.log("🦜 MessagingProvider participant_changed event received",{event:K}),x({type:"ADD_MESSAGE",message:ne})}),Ee.on("conversation_closed",()=>{const K={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};x({type:"ADD_MESSAGE",message:K}),x({type:"SET_CONVERSATION_ID",id:null}),v.clearPersistedConversation()}),Ee.on("error",K=>{var ne;if(m==null||m.log("🦜 MessagingProvider ERROR event received",{event:K}),K.code==="SESSION_EXPIRED"){ie.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),x({type:"SET_LOADING",isLoading:!1});return}x({type:"SET_ERROR",error:xg(K)}),K.recoverable||x({type:"SET_CONNECTION_STATUS",status:"error"}),(ne=C.current)==null||ne.call(C,K.message)}),x({type:"SET_CONNECTION_STATUS",status:"connecting"});const ke=()=>Ue(null,null,function*(){let K=v.getStoredConnectOptions(),ne=!1;K||(K=yield v.getPeerConnectOptions(),ne=!!K);try{yield Ee.connect(K!=null?K:void 0)}catch(je){if(K&&wg(je))m==null||m.log("Stored token expired on connect — falling back to fresh connect"),ne||v.clearPersistedConversation(),yield Ee.connect();else throw je}yield v.persistContinuationToken(Ee);const ge=yield v.initializeConversation(Ee);if(m==null||m.log("🦜 initial connect complete",{conversationId:ge.conversationId,resumed:ge.resumed,outcome:ge.outcome,restoredMessages:ge.restoredMessages.length}),ge.outcome==="unverified-error"){ge.conversationId&&(Ee.resumeConversation(ge.conversationId),x({type:"SET_CONVERSATION_ID",id:ge.conversationId}));return}x({type:"SET_CONVERSATION_ID",id:ge.conversationId}),ge.resumed&&ge.restoredMessages.length>0&&x({type:"LOAD_HISTORY",messages:ge.restoredMessages})});return Ae.current=ke,ke().catch(K=>{var ne;x({type:"SET_CONNECTION_STATUS",status:"error"}),x({type:"SET_ERROR",error:zi(K)}),(ne=C.current)==null||ne.call(C,K.message)}),()=>{Ee.disconnect(),Ee.off(),w.current=null,Ae.current=null}},[e,t,n,s,se]);const Y=B.useCallback(()=>Ue(null,null,function*(){const Ee=w.current;if(!Ee)return!1;const ke=v.getStoredConnectOptions();if(!ke)return m==null||m.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;m==null||m.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{Ee.disconnect(),yield Ee.connect(ke)}catch(ne){if(wg(ne))return m==null||m.log("🦜 attemptResume: token expired (401) — will start fresh",{error:ne instanceof Error?ne.message:String(ne)}),!1;throw m==null||m.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:ne instanceof Error?ne.message:String(ne)}),ne}yield v.persistContinuationToken(Ee);const K=yield v.initializeConversation(Ee,{createIfMissing:!1});return K.outcome==="not-found-or-closed"||!K.conversationId?(m==null||m.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(K.outcome==="unverified-error"&&(m==null||m.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:K.conversationId}),Ee.resumeConversation(K.conversationId)),m==null||m.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:K.conversationId}),x({type:"SET_CONVERSATION_ID",id:K.conversationId}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(K.conversationId),ie.current=!1,x({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[v,m]),ae=B.useCallback(Ee=>Ue(null,null,function*(){var K;const ke=w.current;if(ke){Ee.options.silent||(x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_PROGRESS_MESSAGE",message:""}));try{yield ke.sendMessage(Ee.text)}catch(ne){const ge=zi(ne);x({type:"SET_SEND_ERROR",error:{text:Ee.text,displayContent:Ee.displayContent,options:Ee.options,message:ge}}),(K=C.current)==null||K.call(C,ne instanceof Error?ne.message:String(ne)),se(Ee,{outcome:"failure",message:ge})}}}),[se]),N=B.useCallback(Ee=>Ue(null,null,function*(){var K;const ke=w.current;if(!(!ke||L.current)){L.current=!0,W.current=!0;try{if(yield Y()){Ee&&(yield ae(Ee));return}m==null||m.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),ie.current=!1,x({type:"SET_SESSION_EXPIRED",expired:!1}),x({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:PA,timestamp:new Date().toISOString()}}),v.clearPersistedConversation(),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),ke.disconnect(),yield ke.connect(),yield v.persistContinuationToken(ke);const ne=yield ke.createConversation(yield Bu({routingAttributes:r}));m==null||m.log("🦜 recoverExpiredSession: new conversation created",{conversationId:ne}),x({type:"SET_CONVERSATION_ID",id:ne}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(ne),Ee&&(yield ae(Ee))}catch(ne){const ge=ne instanceof Error?ne.message:String(ne);x({type:"SET_ERROR",error:zi(ne)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(K=C.current)==null||K.call(C,ge),Ee&&se(Ee,{outcome:"failure",message:zi(ne)})}finally{L.current=!1,W.current=!1}}}),[r,v,Y,ae,m,se]),D=B.useRef(N);D.current=N;const ee=B.useCallback(()=>Ue(null,null,function*(){const Ee=w.current;if(!Ee||L.current)return;if(!A.current.conversationId&&!ie.current){Ee.reconnect();return}L.current=!0;const ke=Ue(null,null,function*(){try{(yield Y())||(ie.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(K){ie.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{L.current=!1,Z.current=null}});Z.current=ke,yield ke}),[Y]),P=B.useRef(ee);P.current=ee,B.useEffect(()=>{const Ee=()=>{const Qe=Date.now();Qe-le.current<LA||(le.current=Qe,P.current())},ke=()=>{if(document.visibilityState==="hidden"){$.current=Date.now();return}const Qe=w.current;if(!Qe)return;const Ct=$.current?Date.now()-$.current:0;$.current=0,(ie.current||!Qe.isConnected||Ct>RA)&&Ee()},K=Qe=>{Qe.persisted&&Ee()},ne=()=>{$.current=Date.now()},ge=()=>Ee(),je=()=>Ee();return document.addEventListener("visibilitychange",ke),window.addEventListener("pageshow",K),window.addEventListener("pagehide",ne),document.addEventListener("resume",ge),window.addEventListener("online",je),()=>{document.removeEventListener("visibilitychange",ke),window.removeEventListener("pageshow",K),window.removeEventListener("pagehide",ne),document.removeEventListener("resume",ge),window.removeEventListener("online",je)}},[]);const ve=B.useCallback((Ee,ke)=>Ue(null,null,function*(){var ne;const K=w.current;if(!K){se(Ee,{outcome:"failure",message:"Messaging is unavailable"});return}if(ie.current){yield D.current(Ee);return}try{yield K.sendMessage(Ee.text)}catch(ge){if(_g(ge)){yield D.current(Ee);return}const je=zi(ge);x({type:"SET_SEND_ERROR",error:ke(je)}),(ne=C.current)==null||ne.call(C,ge instanceof Error?ge.message:String(ge)),se(Ee,{outcome:"failure",message:je})}}),[se]),Ce=B.useCallback(Ee=>Ue(null,null,function*(){const ke=Z.current;ke&&(yield ke),yield Ee()}),[]),he=B.useCallback((Ee,ke,K={})=>new Promise(ne=>{if(!w.current){ne({outcome:"failure",message:"Messaging is unavailable"});return}const je={};Object.assign(je,{text:Ee,displayContent:ke,options:K,resolve:ne,timeoutId:setTimeout(()=>{x({type:"SET_LOADING",isLoading:!1}),se(je,{outcome:"timeout"})},DA)}),de.current.push(je),Se(),x({type:"CLEAR_SEND_ERROR"}),K.silent||(x({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"user",content:ke!=null?ke:Ee,timestamp:new Date().toISOString()}}),x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_PROGRESS_MESSAGE",message:""})),Ce(()=>ve(je,Qe=>({text:Ee,displayContent:ke,options:K,message:Qe})))}),[ve,Ce,se,Se]),Le=B.useCallback((Ee,ke)=>{if(!Ee.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});const K=()=>he(Ee,void 0,ke),ne=oe.current?oe.current.then(K):K(),ge=ne.then(()=>{});return oe.current=ge,ge.finally(()=>{oe.current===ge&&(oe.current=null)}),ne},[he]),Be=B.useCallback(Ee=>{if(!w.current)return;const{prompt:ke,display:K}=FA(Ee);he(ke,K)},[he]),Ge=B.useCallback(()=>{const Ee=w.current,ke=A.current.sendError;if(!Ee||!ke)return;const K=()=>W.current?Promise.resolve({outcome:"failure",message:ke.message}):he(ke.text,ke.displayContent,ke.options),ne=oe.current?oe.current.then(K):K(),ge=ne.then(()=>{});return oe.current=ge,ge.finally(()=>{oe.current===ge&&(oe.current=null)}),ne},[he]),dt=B.useCallback(()=>{const Ee=w.current,ke=Ae.current;!Ee||!ke||(ie.current=!1,Ee.disconnect(),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),ke().catch(K=>{var ne;x({type:"SET_CONNECTION_STATUS",status:"error"}),x({type:"SET_ERROR",error:zi(K)}),(ne=C.current)==null||ne.call(C,K.message)}))},[]),qt=B.useCallback(()=>{const Ee=w.current;Ee&&(ie.current=!1,v.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),Ee.endConversation().then(()=>(Ee.disconnect(),Ee.connect())).then(()=>Ue(null,null,function*(){return yield v.persistContinuationToken(Ee),Ee.createConversation(yield Bu({routingAttributes:r}))})).then(ke=>{x({type:"SET_CONVERSATION_ID",id:ke}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(ke)}).catch(ke=>{var K;x({type:"SET_ERROR",error:zi(ke)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(K=C.current)==null||K.call(C,ke.message)}))},[r,v]),Dt=B.useCallback(()=>Ue(null,null,function*(){var ne;const Ee=w.current;if(!Ee)return;const ke=yield Ee.retrieveConversationTranscript(),K=URL.createObjectURL(ke);try{const ge=document.createElement("a");ge.href=K,ge.download=`transcript-${(ne=Ee.conversationId)!=null?ne:"conversation"}.pdf`,document.body.appendChild(ge),ge.click(),ge.remove()}finally{URL.revokeObjectURL(K)}}),[]),An=B.useMemo(()=>({connectionStatus:y.connectionStatus,isConnected:y.connectionStatus==="connected"&&y.conversationId!==null,isAgentTyping:y.isAgentTyping,conversationId:y.conversationId,messages:y.messages,streamingBlocks:y.streamingBlocks,progressMessage:y.progressMessage,progressSteps:y.progressSteps,error:y.error,sendError:y.sendError,loading:y.loading,sessionExpired:y.sessionExpired,cartUpdating:y.cartUpdating,sendMessage:Le,addToCart:Be,resetConversation:qt,retryLastMessage:Ge,retryConnection:dt,downloadTranscript:Dt}),[y,Le,Be,qt,Ge,dt,Dt]);return _.jsx(Eg.Provider,{value:An,children:p})};var vg=Symbol.for("immer-nothing"),Ag=Symbol.for("immer-draftable"),Ln=Symbol.for("immer-state");function rr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ls=Object.getPrototypeOf;function Ds(e){return!!e&&!!e[Ln]}function $i(e){var t;return e?Ng(e)||Array.isArray(e)||!!e[Ag]||!!((t=e.constructor)!=null&&t[Ag])||Ko(e)||ju(e):!1}var BA=Object.prototype.constructor.toString();function Ng(e){if(!e||typeof e!="object")return!1;const t=Ls(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===BA}function Uu(e,t){Hu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Hu(e){const t=e[Ln];return t?t.type_:Array.isArray(e)?1:Ko(e)?2:ju(e)?3:0}function qd(e,t){return Hu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function kg(e,t,n){const r=Hu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function UA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ko(e){return e instanceof Map}function ju(e){return e instanceof Set}function Vi(e){return e.copy_||e.base_}function Yd(e,t){if(Ko(e))return new Map(e);if(ju(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Ng(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ln];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(Ls(e),r)}else{const r=Ls(e);if(r!==null&&n)return H({},e);const s=Object.create(r);return Object.assign(s,e)}}function Wd(e,t=!1){return $u(e)||Ds(e)||!$i(e)||(Hu(e)>1&&Object.defineProperties(e,{set:{value:zu},add:{value:zu},clear:{value:zu},delete:{value:zu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>Wd(n,!0))),e}function zu(){rr(2)}function $u(e){return Object.isFrozen(e)}var HA={};function qi(e){const t=HA[e];return t||rr(0,e),t}var Jo;function Cg(){return Jo}function jA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Og(e,t){t&&(qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gd(e){Xd(e),e.drafts_.forEach(zA),e.drafts_=null}function Xd(e){e===Jo&&(Jo=e.parent_)}function Ig(e){return Jo=jA(Jo,e)}function zA(e){const t=e[Ln];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Pg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ln].modified_&&(Gd(t),rr(4)),$i(e)&&(e=Vu(t,e),t.parent_||qu(t,e)),t.patches_&&qi("Patches").generateReplacementPatches_(n[Ln].base_,e,t.patches_,t.inversePatches_)):e=Vu(t,n,[]),Gd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vg?e:void 0}function Vu(e,t,n){if($u(t))return t;const r=t[Ln];if(!r)return Uu(t,(s,a)=>Rg(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return qu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),Uu(a,(c,d)=>Rg(e,r,s,c,d,n,u)),qu(e,s,!1),n&&e.patches_&&qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Rg(e,t,n,r,s,a,u){if(Ds(s)){const c=a&&t&&t.type_!==3&&!qd(t.assigned_,r)?a.concat(r):void 0,d=Vu(e,s,c);if(kg(n,r,d),Ds(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if($i(s)&&!$u(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Vu(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Ko(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&qu(e,s)}}function qu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wd(t,n)}function $A(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Cg(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Qd;n&&(s=[r],a=Zo);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Qd={get(e,t){if(t===Ln)return e;const n=Vi(e);if(!qd(n,t))return VA(e,n,t);const r=n[t];return e.finalized_||!$i(r)?r:r===Kd(e.base_,t)?(Zd(e),e.copy_[t]=ef(r,e)):r},has(e,t){return t in Vi(e)},ownKeys(e){return Reflect.ownKeys(Vi(e))},set(e,t,n){const r=Lg(Vi(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Kd(Vi(e),t),a=s==null?void 0:s[Ln];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(UA(n,s)&&(n!==void 0||qd(e.base_,t)))return!0;Zd(e),Jd(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Kd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Zd(e),Jd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Vi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){rr(11)},getPrototypeOf(e){return Ls(e.base_)},setPrototypeOf(){rr(12)}},Zo={};Uu(Qd,(e,t)=>{Zo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Zo.deleteProperty=function(e,t){return Zo.set.call(this,e,t,void 0)},Zo.set=function(e,t,n){return Qd.set.call(this,e[0],t,n,e[0])};function Kd(e,t){const n=e[Ln];return(n?Vi(n):e)[t]}function VA(e,t,n){var s;const r=Lg(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Lg(e,t){if(!(t in e))return;let n=Ls(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ls(n)}}function Jd(e){e.modified_||(e.modified_=!0,e.parent_&&Jd(e.parent_))}function Zd(e){e.copy_||(e.copy_=Yd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&rr(6),r!==void 0&&typeof r!="function"&&rr(7);let s;if($i(t)){const a=Ig(this),u=ef(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?Gd(a):Xd(a)}return Og(a,r),Pg(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===vg&&(s=void 0),this.autoFreeze_&&Wd(s,!0),r){const a=[],u=[];qi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else rr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,s;return[this.produce(t,n,(u,c)=>{r=u,s=c}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){$i(e)||rr(8),Ds(e)&&(e=YA(e));const t=Ig(this),n=ef(e,void 0);return n[Ln].isManual_=!0,Xd(t),n}finishDraft(e,t){const n=e&&e[Ln];(!n||!n.isManual_)&&rr(9);const{scope_:r}=n;return Og(r,t),Pg(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=qi("Patches").applyPatches_;return Ds(e)?r(e,t):this.produce(e,s=>r(s,t))}};function ef(e,t){const n=Ko(e)?qi("MapSet").proxyMap_(e,t):ju(e)?qi("MapSet").proxySet_(e,t):$A(e,t);return(t?t.scope_:Cg()).drafts_.push(n),n}function YA(e){return Ds(e)||rr(10,e),Dg(e)}function Dg(e){if(!$i(e)||$u(e))return e;const t=e[Ln];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Yd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Yd(e,!0);return Uu(n,(r,s)=>{kg(n,r,Dg(s))}),t&&(t.finalized_=!1),n}var WA=new qA,GA=WA.produce;function XA(e,t,n){var r=B.useMemo(function(){return GA(e)},[e]);return B.useReducer(r,t,n)}const pt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},Mg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1},Fg=B.createContext(null),Bg=B.createContext(null),QA=({children:e,dispatch:t})=>{const n=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),s=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),c=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),f=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),p=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),m=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),b=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=B.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:b}),[n,r,s,a,u,c,d,f,p,m,b]);return _.jsx(Bg.Provider,{value:y,children:e})},KA=(e,t)=>{const{type:n,payload:r}=t;switch(n){case pt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case pt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case pt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case pt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case pt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case pt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case pt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case pt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case pt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case pt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case pt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case pt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case pt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case pt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case pt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},JA=({promptsConfig:e,children:t})=>{const[n,r]=XA(KA,H(H({},Mg),e||{}));return _.jsx(Fg.Provider,{value:n,children:_.jsx(QA,{dispatch:r,children:t})})};function ZA(){var e=B.useRef(!0);return e.current?(e.current=!1,!0):e.current}function eN(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function tN(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var tf=typeof window!="undefined",Yu=function(e){B.useEffect(e,[])},nN=function(e){var t=B.useRef(e);t.current=e,Yu(function(){return function(){return t.current()}})},rN=function(e){var t=B.useRef(0),n=B.useState(e),r=n[0],s=n[1],a=B.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return nN(function(){cancelAnimationFrame(t.current)}),[r,a]},iN=function(e,t){return e===t};function sN(e,t){t===void 0&&(t=iN);var n=B.useRef(),r=B.useRef(e),s=ZA();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var oN=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,c=rN({width:tf?window.innerWidth:r,height:tf?window.innerHeight:a}),d=c[0],f=c[1];return B.useEffect(function(){if(tf){var p=function(){var m=window.innerWidth,b=window.innerHeight;f({width:m,height:b}),u&&u(m,b)};return eN(window,"resize",p),function(){tN(window,"resize",p)}}},[]),d};const Ug="cimulate",nf=`${Ug}:ui-state-update`,rf=`${Ug}:prompts-state-update`,aN=e=>{window.addEventListener(nf,e)},uN=e=>{window.removeEventListener(nf,e)},lN=(e,t)=>{const n=new CustomEvent(nf,{detail:{property:e,value:t}});window.dispatchEvent(n)},Hg=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);ot.entryTypeProxy.entryType=e},Br=e=>{const t=ot.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;ot.statusProxy.isOpen=n,n&&(ot.statusProxy.isMinimized=!1)},Wu=e=>{const t=ot.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;ot.statusProxy.isMinimized=n,n&&(ot.statusProxy.isOpen=!1)},sf=e=>{ot.modalProxy.isFullscreen=e},Gu=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);ot.statusProxy.type=e,e==="dialog"||e==="chat"?ot.modeProxy.mode="embedded":ot.modeProxy.mode="standalone"},of=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(", ")}.`);ot.dialogProxy.position=e},cN=e=>{const t=ot.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;ot.dialogProxy.isFullHeight=n};class dN{constructor(){Xe(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}});Xe(this,"connectedProxy");Xe(this,"modeProxy");Xe(this,"entryTypeProxy");Xe(this,"statusProxy");Xe(this,"dialogProxy");Xe(this,"modalProxy",{isFullscreen:!1});Xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return lN(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 ot=new dN,jg=B.createContext({mode:ot.modeProxy.mode,entryType:ot.entryType,status:ot.statusProxy,dialogPosition:ot.dialogProxy.position,isDialogFullHeight:ot.dialogProxy.isFullHeight,dialogWidth:ot.dialogProxy.width,isModalFullscreen:ot.modalProxy.isFullscreen,previousComponentType:ot.statusProxy.type}),fN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=B.useState(e!=null?e:ot.entryTypeProxy.entryType),[u,c]=B.useState(ot.modeProxy.mode),[d,f]=B.useState({type:n||ot.statusProxy.type,isOpen:ot.statusProxy.isOpen,isMinimized:ot.statusProxy.isMinimized}),[p,m]=B.useState(ot.dialogProxy.position),[b,y]=B.useState(ot.dialogProxy.isFullHeight),[x,A]=B.useState(ot.dialogProxy.width),[v,w]=B.useState(ot.modalProxy.isFullscreen),k=sN(d.type);B.useEffect(()=>{const j=G=>{const{property:L,value:W}=G.detail||{};if(!(!L||W===void 0)){if(L==="mode"){c(W);return}if(L==="entryType"){a(W);return}if(L==="isMinimized"){f(ie=>ce(H({},ie),{isMinimized:W}));return}if(L==="isOpen"){f(ie=>ce(H({},ie),{isOpen:W}));return}if(L==="type"){f(ie=>ce(H({},ie),{type:W}));return}if(L==="position"){m(W);return}if(L==="isFullHeight"){y(W);return}if(L==="width"){A(W);return}if(L==="isFullscreen"){w(W);return}}};return aN(j),()=>{uN(j)}},[]),Yu(()=>{e&&Hg(e)}),Yu(()=>{const j=n||(t==null?void 0:t.type);j&&Gu(j),t&&"isOpen"in t&&Br(!!t.isOpen),t&&"isMinimized"in t&&Wu(!!t.isMinimized)}),Yu(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:j}=t.options;j&&of(j),"dialogFullHeight"in t.options&&cN(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&A(t.options.dialogWidth),"isModalFullscreen"in t.options&&sf(!!t.options.isModalFullscreen)});const C=B.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:k||"dialog",dialogPosition:p,isDialogFullHeight:b,dialogWidth:x,isModalFullscreen:v}),[u,s,d,k,p,b,x,v]);return _.jsx(jg.Provider,{value:C,children:r})},hN=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){Rt(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){Rt(!0,"error",`[CimulateOverrides] Override URL must use HTTPS, got ${r.protocol}. Using default components.`),t({});return}const s=document.createElement("script");s.src=e,s.async=!0,s.crossOrigin="anonymous";let a=!1;const u=()=>{a=!0,clearTimeout(c)};s.onload=()=>{if(a)return;u();const d=window.CimulateOverrides;d&&typeof d=="object"?(Rt(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(Rt(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),Rt(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const c=setTimeout(()=>{a||(a=!0,Rt(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),zg=B.createContext({overrides:{},isInitialized:!1}),pN=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=B.useState({}),[a,u]=B.useState(!1);B.useEffect(()=>{Ue(null,null,function*(){let f={};e?(Rt(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield hN(e)):t&&typeof t=="object"?(Rt(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(Rt(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const c=B.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return _.jsx(zg.Provider,{value:c,children:n})},$g=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:c,openLinksInNewTab:d,globalClassName:f,isDevelopment:p=!1,componentType:m,componentConfig:b,entryType:y,entryMessage:x,disclaimerText:A,disclaimerMarkdown:v,clientContext:w,searchPlaceholder:k,searchButtonLabel:C,searchConfig:j,suggestionButtonConfig:G,messageAlignment:L,autoScroll:W,promptsConfig:ie,showProductDescription:fe,resetConversationMessage:$,conversationHistory:le,messagingConfig:Z,overrides:Ae,overridesUrl:de,inlineOverrides:oe,__features:Se,children:se})=>_.jsx(oA,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:x,theme:c,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:k,searchButtonLabel:C,searchConfig:j,suggestionButtonConfig:G,messageAlignment:L,autoScroll:W,showProductDescription:fe,componentConfig:b,clientContext:w,disclaimerMarkdown:v,disclaimerText:A,resetConversationMessage:$,conversationHistory:le,isDevelopment:p,__features:Se,progressStepsLimit:Z==null?void 0:Z.progressStepsLimit,routingAttributes:Z==null?void 0:Z.routingAttributes,enableDownloadTranscript:Z==null?void 0:Z.enableDownloadTranscript,enableEscalationToAgent:Z==null?void 0:Z.enableEscalationToAgent,showProductCaptions:Z==null?void 0:Z.showProductCaptions,children:_.jsx(fN,{entryType:y,componentConfig:b,componentType:m,children:_.jsx(JA,{promptsConfig:ie,children:_.jsx(pN,{overridesUrl:de,inlineOverrides:oe||Ae,children:_.jsx(Sg,{scrt2Url:(Z==null?void 0:Z.scrt2Url)||"",orgId:(Z==null?void 0:Z.orgId)||"",esDeveloperName:(Z==null?void 0:Z.esDeveloperName)||"",routingAttributes:(Z==null?void 0:Z.routingAttributes)||{},capabilitiesVersion:Z==null?void 0:Z.capabilitiesVersion,enableLogging:p,onProductResult:Z==null?void 0:Z.onProductResult,children:se})})})})}),ri=()=>{const e=B.useContext(jg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var af={exports:{}},bn={},uf={exports:{}},lf={};var Vg;function mN(){return Vg||(Vg=1,(function(e){function t(Y,ae){var N=Y.length;Y.push(ae);e:for(;0<N;){var D=N-1>>>1,ee=Y[D];if(0<s(ee,ae))Y[D]=ae,Y[N]=ee,N=D;else break e}}function n(Y){return Y.length===0?null:Y[0]}function r(Y){if(Y.length===0)return null;var ae=Y[0],N=Y.pop();if(N!==ae){Y[0]=N;e:for(var D=0,ee=Y.length,P=ee>>>1;D<P;){var ve=2*(D+1)-1,Ce=Y[ve],he=ve+1,Le=Y[he];if(0>s(Ce,N))he<ee&&0>s(Le,Ce)?(Y[D]=Le,Y[he]=N,D=he):(Y[D]=Ce,Y[ve]=N,D=ve);else if(he<ee&&0>s(Le,N))Y[D]=Le,Y[he]=N,D=he;else break e}}return ae}function s(Y,ae){var N=Y.sortIndex-ae.sortIndex;return N!==0?N:Y.id-ae.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=[],f=[],p=1,m=null,b=3,y=!1,x=!1,A=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Y){for(var ae=n(f);ae!==null;){if(ae.callback===null)r(f);else if(ae.startTime<=Y)r(f),ae.sortIndex=ae.expirationTime,t(d,ae);else break;ae=n(f)}}function j(Y){if(A=!1,C(Y),!x)if(n(d)!==null)x=!0,Se(G);else{var ae=n(f);ae!==null&&se(j,ae.startTime-Y)}}function G(Y,ae){x=!1,A&&(A=!1,w(ie),ie=-1),y=!0;var N=b;try{for(C(ae),m=n(d);m!==null&&(!(m.expirationTime>ae)||Y&&!le());){var D=m.callback;if(typeof D=="function"){m.callback=null,b=m.priorityLevel;var ee=D(m.expirationTime<=ae);ae=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===n(d)&&r(d),C(ae)}else r(d);m=n(d)}if(m!==null)var P=!0;else{var ve=n(f);ve!==null&&se(j,ve.startTime-ae),P=!1}return P}finally{m=null,b=N,y=!1}}var L=!1,W=null,ie=-1,fe=5,$=-1;function le(){return!(e.unstable_now()-$<fe)}function Z(){if(W!==null){var Y=e.unstable_now();$=Y;var ae=!0;try{ae=W(!0,Y)}finally{ae?Ae():(L=!1,W=null)}}else L=!1}var Ae;if(typeof k=="function")Ae=function(){k(Z)};else if(typeof MessageChannel!="undefined"){var de=new MessageChannel,oe=de.port2;de.port1.onmessage=Z,Ae=function(){oe.postMessage(null)}}else Ae=function(){v(Z,0)};function Se(Y){W=Y,L||(L=!0,Ae())}function se(Y,ae){ie=v(function(){Y(e.unstable_now())},ae)}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(Y){Y.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,Se(G))},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Y){switch(b){case 1:case 2:case 3:var ae=3;break;default:ae=b}var N=b;b=ae;try{return Y()}finally{b=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Y,ae){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var N=b;b=Y;try{return ae()}finally{b=N}},e.unstable_scheduleCallback=function(Y,ae,N){var D=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?D+N:D):N=D,Y){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=N+ee,Y={id:p++,callback:ae,priorityLevel:Y,startTime:N,expirationTime:ee,sortIndex:-1},N>D?(Y.sortIndex=N,t(f,Y),n(d)===null&&Y===n(f)&&(A?(w(ie),ie=-1):A=!0,se(j,N-D))):(Y.sortIndex=ee,t(d,Y),x||y||(x=!0,Se(G))),Y},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(Y){var ae=b;return function(){var N=b;b=ae;try{return Y.apply(this,arguments)}finally{b=N}}}})(lf)),lf}var qg;function gN(){return qg||(qg=1,uf.exports=mN()),uf.exports}var Yg;function EN(){if(Yg)return bn;Yg=1;var e=er(),t=gN();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[: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={},m={};function b(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,l,h){if(l!==null&&l.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,o,l,h){if(o===null||typeof o=="undefined"||y(i,o,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function A(i,o,l,h,E,T,S){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=o,this.sanitizeURL=T,this.removeEmptyString=S}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[i]=new A(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];v[o]=new A(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new A(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[i]=new A(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){v[i]=new A(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new A(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new A(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new A(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new A(i,5,!1,i.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function k(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 o=i.replace(w,k);v[o]=new A(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(w,k);v[o]=new A(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(w,k);v[o]=new A(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,o,l,h){var E=v.hasOwnProperty(o)?v[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(x(o,l,E,h)&&(l=null),h||E===null?b(o)&&(l===null?i.removeAttribute(o):i.setAttribute(o,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(o=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(o):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,o,l):i.setAttribute(o,l))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=Symbol.for("react.element"),L=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),fe=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),le=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),Ae=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),Se=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),Y=Symbol.iterator;function ae(i){return i===null||typeof i!="object"?null:(i=Y&&i[Y]||i["@@iterator"],typeof i=="function"?i:null)}var N=Object.assign,D;function ee(i){if(D===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);D=o&&o[1]||""}return`
17
+ `+D+i}var P=!1;function ve(i,o){if(!i||P)return"";P=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(te){var h=te}Reflect.construct(i,[],o)}else{try{o.call()}catch(te){h=te}i.call(o.prototype)}else{try{throw Error()}catch(te){h=te}i()}}catch(te){if(te&&h&&typeof te.stack=="string"){for(var E=te.stack.split(`
18
+ `),T=h.stack.split(`
19
+ `),S=E.length-1,M=T.length-1;1<=S&&0<=M&&E[S]!==T[M];)M--;for(;1<=S&&0<=M;S--,M--)if(E[S]!==T[M]){if(S!==1||M!==1)do if(S--,M--,0>M||E[S]!==T[M]){var z=`
20
+ `+E[S].replace(" at new "," at ");return i.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",i.displayName)),z}while(1<=S&&0<=M);break}}}finally{P=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?ee(i):""}function Ce(i){switch(i.tag){case 5:return ee(i.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return i=ve(i.type,!1),i;case 11:return i=ve(i.type.render,!1),i;case 1:return i=ve(i.type,!0),i;default:return""}}function he(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 W:return"Fragment";case L:return"Portal";case fe:return"Profiler";case ie:return"StrictMode";case Ae:return"Suspense";case de:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case le:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case Z:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case oe:return o=i.displayName||null,o!==null?o:he(i.type)||"Memo";case Se:o=i._payload,i=i._init;try{return he(i(o))}catch(l){}}return null}function Le(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return he(o);case 8:return o===ie?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Be(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ge(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function dt(i){var o=Ge(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,T=l.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,T.call(this,S)}}),Object.defineProperty(i,o,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function qt(i){i._valueTracker||(i._valueTracker=dt(i))}function Dt(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return i&&(h=Ge(i)?i.checked?"true":"false":i.value),i=h,i!==l?(o.setValue(i),!0):!1}function An(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function Ee(i,o){var l=o.checked;return N({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function ke(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=Be(o.value!=null?o.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function K(i,o){o=o.checked,o!=null&&C(i,"checked",o,!1)}function ne(i,o){K(i,o);var l=Be(o.value),h=o.type;if(l!=null)h==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?je(i,o.type,l):o.hasOwnProperty("defaultValue")&&je(i,o.type,Be(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function ge(i,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,l||o===i.value||(i.value=o),i.defaultValue=o}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function je(i,o,l){(o!=="number"||An(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Qe=Array.isArray;function Ct(i,o,l,h){if(i=i.options,o){o={};for(var E=0;E<l.length;E++)o["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=o.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Be(l),o=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function Nn(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function cs(i,o){var l=o.value;if(l==null){if(l=o.children,o=o.defaultValue,l!=null){if(o!=null)throw Error(n(92));if(Qe(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:Be(l)}}function Zl(i,o){var l=Be(o.value),h=Be(o.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),o.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function ec(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function ue(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 we(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?ue(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var qe,Je=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,l,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(qe=qe||document.createElement("div"),qe.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=qe.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function rt(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var Kt={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},Yr=["Webkit","ms","Moz","O"];Object.keys(Kt).forEach(function(i){Yr.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Kt[o]=Kt[i]})});function Wn(i,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||Kt.hasOwnProperty(i)&&Kt[i]?(""+o).trim():o+"px"}function mi(i,o){i=i.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=Wn(l,o[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var ds=N({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 Jt(i,o){if(o){if(ds[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Ir(i,o){if(i.indexOf("-")===-1)return typeof o.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 Bn=null;function mp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var gp=null,Eo=null,yo=null;function xx(i){if(i=iu(i)){if(typeof gp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=wc(o),gp(i.stateNode,i.type,o))}}function _x(i){Eo?yo?yo.push(i):yo=[i]:Eo=i}function wx(){if(Eo){var i=Eo,o=yo;if(yo=Eo=null,xx(i),o)for(i=0;i<o.length;i++)xx(o[i])}}function Sx(i,o){return i(o)}function vx(){}var Ep=!1;function Ax(i,o,l){if(Ep)return i(o,l);Ep=!0;try{return Sx(i,o,l)}finally{Ep=!1,(Eo!==null||yo!==null)&&(vx(),wx())}}function Fa(i,o){var l=i.stateNode;if(l===null)return null;var h=wc(l);if(h===null)return null;l=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,o,typeof l));return l}var yp=!1;if(c)try{var Ba={};Object.defineProperty(Ba,"passive",{get:function(){yp=!0}}),window.addEventListener("test",Ba,Ba),window.removeEventListener("test",Ba,Ba)}catch(i){yp=!1}function mF(i,o,l,h,E,T,S,M,z){var te=Array.prototype.slice.call(arguments,3);try{o.apply(l,te)}catch(ye){this.onError(ye)}}var Ua=!1,tc=null,nc=!1,Tp=null,gF={onError:function(i){Ua=!0,tc=i}};function EF(i,o,l,h,E,T,S,M,z){Ua=!1,tc=null,mF.apply(gF,arguments)}function yF(i,o,l,h,E,T,S,M,z){if(EF.apply(this,arguments),Ua){if(Ua){var te=tc;Ua=!1,tc=null}else throw Error(n(198));nc||(nc=!0,Tp=te)}}function fs(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function Nx(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function kx(i){if(fs(i)!==i)throw Error(n(188))}function TF(i){var o=i.alternate;if(!o){if(o=fs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var l=i,h=o;;){var E=l.return;if(E===null)break;var T=E.alternate;if(T===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===l)return kx(E),i;if(T===h)return kx(E),o;T=T.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=T;else{for(var S=!1,M=E.child;M;){if(M===l){S=!0,l=E,h=T;break}if(M===h){S=!0,h=E,l=T;break}M=M.sibling}if(!S){for(M=T.child;M;){if(M===l){S=!0,l=T,h=E;break}if(M===h){S=!0,h=T,l=E;break}M=M.sibling}if(!S)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:o}function Cx(i){return i=TF(i),i!==null?Ox(i):null}function Ox(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=Ox(i);if(o!==null)return o;i=i.sibling}return null}var Ix=t.unstable_scheduleCallback,Px=t.unstable_cancelCallback,bF=t.unstable_shouldYield,xF=t.unstable_requestPaint,Ot=t.unstable_now,_F=t.unstable_getCurrentPriorityLevel,bp=t.unstable_ImmediatePriority,Rx=t.unstable_UserBlockingPriority,rc=t.unstable_NormalPriority,wF=t.unstable_LowPriority,Lx=t.unstable_IdlePriority,ic=null,Pr=null;function SF(i){if(Pr&&typeof Pr.onCommitFiberRoot=="function")try{Pr.onCommitFiberRoot(ic,i,void 0,(i.current.flags&128)===128)}catch(o){}}var cr=Math.clz32?Math.clz32:NF,vF=Math.log,AF=Math.LN2;function NF(i){return i>>>=0,i===0?32:31-(vF(i)/AF|0)|0}var sc=64,oc=4194304;function Ha(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 ac(i,o){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,S=l&268435455;if(S!==0){var M=S&~E;M!==0?h=Ha(M):(T&=S,T!==0&&(h=Ha(T)))}else S=l&~E,S!==0?h=Ha(S):T!==0&&(h=Ha(T));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((h&4)!==0&&(h|=l&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)l=31-cr(o),E=1<<l,h|=i[l],o&=~E;return h}function kF(i,o){switch(i){case 1:case 2:case 4:return o+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 o+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 CF(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var S=31-cr(T),M=1<<S,z=E[S];z===-1?((M&l)===0||(M&h)!==0)&&(E[S]=kF(M,o)):z<=o&&(i.expiredLanes|=M),T&=~M}}function xp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Dx(){var i=sc;return sc<<=1,(sc&4194240)===0&&(sc=64),i}function _p(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function ja(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-cr(o),i[o]=l}function OF(i,o){var l=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-cr(l),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~T}}function wp(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-cr(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var lt=0;function Mx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Fx,Sp,Bx,Ux,Hx,vp=!1,uc=[],gi=null,Ei=null,yi=null,za=new Map,$a=new Map,Ti=[],IF="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 jx(i,o){switch(i){case"focusin":case"focusout":gi=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":yi=null;break;case"pointerover":case"pointerout":za.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":$a.delete(o.pointerId)}}function Va(i,o,l,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:l,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},o!==null&&(o=iu(o),o!==null&&Sp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function PF(i,o,l,h,E){switch(o){case"focusin":return gi=Va(gi,i,o,l,h,E),!0;case"dragenter":return Ei=Va(Ei,i,o,l,h,E),!0;case"mouseover":return yi=Va(yi,i,o,l,h,E),!0;case"pointerover":var T=E.pointerId;return za.set(T,Va(za.get(T)||null,i,o,l,h,E)),!0;case"gotpointercapture":return T=E.pointerId,$a.set(T,Va($a.get(T)||null,i,o,l,h,E)),!0}return!1}function zx(i){var o=hs(i.target);if(o!==null){var l=fs(o);if(l!==null){if(o=l.tag,o===13){if(o=Nx(l),o!==null){i.blockedOn=o,Hx(i.priority,function(){Bx(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function lc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=Np(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Bn=h,l.target.dispatchEvent(h),Bn=null}else return o=iu(l),o!==null&&Sp(o),i.blockedOn=l,!1;o.shift()}return!0}function $x(i,o,l){lc(i)&&l.delete(o)}function RF(){vp=!1,gi!==null&&lc(gi)&&(gi=null),Ei!==null&&lc(Ei)&&(Ei=null),yi!==null&&lc(yi)&&(yi=null),za.forEach($x),$a.forEach($x)}function qa(i,o){i.blockedOn===o&&(i.blockedOn=null,vp||(vp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,RF)))}function Ya(i){function o(E){return qa(E,i)}if(0<uc.length){qa(uc[0],i);for(var l=1;l<uc.length;l++){var h=uc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(gi!==null&&qa(gi,i),Ei!==null&&qa(Ei,i),yi!==null&&qa(yi,i),za.forEach(o),$a.forEach(o),l=0;l<Ti.length;l++)h=Ti[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ti.length&&(l=Ti[0],l.blockedOn===null);)zx(l),l.blockedOn===null&&Ti.shift()}var To=j.ReactCurrentBatchConfig,cc=!0;function LF(i,o,l,h){var E=lt,T=To.transition;To.transition=null;try{lt=1,Ap(i,o,l,h)}finally{lt=E,To.transition=T}}function DF(i,o,l,h){var E=lt,T=To.transition;To.transition=null;try{lt=4,Ap(i,o,l,h)}finally{lt=E,To.transition=T}}function Ap(i,o,l,h){if(cc){var E=Np(i,o,l,h);if(E===null)Vp(i,o,h,dc,l),jx(i,h);else if(PF(E,i,o,l,h))h.stopPropagation();else if(jx(i,h),o&4&&-1<IF.indexOf(i)){for(;E!==null;){var T=iu(E);if(T!==null&&Fx(T),T=Np(i,o,l,h),T===null&&Vp(i,o,h,dc,l),T===E)break;E=T}E!==null&&h.stopPropagation()}else Vp(i,o,h,null,l)}}var dc=null;function Np(i,o,l,h){if(dc=null,i=mp(h),i=hs(i),i!==null)if(o=fs(i),o===null)i=null;else if(l=o.tag,l===13){if(i=Nx(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return dc=i,null}function Vx(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(_F()){case bp:return 1;case Rx:return 4;case rc:case wF:return 16;case Lx:return 536870912;default:return 16}default:return 16}}var bi=null,kp=null,fc=null;function qx(){if(fc)return fc;var i,o=kp,l=o.length,h,E="value"in bi?bi.value:bi.textContent,T=E.length;for(i=0;i<l&&o[i]===E[i];i++);var S=l-i;for(h=1;h<=S&&o[l-h]===E[T-h];h++);return fc=E.slice(i,1<h?1-h:void 0)}function hc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function pc(){return!0}function Yx(){return!1}function Un(i){function o(l,h,E,T,S){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=S,this.currentTarget=null;for(var M in i)i.hasOwnProperty(M)&&(l=i[M],this[M]=l?l(T):T[M]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?pc:Yx,this.isPropagationStopped=Yx,this}return N(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=pc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=pc)},persist:function(){},isPersistent:pc}),o}var bo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cp=Un(bo),Wa=N({},bo,{view:0,detail:0}),MF=Un(Wa),Op,Ip,Ga,mc=N({},Wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rp,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!==Ga&&(Ga&&i.type==="mousemove"?(Op=i.screenX-Ga.screenX,Ip=i.screenY-Ga.screenY):Ip=Op=0,Ga=i),Op)},movementY:function(i){return"movementY"in i?i.movementY:Ip}}),Wx=Un(mc),FF=N({},mc,{dataTransfer:0}),BF=Un(FF),UF=N({},Wa,{relatedTarget:0}),Pp=Un(UF),HF=N({},bo,{animationName:0,elapsedTime:0,pseudoElement:0}),jF=Un(HF),zF=N({},bo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),$F=Un(zF),VF=N({},bo,{data:0}),Gx=Un(VF),qF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},YF={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"},WF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GF(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=WF[i])?!!o[i]:!1}function Rp(){return GF}var XF=N({},Wa,{key:function(i){if(i.key){var o=qF[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=hc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?YF[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rp,charCode:function(i){return i.type==="keypress"?hc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?hc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),QF=Un(XF),KF=N({},mc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xx=Un(KF),JF=N({},Wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rp}),ZF=Un(JF),eB=N({},bo,{propertyName:0,elapsedTime:0,pseudoElement:0}),tB=Un(eB),nB=N({},mc,{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}),rB=Un(nB),iB=[9,13,27,32],Lp=c&&"CompositionEvent"in window,Xa=null;c&&"documentMode"in document&&(Xa=document.documentMode);var sB=c&&"TextEvent"in window&&!Xa,Qx=c&&(!Lp||Xa&&8<Xa&&11>=Xa),Kx=" ",Jx=!1;function Zx(i,o){switch(i){case"keyup":return iB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function e_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var xo=!1;function oB(i,o){switch(i){case"compositionend":return e_(o);case"keypress":return o.which!==32?null:(Jx=!0,Kx);case"textInput":return i=o.data,i===Kx&&Jx?null:i;default:return null}}function aB(i,o){if(xo)return i==="compositionend"||!Lp&&Zx(i,o)?(i=qx(),fc=kp=bi=null,xo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Qx&&o.locale!=="ko"?null:o.data;default:return null}}var uB={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 t_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!uB[i.type]:o==="textarea"}function n_(i,o,l,h){_x(h),o=bc(o,"onChange"),0<o.length&&(l=new Cp("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var Qa=null,Ka=null;function lB(i){b_(i,0)}function gc(i){var o=Ao(i);if(Dt(o))return i}function cB(i,o){if(i==="change")return o}var r_=!1;if(c){var Dp;if(c){var Mp="oninput"in document;if(!Mp){var i_=document.createElement("div");i_.setAttribute("oninput","return;"),Mp=typeof i_.oninput=="function"}Dp=Mp}else Dp=!1;r_=Dp&&(!document.documentMode||9<document.documentMode)}function s_(){Qa&&(Qa.detachEvent("onpropertychange",o_),Ka=Qa=null)}function o_(i){if(i.propertyName==="value"&&gc(Ka)){var o=[];n_(o,Ka,i,mp(i)),Ax(lB,o)}}function dB(i,o,l){i==="focusin"?(s_(),Qa=o,Ka=l,Qa.attachEvent("onpropertychange",o_)):i==="focusout"&&s_()}function fB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return gc(Ka)}function hB(i,o){if(i==="click")return gc(o)}function pB(i,o){if(i==="input"||i==="change")return gc(o)}function mB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var dr=typeof Object.is=="function"?Object.is:mB;function Ja(i,o){if(dr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),h=Object.keys(o);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(o,E)||!dr(i[E],o[E]))return!1}return!0}function a_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function u_(i,o){var l=a_(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=o&&h>=o)return{node:l,offset:o-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=a_(l)}}function l_(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?l_(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function c_(){for(var i=window,o=An();o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=o.contentWindow;else break;o=An(i.document)}return o}function Fp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function gB(i){var o=c_(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&l_(l.ownerDocument.documentElement,l)){if(h!==null&&Fp(l)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(i,l.value.length);else if(i=(o=l.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=u_(l,T);var S=u_(l,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),T>h?(i.addRange(o),i.extend(S.node,S.offset)):(o.setEnd(S.node,S.offset),i.addRange(o)))}}for(o=[],i=l;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<o.length;l++)i=o[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var EB=c&&"documentMode"in document&&11>=document.documentMode,_o=null,Bp=null,Za=null,Up=!1;function d_(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Up||_o==null||_o!==An(h)||(h=_o,"selectionStart"in h&&Fp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Za&&Ja(Za,h)||(Za=h,h=bc(Bp,"onSelect"),0<h.length&&(o=new Cp("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=_o)))}function Ec(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var wo={animationend:Ec("Animation","AnimationEnd"),animationiteration:Ec("Animation","AnimationIteration"),animationstart:Ec("Animation","AnimationStart"),transitionend:Ec("Transition","TransitionEnd")},Hp={},f_={};c&&(f_=document.createElement("div").style,"AnimationEvent"in window||(delete wo.animationend.animation,delete wo.animationiteration.animation,delete wo.animationstart.animation),"TransitionEvent"in window||delete wo.transitionend.transition);function yc(i){if(Hp[i])return Hp[i];if(!wo[i])return i;var o=wo[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in f_)return Hp[i]=o[l];return i}var h_=yc("animationend"),p_=yc("animationiteration"),m_=yc("animationstart"),g_=yc("transitionend"),E_=new Map,y_="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 xi(i,o){E_.set(i,o),a(o,[i])}for(var jp=0;jp<y_.length;jp++){var zp=y_[jp],yB=zp.toLowerCase(),TB=zp[0].toUpperCase()+zp.slice(1);xi(yB,"on"+TB)}xi(h_,"onAnimationEnd"),xi(p_,"onAnimationIteration"),xi(m_,"onAnimationStart"),xi("dblclick","onDoubleClick"),xi("focusin","onFocus"),xi("focusout","onBlur"),xi(g_,"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 eu="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(" "),bB=new Set("cancel close invalid load scroll toggle".split(" ").concat(eu));function T_(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,yF(h,o,void 0,i),i.currentTarget=null}function b_(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],E=h.event;h=h.listeners;e:{var T=void 0;if(o)for(var S=h.length-1;0<=S;S--){var M=h[S],z=M.instance,te=M.currentTarget;if(M=M.listener,z!==T&&E.isPropagationStopped())break e;T_(E,M,te),T=z}else for(S=0;S<h.length;S++){if(M=h[S],z=M.instance,te=M.currentTarget,M=M.listener,z!==T&&E.isPropagationStopped())break e;T_(E,M,te),T=z}}}if(nc)throw i=Tp,nc=!1,Tp=null,i}function yt(i,o){var l=o[Qp];l===void 0&&(l=o[Qp]=new Set);var h=i+"__bubble";l.has(h)||(x_(o,i,2,!1),l.add(h))}function $p(i,o,l){var h=0;o&&(h|=4),x_(l,i,h,o)}var Tc="_reactListening"+Math.random().toString(36).slice(2);function tu(i){if(!i[Tc]){i[Tc]=!0,r.forEach(function(l){l!=="selectionchange"&&(bB.has(l)||$p(l,!1,i),$p(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Tc]||(o[Tc]=!0,$p("selectionchange",!1,o))}}function x_(i,o,l,h){switch(Vx(o)){case 1:var E=LF;break;case 4:E=DF;break;default:E=Ap}l=E.bind(null,o,l,i),E=void 0,!yp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,l,{capture:!0,passive:E}):i.addEventListener(o,l,!0):E!==void 0?i.addEventListener(o,l,{passive:E}):i.addEventListener(o,l,!1)}function Vp(i,o,l,h,E){var T=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var M=h.stateNode.containerInfo;if(M===E||M.nodeType===8&&M.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var z=S.tag;if((z===3||z===4)&&(z=S.stateNode.containerInfo,z===E||z.nodeType===8&&z.parentNode===E))return;S=S.return}for(;M!==null;){if(S=hs(M),S===null)return;if(z=S.tag,z===5||z===6){h=T=S;continue e}M=M.parentNode}}h=h.return}Ax(function(){var te=T,ye=mp(l),be=[];e:{var pe=E_.get(i);if(pe!==void 0){var Oe=Cp,Pe=i;switch(i){case"keypress":if(hc(l)===0)break e;case"keydown":case"keyup":Oe=QF;break;case"focusin":Pe="focus",Oe=Pp;break;case"focusout":Pe="blur",Oe=Pp;break;case"beforeblur":case"afterblur":Oe=Pp;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":Oe=Wx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=BF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=ZF;break;case h_:case p_:case m_:Oe=jF;break;case g_:Oe=tB;break;case"scroll":Oe=MF;break;case"wheel":Oe=rB;break;case"copy":case"cut":case"paste":Oe=$F;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=Xx}var Re=(o&4)!==0,It=!Re&&i==="scroll",X=Re?pe!==null?pe+"Capture":null:pe;Re=[];for(var V=te,J;V!==null;){J=V;var _e=J.stateNode;if(J.tag===5&&_e!==null&&(J=_e,X!==null&&(_e=Fa(V,X),_e!=null&&Re.push(nu(V,_e,J)))),It)break;V=V.return}0<Re.length&&(pe=new Oe(pe,Pe,null,l,ye),be.push({event:pe,listeners:Re}))}}if((o&7)===0){e:{if(pe=i==="mouseover"||i==="pointerover",Oe=i==="mouseout"||i==="pointerout",pe&&l!==Bn&&(Pe=l.relatedTarget||l.fromElement)&&(hs(Pe)||Pe[Wr]))break e;if((Oe||pe)&&(pe=ye.window===ye?ye:(pe=ye.ownerDocument)?pe.defaultView||pe.parentWindow:window,Oe?(Pe=l.relatedTarget||l.toElement,Oe=te,Pe=Pe?hs(Pe):null,Pe!==null&&(It=fs(Pe),Pe!==It||Pe.tag!==5&&Pe.tag!==6)&&(Pe=null)):(Oe=null,Pe=te),Oe!==Pe)){if(Re=Wx,_e="onMouseLeave",X="onMouseEnter",V="mouse",(i==="pointerout"||i==="pointerover")&&(Re=Xx,_e="onPointerLeave",X="onPointerEnter",V="pointer"),It=Oe==null?pe:Ao(Oe),J=Pe==null?pe:Ao(Pe),pe=new Re(_e,V+"leave",Oe,l,ye),pe.target=It,pe.relatedTarget=J,_e=null,hs(ye)===te&&(Re=new Re(X,V+"enter",Pe,l,ye),Re.target=J,Re.relatedTarget=It,_e=Re),It=_e,Oe&&Pe)t:{for(Re=Oe,X=Pe,V=0,J=Re;J;J=So(J))V++;for(J=0,_e=X;_e;_e=So(_e))J++;for(;0<V-J;)Re=So(Re),V--;for(;0<J-V;)X=So(X),J--;for(;V--;){if(Re===X||X!==null&&Re===X.alternate)break t;Re=So(Re),X=So(X)}Re=null}else Re=null;Oe!==null&&__(be,pe,Oe,Re,!1),Pe!==null&&It!==null&&__(be,It,Pe,Re,!0)}}e:{if(pe=te?Ao(te):window,Oe=pe.nodeName&&pe.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&pe.type==="file")var De=cB;else if(t_(pe))if(r_)De=pB;else{De=fB;var ze=dB}else(Oe=pe.nodeName)&&Oe.toLowerCase()==="input"&&(pe.type==="checkbox"||pe.type==="radio")&&(De=hB);if(De&&(De=De(i,te))){n_(be,De,l,ye);break e}ze&&ze(i,pe,te),i==="focusout"&&(ze=pe._wrapperState)&&ze.controlled&&pe.type==="number"&&je(pe,"number",pe.value)}switch(ze=te?Ao(te):window,i){case"focusin":(t_(ze)||ze.contentEditable==="true")&&(_o=ze,Bp=te,Za=null);break;case"focusout":Za=Bp=_o=null;break;case"mousedown":Up=!0;break;case"contextmenu":case"mouseup":case"dragend":Up=!1,d_(be,l,ye);break;case"selectionchange":if(EB)break;case"keydown":case"keyup":d_(be,l,ye)}var $e;if(Lp)e:{switch(i){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else xo?Zx(i,l)&&(Ye="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ye="onCompositionStart");Ye&&(Qx&&l.locale!=="ko"&&(xo||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&xo&&($e=qx()):(bi=ye,kp="value"in bi?bi.value:bi.textContent,xo=!0)),ze=bc(te,Ye),0<ze.length&&(Ye=new Gx(Ye,i,null,l,ye),be.push({event:Ye,listeners:ze}),$e?Ye.data=$e:($e=e_(l),$e!==null&&(Ye.data=$e)))),($e=sB?oB(i,l):aB(i,l))&&(te=bc(te,"onBeforeInput"),0<te.length&&(ye=new Gx("onBeforeInput","beforeinput",null,l,ye),be.push({event:ye,listeners:te}),ye.data=$e))}b_(be,o)})}function nu(i,o,l){return{instance:i,listener:o,currentTarget:l}}function bc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=Fa(i,l),T!=null&&h.unshift(nu(i,T,E)),T=Fa(i,o),T!=null&&h.push(nu(i,T,E))),i=i.return}return h}function So(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function __(i,o,l,h,E){for(var T=o._reactName,S=[];l!==null&&l!==h;){var M=l,z=M.alternate,te=M.stateNode;if(z!==null&&z===h)break;M.tag===5&&te!==null&&(M=te,E?(z=Fa(l,T),z!=null&&S.unshift(nu(l,z,M))):E||(z=Fa(l,T),z!=null&&S.push(nu(l,z,M)))),l=l.return}S.length!==0&&i.push({event:o,listeners:S})}var xB=/\r\n?/g,_B=/\u0000|\uFFFD/g;function w_(i){return(typeof i=="string"?i:""+i).replace(xB,`
21
+ `).replace(_B,"")}function xc(i,o,l){if(o=w_(o),w_(i)!==o&&l)throw Error(n(425))}function _c(){}var qp=null,Yp=null;function Wp(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Gp=typeof setTimeout=="function"?setTimeout:void 0,wB=typeof clearTimeout=="function"?clearTimeout:void 0,S_=typeof Promise=="function"?Promise:void 0,SB=typeof queueMicrotask=="function"?queueMicrotask:typeof S_!="undefined"?function(i){return S_.resolve(null).then(i).catch(vB)}:Gp;function vB(i){setTimeout(function(){throw i})}function Xp(i,o){var l=o,h=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(h===0){i.removeChild(E),Ya(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);Ya(o)}function _i(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function v_(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return i;o--}else l==="/$"&&o++}i=i.previousSibling}return null}var vo=Math.random().toString(36).slice(2),Rr="__reactFiber$"+vo,ru="__reactProps$"+vo,Wr="__reactContainer$"+vo,Qp="__reactEvents$"+vo,AB="__reactListeners$"+vo,NB="__reactHandles$"+vo;function hs(i){var o=i[Rr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[Wr]||l[Rr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=v_(i);i!==null;){if(l=i[Rr])return l;i=v_(i)}return o}i=l,l=i.parentNode}return null}function iu(i){return i=i[Rr]||i[Wr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Ao(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function wc(i){return i[ru]||null}var Kp=[],No=-1;function wi(i){return{current:i}}function Tt(i){0>No||(i.current=Kp[No],Kp[No]=null,No--)}function mt(i,o){No++,Kp[No]=i.current,i.current=o}var Si={},un=wi(Si),kn=wi(!1),ps=Si;function ko(i,o){var l=i.type.contextTypes;if(!l)return Si;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in l)E[T]=o[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Cn(i){return i=i.childContextTypes,i!=null}function Sc(){Tt(kn),Tt(un)}function A_(i,o,l){if(un.current!==Si)throw Error(n(168));mt(un,o),mt(kn,l)}function N_(i,o,l){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Le(i)||"Unknown",E));return N({},l,h)}function vc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Si,ps=un.current,mt(un,i),mt(kn,kn.current),!0}function k_(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=N_(i,o,ps),h.__reactInternalMemoizedMergedChildContext=i,Tt(kn),Tt(un),mt(un,i)):Tt(kn),mt(kn,l)}var Gr=null,Ac=!1,Jp=!1;function C_(i){Gr===null?Gr=[i]:Gr.push(i)}function kB(i){Ac=!0,C_(i)}function vi(){if(!Jp&&Gr!==null){Jp=!0;var i=0,o=lt;try{var l=Gr;for(lt=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}Gr=null,Ac=!1}catch(E){throw Gr!==null&&(Gr=Gr.slice(i+1)),Ix(bp,vi),E}finally{lt=o,Jp=!1}}return null}var Co=[],Oo=0,Nc=null,kc=0,Gn=[],Xn=0,ms=null,Xr=1,Qr="";function gs(i,o){Co[Oo++]=kc,Co[Oo++]=Nc,Nc=i,kc=o}function O_(i,o,l){Gn[Xn++]=Xr,Gn[Xn++]=Qr,Gn[Xn++]=ms,ms=i;var h=Xr;i=Qr;var E=32-cr(h)-1;h&=~(1<<E),l+=1;var T=32-cr(o)+E;if(30<T){var S=E-E%5;T=(h&(1<<S)-1).toString(32),h>>=S,E-=S,Xr=1<<32-cr(o)+E|l<<E|h,Qr=T+i}else Xr=1<<T|l<<E|h,Qr=i}function Zp(i){i.return!==null&&(gs(i,1),O_(i,1,0))}function em(i){for(;i===Nc;)Nc=Co[--Oo],Co[Oo]=null,kc=Co[--Oo],Co[Oo]=null;for(;i===ms;)ms=Gn[--Xn],Gn[Xn]=null,Qr=Gn[--Xn],Gn[Xn]=null,Xr=Gn[--Xn],Gn[Xn]=null}var Hn=null,jn=null,_t=!1,fr=null;function I_(i,o){var l=Zn(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=i,o=i.deletions,o===null?(i.deletions=[l],i.flags|=16):o.push(l)}function P_(i,o){switch(i.tag){case 5:var l=i.type;return o=o.nodeType!==1||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Hn=i,jn=_i(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Hn=i,jn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=ms!==null?{id:Xr,overflow:Qr}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=Zn(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,Hn=i,jn=null,!0):!1;default:return!1}}function tm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function nm(i){if(_t){var o=jn;if(o){var l=o;if(!P_(i,o)){if(tm(i))throw Error(n(418));o=_i(l.nextSibling);var h=Hn;o&&P_(i,o)?I_(h,l):(i.flags=i.flags&-4097|2,_t=!1,Hn=i)}}else{if(tm(i))throw Error(n(418));i.flags=i.flags&-4097|2,_t=!1,Hn=i}}}function R_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Hn=i}function Cc(i){if(i!==Hn)return!1;if(!_t)return R_(i),_t=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Wp(i.type,i.memoizedProps)),o&&(o=jn)){if(tm(i))throw L_(),Error(n(418));for(;o;)I_(i,o),o=_i(o.nextSibling)}if(R_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(o===0){jn=_i(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}jn=null}}else jn=Hn?_i(i.stateNode.nextSibling):null;return!0}function L_(){for(var i=jn;i;)i=_i(i.nextSibling)}function Io(){jn=Hn=null,_t=!1}function rm(i){fr===null?fr=[i]:fr.push(i)}var CB=j.ReactCurrentBatchConfig;function su(i,o,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 h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,T=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===T?o.ref:(o=function(S){var M=E.refs;S===null?delete M[T]:M[T]=S},o._stringRef=T,o)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Oc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function D_(i){var o=i._init;return o(i._payload)}function M_(i){function o(X,V){if(i){var J=X.deletions;J===null?(X.deletions=[V],X.flags|=16):J.push(V)}}function l(X,V){if(!i)return null;for(;V!==null;)o(X,V),V=V.sibling;return null}function h(X,V){for(X=new Map;V!==null;)V.key!==null?X.set(V.key,V):X.set(V.index,V),V=V.sibling;return X}function E(X,V){return X=Ri(X,V),X.index=0,X.sibling=null,X}function T(X,V,J){return X.index=J,i?(J=X.alternate,J!==null?(J=J.index,J<V?(X.flags|=2,V):J):(X.flags|=2,V)):(X.flags|=1048576,V)}function S(X){return i&&X.alternate===null&&(X.flags|=2),X}function M(X,V,J,_e){return V===null||V.tag!==6?(V=Gm(J,X.mode,_e),V.return=X,V):(V=E(V,J),V.return=X,V)}function z(X,V,J,_e){var De=J.type;return De===W?ye(X,V,J.props.children,_e,J.key):V!==null&&(V.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Se&&D_(De)===V.type)?(_e=E(V,J.props),_e.ref=su(X,V,J),_e.return=X,_e):(_e=ed(J.type,J.key,J.props,null,X.mode,_e),_e.ref=su(X,V,J),_e.return=X,_e)}function te(X,V,J,_e){return V===null||V.tag!==4||V.stateNode.containerInfo!==J.containerInfo||V.stateNode.implementation!==J.implementation?(V=Xm(J,X.mode,_e),V.return=X,V):(V=E(V,J.children||[]),V.return=X,V)}function ye(X,V,J,_e,De){return V===null||V.tag!==7?(V=Ss(J,X.mode,_e,De),V.return=X,V):(V=E(V,J),V.return=X,V)}function be(X,V,J){if(typeof V=="string"&&V!==""||typeof V=="number")return V=Gm(""+V,X.mode,J),V.return=X,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case G:return J=ed(V.type,V.key,V.props,null,X.mode,J),J.ref=su(X,null,V),J.return=X,J;case L:return V=Xm(V,X.mode,J),V.return=X,V;case Se:var _e=V._init;return be(X,_e(V._payload),J)}if(Qe(V)||ae(V))return V=Ss(V,X.mode,J,null),V.return=X,V;Oc(X,V)}return null}function pe(X,V,J,_e){var De=V!==null?V.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return De!==null?null:M(X,V,""+J,_e);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case G:return J.key===De?z(X,V,J,_e):null;case L:return J.key===De?te(X,V,J,_e):null;case Se:return De=J._init,pe(X,V,De(J._payload),_e)}if(Qe(J)||ae(J))return De!==null?null:ye(X,V,J,_e,null);Oc(X,J)}return null}function Oe(X,V,J,_e,De){if(typeof _e=="string"&&_e!==""||typeof _e=="number")return X=X.get(J)||null,M(V,X,""+_e,De);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case G:return X=X.get(_e.key===null?J:_e.key)||null,z(V,X,_e,De);case L:return X=X.get(_e.key===null?J:_e.key)||null,te(V,X,_e,De);case Se:var ze=_e._init;return Oe(X,V,J,ze(_e._payload),De)}if(Qe(_e)||ae(_e))return X=X.get(J)||null,ye(V,X,_e,De,null);Oc(V,_e)}return null}function Pe(X,V,J,_e){for(var De=null,ze=null,$e=V,Ye=V=0,Gt=null;$e!==null&&Ye<J.length;Ye++){$e.index>Ye?(Gt=$e,$e=null):Gt=$e.sibling;var st=pe(X,$e,J[Ye],_e);if(st===null){$e===null&&($e=Gt);break}i&&$e&&st.alternate===null&&o(X,$e),V=T(st,V,Ye),ze===null?De=st:ze.sibling=st,ze=st,$e=Gt}if(Ye===J.length)return l(X,$e),_t&&gs(X,Ye),De;if($e===null){for(;Ye<J.length;Ye++)$e=be(X,J[Ye],_e),$e!==null&&(V=T($e,V,Ye),ze===null?De=$e:ze.sibling=$e,ze=$e);return _t&&gs(X,Ye),De}for($e=h(X,$e);Ye<J.length;Ye++)Gt=Oe($e,X,Ye,J[Ye],_e),Gt!==null&&(i&&Gt.alternate!==null&&$e.delete(Gt.key===null?Ye:Gt.key),V=T(Gt,V,Ye),ze===null?De=Gt:ze.sibling=Gt,ze=Gt);return i&&$e.forEach(function(Li){return o(X,Li)}),_t&&gs(X,Ye),De}function Re(X,V,J,_e){var De=ae(J);if(typeof De!="function")throw Error(n(150));if(J=De.call(J),J==null)throw Error(n(151));for(var ze=De=null,$e=V,Ye=V=0,Gt=null,st=J.next();$e!==null&&!st.done;Ye++,st=J.next()){$e.index>Ye?(Gt=$e,$e=null):Gt=$e.sibling;var Li=pe(X,$e,st.value,_e);if(Li===null){$e===null&&($e=Gt);break}i&&$e&&Li.alternate===null&&o(X,$e),V=T(Li,V,Ye),ze===null?De=Li:ze.sibling=Li,ze=Li,$e=Gt}if(st.done)return l(X,$e),_t&&gs(X,Ye),De;if($e===null){for(;!st.done;Ye++,st=J.next())st=be(X,st.value,_e),st!==null&&(V=T(st,V,Ye),ze===null?De=st:ze.sibling=st,ze=st);return _t&&gs(X,Ye),De}for($e=h(X,$e);!st.done;Ye++,st=J.next())st=Oe($e,X,Ye,st.value,_e),st!==null&&(i&&st.alternate!==null&&$e.delete(st.key===null?Ye:st.key),V=T(st,V,Ye),ze===null?De=st:ze.sibling=st,ze=st);return i&&$e.forEach(function(u7){return o(X,u7)}),_t&&gs(X,Ye),De}function It(X,V,J,_e){if(typeof J=="object"&&J!==null&&J.type===W&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case G:e:{for(var De=J.key,ze=V;ze!==null;){if(ze.key===De){if(De=J.type,De===W){if(ze.tag===7){l(X,ze.sibling),V=E(ze,J.props.children),V.return=X,X=V;break e}}else if(ze.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Se&&D_(De)===ze.type){l(X,ze.sibling),V=E(ze,J.props),V.ref=su(X,ze,J),V.return=X,X=V;break e}l(X,ze);break}else o(X,ze);ze=ze.sibling}J.type===W?(V=Ss(J.props.children,X.mode,_e,J.key),V.return=X,X=V):(_e=ed(J.type,J.key,J.props,null,X.mode,_e),_e.ref=su(X,V,J),_e.return=X,X=_e)}return S(X);case L:e:{for(ze=J.key;V!==null;){if(V.key===ze)if(V.tag===4&&V.stateNode.containerInfo===J.containerInfo&&V.stateNode.implementation===J.implementation){l(X,V.sibling),V=E(V,J.children||[]),V.return=X,X=V;break e}else{l(X,V);break}else o(X,V);V=V.sibling}V=Xm(J,X.mode,_e),V.return=X,X=V}return S(X);case Se:return ze=J._init,It(X,V,ze(J._payload),_e)}if(Qe(J))return Pe(X,V,J,_e);if(ae(J))return Re(X,V,J,_e);Oc(X,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,V!==null&&V.tag===6?(l(X,V.sibling),V=E(V,J),V.return=X,X=V):(l(X,V),V=Gm(J,X.mode,_e),V.return=X,X=V),S(X)):l(X,V)}return It}var Po=M_(!0),F_=M_(!1),Ic=wi(null),Pc=null,Ro=null,im=null;function sm(){im=Ro=Pc=null}function om(i){var o=Ic.current;Tt(Ic),i._currentValue=o}function am(i,o,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===l)break;i=i.return}}function Lo(i,o){Pc=i,im=Ro=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(On=!0),i.firstContext=null)}function Qn(i){var o=i._currentValue;if(im!==i)if(i={context:i,memoizedValue:o,next:null},Ro===null){if(Pc===null)throw Error(n(308));Ro=i,Pc.dependencies={lanes:0,firstContext:i}}else Ro=Ro.next=i;return o}var Es=null;function um(i){Es===null?Es=[i]:Es.push(i)}function B_(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,um(o)):(l.next=E.next,E.next=l),o.interleaved=l,Kr(i,h)}function Kr(i,o){i.lanes|=o;var l=i.alternate;for(l!==null&&(l.lanes|=o),l=i,i=i.return;i!==null;)i.childLanes|=o,l=i.alternate,l!==null&&(l.childLanes|=o),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Ai=!1;function lm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function U_(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Jr(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Ni(i,o,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,Kr(i,l)}return E=h.interleaved,E===null?(o.next=o,um(h)):(o.next=E.next,E.next=o),h.interleaved=o,Kr(i,l)}function Rc(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,wp(i,l)}}function H_(i,o){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,T=null;if(l=l.firstBaseUpdate,l!==null){do{var S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};T===null?E=T=S:T=T.next=S,l=l.next}while(l!==null);T===null?E=T=o:T=T.next=o}else E=T=o;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}function Lc(i,o,l,h){var E=i.updateQueue;Ai=!1;var T=E.firstBaseUpdate,S=E.lastBaseUpdate,M=E.shared.pending;if(M!==null){E.shared.pending=null;var z=M,te=z.next;z.next=null,S===null?T=te:S.next=te,S=z;var ye=i.alternate;ye!==null&&(ye=ye.updateQueue,M=ye.lastBaseUpdate,M!==S&&(M===null?ye.firstBaseUpdate=te:M.next=te,ye.lastBaseUpdate=z))}if(T!==null){var be=E.baseState;S=0,ye=te=z=null,M=T;do{var pe=M.lane,Oe=M.eventTime;if((h&pe)===pe){ye!==null&&(ye=ye.next={eventTime:Oe,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var Pe=i,Re=M;switch(pe=o,Oe=l,Re.tag){case 1:if(Pe=Re.payload,typeof Pe=="function"){be=Pe.call(Oe,be,pe);break e}be=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Re.payload,pe=typeof Pe=="function"?Pe.call(Oe,be,pe):Pe,pe==null)break e;be=N({},be,pe);break e;case 2:Ai=!0}}M.callback!==null&&M.lane!==0&&(i.flags|=64,pe=E.effects,pe===null?E.effects=[M]:pe.push(M))}else Oe={eventTime:Oe,lane:pe,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ye===null?(te=ye=Oe,z=be):ye=ye.next=Oe,S|=pe;if(M=M.next,M===null){if(M=E.shared.pending,M===null)break;pe=M,M=pe.next,pe.next=null,E.lastBaseUpdate=pe,E.shared.pending=null}}while(!0);if(ye===null&&(z=be),E.baseState=z,E.firstBaseUpdate=te,E.lastBaseUpdate=ye,o=E.shared.interleaved,o!==null){E=o;do S|=E.lane,E=E.next;while(E!==o)}else T===null&&(E.shared.lanes=0);bs|=S,i.lanes=S,i.memoizedState=be}}function j_(i,o,l){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var ou={},Lr=wi(ou),au=wi(ou),uu=wi(ou);function ys(i){if(i===ou)throw Error(n(174));return i}function cm(i,o){switch(mt(uu,o),mt(au,i),mt(Lr,ou),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:we(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=we(o,i)}Tt(Lr),mt(Lr,o)}function Do(){Tt(Lr),Tt(au),Tt(uu)}function z_(i){ys(uu.current);var o=ys(Lr.current),l=we(o,i.type);o!==l&&(mt(au,i),mt(Lr,l))}function dm(i){au.current===i&&(Tt(Lr),Tt(au))}var wt=wi(0);function Dc(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var fm=[];function hm(){for(var i=0;i<fm.length;i++)fm[i]._workInProgressVersionPrimary=null;fm.length=0}var Mc=j.ReactCurrentDispatcher,pm=j.ReactCurrentBatchConfig,Ts=0,St=null,Ut=null,Yt=null,Fc=!1,lu=!1,cu=0,OB=0;function ln(){throw Error(n(321))}function mm(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!dr(i[l],o[l]))return!1;return!0}function gm(i,o,l,h,E,T){if(Ts=T,St=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Mc.current=i===null||i.memoizedState===null?LB:DB,i=l(h,E),lu){T=0;do{if(lu=!1,cu=0,25<=T)throw Error(n(301));T+=1,Yt=Ut=null,o.updateQueue=null,Mc.current=MB,i=l(h,E)}while(lu)}if(Mc.current=Hc,o=Ut!==null&&Ut.next!==null,Ts=0,Yt=Ut=St=null,Fc=!1,o)throw Error(n(300));return i}function Em(){var i=cu!==0;return cu=0,i}function Dr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yt===null?St.memoizedState=Yt=i:Yt=Yt.next=i,Yt}function Kn(){if(Ut===null){var i=St.alternate;i=i!==null?i.memoizedState:null}else i=Ut.next;var o=Yt===null?St.memoizedState:Yt.next;if(o!==null)Yt=o,Ut=i;else{if(i===null)throw Error(n(310));Ut=i,i={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},Yt===null?St.memoizedState=Yt=i:Yt=Yt.next=i}return Yt}function du(i,o){return typeof o=="function"?o(i):o}function ym(i){var o=Kn(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Ut,E=h.baseQueue,T=l.pending;if(T!==null){if(E!==null){var S=E.next;E.next=T.next,T.next=S}h.baseQueue=E=T,l.pending=null}if(E!==null){T=E.next,h=h.baseState;var M=S=null,z=null,te=T;do{var ye=te.lane;if((Ts&ye)===ye)z!==null&&(z=z.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),h=te.hasEagerState?te.eagerState:i(h,te.action);else{var be={lane:ye,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};z===null?(M=z=be,S=h):z=z.next=be,St.lanes|=ye,bs|=ye}te=te.next}while(te!==null&&te!==T);z===null?S=h:z.next=M,dr(h,o.memoizedState)||(On=!0),o.memoizedState=h,o.baseState=S,o.baseQueue=z,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do T=E.lane,St.lanes|=T,bs|=T,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function Tm(i){var o=Kn(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,T=o.memoizedState;if(E!==null){l.pending=null;var S=E=E.next;do T=i(T,S.action),S=S.next;while(S!==E);dr(T,o.memoizedState)||(On=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),l.lastRenderedState=T}return[T,h]}function $_(){}function V_(i,o){var l=St,h=Kn(),E=o(),T=!dr(h.memoizedState,E);if(T&&(h.memoizedState=E,On=!0),h=h.queue,bm(W_.bind(null,l,h,i),[i]),h.getSnapshot!==o||T||Yt!==null&&Yt.memoizedState.tag&1){if(l.flags|=2048,fu(9,Y_.bind(null,l,h,E,o),void 0,null),Wt===null)throw Error(n(349));(Ts&30)!==0||q_(l,o,E)}return E}function q_(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=St.updateQueue,o===null?(o={lastEffect:null,stores:null},St.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function Y_(i,o,l,h){o.value=l,o.getSnapshot=h,G_(o)&&X_(i)}function W_(i,o,l){return l(function(){G_(o)&&X_(i)})}function G_(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!dr(i,l)}catch(h){return!0}}function X_(i){var o=Kr(i,1);o!==null&&gr(o,i,1,-1)}function Q_(i){var o=Dr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:du,lastRenderedState:i},o.queue=i,i=i.dispatch=RB.bind(null,St,i),[o.memoizedState,i]}function fu(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=St.updateQueue,o===null?(o={lastEffect:null,stores:null},St.updateQueue=o,o.lastEffect=i.next=i):(l=o.lastEffect,l===null?o.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,o.lastEffect=i)),i}function K_(){return Kn().memoizedState}function Bc(i,o,l,h){var E=Dr();St.flags|=i,E.memoizedState=fu(1|o,l,void 0,h===void 0?null:h)}function Uc(i,o,l,h){var E=Kn();h=h===void 0?null:h;var T=void 0;if(Ut!==null){var S=Ut.memoizedState;if(T=S.destroy,h!==null&&mm(h,S.deps)){E.memoizedState=fu(o,l,T,h);return}}St.flags|=i,E.memoizedState=fu(1|o,l,T,h)}function J_(i,o){return Bc(8390656,8,i,o)}function bm(i,o){return Uc(2048,8,i,o)}function Z_(i,o){return Uc(4,2,i,o)}function ew(i,o){return Uc(4,4,i,o)}function tw(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function nw(i,o,l){return l=l!=null?l.concat([i]):null,Uc(4,4,tw.bind(null,o,i),l)}function xm(){}function rw(i,o){var l=Kn();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&mm(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function iw(i,o){var l=Kn();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&mm(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function sw(i,o,l){return(Ts&21)===0?(i.baseState&&(i.baseState=!1,On=!0),i.memoizedState=l):(dr(l,o)||(l=Dx(),St.lanes|=l,bs|=l,i.baseState=!0),o)}function IB(i,o){var l=lt;lt=l!==0&&4>l?l:4,i(!0);var h=pm.transition;pm.transition={};try{i(!1),o()}finally{lt=l,pm.transition=h}}function ow(){return Kn().memoizedState}function PB(i,o,l){var h=Ii(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},aw(i))uw(o,l);else if(l=B_(i,o,l,h),l!==null){var E=gn();gr(l,i,h,E),lw(l,o,h)}}function RB(i,o,l){var h=Ii(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(aw(i))uw(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var S=o.lastRenderedState,M=T(S,l);if(E.hasEagerState=!0,E.eagerState=M,dr(M,S)){var z=o.interleaved;z===null?(E.next=E,um(o)):(E.next=z.next,z.next=E),o.interleaved=E;return}}catch(te){}l=B_(i,o,E,h),l!==null&&(E=gn(),gr(l,i,h,E),lw(l,o,h))}}function aw(i){var o=i.alternate;return i===St||o!==null&&o===St}function uw(i,o){lu=Fc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function lw(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,wp(i,l)}}var Hc={readContext:Qn,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useInsertionEffect:ln,useLayoutEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useMutableSource:ln,useSyncExternalStore:ln,useId:ln,unstable_isNewReconciler:!1},LB={readContext:Qn,useCallback:function(i,o){return Dr().memoizedState=[i,o===void 0?null:o],i},useContext:Qn,useEffect:J_,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,Bc(4194308,4,tw.bind(null,o,i),l)},useLayoutEffect:function(i,o){return Bc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Bc(4,2,i,o)},useMemo:function(i,o){var l=Dr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Dr();return o=l!==void 0?l(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=PB.bind(null,St,i),[h.memoizedState,i]},useRef:function(i){var o=Dr();return i={current:i},o.memoizedState=i},useState:Q_,useDebugValue:xm,useDeferredValue:function(i){return Dr().memoizedState=i},useTransition:function(){var i=Q_(!1),o=i[0];return i=IB.bind(null,i[1]),Dr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=St,E=Dr();if(_t){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),Wt===null)throw Error(n(349));(Ts&30)!==0||q_(h,o,l)}E.memoizedState=l;var T={value:l,getSnapshot:o};return E.queue=T,J_(W_.bind(null,h,T,i),[i]),h.flags|=2048,fu(9,Y_.bind(null,h,T,l,o),void 0,null),l},useId:function(){var i=Dr(),o=Wt.identifierPrefix;if(_t){var l=Qr,h=Xr;l=(h&~(1<<32-cr(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=cu++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=OB++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},DB={readContext:Qn,useCallback:rw,useContext:Qn,useEffect:bm,useImperativeHandle:nw,useInsertionEffect:Z_,useLayoutEffect:ew,useMemo:iw,useReducer:ym,useRef:K_,useState:function(){return ym(du)},useDebugValue:xm,useDeferredValue:function(i){var o=Kn();return sw(o,Ut.memoizedState,i)},useTransition:function(){var i=ym(du)[0],o=Kn().memoizedState;return[i,o]},useMutableSource:$_,useSyncExternalStore:V_,useId:ow,unstable_isNewReconciler:!1},MB={readContext:Qn,useCallback:rw,useContext:Qn,useEffect:bm,useImperativeHandle:nw,useInsertionEffect:Z_,useLayoutEffect:ew,useMemo:iw,useReducer:Tm,useRef:K_,useState:function(){return Tm(du)},useDebugValue:xm,useDeferredValue:function(i){var o=Kn();return Ut===null?o.memoizedState=i:sw(o,Ut.memoizedState,i)},useTransition:function(){var i=Tm(du)[0],o=Kn().memoizedState;return[i,o]},useMutableSource:$_,useSyncExternalStore:V_,useId:ow,unstable_isNewReconciler:!1};function hr(i,o){if(i&&i.defaultProps){o=N({},o),i=i.defaultProps;for(var l in i)o[l]===void 0&&(o[l]=i[l]);return o}return o}function _m(i,o,l,h){o=i.memoizedState,l=l(h,o),l=l==null?o:N({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var jc={isMounted:function(i){return(i=i._reactInternals)?fs(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=gn(),E=Ii(i),T=Jr(h,E);T.payload=o,l!=null&&(T.callback=l),o=Ni(i,T,E),o!==null&&(gr(o,i,E,h),Rc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=gn(),E=Ii(i),T=Jr(h,E);T.tag=1,T.payload=o,l!=null&&(T.callback=l),o=Ni(i,T,E),o!==null&&(gr(o,i,E,h),Rc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=gn(),h=Ii(i),E=Jr(l,h);E.tag=2,o!=null&&(E.callback=o),o=Ni(i,E,h),o!==null&&(gr(o,i,h,l),Rc(o,i,h))}};function cw(i,o,l,h,E,T,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,S):o.prototype&&o.prototype.isPureReactComponent?!Ja(l,h)||!Ja(E,T):!0}function dw(i,o,l){var h=!1,E=Si,T=o.contextType;return typeof T=="object"&&T!==null?T=Qn(T):(E=Cn(o)?ps:un.current,h=o.contextTypes,T=(h=h!=null)?ko(i,E):Si),o=new o(l,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=jc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function fw(i,o,l,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,h),o.state!==i&&jc.enqueueReplaceState(o,o.state,null)}function wm(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},lm(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=Qn(T):(T=Cn(o)?ps:un.current,E.context=ko(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(_m(i,o,T,l),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&jc.enqueueReplaceState(E,E.state,null),Lc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Mo(i,o){try{var l="",h=o;do l+=Ce(h),h=h.return;while(h);var E=l}catch(T){E=`
22
+ Error generating stack: `+T.message+`
23
+ `+T.stack}return{value:i,source:o,stack:E,digest:null}}function Sm(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function vm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var FB=typeof WeakMap=="function"?WeakMap:Map;function hw(i,o,l){l=Jr(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){Gc||(Gc=!0,Hm=h),vm(i,o)},l}function pw(i,o,l){l=Jr(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;l.payload=function(){return h(E)},l.callback=function(){vm(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(l.callback=function(){vm(i,o),typeof h!="function"&&(Ci===null?Ci=new Set([this]):Ci.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})}),l}function mw(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new FB;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(l)||(E.add(l),i=KB.bind(null,i,o,l),o.then(i,i))}function gw(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function Ew(i,o,l,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=Jr(-1,1),o.tag=2,Ni(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var BB=j.ReactCurrentOwner,On=!1;function mn(i,o,l,h){o.child=i===null?F_(o,null,l,h):Po(o,i.child,l,h)}function yw(i,o,l,h,E){l=l.render;var T=o.ref;return Lo(o,E),h=gm(i,o,l,h,T,E),l=Em(),i!==null&&!On?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Zr(i,o,E)):(_t&&l&&Zp(o),o.flags|=1,mn(i,o,h,E),o.child)}function Tw(i,o,l,h,E){if(i===null){var T=l.type;return typeof T=="function"&&!Wm(T)&&T.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=T,bw(i,o,T,h,E)):(i=ed(l.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,(i.lanes&E)===0){var S=T.memoizedProps;if(l=l.compare,l=l!==null?l:Ja,l(S,h)&&i.ref===o.ref)return Zr(i,o,E)}return o.flags|=1,i=Ri(T,h),i.ref=o.ref,i.return=o,o.child=i}function bw(i,o,l,h,E){if(i!==null){var T=i.memoizedProps;if(Ja(T,h)&&i.ref===o.ref)if(On=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(On=!0);else return o.lanes=i.lanes,Zr(i,o,E)}return Am(i,o,l,h,E)}function xw(i,o,l){var h=o.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(Bo,zn),zn|=l;else{if((l&1073741824)===0)return i=T!==null?T.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,mt(Bo,zn),zn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:l,mt(Bo,zn),zn|=h}else T!==null?(h=T.baseLanes|l,o.memoizedState=null):h=l,mt(Bo,zn),zn|=h;return mn(i,o,E,l),o.child}function _w(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Am(i,o,l,h,E){var T=Cn(l)?ps:un.current;return T=ko(o,T),Lo(o,E),l=gm(i,o,l,h,T,E),h=Em(),i!==null&&!On?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Zr(i,o,E)):(_t&&h&&Zp(o),o.flags|=1,mn(i,o,l,E),o.child)}function ww(i,o,l,h,E){if(Cn(l)){var T=!0;vc(o)}else T=!1;if(Lo(o,E),o.stateNode===null)$c(i,o),dw(o,l,h),wm(o,l,h,E),h=!0;else if(i===null){var S=o.stateNode,M=o.memoizedProps;S.props=M;var z=S.context,te=l.contextType;typeof te=="object"&&te!==null?te=Qn(te):(te=Cn(l)?ps:un.current,te=ko(o,te));var ye=l.getDerivedStateFromProps,be=typeof ye=="function"||typeof S.getSnapshotBeforeUpdate=="function";be||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(M!==h||z!==te)&&fw(o,S,h,te),Ai=!1;var pe=o.memoizedState;S.state=pe,Lc(o,h,S,E),z=o.memoizedState,M!==h||pe!==z||kn.current||Ai?(typeof ye=="function"&&(_m(o,l,ye,h),z=o.memoizedState),(M=Ai||cw(o,l,M,h,pe,z,te))?(be||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=z),S.props=h,S.state=z,S.context=te,h=M):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{S=o.stateNode,U_(i,o),M=o.memoizedProps,te=o.type===o.elementType?M:hr(o.type,M),S.props=te,be=o.pendingProps,pe=S.context,z=l.contextType,typeof z=="object"&&z!==null?z=Qn(z):(z=Cn(l)?ps:un.current,z=ko(o,z));var Oe=l.getDerivedStateFromProps;(ye=typeof Oe=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(M!==be||pe!==z)&&fw(o,S,h,z),Ai=!1,pe=o.memoizedState,S.state=pe,Lc(o,h,S,E);var Pe=o.memoizedState;M!==be||pe!==Pe||kn.current||Ai?(typeof Oe=="function"&&(_m(o,l,Oe,h),Pe=o.memoizedState),(te=Ai||cw(o,l,te,h,pe,Pe,z)||!1)?(ye||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Pe,z),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Pe,z)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Pe),S.props=h,S.state=Pe,S.context=z,h=te):(typeof S.componentDidUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),h=!1)}return Nm(i,o,l,h,T,E)}function Nm(i,o,l,h,E,T){_w(i,o);var S=(o.flags&128)!==0;if(!h&&!S)return E&&k_(o,l,!1),Zr(i,o,T);h=o.stateNode,BB.current=o;var M=S&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&S?(o.child=Po(o,i.child,null,T),o.child=Po(o,null,M,T)):mn(i,o,M,T),o.memoizedState=h.state,E&&k_(o,l,!0),o.child}function Sw(i){var o=i.stateNode;o.pendingContext?A_(i,o.pendingContext,o.pendingContext!==o.context):o.context&&A_(i,o.context,!1),cm(i,o.containerInfo)}function vw(i,o,l,h,E){return Io(),rm(E),o.flags|=256,mn(i,o,l,h),o.child}var km={dehydrated:null,treeContext:null,retryLane:0};function Cm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Aw(i,o,l){var h=o.pendingProps,E=wt.current,T=!1,S=(o.flags&128)!==0,M;if((M=S)||(M=i!==null&&i.memoizedState===null?!1:(E&2)!==0),M?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),mt(wt,E&1),i===null)return nm(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(S=h.children,i=h.fallback,T?(h=o.mode,T=o.child,S={mode:"hidden",children:S},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=S):T=td(S,h,0,null),i=Ss(i,h,l,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Cm(l),o.memoizedState=km,i):Om(o,S));if(E=i.memoizedState,E!==null&&(M=E.dehydrated,M!==null))return UB(i,o,S,h,M,E,l);if(T){T=h.fallback,S=o.mode,E=i.child,M=E.sibling;var z={mode:"hidden",children:h.children};return(S&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=z,o.deletions=null):(h=Ri(E,z),h.subtreeFlags=E.subtreeFlags&14680064),M!==null?T=Ri(M,T):(T=Ss(T,S,l,null),T.flags|=2),T.return=o,h.return=o,h.sibling=T,o.child=h,h=T,T=o.child,S=i.child.memoizedState,S=S===null?Cm(l):{baseLanes:S.baseLanes|l,cachePool:null,transitions:S.transitions},T.memoizedState=S,T.childLanes=i.childLanes&~l,o.memoizedState=km,h}return T=i.child,i=T.sibling,h=Ri(T,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=l),h.return=o,h.sibling=null,i!==null&&(l=o.deletions,l===null?(o.deletions=[i],o.flags|=16):l.push(i)),o.child=h,o.memoizedState=null,h}function Om(i,o){return o=td({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function zc(i,o,l,h){return h!==null&&rm(h),Po(o,i.child,null,l),i=Om(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function UB(i,o,l,h,E,T,S){if(l)return o.flags&256?(o.flags&=-257,h=Sm(Error(n(422))),zc(i,o,S,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=td({mode:"visible",children:h.children},E,0,null),T=Ss(T,E,S,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&Po(o,i.child,null,S),o.child.memoizedState=Cm(S),o.memoizedState=km,T);if((o.mode&1)===0)return zc(i,o,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var M=h.dgst;return h=M,T=Error(n(419)),h=Sm(T,h,void 0),zc(i,o,S,h)}if(M=(S&i.childLanes)!==0,On||M){if(h=Wt,h!==null){switch(S&-S){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&(h.suspendedLanes|S))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,Kr(i,E),gr(h,i,E,-1))}return Ym(),h=Sm(Error(n(421))),zc(i,o,S,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=JB.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,jn=_i(E.nextSibling),Hn=o,_t=!0,fr=null,i!==null&&(Gn[Xn++]=Xr,Gn[Xn++]=Qr,Gn[Xn++]=ms,Xr=i.id,Qr=i.overflow,ms=o),o=Om(o,h.children),o.flags|=4096,o)}function Nw(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),am(i.return,o,l)}function Im(i,o,l,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=l,T.tailMode=E)}function kw(i,o,l){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(mn(i,o,h.children,l),h=wt.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Nw(i,l,o);else if(i.tag===19)Nw(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(mt(wt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(l=o.child,E=null;l!==null;)i=l.alternate,i!==null&&Dc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),Im(o,!1,E,l,T);break;case"backwards":for(l=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Dc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Im(o,!0,l,null,T);break;case"together":Im(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function $c(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function Zr(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),bs|=o.lanes,(l&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,l=Ri(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=Ri(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function HB(i,o,l){switch(o.tag){case 3:Sw(o),Io();break;case 5:z_(o);break;case 1:Cn(o.type)&&vc(o);break;case 4:cm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;mt(Ic,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(mt(wt,wt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?Aw(i,o,l):(mt(wt,wt.current&1),i=Zr(i,o,l),i!==null?i.sibling:null);mt(wt,wt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return kw(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),mt(wt,wt.current),h)break;return null;case 22:case 23:return o.lanes=0,xw(i,o,l)}return Zr(i,o,l)}var Cw,Pm,Ow,Iw;Cw=function(i,o){for(var l=o.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===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Pm=function(){},Ow=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,ys(Lr.current);var T=null;switch(l){case"input":E=Ee(i,E),h=Ee(i,h),T=[];break;case"select":E=N({},E,{value:void 0}),h=N({},h,{value:void 0}),T=[];break;case"textarea":E=Nn(i,E),h=Nn(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=_c)}Jt(l,h);var S;l=null;for(te in E)if(!h.hasOwnProperty(te)&&E.hasOwnProperty(te)&&E[te]!=null)if(te==="style"){var M=E[te];for(S in M)M.hasOwnProperty(S)&&(l||(l={}),l[S]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(s.hasOwnProperty(te)?T||(T=[]):(T=T||[]).push(te,null));for(te in h){var z=h[te];if(M=E!=null?E[te]:void 0,h.hasOwnProperty(te)&&z!==M&&(z!=null||M!=null))if(te==="style")if(M){for(S in M)!M.hasOwnProperty(S)||z&&z.hasOwnProperty(S)||(l||(l={}),l[S]="");for(S in z)z.hasOwnProperty(S)&&M[S]!==z[S]&&(l||(l={}),l[S]=z[S])}else l||(T||(T=[]),T.push(te,l)),l=z;else te==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,M=M?M.__html:void 0,z!=null&&M!==z&&(T=T||[]).push(te,z)):te==="children"?typeof z!="string"&&typeof z!="number"||(T=T||[]).push(te,""+z):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(s.hasOwnProperty(te)?(z!=null&&te==="onScroll"&&yt("scroll",i),T||M===z||(T=[])):(T=T||[]).push(te,z))}l&&(T=T||[]).push("style",l);var te=T;(o.updateQueue=te)&&(o.flags|=4)}},Iw=function(i,o,l,h){l!==h&&(o.flags|=4)};function hu(i,o){if(!_t)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function cn(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(o)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=l,o}function jB(i,o,l){var h=o.pendingProps;switch(em(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cn(o),null;case 1:return Cn(o.type)&&Sc(),cn(o),null;case 3:return h=o.stateNode,Do(),Tt(kn),Tt(un),hm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Cc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,fr!==null&&($m(fr),fr=null))),Pm(i,o),cn(o),null;case 5:dm(o);var E=ys(uu.current);if(l=o.type,i!==null&&o.stateNode!=null)Ow(i,o,l,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return cn(o),null}if(i=ys(Lr.current),Cc(o)){h=o.stateNode,l=o.type;var T=o.memoizedProps;switch(h[Rr]=o,h[ru]=T,i=(o.mode&1)!==0,l){case"dialog":yt("cancel",h),yt("close",h);break;case"iframe":case"object":case"embed":yt("load",h);break;case"video":case"audio":for(E=0;E<eu.length;E++)yt(eu[E],h);break;case"source":yt("error",h);break;case"img":case"image":case"link":yt("error",h),yt("load",h);break;case"details":yt("toggle",h);break;case"input":ke(h,T),yt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},yt("invalid",h);break;case"textarea":cs(h,T),yt("invalid",h)}Jt(l,T),E=null;for(var S in T)if(T.hasOwnProperty(S)){var M=T[S];S==="children"?typeof M=="string"?h.textContent!==M&&(T.suppressHydrationWarning!==!0&&xc(h.textContent,M,i),E=["children",M]):typeof M=="number"&&h.textContent!==""+M&&(T.suppressHydrationWarning!==!0&&xc(h.textContent,M,i),E=["children",""+M]):s.hasOwnProperty(S)&&M!=null&&S==="onScroll"&&yt("scroll",h)}switch(l){case"input":qt(h),ge(h,T,!0);break;case"textarea":qt(h),ec(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=_c)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ue(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(l,{is:h.is}):(i=S.createElement(l),l==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,l),i[Rr]=o,i[ru]=h,Cw(i,o,!1,!1),o.stateNode=i;e:{switch(S=Ir(l,h),l){case"dialog":yt("cancel",i),yt("close",i),E=h;break;case"iframe":case"object":case"embed":yt("load",i),E=h;break;case"video":case"audio":for(E=0;E<eu.length;E++)yt(eu[E],i);E=h;break;case"source":yt("error",i),E=h;break;case"img":case"image":case"link":yt("error",i),yt("load",i),E=h;break;case"details":yt("toggle",i),E=h;break;case"input":ke(i,h),E=Ee(i,h),yt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=N({},h,{value:void 0}),yt("invalid",i);break;case"textarea":cs(i,h),E=Nn(i,h),yt("invalid",i);break;default:E=h}Jt(l,E),M=E;for(T in M)if(M.hasOwnProperty(T)){var z=M[T];T==="style"?mi(i,z):T==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&Je(i,z)):T==="children"?typeof z=="string"?(l!=="textarea"||z!=="")&&rt(i,z):typeof z=="number"&&rt(i,""+z):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?z!=null&&T==="onScroll"&&yt("scroll",i):z!=null&&C(i,T,z,S))}switch(l){case"input":qt(i),ge(i,h,!1);break;case"textarea":qt(i),ec(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Be(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?Ct(i,!!h.multiple,T,!1):h.defaultValue!=null&&Ct(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=_c)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return cn(o),null;case 6:if(i&&o.stateNode!=null)Iw(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=ys(uu.current),ys(Lr.current),Cc(o)){if(h=o.stateNode,l=o.memoizedProps,h[Rr]=o,(T=h.nodeValue!==l)&&(i=Hn,i!==null))switch(i.tag){case 3:xc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&xc(h.nodeValue,l,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Rr]=o,o.stateNode=h}return cn(o),null;case 13:if(Tt(wt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_t&&jn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)L_(),Io(),o.flags|=98560,T=!1;else if(T=Cc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=o.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Rr]=o}else Io(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;cn(o),T=!1}else fr!==null&&($m(fr),fr=null),T=!0;if(!T)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=l,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(wt.current&1)!==0?Ht===0&&(Ht=3):Ym())),o.updateQueue!==null&&(o.flags|=4),cn(o),null);case 4:return Do(),Pm(i,o),i===null&&tu(o.stateNode.containerInfo),cn(o),null;case 10:return om(o.type._context),cn(o),null;case 17:return Cn(o.type)&&Sc(),cn(o),null;case 19:if(Tt(wt),T=o.memoizedState,T===null)return cn(o),null;if(h=(o.flags&128)!==0,S=T.rendering,S===null)if(h)hu(T,!1);else{if(Ht!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(S=Dc(i),S!==null){for(o.flags|=128,hu(T,!1),h=S.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=l,l=o.child;l!==null;)T=l,i=h,T.flags&=14680066,S=T.alternate,S===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=S.childLanes,T.lanes=S.lanes,T.child=S.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=S.memoizedProps,T.memoizedState=S.memoizedState,T.updateQueue=S.updateQueue,T.type=S.type,i=S.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return mt(wt,wt.current&1|2),o.child}i=i.sibling}T.tail!==null&&Ot()>Uo&&(o.flags|=128,h=!0,hu(T,!1),o.lanes=4194304)}else{if(!h)if(i=Dc(S),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),hu(T,!0),T.tail===null&&T.tailMode==="hidden"&&!S.alternate&&!_t)return cn(o),null}else 2*Ot()-T.renderingStartTime>Uo&&l!==1073741824&&(o.flags|=128,h=!0,hu(T,!1),o.lanes=4194304);T.isBackwards?(S.sibling=o.child,o.child=S):(l=T.last,l!==null?l.sibling=S:o.child=S,T.last=S)}return T.tail!==null?(o=T.tail,T.rendering=o,T.tail=o.sibling,T.renderingStartTime=Ot(),o.sibling=null,l=wt.current,mt(wt,h?l&1|2:l&1),o):(cn(o),null);case 22:case 23:return qm(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(zn&1073741824)!==0&&(cn(o),o.subtreeFlags&6&&(o.flags|=8192)):cn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function zB(i,o){switch(em(o),o.tag){case 1:return Cn(o.type)&&Sc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Do(),Tt(kn),Tt(un),hm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return dm(o),null;case 13:if(Tt(wt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Io()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return Tt(wt),null;case 4:return Do(),null;case 10:return om(o.type._context),null;case 22:case 23:return qm(),null;case 24:return null;default:return null}}var Vc=!1,dn=!1,$B=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function Fo(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){At(i,o,h)}else l.current=null}function Rm(i,o,l){try{l()}catch(h){At(i,o,h)}}var Pw=!1;function VB(i,o){if(qp=cc,i=c_(),Fp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var E=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{l.nodeType,T.nodeType}catch(_e){l=null;break e}var S=0,M=-1,z=-1,te=0,ye=0,be=i,pe=null;t:for(;;){for(var Oe;be!==l||E!==0&&be.nodeType!==3||(M=S+E),be!==T||h!==0&&be.nodeType!==3||(z=S+h),be.nodeType===3&&(S+=be.nodeValue.length),(Oe=be.firstChild)!==null;)pe=be,be=Oe;for(;;){if(be===i)break t;if(pe===l&&++te===E&&(M=S),pe===T&&++ye===h&&(z=S),(Oe=be.nextSibling)!==null)break;be=pe,pe=be.parentNode}be=Oe}l=M===-1||z===-1?null:{start:M,end:z}}else l=null}l=l||{start:0,end:0}}else l=null;for(Yp={focusedElem:i,selectionRange:l},cc=!1,Ie=o;Ie!==null;)if(o=Ie,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Ie=i;else for(;Ie!==null;){o=Ie;try{var Pe=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Pe!==null){var Re=Pe.memoizedProps,It=Pe.memoizedState,X=o.stateNode,V=X.getSnapshotBeforeUpdate(o.elementType===o.type?Re:hr(o.type,Re),It);X.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var J=o.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(_e){At(o,o.return,_e)}if(i=o.sibling,i!==null){i.return=o.return,Ie=i;break}Ie=o.return}return Pe=Pw,Pw=!1,Pe}function pu(i,o,l){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Rm(o,l,T)}E=E.next}while(E!==h)}}function qc(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==o)}}function Lm(i){var o=i.ref;if(o!==null){var l=i.stateNode;i.tag,i=l,typeof o=="function"?o(i):o.current=i}}function Rw(i){var o=i.alternate;o!==null&&(i.alternate=null,Rw(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Rr],delete o[ru],delete o[Qp],delete o[AB],delete o[NB])),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 Lw(i){return i.tag===5||i.tag===3||i.tag===4}function Dw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Lw(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 Dm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.nodeType===8?l.parentNode.insertBefore(i,o):l.insertBefore(i,o):(l.nodeType===8?(o=l.parentNode,o.insertBefore(i,l)):(o=l,o.appendChild(i)),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=_c));else if(h!==4&&(i=i.child,i!==null))for(Dm(i,o,l),i=i.sibling;i!==null;)Dm(i,o,l),i=i.sibling}function Mm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Mm(i,o,l),i=i.sibling;i!==null;)Mm(i,o,l),i=i.sibling}var Zt=null,pr=!1;function ki(i,o,l){for(l=l.child;l!==null;)Mw(i,o,l),l=l.sibling}function Mw(i,o,l){if(Pr&&typeof Pr.onCommitFiberUnmount=="function")try{Pr.onCommitFiberUnmount(ic,l)}catch(M){}switch(l.tag){case 5:dn||Fo(l,o);case 6:var h=Zt,E=pr;Zt=null,ki(i,o,l),Zt=h,pr=E,Zt!==null&&(pr?(i=Zt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Zt.removeChild(l.stateNode));break;case 18:Zt!==null&&(pr?(i=Zt,l=l.stateNode,i.nodeType===8?Xp(i.parentNode,l):i.nodeType===1&&Xp(i,l),Ya(i)):Xp(Zt,l.stateNode));break;case 4:h=Zt,E=pr,Zt=l.stateNode.containerInfo,pr=!0,ki(i,o,l),Zt=h,pr=E;break;case 0:case 11:case 14:case 15:if(!dn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,S=T.destroy;T=T.tag,S!==void 0&&((T&2)!==0||(T&4)!==0)&&Rm(l,o,S),E=E.next}while(E!==h)}ki(i,o,l);break;case 1:if(!dn&&(Fo(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(M){At(l,o,M)}ki(i,o,l);break;case 21:ki(i,o,l);break;case 22:l.mode&1?(dn=(h=dn)||l.memoizedState!==null,ki(i,o,l),dn=h):ki(i,o,l);break;default:ki(i,o,l)}}function Fw(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new $B),o.forEach(function(h){var E=ZB.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function mr(i,o){var l=o.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var T=i,S=o,M=S;e:for(;M!==null;){switch(M.tag){case 5:Zt=M.stateNode,pr=!1;break e;case 3:Zt=M.stateNode.containerInfo,pr=!0;break e;case 4:Zt=M.stateNode.containerInfo,pr=!0;break e}M=M.return}if(Zt===null)throw Error(n(160));Mw(T,S,E),Zt=null,pr=!1;var z=E.alternate;z!==null&&(z.return=null),E.return=null}catch(te){At(E,o,te)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Bw(o,i),o=o.sibling}function Bw(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(mr(o,i),Mr(i),h&4){try{pu(3,i,i.return),qc(3,i)}catch(Re){At(i,i.return,Re)}try{pu(5,i,i.return)}catch(Re){At(i,i.return,Re)}}break;case 1:mr(o,i),Mr(i),h&512&&l!==null&&Fo(l,l.return);break;case 5:if(mr(o,i),Mr(i),h&512&&l!==null&&Fo(l,l.return),i.flags&32){var E=i.stateNode;try{rt(E,"")}catch(Re){At(i,i.return,Re)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,S=l!==null?l.memoizedProps:T,M=i.type,z=i.updateQueue;if(i.updateQueue=null,z!==null)try{M==="input"&&T.type==="radio"&&T.name!=null&&K(E,T),Ir(M,S);var te=Ir(M,T);for(S=0;S<z.length;S+=2){var ye=z[S],be=z[S+1];ye==="style"?mi(E,be):ye==="dangerouslySetInnerHTML"?Je(E,be):ye==="children"?rt(E,be):C(E,ye,be,te)}switch(M){case"input":ne(E,T);break;case"textarea":Zl(E,T);break;case"select":var pe=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Oe=T.value;Oe!=null?Ct(E,!!T.multiple,Oe,!1):pe!==!!T.multiple&&(T.defaultValue!=null?Ct(E,!!T.multiple,T.defaultValue,!0):Ct(E,!!T.multiple,T.multiple?[]:"",!1))}E[ru]=T}catch(Re){At(i,i.return,Re)}}break;case 6:if(mr(o,i),Mr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Re){At(i,i.return,Re)}}break;case 3:if(mr(o,i),Mr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Ya(o.containerInfo)}catch(Re){At(i,i.return,Re)}break;case 4:mr(o,i),Mr(i);break;case 13:mr(o,i),Mr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(Um=Ot())),h&4&&Fw(i);break;case 22:if(ye=l!==null&&l.memoizedState!==null,i.mode&1?(dn=(te=dn)||ye,mr(o,i),dn=te):mr(o,i),Mr(i),h&8192){if(te=i.memoizedState!==null,(i.stateNode.isHidden=te)&&!ye&&(i.mode&1)!==0)for(Ie=i,ye=i.child;ye!==null;){for(be=Ie=ye;Ie!==null;){switch(pe=Ie,Oe=pe.child,pe.tag){case 0:case 11:case 14:case 15:pu(4,pe,pe.return);break;case 1:Fo(pe,pe.return);var Pe=pe.stateNode;if(typeof Pe.componentWillUnmount=="function"){h=pe,l=pe.return;try{o=h,Pe.props=o.memoizedProps,Pe.state=o.memoizedState,Pe.componentWillUnmount()}catch(Re){At(h,l,Re)}}break;case 5:Fo(pe,pe.return);break;case 22:if(pe.memoizedState!==null){jw(be);continue}}Oe!==null?(Oe.return=pe,Ie=Oe):jw(be)}ye=ye.sibling}e:for(ye=null,be=i;;){if(be.tag===5){if(ye===null){ye=be;try{E=be.stateNode,te?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(M=be.stateNode,z=be.memoizedProps.style,S=z!=null&&z.hasOwnProperty("display")?z.display:null,M.style.display=Wn("display",S))}catch(Re){At(i,i.return,Re)}}}else if(be.tag===6){if(ye===null)try{be.stateNode.nodeValue=te?"":be.memoizedProps}catch(Re){At(i,i.return,Re)}}else if((be.tag!==22&&be.tag!==23||be.memoizedState===null||be===i)&&be.child!==null){be.child.return=be,be=be.child;continue}if(be===i)break e;for(;be.sibling===null;){if(be.return===null||be.return===i)break e;ye===be&&(ye=null),be=be.return}ye===be&&(ye=null),be.sibling.return=be.return,be=be.sibling}}break;case 19:mr(o,i),Mr(i),h&4&&Fw(i);break;case 21:break;default:mr(o,i),Mr(i)}}function Mr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(Lw(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(rt(E,""),h.flags&=-33);var T=Dw(i);Mm(i,T,E);break;case 3:case 4:var S=h.stateNode.containerInfo,M=Dw(i);Dm(i,M,S);break;default:throw Error(n(161))}}catch(z){At(i,i.return,z)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function qB(i,o,l){Ie=i,Uw(i)}function Uw(i,o,l){for(var h=(i.mode&1)!==0;Ie!==null;){var E=Ie,T=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||Vc;if(!S){var M=E.alternate,z=M!==null&&M.memoizedState!==null||dn;M=Vc;var te=dn;if(Vc=S,(dn=z)&&!te)for(Ie=E;Ie!==null;)S=Ie,z=S.child,S.tag===22&&S.memoizedState!==null?zw(E):z!==null?(z.return=S,Ie=z):zw(E);for(;T!==null;)Ie=T,Uw(T),T=T.sibling;Ie=E,Vc=M,dn=te}Hw(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Ie=T):Hw(i)}}function Hw(i){for(;Ie!==null;){var o=Ie;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:dn||qc(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!dn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:hr(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&j_(o,T,h);break;case 3:var S=o.updateQueue;if(S!==null){if(l=null,o.child!==null)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}j_(o,S,l)}break;case 5:var M=o.stateNode;if(l===null&&o.flags&4){l=M;var z=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&l.focus();break;case"img":z.src&&(l.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var te=o.alternate;if(te!==null){var ye=te.memoizedState;if(ye!==null){var be=ye.dehydrated;be!==null&&Ya(be)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||o.flags&512&&Lm(o)}catch(pe){At(o,o.return,pe)}}if(o===i){Ie=null;break}if(l=o.sibling,l!==null){l.return=o.return,Ie=l;break}Ie=o.return}}function jw(i){for(;Ie!==null;){var o=Ie;if(o===i){Ie=null;break}var l=o.sibling;if(l!==null){l.return=o.return,Ie=l;break}Ie=o.return}}function zw(i){for(;Ie!==null;){var o=Ie;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{qc(4,o)}catch(z){At(o,l,z)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(z){At(o,E,z)}}var T=o.return;try{Lm(o)}catch(z){At(o,T,z)}break;case 5:var S=o.return;try{Lm(o)}catch(z){At(o,S,z)}}}catch(z){At(o,o.return,z)}if(o===i){Ie=null;break}var M=o.sibling;if(M!==null){M.return=o.return,Ie=M;break}Ie=o.return}}var YB=Math.ceil,Yc=j.ReactCurrentDispatcher,Fm=j.ReactCurrentOwner,Jn=j.ReactCurrentBatchConfig,it=0,Wt=null,Mt=null,en=0,zn=0,Bo=wi(0),Ht=0,mu=null,bs=0,Wc=0,Bm=0,gu=null,In=null,Um=0,Uo=1/0,ei=null,Gc=!1,Hm=null,Ci=null,Xc=!1,Oi=null,Qc=0,Eu=0,jm=null,Kc=-1,Jc=0;function gn(){return(it&6)!==0?Ot():Kc!==-1?Kc:Kc=Ot()}function Ii(i){return(i.mode&1)===0?1:(it&2)!==0&&en!==0?en&-en:CB.transition!==null?(Jc===0&&(Jc=Dx()),Jc):(i=lt,i!==0||(i=window.event,i=i===void 0?16:Vx(i.type)),i)}function gr(i,o,l,h){if(50<Eu)throw Eu=0,jm=null,Error(n(185));ja(i,l,h),((it&2)===0||i!==Wt)&&(i===Wt&&((it&2)===0&&(Wc|=l),Ht===4&&Pi(i,en)),Pn(i,h),l===1&&it===0&&(o.mode&1)===0&&(Uo=Ot()+500,Ac&&vi()))}function Pn(i,o){var l=i.callbackNode;CF(i,o);var h=ac(i,i===Wt?en:0);if(h===0)l!==null&&Px(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&Px(l),o===1)i.tag===0?kB(Vw.bind(null,i)):C_(Vw.bind(null,i)),SB(function(){(it&6)===0&&vi()}),l=null;else{switch(Mx(h)){case 1:l=bp;break;case 4:l=Rx;break;case 16:l=rc;break;case 536870912:l=Lx;break;default:l=rc}l=Jw(l,$w.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function $w(i,o){if(Kc=-1,Jc=0,(it&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Ho()&&i.callbackNode!==l)return null;var h=ac(i,i===Wt?en:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=Zc(i,h);else{o=h;var E=it;it|=2;var T=Yw();(Wt!==i||en!==o)&&(ei=null,Uo=Ot()+500,_s(i,o));do try{XB();break}catch(M){qw(i,M)}while(!0);sm(),Yc.current=T,it=E,Mt!==null?o=0:(Wt=null,en=0,o=Ht)}if(o!==0){if(o===2&&(E=xp(i),E!==0&&(h=E,o=zm(i,E))),o===1)throw l=mu,_s(i,0),Pi(i,h),Pn(i,Ot()),l;if(o===6)Pi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!WB(E)&&(o=Zc(i,h),o===2&&(T=xp(i),T!==0&&(h=T,o=zm(i,T))),o===1))throw l=mu,_s(i,0),Pi(i,h),Pn(i,Ot()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:ws(i,In,ei);break;case 3:if(Pi(i,h),(h&130023424)===h&&(o=Um+500-Ot(),10<o)){if(ac(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){gn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Gp(ws.bind(null,i,In,ei),o);break}ws(i,In,ei);break;case 4:if(Pi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var S=31-cr(h);T=1<<S,S=o[S],S>E&&(E=S),h&=~T}if(h=E,h=Ot()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*YB(h/1960))-h,10<h){i.timeoutHandle=Gp(ws.bind(null,i,In,ei),h);break}ws(i,In,ei);break;case 5:ws(i,In,ei);break;default:throw Error(n(329))}}}return Pn(i,Ot()),i.callbackNode===l?$w.bind(null,i):null}function zm(i,o){var l=gu;return i.current.memoizedState.isDehydrated&&(_s(i,o).flags|=256),i=Zc(i,o),i!==2&&(o=In,In=l,o!==null&&$m(o)),i}function $m(i){In===null?In=i:In.push.apply(In,i)}function WB(i){for(var o=i;;){if(o.flags&16384){var l=o.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var E=l[h],T=E.getSnapshot;E=E.value;try{if(!dr(T(),E))return!1}catch(S){return!1}}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Pi(i,o){for(o&=~Bm,o&=~Wc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-cr(o),h=1<<l;i[l]=-1,o&=~h}}function Vw(i){if((it&6)!==0)throw Error(n(327));Ho();var o=ac(i,0);if((o&1)===0)return Pn(i,Ot()),null;var l=Zc(i,o);if(i.tag!==0&&l===2){var h=xp(i);h!==0&&(o=h,l=zm(i,h))}if(l===1)throw l=mu,_s(i,0),Pi(i,o),Pn(i,Ot()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,ws(i,In,ei),Pn(i,Ot()),null}function Vm(i,o){var l=it;it|=1;try{return i(o)}finally{it=l,it===0&&(Uo=Ot()+500,Ac&&vi())}}function xs(i){Oi!==null&&Oi.tag===0&&(it&6)===0&&Ho();var o=it;it|=1;var l=Jn.transition,h=lt;try{if(Jn.transition=null,lt=1,i)return i()}finally{lt=h,Jn.transition=l,it=o,(it&6)===0&&vi()}}function qm(){zn=Bo.current,Tt(Bo)}function _s(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,wB(l)),Mt!==null)for(l=Mt.return;l!==null;){var h=l;switch(em(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Sc();break;case 3:Do(),Tt(kn),Tt(un),hm();break;case 5:dm(h);break;case 4:Do();break;case 13:Tt(wt);break;case 19:Tt(wt);break;case 10:om(h.type._context);break;case 22:case 23:qm()}l=l.return}if(Wt=i,Mt=i=Ri(i.current,null),en=zn=o,Ht=0,mu=null,Bm=Wc=bs=0,In=gu=null,Es!==null){for(o=0;o<Es.length;o++)if(l=Es[o],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,T=l.pending;if(T!==null){var S=T.next;T.next=E,h.next=S}l.pending=h}Es=null}return i}function qw(i,o){do{var l=Mt;try{if(sm(),Mc.current=Hc,Fc){for(var h=St.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Fc=!1}if(Ts=0,Yt=Ut=St=null,lu=!1,cu=0,Fm.current=null,l===null||l.return===null){Ht=1,mu=o,Mt=null;break}e:{var T=i,S=l.return,M=l,z=o;if(o=en,M.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var te=z,ye=M,be=ye.tag;if((ye.mode&1)===0&&(be===0||be===11||be===15)){var pe=ye.alternate;pe?(ye.updateQueue=pe.updateQueue,ye.memoizedState=pe.memoizedState,ye.lanes=pe.lanes):(ye.updateQueue=null,ye.memoizedState=null)}var Oe=gw(S);if(Oe!==null){Oe.flags&=-257,Ew(Oe,S,M,T,o),Oe.mode&1&&mw(T,te,o),o=Oe,z=te;var Pe=o.updateQueue;if(Pe===null){var Re=new Set;Re.add(z),o.updateQueue=Re}else Pe.add(z);break e}else{if((o&1)===0){mw(T,te,o),Ym();break e}z=Error(n(426))}}else if(_t&&M.mode&1){var It=gw(S);if(It!==null){(It.flags&65536)===0&&(It.flags|=256),Ew(It,S,M,T,o),rm(Mo(z,M));break e}}T=z=Mo(z,M),Ht!==4&&(Ht=2),gu===null?gu=[T]:gu.push(T),T=S;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var X=hw(T,z,o);H_(T,X);break e;case 1:M=z;var V=T.type,J=T.stateNode;if((T.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(Ci===null||!Ci.has(J)))){T.flags|=65536,o&=-o,T.lanes|=o;var _e=pw(T,M,o);H_(T,_e);break e}}T=T.return}while(T!==null)}Gw(l)}catch(De){o=De,Mt===l&&l!==null&&(Mt=l=l.return);continue}break}while(!0)}function Yw(){var i=Yc.current;return Yc.current=Hc,i===null?Hc:i}function Ym(){(Ht===0||Ht===3||Ht===2)&&(Ht=4),Wt===null||(bs&268435455)===0&&(Wc&268435455)===0||Pi(Wt,en)}function Zc(i,o){var l=it;it|=2;var h=Yw();(Wt!==i||en!==o)&&(ei=null,_s(i,o));do try{GB();break}catch(E){qw(i,E)}while(!0);if(sm(),it=l,Yc.current=h,Mt!==null)throw Error(n(261));return Wt=null,en=0,Ht}function GB(){for(;Mt!==null;)Ww(Mt)}function XB(){for(;Mt!==null&&!bF();)Ww(Mt)}function Ww(i){var o=Kw(i.alternate,i,zn);i.memoizedProps=i.pendingProps,o===null?Gw(i):Mt=o,Fm.current=null}function Gw(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=jB(l,o,zn),l!==null){Mt=l;return}}else{if(l=zB(l,o),l!==null){l.flags&=32767,Mt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Ht=6,Mt=null;return}}if(o=o.sibling,o!==null){Mt=o;return}Mt=o=i}while(o!==null);Ht===0&&(Ht=5)}function ws(i,o,l){var h=lt,E=Jn.transition;try{Jn.transition=null,lt=1,QB(i,o,l,h)}finally{Jn.transition=E,lt=h}return null}function QB(i,o,l,h){do Ho();while(Oi!==null);if((it&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 T=l.lanes|l.childLanes;if(OF(i,T),i===Wt&&(Mt=Wt=null,en=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Xc||(Xc=!0,Jw(rc,function(){return Ho(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=Jn.transition,Jn.transition=null;var S=lt;lt=1;var M=it;it|=4,Fm.current=null,VB(i,l),Bw(l,i),gB(Yp),cc=!!qp,Yp=qp=null,i.current=l,qB(l),xF(),it=M,lt=S,Jn.transition=T}else i.current=l;if(Xc&&(Xc=!1,Oi=i,Qc=E),T=i.pendingLanes,T===0&&(Ci=null),SF(l.stateNode),Pn(i,Ot()),o!==null)for(h=i.onRecoverableError,l=0;l<o.length;l++)E=o[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(Gc)throw Gc=!1,i=Hm,Hm=null,i;return(Qc&1)!==0&&i.tag!==0&&Ho(),T=i.pendingLanes,(T&1)!==0?i===jm?Eu++:(Eu=0,jm=i):Eu=0,vi(),null}function Ho(){if(Oi!==null){var i=Mx(Qc),o=Jn.transition,l=lt;try{if(Jn.transition=null,lt=16>i?16:i,Oi===null)var h=!1;else{if(i=Oi,Oi=null,Qc=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,Ie=i.current;Ie!==null;){var T=Ie,S=T.child;if((Ie.flags&16)!==0){var M=T.deletions;if(M!==null){for(var z=0;z<M.length;z++){var te=M[z];for(Ie=te;Ie!==null;){var ye=Ie;switch(ye.tag){case 0:case 11:case 15:pu(8,ye,T)}var be=ye.child;if(be!==null)be.return=ye,Ie=be;else for(;Ie!==null;){ye=Ie;var pe=ye.sibling,Oe=ye.return;if(Rw(ye),ye===te){Ie=null;break}if(pe!==null){pe.return=Oe,Ie=pe;break}Ie=Oe}}}var Pe=T.alternate;if(Pe!==null){var Re=Pe.child;if(Re!==null){Pe.child=null;do{var It=Re.sibling;Re.sibling=null,Re=It}while(Re!==null)}}Ie=T}}if((T.subtreeFlags&2064)!==0&&S!==null)S.return=T,Ie=S;else e:for(;Ie!==null;){if(T=Ie,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:pu(9,T,T.return)}var X=T.sibling;if(X!==null){X.return=T.return,Ie=X;break e}Ie=T.return}}var V=i.current;for(Ie=V;Ie!==null;){S=Ie;var J=S.child;if((S.subtreeFlags&2064)!==0&&J!==null)J.return=S,Ie=J;else e:for(S=V;Ie!==null;){if(M=Ie,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:qc(9,M)}}catch(De){At(M,M.return,De)}if(M===S){Ie=null;break e}var _e=M.sibling;if(_e!==null){_e.return=M.return,Ie=_e;break e}Ie=M.return}}if(it=E,vi(),Pr&&typeof Pr.onPostCommitFiberRoot=="function")try{Pr.onPostCommitFiberRoot(ic,i)}catch(De){}h=!0}return h}finally{lt=l,Jn.transition=o}}return!1}function Xw(i,o,l){o=Mo(l,o),o=hw(i,o,1),i=Ni(i,o,1),o=gn(),i!==null&&(ja(i,1,o),Pn(i,o))}function At(i,o,l){if(i.tag===3)Xw(i,i,l);else for(;o!==null;){if(o.tag===3){Xw(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Ci===null||!Ci.has(h))){i=Mo(l,i),i=pw(o,i,1),o=Ni(o,i,1),i=gn(),o!==null&&(ja(o,1,i),Pn(o,i));break}}o=o.return}}function KB(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=gn(),i.pingedLanes|=i.suspendedLanes&l,Wt===i&&(en&l)===l&&(Ht===4||Ht===3&&(en&130023424)===en&&500>Ot()-Um?_s(i,0):Bm|=l),Pn(i,o)}function Qw(i,o){o===0&&((i.mode&1)===0?o=1:(o=oc,oc<<=1,(oc&130023424)===0&&(oc=4194304)));var l=gn();i=Kr(i,o),i!==null&&(ja(i,o,l),Pn(i,l))}function JB(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),Qw(i,l)}function ZB(i,o){var l=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),Qw(i,l)}var Kw;Kw=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||kn.current)On=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return On=!1,HB(i,o,l);On=(i.flags&131072)!==0}else On=!1,_t&&(o.flags&1048576)!==0&&O_(o,kc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;$c(i,o),i=o.pendingProps;var E=ko(o,un.current);Lo(o,l),E=gm(null,o,h,i,E,l);var T=Em();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Cn(h)?(T=!0,vc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,lm(o),E.updater=jc,o.stateNode=E,E._reactInternals=o,wm(o,h,i,l),o=Nm(null,o,h,!0,T,l)):(o.tag=0,_t&&T&&Zp(o),mn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch($c(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=t7(h),i=hr(h,i),E){case 0:o=Am(null,o,h,i,l);break e;case 1:o=ww(null,o,h,i,l);break e;case 11:o=yw(null,o,h,i,l);break e;case 14:o=Tw(null,o,h,hr(h.type,i),l);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:hr(h,E),Am(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:hr(h,E),ww(i,o,h,E,l);case 3:e:{if(Sw(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,U_(i,o),Lc(o,h,null,l);var S=o.memoizedState;if(h=S.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){E=Mo(Error(n(423)),o),o=vw(i,o,h,l,E);break e}else if(h!==E){E=Mo(Error(n(424)),o),o=vw(i,o,h,l,E);break e}else for(jn=_i(o.stateNode.containerInfo.firstChild),Hn=o,_t=!0,fr=null,l=F_(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Io(),h===E){o=Zr(i,o,l);break e}mn(i,o,h,l)}o=o.child}return o;case 5:return z_(o),i===null&&nm(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,S=E.children,Wp(h,E)?S=null:T!==null&&Wp(h,T)&&(o.flags|=32),_w(i,o),mn(i,o,S,l),o.child;case 6:return i===null&&nm(o),null;case 13:return Aw(i,o,l);case 4:return cm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Po(o,null,h,l):mn(i,o,h,l),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:hr(h,E),yw(i,o,h,E,l);case 7:return mn(i,o,o.pendingProps,l),o.child;case 8:return mn(i,o,o.pendingProps.children,l),o.child;case 12:return mn(i,o,o.pendingProps.children,l),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,T=o.memoizedProps,S=E.value,mt(Ic,h._currentValue),h._currentValue=S,T!==null)if(dr(T.value,S)){if(T.children===E.children&&!kn.current){o=Zr(i,o,l);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var M=T.dependencies;if(M!==null){S=T.child;for(var z=M.firstContext;z!==null;){if(z.context===h){if(T.tag===1){z=Jr(-1,l&-l),z.tag=2;var te=T.updateQueue;if(te!==null){te=te.shared;var ye=te.pending;ye===null?z.next=z:(z.next=ye.next,ye.next=z),te.pending=z}}T.lanes|=l,z=T.alternate,z!==null&&(z.lanes|=l),am(T.return,l,o),M.lanes|=l;break}z=z.next}}else if(T.tag===10)S=T.type===o.type?null:T.child;else if(T.tag===18){if(S=T.return,S===null)throw Error(n(341));S.lanes|=l,M=S.alternate,M!==null&&(M.lanes|=l),am(S,l,o),S=T.sibling}else S=T.child;if(S!==null)S.return=T;else for(S=T;S!==null;){if(S===o){S=null;break}if(T=S.sibling,T!==null){T.return=S.return,S=T;break}S=S.return}T=S}mn(i,o,E.children,l),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,Lo(o,l),E=Qn(E),h=h(E),o.flags|=1,mn(i,o,h,l),o.child;case 14:return h=o.type,E=hr(h,o.pendingProps),E=hr(h.type,E),Tw(i,o,h,E,l);case 15:return bw(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:hr(h,E),$c(i,o),o.tag=1,Cn(h)?(i=!0,vc(o)):i=!1,Lo(o,l),dw(o,h,E),wm(o,h,E,l),Nm(null,o,h,!0,i,l);case 19:return kw(i,o,l);case 22:return xw(i,o,l)}throw Error(n(156,o.tag))};function Jw(i,o){return Ix(i,o)}function e7(i,o,l,h){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=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zn(i,o,l,h){return new e7(i,o,l,h)}function Wm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function t7(i){if(typeof i=="function")return Wm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===Z)return 11;if(i===oe)return 14}return 2}function Ri(i,o){var l=i.alternate;return l===null?(l=Zn(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,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,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function ed(i,o,l,h,E,T){var S=2;if(h=i,typeof i=="function")Wm(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case W:return Ss(l.children,E,T,o);case ie:S=8,E|=8;break;case fe:return i=Zn(12,l,o,E|2),i.elementType=fe,i.lanes=T,i;case Ae:return i=Zn(13,l,o,E),i.elementType=Ae,i.lanes=T,i;case de:return i=Zn(19,l,o,E),i.elementType=de,i.lanes=T,i;case se:return td(l,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:S=10;break e;case le:S=9;break e;case Z:S=11;break e;case oe:S=14;break e;case Se:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=Zn(S,l,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function Ss(i,o,l,h){return i=Zn(7,i,h,o),i.lanes=l,i}function td(i,o,l,h){return i=Zn(22,i,h,o),i.elementType=se,i.lanes=l,i.stateNode={isHidden:!1},i}function Gm(i,o,l){return i=Zn(6,i,null,o),i.lanes=l,i}function Xm(i,o,l){return o=Zn(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function n7(i,o,l,h,E){this.tag=o,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=_p(0),this.expirationTimes=_p(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_p(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function Qm(i,o,l,h,E,T,S,M,z){return i=new n7(i,o,l,M,z),o===1?(o=1,T===!0&&(o|=8)):o=0,T=Zn(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},lm(T),i}function r7(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:h==null?null:""+h,children:i,containerInfo:o,implementation:l}}function Zw(i){if(!i)return Si;i=i._reactInternals;e:{if(fs(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Cn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(Cn(l))return N_(i,l,o)}return o}function e2(i,o,l,h,E,T,S,M,z){return i=Qm(l,h,!0,i,E,T,S,M,z),i.context=Zw(null),l=i.current,h=gn(),E=Ii(l),T=Jr(h,E),T.callback=o!=null?o:null,Ni(l,T,E),i.current.lanes=E,ja(i,E,h),Pn(i,h),i}function nd(i,o,l,h){var E=o.current,T=gn(),S=Ii(E);return l=Zw(l),o.context===null?o.context=l:o.pendingContext=l,o=Jr(T,S),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Ni(E,o,S),i!==null&&(gr(i,E,S,T),Rc(i,E,S)),S}function rd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function t2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function Km(i,o){t2(i,o),(i=i.alternate)&&t2(i,o)}function i7(){return null}var n2=typeof reportError=="function"?reportError:function(i){console.error(i)};function Jm(i){this._internalRoot=i}id.prototype.render=Jm.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));nd(i,o,null,null)},id.prototype.unmount=Jm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;xs(function(){nd(null,i,null,null)}),o[Wr]=null}};function id(i){this._internalRoot=i}id.prototype.unstable_scheduleHydration=function(i){if(i){var o=Ux();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Ti.length&&o!==0&&o<Ti[l].priority;l++);Ti.splice(l,0,i),l===0&&zx(i)}};function Zm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function sd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function r2(){}function s7(i,o,l,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var te=rd(S);T.call(te)}}var S=e2(o,h,i,0,null,!1,!1,"",r2);return i._reactRootContainer=S,i[Wr]=S.current,tu(i.nodeType===8?i.parentNode:i),xs(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var M=h;h=function(){var te=rd(z);M.call(te)}}var z=Qm(i,0,!1,null,null,!1,!1,"",r2);return i._reactRootContainer=z,i[Wr]=z.current,tu(i.nodeType===8?i.parentNode:i),xs(function(){nd(o,z,l,h)}),z}function od(i,o,l,h,E){var T=l._reactRootContainer;if(T){var S=T;if(typeof E=="function"){var M=E;E=function(){var z=rd(S);M.call(z)}}nd(o,S,i,E)}else S=s7(l,o,i,E,h);return rd(S)}Fx=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=Ha(o.pendingLanes);l!==0&&(wp(o,l|1),Pn(o,Ot()),(it&6)===0&&(Uo=Ot()+500,vi()))}break;case 13:xs(function(){var h=Kr(i,1);if(h!==null){var E=gn();gr(h,i,1,E)}}),Km(i,1)}},Sp=function(i){if(i.tag===13){var o=Kr(i,134217728);if(o!==null){var l=gn();gr(o,i,134217728,l)}Km(i,134217728)}},Bx=function(i){if(i.tag===13){var o=Ii(i),l=Kr(i,o);if(l!==null){var h=gn();gr(l,i,o,h)}Km(i,o)}},Ux=function(){return lt},Hx=function(i,o){var l=lt;try{return lt=i,o()}finally{lt=l}},gp=function(i,o,l){switch(o){case"input":if(ne(i,l),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var h=l[o];if(h!==i&&h.form===i.form){var E=wc(h);if(!E)throw Error(n(90));Dt(h),ne(h,E)}}}break;case"textarea":Zl(i,l);break;case"select":o=l.value,o!=null&&Ct(i,!!l.multiple,o,!1)}},Sx=Vm,vx=xs;var o7={usingClientEntryPoint:!1,Events:[iu,Ao,wc,_x,wx,Vm]},yu={findFiberByHostInstance:hs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},a7={bundleType:yu.bundleType,version:yu.version,rendererPackageName:yu.rendererPackageName,rendererConfig:yu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Cx(i),i===null?null:i.stateNode},findFiberByHostInstance:yu.findFiberByHostInstance||i7,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 ad=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ad.isDisabled&&ad.supportsFiber)try{ic=ad.inject(a7),Pr=ad}catch(i){}}return bn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=o7,bn.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Zm(o))throw Error(n(200));return r7(i,o,null,l)},bn.createRoot=function(i,o){if(!Zm(i))throw Error(n(299));var l=!1,h="",E=n2;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=Qm(i,1,!1,null,null,l,!1,h,E),i[Wr]=o.current,tu(i.nodeType===8?i.parentNode:i),new Jm(o)},bn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=Cx(o),i=i===null?null:i.stateNode,i},bn.flushSync=function(i){return xs(i)},bn.hydrate=function(i,o,l){if(!sd(o))throw Error(n(200));return od(null,i,o,!0,l)},bn.hydrateRoot=function(i,o,l){if(!Zm(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,T="",S=n2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),o=e2(o,null,i,1,l!=null?l:null,E,!1,T,S),i[Wr]=o.current,tu(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,E]:o.mutableSourceEagerHydrationData.push(l,E);return new id(o)},bn.render=function(i,o,l){if(!sd(o))throw Error(n(200));return od(null,i,o,!1,l)},bn.unmountComponentAtNode=function(i){if(!sd(i))throw Error(n(40));return i._reactRootContainer?(xs(function(){od(null,null,i,!1,function(){i._reactRootContainer=null,i[Wr]=null})}),!0):!1},bn.unstable_batchedUpdates=Vm,bn.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!sd(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return od(i,o,l,!1,h)},bn.version="18.3.1-next-f1338f8080-20240426",bn}var Wg;function Gg(){if(Wg)return af.exports;Wg=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(),af.exports=EN(),af.exports}var Ms=Gg();function Xg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Xg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function F(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Xg(e))&&(r&&(r+=" "),r+=t);return r}var Qg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Kg=Mi.createContext&&Mi.createContext(Qg),yN=["attr","size","title"];function TN(e,t){if(e==null)return{};var n=bN(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bN(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 Xu(){return Xu=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},Xu.apply(this,arguments)}function Jg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Qu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jg(Object(n),!0).forEach(function(r){xN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xN(e,t,n){return t=_N(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _N(e){var t=wN(e,"string");return typeof t=="symbol"?t:t+""}function wN(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 Zg(e){return e&&e.map((t,n)=>Mi.createElement(t.tag,Qu({key:n},t.attr),Zg(t.child)))}function at(e){return t=>Mi.createElement(SN,Xu({attr:Qu({},e.attr)},t),Zg(e.child))}function SN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=TN(e,yN),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Mi.createElement("svg",Xu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Qu(Qu({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Mi.createElement("title",null,a),e.children)};return Kg!==void 0?Mi.createElement(Kg.Consumer,null,n=>t(n)):t(Qg)}function vN(e){return at({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 AN(e){return at({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 NN(e){return at({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 ir=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:_.jsx("button",{className:F(e,`${O}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?_.jsx("img",{className:F(`${O}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),kN="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",CN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ut(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?_.jsx(NN,{className:F(t,`${O}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||kN,alt:"Copilot",className:F(t,`${O}-minimized-icon-img`)});return _.jsx(ir,{className:F(t,`${O}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},ON=()=>{const{globalClassName:e,themeVariables:t}=ut(),n=()=>{Wu(!1),Br(!0)};return Ms.createPortal(_.jsx("div",{className:F(e,`${O}-minimized-container`),style:t,children:_.jsx(CN,{onClick:n})}),document.body)};function IN(e){return at({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 hn(){const e=B.useContext(Eg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const PN=e=>({[`${Rn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Rn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Rn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Rn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Rn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Rn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function RN(e){return at({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm18.31 6-2.76 5z"},child:[]},{tag:"path",attr:{d:"M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"},child:[]}]})(e)}function LN(e){return at({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8A5.87 5.87 0 0 1 6 12c0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"},child:[]}]})(e)}function e1(e){return at({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 DN(e){return at({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 cf(e){return at({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 MN(e){return at({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 FN(e){return at({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 BN(e){return at({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function t1(e){return at({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 n1(e){return at({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 UN(e){return at({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 HN(e){return at({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 jN(e){return at({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function r1(e){return at({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:s})=>_.jsx("button",{className:F(`${O}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),zN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?_.jsx("img",{className:F(`${O}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(cf,{size:"16px"})},$N=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return _.jsx(ir,{className:F(e,n,`cim-${r}-component`,`${O}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:_.jsx(cf,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(Ku,{className:F(e,n,`cim-${r}-component`,`${O}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&_.jsx(zN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function F7(){}function B7(){}function i1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function s1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const VN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YN={};function o1(e,t){return(YN.jsx?qN:VN).test(e)}const WN=/[ \t\n\f\r]/g;function GN(e){return typeof e=="object"?e.type==="text"?a1(e.value):!1:a1(e)}function a1(e){return e.replace(WN,"")===""}class ea{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ea.prototype.normal={},ea.prototype.property={},ea.prototype.space=void 0;function u1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ea(n,r,t)}function ta(e){return e.toLowerCase()}class xn{constructor(t,n){this.attribute=n,this.property=t}}xn.prototype.attribute="",xn.prototype.booleanish=!1,xn.prototype.boolean=!1,xn.prototype.commaOrSpaceSeparated=!1,xn.prototype.commaSeparated=!1,xn.prototype.defined=!1,xn.prototype.mustUseProperty=!1,xn.prototype.number=!1,xn.prototype.overloadedBoolean=!1,xn.prototype.property="",xn.prototype.spaceSeparated=!1,xn.prototype.space=void 0;let XN=0;const We=Wi(),Lt=Wi(),df=Wi(),xe=Wi(),ft=Wi(),Yi=Wi(),Dn=Wi();function Wi(){return ld(2,++XN)}const ff=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Lt,commaOrSpaceSeparated:Dn,commaSeparated:Yi,number:xe,overloadedBoolean:df,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),hf=Object.keys(ff);class pf extends xn{constructor(t,n,r,s){let a=-1;if(super(t,n),l1(this,"space",s),typeof r=="number")for(;++a<hf.length;){const u=hf[a];l1(this,hf[a],(r&ff[u])===ff[u])}}}pf.prototype.defined=!0;function l1(e,t,n){n&&(e[t]=n)}function Fs(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new pf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ta(r)]=r,n[ta(a.attribute)]=r}return new ea(t,n,e.space)}const c1=Fs({properties:{ariaActiveDescendant:null,ariaAtomic:Lt,ariaAutoComplete:null,ariaBusy:Lt,ariaChecked:Lt,ariaColCount:xe,ariaColIndex:xe,ariaColSpan:xe,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:Lt,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:Lt,ariaFlowTo:ft,ariaGrabbed:Lt,ariaHasPopup:null,ariaHidden:Lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:xe,ariaLive:null,ariaModal:Lt,ariaMultiLine:Lt,ariaMultiSelectable:Lt,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:xe,ariaPressed:Lt,ariaReadOnly:Lt,ariaRelevant:null,ariaRequired:Lt,ariaRoleDescription:ft,ariaRowCount:xe,ariaRowIndex:xe,ariaRowSpan:xe,ariaSelected:Lt,ariaSetSize:xe,ariaSort:null,ariaValueMax:xe,ariaValueMin:xe,ariaValueNow:xe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function d1(e,t){return t in e?e[t]:t}function f1(e,t){return d1(e,t.toLowerCase())}const QN=Fs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yi,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alpha:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:ft,autoFocus:We,autoPlay:We,blocking:ft,capture:null,charSet:null,checked:We,cite:null,className:ft,closedBy:null,colorSpace:null,cols:xe,colSpan:xe,command:null,commandFor:null,content:null,contentEditable:Lt,controls:We,controlsList:ft,coords:xe|Yi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:df,draggable:Lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:ft,height:xe,hidden:df,high:xe,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:ft,itemRef:ft,itemScope:We,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:xe,pattern:null,ping:ft,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:ft,required:We,reversed:We,rows:xe,rowSpan:xe,sandbox:ft,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootCustomElementRegistry:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shadowRootSerializable:We,shape:null,size:xe,sizes:null,slot:null,span:xe,spellCheck:Lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:xe,step:null,style:null,tabIndex:xe,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Lt,width:xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:xe,borderColor:null,bottomMargin:xe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:xe,rules:null,scheme:null,scrolling:Lt,standby:null,summary:null,text:null,topMargin:xe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:xe,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:We,disablePictureInPicture:We,disableRemotePlayback:We,exportParts:Yi,part:ft,prefix:null,property:null,results:xe,security:null,unselectable:null},space:"html",transform:f1}),KN=Fs({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",maskType:"mask-type",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:Dn,accentHeight:xe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:xe,amplitude:xe,arabicForm:null,ascent:xe,attributeName:null,attributeType:null,azimuth:xe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:xe,by:null,calcMode:null,capHeight:xe,className:ft,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:xe,diffuseConstant:xe,direction:null,display:null,dur:null,divisor:xe,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:xe,enableBackground:null,end:null,event:null,exponent:xe,externalResourcesRequired:null,fill:null,fillOpacity:xe,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:Yi,g2:Yi,glyphName:Yi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:xe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:xe,horizOriginX:xe,horizOriginY:xe,id:null,ideographic:xe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:xe,k:xe,k1:xe,k2:xe,k3:xe,k4:xe,kernelMatrix:Dn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:xe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:xe,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:xe,overlineThickness:xe,paintOrder:null,panose1:null,path:null,pathLength:xe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xe,pointsAtY:xe,pointsAtZ:xe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Dn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Dn,rev:Dn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Dn,requiredFeatures:Dn,requiredFonts:Dn,requiredFormats:Dn,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:xe,specularExponent:xe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:xe,strikethroughThickness:xe,string:null,stroke:null,strokeDashArray:Dn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:xe,strokeOpacity:xe,strokeWidth:null,style:null,surfaceScale:xe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Dn,tabIndex:xe,tableValues:null,target:null,targetX:xe,targetY:xe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Dn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:xe,underlineThickness:xe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:xe,values:null,vAlphabetic:xe,vMathematical:xe,vectorEffect:null,vHanging:xe,vIdeographic:xe,version:null,vertAdvY:xe,vertOriginX:xe,vertOriginY:xe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:xe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:d1}),h1=Fs({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()}}),p1=Fs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:f1}),m1=Fs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),JN={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"},ZN=/[A-Z]/g,g1=/-[a-z]/g,ek=/^data[-\w.:]+$/i;function Ju(e,t){const n=ta(t);let r=t,s=xn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ek.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(g1,nk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!g1.test(a)){let u=a.replace(ZN,tk);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=pf}return new s(r,t)}function tk(e){return"-"+e.toLowerCase()}function nk(e){return e.charAt(1).toUpperCase()}const na=u1([c1,QN,h1,p1,m1],"html"),ii=u1([c1,KN,h1,p1,m1],"svg");function E1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function y1(e){return e.join(" ").trim()}var Bs={},mf,T1;function rk(){if(T1)return mf;T1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
24
+ `,f="/",p="*",m="",b="comment",y="declaration";function x(v,w){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];w=w||{};var k=1,C=1;function j(de){var oe=de.match(t);oe&&(k+=oe.length);var Se=de.lastIndexOf(d);C=~Se?de.length-Se:C+de.length}function G(){var de={line:k,column:C};return function(oe){return oe.position=new L(de),fe(),oe}}function L(de){this.start=de,this.end={line:k,column:C},this.source=w.source}L.prototype.content=v;function W(de){var oe=new Error(w.source+":"+k+":"+C+": "+de);if(oe.reason=de,oe.filename=w.source,oe.line=k,oe.column=C,oe.source=v,!w.silent)throw oe}function ie(de){var oe=de.exec(v);if(oe){var Se=oe[0];return j(Se),v=v.slice(Se.length),oe}}function fe(){ie(n)}function $(de){var oe;for(de=de||[];oe=le();)oe!==!1&&de.push(oe);return de}function le(){var de=G();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var oe=2;m!=v.charAt(oe)&&(p!=v.charAt(oe)||f!=v.charAt(oe+1));)++oe;if(oe+=2,m===v.charAt(oe-1))return W("End of comment missing");var Se=v.slice(2,oe-2);return C+=2,j(Se),v=v.slice(oe),C+=2,de({type:b,comment:Se})}}function Z(){var de=G(),oe=ie(r);if(oe){if(le(),!ie(s))return W("property missing ':'");var Se=ie(a),se=de({type:y,property:A(oe[0].replace(e,m)),value:Se?A(Se[0].replace(e,m)):m});return ie(u),se}}function Ae(){var de=[];$(de);for(var oe;oe=Z();)oe!==!1&&(de.push(oe),$(de));return de}return fe(),Ae()}function A(v){return v?v.replace(c,m):m}return mf=x,mf}var b1;function ik(){if(b1)return Bs;b1=1;var e=Bs&&Bs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.default=n;const t=e(rk());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),c=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Bs}var ra={},x1;function sk(){if(x1)return ra;x1=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,c):f=f.replace(r,c),f.replace(t,u))};return ra.camelCase=d,ra}var ia,_1;function ok(){if(_1)return ia;_1=1;var e=ia&&ia.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(ik()),n=sk();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,ia=r,ia}var ak=ok();const uk=Ze(ak),Zu=w1("end"),br=w1("start");function w1(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 S1(e){const t=br(e),n=Zu(e);if(t&&n)return{start:t,end:n}}function sa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?v1(e.position):"start"in e||"end"in e?v1(e):"line"in e||"column"in e?gf(e):""}function gf(e){return A1(e&&e.line)+":"+A1(e&&e.column)}function v1(e){return gf(e&&e.start)+"-"+gf(e&&e.end)}function A1(e){return e&&typeof e=="number"?e:1}class rn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",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=H({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=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=s,this.line=c?c.line:void 0,this.name=sa(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=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}rn.prototype.file="",rn.prototype.name="",rn.prototype.reason="",rn.prototype.message="",rn.prototype.stack="",rn.prototype.column=void 0,rn.prototype.line=void 0,rn.prototype.ancestors=void 0,rn.prototype.cause=void 0,rn.prototype.fatal=void 0,rn.prototype.place=void 0,rn.prototype.ruleId=void 0,rn.prototype.source=void 0;const Ef={}.hasOwnProperty,lk=new Map,ck=/[A-Z]/g,dk=new Set(["table","tbody","thead","tfoot","tr"]),fk=new Set(["td","th"]),N1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hk(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=xk(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=bk(n,t.jsx,t.jsxs)}const s={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"?ii:na,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=k1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function k1(e,t,n){if(t.type==="element")return pk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return mk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ek(e,t,n);if(t.type==="mdxjsEsm")return gk(e,t);if(t.type==="root")return yk(e,t,n);if(t.type==="text")return Tk(e,t)}function pk(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=O1(e,t.tagName,!1),u=_k(e,t);let c=Tf(e,t);return dk.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!GN(d):!0})),C1(e,u,a,t),yf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function mk(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)}oa(e,t.position)}function gk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);oa(e,t.position)}function Ek(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:O1(e,t.name,!0),u=wk(e,t),c=Tf(e,t);return C1(e,u,a,t),yf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function yk(e,t,n){const r={};return yf(r,Tf(e,t)),e.create(t,e.Fragment,r,n)}function Tk(e,t){return t.value}function C1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function yf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function bk(e,t,n){return r;function r(s,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function xk(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=br(r);return t(s,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function _k(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Ef.call(t.properties,s)){const a=Sk(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&fk.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 wk(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 oa(e,t.position);else{const s=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 oa(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Tf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:lk;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 f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const c=k1(e,a,u);c!==void 0&&n.push(c)}return n}function Sk(e,t,n){const r=Ju(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?s1(n):y1(n)),r.property==="style"){let s=typeof n=="object"?n:vk(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Ak(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?JN[r.property]||r.property:r.attribute,n]}}function vk(e,t){try{return uk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new rn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=N1+"#cannot-parse-style-attribute",s}}function O1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const c=o1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=o1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Ef.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);oa(e)}function oa(e,t){const n=new rn("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=N1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Ak(e){const t={};let n;for(n in e)Ef.call(e,n)&&(t[Nk(n)]=e[n]);return t}function Nk(e){let t=e.replace(ck,kk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kk(e){return"-"+e.toLowerCase()}const bf={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"]},Ck={};function xf(e,t){const n=Ck,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return I1(e,r,s)}function I1(e,t,n){if(Ok(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 P1(e.children,t,n)}return Array.isArray(e)?P1(e,t,n):""}function P1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=I1(e[s],t,n);return r.join("")}function Ok(e){return!!(e&&typeof e=="object")}const R1=document.createElement("i");function _f(e){const t="&"+e+";";R1.innerHTML=t;const n=R1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Mn(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s: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 Vn(e,t){return e.length>0?(Mn(e,e.length,0,t),e):t}const L1={}.hasOwnProperty;function D1(e){const t={};let n=-1;for(;++n<e.length;)Ik(t,e[n]);return t}function Ik(e,t){let n;for(n in t){const s=(L1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){L1.call(s,u)||(s[u]=[]);const c=a[u];Pk(s[u],Array.isArray(c)?c:c?[c]:[])}}}function Pk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Mn(e,0,0,r)}function M1(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 sr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pn=si(/[A-Za-z]/),sn=si(/[\dA-Za-z]/),Rk=si(/[#-'*+\--9=?A-Z^-~]/);function el(e){return e!==null&&(e<32||e===127)}const wf=si(/\d/),Lk=si(/[\dA-Fa-f]/),Dk=si(/[!-/:-@[-`{-~]/);function He(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function et(e){return e===-2||e===-1||e===32}const tl=si(new RegExp("\\p{P}|\\p{S}","u")),Gi=si(/\s/);function si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Us(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&sn(e.charCodeAt(n+1))&&sn(e.charCodeAt(n+2)))s=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),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function nt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return et(d)?(e.enter(n),c(d)):t(d)}function c(d){return et(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const Mk={tokenize:Fk};function Fk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),nt(e,t,"linePrefix")}function s(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 He(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const Bk={tokenize:Uk},F1={tokenize:Hk};function Uk(e){const t=this,n=[];let r=0,s,a,u;return c;function c(C){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&k();const j=t.events.length;let G=j,L;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){L=t.events[G][1].end;break}w(r);let W=j;for(;W<t.events.length;)t.events[W][1].end=H({},L),W++;return Mn(t.events,G+1,0,t.events.slice(j)),t.events.length=W,f(C)}return c(C)}function f(C){if(r===n.length){if(!s)return b(C);if(s.currentConstruct&&s.currentConstruct.concrete)return x(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(F1,p,m)(C)}function p(C){return s&&k(),w(r),b(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(C)}function b(C){return t.containerState={},e.attempt(F1,y,x)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),b(C)}function x(C){if(C===null){s&&k(),w(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),A(C)}function A(C){if(C===null){v(e.exit("chunkFlow"),!0),w(0),e.consume(C);return}return He(C)?(e.consume(C),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(C),A)}function v(C,j){const G=t.sliceStream(C);if(j&&G.push(null),C.previous=a,a&&(a.next=C),a=C,s.defineSkip(C.start),s.write(G),t.parser.lazy[C.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<u&&(!s.events[L][1].end||s.events[L][1].end.offset>u))return;const W=t.events.length;let ie=W,fe,$;for(;ie--;)if(t.events[ie][0]==="exit"&&t.events[ie][1].type==="chunkFlow"){if(fe){$=t.events[ie][1].end;break}fe=!0}for(w(r),L=W;L<t.events.length;)t.events[L][1].end=H({},$),L++;Mn(t.events,ie+1,0,t.events.slice(W)),t.events.length=L}}function w(C){let j=n.length;for(;j-- >C;){const G=n[j];t.containerState=G[1],G[0].exit.call(t,e)}n.length=C}function k(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function Hk(e,t,n){return nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Hs(e){if(e===null||ht(e)||Gi(e))return 1;if(tl(e))return 2}function nl(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Sf={name:"attention",resolveAll:jk,tokenize:zk};function jk(e,t){let n=-1,r,s,a,u,c,d,f,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 m=H({},e[r][1].end),b=H({},e[n][1].start);B1(m,-d),B1(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:H({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:H({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:H({},e[r][1].end),end:H({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:H({},u.start),end:H({},c.end)},e[r][1].end=H({},u.start),e[n][1].start=H({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Vn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Vn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Vn(f,nl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Vn(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=Vn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Mn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function zk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Hs(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 f=e.exit("attentionSequence"),p=Hs(d),m=!p||p===2&&s||n.includes(d),b=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!b)),f._close=!!(a===42?b:b&&(p||!m)),t(d)}}function B1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const $k={name:"autolink",tokenize:Vk};function Vk(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return pn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||sn(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||sn(y))&&r++<32?(e.consume(y),c):(r=0,f(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||el(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):Rk(y)?(e.consume(y),f):n(y)}function p(y){return sn(y)?m(y):n(y)}function m(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):b(y)}function b(y){if((y===45||sn(y))&&r++<63){const x=y===45?b:m;return e.consume(y),x}return n(y)}}const aa={partial:!0,tokenize:qk};function qk(e,t,n){return r;function r(a){return et(a)?nt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||He(a)?t(a):n(a)}}const U1={continuation:{tokenize:Wk},exit:Gk,name:"blockQuote",tokenize:Yk};function Yk(e,t,n){const r=this;return s;function s(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 et(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function Wk(e,t,n){const r=this;return s;function s(u){return et(u)?nt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(U1,t,n)(u)}}function Gk(e){e.exit("blockQuote")}const H1={name:"characterEscape",tokenize:Xk};function Xk(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return Dk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const j1={name:"characterReference",tokenize:Qk};function Qk(e,t,n){const r=this;let s=0,a,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=sn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=Lk,p):(e.enter("characterReferenceValue"),a=7,u=wf,p(m))}function p(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return u===sn&&!_f(r.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const z1={partial:!0,tokenize:Jk},$1={concrete:!0,name:"codeFenced",tokenize:Kk};function Kk(e,t,n){const r=this,s={partial:!0,tokenize:G};let a=0,u=0,c;return d;function d(L){return f(L)}function f(L){const W=r.events[r.events.length-1];return a=W&&W[1].type==="linePrefix"?W[2].sliceSerialize(W[1],!0).length:0,c=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===c?(u++,e.consume(L),p):u<3?n(L):(e.exit("codeFencedFenceSequence"),et(L)?nt(e,m,"whitespace")(L):m(L))}function m(L){return L===null||He(L)?(e.exit("codeFencedFence"),r.interrupt?t(L):e.check(z1,A,j)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(L))}function b(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(L)):et(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,y,"whitespace")(L)):L===96&&L===c?n(L):(e.consume(L),b)}function y(L){return L===null||He(L)?m(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(L))}function x(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(L)):L===96&&L===c?n(L):(e.consume(L),x)}function A(L){return e.attempt(s,j,v)(L)}function v(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),w}function w(L){return a>0&&et(L)?nt(e,k,"linePrefix",a+1)(L):k(L)}function k(L){return L===null||He(L)?e.check(z1,A,j)(L):(e.enter("codeFlowValue"),C(L))}function C(L){return L===null||He(L)?(e.exit("codeFlowValue"),k(L)):(e.consume(L),C)}function j(L){return e.exit("codeFenced"),t(L)}function G(L,W,ie){let fe=0;return $;function $(oe){return L.enter("lineEnding"),L.consume(oe),L.exit("lineEnding"),le}function le(oe){return L.enter("codeFencedFence"),et(oe)?nt(L,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):Z(oe)}function Z(oe){return oe===c?(L.enter("codeFencedFenceSequence"),Ae(oe)):ie(oe)}function Ae(oe){return oe===c?(fe++,L.consume(oe),Ae):fe>=u?(L.exit("codeFencedFenceSequence"),et(oe)?nt(L,de,"whitespace")(oe):de(oe)):ie(oe)}function de(oe){return oe===null||He(oe)?(L.exit("codeFencedFence"),W(oe)):ie(oe)}}}function Jk(e,t,n){const r=this;return s;function s(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 vf={name:"codeIndented",tokenize:eC},Zk={partial:!0,tokenize:tC};function eC(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),nt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):He(f)?e.attempt(Zk,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||He(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function tC(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):nt(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):He(u)?s(u):n(u)}}const nC={name:"codeText",previous:iC,resolve:rC,tokenize:sC};function rC(e){let t=e.length-4,n=3,r,s;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;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function iC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sC(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):He(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||He(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class oC{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 s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&ua(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),ua(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ua(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);ua(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ua(this.left,n.reverse())}}}function ua(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 V1(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new oC(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,aC(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=H({},p.get(s)[1].start),c=p.slice(s,n),c.unshift(r),p.splice(s,n-s+1,c))}}return Mn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function aC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=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=[],f={};let p,m,b=-1,y=n,x=0,A=0;const v=[A];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(A=b+1,v.push(A),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):v.pop(),b=v.length;b--;){const w=c.slice(v[b],v[b+1]),k=a.pop();d.push([k,k+w.length-1]),e.splice(k,2,w)}for(d.reverse(),b=-1;++b<d.length;)f[x+d[b][0]]=x+d[b][1],x+=d[b][1]-d[b][0]-1;return f}const uC={resolve:cC,tokenize:dC},lC={partial:!0,tokenize:fC};function cC(e){return V1(e),e}function dC(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):He(c)?e.check(lC,u,a)(c):(e.consume(c),s)}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,s}}function fC(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),nt(e,a,"linePrefix")}function a(u){if(u===null||He(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 q1(e,t,n,r,s,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(w){return w===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(w),e.exit(a),b):w===null||w===32||w===41||el(w)?n(w):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),A(w))}function b(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===62?(e.exit("chunkString"),e.exit(c),b(w)):w===null||w===60||He(w)?n(w):(e.consume(w),w===92?x:y)}function x(w){return w===60||w===62||w===92?(e.consume(w),y):y(w)}function A(w){return!p&&(w===null||w===41||ht(w))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(w)):p<f&&w===40?(e.consume(w),p++,A):w===41?(e.consume(w),p--,A):w===null||w===32||w===40||el(w)?n(w):(e.consume(w),w===92?v:A)}function v(w){return w===40||w===41||w===92?(e.consume(w),A):A(w)}}function Y1(e,t,n,r,s,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),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(s),e.consume(y),e.exit(s),e.exit(r),t):He(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!et(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function W1(e,t,n,r,s,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):He(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),nt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||He(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:p)}function m(b){return b===u||b===92?(e.consume(b),p):p(b)}}function la(e,t){let n;return r;function r(s){return He(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):et(s)?nt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const hC={name:"definition",tokenize:mC},pC={partial:!0,tokenize:gC};function mC(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return Y1.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=sr(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 ht(y)?la(e,f)(y):f(y)}function f(y){return q1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(pC,m,m)(y)}function m(y){return et(y)?nt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||He(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function gC(e,t,n){return r;function r(c){return ht(c)?la(e,s)(c):n(c)}function s(c){return W1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return et(c)?nt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||He(c)?t(c):n(c)}}const EC={name:"hardBreakEscape",tokenize:yC};function yC(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return He(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const TC={name:"headingAtx",resolve:bC,tokenize:xC};function bC(e,t){let n=e.length-2,r=3,s,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&&(s={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"},Mn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function xC(e,t,n){let r=0;return s;function s(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||ht(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||He(p)?(e.exit("atxHeading"),t(p)):et(p)?nt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ht(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const _C=["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"],G1=["pre","script","style","textarea"],wC={concrete:!0,name:"htmlFlow",resolveTo:AC,tokenize:NC},SC={partial:!0,tokenize:CC},vC={partial:!0,tokenize:kC};function AC(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 NC(e,t,n){const r=this;let s,a,u,c,d;return f;function f(P){return p(P)}function p(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),b):P===47?(e.consume(P),a=!0,A):P===63?(e.consume(P),s=3,r.interrupt?t:N):pn(P)?(e.consume(P),u=String.fromCharCode(P),v):n(P)}function b(P){return P===45?(e.consume(P),s=2,y):P===91?(e.consume(P),s=5,c=0,x):pn(P)?(e.consume(P),s=4,r.interrupt?t:N):n(P)}function y(P){return P===45?(e.consume(P),r.interrupt?t:N):n(P)}function x(P){const ve="CDATA[";return P===ve.charCodeAt(c++)?(e.consume(P),c===ve.length?r.interrupt?t:Z:x):n(P)}function A(P){return pn(P)?(e.consume(P),u=String.fromCharCode(P),v):n(P)}function v(P){if(P===null||P===47||P===62||ht(P)){const ve=P===47,Ce=u.toLowerCase();return!ve&&!a&&G1.includes(Ce)?(s=1,r.interrupt?t(P):Z(P)):_C.includes(u.toLowerCase())?(s=6,ve?(e.consume(P),w):r.interrupt?t(P):Z(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):a?k(P):C(P))}return P===45||sn(P)?(e.consume(P),u+=String.fromCharCode(P),v):n(P)}function w(P){return P===62?(e.consume(P),r.interrupt?t:Z):n(P)}function k(P){return et(P)?(e.consume(P),k):$(P)}function C(P){return P===47?(e.consume(P),$):P===58||P===95||pn(P)?(e.consume(P),j):et(P)?(e.consume(P),C):$(P)}function j(P){return P===45||P===46||P===58||P===95||sn(P)?(e.consume(P),j):G(P)}function G(P){return P===61?(e.consume(P),L):et(P)?(e.consume(P),G):C(P)}function L(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),d=P,W):et(P)?(e.consume(P),L):ie(P)}function W(P){return P===d?(e.consume(P),d=null,fe):P===null||He(P)?n(P):(e.consume(P),W)}function ie(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||ht(P)?G(P):(e.consume(P),ie)}function fe(P){return P===47||P===62||et(P)?C(P):n(P)}function $(P){return P===62?(e.consume(P),le):n(P)}function le(P){return P===null||He(P)?Z(P):et(P)?(e.consume(P),le):n(P)}function Z(P){return P===45&&s===2?(e.consume(P),Se):P===60&&s===1?(e.consume(P),se):P===62&&s===4?(e.consume(P),D):P===63&&s===3?(e.consume(P),N):P===93&&s===5?(e.consume(P),ae):He(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(SC,ee,Ae)(P)):P===null||He(P)?(e.exit("htmlFlowData"),Ae(P)):(e.consume(P),Z)}function Ae(P){return e.check(vC,de,ee)(P)}function de(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),oe}function oe(P){return P===null||He(P)?Ae(P):(e.enter("htmlFlowData"),Z(P))}function Se(P){return P===45?(e.consume(P),N):Z(P)}function se(P){return P===47?(e.consume(P),u="",Y):Z(P)}function Y(P){if(P===62){const ve=u.toLowerCase();return G1.includes(ve)?(e.consume(P),D):Z(P)}return pn(P)&&u.length<8?(e.consume(P),u+=String.fromCharCode(P),Y):Z(P)}function ae(P){return P===93?(e.consume(P),N):Z(P)}function N(P){return P===62?(e.consume(P),D):P===45&&s===2?(e.consume(P),N):Z(P)}function D(P){return P===null||He(P)?(e.exit("htmlFlowData"),ee(P)):(e.consume(P),D)}function ee(P){return e.exit("htmlFlow"),t(P)}}function kC(e,t,n){const r=this;return s;function s(u){return He(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 CC(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(aa,t,n)}}const OC={name:"htmlText",tokenize:IC};function IC(e,t,n){const r=this;let s,a,u;return c;function c(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),G):N===63?(e.consume(N),C):pn(N)?(e.consume(N),ie):n(N)}function f(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),a=0,x):pn(N)?(e.consume(N),k):n(N)}function p(N){return N===45?(e.consume(N),y):n(N)}function m(N){return N===null?n(N):N===45?(e.consume(N),b):He(N)?(u=m,se(N)):(e.consume(N),m)}function b(N){return N===45?(e.consume(N),y):m(N)}function y(N){return N===62?Se(N):N===45?b(N):m(N)}function x(N){const D="CDATA[";return N===D.charCodeAt(a++)?(e.consume(N),a===D.length?A:x):n(N)}function A(N){return N===null?n(N):N===93?(e.consume(N),v):He(N)?(u=A,se(N)):(e.consume(N),A)}function v(N){return N===93?(e.consume(N),w):A(N)}function w(N){return N===62?Se(N):N===93?(e.consume(N),w):A(N)}function k(N){return N===null||N===62?Se(N):He(N)?(u=k,se(N)):(e.consume(N),k)}function C(N){return N===null?n(N):N===63?(e.consume(N),j):He(N)?(u=C,se(N)):(e.consume(N),C)}function j(N){return N===62?Se(N):C(N)}function G(N){return pn(N)?(e.consume(N),L):n(N)}function L(N){return N===45||sn(N)?(e.consume(N),L):W(N)}function W(N){return He(N)?(u=W,se(N)):et(N)?(e.consume(N),W):Se(N)}function ie(N){return N===45||sn(N)?(e.consume(N),ie):N===47||N===62||ht(N)?fe(N):n(N)}function fe(N){return N===47?(e.consume(N),Se):N===58||N===95||pn(N)?(e.consume(N),$):He(N)?(u=fe,se(N)):et(N)?(e.consume(N),fe):Se(N)}function $(N){return N===45||N===46||N===58||N===95||sn(N)?(e.consume(N),$):le(N)}function le(N){return N===61?(e.consume(N),Z):He(N)?(u=le,se(N)):et(N)?(e.consume(N),le):fe(N)}function Z(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),s=N,Ae):He(N)?(u=Z,se(N)):et(N)?(e.consume(N),Z):(e.consume(N),de)}function Ae(N){return N===s?(e.consume(N),s=void 0,oe):N===null?n(N):He(N)?(u=Ae,se(N)):(e.consume(N),Ae)}function de(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||ht(N)?fe(N):(e.consume(N),de)}function oe(N){return N===47||N===62||ht(N)?fe(N):n(N)}function Se(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function se(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Y}function Y(N){return et(N)?nt(e,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ae(N)}function ae(N){return e.enter("htmlTextData"),u(N)}}const Af={name:"labelEnd",resolveAll:DC,resolveTo:MC,tokenize:FC},PC={tokenize:BC},RC={tokenize:UC},LC={tokenize:HC};function DC(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 s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Mn(e,0,e.length,n),e}function MC(e,t){let n=e.length,r=0,s,a,u,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:H({},e[a][1].start),end:H({},e[e.length-1][1].end)},f={type:"label",start:H({},e[a][1].start),end:H({},e[u][1].end)},p={type:"labelText",start:H({},e[a+r+2][1].end),end:H({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=Vn(c,e.slice(a+1,a+r+3)),c=Vn(c,[["enter",p,t]]),c=Vn(c,nl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Vn(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=Vn(c,e.slice(u+1)),c=Vn(c,[["exit",d,t]]),Mn(e,a,e.length,c),e}function FC(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(b){return a?a._inactive?m(b):(u=r.parser.defined.includes(sr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(PC,p,u?p:m)(b):b===91?e.attempt(RC,p,u?f:m)(b):u?p(b):m(b)}function f(b){return e.attempt(LC,p,m)(b)}function p(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function BC(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return ht(m)?la(e,a)(m):a(m)}function a(m){return m===41?p(m):q1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ht(m)?la(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?W1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ht(m)?la(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function UC(e,t,n){const r=this;return s;function s(c){return Y1.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(sr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function HC(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const jC={name:"labelStartImage",resolveAll:Af.resolveAll,tokenize:zC};function zC(e,t,n){const r=this;return s;function s(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 $C={name:"labelStartLink",resolveAll:Af.resolveAll,tokenize:VC};function VC(e,t,n){const r=this;return s;function s(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 Nf={name:"lineEnding",tokenize:qC};function qC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const rl={name:"thematicBreak",tokenize:YC};function YC(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||He(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),et(f)?nt(e,c,"whitespace")(f):c(f))}}const _n={continuation:{tokenize:QC},exit:JC,name:"list",tokenize:XC},WC={partial:!0,tokenize:ZC},GC={partial:!0,tokenize:KC};function XC(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[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:wf(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(rl,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return wf(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"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(aa,r.interrupt?n:p,e.attempt(WC,b,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return et(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function QC(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(aa,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!et(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(GC,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,nt(e,e.attempt(_n,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function KC(e,t,n){const r=this;return nt(e,s,"listItemIndent",r.containerState.size+1);function s(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 JC(e){e.exit(this.containerState.type)}function ZC(e,t,n){const r=this;return nt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!et(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const X1={name:"setextUnderline",resolveTo:e3,tokenize:t3};function e3(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:H({},e[r][1].start),end:H({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=H({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function t3(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),et(f)?nt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||He(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const n3={tokenize:r3};function r3(e){const t=this,n=e.attempt(aa,r,e.attempt(this.parser.constructs.flowInitial,s,nt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(uC,s)),"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 s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const i3={resolveAll:K1()},s3=Q1("string"),o3=Q1("text");function Q1(e){return{resolveAll:K1(e==="text"?a3:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,c);return u;function u(p){return f(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 f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function K1(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function a3(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],s=t.sliceStream(r);let a=s.length,u=-1,c=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={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:H({},r.end)};r.end=H({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const u3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:hC},disable:{null:[]},document:{42:_n,43:_n,45:_n,48:_n,49:_n,50:_n,51:_n,52:_n,53:_n,54:_n,55:_n,56:_n,57:_n,62:U1},flow:{35:TC,42:rl,45:[X1,rl],60:wC,61:X1,95:rl,96:$1,126:$1},flowInitial:{[-2]:vf,[-1]:vf,32:vf},insideSpan:{null:[Sf,i3]},string:{38:j1,92:H1},text:{[-5]:Nf,[-4]:Nf,[-3]:Nf,33:jC,38:j1,42:Sf,60:[$k,OC],91:$C,92:[EC,H1],93:Af,95:Sf,96:nC}},Symbol.toStringTag,{value:"Module"}));function l3(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 s={},a=[];let u=[],c=[];const d={attempt:W(G),check:W(L),consume:k,enter:C,exit:j,interrupt:W(L,{interrupt:!0})},f={code:null,containerState:{},defineSkip:A,events:[],now:x,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(le){return u=Vn(u,le),v(),u[u.length-1]!==null?[]:(ie(t,0),f.events=nl(a,f.events,f),f.events)}function b(le,Z){return d3(y(le),Z)}function y(le){return c3(u,le)}function x(){const{_bufferIndex:le,_index:Z,line:Ae,column:de,offset:oe}=r;return{_bufferIndex:le,_index:Z,line:Ae,column:de,offset:oe}}function A(le){s[le.line]=le.column,$()}function v(){let le;for(;r._index<u.length;){const Z=u[r._index];if(typeof Z=="string")for(le=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===le&&r._bufferIndex<Z.length;)w(Z.charCodeAt(r._bufferIndex));else w(Z)}}function w(le){p=p(le)}function k(le){He(le)?(r.line++,r.column=1,r.offset+=le===-3?2:1,$()):le!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=le}function C(le,Z){const Ae=Z||{};return Ae.type=le,Ae.start=x(),f.events.push(["enter",Ae,f]),c.push(Ae),Ae}function j(le){const Z=c.pop();return Z.end=x(),f.events.push(["exit",Z,f]),Z}function G(le,Z){ie(le,Z.from)}function L(le,Z){Z.restore()}function W(le,Z){return Ae;function Ae(de,oe,Se){let se,Y,ae,N;return Array.isArray(de)?ee(de):"tokenize"in de?ee([de]):D(de);function D(he){return Le;function Le(Be){const Ge=Be!==null&&he[Be],dt=Be!==null&&he.null,qt=[...Array.isArray(Ge)?Ge:Ge?[Ge]:[],...Array.isArray(dt)?dt:dt?[dt]:[]];return ee(qt)(Be)}}function ee(he){return se=he,Y=0,he.length===0?Se:P(he[Y])}function P(he){return Le;function Le(Be){return N=fe(),ae=he,he.partial||(f.currentConstruct=he),he.name&&f.parser.constructs.disable.null.includes(he.name)?Ce():he.tokenize.call(Z?Object.assign(Object.create(f),Z):f,d,ve,Ce)(Be)}}function ve(he){return le(ae,N),oe}function Ce(he){return N.restore(),++Y<se.length?P(se[Y]):Se}}}function ie(le,Z){le.resolveAll&&!a.includes(le)&&a.push(le),le.resolve&&Mn(f.events,Z,f.events.length-Z,le.resolve(f.events.slice(Z),f)),le.resolveTo&&(f.events=le.resolveTo(f.events,f))}function fe(){const le=x(),Z=f.previous,Ae=f.currentConstruct,de=f.events.length,oe=Array.from(c);return{from:de,restore:Se};function Se(){r=le,f.previous=Z,f.currentConstruct=Ae,f.events.length=de,c=oe,$()}}function $(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function c3(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function d3(e,t){let n=-1;const r=[];let s;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&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function s3(e){const r={constructs:R1([t3,...(e||{}).extensions||[]]),content:s(Ck),defined:[],document:s(Ik),flow:s(XC),lazy:{},string:s(JC),text:s(ZC)};return r;function s(a){return u;function u(l){return n3(r,a,l)}}}function o3(e){for(;!z1(e););return e}const Q1=/[\0\t\n\r]/g;function a3(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,p,m,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(Q1.lastIndex=m,f=Q1.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-m),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}m=T+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const u3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function l3(e){return e.replace(u3,c3)}function c3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return L1(n.slice(a?2:1),a?16:10)}return bf(n)||e}const K1={}.hasOwnProperty;function d3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),f3(n)(o3(s3(n).document().write(a3()(e,t,!0))))}function f3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(wn),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(Ze),blockQuote:a(ve),characterEscape:de,characterReference:de,codeFenced:a($e),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a($e,u),codeText:a(gt,u),codeTextData:de,data:de,codeFlowValue:de,definition:a(Ce),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(We),hardBreakEscape:a(Pe),hardBreakTrailing:a(Pe),htmlFlow:a(Et,u),htmlFlowData:de,htmlText:a(Et,u),htmlTextData:de,image:a(Ln),label:u,link:a(wn),listItem:a(Or),listItemValue:T,listOrdered:a(ar,m),listUnordered:a(ar),paragraph:a(ur),reference:P,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Ze),strong:a(Kl),thematicBreak:a(Zl)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:re,autolinkProtocol:Ee,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:Me,characterReferenceMarkerNumeric:Me,characterReferenceValue:_e,characterReference:ne,codeFenced:d(A),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:$,codeIndented:d(S),codeText:d(ce),codeTextData:$,data:$,definition:d(),definitionDestinationString:j,definitionLabelString:k,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(ee),hardBreakTrailing:d(ee),htmlFlow:d(xe),htmlFlowData:$,htmlText:d(fe),htmlTextData:$,image:d(le),label:ae,labelText:K,lineEnding:se,link:d(he),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Se,resourceDestinationString:N,resourceTitleString:D,resource:J,setextHeading:d(ie),setextHeadingLineSequence:W,setextHeadingText:R,strong:d(),thematicBreak:d()}};J1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let Ae={type:"root",children:[]};const Ve={stack:[Ae],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Qe=[];let nt=-1;for(;++nt<oe.length;)if(oe[nt][1].type==="listOrdered"||oe[nt][1].type==="listUnordered")if(oe[nt][0]==="enter")Qe.push(nt);else{const Gt=Qe.pop();nt=s(oe,Gt,nt)}for(nt=-1;++nt<oe.length;){const Gt=t[oe[nt][0]];K1.call(Gt,oe[nt][1].type)&&Gt[oe[nt][1].type].call(Object.assign({sliceSerialize:oe[nt][2].sliceSerialize},Ve),oe[nt][1])}if(Ve.tokenStack.length>0){const Gt=Ve.tokenStack[Ve.tokenStack.length-1];(Gt[1]||Z1).call(Ve,void 0,Gt[0])}for(Ae.position={start:oi(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:oi(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<t.transforms.length;)Ae=t.transforms[nt](Ae)||Ae;return Ae}function s(oe,Ae,Ve){let Qe=Ae-1,nt=-1,Gt=!1,Yr,Vn,mi,ls;for(;++Qe<=Ve;){const Xt=oe[Qe];switch(Xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xt[0]==="enter"?nt++:nt--,ls=void 0;break}case"lineEndingBlank":{Xt[0]==="enter"&&(Yr&&!ls&&!nt&&!mi&&(mi=Qe),ls=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ls=void 0}if(!nt&&Xt[0]==="enter"&&Xt[1].type==="listItemPrefix"||nt===-1&&Xt[0]==="exit"&&(Xt[1].type==="listUnordered"||Xt[1].type==="listOrdered")){if(Yr){let Ir=Qe;for(Vn=void 0;Ir--;){const Dn=oe[Ir];if(Dn[1].type==="lineEnding"||Dn[1].type==="lineEndingBlank"){if(Dn[0]==="exit")continue;Vn&&(oe[Vn][1].type="lineEndingBlank",Gt=!0),Dn[1].type="lineEnding",Vn=Ir}else if(!(Dn[1].type==="linePrefix"||Dn[1].type==="blockQuotePrefix"||Dn[1].type==="blockQuotePrefixWhitespace"||Dn[1].type==="blockQuoteMarker"||Dn[1].type==="listItemIndent"))break}mi&&(!Vn||mi<Vn)&&(Yr._spread=!0),Yr.end=Object.assign({},Vn?oe[Vn][1].start:Xt[1].end),oe.splice(Vn||Qe,0,["exit",Yr,Xt[2]]),Qe++,Ve++}if(Xt[1].type==="listItemPrefix"){const Ir={type:"listItem",_spread:!1,start:Object.assign({},Xt[1].start),end:void 0};Yr=Ir,oe.splice(Qe,0,["enter",Ir,Xt[2]]),Qe++,Ve++,mi=void 0,ls=!0}}}return oe[Ae][1]._spread=Gt,Ve}function a(oe,Ae){return Ve;function Ve(Qe){l.call(this,oe(Qe),Qe),Ae&&Ae.call(this,Qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(oe,Ae,Ve){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([Ae,Ve||void 0]),oe.position={start:oi(Ae.start),end:void 0}}function d(oe){return Ae;function Ae(Ve){oe&&oe.call(this,Ve),f.call(this,Ve)}}function f(oe,Ae){const Ve=this.stack.pop(),Qe=this.tokenStack.pop();if(Qe)Qe[0].type!==oe.type&&(Ae?Ae.call(this,oe,Qe[0]):(Qe[1]||Z1).call(this,oe,Qe[0]));else throw new Error("Cannot close `"+oe.type+"` ("+ea({start:oe.start,end:oe.end})+"): it’s not open");Ve.position.end=oi(oe.end)}function p(){return Tf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(oe){if(this.data.expectingFirstListItemValue){const Ae=this.stack[this.stack.length-2];Ae.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function y(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.lang=oe}function x(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.meta=oe}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe.replace(/(\r?\n|\r)$/g,"")}function k(oe){const Ae=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=Ae,Ve.identifier=nr(this.sliceSerialize(oe)).toLowerCase()}function I(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=oe}function j(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=oe}function Y(oe){const Ae=this.stack[this.stack.length-1];if(!Ae.depth){const Ve=this.sliceSerialize(oe).length;Ae.depth=Ve}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function W(oe){const Ae=this.stack[this.stack.length-1];Ae.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function ie(){this.data.setextHeadingSlurpLineEnding=void 0}function de(oe){const Ve=this.stack[this.stack.length-1].children;let Qe=Ve[Ve.length-1];(!Qe||Qe.type!=="text")&&(Qe=Jl(),Qe.position={start:oi(oe.start),end:void 0},Ve.push(Qe)),this.stack.push(Qe)}function $(oe){const Ae=this.stack.pop();Ae.value+=this.sliceSerialize(oe),Ae.position.end=oi(oe.end)}function se(oe){const Ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ve=Ae.children[Ae.children.length-1];Ve.position.end=oi(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ae.type)&&(de.call(this,oe),$.call(this,oe))}function ee(){this.data.atHardBreak=!0}function xe(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe}function fe(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe}function ce(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe}function he(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Ae,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function le(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Ae,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function K(oe){const Ae=this.sliceSerialize(oe),Ve=this.stack[this.stack.length-2];Ve.label=l3(Ae),Ve.identifier=nr(Ae).toLowerCase()}function ae(){const oe=this.stack[this.stack.length-1],Ae=this.resume(),Ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ve.type==="link"){const Qe=oe.children;Ve.children=Qe}else Ve.alt=Ae}function N(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=oe}function D(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=oe}function J(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function Se(oe){const Ae=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=Ae,Ve.identifier=nr(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function Me(oe){this.data.characterReferenceType=oe.type}function _e(oe){const Ae=this.sliceSerialize(oe),Ve=this.data.characterReferenceType;let Qe;Ve?(Qe=L1(Ae,Ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Qe=bf(Ae);const nt=this.stack[this.stack.length-1];nt.value+=Qe}function ne(oe){const Ae=this.stack.pop();Ae.position.end=oi(oe.end)}function Ee(oe){$.call(this,oe);const Ae=this.stack[this.stack.length-1];Ae.url=this.sliceSerialize(oe)}function re(oe){$.call(this,oe);const Ae=this.stack[this.stack.length-1];Ae.url="mailto:"+this.sliceSerialize(oe)}function ve(){return{type:"blockquote",children:[]}}function $e(){return{type:"code",lang:null,meta:null,value:""}}function gt(){return{type:"inlineCode",value:""}}function Ce(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function We(){return{type:"emphasis",children:[]}}function Ze(){return{type:"heading",depth:0,children:[]}}function Pe(){return{type:"break"}}function Et(){return{type:"html",value:""}}function Ln(){return{type:"image",title:null,url:"",alt:null}}function wn(){return{type:"link",title:null,url:"",children:[]}}function ar(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Or(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function ur(){return{type:"paragraph",children:[]}}function Kl(){return{type:"strong",children:[]}}function Jl(){return{type:"text",value:""}}function Zl(){return{type:"thematicBreak"}}}function oi(e){return{line:e.line,column:e.column,offset:e.offset}}function J1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?J1(e,r):h3(e,r)}}function h3(e,t){let n;for(n in t)if(K1.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 Z1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ea({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is still open")}function p3(e){const t=this;t.parser=n;function n(r){return d3(r,ue(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function m3(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 g3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
- `}]}function E3(e,t){const n=t.value?t.value+`
28
- `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[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 y3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function T3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function b3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Bs(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,l+=1,e.footnoteCounts.set(r,l);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function _3(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 x3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function eE(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 s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=r:s.push({type:"text",value:r}),s}function w3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eE(e,t);const s={src:Bs(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function S3(e,t){const n={src:Bs(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 v3(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 A3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eE(e,t);const s={href:Bs(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function N3(e,t){const n={href:Bs(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 k3(e,t,n){const r=e.all(t),s=n?C3(n):tE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const p=r[l];(s||l!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
26
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function f3(e){const r={constructs:D1([u3,...(e||{}).extensions||[]]),content:s(Mk),defined:[],document:s(Bk),flow:s(n3),lazy:{},string:s(s3),text:s(o3)};return r;function s(a){return u;function u(c){return l3(r,a,c)}}}function h3(e){for(;!V1(e););return e}const J1=/[\0\t\n\r]/g;function p3(){let e=1,t="",n=!0,r;return s;function s(a,u,c){const d=[];let f,p,m,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(J1.lastIndex=m,f=J1.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(a.slice(m,b)),e+=b-m),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}m=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const m3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function g3(e){return e.replace(m3,E3)}function E3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return M1(n.slice(a?2:1),a?16:10)}return _f(n)||e}const Z1={}.hasOwnProperty;function y3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),T3(n)(h3(f3(n).document().write(p3()(e,t,!0))))}function T3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(je),autolinkProtocol:fe,autolinkEmail:fe,atxHeading:a(ke),blockQuote:a(dt),characterEscape:fe,characterReference:fe,codeFenced:a(qt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(qt,u),codeText:a(Dt,u),codeTextData:fe,data:fe,codeFlowValue:fe,definition:a(An),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Ee),hardBreakEscape:a(K),hardBreakTrailing:a(K),htmlFlow:a(ne,u),htmlFlowData:fe,htmlText:a(ne,u),htmlTextData:fe,image:a(ge),label:u,link:a(je),listItem:a(Ct),listItemValue:b,listOrdered:a(Qe,m),listUnordered:a(Qe),paragraph:a(Nn),reference:P,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(ke),strong:a(cs),thematicBreak:a(ec)},exit:{atxHeading:d(),atxHeadingSequence:G,autolink:d(),autolinkEmail:Ge,autolinkProtocol:Be,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:Ce,characterReferenceMarkerNumeric:Ce,characterReferenceValue:he,characterReference:Le,codeFenced:d(v),codeFencedFence:A,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:$,codeIndented:d(w),codeText:d(oe),codeTextData:$,data:$,definition:d(),definitionDestinationString:j,definitionLabelString:k,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(Z),hardBreakTrailing:d(Z),htmlFlow:d(Ae),htmlFlowData:$,htmlText:d(de),htmlTextData:$,image:d(se),label:ae,labelText:Y,lineEnding:le,link:d(Se),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ve,resourceDestinationString:N,resourceTitleString:D,resource:ee,setextHeading:d(ie),setextHeadingLineSequence:W,setextHeadingText:L,strong:d(),thematicBreak:d()}};eE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ue){let we={type:"root",children:[]};const qe={stack:[we],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Je=[];let rt=-1;for(;++rt<ue.length;)if(ue[rt][1].type==="listOrdered"||ue[rt][1].type==="listUnordered")if(ue[rt][0]==="enter")Je.push(rt);else{const Kt=Je.pop();rt=s(ue,Kt,rt)}for(rt=-1;++rt<ue.length;){const Kt=t[ue[rt][0]];Z1.call(Kt,ue[rt][1].type)&&Kt[ue[rt][1].type].call(Object.assign({sliceSerialize:ue[rt][2].sliceSerialize},qe),ue[rt][1])}if(qe.tokenStack.length>0){const Kt=qe.tokenStack[qe.tokenStack.length-1];(Kt[1]||tE).call(qe,void 0,Kt[0])}for(we.position={start:oi(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:oi(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)we=t.transforms[rt](we)||we;return we}function s(ue,we,qe){let Je=we-1,rt=-1,Kt=!1,Yr,Wn,mi,ds;for(;++Je<=qe;){const Jt=ue[Je];switch(Jt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Jt[0]==="enter"?rt++:rt--,ds=void 0;break}case"lineEndingBlank":{Jt[0]==="enter"&&(Yr&&!ds&&!rt&&!mi&&(mi=Je),ds=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ds=void 0}if(!rt&&Jt[0]==="enter"&&Jt[1].type==="listItemPrefix"||rt===-1&&Jt[0]==="exit"&&(Jt[1].type==="listUnordered"||Jt[1].type==="listOrdered")){if(Yr){let Ir=Je;for(Wn=void 0;Ir--;){const Bn=ue[Ir];if(Bn[1].type==="lineEnding"||Bn[1].type==="lineEndingBlank"){if(Bn[0]==="exit")continue;Wn&&(ue[Wn][1].type="lineEndingBlank",Kt=!0),Bn[1].type="lineEnding",Wn=Ir}else if(!(Bn[1].type==="linePrefix"||Bn[1].type==="blockQuotePrefix"||Bn[1].type==="blockQuotePrefixWhitespace"||Bn[1].type==="blockQuoteMarker"||Bn[1].type==="listItemIndent"))break}mi&&(!Wn||mi<Wn)&&(Yr._spread=!0),Yr.end=Object.assign({},Wn?ue[Wn][1].start:Jt[1].end),ue.splice(Wn||Je,0,["exit",Yr,Jt[2]]),Je++,qe++}if(Jt[1].type==="listItemPrefix"){const Ir={type:"listItem",_spread:!1,start:Object.assign({},Jt[1].start),end:void 0};Yr=Ir,ue.splice(Je,0,["enter",Ir,Jt[2]]),Je++,qe++,mi=void 0,ds=!0}}}return ue[we][1]._spread=Kt,qe}function a(ue,we){return qe;function qe(Je){c.call(this,ue(Je),Je),we&&we.call(this,Je)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ue,we,qe){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([we,qe||void 0]),ue.position={start:oi(we.start),end:void 0}}function d(ue){return we;function we(qe){ue&&ue.call(this,qe),f.call(this,qe)}}function f(ue,we){const qe=this.stack.pop(),Je=this.tokenStack.pop();if(Je)Je[0].type!==ue.type&&(we?we.call(this,ue,Je[0]):(Je[1]||tE).call(this,ue,Je[0]));else throw new Error("Cannot close `"+ue.type+"` ("+sa({start:ue.start,end:ue.end})+"): it’s not open");qe.position.end=oi(ue.end)}function p(){return xf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(ue){if(this.data.expectingFirstListItemValue){const we=this.stack[this.stack.length-2];we.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.lang=ue}function x(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.meta=ue}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.value=ue.replace(/(\r?\n|\r)$/g,"")}function k(ue){const we=this.resume(),qe=this.stack[this.stack.length-1];qe.label=we,qe.identifier=sr(this.sliceSerialize(ue)).toLowerCase()}function C(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.title=ue}function j(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.url=ue}function G(ue){const we=this.stack[this.stack.length-1];if(!we.depth){const qe=this.sliceSerialize(ue).length;we.depth=qe}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function W(ue){const we=this.stack[this.stack.length-1];we.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function ie(){this.data.setextHeadingSlurpLineEnding=void 0}function fe(ue){const qe=this.stack[this.stack.length-1].children;let Je=qe[qe.length-1];(!Je||Je.type!=="text")&&(Je=Zl(),Je.position={start:oi(ue.start),end:void 0},qe.push(Je)),this.stack.push(Je)}function $(ue){const we=this.stack.pop();we.value+=this.sliceSerialize(ue),we.position.end=oi(ue.end)}function le(ue){const we=this.stack[this.stack.length-1];if(this.data.atHardBreak){const qe=we.children[we.children.length-1];qe.position.end=oi(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(we.type)&&(fe.call(this,ue),$.call(this,ue))}function Z(){this.data.atHardBreak=!0}function Ae(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.value=ue}function de(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.value=ue}function oe(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.value=ue}function Se(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=we,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function se(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=we,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function Y(ue){const we=this.sliceSerialize(ue),qe=this.stack[this.stack.length-2];qe.label=g3(we),qe.identifier=sr(we).toLowerCase()}function ae(){const ue=this.stack[this.stack.length-1],we=this.resume(),qe=this.stack[this.stack.length-1];if(this.data.inReference=!0,qe.type==="link"){const Je=ue.children;qe.children=Je}else qe.alt=we}function N(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.url=ue}function D(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.title=ue}function ee(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function ve(ue){const we=this.resume(),qe=this.stack[this.stack.length-1];qe.label=we,qe.identifier=sr(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function Ce(ue){this.data.characterReferenceType=ue.type}function he(ue){const we=this.sliceSerialize(ue),qe=this.data.characterReferenceType;let Je;qe?(Je=M1(we,qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Je=_f(we);const rt=this.stack[this.stack.length-1];rt.value+=Je}function Le(ue){const we=this.stack.pop();we.position.end=oi(ue.end)}function Be(ue){$.call(this,ue);const we=this.stack[this.stack.length-1];we.url=this.sliceSerialize(ue)}function Ge(ue){$.call(this,ue);const we=this.stack[this.stack.length-1];we.url="mailto:"+this.sliceSerialize(ue)}function dt(){return{type:"blockquote",children:[]}}function qt(){return{type:"code",lang:null,meta:null,value:""}}function Dt(){return{type:"inlineCode",value:""}}function An(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ee(){return{type:"emphasis",children:[]}}function ke(){return{type:"heading",depth:0,children:[]}}function K(){return{type:"break"}}function ne(){return{type:"html",value:""}}function ge(){return{type:"image",title:null,url:"",alt:null}}function je(){return{type:"link",title:null,url:"",children:[]}}function Qe(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function Ct(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function Nn(){return{type:"paragraph",children:[]}}function cs(){return{type:"strong",children:[]}}function Zl(){return{type:"text",value:""}}function ec(){return{type:"thematicBreak"}}}function oi(e){return{line:e.line,column:e.column,offset:e.offset}}function eE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?eE(e,r):b3(e,r)}}function b3(e,t){let n;for(n in t)if(Z1.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 tE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+sa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+sa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+sa({start:t.start,end:t.end})+") is still open")}function x3(e){const t=this;t.parser=n;function n(r){return y3(r,ce(H(H({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function _3(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 w3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
+ `}]}function S3(e,t){const n=t.value?t.value+`
28
+ `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[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 v3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function A3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function N3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Us(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-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function k3(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 C3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function nE(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 s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=r:s.push({type:"text",value:r}),s}function O3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nE(e,t);const s={src:Us(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function I3(e,t){const n={src:Us(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 P3(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 R3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nE(e,t);const s={href:Us(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function L3(e,t){const n={href:Us(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 D3(e,t,n){const r=e.all(t),s=n?M3(n):rE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.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];(s||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
29
29
  `}),p.type==="element"&&p.tagName==="p"&&!s?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
30
- `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function C3(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=tE(n[r])}return t}function tE(e){const t=e.spread;return t==null?e.children.length>1:t}function O3(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const u=r[s];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 I3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function P3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function R3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function L3(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Tr(t.children[1]),d=Gu(t.children[t.children.length-1]);l&&d&&(u.position={start:l,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function D3(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,l=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let x={type:"element",tagName:a,properties:T,children:[]};m&&(x.children=e.all(m),e.patch(m,x),x=e.applyData(m,x)),f.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function M3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const nE=9,rE=32;function F3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(iE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(iE(t.slice(s),s>0,!1)),a.join("")}function iE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===nE||a===rE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===nE||a===rE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function B3(e,t){const n={type:"text",value:F3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function U3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const H3={blockquote:m3,break:g3,code:E3,delete:y3,emphasis:T3,footnoteReference:b3,heading:_3,html:x3,imageReference:w3,image:S3,inlineCode:v3,linkReference:A3,link:N3,listItem:k3,list:O3,paragraph:I3,root:P3,strong:R3,table:L3,tableCell:M3,tableRow:D3,text:B3,thematicBreak:U3,toml:Zu,yaml:Zu,definition:Zu,footnoteDefinition:Zu};function Zu(){}const sE=-1,el=0,sa=1,tl=2,Af=3,Nf=4,kf=5,Cf=6,oE=7,aE=8,uE=typeof self=="object"?self:globalThis,lE=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new uE[e](t)},j3=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case el:case sE:return n(u,s);case sa:{const l=n([],s);for(const d of u)l.push(r(d));return l}case tl:{const l=n({},s);for(const[d,f]of u)l[r(d)]=r(f);return l}case Af:return n(new Date(u),s);case Nf:{const{source:l,flags:d}=u;return n(new RegExp(l,d),s)}case kf:{const l=n(new Map,s);for(const[d,f]of u)l.set(r(d),r(f));return l}case Cf:{const l=n(new Set,s);for(const d of u)l.add(r(d));return l}case oE:{const{name:l,message:d}=u;return n(typeof uE[l]=="function"?lE(l,d):new Error(d),s)}case aE:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:l}=new Uint8Array(u);return n(new DataView(l),u)}}return n(lE(a,u),s)};return r},cE=e=>j3(new Map,e)(0),Gi="",{toString:z3}={},{keys:$3}=Object,oa=e=>{const t=typeof e;if(t!=="object"||!e)return[el,t];const n=z3.call(e).slice(8,-1);switch(n){case"Array":return[sa,Gi];case"Object":return[tl,Gi];case"Date":return[Af,Gi];case"RegExp":return[Nf,Gi];case"Map":return[kf,Gi];case"Set":return[Cf,Gi];case"DataView":return[sa,n]}return n.includes("Array")?[sa,n]:e instanceof Error?[oE,e.name||"Error"]:[tl,n]},nl=([e,t])=>e===el&&(t==="function"||t==="symbol"),V3=(e,t,n,r)=>{const s=(u,l)=>{const d=r.push(u)-1;return n.set(l,d),d},a=u=>{if(n.has(u))return n.get(u);let[l,d]=oa(u);switch(l){case el:{let p=u;switch(d){case"bigint":l=aE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([sE],u)}return s([l,p],u)}case sa:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),s([d,[...T]],u)}const p=[],m=s([l,p],u);for(const T of u)p.push(a(T));return m}case tl:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=s([l,p],u);for(const T of $3(u))(e||!nl(oa(u[T])))&&p.push([a(T),a(u[T])]);return m}case Af:return s([l,isNaN(u.getTime())?Gi:u.toISOString()],u);case Nf:{const{source:p,flags:m}=u;return s([l,{source:p,flags:m}],u)}case kf:{const p=[],m=s([l,p],u);for(const[T,y]of u)(e||!(nl(oa(T))||nl(oa(y))))&&p.push([a(T),a(y)]);return m}case Cf:{const p=[],m=s([l,p],u);for(const T of u)(e||!nl(oa(T)))&&p.push(a(T));return m}}const{message:f}=u;return s([l,{name:d,message:f}],u)};return a},dE=(e,{json:t,lossy:n}={})=>{const r=[];return V3(!(t||n),!!t,new Map,r)(e),r},Xi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?cE(dE(e,t)):structuredClone(e):(e,t)=>cE(dE(e,t));function q3(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 Y3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function W3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||q3,r=e.options.footnoteBackLabel||Y3,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),T=Bs(m.toLowerCase());let y=0;const x=[],v=e.footnoteCounts.get(m);for(;v!==void 0&&++y<=v;){x.length>0&&x.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),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(k)?k:[k]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const k=A.children[A.children.length-1];k&&k.type==="text"?k.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...x)}else p.push(...x);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,S),l.push(S)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:ue(U({},Xi(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
31
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
32
- `}]}}const rl=(function(e){if(e==null)return K3;if(typeof e=="function")return il(e);if(typeof e=="object")return Array.isArray(e)?G3(e):X3(e);if(typeof e=="string")return Q3(e);throw new Error("Expected function, string, or object as test")});function G3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rl(e[n]);return il(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function X3(e){const t=e;return il(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function Q3(e){return il(t);function t(n){return n&&n.type===e}}function il(e){return t;function t(n,r,s){return!!(J3(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function K3(){return!0}function J3(e){return e!==null&&typeof e=="object"&&"type"in e}function j7(e){return e}const fE=[],Z3=!0,Of=!1,eO="skip";function hE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=rl(s),u=r?-1:1;l(e,void 0,[])();function l(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=fE,x,v,A;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=tO(n(d,p)),y[0]===Of))return y;if("children"in d&&d.children){const S=d;if(S.children&&y[0]!==eO)for(v=(r?S.children.length:-1)+u,A=p.concat(S);v>-1&&v<S.children.length;){const k=S.children[v];if(x=l(k,v,A)(),x[0]===Of)return x;v=typeof x[1]=="number"?x[1]:v+u}}return y}}}function tO(e){return Array.isArray(e)?e:typeof e=="number"?[Z3,e]:e==null?fE:[e]}function sl(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),hE(e,a,l,s);function l(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const If={}.hasOwnProperty,nO={};function rO(e,t){const n=t||nO,r=new Map,s=new Map,a=new Map,u=U(U({},H3),n.handlers),l={all:f,applyData:sO,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:iO,wrap:aO};return sl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,T=String(p.identifier).toUpperCase();m.has(T)||m.set(T,p)}}),l;function d(p,m){const T=p.type,y=l.handlers[T];if(If.call(l.handlers,T)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(T)){if("children"in p){const v=p,{children:A}=v,S=pn(v,["children"]),k=Xi(S);return k.children=l.all(p),k}return Xi(p)}return(l.options.unknownHandler||oO)(l,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const x=l.one(T[y],p);if(x){if(y&&T[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=pE(x.value)),!Array.isArray(x)&&x.type==="element")){const v=x.children[0];v&&v.type==="text"&&(v.value=pE(v.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function iO(e,t){e.position&&(t.position=x1(e))}function sO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=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,Xi(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function oO(e,t){const n=t.data||{},r="value"in t&&!(If.call(n,"hProperties")||If.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 aO(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
30
+ `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function M3(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=rE(n[r])}return t}function rE(e){const t=e.spread;return t==null?e.children.length>1:t}function F3(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const u=r[s];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 B3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function U3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function H3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function j3(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=br(t.children[1]),d=Zu(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function z3(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 f=[];for(;++d<c;){const m=t.children[d],b={},y=u?u[d]:void 0;y&&(b.align=y);let x={type:"element",tagName:a,properties:b,children:[]};m&&(x.children=e.all(m),e.patch(m,x),x=e.applyData(m,x)),f.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function $3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const iE=9,sE=32;function V3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(oE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(oE(t.slice(s),s>0,!1)),a.join("")}function oE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===iE||a===sE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===iE||a===sE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function q3(e,t){const n={type:"text",value:V3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Y3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const W3={blockquote:_3,break:w3,code:S3,delete:v3,emphasis:A3,footnoteReference:N3,heading:k3,html:C3,imageReference:O3,image:I3,inlineCode:P3,linkReference:R3,link:L3,listItem:D3,list:F3,paragraph:B3,root:U3,strong:H3,table:j3,tableCell:$3,tableRow:z3,text:q3,thematicBreak:Y3,toml:il,yaml:il,definition:il,footnoteDefinition:il};function il(){}const aE=-1,sl=0,ca=1,ol=2,kf=3,Cf=4,Of=5,If=6,uE=7,lE=8,cE=typeof self=="object"?self:globalThis,dE=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new cE[e](t)},G3=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case sl:case aE:return n(u,s);case ca:{const c=n([],s);for(const d of u)c.push(r(d));return c}case ol:{const c=n({},s);for(const[d,f]of u)c[r(d)]=r(f);return c}case kf:return n(new Date(u),s);case Cf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),s)}case Of:{const c=n(new Map,s);for(const[d,f]of u)c.set(r(d),r(f));return c}case If:{const c=n(new Set,s);for(const d of u)c.add(r(d));return c}case uE:{const{name:c,message:d}=u;return n(typeof cE[c]=="function"?dE(c,d):new Error(d),s)}case lE:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);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(dE(a,u),s)};return r},fE=e=>G3(new Map,e)(0),Xi="",{toString:X3}={},{keys:Q3}=Object,da=e=>{const t=typeof e;if(t!=="object"||!e)return[sl,t];const n=X3.call(e).slice(8,-1);switch(n){case"Array":return[ca,Xi];case"Object":return[ol,Xi];case"Date":return[kf,Xi];case"RegExp":return[Cf,Xi];case"Map":return[Of,Xi];case"Set":return[If,Xi];case"DataView":return[ca,n]}return n.includes("Array")?[ca,n]:e instanceof Error?[uE,e.name||"Error"]:[ol,n]},al=([e,t])=>e===sl&&(t==="function"||t==="symbol"),K3=(e,t,n,r)=>{const s=(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]=da(u);switch(c){case sl:{let p=u;switch(d){case"bigint":c=lE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([aE],u)}return s([c,p],u)}case ca:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),s([d,[...b]],u)}const p=[],m=s([c,p],u);for(const b of u)p.push(a(b));return m}case ol:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=s([c,p],u);for(const b of Q3(u))(e||!al(da(u[b])))&&p.push([a(b),a(u[b])]);return m}case kf:return s([c,isNaN(u.getTime())?Xi:u.toISOString()],u);case Cf:{const{source:p,flags:m}=u;return s([c,{source:p,flags:m}],u)}case Of:{const p=[],m=s([c,p],u);for(const[b,y]of u)(e||!(al(da(b))||al(da(y))))&&p.push([a(b),a(y)]);return m}case If:{const p=[],m=s([c,p],u);for(const b of u)(e||!al(da(b)))&&p.push(a(b));return m}}const{message:f}=u;return s([c,{name:d,message:f}],u)};return a},hE=(e,{json:t,lossy:n}={})=>{const r=[];return K3(!(t||n),!!t,new Map,r)(e),r},Qi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?fE(hE(e,t)):structuredClone(e):(e,t)=>fE(hE(e,t));function J3(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 Z3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function eO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||J3,r=e.options.footnoteBackLabel||Z3,s=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 f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),b=Us(m.toLowerCase());let y=0;const x=[],A=e.footnoteCounts.get(m);for(;A!==void 0&&++y<=A;){x.length>0&&x.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const k=v.children[v.children.length-1];k&&k.type==="text"?k.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else p.push(...x);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,w),c.push(w)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:ce(H({},Qi(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
31
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
32
+ `}]}}const ul=(function(e){if(e==null)return iO;if(typeof e=="function")return ll(e);if(typeof e=="object")return Array.isArray(e)?tO(e):nO(e);if(typeof e=="string")return rO(e);throw new Error("Expected function, string, or object as test")});function tO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ul(e[n]);return ll(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function nO(e){const t=e;return ll(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function rO(e){return ll(t);function t(n){return n&&n.type===e}}function ll(e){return t;function t(n,r,s){return!!(sO(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function iO(){return!0}function sO(e){return e!==null&&typeof e=="object"&&"type"in e}function G7(e){return e}const pE=[],oO=!0,Pf=!1,aO="skip";function mE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=ul(s),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=pE,x,A,v;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=uO(n(d,p)),y[0]===Pf))return y;if("children"in d&&d.children){const w=d;if(w.children&&y[0]!==aO)for(A=(r?w.children.length:-1)+u,v=p.concat(w);A>-1&&A<w.children.length;){const k=w.children[A];if(x=c(k,A,v)(),x[0]===Pf)return x;A=typeof x[1]=="number"?x[1]:A+u}}return y}}}function uO(e){return Array.isArray(e)?e:typeof e=="number"?[oO,e]:e==null?pE:[e]}function cl(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),mE(e,a,c,s);function c(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const Rf={}.hasOwnProperty,lO={};function cO(e,t){const n=t||lO,r=new Map,s=new Map,a=new Map,u=H(H({},W3),n.handlers),c={all:f,applyData:fO,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:dO,wrap:pO};return cl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,b=String(p.identifier).toUpperCase();m.has(b)||m.set(b,p)}}),c;function d(p,m){const b=p.type,y=c.handlers[b];if(Rf.call(c.handlers,b)&&y)return y(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in p){const A=p,{children:v}=A,w=En(A,["children"]),k=Qi(w);return k.children=c.all(p),k}return Qi(p)}return(c.options.unknownHandler||hO)(c,p,m)}function f(p){const m=[];if("children"in p){const b=p.children;let y=-1;for(;++y<b.length;){const x=c.one(b[y],p);if(x){if(y&&b[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=gE(x.value)),!Array.isArray(x)&&x.type==="element")){const A=x.children[0];A&&A.type==="text"&&(A.value=gE(A.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function dO(e,t){e.position&&(t.position=S1(e))}function fO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=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,Qi(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function hO(e,t){const n=t.data||{},r="value"in t&&!(Rf.call(n,"hProperties")||Rf.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 pO(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 pE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function mE(e,t){const n=rO(e,t),r=n.one(e,void 0),s=W3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
36
- `},s),a}function uO(e,t){return e&&"run"in e?function(n,r){return ze(this,null,function*(){const s=mE(n,U({file:r},t));yield e.run(s,r)})}:function(n,r){return mE(n,U({file:r},e||t))}}function gE(e){if(e)throw e}var Pf,EE;function lO(){if(EE)return Pf;EE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var T;for(T in f);return typeof T=="undefined"||e.call(f,T)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},l=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Pf=function d(){var f,p,m,T,y,x,v=arguments[0],A=1,S=arguments.length,k=!1;for(typeof v=="boolean"&&(k=v,v=arguments[1]||{},A=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});A<S;++A)if(f=arguments[A],f!=null)for(p in f)m=l(v,p),T=l(f,p),v!==T&&(k&&T&&(a(T)||(y=s(T)))?(y?(y=!1,x=m&&s(m)?m:[]):x=m&&a(m)?m:{},u(v,{name:p,newValue:d(k,x,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},Pf}var cO=lO();const Rf=Ke(cO);function Lf(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 dO(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);l(null,...s);function l(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?fO(p,l)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function fO(e,t){let n;return r;function r(...u){const l=e.length>u.length;let d;l&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(l&&n)throw p;return s(p)}l||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...l){n||(n=!0,t(u,...l))}function a(u){s(null,u)}}const br={basename:hO,dirname:pO,extname:mO,join:gO,sep:"/"};function hO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');aa(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,l=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),l>-1&&(e.codePointAt(s)===t.codePointAt(l--)?l<0&&(r=s):(l=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function pO(e){if(aa(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 mO(e){aa(e);let t=e.length,n=-1,r=0,s=-1,a=0,u;for(;t--;){const l=e.codePointAt(t);if(l===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),l===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function gO(...e){let t=-1,n;for(;++t<e.length;)aa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":EO(n)}function EO(e){aa(e);const t=e.codePointAt(0)===47;let n=yO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function yO(e,t){let n="",r=0,s=-1,a=0,u=-1,l,d;for(;++u<=e.length;){if(u<e.length)l=e.codePointAt(u);else{if(l===47)break;l=47}if(l===47){if(!(s===u-1||a===1))if(s!==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("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else l===46&&a>-1?a++:a=-1}return n}function aa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const TO={cwd:bO};function bO(){return"/"}function Df(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function _O(e){if(typeof e=="string")e=new URL(e);else if(!Df(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 xO(e)}function xO(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 s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Mf=["history","path","basename","stem","extname","dirname"];class yE{constructor(t){let n;t?Df(t)?n={path:t}:typeof t=="string"||wO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":TO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Mf.length;){const a=Mf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)Mf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?br.basename(this.path):void 0}set basename(t){Bf(t,"basename"),Ff(t,"basename"),this.path=br.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?br.dirname(this.path):void 0}set dirname(t){TE(this.basename,"dirname"),this.path=br.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?br.extname(this.path):void 0}set extname(t){if(Ff(t,"extname"),TE(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=br.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Df(t)&&(t=_O(t)),Bf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?br.basename(this.path,this.extname):void 0}set stem(t){Bf(t,"stem"),Ff(t,"stem"),this.path=br.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new en(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ff(e,t){if(e&&e.includes(br.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+br.sep+"`")}function Bf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function TE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function wO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const SO=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),vO={}.hasOwnProperty;class Uf extends SO{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=dO()}copy(){const t=new Uf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Rf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(zf("data",this.frozen),this.namespace[t]=n,this):vO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(zf("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 s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ol(t),r=this.parser||this.Parser;return Hf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Hf("process",this.parser||this.Parser),jf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const l=ol(t),d=r.parse(l);r.run(d,l,function(p,m,T){if(p||!m||!T)return f(p);const y=m,x=r.stringify(y,T);kO(x)?T.value=x:T.result=x,f(p,T)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Hf("processSync",this.parser||this.Parser),jf("processSync",this.compiler||this.Compiler),this.process(t,s),_E("processSync","process",n),r;function s(a,u){n=!0,gE(a),r=u}}run(t,n,r){bE(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,l){const d=ol(n);s.run(t,d,f);function f(p,m,T){const y=m||t;p?l(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),_E("runSync","run",r),s;function a(u,l){gE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=ol(n),s=this.compiler||this.Compiler;return jf("stringify",s),bE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(zf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(s.settings=Rf(!0,s.settings,f.settings))}function l(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,...x]=p;const v=r[T][1];Lf(v)&&Lf(y)&&(y=Rf(!0,v,y)),r[T]=[f,y,...x]}}}}const AO=new Uf().freeze();function Hf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function jf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function zf(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 bE(e){if(!Lf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _E(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ol(e){return NO(e)?e:new yE(e)}function NO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function kO(e){return typeof e=="string"||CO(e)}function CO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const OO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",xE=[],wE={allowDangerousHtml:!0},IO=/^(https?|ircs?|mailto|xmpp)$/i,PO=[{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 SE(e){const t=RO(e),n=LO(e);return DO(t.runSync(t.parse(n),n),e)}function RO(e){const t=e.rehypePlugins||xE,n=e.remarkPlugins||xE,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),wE):wE;return AO().use(p3).use(n).use(uO,r).use(t)}function LO(e){const t=e.children||"",n=new yE;return typeof t=="string"&&(n.value=t),n}function DO(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||MO;for(const p of PO)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+OO+p.id,void 0);return sl(e,f),ok(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in yf)if(Object.hasOwn(yf,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],v=yf[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 m=="number"&&(y=!r(p,m,T)),y&&T&&typeof m=="number")return l&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function MO(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||IO.test(e.slice(0,t))?e:""}const vE=/[#.]/g;function FO(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){vE.lastIndex=s;const l=vE.exec(n),d=n.slice(s,l?l.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),l&&(a=l[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function AE(e,t,n){const r=n?jO(n):void 0;function s(a,u,...l){let d;if(a==null){d={type:"root",children:[]};const f=u;l.unshift(f)}else{d=FO(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,BO(u))l.unshift(u);else for(const[m,T]of Object.entries(u))UO(e,d.properties,m,T)}for(const f of l)$f(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function BO(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 s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function UO(e,t,n,r){const s=Wu(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"?s.spaceSeparated?a=m1(r):s.commaSeparated?a=n1(r):s.commaOrSpaceSeparated?a=m1(n1(r).join(" ")):a=NE(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?HO(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(NE(s,s.property,l));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function $f(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)$f(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?$f(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function NE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Qo(n)===Qo(t)))return!0}return n}function HO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function jO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const zO=["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"],$O=AE(Ko,"div"),VO=AE(ii,"g",zO);function qO(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let l=n[u];if(l===void 0){const d=kE(t,n[u-1]);l=d===-1?t.length+1:d+1,n[u]=l}if(l>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function s(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 l=n[n.length-1],d=kE(t,l),f=d===-1?t.length+1:d+1;if(l===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function kE(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 Qi={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/"},CE={}.hasOwnProperty,YO=Object.prototype;function WO(e,t){const n=t||{};return Vf({file:n.file||void 0,location:!1,schema:n.space==="svg"?ii:Ko,verbose:n.verbose||!1},e)}function Vf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},al(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:OE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=qO(a),l=u.toPoint(0),d=u.toPoint(a.length);n.position={start:l,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},al(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},al(e,r,n),n}default:return n=GO(e,t),n}}function OE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=Vf(e,t[n]);r.push(s)}return r}function GO(e,t){const n=e.schema;e.schema=t.namespaceURI===Qi.svg?ii:Ko;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;CE.call(YO,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?VO:$O)(t.tagName,s,OE(e,t.childNodes));if(al(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&Hs(d.startTag),p=d&&d.endTag&&Hs(d.endTag),m=Vf(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function al(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=XO(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function XO(e,t,n){const r=Hs(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)CE.call(n.attrs,u)&&(a[Wu(e.schema,u).property]=Hs(n.attrs[u]));n.startTag;const l=Hs(n.startTag),d=n.endTag?Hs(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Hs(e){const t=IE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=IE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function IE(e){return e.line&&e.column?e:void 0}const PE={}.hasOwnProperty;function RE(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&PE.call(s,e)){const d=String(s[e]);u=PE.call(l,d)?l[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const QO={},KO={}.hasOwnProperty,LE=RE("type",{handlers:{root:ZO,element:iI,text:nI,comment:rI,doctype:tI}});function JO(e,t){const r=(t||QO).space;return LE(e,r==="svg"?ii:Ko)}function ZO(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=qf(e.children,n,t),js(e,n),n}function eI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=qf(e.children,n,t),js(e,n),n}function tI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return js(e,t),t}function nI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return js(e,t),t}function rI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return js(e,t),t}function iI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ii);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&KO.call(e.properties,a)){const d=sI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Qi[u],childNodes:[],parentNode:null};return l.childNodes=qf(e.children,l,r),js(e,l),e.tagName==="template"&&e.content&&(l.content=eI(e.content,r)),l}function sI(e,t,n){const r=Wu(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?r1(n):g1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=Qi[r.space]}return s}function qf(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=LE(e[r],n);a.parentNode=t,s.push(a)}return s}function js(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 oI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],aI=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]),bt="�";var O;(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"})(O||(O={}));const bn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function DE(e){return e>=55296&&e<=57343}function uI(e){return e>=56320&&e<=57343}function lI(e,t){return(e-55296)*1024+9216+t}function ME(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function FE(e){return e>=64976&&e<=65007||aI.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const cI=65536;class dI{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=cI,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:s,offset:a}=this,u=s+n,l=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:l,endOffset:l}}_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(uI(n))return this.pos++,this._addGap(),lI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,O.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,O.EOF;const r=this.html.charCodeAt(n);return r===O.CARRIAGE_RETURN?O.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,O.EOF;let t=this.html.charCodeAt(this.pos);return t===O.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,O.LINE_FEED):t===O.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,DE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===O.LINE_FEED||t===O.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ME(t)?this._err(te.controlCharacterInInputStream):FE(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Xe;(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"})(Xe||(Xe={}));function BE(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 fI=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))),hI=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 pI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=hI.get(e))!==null&&t!==void 0?t:e}var Ut;(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"})(Ut||(Ut={}));const mI=32;var ai;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ai||(ai={}));function Yf(e){return e>=Ut.ZERO&&e<=Ut.NINE}function gI(e){return e>=Ut.UPPER_A&&e<=Ut.UPPER_F||e>=Ut.LOWER_A&&e<=Ut.LOWER_F}function EI(e){return e>=Ut.UPPER_A&&e<=Ut.UPPER_Z||e>=Ut.LOWER_A&&e<=Ut.LOWER_Z||Yf(e)}function yI(e){return e===Ut.EQUALS||EI(e)}var Ht;(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"})(Ht||(Ht={}));var Ur;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ur||(Ur={}));class TI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ht.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ur.Strict}startEntity(t){this.decodeMode=t,this.state=Ht.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ht.EntityStart:return t.charCodeAt(n)===Ut.NUM?(this.state=Ht.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ht.NamedEntity,this.stateNamedEntity(t,n));case Ht.NumericStart:return this.stateNumericStart(t,n);case Ht.NumericDecimal:return this.stateNumericDecimal(t,n);case Ht.NumericHex:return this.stateNumericHex(t,n);case Ht.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|mI)===Ut.LOWER_X?(this.state=Ht.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ht.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Yf(s)||gI(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Yf(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,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===Ut.SEMI)this.consumed+=1;else if(this.decodeMode===Ur.Strict)return 0;return this.emitCodePoint(pI(this.result),this.consumed),this.errors&&(t!==Ut.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&ai.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=bI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ur.Attribute&&(a===0||yI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&ai.VALUE_LENGTH)>>14,a!==0){if(u===Ut.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ur.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&ai.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~ai.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Ht.NamedEntity:return this.result!==0&&(this.decodeMode!==Ur.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ht.NumericDecimal:return this.emitNumericEntity(0,2);case Ht.NumericHex:return this.emitNumericEntity(0,3);case Ht.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ht.EntityStart:return 0}}}function bI(e,t,n,r){const s=(t&ai.BRANCH_LENGTH)>>7,a=t&ai.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,l=u+s-1;for(;u<=l;){const d=u+l>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)l=d-1;else return e[d+s]}return-1}var me;(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/"})(me||(me={}));var Ki;(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"})(Ki||(Ki={}));var zn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(zn||(zn={}));var X;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(X||(X={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const _I=new Map([[X.A,g.A],[X.ADDRESS,g.ADDRESS],[X.ANNOTATION_XML,g.ANNOTATION_XML],[X.APPLET,g.APPLET],[X.AREA,g.AREA],[X.ARTICLE,g.ARTICLE],[X.ASIDE,g.ASIDE],[X.B,g.B],[X.BASE,g.BASE],[X.BASEFONT,g.BASEFONT],[X.BGSOUND,g.BGSOUND],[X.BIG,g.BIG],[X.BLOCKQUOTE,g.BLOCKQUOTE],[X.BODY,g.BODY],[X.BR,g.BR],[X.BUTTON,g.BUTTON],[X.CAPTION,g.CAPTION],[X.CENTER,g.CENTER],[X.CODE,g.CODE],[X.COL,g.COL],[X.COLGROUP,g.COLGROUP],[X.DD,g.DD],[X.DESC,g.DESC],[X.DETAILS,g.DETAILS],[X.DIALOG,g.DIALOG],[X.DIR,g.DIR],[X.DIV,g.DIV],[X.DL,g.DL],[X.DT,g.DT],[X.EM,g.EM],[X.EMBED,g.EMBED],[X.FIELDSET,g.FIELDSET],[X.FIGCAPTION,g.FIGCAPTION],[X.FIGURE,g.FIGURE],[X.FONT,g.FONT],[X.FOOTER,g.FOOTER],[X.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[X.FORM,g.FORM],[X.FRAME,g.FRAME],[X.FRAMESET,g.FRAMESET],[X.H1,g.H1],[X.H2,g.H2],[X.H3,g.H3],[X.H4,g.H4],[X.H5,g.H5],[X.H6,g.H6],[X.HEAD,g.HEAD],[X.HEADER,g.HEADER],[X.HGROUP,g.HGROUP],[X.HR,g.HR],[X.HTML,g.HTML],[X.I,g.I],[X.IMG,g.IMG],[X.IMAGE,g.IMAGE],[X.INPUT,g.INPUT],[X.IFRAME,g.IFRAME],[X.KEYGEN,g.KEYGEN],[X.LABEL,g.LABEL],[X.LI,g.LI],[X.LINK,g.LINK],[X.LISTING,g.LISTING],[X.MAIN,g.MAIN],[X.MALIGNMARK,g.MALIGNMARK],[X.MARQUEE,g.MARQUEE],[X.MATH,g.MATH],[X.MENU,g.MENU],[X.META,g.META],[X.MGLYPH,g.MGLYPH],[X.MI,g.MI],[X.MO,g.MO],[X.MN,g.MN],[X.MS,g.MS],[X.MTEXT,g.MTEXT],[X.NAV,g.NAV],[X.NOBR,g.NOBR],[X.NOFRAMES,g.NOFRAMES],[X.NOEMBED,g.NOEMBED],[X.NOSCRIPT,g.NOSCRIPT],[X.OBJECT,g.OBJECT],[X.OL,g.OL],[X.OPTGROUP,g.OPTGROUP],[X.OPTION,g.OPTION],[X.P,g.P],[X.PARAM,g.PARAM],[X.PLAINTEXT,g.PLAINTEXT],[X.PRE,g.PRE],[X.RB,g.RB],[X.RP,g.RP],[X.RT,g.RT],[X.RTC,g.RTC],[X.RUBY,g.RUBY],[X.S,g.S],[X.SCRIPT,g.SCRIPT],[X.SEARCH,g.SEARCH],[X.SECTION,g.SECTION],[X.SELECT,g.SELECT],[X.SOURCE,g.SOURCE],[X.SMALL,g.SMALL],[X.SPAN,g.SPAN],[X.STRIKE,g.STRIKE],[X.STRONG,g.STRONG],[X.STYLE,g.STYLE],[X.SUB,g.SUB],[X.SUMMARY,g.SUMMARY],[X.SUP,g.SUP],[X.TABLE,g.TABLE],[X.TBODY,g.TBODY],[X.TEMPLATE,g.TEMPLATE],[X.TEXTAREA,g.TEXTAREA],[X.TFOOT,g.TFOOT],[X.TD,g.TD],[X.TH,g.TH],[X.THEAD,g.THEAD],[X.TITLE,g.TITLE],[X.TR,g.TR],[X.TRACK,g.TRACK],[X.TT,g.TT],[X.U,g.U],[X.UL,g.UL],[X.SVG,g.SVG],[X.VAR,g.VAR],[X.WBR,g.WBR],[X.XMP,g.XMP]]);function zs(e){var t;return(t=_I.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const ye=g,xI={[me.HTML]:new Set([ye.ADDRESS,ye.APPLET,ye.AREA,ye.ARTICLE,ye.ASIDE,ye.BASE,ye.BASEFONT,ye.BGSOUND,ye.BLOCKQUOTE,ye.BODY,ye.BR,ye.BUTTON,ye.CAPTION,ye.CENTER,ye.COL,ye.COLGROUP,ye.DD,ye.DETAILS,ye.DIR,ye.DIV,ye.DL,ye.DT,ye.EMBED,ye.FIELDSET,ye.FIGCAPTION,ye.FIGURE,ye.FOOTER,ye.FORM,ye.FRAME,ye.FRAMESET,ye.H1,ye.H2,ye.H3,ye.H4,ye.H5,ye.H6,ye.HEAD,ye.HEADER,ye.HGROUP,ye.HR,ye.HTML,ye.IFRAME,ye.IMG,ye.INPUT,ye.LI,ye.LINK,ye.LISTING,ye.MAIN,ye.MARQUEE,ye.MENU,ye.META,ye.NAV,ye.NOEMBED,ye.NOFRAMES,ye.NOSCRIPT,ye.OBJECT,ye.OL,ye.P,ye.PARAM,ye.PLAINTEXT,ye.PRE,ye.SCRIPT,ye.SECTION,ye.SELECT,ye.SOURCE,ye.STYLE,ye.SUMMARY,ye.TABLE,ye.TBODY,ye.TD,ye.TEMPLATE,ye.TEXTAREA,ye.TFOOT,ye.TH,ye.THEAD,ye.TITLE,ye.TR,ye.TRACK,ye.UL,ye.WBR,ye.XMP]),[me.MATHML]:new Set([ye.MI,ye.MO,ye.MN,ye.MS,ye.MTEXT,ye.ANNOTATION_XML]),[me.SVG]:new Set([ye.TITLE,ye.FOREIGN_OBJECT,ye.DESC]),[me.XLINK]:new Set,[me.XML]:new Set,[me.XMLNS]:new Set},Wf=new Set([ye.H1,ye.H2,ye.H3,ye.H4,ye.H5,ye.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var L;(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"})(L||(L={}));const kt={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function wI(e){return e>=O.DIGIT_0&&e<=O.DIGIT_9}function ua(e){return e>=O.LATIN_CAPITAL_A&&e<=O.LATIN_CAPITAL_Z}function SI(e){return e>=O.LATIN_SMALL_A&&e<=O.LATIN_SMALL_Z}function ui(e){return SI(e)||ua(e)}function UE(e){return ui(e)||wI(e)}function ul(e){return e+32}function HE(e){return e===O.SPACE||e===O.LINE_FEED||e===O.TABULATION||e===O.FORM_FEED}function jE(e){return HE(e)||e===O.SOLIDUS||e===O.GREATER_THAN_SIGN}function vI(e){return e===O.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:DE(e)?te.surrogateCharacterReference:FE(e)?te.noncharacterCharacterReference:ME(e)||e===O.CARRIAGE_RETURN?te.controlCharacterReference:null}class AI{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=L.DATA,this.returnState=L.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new dI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new TI(fI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=vI(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.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:Xe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Xe.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(BE(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=zs(t.tagName),t.type===Xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Xe.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:Xe.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=HE(t)?Xe.WHITESPACE_CHARACTER:t===O.NULL?Xe.NULL_CHARACTER:Xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ur.Attribute:Ur.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===L.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case L.DATA:{this._stateData(t);break}case L.RCDATA:{this._stateRcdata(t);break}case L.RAWTEXT:{this._stateRawtext(t);break}case L.SCRIPT_DATA:{this._stateScriptData(t);break}case L.PLAINTEXT:{this._statePlaintext(t);break}case L.TAG_OPEN:{this._stateTagOpen(t);break}case L.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case L.TAG_NAME:{this._stateTagName(t);break}case L.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case L.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case L.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case L.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case L.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case L.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case L.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case L.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case L.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case L.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case L.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case L.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case L.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case L.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case L.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case L.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case L.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case L.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case L.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case L.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case L.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case L.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case L.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case L.BOGUS_COMMENT:{this._stateBogusComment(t);break}case L.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case L.COMMENT_START:{this._stateCommentStart(t);break}case L.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case L.COMMENT:{this._stateComment(t);break}case L.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case L.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case L.COMMENT_END:{this._stateCommentEnd(t);break}case L.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case L.DOCTYPE:{this._stateDoctype(t);break}case L.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case L.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case L.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case L.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case L.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case L.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case L.CDATA_SECTION:{this._stateCdataSection(t);break}case L.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case L.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case L.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case L.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case O.AMPERSAND:{this._startCharacterReference();break}case O.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(bt);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(bt);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(bt);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(bt);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ui(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case O.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case O.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case O.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case O.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ui(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case O.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=L.DATA;break}case O.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=bt;break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ua(t)?ul(t):t)}}_stateRcdataLessThanSign(t){t===O.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ui(t)?(this.state=L.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=L.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 O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case O.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case O.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=L.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===O.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ui(t)?(this.state=L.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case O.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case O.EXCLAMATION_MARK:{this.state=L.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=L.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ui(t)?(this.state=L.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===O.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===O.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(bt);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(bt);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case O.HYPHEN_MINUS:{this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(bt);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===O.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ui(t)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ui(t)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(bn.SCRIPT,!1)&&jE(this.preprocessor.peek(bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(bt);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(bt);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case O.HYPHEN_MINUS:{this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(bt);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===O.SOLIDUS?(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(bn.SCRIPT,!1)&&jE(this.preprocessor.peek(bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.SOLIDUS:case O.GREATER_THAN_SIGN:case O.EOF:{this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case O.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=L.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:case O.SOLIDUS:case O.GREATER_THAN_SIGN:case O.EOF:{this._leaveAttrName(),this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case O.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case O.QUOTATION_MARK:case O.APOSTROPHE:case O.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=bt;break}default:this.currentAttr.name+=String.fromCodePoint(ua(t)?ul(t):t)}}_stateAfterAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case O.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{this.state=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=bt;break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case O.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=bt;break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=bt;break}case O.QUOTATION_MARK:case O.APOSTROPHE:case O.LESS_THAN_SIGN:case O.EQUALS_SIGN:case O.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case O.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case O.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.data+=bt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(bn.DASH_DASH,!0)?(this._createCommentToken(bn.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(bn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(bn.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(bn.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(bn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=L.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case O.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.data+=bt;break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case O.EXCLAMATION_MARK:{n.data+="!",this.state=L.COMMENT_LESS_THAN_SIGN_BANG;break}case O.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===O.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===O.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==O.GREATER_THAN_SIGN&&t!==O.EOF&&this._err(te.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case O.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case O.HYPHEN_MINUS:{n.data+="-";break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case O.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case O.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ua(t))this._createDoctypeToken(String.fromCharCode(ul(t))),this.state=L.DOCTYPE_NAME;else switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(bt),this.state=L.DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=L.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.name+=bt;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ua(t)?ul(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(bn.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(bn.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=bt;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case O.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=bt;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=bt;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case O.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=bt;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.NULL:{this._err(te.unexpectedNullCharacter);break}case O.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case O.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case O.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===O.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA;break}case O.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=L.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(O.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&UE(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){UE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===O.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const zE=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),$E=new Set([...zE,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),ll=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),NI=new Set([...ll,g.OL,g.UL]),kI=new Set([...ll,g.BUTTON]),VE=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),qE=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),CI=new Set([g.TR,g.TEMPLATE,g.HTML]),OI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),II=new Set([g.TABLE,g.TEMPLATE,g.HTML]),PI=new Set([g.TD,g.TH]);class RI{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===me.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 s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===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])!==me.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(Wf,me.HTML)}popUntilTableCellPopped(){this.popUntilPopped(PI,me.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(II,me.HTML)}clearBackToTableBodyContext(){this.clearBackTo(OI,me.HTML)}clearBackToTableRowContext(){this.clearBackTo(CI,me.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case me.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case me.SVG:{if(qE.has(s))return!1;break}case me.MATHML:{if(VE.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ll)}hasInListItemScope(t){return this.hasInDynamicScope(t,NI)}hasInButtonScope(t){return this.hasInDynamicScope(t,kI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case me.HTML:{if(Wf.has(n))return!0;if(ll.has(n))return!1;break}case me.SVG:{if(qE.has(n))return!1;break}case me.MATHML:{if(VE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===me.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===me.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===me.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&zE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&$E.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&$E.has(this.currentTagId);)this.pop()}}const Gf=3;var _r;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(_r||(_r={}));const YE={type:_r.Marker};class LI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){const d=this.entries[l];if(d.type===_r.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:l,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Gf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Gf)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const l=r[u];l.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=Gf&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(YE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:_r.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:_r.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(YE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===_r.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===_r.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===_r.Element&&n.element===t)}}const li={createDocument(){return{nodeName:"#document",mode:zn.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 s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};li.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(li.isTextNode(n)){n.value+=t;return}}li.appendChild(e,li.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&li.isTextNode(r)?r.value+=t:li.insertBefore(e,li.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=U(U({},e.sourceCodeLocation),t)}},WE="html",DI="about:legacy-compat",MI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",GE=["+//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//"],FI=[...GE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],BI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),XE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],UI=[...XE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function QE(e,t){return t.some(n=>e.startsWith(n))}function HI(e){return e.name===WE&&e.publicId===null&&(e.systemId===null||e.systemId===DI)}function jI(e){if(e.name!==WE)return zn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===MI)return zn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),BI.has(n))return zn.QUIRKS;let r=t===null?FI:GE;if(QE(n,r))return zn.QUIRKS;if(r=t===null?XE:UI,QE(n,r))return zn.LIMITED_QUIRKS}return zn.NO_QUIRKS}const KE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},zI="definitionurl",$I="definitionURL",VI=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])),qI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:me.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:me.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:me.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:me.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:me.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:me.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:me.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:me.XML}],["xml:space",{prefix:"xml",name:"space",namespace:me.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:me.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:me.XMLNS}]]),YI=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])),WI=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function GI(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===Ki.COLOR||r===Ki.SIZE||r===Ki.FACE)||WI.has(t)}function JE(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===zI){e.attrs[t].name=$I;break}}function ZE(e){for(let t=0;t<e.attrs.length;t++){const n=VI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Xf(e){for(let t=0;t<e.attrs.length;t++){const n=qI.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 XI(e){const t=YI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=zs(e.tagName))}function QI(e,t){return t===me.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function KI(e,t,n){if(t===me.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ki.ENCODING){const s=n[r].value.toLowerCase();return s===KE.TEXT_HTML||s===KE.APPLICATION_XML}}return t===me.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function JI(e,t,n,r){return(!r||r===me.HTML)&&KI(e,t,n)||(!r||r===me.MATHML)&&QI(e,t)}const ZI="hidden",eP=8,tP=3;var B;(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"})(B||(B={}));const nP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ey=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),ty={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:li,onParseError:null};class ny{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=B.INITIAL,this.originalInsertionMode=B.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=U(U({},ty),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 AI(this.options,this),this.activeFormattingElements=new LI(this.treeAdapter),this.fragmentContextID=r?zs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new RI(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=U(U({},ty),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,me.HTML,[]));const s=r.treeAdapter.createElement("documentmock",me.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(B.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 s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:nP,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 s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.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)===me.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,me.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=B.TEXT}switchToPlaintextParsing(){this.insertionMode=B.TEXT,this.originalInsertionMode=B.IN_BODY,this.tokenizer.state=kt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==me.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=kt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=kt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=kt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=kt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&ue(U({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,me.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,me.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,me.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),a=n.type===Xe.END_TAG&&s===n.tagName?{endTag:U({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===me.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,me.HTML)}_processToken(t){switch(t.type){case Xe.CHARACTER:{this.onCharacter(t);break}case Xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Xe.COMMENT:{this.onComment(t);break}case Xe.DOCTYPE:{this.onDoctype(t);break}case Xe.START_TAG:{this._processStartTag(t);break}case Xe.END_TAG:{this.onEndTag(t);break}case Xe.EOF:{this.onEof(t);break}case Xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return JI(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===_r.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];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=B.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=B.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=B.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=B.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=B.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=B.IN_TABLE;return}case g.BODY:{this.insertionMode=B.IN_BODY;return}case g.FRAMESET:{this.insertionMode=B.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?B.AFTER_HEAD:B.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=B.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=B.IN_HEAD;return}break}}this.insertionMode=B.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=B.IN_SELECT_IN_TABLE;return}}this.insertionMode=B.IN_SELECT}_isElementCausesFosterParenting(t){return ey.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===me.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return xI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){PR(this,t);return}switch(this.insertionMode){case B.INITIAL:{la(this,t);break}case B.BEFORE_HTML:{ca(this,t);break}case B.BEFORE_HEAD:{da(this,t);break}case B.IN_HEAD:{fa(this,t);break}case B.IN_HEAD_NO_SCRIPT:{ha(this,t);break}case B.AFTER_HEAD:{pa(this,t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:{iy(this,t);break}case B.TEXT:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Zf(this,t);break}case B.IN_TABLE_TEXT:{fy(this,t);break}case B.IN_COLUMN_GROUP:{fl(this,t);break}case B.AFTER_BODY:{ml(this,t);break}case B.AFTER_AFTER_BODY:{gl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){IR(this,t);return}switch(this.insertionMode){case B.INITIAL:{la(this,t);break}case B.BEFORE_HTML:{ca(this,t);break}case B.BEFORE_HEAD:{da(this,t);break}case B.IN_HEAD:{fa(this,t);break}case B.IN_HEAD_NO_SCRIPT:{ha(this,t);break}case B.AFTER_HEAD:{pa(this,t);break}case B.TEXT:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Zf(this,t);break}case B.IN_COLUMN_GROUP:{fl(this,t);break}case B.AFTER_BODY:{ml(this,t);break}case B.AFTER_AFTER_BODY:{gl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Kf(this,t);return}switch(this.insertionMode){case B.INITIAL:case B.BEFORE_HTML:case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_TEMPLATE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{Kf(this,t);break}case B.IN_TABLE_TEXT:{Ea(this,t);break}case B.AFTER_BODY:{lP(this,t);break}case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{cP(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case B.INITIAL:{dP(this,t);break}case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case B.IN_TABLE_TEXT:{Ea(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?RR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{la(this,t);break}case B.BEFORE_HTML:{fP(this,t);break}case B.BEFORE_HEAD:{pP(this,t);break}case B.IN_HEAD:{rr(this,t);break}case B.IN_HEAD_NO_SCRIPT:{EP(this,t);break}case B.AFTER_HEAD:{TP(this,t);break}case B.IN_BODY:{nn(this,t);break}case B.IN_TABLE:{$s(this,t);break}case B.IN_TABLE_TEXT:{Ea(this,t);break}case B.IN_CAPTION:{mR(this,t);break}case B.IN_COLUMN_GROUP:{eh(this,t);break}case B.IN_TABLE_BODY:{hl(this,t);break}case B.IN_ROW:{pl(this,t);break}case B.IN_CELL:{yR(this,t);break}case B.IN_SELECT:{my(this,t);break}case B.IN_SELECT_IN_TABLE:{bR(this,t);break}case B.IN_TEMPLATE:{xR(this,t);break}case B.AFTER_BODY:{SR(this,t);break}case B.IN_FRAMESET:{vR(this,t);break}case B.AFTER_FRAMESET:{NR(this,t);break}case B.AFTER_AFTER_BODY:{CR(this,t);break}case B.AFTER_AFTER_FRAMESET:{OR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?LR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{la(this,t);break}case B.BEFORE_HTML:{hP(this,t);break}case B.BEFORE_HEAD:{mP(this,t);break}case B.IN_HEAD:{gP(this,t);break}case B.IN_HEAD_NO_SCRIPT:{yP(this,t);break}case B.AFTER_HEAD:{bP(this,t);break}case B.IN_BODY:{dl(this,t);break}case B.TEXT:{sR(this,t);break}case B.IN_TABLE:{ma(this,t);break}case B.IN_TABLE_TEXT:{Ea(this,t);break}case B.IN_CAPTION:{gR(this,t);break}case B.IN_COLUMN_GROUP:{ER(this,t);break}case B.IN_TABLE_BODY:{th(this,t);break}case B.IN_ROW:{py(this,t);break}case B.IN_CELL:{TR(this,t);break}case B.IN_SELECT:{gy(this,t);break}case B.IN_SELECT_IN_TABLE:{_R(this,t);break}case B.IN_TEMPLATE:{wR(this,t);break}case B.AFTER_BODY:{yy(this,t);break}case B.IN_FRAMESET:{AR(this,t);break}case B.AFTER_FRAMESET:{kR(this,t);break}case B.AFTER_AFTER_BODY:{gl(this,t);break}}}onEof(t){switch(this.insertionMode){case B.INITIAL:{la(this,t);break}case B.BEFORE_HTML:{ca(this,t);break}case B.BEFORE_HEAD:{da(this,t);break}case B.IN_HEAD:{fa(this,t);break}case B.IN_HEAD_NO_SCRIPT:{ha(this,t);break}case B.AFTER_HEAD:{pa(this,t);break}case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{cy(this,t);break}case B.TEXT:{oR(this,t);break}case B.IN_TABLE_TEXT:{Ea(this,t);break}case B.IN_TEMPLATE:{Ey(this,t);break}case B.AFTER_BODY:case B.IN_FRAMESET:case B.AFTER_FRAMESET:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{Jf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===O.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 B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.TEXT:case B.IN_COLUMN_GROUP:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{this._insertCharacters(t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:case B.AFTER_BODY:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{ry(this,t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Zf(this,t);break}case B.IN_TABLE_TEXT:{dy(this,t);break}}}}function rP(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):ly(e,t),n}function iP(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function sP(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const l=e.activeFormattingElements.getElementEntry(u),d=l&&a>=tP;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=oP(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function oP(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 aP(e,t,n){const r=e.treeAdapter.getTagName(t),s=zs(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===me.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function uP(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function Qf(e,t){for(let n=0;n<eP;n++){const r=rP(e,t);if(!r)break;const s=iP(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=sP(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&aP(e,u,a),uP(e,s,r)}}function Kf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function lP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function cP(e,t){e._appendCommentNode(t,e.document)}function Jf(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],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.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 dP(e,t){e._setDocumentType(t);const n=t.forceQuirks?zn.QUIRKS:jI(t);HI(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=B.BEFORE_HTML}function la(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,zn.QUIRKS),e.insertionMode=B.BEFORE_HTML,e._processToken(t)}function fP(e,t){t.tagID===g.HTML?(e._insertElement(t,me.HTML),e.insertionMode=B.BEFORE_HEAD):ca(e,t)}function hP(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&ca(e,t)}function ca(e,t){e._insertFakeRootElement(),e.insertionMode=B.BEFORE_HEAD,e._processToken(t)}function pP(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.HEAD:{e._insertElement(t,me.HTML),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD;break}default:da(e,t)}}function mP(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?da(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function da(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD,e._processToken(t)}function rr(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,kt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,kt.RAWTEXT):(e._insertElement(t,me.HTML),e.insertionMode=B.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,kt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,kt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=B.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(B.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:fa(e,t)}}function gP(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=B.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{fa(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ji(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function fa(e,t){e.openElements.pop(),e.insertionMode=B.AFTER_HEAD,e._processToken(t)}function EP(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{rr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:ha(e,t)}}function yP(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=B.IN_HEAD;break}case g.BR:{ha(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function ha(e,t){const n=t.type===Xe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=B.IN_HEAD,e._processToken(t)}function TP(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.BODY:{e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=B.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,me.HTML),e.insertionMode=B.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),rr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:pa(e,t)}}function bP(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{pa(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function pa(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=B.IN_BODY,cl(e,t)}function cl(e,t){switch(t.type){case Xe.CHARACTER:{iy(e,t);break}case Xe.WHITESPACE_CHARACTER:{ry(e,t);break}case Xe.COMMENT:{Kf(e,t);break}case Xe.START_TAG:{nn(e,t);break}case Xe.END_TAG:{dl(e,t);break}case Xe.EOF:{cy(e,t);break}}}function ry(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function iy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function _P(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function xP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function wP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_FRAMESET)}function SP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function vP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Wf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,me.HTML)}function AP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function NP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),n||(e.formElement=e.openElements.current))}function kP(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function CP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.tokenizer.state=kt.PLAINTEXT}function OP(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1}function IP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Qf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function PP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function RP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Qf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function LP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function DP(e,t){e.treeAdapter.getDocumentMode(e.document)!==zn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=B.IN_TABLE}function sy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function oy(e){const t=BE(e,Ki.TYPE);return t!=null&&t.toLowerCase()===ZI}function MP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),oy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function FP(e,t){e._appendElement(t,me.HTML),t.ackSelfClosing=!0}function BP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function UP(e,t){t.tagName=X.IMG,t.tagID=g.IMG,sy(e,t)}function HP(e,t){e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.tokenizer.state=kt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=B.TEXT}function jP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,kt.RAWTEXT)}function zP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,kt.RAWTEXT)}function ay(e,t){e._switchToTextParsing(t,kt.RAWTEXT)}function $P(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===B.IN_TABLE||e.insertionMode===B.IN_CAPTION||e.insertionMode===B.IN_TABLE_BODY||e.insertionMode===B.IN_ROW||e.insertionMode===B.IN_CELL?B.IN_SELECT_IN_TABLE:B.IN_SELECT}function VP(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function qP(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,me.HTML)}function YP(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,me.HTML)}function WP(e,t){e._reconstructActiveFormattingElements(),JE(t),Xf(t),t.selfClosing?e._appendElement(t,me.MATHML):e._insertElement(t,me.MATHML),t.ackSelfClosing=!0}function GP(e,t){e._reconstructActiveFormattingElements(),ZE(t),Xf(t),t.selfClosing?e._appendElement(t,me.SVG):e._insertElement(t,me.SVG),t.ackSelfClosing=!0}function uy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function nn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{PP(e,t);break}case g.A:{IP(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{vP(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{SP(e,t);break}case g.LI:case g.DD:case g.DT:{kP(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{sy(e,t);break}case g.HR:{BP(e,t);break}case g.RB:case g.RTC:{qP(e,t);break}case g.RT:case g.RP:{YP(e,t);break}case g.PRE:case g.LISTING:{AP(e,t);break}case g.XMP:{jP(e,t);break}case g.SVG:{GP(e,t);break}case g.HTML:{_P(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{rr(e,t);break}case g.BODY:{xP(e,t);break}case g.FORM:{NP(e,t);break}case g.NOBR:{RP(e,t);break}case g.MATH:{WP(e,t);break}case g.TABLE:{DP(e,t);break}case g.INPUT:{MP(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{FP(e,t);break}case g.IMAGE:{UP(e,t);break}case g.BUTTON:{OP(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{LP(e,t);break}case g.IFRAME:{zP(e,t);break}case g.SELECT:{$P(e,t);break}case g.OPTION:case g.OPTGROUP:{VP(e,t);break}case g.NOEMBED:case g.NOFRAMES:{ay(e,t);break}case g.FRAMESET:{wP(e,t);break}case g.TEXTAREA:{HP(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?ay(e,t):uy(e,t);break}case g.PLAINTEXT:{CP(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:uy(e,t)}}function XP(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function QP(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,yy(e,t))}function KP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function JP(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function ZP(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function eR(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function tR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function nR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function rR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function iR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function ly(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function dl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{Qf(e,t);break}case g.P:{ZP(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{KP(e,t);break}case g.LI:{eR(e);break}case g.DD:case g.DT:{tR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{nR(e);break}case g.BR:{iR(e);break}case g.BODY:{XP(e,t);break}case g.HTML:{QP(e,t);break}case g.FORM:{JP(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{rR(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:ly(e,t)}}function cy(e,t){e.tmplInsertionModeStack.length>0?Ey(e,t):Jf(e,t)}function sR(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function oR(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Zf(e,t){if(e.openElements.currentTagId!==void 0&&ey.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=B.IN_TABLE_TEXT,t.type){case Xe.CHARACTER:{fy(e,t);break}case Xe.WHITESPACE_CHARACTER:{dy(e,t);break}}else ga(e,t)}function aR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_CAPTION}function uR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_COLUMN_GROUP}function lR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=B.IN_COLUMN_GROUP,eh(e,t)}function cR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_TABLE_BODY}function dR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=B.IN_TABLE_BODY,hl(e,t)}function fR(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function hR(e,t){oy(t)?e._appendElement(t,me.HTML):ga(e,t),t.ackSelfClosing=!0}function pR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,me.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function $s(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{dR(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{rr(e,t);break}case g.COL:{lR(e,t);break}case g.FORM:{pR(e,t);break}case g.TABLE:{fR(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{cR(e,t);break}case g.INPUT:{hR(e,t);break}case g.CAPTION:{aR(e,t);break}case g.COLGROUP:{uR(e,t);break}default:ga(e,t)}}function ma(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Ji(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:ga(e,t)}}function ga(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,cl(e,t),e.fosterParentingEnabled=n}function dy(e,t){e.pendingCharacterTokens.push(t)}function fy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ea(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ga(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const hy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function mR(e,t){const n=t.tagID;hy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,$s(e,t)):nn(e,t)}function gR(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,n===g.TABLE&&ma(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:dl(e,t)}}function eh(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.COL:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{rr(e,t);break}default:fl(e,t)}}function ER(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case g.TEMPLATE:{Ji(e,t);break}case g.COL:break;default:fl(e,t)}}function fl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE,e._processToken(t))}function hl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=B.IN_ROW,pl(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,$s(e,t));break}default:$s(e,t)}}function th(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,ma(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:ma(e,t)}}function pl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,hl(e,t));break}default:$s(e,t)}}function py(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,th(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,th(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:ma(e,t)}}function yR(e,t){const n=t.tagID;hy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),pl(e,t)):nn(e,t)}function TR(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),py(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:dl(e,t)}}function my(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,me.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,me.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{rr(e,t);break}}}function gy(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{Ji(e,t);break}}}function bR(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):my(e,t)}function _R(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):gy(e,t)}function xR(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{rr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=B.IN_TABLE,e.insertionMode=B.IN_TABLE,$s(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=B.IN_COLUMN_GROUP,e.insertionMode=B.IN_COLUMN_GROUP,eh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=B.IN_TABLE_BODY,e.insertionMode=B.IN_TABLE_BODY,hl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=B.IN_ROW,e.insertionMode=B.IN_ROW,pl(e,t);break}default:e.tmplInsertionModeStack[0]=B.IN_BODY,e.insertionMode=B.IN_BODY,nn(e,t)}}function wR(e,t){t.tagID===g.TEMPLATE&&Ji(e,t)}function Ey(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Jf(e,t)}function SR(e,t){t.tagID===g.HTML?nn(e,t):ml(e,t)}function yy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=B.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else ml(e,t)}function ml(e,t){e.insertionMode=B.IN_BODY,cl(e,t)}function vR(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.FRAMESET:{e._insertElement(t,me.HTML);break}case g.FRAME:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{rr(e,t);break}}}function AR(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=B.AFTER_FRAMESET))}function NR(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.NOFRAMES:{rr(e,t);break}}}function kR(e,t){t.tagID===g.HTML&&(e.insertionMode=B.AFTER_AFTER_FRAMESET)}function CR(e,t){t.tagID===g.HTML?nn(e,t):gl(e,t)}function gl(e,t){e.insertionMode=B.IN_BODY,cl(e,t)}function OR(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.NOFRAMES:{rr(e,t);break}}}function IR(e,t){t.chars=bt,e._insertCharacters(t)}function PR(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ty(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==me.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function RR(e,t){if(GI(t))Ty(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===me.MATHML?JE(t):r===me.SVG&&(XI(t),ZE(t)),Xf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function LR(e,t){if(t.tagID===g.P||t.tagID===g.BR){Ty(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)===me.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const DR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,MR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),by={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function _y(e,t){const n=YR(e),r=RE("type",{handlers:{root:FR,element:BR,text:UR,comment:wy,doctype:HR,raw:zR},unknown:$R}),s={parser:n?new ny(by):ny.getFragmentParser(void 0,by),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),Vs(s,Tr());const a=n?s.parser.document:s.parser.getFragment(),u=WO(a,{file:s.options.file});return s.stitches&&sl(u,"comment",function(l,d,f){const p=l;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function xy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function FR(e,t){xy(e.children,t)}function BR(e,t){VR(e,t),xy(e.children,t),qR(e,t)}function UR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:ya(e)};Vs(t,Tr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function HR(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ya(e)};Vs(t,Tr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function jR(e,t){t.stitches=!0;const n=WR(e);if("children"in e&&"children"in n){const r=_y({type:"root",children:e.children},t.options);n.children=r.children}wy({type:"comment",value:{stitch:n}},t)}function wy(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:ya(e)};Vs(t,Tr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function zR(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,Sy(t,Tr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(DR,"&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 $R(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))jR(n,t);else{let r="";throw MR.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 Vs(e,t){Sy(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=kt.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 Sy(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 VR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===kt.PLAINTEXT)return;Vs(t,Tr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:Qi.html;s===Qi.html&&n==="svg"&&(s=Qi.svg);const a=JO(ue(U({},e),{children:[]}),{space:s===Qi.svg?"svg":"html"}),u={type:Xe.START_TAG,tagName:n,tagID:zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ya(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function qR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&oI.includes(n)||t.parser.tokenizer.state===kt.PLAINTEXT)return;Vs(t,Gu(e));const r={type:Xe.END_TAG,tagName:n,tagID:zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ya(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===kt.RCDATA||t.parser.tokenizer.state===kt.RAWTEXT||t.parser.tokenizer.state===kt.SCRIPT_DATA)&&(t.parser.tokenizer.state=kt.DATA)}function YR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ya(e){const t=Tr(e)||{line:void 0,column:void 0,offset:void 0},n=Gu(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 WR(e){return"children"in e?Xi(ue(U({},e),{children:[]})):Xi(e)}function vy(e){return function(t,n){return _y(t,ue(U({},e),{file:n}))}}const Zi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ay={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Zi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Zi],h2:[["className","sr-only"]],img:[...Zi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Zi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Zi],table:[...Zi],ul:[...Zi,["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"]},ci={}.hasOwnProperty;function GR(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},Ay),t):Ay,stack:[]},s=Ny(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function Ny(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return XR(e,n);case"doctype":return QR(e,n);case"element":return KR(e,n);case"root":return JR(e,n);case"text":return ZR(e,n)}}}function XR(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 QR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ta(n,t),n}}function KR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ky(e,t.children),s=e6(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&&ci.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let d=-1;for(a=!1;++d<l.length;)e.stack.includes(l[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:s,children:r};return Ta(u,t),u}function JR(e,t){const r={type:"root",children:ky(e,t.children)};return Ta(r,t),r}function ZR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ta(r,t),r}function ky(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=Ny(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function e6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&ci.call(r,n)?r[n]:void 0,u=r&&ci.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(ci.call(l,f)){const p=l[f];let m=Cy(e,Iy(a,f),f,p);m==null&&(m=Cy(e,Iy(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&ci.call(s,n)){const p=s[n];for(f in p)ci.call(p,f)&&!ci.call(d,f)&&(d[f]=p[f])}return d}function Cy(e,t,n,r){return t?Array.isArray(r)?t6(e,t,n,r):Oy(e,t,n,r):void 0}function t6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Oy(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Oy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&n6(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function n6(e,t,n){const r=e.schema.protocols&&ci.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),l=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||l>-1&&a>l)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function Ta(e,t){const n=x1(t);t.data&&(e.data=Xi(t.data)),n&&(e.position=n)}function Iy(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function r6(e){return function(t){return GR(t,e)}}const Py=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return _.jsx("a",ue(U(U({className:F(e,`${C}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},i6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=at();return!e&&!t?null:_.jsx("div",{className:F(n,`${C}-disclaimer`),children:t?_.jsx(SE,{rehypePlugins:[vy,r6],components:{ul:({children:r})=>_.jsx("ul",{className:F(n,`${C}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:F(n,`${C}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:F(n,`${C}-li`),children:r}),a:({href:r,title:s,children:a})=>_.jsx(Py,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>_.jsx("img",{className:F(n,`${C}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>_.jsx("p",{className:F(n,`${C}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:F(n,`${C}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:F(n,`${C}-disclaimer-text`),children:e})})},nh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a}=cn(),{globalClassName:u,searchConfig:l,enableEscalationToAgent:d}=at(),f=H.useRef(null),p=t||!s&&!a,m=y=>{var v;y.preventDefault();const x=(((v=f.current)==null?void 0:v.value)||"").trim();x&&(f.current.value="",r(x))},T=()=>{r("Can you connect me to a human?")};return _.jsxs("div",{className:F(u,e,`cim-${n}-component`,`${C}-search-bar-wrapper`),children:[_.jsxs("form",{className:F(u,e,`cim-${n}-component`,`${C}-search-bar`),name:`${C}-search-form`,onSubmit:m,children:[_.jsx("input",{className:F(u,e,`cim-${n}-component`,`${C}-search-input`),type:"text",ref:f,placeholder:(l==null?void 0:l.placeholder)||"Ask us anything",name:`${C}-user-input`,disabled:p}),_.jsx(MN,{className:e,globalClassName:u,searchConfig:l,componentType:n,isLoading:p}),d&&_.jsx(tr,{className:F(u,`${C}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:p,onClick:T,icon:_.jsx(SN,{})})]}),_.jsx(i6,{})]})};function s6(e){return ot({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function o6(e){return ot({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 Ry=H.createContext({isOpen:!1}),rh=H.createContext(null),Ly=H.createContext(null),qs=()=>{var n,r;const e=H.useContext(rh),t=H.useContext(Ly);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Dy=({onClearChat:e,componentType:t})=>{const n=qs(),r=()=>{e(),n()};return _.jsxs("button",{className:F(`${C}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(o6,{}),"Clear chat"]})},My=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=at(),r=qs(),[s,a]=H.useState(!1),u=()=>ze(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(l){n==null||n.error("Error downloading transcript:",l)}finally{a(!1)}}});return _.jsxs("button",{className:F(`${C}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[_.jsx(s6,{}),"Download transcript"]})};function a6(e){return e==null?[]:Array.isArray(e)?e:[e]}var u6=(e,...t)=>e.concat(t),l6=(e,...t)=>e.filter(n=>!t.includes(n)),c6=e=>Array.from(new Set(e));function Fy(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?s?l:0:a>=u?s?0:t>u?u:t:a}function d6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return Fy(e,t,{step:-r,loop:s})}var f6=e=>Array.isArray(e),By=e=>e!=null&&typeof e=="object",h6=e=>By(e)&&!f6(e),El=e=>typeof e=="string",Ys=e=>typeof e=="function",p6=e=>e==null,m6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),g6=e=>Object.prototype.toString.call(e),Uy=Function.prototype.toString,E6=Uy.call(Object),y6=e=>{if(!By(e)||g6(e)!="[object Object]"||_6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=m6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Uy.call(n)==E6},T6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,b6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,_6=e=>T6(e)||b6(e),x6=e=>e(),w6=()=>{},ih=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function S6(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:v6,max:A6}=Math,N6=e=>Number.isNaN(e),k6=e=>N6(e)?0:e,Hy=(e,t,n)=>v6(A6(k6(e),t),n);function sh(e){if(!y6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=sh(s))}return n}function oh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function C6(e,t){if(e==null)throw new Error(t())}function O6(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var I6=Object.defineProperty,P6=(e,t,n)=>t in e?I6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ah=(e,t,n)=>P6(e,typeof t!="symbol"?t+"":t,n),jy=()=>{},yl=e=>typeof e=="object"&&e!==null,Ws=e=>e?"":void 0,zy=e=>e?"true":void 0,R6=1,L6=9,D6=11,jt=e=>yl(e)&&e.nodeType===R6&&typeof e.nodeName=="string",Tl=e=>yl(e)&&e.nodeType===L6,M6=e=>yl(e)&&e===e.window,$y=e=>jt(e)?e.localName||"":"#document";function F6(e){return["html","body","#document"].includes($y(e))}var B6=e=>yl(e)&&e.nodeType!==void 0,es=e=>B6(e)&&e.nodeType===D6&&"host"in e,U6=e=>jt(e)&&e.localName==="input",H6=e=>jt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ba(e){if(!e)return!1;const t=e.getRootNode();return Qs(t)===e}var j6=/(textarea|select)/;function z6(e){if(e==null||!jt(e))return!1;try{return U6(e)&&e.selectionStart!=null||j6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Gs(e,t){var r;if(!e||!t||!jt(e)||!jt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&es(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function xr(e){var t;return Tl(e)?e:M6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function $6(e){return xr(e).documentElement}function Xs(e){var t,n,r;return es(e)?Xs(e.host):Tl(e)?(t=e.defaultView)!=null?t:window:jt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Qs(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 V6(e){if($y(e)==="html")return e;const t=e.assignedSlot||e.parentNode||es(e)&&e.host||$6(e);return es(t)?t.host:t}function uh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Tl(t)||es(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var lh=new WeakMap;function Ks(e){return lh.has(e)||lh.set(e,Xs(e).getComputedStyle(e)),lh.get(e)}var ch=new Set(["menu","listbox","dialog","grid","tree","region"]),q6=e=>ch.has(e),Vy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function qy(e,t){const n=new Set,r=uh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Vy(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(m&&q6(m)&&!T&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function Yy(e,t){const n=uh(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Vy(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";m&&ch.has(m)&&!T&&(t(p),s(p))}}}};s(e)}function Y6(e){const t=new Set;return Yy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function W6(e){const t=e.getAttribute("role");return!!(t&&ch.has(t))}function G6(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function X6(e){var t;return G6(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function Q6(e){if(!e.id)return!1;const t=uh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&W6(e))}var dh=()=>typeof document!="undefined";function K6(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var fh=e=>dh()&&e.test(K6()),J6=e=>dh()&&e.test(navigator.vendor),Wy=()=>dh()&&!!navigator.maxTouchPoints,Z6=()=>fh(/^iPhone/i),e4=()=>fh(/^iPad/i)||hh()&&navigator.maxTouchPoints>1,bl=()=>Z6()||e4(),t4=()=>hh()||bl(),hh=()=>fh(/^Mac/i),n4=()=>t4()&&J6(/apple/i);function r4(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function ir(e){var n;const t=r4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Gy=e=>e.button===0,i4=e=>e.button===2||hh()&&e.ctrlKey&&e.button===0,s4=e=>"touches"in e&&e.touches.length>0,o4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Xy={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function a4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=o4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in Xy&&(s=Xy[s]),s}function Qy(e,t="client"){const n=s4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var zt=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},Ky=e=>jt(e)&&e.tagName==="IFRAME",u4=/^(audio|video|details)$/;function Jy(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var l4=e=>!Number.isNaN(Jy(e)),c4=e=>Jy(e)<0;function d4(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 Zy(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let l=0;for(;l<s.length;){const d=s[l++];if(!d||a.has(d))continue;a.add(d);const f=d4(d,t);if(f){const p=Array.from(f.querySelectorAll(_l)).filter(n),m=u.get(d);if(m!==void 0){const T=m+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)})}s.push(...p)}}return r}var _l="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",eT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(_l));(n==!0||n=="if-empty"&&s.length===0)&&jt(e)&&wr(e)&&s.unshift(e);const u=[];for(const l of s)if(wr(l)){if(Ky(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...eT(d,{getShadowRoot:r}));continue}u.push(l)}return r?Zy(u,r,wr):u};function wr(e){return!jt(e)||e.closest("[inert]")?!1:e.matches(_l)&&H6(e)}function Js(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(_l));n&&ts(e)&&s.unshift(e);const a=[];for(const u of s)if(ts(u)){if(Ky(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...Js(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Zy(a,r,ts);return!u.length&&n?s:u}return!a.length&&n?s:a}function ts(e){return jt(e)&&e.tabIndex>0?!0:wr(e)&&!c4(e)}function f4(e,t={}){const n=Js(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function h4(e,t={}){const{current:n,getShadowRoot:r}=t,s=Js(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Qs(a);if(!u)return null;const l=s.indexOf(u);return s[l+1]||null}function _a(e){return e.tabIndex<0&&(u4.test(e.localName)||z6(e))&&!l4(e)?0:e.tabIndex}function tT(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)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=Js(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var p4=class a2{constructor(){ah(this,"id",null),ah(this,"fn_cleanup"),ah(this,"cleanup",()=>{this.cancel()})}static create(){return new a2}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 Dt(e){const t=p4.create();return t.request(e),t.cleanup}function nT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function ph(e){const t=V6(e);return F6(t)?xr(t).body:jt(t)&&E4(t)?t:ph(t)}var m4=/auto|scroll|overlay|hidden|clip/,g4=new Set(["inline","contents"]);function E4(e){const t=Xs(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return m4.test(n+s+r)&&!g4.has(a)}var Zs="default",mh="",xl=new WeakMap;function y4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return bl()?(Zs==="default"&&(mh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),Zs="disabled"):t&&(xl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>T4({target:t,doc:r})}function T4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(bl()){if(Zs!=="disabled")return;Zs="restoring",setTimeout(()=>{nT(()=>{Zs==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=mh||""),mh="",Zs="default")})},300)}else if(t&&xl.has(t)){const a=xl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),xl.delete(t)}}function b4(e={}){const u=e,{defer:t,target:n}=u,r=pn(u,["defer","target"]),s=t?Dt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(y4(ue(U({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function _4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=Qy(l),f=Math.sqrt(ud(d.x,2)+ud(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=Qy(l);r({point:d,event:l})},u=[zt(e,"pointermove",s,!1),zt(e,"pointerup",a,!1),zt(e,"pointercancel",a,!1),zt(e,"contextmenu",a,!1),b4({doc:e})];return()=>{u.forEach(l=>l())}}function x4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,l=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=f4(e,{includeContainer:!0,getShadowRoot:a}),y=h4(l,{current:n,getShadowRoot:a}),x=!m&&!T;f.shiftKey&&ba(y)?(s==null||s(),p=T):f.shiftKey&&(ba(m)||x)?p=n:!f.shiftKey&&ba(n)?(s==null||s(),p=m):!f.shiftKey&&(ba(T)||x)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return zt(u,"keydown",d,!0)}function w4(e,t){const l=t,{defer:n,triggerElement:r}=l,s=pn(l,["defer","triggerElement"]),a=n?Dt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(x4(d,U({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function S4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function wl(e,t){if(!e)return jy;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function v4(e,t,n){if(!e)return jy;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 A4(e,t,n){const{signal:r}=t;return[new Promise((u,l)=>{const d=setTimeout(()=>{l(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),l(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),l(f))})}),()=>t.abort()]}function N4(e,t){const{timeout:n,rootNode:r}=t,s=Xs(r),a=xr(r),u=new s.AbortController;return A4(new Promise(l=>{const d=e();if(d){l(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),l(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var k4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),C4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,rT=e=>{const t={};let n;for(;n=C4.exec(e);)t[n[1]]=n[2];return t},O4=(e,t)=>{if(El(e)){if(El(t))return`${e};${t}`;e=rT(e)}else El(t)&&(t=rT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Mt(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=ih(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=k4(t[s],n[s]);continue}if(s==="style"){t[s]=O4(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function z7(e){return e}var eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(eo||{}),gh="__init__";function I4(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>xr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>Qs(t()),a=u=>t().getElementById(u);return ue(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:ba,getById:a})}function P4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var to=()=>e=>Array.from(new Set(e)),iT=typeof globalThis.document!="undefined"?H.useLayoutEffect:H.useEffect;function Sl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=H.useState(t),[s,a]=H.useState(r),u=e().value!==void 0,l=H.useRef(s);l.current=u?e().value:s;const d=H.useRef(l.current);iT(()=>{d.current=l.current},[s,e().value]);const f=y=>{var A,S;const x=d.current,v=Ys(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:x}),u||a(v),n(v,x)||(S=(A=e()).onChange)==null||S.call(A,v,x)};function p(){return u?e().value:s}return{initial:r,ref:l,get:p,set(y){(e().sync?Ds.flushSync:x6)(()=>f(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=>{H.useEffect(()=>e,[])},Sl.ref=e=>{const t=H.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function R4(e){const t=H.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var L4=(e,t)=>{const n=H.useRef(!1),r=H.useRef(!1);H.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),H.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function vl(e,t={}){var se,ee,xe,fe,ce,he;const n=H.useMemo(()=>{const{id:le,ids:K,getRootNode:ae}=t;return I4({id:le,ids:K,getRootNode:ae})},[t]),r=(...le)=>{e.debug&&console.log(...le)},s=(ee=(se=e.props)==null?void 0:se.call(e,{props:sh(t),scope:n}))!=null?ee:t,a=D4(s),u=(xe=e.context)==null?void 0:xe.call(e,{prop:a,bindable:Sl,scope:n,flush:oT,getContext(){return d},getComputed(){return Y},getRefs(){return v},getEvent(){return y()}}),l=sT(u),d={get(le){var K;return(K=l.current)==null?void 0:K[le].ref.current},set(le,K){var ae;(ae=l.current)==null||ae[le].set(K)},initial(le){var K;return(K=l.current)==null?void 0:K[le].initial},hash(le){var ae,N;const K=(ae=l.current)==null?void 0:ae[le].get();return(N=l.current)==null?void 0:N[le].hash(K)}},f=H.useRef(new Map),p=H.useRef(null),m=H.useRef(null),T=H.useRef({type:""}),y=()=>ue(U({},T.current),{current(){return T.current},previous(){return m.current}}),x=()=>ue(U({},R),{matches(...le){return le.includes(R.ref.current)},hasTag(le){var K,ae;return!!((ae=(K=e.states[R.ref.current])==null?void 0:K.tags)!=null&&ae.includes(le))}}),v=R4((ce=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:d}))!=null?ce:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:$,action:S,guard:k,track:L4,refs:v,computed:Y,flush:oT,scope:n,choose:j}),S=le=>{const K=Ys(le)?le(A()):le;if(!K)return;const ae=K.map(N=>{var J,P;const D=(P=(J=e.implementations)==null?void 0:J.actions)==null?void 0:P[N];return D||oh(`[zag-js] No implementation found for action "${JSON.stringify(N)}"`),D});for(const N of ae)N==null||N(A())},k=le=>{var K,ae;return Ys(le)?le(A()):(ae=(K=e.implementations)==null?void 0:K.guards)==null?void 0:ae[le](A())},I=le=>{const K=Ys(le)?le(A()):le;if(!K)return;const ae=K.map(D=>{var P,Se;const J=(Se=(P=e.implementations)==null?void 0:P.effects)==null?void 0:Se[D];return J||oh(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),J}),N=[];for(const D of ae){const J=D==null?void 0:D(A());J&&N.push(J)}return()=>N.forEach(D=>D==null?void 0:D())},j=le=>a6(le).find(K=>{let ae=!K.guard;return El(K.guard)?ae=!!k(K.guard):Ys(K.guard)&&(ae=K.guard(A())),ae}),Y=le=>{C6(e.computed,()=>"[zag-js] No computed object found on machine");const K=e.computed[le];return K({context:d,event:y(),prop:a,refs:v,scope:n,computed:Y})},R=Sl(()=>({defaultValue:e.initialState({prop:a}),onChange(le,K){var N,D,J,P;if(K){const Se=f.current.get(K);Se==null||Se(),f.current.delete(K)}K&&S((N=e.states[K])==null?void 0:N.exit),S((D=p.current)==null?void 0:D.actions);const ae=I((J=e.states[le])==null?void 0:J.effects);if(ae&&f.current.set(le,ae),K===gh){S(e.entry);const Se=I(e.effects);Se&&f.current.set(gh,Se)}S((P=e.states[le])==null?void 0:P.entry)}})),W=H.useRef(void 0),ie=H.useRef(eo.NotStarted);iT(()=>{queueMicrotask(()=>{var D;const ae=ie.current===eo.Started;ie.current=eo.Started,r(ae?"rehydrating...":"initializing...");const N=(D=W.current)!=null?D:R.initial;R.invoke(N,ae?R.get():gh)});const le=f.current,K=R.ref.current;return()=>{r("unmounting..."),W.current=K,ie.current=eo.Stopped,le.forEach(ae=>ae==null?void 0:ae()),f.current=new Map,p.current=null,queueMicrotask(()=>{S(e.exit)})}},[]);const de=()=>"ref"in R?R.ref.current:R.get(),$=le=>{queueMicrotask(()=>{var P,Se,Me,_e,ne;if(ie.current!==eo.Started)return;m.current=T.current,T.current=le;let K=de();const ae=(Me=(P=e.states[K].on)==null?void 0:P[le.type])!=null?Me:(Se=e.on)==null?void 0:Se[le.type],N=j(ae);if(!N)return;p.current=N;const D=(_e=N.target)!=null?_e:K;r("transition",le.type,N.target||K,`(${N.actions})`);const J=D!==K;J?Ds.flushSync(()=>R.set(D)):N.reenter&&!J?R.invoke(K,K):S((ne=N.actions)!=null?ne:[])})};return(he=e.watch)==null||he.call(e,A()),{state:x(),send:$,context:d,prop:a,scope:n,refs:v,computed:Y,event:y(),getStatus:()=>ie.current}}function sT(e){const t=H.useRef(e);return t.current=e,t}function D4(e){const t=sT(e);return function(r){return t.current[r]}}function oT(e){queueMicrotask(()=>{Ds.flushSync(()=>e())})}var Eh=P4(e=>e);function Al(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function M4(e){var r,s;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=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const yh=e=>{const t=H.memo(H.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=pn(f,["asChild","children"]);if(!s)return H.createElement(e,ue(U({},u),{ref:r}),a);if(!H.isValidElement(a))return null;const l=H.Children.only(a),d=M4(l);return H.cloneElement(l,ue(U({},Mt(u,l.props)),{ref:r?Al(r,d):d}))}));return t.displayName=e.displayName||e.name,t},rn=(()=>{const e=new Map;return new Proxy(yh,{apply(t,n,r){return yh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,yh(r)),e.get(r)}})})();function F4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ns(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=H.createContext(u);l.displayName=t;function d(){var p;const f=H.useContext(l);if(!f&&n){const m=new Error(a!=null?a:F4(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[B4,Th]=ns({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[aT,xa]=ns({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),uT=H.forwardRef((e,t)=>{const n=Th(),r=xa(),s=Mt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(rn.div,ue(U({},s),{ref:Al(r.ref,t)}))});uT.displayName="PopoverContent";const lT=H.forwardRef((e,t)=>{const n=Th(),r=xa(),s=Mt(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(rn.div,ue(U({},s),{ref:t}))});lT.displayName="PopoverPositioner";const wa=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},U({},e)]),cT=e=>wa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function U4(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var H4={props({props:e}){return ue(U({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Ks(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Dt(()=>{var l,d;const u=Nl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((l=t.get("styles"))==null?void 0:l.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})=>{Dt(()=>{e.set("prevAnimationName",Nl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===s&&e.set("prevAnimationName",Nl(t.get("styles")))},u=d=>{const f=Nl(t.get("styles"));ir(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const l=wl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),nT(()=>l())}}}}};function Nl(e){return(e==null?void 0:e.animationName)||"none"}to()(["onExitComplete","present","immediate"]);function j4(e,t={}){const{sync:n=!1}=t,r=z4(e);return H.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function z4(e){const t=H.useRef(e);return t.current=e,t}const bh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=T,a=pn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=H.useRef(!1),l=ue(U({},a),{present:r,onExitComplete:j4(e.onExitComplete)}),d=vl(H4,l),f=U4(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var rs=(e,t=[])=>({parts:(...n)=>{if($4(t))return rs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>rs(e,[...t,...n]),omit:(...n)=>rs(e,t.filter(r=>!n.includes(r))),rename:n=>rs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${no(e)}"][data-part="${no(r)}"]`,`& [data-scope="${no(e)}"][data-part="${no(r)}"]`].join(", "),attrs:{"data-scope":no(e),"data-part":no(r)}}}),{})}),no=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),$4=e=>e.length===0;const V4=["top","right","bottom","left"],di=Math.min,Hr=Math.max,kl=Math.round,Cl=Math.floor,Sr=e=>({x:e,y:e}),q4={left:"right",right:"left",bottom:"top",top:"bottom"};function dT(e,t,n){return Hr(e,di(t,n))}function jr(e,t){return typeof e=="function"?e(t):e}function fi(e){return e.split("-")[0]}function ro(e){return e.split("-")[1]}function _h(e){return e==="x"?"y":"x"}function xh(e){return e==="y"?"height":"width"}function vr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function wh(e){return _h(vr(e))}function Y4(e,t,n){n===void 0&&(n=!1);const r=ro(e),s=wh(e),a=xh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Ol(u)),[u,Ol(u)]}function W4(e){const t=Ol(e);return[Sh(e),t,Sh(t)]}function Sh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const fT=["left","right"],hT=["right","left"],G4=["top","bottom"],X4=["bottom","top"];function Q4(e,t,n){switch(e){case"top":case"bottom":return n?t?hT:fT:t?fT:hT;case"left":case"right":return t?G4:X4;default:return[]}}function K4(e,t,n,r){const s=ro(e);let a=Q4(fi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Sh)))),a}function Ol(e){const t=fi(e);return q4[t]+e.slice(t.length)}function J4(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function pT(e){return typeof e!="number"?J4(e):{top:e,right:e,bottom:e,left:e}}function Il(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function mT(e,t,n){let{reference:r,floating:s}=e;const a=vr(t),u=wh(t),l=xh(u),d=fi(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,T=r[l]/2-s[l]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const x=ro(t);return x&&(y[u]+=T*(x==="end"?1:-1)*(n&&f?-1:1)),y}function Z4(e,t){return ze(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=jr(t,e),x=pT(y),A=l[T?m==="floating"?"reference":"floating":m],S=Il(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(l.floating)),boundary:f,rootBoundary:p,strategy:d})),k=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,I=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),j=(yield a.isElement==null?void 0:a.isElement(I))&&(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1},Y=Il(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:I,strategy:d}):k);return{top:(S.top-Y.top+x.top)/j.y,bottom:(Y.bottom-S.bottom+x.bottom)/j.y,left:(S.left-Y.left+x.left)/j.x,right:(Y.right-S.right+x.right)/j.x}})}const eL=50,tL=(e,t,n)=>ze(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:ue(U({},u),{detectOverflow:Z4}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=mT(f,r,d),T=r,y=0;const x={};for(let v=0;v<a.length;v++){const A=a[v];if(!A)continue;const{name:S,fn:k}=A,{x:I,y:j,data:Y,reset:R}=yield k({x:p,y:m,initialPlacement:r,placement:T,strategy:s,middlewareData:x,rects:f,platform:l,elements:{reference:e,floating:t}});p=I!=null?I:p,m=j!=null?j:m,x[S]=U(U({},x[S]),Y),R&&y<eL&&(y++,typeof R=="object"&&(R.placement&&(T=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):R.rects),{x:p,y:m}=mT(f,T,d)),v=-1)}return{x:p,y:m,placement:T,strategy:s,middlewareData:x}}),nL=e=>({name:"arrow",options:e,fn(n){return ze(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=jr(e,n)||{};if(p==null)return{};const T=pT(m),y={x:r,y:s},x=wh(a),v=xh(x),A=yield l.getDimensions(p),S=x==="y",k=S?"top":"left",I=S?"bottom":"right",j=S?"clientHeight":"clientWidth",Y=u.reference[v]+u.reference[x]-y[x]-u.floating[v],R=y[x]-u.reference[x],W=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ie=W?W[j]:0;(!ie||!(yield l.isElement==null?void 0:l.isElement(W)))&&(ie=d.floating[j]||u.floating[v]);const de=Y/2-R/2,$=ie/2-A[v]/2-1,se=di(T[k],$),ee=di(T[I],$),xe=ie-A[v]-ee,fe=ie/2-A[v]/2+de,ce=dT(se,fe,xe),he=!f.arrow&&ro(a)!=null&&fe!==ce&&u.reference[v]/2-(fe<se?se:ee)-A[v]/2<0,le=he?fe<se?fe-se:fe-xe:0;return{[x]:y[x]+le,data:U({[x]:ce,centerOffset:fe-ce-le},he&&{alignmentOffset:le}),reset:he}})}}),rL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return ze(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,ce=jr(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:A=!0}=ce,S=pn(ce,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=fi(a),I=vr(d),j=fi(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(j||!A?[Ol(d)]:W4(d)),W=v!=="none";!y&&W&&R.push(...K4(d,A,v,Y));const ie=[d,...R],de=yield f.detectOverflow(n,S),$=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&$.push(de[k]),T){const he=Y4(a,l,Y);$.push(de[he[0]],de[he[1]])}if(se=[...se,{placement:a,overflows:$}],!$.every(he=>he<=0)){var ee,xe;const he=(((ee=u.flip)==null?void 0:ee.index)||0)+1,le=ie[he];if(le&&(!(T==="alignment"?I!==vr(le):!1)||se.every(N=>vr(N.placement)===I?N.overflows[0]>0:!0)))return{data:{index:he,overflows:se},reset:{placement:le}};let K=(xe=se.filter(ae=>ae.overflows[0]<=0).sort((ae,N)=>ae.overflows[1]-N.overflows[1])[0])==null?void 0:xe.placement;if(!K)switch(x){case"bestFit":{var fe;const ae=(fe=se.filter(N=>{if(W){const D=vr(N.placement);return D===I||D==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(D=>D>0).reduce((D,J)=>D+J,0)]).sort((N,D)=>N[1]-D[1])[0])==null?void 0:fe[0];ae&&(K=ae);break}case"initialPlacement":K=d;break}if(a!==K)return{reset:{placement:K}}}return{}})}}};function gT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ET(e){return V4.some(t=>e[t]>=0)}const iL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return ze(this,null,function*(){const{rects:r,platform:s}=n,l=jr(e,n),{strategy:a="referenceHidden"}=l,u=pn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,ue(U({},u),{elementContext:"reference"})),f=gT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:ET(f)}}}case"escaped":{const d=yield s.detectOverflow(n,ue(U({},u),{altBoundary:!0})),f=gT(d,r.floating);return{data:{escapedOffsets:f,escaped:ET(f)}}}default:return{}}})}}},yT=new Set(["left","top"]);function sL(e,t){return ze(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=fi(n),l=ro(n),d=vr(n)==="y",f=yT.has(u)?-1:1,p=a&&d?-1:1,m=jr(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof x=="number"&&(y=l==="end"?x*-1:x),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const oL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return ze(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield sL(n,e);return l===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:ue(U({},f),{placement:l})}})}}},aL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return ze(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,I=jr(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:j=>{let{x:Y,y:R}=j;return{x:Y,y:R}}}}=I,p=pn(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},T=yield u.detectOverflow(n,p),y=vr(a),x=_h(y);let v=m[x],A=m[y];const S=(j,Y)=>dT(Y+T[j==="y"?"top":"left"],Y,Y-T[j==="y"?"bottom":"right"]);l&&(v=S(x,v)),d&&(A=S(y,A));const k=f.fn(ue(U({},n),{[x]:v,[y]:A}));return ue(U({},k),{data:{x:k.x-r,y:k.y-s,enabled:{[x]:l,[y]:d}}})})}}},uL=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:l,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=jr(e,t),T={x:s,y:a},y=vr(u),x=_h(y);let v=T[x],A=T[y];const S=jr(f,t),k=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:(n=S.mainAxis)!=null?n:0,crossAxis:(r=S.crossAxis)!=null?r:0};if(p){const Y=x==="y"?"height":"width",R=l.reference[x]-l.floating[Y]+k.mainAxis,W=l.reference[x]+l.reference[Y]-k.mainAxis;v<R?v=R:v>W&&(v=W)}if(m){var I,j;const Y=x==="y"?"width":"height",R=yT.has(fi(u)),W=l.reference[y]-l.floating[Y]+(R&&((I=d.offset)==null?void 0:I[y])||0)+(R?0:k.crossAxis),ie=l.reference[y]+l.reference[Y]+(R?0:((j=d.offset)==null?void 0:j[y])||0)-(R?k.crossAxis:0);A<W?A=W:A>ie&&(A=ie)}return{[x]:v,[y]:A}}}},lL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return ze(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,$=jr(e,n),{apply:l=()=>{}}=$,d=pn($,["apply"]),f=yield a.detectOverflow(n,d),p=fi(r),m=ro(r),T=vr(r)==="y",{width:y,height:x}=s.floating;let v,A;p==="top"||p==="bottom"?(v=p,A=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(A=p,v=m==="end"?"top":"bottom");const S=x-f.top-f.bottom,k=y-f.left-f.right,I=di(x-f[v],S),j=di(y-f[A],k),Y=n.middlewareData.shift,R=!Y;let W=I,ie=j;Y!=null&&Y.enabled.x&&(ie=k),Y!=null&&Y.enabled.y&&(W=S),R&&!m&&(T?ie=y-2*Hr(f.left,f.right):W=x-2*Hr(f.top,f.bottom)),yield l(ue(U({},n),{availableWidth:ie,availableHeight:W}));const de=yield a.getDimensions(u.floating);return y!==de.width||x!==de.height?{reset:{rects:!0}}:{}})}}};function Pl(){return typeof window!="undefined"}function io(e){return TT(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ar(e){var t;return(t=(TT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function TT(e){return Pl()?e instanceof Node||e instanceof Rn(e).Node:!1}function sr(e){return Pl()?e instanceof Element||e instanceof Rn(e).Element:!1}function Nr(e){return Pl()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function bT(e){return!Pl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function Sa(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=or(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function cL(e){return/^(table|td|th)$/.test(io(e))}function Rl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const dL=/transform|translate|scale|rotate|perspective|filter/,fL=/paint|layout|strict|content/,is=e=>!!e&&e!=="none";let vh;function Ah(e){const t=sr(e)?or(e):e;return is(t.transform)||is(t.translate)||is(t.scale)||is(t.rotate)||is(t.perspective)||!Nh()&&(is(t.backdropFilter)||is(t.filter))||dL.test(t.willChange||"")||fL.test(t.contain||"")}function hL(e){let t=hi(e);for(;Nr(t)&&!so(t);){if(Ah(t))return t;if(Rl(t))return null;t=hi(t)}return null}function Nh(){return vh==null&&(vh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vh}function so(e){return/^(html|body|#document)$/.test(io(e))}function or(e){return Rn(e).getComputedStyle(e)}function Ll(e){return sr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if(io(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bT(e)&&e.host||Ar(e);return bT(t)?t.host:t}function _T(e){const t=hi(e);return so(t)?(e.ownerDocument||e).body:Nr(t)&&Sa(t)?t:_T(t)}function va(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=_T(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Rn(s);if(a){const l=kh(u);return t.concat(u,u.visualViewport||[],Sa(s)?s:[],l&&n?va(l):[])}else return t.concat(s,va(s,[],n))}function kh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xT(e){const t=or(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Nr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=kl(n)!==a||kl(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function Ch(e){return sr(e)?e:e.contextElement}function oo(e){const t=Ch(e);if(!Nr(t))return Sr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=xT(t);let u=(a?kl(n.width):n.width)/r,l=(a?kl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const pL=Sr(0);function wT(e){const t=Rn(e);return!Nh()||!t.visualViewport?pL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rn(e)?!1:t}function ss(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Ch(e);let u=Sr(1);t&&(r?sr(r)&&(u=oo(r)):u=oo(e));const l=mL(a,n,r)?wT(a):Sr(0);let d=(s.left+l.x)/u.x,f=(s.top+l.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const T=Rn(a),y=r&&sr(r)?Rn(r):r;let x=T,v=kh(x);for(;v&&r&&y!==x;){const A=oo(v),S=v.getBoundingClientRect(),k=or(v),I=S.left+(v.clientLeft+parseFloat(k.paddingLeft))*A.x,j=S.top+(v.clientTop+parseFloat(k.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,m*=A.y,d+=I,f+=j,x=Rn(v),v=kh(x)}}return Il({width:p,height:m,x:d,y:f})}function Dl(e,t){const n=Ll(e).scrollLeft;return t?t.left+n:ss(Ar(e)).left+n}function ST(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Dl(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function gL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Ar(r),l=t?Rl(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Sr(1);const p=Sr(0),m=Nr(r);if((m||!m&&!a)&&((io(r)!=="body"||Sa(u))&&(d=Ll(r)),Nr(r))){const y=ss(r);f=oo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?ST(u,d):Sr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function EL(e){return Array.from(e.getClientRects())}function yL(e){const t=Ar(e),n=Ll(e),r=e.ownerDocument.body,s=Hr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Hr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Dl(e);const l=-n.scrollTop;return or(r).direction==="rtl"&&(u+=Hr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const vT=25;function TL(e,t){const n=Rn(e),r=Ar(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(s){a=s.width,u=s.height;const p=Nh();(!p||p&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=Dl(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-y);x<=vT&&(a-=x)}else f<=vT&&(a+=f);return{width:a,height:u,x:l,y:d}}const bL=new Set(["absolute","fixed"]);function _L(e,t){const n=ss(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Nr(e)?oo(e):Sr(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function AT(e,t,n){let r;if(t==="viewport")r=TL(e,n);else if(t==="document")r=yL(Ar(e));else if(sr(t))r=_L(t,n);else{const s=wT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Il(r)}function NT(e,t){const n=hi(e);return n===t||!sr(n)||so(n)?!1:or(n).position==="fixed"||NT(n,t)}function xL(e,t){const n=t.get(e);if(n)return n;let r=va(e,[],!1).filter(l=>sr(l)&&io(l)!=="body"),s=null;const a=or(e).position==="fixed";let u=a?hi(e):e;for(;sr(u)&&!so(u);){const l=or(u),d=Ah(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&bL.has(s.position)||Sa(u)&&!d&&NT(e,u))?r=r.filter(p=>p!==u):s=l,u=hi(u)}return t.set(e,r),r}function wL(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Rl(t)?[]:xL(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=AT(t,p,s);return f.top=Hr(m.top,f.top),f.right=di(m.right,f.right),f.bottom=di(m.bottom,f.bottom),f.left=Hr(m.left,f.left),f},AT(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function SL(e){const{width:t,height:n}=xT(e);return{width:t,height:n}}function vL(e,t,n){const r=Nr(t),s=Ar(t),a=n==="fixed",u=ss(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Sr(0);function f(){d.x=Dl(s)}if(r||!r&&!a)if((io(t)!=="body"||Sa(s))&&(l=Ll(t)),r){const y=ss(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?ST(s,l):Sr(0),m=u.left+l.scrollLeft-d.x-p.x,T=u.top+l.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function Oh(e){return or(e).position==="static"}function kT(e,t){if(!Nr(e)||or(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ar(e)===n&&(n=n.ownerDocument.body),n}function CT(e,t){const n=Rn(e);if(Rl(e))return n;if(!Nr(e)){let s=hi(e);for(;s&&!so(s);){if(sr(s)&&!Oh(s))return s;s=hi(s)}return n}let r=kT(e,t);for(;r&&cL(r)&&Oh(r);)r=kT(r,t);return r&&so(r)&&Oh(r)&&!Ah(r)?n:r||hL(e)||n}const AL=function(e){return ze(this,null,function*(){const t=this.getOffsetParent||CT,n=this.getDimensions,r=yield n(e.floating);return{reference:vL(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function NL(e){return or(e).direction==="rtl"}const kL={convertOffsetParentRelativeRectToViewportRelativeRect:gL,getDocumentElement:Ar,getClippingRect:wL,getOffsetParent:CT,getElementRects:AL,getClientRects:EL,getDimensions:SL,getScale:oo,isElement:sr,isRTL:NL};function OT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function CL(e,t){let n=null,r;const s=Ar(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function u(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(l||t(),!T||!y)return;const x=Cl(m),v=Cl(s.clientWidth-(p+T)),A=Cl(s.clientHeight-(m+y)),S=Cl(p),I={rootMargin:-x+"px "+-v+"px "+-A+"px "+-S+"px",threshold:Hr(0,di(1,d))||1};let j=!0;function Y(R){const W=R[0].intersectionRatio;if(W!==d){if(!j)return u();W?u(!1,W):r=setTimeout(()=>{u(!1,1e-7)},1e3)}W===1&&!OT(f,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(Y,ue(U({},I),{root:s.ownerDocument}))}catch(R){n=new IntersectionObserver(Y,I)}n.observe(e)}return u(!0),a}function OL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Ch(e),p=s||a?[...f?va(f):[],...va(t)]:[];p.forEach(S=>{s&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const m=f&&l?CL(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(S=>{let[k]=S;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let x,v=d?ss(e):null;d&&A();function A(){const S=ss(e);v&&!OT(v,S)&&n(),v=S,x=requestAnimationFrame(A)}return n(),()=>{var S;p.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),m==null||m(),(S=y)==null||S.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const IL=oL,PL=aL,RL=rL,LL=lL,DL=iL,ML=nL,FL=uL,BL=(e,t,n)=>{const r=new Map,s=U({platform:kL},n),a=ue(U({},s.platform),{_c:r});return tL(e,t,ue(U({},s),{platform:a}))};function IT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return ue(U({},s),{toJSON:()=>s})}function UL(e){if(!e)return IT();const{x:t,y:n,width:r,height:s}=e;return IT(t,n,r,s)}function HL(e,t){return{contextElement:jt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?UL(r):n.getBoundingClientRect()}}}var Aa=e=>({variable:e,reference:`var(${e})`}),zr={arrowSize:Aa("--arrow-size"),arrowSizeHalf:Aa("--arrow-size-half"),arrowBg:Aa("--arrow-background"),transformOrigin:Aa("--transform-origin"),arrowOffset:Aa("--arrow-offset")},jL=e=>e==="top"||e==="bottom"?"y":"x";function zL(e,t){return{name:"transformOrigin",fn(n){var de,$,se,ee,xe;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=jL(d),p=((de=s.arrow)==null?void 0:de.x)||0,m=(($=s.arrow)==null?void 0:$.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+T/2,v=m+y/2,A=Math.abs(((se=s.shift)==null?void 0:se.y)||0),S=u.reference.height/2,k=y/2,I=(xe=(ee=e.offset)==null?void 0:ee.mainAxis)!=null?xe:e.gutter,j=typeof I=="number"?I+k:I!=null?I:k,Y=A>j,R={top:`${x}px calc(100% + ${j}px)`,bottom:`${x}px ${-j}px`,left:`calc(100% + ${j}px) ${v}px`,right:`${-j}px ${v}px`}[d],W=`${x}px ${u.reference.y+S-l}px`,ie=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(zr.transformOrigin.variable,ie?W:R),{data:{transformOrigin:ie?W:R}}}}}var $L={name:"rects",fn({rects:e}){return{data:e}}},VL=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${zr.arrowOffset.reference})`}),{}}}};function qL(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var YL={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function PT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Ih(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function WL(e,t,n){const r=e||t.createElement("div");return ML({element:r,padding:n.arrowPadding})}function GL(e,t){var n;if(!p6((n=t.offset)!=null?n:t.gutter))return IL(({placement:r})=>{var p,m,T,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:l}=qL(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return sh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function XL(e){if(!e.flip)return;const t=Ih(e.boundary);return RL(ue(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function QL(e){if(!e.slide&&!e.overlap)return;const t=Ih(e.boundary);return PL(ue(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:FL()}))}function KL(e){return LL({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),l=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${l}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function JL(e){var t;if(e.hideWhenDetached)return DL({strategy:"referenceHidden",boundary:(t=Ih(e.boundary))!=null?t:"clippingAncestors"})}function ZL(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function e5(e,t,n={}){const r=HL(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},YL,n),a=t.querySelector("[data-part=arrow]"),u=[GL(a,s),XL(s),QL(s),WL(a,t.ownerDocument,s),VL(a),zL({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),KL(s),JL(s),$L],{placement:l,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>ze(null,null,function*(){var j;if(!r||!t)return;const v=yield BL(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),p==null||p({placed:!0});const A=Xs(t),S=PT(A,v.x),k=PT(A,v.y);t.style.setProperty("--x",`${S}px`),t.style.setProperty("--y",`${k}px`),s.hideWhenDetached&&(((j=v.middlewareData.hide)==null?void 0:j.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const I=t.firstElementChild;if(I){const Y=Ks(I);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>ze(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=ZL(s.listeners),x=s.listeners?OL(r,t,T,y):w6;return T(),()=>{x==null||x(),p==null||p({placed:!1})}}function RT(e,t,n={}){const l=n,{defer:r}=l,s=pn(l,["defer"]),a=r?Dt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(e5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var t5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function n5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:zr.arrowSize.reference,height:zr.arrowSize.reference,[zr.arrowSizeHalf.variable]:`calc(${zr.arrowSize.reference} / 2)`,[zr.arrowOffset.variable]:`calc(${zr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?t5[t.split("-")[0]]:void 0,background:zr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,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 ao=new WeakMap,Ml=new WeakMap,Fl={},Ph=0,LT=e=>e&&(e.host||LT(e.parentNode)),r5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=LT(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),i5=new Set(["script","output","status","next-route-announcer"]),s5=e=>i5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),o5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=r5(n,Array.isArray(e)?e:[e]);Fl[r]||(Fl[r]=new WeakMap);const l=Fl[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&jt(y)&&Yy(y,x=>{m(x)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(f.has(x))T(x);else try{if(s5(x))return;const A=x.getAttribute(s)==="true",S=(ao.get(x)||0)+1,k=(l.get(x)||0)+1;ao.set(x,S),l.set(x,k),d.push(x),S===1&&A&&Ml.set(x,!0),k===1&&x.setAttribute(r,""),A||x.setAttribute(s,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",x,v)}})};return T(n),f.clear(),Ph++,()=>{d.forEach(y=>{const x=ao.get(y)-1,v=l.get(y)-1;ao.set(y,x),l.set(y,v),x||(Ml.has(y)||y.removeAttribute(s),Ml.delete(y)),v||y.removeAttribute(r)}),Ph--,Ph||(ao=new WeakMap,ao=new WeakMap,Ml=new WeakMap,Fl={})}},a5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,u5=(e,t=a5(e),n="data-aria-hidden",r=!0)=>{if(t)return o5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},l5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function DT(e,t={}){const{defer:n=!0}=t,r=n?l5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(u5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function c5(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function d5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var MT="pointerdown.outside",FT="focus.outside";function f5(e){for(const t of e)if(jt(t)&&wr(t))return!0;return!1}var BT=e=>"clientY"in e;function h5(e,t){if(!BT(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 p5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function UT(e,t){if(!t||!BT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},l={x:e.clientX,y:e.clientY};return p5(u,l)?r||a:!1}function m5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=xr(e),f=Xs(e),p=c5(f),m=d5(f);function T(I,j){if(!jt(j)||!j.isConnected||Gs(e,j)||h5(e,I)||l&&qy(e,j))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const W=ph(Y);if(UT(I,W))return!1}const R=ph(e);return UT(I,R)?!1:!(n!=null&&n(j))}const y=new Set,x=es(e==null?void 0:e.getRootNode());function v(I){function j(Y){var de,$;const R=u&&!Wy()?Dt:se=>se(),W=Y!=null?Y:I,ie=($=(de=W==null?void 0:W.composedPath)==null?void 0:de.call(W))!=null?$:[W==null?void 0:W.target];R(()=>{const se=x?ie[0]:ir(I);if(!(!e||!T(I,se))){if(s||a){const ee=ih(s,a);e.addEventListener(MT,ee,{once:!0})}HT(e,MT,{bubbles:!1,cancelable:!0,detail:{originalEvent:W,contextmenu:i4(W),focusable:f5(ie),target:se}})}})}I.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(zt(d,"click",j,{once:!0})),y.add(m.addEventListener("click",j,{once:!0})),y.add(p.addEventListener("click",j,{once:!0}))):j()}const A=new Set,S=setTimeout(()=>{A.add(zt(d,"pointerdown",v,!0)),A.add(m.addEventListener("pointerdown",v,!0)),A.add(p.addEventListener("pointerdown",v,!0))},0);function k(I){(u?Dt:Y=>Y())(()=>{var W,ie;const Y=(ie=(W=I==null?void 0:I.composedPath)==null?void 0:W.call(I))!=null?ie:[I==null?void 0:I.target],R=x?Y[0]:ir(I);if(!(!e||!T(I,R))){if(r||a){const de=ih(r,a);e.addEventListener(FT,de,{once:!0})}HT(e,FT,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:wr(R),target:R}})}})}return Wy()||(A.add(zt(d,"focusin",k,!0)),A.add(m.addEventListener("focusin",k,!0)),A.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(S),y.forEach(I=>I()),A.forEach(I=>I())}}function g5(e,t){const{defer:n}=t,r=n?Dt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(m5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function HT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function E5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return zt(xr(e),"keydown",n,{capture:!0})}var jT="layer:request-dismiss",$n={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=>Gs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Gs(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=>$n.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];T5(e,jT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),y5(e,jT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function y5(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function T5(e,t,n){e.addEventListener(t,n,{once:!0})}var zT;function $T(){$n.layers.forEach(({node:e})=>{e.style.pointerEvents=$n.isBelowPointerBlockingLayer(e)?"none":"auto"})}function b5(e){e.style.pointerEvents=""}function _5(e,t){const n=xr(e),r=[];return $n.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(zT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=N4(()=>{const l=s();return jt(l)?l:null},{timeout:1e3});a.then(l=>r.push(wl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{$n.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=zT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function x5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){oh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};$n.add(f),$T();function p(v){var S,k;const A=ir(v.detail.originalEvent);$n.isBelowPointerBlockingLayer(e)||$n.isInBranch(A)||((S=t.onPointerDownOutside)==null||S.call(t,v),(k=t.onInteractOutside)==null||k.call(t,v),!v.defaultPrevented&&(l&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function m(v){var S,k;const A=ir(v.detail.originalEvent);$n.isInBranch(A)||((S=t.onFocusOutside)==null||S.call(t,v),(k=t.onInteractOutside)==null||k.call(t,v),!v.defaultPrevented&&(l&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function T(v){var A;$n.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var I;if(!e)return!1;const A=typeof u=="function"?u():u,S=Array.isArray(A)?A:[A],k=(I=t.persistentElements)==null?void 0:I.map(j=>j()).filter(jt);return k&&S.push(...k),S.some(j=>Gs(j,v))||$n.isInNestedLayer(e,v)}const x=[a?_5(e,t.persistentElements):void 0,E5(e,T),g5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{$n.remove(e),$T(),b5(e),x.forEach(v=>v==null?void 0:v())}}function VT(e,t){const{defer:n}=t,r=n?Dt:a=>a(),s=[];return s.push(r(()=>{const a=Ys(e)?e():e;s.push(x5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var w5=Object.defineProperty,S5=(e,t,n)=>t in e?w5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_t=(e,t,n)=>S5(e,typeof t!="symbol"?t+"":t,n),qT={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()}},v5=[],A5=class{constructor(e,t){_t(this,"trapStack"),_t(this,"config"),_t(this,"doc"),_t(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),_t(this,"portalContainers",new Set),_t(this,"listenerCleanups",[]),_t(this,"handleFocus",r=>{const s=ir(r),a=this.findContainerIndex(s,r)>=0;if(a||Tl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(_a(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],l=!1):p-1>=0&&(u=f[p-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>_a(f)>0))||(l=!1);else l=!1;l&&(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}),_t(this,"handlePointerDown",r=>{const s=ir(r);if(!(this.findContainerIndex(s,r)>=0)){if(ka(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ka(this.config.allowOutsideClick,r)||r.preventDefault()}}),_t(this,"handleClick",r=>{const s=ir(r);this.findContainerIndex(s,r)>=0||ka(this.config.clickOutsideDeactivates,r)||ka(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),_t(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;Na(r)&&r.preventDefault(),this.tryFocus(a)}}),_t(this,"handleEscapeKey",r=>{N5(r)&&ka(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),_t(this,"_mutationObserver"),_t(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(l=>Array.from(l.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(l=>l.type==="attributes"&&(l.attributeName==="aria-controls"||l.attributeName==="aria-expanded")?!0:l.type==="childList"&&l.addedNodes.length>0?Array.from(l.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return X6(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?Q6(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),_t(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),_t(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!wr(r)){const s=Qs(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;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}),_t(this,"tryFocus",r=>{if(r!==!1&&r!==Qs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,k5(r)&&r.select()}}),_t(this,"deactivate",r=>{if(!this.state.active)return this;const s=U({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),qT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),l=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{YT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),_t(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),_t(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),_t(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),_t(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),_t(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),_t(this,"getNodeForOption",(r,{hasFallback:s=!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 l=u;if(typeof u=="string"){try{l=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!l&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return l}),_t(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||ir(s);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||wr(u)&&!ts(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];l=_a(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Na(s)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||wr(u)&&!ts(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];l=_a(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Na(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||v5;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Na(r)&&!r.shiftKey},isKeyBackward(r){return Na(r)&&r.shiftKey}},t);this.doc=n.document||xr(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=>{Y6(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:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?qy(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Js(e,{getShadowRoot:this.config.getShadowRoot}),n=eT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let l=!1;for(let f=0;f<t.length;f++)if(_a(t[f])>0){l=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(ts(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(ts(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:r,lastTabbableNode:s,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 qT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?YT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(zt(this.doc,"focusin",this.handleFocus,!0),zt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),zt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),zt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),zt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),zt(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=Qs(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Na=e=>e.key==="Tab",ka=(e,...t)=>typeof e=="function"?e(...t):e,N5=e=>!e.isComposing&&e.key==="Escape",YT=e=>setTimeout(e,0),k5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function WT(e,t={}){let n;const r=Dt(()=>{const s=typeof e=="function"?e():e;if(s){n=new A5(s,ue(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:xr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Rh="data-scroll-lock";function C5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function GT(e){const t=Ks(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function XT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Rh))return;const u=GT(r)||GT(s),l=n.innerWidth-r.clientWidth;s.setAttribute(Rh,"");const d=()=>v4(r,"--scrollbar-width",`${l}px`),f=C5(r),p=()=>{const x={overflow:"hidden"};return!u&&l>0&&(x[f]=`${l}px`),wl(s,x)},m=()=>{var Y,R;const{scrollX:x,scrollY:v,visualViewport:A}=n,S=(Y=A==null?void 0:A.offsetLeft)!=null?Y:0,k=(R=A==null?void 0:A.offsetTop)!=null?R:0,I={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(k))}px`,left:`${-(x-Math.floor(S))}px`,right:"0"};!u&&l>0&&(I[f]=`${l}px`);const j=wl(s,I);return()=>{j==null||j(),n.scrollTo({left:x,top:v,behavior:"instant"})}},T=[d(),bl()?m():p()];return()=>{T.forEach(x=>x==null?void 0:x()),s.removeAttribute(Rh)}}var O5=rs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),kr=O5.build(),QT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},KT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Lh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},JT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},I5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Dh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Mh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},P5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},ZT=e=>e.getById(QT(e)),uo=e=>e.getById(KT(e)),lo=e=>e.getById(Lh(e)),eb=e=>e.getById(JT(e)),R5=e=>e.getById(Dh(e)),L5=e=>e.getById(Mh(e));function D5(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=n5(ue(U({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(ue(U({id:I5(l)},kr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(ue(U({},kr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(ue(U({},kr.anchor.attrs),{dir:u("dir"),id:QT(l)}))},getTriggerProps(){return t.button(ue(U({},kr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:KT(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Lh(l),onPointerDown(y){Gy(y)&&n4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(ue(U({},kr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ue(U({id:JT(l)},kr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(ue(U({},kr.content.attrs),{dir:u("dir"),id:Lh(l),tabIndex:-1,role:"dialog","aria-modal":zy(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Ws(d),"aria-labelledby":m.title?Dh(l):void 0,"aria-describedby":m.description?Mh(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(ue(U({},kr.title.attrs),{id:Dh(l),dir:u("dir")}))},getDescriptionProps(){return t.element(ue(U({},kr.description.attrs),{id:Mh(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ue(U({},kr.closeTrigger.attrs),{dir:u("dir"),id:P5(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var M5={props({props:e}){return ue(U({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:U({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=ZT(n))!=null?a:uo(n);return RT(r,()=>eb(n),ue(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>lo(n);let s=!0;return VT(r,{type:"popover",pointerBlocking:t("modal"),exclude:uo(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&&(s=!(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:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:w4(()=>lo(t),{triggerElement:uo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?DT(()=>[lo(t),uo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return XT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?WT(()=>lo(t),{initialFocus:()=>tT({root:lo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=ZT(n))!=null?u:uo(n);RT(s,()=>eb(n),ue(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Dt(()=>{Object.assign(e.get("renderedElements"),{title:!!R5(t),description:!!L5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Dt(()=>{const n=tT({root:lo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Dt(()=>{const a=uo(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})}}}};to()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[V7,Bl]=ns({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[q7,Fh]=ns({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),F5=e=>{const t=H.useId(),{getRootNode:n}=Bl(),{dir:r}=Fh(),s=U({id:t,dir:r,getRootNode:n},e),a=vl(M5,s);return D5(a,Eh)},B5=e=>{const[t,u]=cT(e),l=u,{children:n}=l,r=pn(l,["children"]),s=F5(r),a=bh(Mt({present:s.open},t));return _.jsx(B4,{value:s,children:_.jsx(aT,{value:a,children:n})})},tb=H.forwardRef((e,t)=>{const n=Th(),r=xa(),s=Mt(ue(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(rn.button,ue(U({},s),{ref:t}))});tb.displayName="PopoverTrigger";function U5(e){return ot({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 H5(e){return ot({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 nb(e){return ot({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 rb(e){return ot({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 j5(e){return ot({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function z5(e){return ot({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function Bh(e){return ot({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function ib(e){return ot({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 $5=({className:e,componentType:t,children:n})=>{const[r,s]=H.useState(!1),{globalClassName:a}=at(),u=f=>{s(f.open)},l=H.useCallback(()=>{s(!1)},[]),d=H.useMemo(()=>({closeMenu:l}),[l]);return _.jsxs(B5,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(tb,{"aria-label":`Overflow menu for ${t}`,className:F(`${C}-overflow-menu-button-trigger`,`${C}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(ib,{})}),_.jsx(lT,{children:_.jsx(uT,{className:F(`${C}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(Ly.Provider,{value:d,children:n})})})]})};function sb(e){return ot({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 ot({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[V5,os]=ns({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Uh=H.forwardRef((e,t)=>{const n=os(),r=Mt(n.getControlProps(),e);return _.jsx(rn.div,ue(U(U({},r),e),{ref:t}))});Uh.displayName="CarouselControl";const Hh=H.forwardRef((e,t)=>{const[n,r]=wa()(e,["readOnly","index"]),s=os(),a=Mt(s.getIndicatorProps(n),r);return _.jsx(rn.button,ue(U({},a),{ref:t}))});Hh.displayName="CarouselIndicator";const jh=H.forwardRef((e,t)=>{const n=os(),r=Mt(n.getIndicatorGroupProps(),e);return _.jsx(rn.div,ue(U({},r),{ref:t}))});jh.displayName="CarouselIndicatorGroup";const zh=H.forwardRef((e,t)=>{const[n,r]=wa()(e,["index","snapAlign"]),s=os(),a=Mt(s.getItemProps(n),r);return _.jsx(rn.div,ue(U({},a),{ref:t}))});zh.displayName="CarouselItem";const $h=H.forwardRef((e,t)=>{const n=os(),r=Mt(n.getItemGroupProps(),e);return _.jsx(rn.div,ue(U({},r),{ref:t}))});$h.displayName="CarouselItemGroup";const Vh=H.forwardRef((e,t)=>{const n=os(),r=Mt(n.getNextTriggerProps(),e);return _.jsx(rn.button,ue(U({},r),{ref:t}))});Vh.displayName="CarouselNextTrigger";const qh=H.forwardRef((e,t)=>{const n=os(),r=Mt(n.getPrevTriggerProps(),e);return _.jsx(rn.button,ue(U({},r),{ref:t}))});qh.displayName="CarouselPrevTrigger";function q5(e){const t=Ks(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=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 l(T,y){let x=parseFloat(T);return/%/.test(T)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=l(r,n.width),f=l(s,n.height),p=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function Y5(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 ab(e){let t=[];for(const n of e.children)t=t.concat(n,ab(n));return t}function ub(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?ab(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",l=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!Y5(n,m,u))continue;const T=Ks(p);let[y,x]=T.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const v=a==="x"?x:y,A=m[l]-n[l]+e[f];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+m[d]/2});break;case"end":r[a].end.push({node:p,position:A+m[d]});break}}}return r}function lb(e){const t=e.getBoundingClientRect(),n=q5(e),r=ub(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:cb([...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(db(0,s.x))),y:cb([...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(db(0,s.y)))}}function W5(e,t,n){const r=ub(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var cb=e=>[...new Set(e)],db=(e,t)=>n=>Math.max(e,Math.min(t,n)),G5=rs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),$r=G5.build(),X5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},Q5=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},Ul=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},K5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},J5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},Z5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},fb=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},_n=e=>e.getById(Ul(e)),hb=e=>S4(_n(e),"[data-part=item]"),eD=(e,t)=>e.getById(fb(e,t)),pb=e=>{const t=_n(e);if(!t)return;const n=Js(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function tD(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),T=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),v=l("slidesPerPage"),A=l("padding"),S=l("translations");return{isPlaying:d,isDragging:f,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return x/y.length},scrollToIndex(k,I){a({type:"INDEX.SET",index:k,instant:I})},scrollTo(k,I){a({type:"PAGE.SET",index:k,instant:I})},scrollNext(k){a({type:"PAGE.NEXT",instant:k})},scrollPrev(k){a({type:"PAGE.PREV",instant:k})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(k){return Array.from(r.get("slidesInView")).includes(k)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(ue(U({},$r.root.attrs),{id:X5(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":v,"--slide-spacing":l("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(ue(U({},$r.itemGroup.attrs),{id:Ul(u),"data-orientation":l("orientation"),"data-dragging":Ws(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(k){Gs(k.currentTarget,ir(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){Gs(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!l("allowMouseDrag")||!Gy(k))return;const I=ir(k);wr(I)&&I!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:S6(k=>{const I=l("orientation")==="horizontal"?"deltaX":"deltaY";k[I]<0&&!s("canScrollPrev")||k[I]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",l("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(k){const I=r.get("slidesInView").includes(k.index);return t.element(ue(U({},$r.item.attrs),{id:Q5(u,k.index),dir:l("dir"),role:"group","data-index":k.index,"data-inview":Ws(I),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":S.item(k.index,l("slideCount")),"aria-hidden":zy(!I),style:{scrollSnapAlign:(()=>{var ie;const j=(ie=k.snapAlign)!=null?ie:"start",Y=l("slidesPerMove"),R=Y==="auto"?Math.floor(l("slidesPerPage")):Y;return(k.index+R)%R===0?j:void 0})()}}))},getControlProps(){return t.element(ue(U({},$r.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(ue(U({},$r.prevTrigger.attrs),{id:J5(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":S.prevTrigger,"data-orientation":l("orientation"),"aria-controls":Ul(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ue(U({},$r.nextTrigger.attrs),{dir:l("dir"),id:K5(u),type:"button","aria-label":S.nextTrigger,"data-orientation":l("orientation"),"aria-controls":Ul(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ue(U({},$r.indicatorGroup.attrs),{dir:l("dir"),id:Z5(u),"data-orientation":l("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const I="indicator",j={ArrowDown(W){T||(a({type:"PAGE.NEXT",src:I}),W.preventDefault())},ArrowUp(W){T||(a({type:"PAGE.PREV",src:I}),W.preventDefault())},ArrowRight(W){T&&(a({type:"PAGE.NEXT",src:I}),W.preventDefault())},ArrowLeft(W){T&&(a({type:"PAGE.PREV",src:I}),W.preventDefault())},Home(W){a({type:"PAGE.SET",index:0,src:I}),W.preventDefault()},End(W){a({type:"PAGE.SET",index:y.length-1,src:I}),W.preventDefault()}},Y=a4(k,{dir:l("dir"),orientation:l("orientation")}),R=j[Y];R==null||R(k)}}))},getIndicatorProps(k){return t.button(ue(U({},$r.indicator.attrs),{dir:l("dir"),id:fb(u,k.index),type:"button","data-orientation":l("orientation"),"data-index":k.index,"data-readonly":Ws(k.readOnly),"data-current":Ws(k.index===x),"aria-label":S.indicator(k.index),onClick(I){I.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ue(U({},$r.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":Ws(d),"aria-label":d?S.autoplayStop:S.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var nD={props({props:e}){return O6(e,["slideCount"],"carousel"),ue(U({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:U({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:rD(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 h6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({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(_n(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=_n(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),pb(e)});return pb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!_n(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Dt(()=>{s(),Dt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return hb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=_n(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?u6(d,m):l6(d,m)},n.get("slidesInView"));n.set("slidesInView",c6(l))},{root:r,threshold:t("inViewThreshold")});return hb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=_n(n);return r?zt(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 zt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return _4(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 zt(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:s}){var f;const a=t.instant?"instant":"smooth",u=Hy((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=_n(n);if(!l)return;const d=r("isHorizontal")?"left":"top";s(()=>{l.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=_n(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=Fy(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=d6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=_n(r);if(!s)return;const a=W5(s,n("isHorizontal")?"x":"y",l=>l.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(l=>Math.abs(l-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=Hy(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=_n(n);if(!r)return;const s=lb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=_n(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=_n(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=_n(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=lb(r),l=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);Dt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=eD(n,e.get("page"));r&&Dt(()=>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 rD(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}to()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),to()(["index","readOnly"]),to()(["index","snapAlign"]);const iD=e=>{const t=H.useId(),{getRootNode:n}=Bl(),{dir:r}=Fh(),s=U({id:t,dir:r,getRootNode:n},e),a=vl(nD,s);return tD(a,Eh)},Yh=H.forwardRef((e,t)=>{const[n,r]=wa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=iD(n),a=Mt(s.getRootProps(),r);return _.jsx(V5,{value:s,children:_.jsx(rn.div,ue(U({},a),{ref:t}))})});Yh.displayName="CarouselRoot";const sD=180,oD=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},aD=({globalClassName:e,className:t,itemMinWidth:n=sD,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ie,de)=>({node:ie,key:H.isValidElement(ie)&&ie.key!=null?ie.key:`carousel-item-${de}`})),T=m.length,y=H.useRef(null),[x,v]=H.useState(0),{width:A}=ZA();H.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[A,T]);const S=oD(r),k=n+S,I=x>0?(x+S)/k:1,j=Math.max(1,Math.floor(I));if(T===0)return null;const Y=T>j,R=Math.ceil(T/j),W=Y?Math.max(1,I):j;return _.jsxs(Yh,{ref:y,className:F(e,t,`${C}-carousel`),slidesPerPage:W,slidesPerMove:j,spacing:r,loop:s,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[_.jsx($h,{className:F(e,`${C}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map(({node:ie,key:de},$)=>_.jsx(zh,{index:$,className:F(e,`${C}-carousel__item`),children:ie},de))}),l&&Y&&_.jsxs(Uh,{className:F(e,`${C}-carousel__control`),children:[_.jsx(qh,{className:F(e,`${C}-carousel__prev-trigger`),"aria-label":"Previous slide",children:_.jsx(nb,{size:"16px"})}),_.jsx(Vh,{className:F(e,`${C}-carousel__next-trigger`),"aria-label":"Next slide",children:_.jsx(rb,{size:"16px"})})]}),u&&Y&&_.jsx(jh,{className:F(e,`${C}-carousel__indicator-group`),children:Array.from({length:R},(ie,de)=>_.jsx(Hh,{index:de,className:F(e,`${C}-carousel__indicator`),"aria-label":`Go to slide group ${de+1}`},de))})]})},uD=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:F(e,`${C}-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"})})}),[lD,cD]=ns({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),dD=e=>wa()(e,["lazyMount","unmountOnExit"]),[fD,Ca]=ns({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),mb=H.forwardRef((e,t)=>{const n=Ca(),r=cD(),s=bh(ue(U({},r),{present:n.open})),a=Mt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:_.jsx(rn.div,ue(U({},a),{ref:Al(s.ref,t)}))});mb.displayName="DialogBackdrop";const Wh=H.forwardRef((e,t)=>{const n=Ca(),r=xa(),s=Mt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(rn.div,ue(U({},s),{ref:Al(r.ref,t)}))});Wh.displayName="DialogContent";const Gh=H.forwardRef((e,t)=>{const n=Ca(),r=Mt(n.getDescriptionProps(),e);return _.jsx(rn.div,ue(U({},r),{ref:t}))});Gh.displayName="DialogDescription";const Xh=H.forwardRef((e,t)=>{const n=Ca(),r=Mt(n.getPositionerProps(),e);return xa().unmounted?null:_.jsx(rn.div,ue(U({},r),{ref:t}))});Xh.displayName="DialogPositioner";var hD=rs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),as=hD.build(),gb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},yb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Tb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Hl=e=>e.getById(Qh(e)),pD=e=>e.getById(gb(e)),mD=e=>e.getById(Eb(e)),gD=e=>e.getById(yb(e)),ED=e=>e.getById(Kh(e)),yD=e=>e.getById(Jh(e)),TD=e=>e.getById(Tb(e));function bD(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,l=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ue(U({},as.trigger.attrs),{dir:a("dir"),id:yb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Qh(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ue(U({},as.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Eb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ue(U({},as.positioner.attrs),{dir:a("dir"),id:gb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(ue(U({},as.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Qh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:Kh(u),"aria-describedby":f.description?Jh(u):void 0}))},getTitleProps(){return t.element(ue(U({},as.title.attrs),{dir:a("dir"),id:Kh(u)}))},getDescriptionProps(){return t.element(ue(U({},as.description.attrs),{dir:a("dir"),id:Jh(u)}))},getCloseTriggerProps(){return t.button(ue(U({},as.closeTrigger.attrs),{dir:a("dir"),id:Tb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var _D={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>TD(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return U({role:"dialog",modal:s,trapFocus:s,preventScroll:s,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 VT(()=>Hl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[gD(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return XT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?WT(()=>Hl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?DT(()=>[Hl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Dt(()=>{e.set("rendered",{title:!!ED(t),description:!!yD(t)})})},syncZIndex({scope:e}){Dt(()=>{const t=Hl(e);if(!t)return;const n=Ks(t);[pD(e),mD(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.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})}}}};to()(["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 xD=e=>{const t=H.useId(),{getRootNode:n}=Bl(),{dir:r}=Fh(),s=U({id:t,getRootNode:n,dir:r},e),a=vl(_D,s);return bD(a,Eh)},bb=e=>{const[t,l]=cT(e),d=l,{children:n}=d,r=pn(d,["children"]),[s]=dD(t),a=xD(r),u=bh(Mt({present:a.open},t));return _.jsx(fD,{value:a,children:_.jsx(lD,{value:s,children:_.jsx(aT,{value:u,children:n})})})},_b=H.forwardRef((e,t)=>{const n=Ca(),r=Mt(n.getTitleProps(),e);return _.jsx(rn.h2,ue(U({},r),{ref:t}))});_b.displayName="DialogTitle";const wD=({children:e})=>{const[t,n]=H.useState(!1),r=H.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=H.useMemo(()=>({isOpen:t}),[t]);return _.jsx(rh.Provider,{value:r,children:_.jsx(Ry.Provider,{value:s,children:e})})},xb=()=>H.useContext(Ry),wb=()=>{const e=H.useContext(rh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},SD=`${C}-overflow-menu-button-trigger`,vD=({componentType:e,children:t})=>{const{isOpen:n}=xb(),{closeMenu:r}=wb(),{globalClassName:s}=at(),a=H.useRef(null);return H.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${SD}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",l),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",l)}},[n,r]),n?_.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:F(`${C}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},AD=({componentType:e,className:t})=>{const{toggleMenu:n}=wb(),{isOpen:r}=xb(),{globalClassName:s}=at();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:F(`${C}-overflow-menu-button-trigger`,`${C}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:_.jsx(ib,{})})};class ND{constructor(){Ge(this,"initialState",Lg);Ge(this,"promptsStateProxy");Ge(this,"promptsParamsProxy");Ge(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ge(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return OD(n,r),Reflect.set(t,n,r)});Ge(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Ge(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Ge(this,"updatePromptsParamsProxy",t=>new Proxy(U({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const pi=new ND,kD=e=>{window.addEventListener(tf,e)},CD=e=>{window.removeEventListener(tf,e)},OD=(e,t)=>{const n=new CustomEvent(tf,{detail:{property:e,value:t}});window.dispatchEvent(n)},Sb=e=>{const t=pi.isOpen,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isOpen=n},ID=e=>{const t=pi.isInline,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isInline=n},PD=({elementId:e,entryType:t,params:n,isInline:r})=>{pi.promptsStateProxy.elementId=e,t&&(pi.promptsStateProxy.entryType=t),typeof r=="boolean"&&ID(r),n&&pi.updatePromptsParamsProxy(n),pi.isOpen||Sb(!0)},RD=()=>{const e=H.useContext(Mg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},jl=()=>{const e=H.useContext(Dg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},LD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),{previousComponentType:r}=ri(),s=qs(),a=()=>{$u(r||"dialog"),s()};return t?_.jsx(tr,{className:F(n,`${C}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(sb,{})}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(sb,{}),"Show ",r||"dialog"]})},DD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),{isModalFullscreen:r}=ri(),s=qs(),a=()=>{nf(!r),s()},u=r?PN:RN,l="Toggle Fullscreen";return t?_.jsx(tr,{ariaLabel:l,title:l,className:F(n,`${C}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),l]})},MD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),{dialogPosition:r}=ri(),s=qs(),a=r==="bottom-left",u=()=>{rf(a?"bottom-right":"bottom-left"),s()},l=a?H5:U5,d=a?"Move right":"Move left";return t?_.jsx(tr,{className:F(n,`${C}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(l,{})}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(l,{}),d]})},vb=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:l}=at(),{mode:d}=ri(),f=u==="messaging"&&l&&!!r,p=d==="standalone",m=e==="modal",T=m?LD:kb,y=m?DD:MD,x=H.useMemo(()=>s?vN(s):{},[s]);return _.jsx(wD,{children:_.jsxs("div",{className:F(a,`${C}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:F(a,`${C}-${e}-header`,{standalone:p,embedded:!p}),style:x,children:[(s==null?void 0:s.logoUrl)&&_.jsx("img",{alt:"",role:"img",className:F(a,`${C}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),_.jsx(_b,{className:F(a,`${C}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),_.jsxs("div",{className:F(a,`${C}-${e}-controls`),children:[_.jsx(T,{componentType:e,isIcon:!0}),_.jsx(AD,{componentType:e}),_.jsx(uD,{className:F(a,`cim-${e}-component`),onClick:n})]})]}),_.jsxs(vD,{componentType:e,children:[_.jsx(y,{componentType:e}),_.jsx(jD,{componentType:e}),_.jsx(Dy,{componentType:e,onClearChat:t}),f&&_.jsx(My,{componentType:e,onDownloadTranscript:r})]})]})})},zl="USD",Vr=(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}`}},FD=({retailPrice:e,discountPrice:t,currencyCode:n=zl})=>{const r=n||zl,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:Vr(a,r),comparePrice:Vr(u,r),hasDiscount:s}},Ab=e=>typeof e=="number"&&Number.isFinite(e),BD=({priceBreakdown:e,currencyCode:t=zl})=>{if(!e)return null;const n=t||zl,r=[e.sales,e.original],s=r.map(p=>p==null?void 0:p.min).filter(Ab),a=r.map(p=>p==null?void 0:p.max).filter(Ab);if(s.length===0||a.length===0)return null;const u=Math.min(...s),l=Math.max(...a);if(u===l)return null;const d=Vr(u,n),f=Vr(l,n);return d===null||f===null?null:{range:`${d} – ${f}`,low:d,high:f}},Zh=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=FD({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return _.jsxs("div",{className:F(s,a,`${C}-price`),style:f,children:[_.jsx("span",{className:F(s,`${C}-price__amount`),children:u}),d&&l&&_.jsx("span",{className:F(s,`${C}-price__compare`),children:l})]})},UD={sparkle:Bh,plus:j5,"paper-plane":z5},Nb=({icon:e,className:t})=>{const n=UD[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},HD=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=at(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=x=>()=>{a(x)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},T=x=>_.jsxs(_.Fragment,{children:[l&&_.jsx(Nb,{icon:l,className:`${C}-suggestion-button-icon`}),_.jsx("span",{children:x})]});return _.jsx("div",{className:F(t,`${C}-suggestion-container ${f}`,e),children:n.map(x=>s?_.jsx(Yu,{disabled:r,className:F(t,`${C}-suggestion-button standalone`,m),onClick:p(x),children:T(x)},x):_.jsx("button",{disabled:r,className:F(t,`${C}-suggestion-button embedded`,m),onClick:p(x),children:T(x)},x))})},jD=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=at();if(!r)return null;const s=()=>{Br(!1),zu(!0)};return t?_.jsx(tr,{className:F(n,`${C}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:_.jsx(Jg,{})}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(Jg,{}),"Minimize"]})},kb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),r=qs(),s=()=>{$u("modal"),r()};return t?_.jsx(tr,{className:F(n,`${C}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:_.jsx(ob,{})}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(ob,{}),"Show modal"]})},zD=["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"],$D=3e3,VD=400,qD=({globalClassName:e,isWidgetStandalone:t,messages:n=zD})=>{const[r,s]=H.useState(0),[a,u]=H.useState(!0);return H.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},VD)},$D);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),_.jsxs("div",{className:F(e,`${C}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[_.jsxs("div",{className:`${C}-connecting-pulse-wrapper`,children:[_.jsx("div",{className:`${C}-connecting-pulse`}),_.jsx("div",{className:`${C}-connecting-ring`})]}),_.jsx("span",{className:F(`${C}-connecting-text`,a&&`${C}-connecting-text--visible`),children:n[r]})]})},YD=({shouldShow:e,loadingText:t})=>e?_.jsx("span",{className:`${C}-processing-text`,children:t}):null,WD=({shouldShow:e})=>e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:`${C}-processing-shimmer-bar`}),_.jsx("div",{className:`${C}-processing-shimmer-bar`}),_.jsx("div",{className:`${C}-processing-shimmer-bar`})]}):null,ep=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>_.jsxs("div",{className:F(e,`${C}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[_.jsx(YD,{shouldShow:!!n,loadingText:n}),_.jsx(WD,{shouldShow:!n})]});function Cb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function GD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function XD(e,t,n){const s=rl((n||{}).ignore||[]),a=QD(t);let u=-1;for(;++u<a.length;)hE(e,"text",l);function l(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],x=T?T.children:void 0;if(s(y,x?x.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let x=0;const A=m.children.indexOf(f);let S=!1,k=[];T.lastIndex=0;let I=T.exec(f.value);for(;I;){const j=I.index,Y={index:I.index,input:I.input,stack:[...p,f]};let R=y(...I,Y);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?T.lastIndex=j+1:(x!==j&&k.push({type:"text",value:f.value.slice(x,j)}),Array.isArray(R)?k.push(...R):R&&k.push(R),x=j+I[0].length,S=!0),!T.global)break;I=T.exec(f.value)}return S?(x<f.value.length&&k.push({type:"text",value:f.value.slice(x)}),m.children.splice(A,1,...k)):k=[f],A+k.length}}function QD(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 s=n[r];t.push([KD(s[0]),JD(s[1])])}return t}function KD(e){return typeof e=="string"?new RegExp(GD(e),"g"):e}function JD(e){return typeof e=="function"?e:function(){return e}}const tp="phrasing",np=["autolink","link","image","label"];function ZD(){return{transforms:[o8],enter:{literalAutolink:t8,literalAutolinkEmail:rp,literalAutolinkHttp:rp,literalAutolinkWww:rp},exit:{literalAutolink:s8,literalAutolinkEmail:i8,literalAutolinkHttp:n8,literalAutolinkWww:r8}}}function e8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:tp,notInConstruct:np},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:tp,notInConstruct:np},{character:":",before:"[ps]",after:"\\/",inConstruct:tp,notInConstruct:np}]}}function t8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function rp(e){this.config.enter.autolinkProtocol.call(this,e)}function n8(e){this.config.exit.autolinkProtocol.call(this,e)}function r8(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 i8(e){this.config.exit.autolinkEmail.call(this,e)}function s8(e){this.exit(e)}function o8(e){XD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,a8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),u8]],{ignore:["link","linkReference"]})}function a8(e,t,n,r,s){let a="";if(!Ob(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!l8(n)))return!1;const u=c8(n+r);if(!u[0])return!1;const l={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[l,{type:"text",value:u[1]}]:l}function u8(e,t,n,r){return!Ob(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function l8(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 c8(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 s=Cb(e,"(");let a=Cb(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Ob(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wi(n)||Qu(n))&&(!t||n!==47)}Ib.peek=T8;function d8(){this.buffer()}function f8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function h8(){this.buffer()}function p8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function m8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=nr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function g8(e){this.exit(e)}function E8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=nr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function y8(e){this.exit(e)}function T8(){return"["}function Ib(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),l=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),u(),a+=s.move("]"),a}function b8(){return{enter:{gfmFootnoteCallString:d8,gfmFootnoteCall:f8,gfmFootnoteDefinitionLabelString:h8,gfmFootnoteDefinition:p8},exit:{gfmFootnoteCallString:m8,gfmFootnoteCall:g8,gfmFootnoteDefinitionLabelString:E8,gfmFootnoteDefinition:y8}}}function _8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ib},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const l=a.createTracker(u);let d=l.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),d+=l.move((t?`
38
- `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?Pb:x8))),f(),d}}function x8(e,t,n){return t===0?e:Pb(e,t,n)}function Pb(e,t,n){return(n?"":" ")+e}const w8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Rb.peek=k8;function S8(){return{canContainEols:["delete"],enter:{strikethrough:A8},exit:{strikethrough:N8}}}function v8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:w8}],handlers:{delete:Rb}}}function A8(e){this.enter({type:"delete",children:[]},e)}function N8(e){this.exit(e)}function Rb(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,ue(U({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function k8(){return"~"}function C8(e){return e.length}function O8(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||C8,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const v=[],A=[];let S=-1;for(e[p].length>f&&(f=e[p].length);++S<e[p].length;){const k=I8(e[p][S]);if(n.alignDelimiters!==!1){const I=s(k);A[S]=I,(d[S]===void 0||I>d[S])&&(d[S]=I)}v.push(k)}u[p]=v,l[p]=A}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=Lb(r[m]);else{const v=Lb(r);for(;++m<f;)a[m]=v}m=-1;const T=[],y=[];for(;++m<f;){const v=a[m];let A="",S="";v===99?(A=":",S=":"):v===108?A=":":v===114&&(S=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[m]-A.length-S.length);const I=A+"-".repeat(k)+S;n.alignDelimiters!==!1&&(k=A.length+k+S.length,k>d[m]&&(d[m]=k),y[m]=k),T[m]=I}u.splice(1,0,T),l.splice(1,0,y),p=-1;const x=[];for(;++p<u.length;){const v=u[p],A=l[p];m=-1;const S=[];for(;++m<f;){const k=v[m]||"";let I="",j="";if(n.alignDelimiters!==!1){const Y=d[m]-(A[m]||0),R=a[m];R===114?I=" ".repeat(Y):R===99?Y%2?(I=" ".repeat(Y/2+.5),j=" ".repeat(Y/2-.5)):(I=" ".repeat(Y/2),j=I):j=" ".repeat(Y)}n.delimiterStart!==!1&&!m&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&S.push(" "),n.alignDelimiters!==!1&&S.push(I),S.push(k),n.alignDelimiters!==!1&&S.push(j),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&S.push("|")}x.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return x.join(`
39
- `)}function I8(e){return e==null?"":String(e)}function Lb(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 P8(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),R8);return s(),u}function R8(e,t,n){return">"+(n?"":" ")+e}function L8(e,t){return Db(e,t.inConstruct,!0)&&!Db(e,t.notInConstruct,!1)}function Db(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 Mb(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
40
- `&&L8(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
- `}function D8(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>u&&(u=a):a=1,s=r+t.length,r=n.indexOf(t,s);return u}function M8(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 F8(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 B8(e,t,n,r){const s=F8(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(M8(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,U8);return m(),T}const l=n.createTracker(r),d=s.repeat(Math.max(D8(a,s)+1,3)),f=n.enter("codeFenced");let p=l.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=l.move(n.safe(e.lang,U({before:p,after:" ",encode:["`"]},l.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=l.move(" "),p+=l.move(n.safe(e.meta,U({before:p,after:`
42
- `,encode:["`"]},l.current()))),m()}return p+=l.move(`
43
- `),a&&(p+=l.move(a+`
44
- `)),p+=l.move(d),f(),p}function U8(e,t,n){return(n?"":" ")+e}function ip(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 H8(e,t,n,r){const s=ip(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),U({before:f,after:"]"},d.current()))),f+=d.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,U({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,U({before:f,after:e.title?" ":`
45
- `},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,U({before:f,after:s},d.current()))),f+=d.move(s),l()),u(),f}function j8(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 Oa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function $l(e,t,n){const r=Us(e),s=Us(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Fb.peek=z8;function Fb(e,t,n,r){const s=j8(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(s);let d=u.move(n.containerPhrasing(e,U({after:s,before:l},u.current())));const f=d.charCodeAt(0),p=$l(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Oa(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=$l(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+Oa(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function z8(e,t,n){return n.options.emphasis||"*"}function $8(e,t){let n=!1;return sl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Of}),!!((!e.depth||e.depth<3)&&Tf(e)&&(t.options.setext||n))}function V8(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if($8(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,ue(U({},a.current()),{before:`
35
+ `}),n}function gE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function EE(e,t){const n=cO(e,t),r=n.one(e,void 0),s=eO(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
36
+ `},s),a}function mO(e,t){return e&&"run"in e?function(n,r){return Ue(this,null,function*(){const s=EE(n,H({file:r},t));yield e.run(s,r)})}:function(n,r){return EE(n,H({file:r},e||t))}}function yE(e){if(e)throw e}var Lf,TE;function gO(){if(TE)return Lf;TE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var b;for(b in f);return typeof b=="undefined"||e.call(f,b)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Lf=function d(){var f,p,m,b,y,x,A=arguments[0],v=1,w=arguments.length,k=!1;for(typeof A=="boolean"&&(k=A,A=arguments[1]||{},v=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});v<w;++v)if(f=arguments[v],f!=null)for(p in f)m=c(A,p),b=c(f,p),A!==b&&(k&&b&&(a(b)||(y=s(b)))?(y?(y=!1,x=m&&s(m)?m:[]):x=m&&a(m)?m:{},u(A,{name:p,newValue:d(k,x,b)})):typeof b!="undefined"&&u(A,{name:p,newValue:b}));return A},Lf}var EO=gO();const Df=Ze(EO);function Mf(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 yO(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...s);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?TO(p,c)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function TO(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return s(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...c){n||(n=!0,t(u,...c))}function a(u){s(null,u)}}const xr={basename:bO,dirname:xO,extname:_O,join:wO,sep:"/"};function bO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');fa(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function xO(e){if(fa(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 _O(e){fa(e);let t=e.length,n=-1,r=0,s=-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?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function wO(...e){let t=-1,n;for(;++t<e.length;)fa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":SO(n)}function SO(e){fa(e);const t=e.codePointAt(0)===47;let n=vO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function vO(e,t){let n="",r=0,s=-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(!(s===u-1||a===1))if(s!==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("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function fa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const AO={cwd:NO};function NO(){return"/"}function Ff(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function kO(e){if(typeof e=="string")e=new URL(e);else if(!Ff(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 CO(e)}function CO(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 s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Bf=["history","path","basename","stem","extname","dirname"];class bE{constructor(t){let n;t?Ff(t)?n={path:t}:typeof t=="string"||OO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":AO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Bf.length;){const a=Bf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)Bf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?xr.basename(this.path):void 0}set basename(t){Hf(t,"basename"),Uf(t,"basename"),this.path=xr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?xr.dirname(this.path):void 0}set dirname(t){xE(this.basename,"dirname"),this.path=xr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?xr.extname(this.path):void 0}set extname(t){if(Uf(t,"extname"),xE(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=xr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ff(t)&&(t=kO(t)),Hf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?xr.basename(this.path,this.extname):void 0}set stem(t){Hf(t,"stem"),Uf(t,"stem"),this.path=xr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new rn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Uf(e,t){if(e&&e.includes(xr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+xr.sep+"`")}function Hf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function xE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function OO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const IO=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),PO={}.hasOwnProperty;class jf extends IO{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=yO()}copy(){const t=new jf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Df(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Vf("data",this.frozen),this.namespace[t]=n,this):PO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Vf("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 s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=dl(t),r=this.parser||this.Parser;return zf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),zf("process",this.parser||this.Parser),$f("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const c=dl(t),d=r.parse(c);r.run(d,c,function(p,m,b){if(p||!m||!b)return f(p);const y=m,x=r.stringify(y,b);DO(x)?b.value=x:b.result=x,f(p,b)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),zf("processSync",this.parser||this.Parser),$f("processSync",this.compiler||this.Compiler),this.process(t,s),wE("processSync","process",n),r;function s(a,u){n=!0,yE(a),r=u}}run(t,n,r){_E(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=dl(n);s.run(t,d,f);function f(p,m,b){const y=m||t;p?c(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),wE("runSync","run",r),s;function a(u,c){yE(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=dl(n),s=this.compiler||this.Compiler;return $f("stringify",s),_E(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(Vf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(s.settings=Df(!0,s.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[y,...x]=p;const A=r[b][1];Mf(A)&&Mf(y)&&(y=Df(!0,A,y)),r[b]=[f,y,...x]}}}}const RO=new jf().freeze();function zf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function $f(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Vf(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 _E(e){if(!Mf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function wE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function dl(e){return LO(e)?e:new bE(e)}function LO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function DO(e){return typeof e=="string"||MO(e)}function MO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const FO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",SE=[],vE={allowDangerousHtml:!0},BO=/^(https?|ircs?|mailto|xmpp)$/i,UO=[{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 AE(e){const t=HO(e),n=jO(e);return zO(t.runSync(t.parse(n),n),e)}function HO(e){const t=e.rehypePlugins||SE,n=e.remarkPlugins||SE,r=e.remarkRehypeOptions?H(H({},e.remarkRehypeOptions),vE):vE;return RO().use(x3).use(n).use(mO,r).use(t)}function jO(e){const t=e.children||"",n=new bE;return typeof t=="string"&&(n.value=t),n}function zO(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||$O;for(const p of UO)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+FO+p.id,void 0);return cl(e,f),hk(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,b){if(p.type==="raw"&&b&&typeof m=="number")return u?b.children.splice(m,1):b.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in bf)if(Object.hasOwn(bf,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],A=bf[y];(A===null||A.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 m=="number"&&(y=!r(p,m,b)),y&&b&&typeof m=="number")return c&&p.children?b.children.splice(m,1,...p.children):b.children.splice(m,1),m}}}function $O(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||BO.test(e.slice(0,t))?e:""}const NE=/[#.]/g;function VO(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){NE.lastIndex=s;const c=NE.exec(n),d=n.slice(s,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),c&&(a=c[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function kE(e,t,n){const r=n?GO(n):void 0;function s(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=VO(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,qO(u))c.unshift(u);else for(const[m,b]of Object.entries(u))YO(e,d.properties,m,b)}for(const f of c)qf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function qO(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 s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function YO(e,t,n,r){const s=Ju(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"?s.spaceSeparated?a=E1(r):s.commaSeparated?a=i1(r):s.commaOrSpaceSeparated?a=E1(i1(r).join(" ")):a=CE(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?WO(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(CE(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function qf(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)qf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?qf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function CE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ta(n)===ta(t)))return!0}return n}function WO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function GO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const XO=["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"],QO=kE(na,"div"),KO=kE(ii,"g",XO);function JO(e){const t=String(e),n=[];return{toOffset:s,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=OE(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 s(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=OE(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function OE(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 Ki={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/"},IE={}.hasOwnProperty,ZO=Object.prototype;function eI(e,t){const n=t||{};return Yf({file:n.file||void 0,location:!1,schema:n.space==="svg"?ii:na,verbose:n.verbose||!1},e)}function Yf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},fl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:PE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=JO(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"},fl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},fl(e,r,n),n}default:return n=tI(e,t),n}}function PE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=Yf(e,t[n]);r.push(s)}return r}function tI(e,t){const n=e.schema;e.schema=t.namespaceURI===Ki.svg?ii:na;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;IE.call(ZO,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?KO:QO)(t.tagName,s,PE(e,t.childNodes));if(fl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&js(d.startTag),p=d&&d.endTag&&js(d.endTag),m=Yf(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function fl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=nI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function nI(e,t,n){const r=js(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)IE.call(n.attrs,u)&&(a[Ju(e.schema,u).property]=js(n.attrs[u]));n.startTag;const c=js(n.startTag),d=n.endTag?js(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function js(e){const t=RE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=RE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function RE(e){return e.line&&e.column?e:void 0}const LE={}.hasOwnProperty;function DE(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&LE.call(s,e)){const d=String(s[e]);u=LE.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const rI={},iI={}.hasOwnProperty,ME=DE("type",{handlers:{root:oI,element:dI,text:lI,comment:cI,doctype:uI}});function sI(e,t){const r=(t||rI).space;return ME(e,r==="svg"?ii:na)}function oI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Wf(e.children,n,t),zs(e,n),n}function aI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Wf(e.children,n,t),zs(e,n),n}function uI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return zs(e,t),t}function lI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return zs(e,t),t}function cI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return zs(e,t),t}function dI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ii);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&iI.call(e.properties,a)){const d=fI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Ki[u],childNodes:[],parentNode:null};return c.childNodes=Wf(e.children,c,r),zs(e,c),e.tagName==="template"&&e.content&&(c.content=aI(e.content,r)),c}function fI(e,t,n){const r=Ju(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?s1(n):y1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=Ki[r.space]}return s}function Wf(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=ME(e[r],n);a.parentNode=t,s.push(a)}return s}function zs(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 hI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],pI=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]),bt="�";var I;(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"})(I||(I={}));const wn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function FE(e){return e>=55296&&e<=57343}function mI(e){return e>=56320&&e<=57343}function gI(e,t){return(e-55296)*1024+9216+t}function BE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function UE(e){return e>=64976&&e<=65007||pI.has(e)}var re;(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"})(re||(re={}));const EI=65536;class yI{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=EI,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:s,offset:a}=this,u=s+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(mI(n))return this.pos++,this._addGap(),gI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(re.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,I.EOF;const r=this.html.charCodeAt(n);return r===I.CARRIAGE_RETURN?I.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,I.EOF;let t=this.html.charCodeAt(this.pos);return t===I.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,I.LINE_FEED):t===I.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,FE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===I.LINE_FEED||t===I.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){BE(t)?this._err(re.controlCharacterInInputStream):UE(t)&&this._err(re.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ke;(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"})(Ke||(Ke={}));function HE(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 TI=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))),bI=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 xI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=bI.get(e))!==null&&t!==void 0?t:e}var jt;(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"})(jt||(jt={}));const _I=32;var ai;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ai||(ai={}));function Gf(e){return e>=jt.ZERO&&e<=jt.NINE}function wI(e){return e>=jt.UPPER_A&&e<=jt.UPPER_F||e>=jt.LOWER_A&&e<=jt.LOWER_F}function SI(e){return e>=jt.UPPER_A&&e<=jt.UPPER_Z||e>=jt.LOWER_A&&e<=jt.LOWER_Z||Gf(e)}function vI(e){return e===jt.EQUALS||SI(e)}var zt;(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"})(zt||(zt={}));var Ur;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ur||(Ur={}));class AI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=zt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ur.Strict}startEntity(t){this.decodeMode=t,this.state=zt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case zt.EntityStart:return t.charCodeAt(n)===jt.NUM?(this.state=zt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=zt.NamedEntity,this.stateNamedEntity(t,n));case zt.NumericStart:return this.stateNumericStart(t,n);case zt.NumericDecimal:return this.stateNumericDecimal(t,n);case zt.NumericHex:return this.stateNumericHex(t,n);case zt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|_I)===jt.LOWER_X?(this.state=zt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=zt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Gf(s)||wI(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Gf(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,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===jt.SEMI)this.consumed+=1;else if(this.decodeMode===Ur.Strict)return 0;return this.emitCodePoint(xI(this.result),this.consumed),this.errors&&(t!==jt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&ai.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=NI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ur.Attribute&&(a===0||vI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&ai.VALUE_LENGTH)>>14,a!==0){if(u===jt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ur.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&ai.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~ai.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case zt.NamedEntity:return this.result!==0&&(this.decodeMode!==Ur.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case zt.NumericDecimal:return this.emitNumericEntity(0,2);case zt.NumericHex:return this.emitNumericEntity(0,3);case zt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case zt.EntityStart:return 0}}}function NI(e,t,n,r){const s=(t&ai.BRANCH_LENGTH)>>7,a=t&ai.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,c=u+s-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+s]}return-1}var me;(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/"})(me||(me={}));var Ji;(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"})(Ji||(Ji={}));var qn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(qn||(qn={}));var Q;(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"})(Q||(Q={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const kI=new Map([[Q.A,g.A],[Q.ADDRESS,g.ADDRESS],[Q.ANNOTATION_XML,g.ANNOTATION_XML],[Q.APPLET,g.APPLET],[Q.AREA,g.AREA],[Q.ARTICLE,g.ARTICLE],[Q.ASIDE,g.ASIDE],[Q.B,g.B],[Q.BASE,g.BASE],[Q.BASEFONT,g.BASEFONT],[Q.BGSOUND,g.BGSOUND],[Q.BIG,g.BIG],[Q.BLOCKQUOTE,g.BLOCKQUOTE],[Q.BODY,g.BODY],[Q.BR,g.BR],[Q.BUTTON,g.BUTTON],[Q.CAPTION,g.CAPTION],[Q.CENTER,g.CENTER],[Q.CODE,g.CODE],[Q.COL,g.COL],[Q.COLGROUP,g.COLGROUP],[Q.DD,g.DD],[Q.DESC,g.DESC],[Q.DETAILS,g.DETAILS],[Q.DIALOG,g.DIALOG],[Q.DIR,g.DIR],[Q.DIV,g.DIV],[Q.DL,g.DL],[Q.DT,g.DT],[Q.EM,g.EM],[Q.EMBED,g.EMBED],[Q.FIELDSET,g.FIELDSET],[Q.FIGCAPTION,g.FIGCAPTION],[Q.FIGURE,g.FIGURE],[Q.FONT,g.FONT],[Q.FOOTER,g.FOOTER],[Q.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[Q.FORM,g.FORM],[Q.FRAME,g.FRAME],[Q.FRAMESET,g.FRAMESET],[Q.H1,g.H1],[Q.H2,g.H2],[Q.H3,g.H3],[Q.H4,g.H4],[Q.H5,g.H5],[Q.H6,g.H6],[Q.HEAD,g.HEAD],[Q.HEADER,g.HEADER],[Q.HGROUP,g.HGROUP],[Q.HR,g.HR],[Q.HTML,g.HTML],[Q.I,g.I],[Q.IMG,g.IMG],[Q.IMAGE,g.IMAGE],[Q.INPUT,g.INPUT],[Q.IFRAME,g.IFRAME],[Q.KEYGEN,g.KEYGEN],[Q.LABEL,g.LABEL],[Q.LI,g.LI],[Q.LINK,g.LINK],[Q.LISTING,g.LISTING],[Q.MAIN,g.MAIN],[Q.MALIGNMARK,g.MALIGNMARK],[Q.MARQUEE,g.MARQUEE],[Q.MATH,g.MATH],[Q.MENU,g.MENU],[Q.META,g.META],[Q.MGLYPH,g.MGLYPH],[Q.MI,g.MI],[Q.MO,g.MO],[Q.MN,g.MN],[Q.MS,g.MS],[Q.MTEXT,g.MTEXT],[Q.NAV,g.NAV],[Q.NOBR,g.NOBR],[Q.NOFRAMES,g.NOFRAMES],[Q.NOEMBED,g.NOEMBED],[Q.NOSCRIPT,g.NOSCRIPT],[Q.OBJECT,g.OBJECT],[Q.OL,g.OL],[Q.OPTGROUP,g.OPTGROUP],[Q.OPTION,g.OPTION],[Q.P,g.P],[Q.PARAM,g.PARAM],[Q.PLAINTEXT,g.PLAINTEXT],[Q.PRE,g.PRE],[Q.RB,g.RB],[Q.RP,g.RP],[Q.RT,g.RT],[Q.RTC,g.RTC],[Q.RUBY,g.RUBY],[Q.S,g.S],[Q.SCRIPT,g.SCRIPT],[Q.SEARCH,g.SEARCH],[Q.SECTION,g.SECTION],[Q.SELECT,g.SELECT],[Q.SOURCE,g.SOURCE],[Q.SMALL,g.SMALL],[Q.SPAN,g.SPAN],[Q.STRIKE,g.STRIKE],[Q.STRONG,g.STRONG],[Q.STYLE,g.STYLE],[Q.SUB,g.SUB],[Q.SUMMARY,g.SUMMARY],[Q.SUP,g.SUP],[Q.TABLE,g.TABLE],[Q.TBODY,g.TBODY],[Q.TEMPLATE,g.TEMPLATE],[Q.TEXTAREA,g.TEXTAREA],[Q.TFOOT,g.TFOOT],[Q.TD,g.TD],[Q.TH,g.TH],[Q.THEAD,g.THEAD],[Q.TITLE,g.TITLE],[Q.TR,g.TR],[Q.TRACK,g.TRACK],[Q.TT,g.TT],[Q.U,g.U],[Q.UL,g.UL],[Q.SVG,g.SVG],[Q.VAR,g.VAR],[Q.WBR,g.WBR],[Q.XMP,g.XMP]]);function $s(e){var t;return(t=kI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const Te=g,CI={[me.HTML]:new Set([Te.ADDRESS,Te.APPLET,Te.AREA,Te.ARTICLE,Te.ASIDE,Te.BASE,Te.BASEFONT,Te.BGSOUND,Te.BLOCKQUOTE,Te.BODY,Te.BR,Te.BUTTON,Te.CAPTION,Te.CENTER,Te.COL,Te.COLGROUP,Te.DD,Te.DETAILS,Te.DIR,Te.DIV,Te.DL,Te.DT,Te.EMBED,Te.FIELDSET,Te.FIGCAPTION,Te.FIGURE,Te.FOOTER,Te.FORM,Te.FRAME,Te.FRAMESET,Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6,Te.HEAD,Te.HEADER,Te.HGROUP,Te.HR,Te.HTML,Te.IFRAME,Te.IMG,Te.INPUT,Te.LI,Te.LINK,Te.LISTING,Te.MAIN,Te.MARQUEE,Te.MENU,Te.META,Te.NAV,Te.NOEMBED,Te.NOFRAMES,Te.NOSCRIPT,Te.OBJECT,Te.OL,Te.P,Te.PARAM,Te.PLAINTEXT,Te.PRE,Te.SCRIPT,Te.SECTION,Te.SELECT,Te.SOURCE,Te.STYLE,Te.SUMMARY,Te.TABLE,Te.TBODY,Te.TD,Te.TEMPLATE,Te.TEXTAREA,Te.TFOOT,Te.TH,Te.THEAD,Te.TITLE,Te.TR,Te.TRACK,Te.UL,Te.WBR,Te.XMP]),[me.MATHML]:new Set([Te.MI,Te.MO,Te.MN,Te.MS,Te.MTEXT,Te.ANNOTATION_XML]),[me.SVG]:new Set([Te.TITLE,Te.FOREIGN_OBJECT,Te.DESC]),[me.XLINK]:new Set,[me.XML]:new Set,[me.XMLNS]:new Set},Xf=new Set([Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6]);Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;var R;(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"})(R||(R={}));const kt={DATA:R.DATA,RCDATA:R.RCDATA,RAWTEXT:R.RAWTEXT,SCRIPT_DATA:R.SCRIPT_DATA,PLAINTEXT:R.PLAINTEXT,CDATA_SECTION:R.CDATA_SECTION};function OI(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function ha(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function II(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function ui(e){return II(e)||ha(e)}function jE(e){return ui(e)||OI(e)}function hl(e){return e+32}function zE(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function $E(e){return zE(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function PI(e){return e===I.NULL?re.nullCharacterReference:e>1114111?re.characterReferenceOutsideUnicodeRange:FE(e)?re.surrogateCharacterReference:UE(e)?re.noncharacterCharacterReference:BE(e)||e===I.CARRIAGE_RETURN?re.controlCharacterReference:null}class RI{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=R.DATA,this.returnState=R.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new yI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new AI(TI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(re.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(re.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=PI(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.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:Ke.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ke.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(HE(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(re.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=$s(t.tagName),t.type===Ke.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(re.endTagWithAttributes),t.selfClosing&&this._err(re.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 Ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ke.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:Ke.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=zE(t)?Ke.WHITESPACE_CHARACTER:t===I.NULL?Ke.NULL_CHARACTER:Ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=R.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ur.Attribute:Ur.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===R.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case R.DATA:{this._stateData(t);break}case R.RCDATA:{this._stateRcdata(t);break}case R.RAWTEXT:{this._stateRawtext(t);break}case R.SCRIPT_DATA:{this._stateScriptData(t);break}case R.PLAINTEXT:{this._statePlaintext(t);break}case R.TAG_OPEN:{this._stateTagOpen(t);break}case R.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case R.TAG_NAME:{this._stateTagName(t);break}case R.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case R.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case R.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case R.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case R.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case R.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case R.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case R.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case R.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case R.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case R.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case R.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case R.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case R.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case R.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case R.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case R.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case R.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case R.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case R.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case R.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case R.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case R.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case R.BOGUS_COMMENT:{this._stateBogusComment(t);break}case R.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case R.COMMENT_START:{this._stateCommentStart(t);break}case R.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case R.COMMENT:{this._stateComment(t);break}case R.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case R.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case R.COMMENT_END:{this._stateCommentEnd(t);break}case R.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case R.DOCTYPE:{this._stateDoctype(t);break}case R.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case R.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case R.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case R.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case R.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case R.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case R.CDATA_SECTION:{this._stateCdataSection(t);break}case R.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case R.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case R.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case R.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=R.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitCodePoint(t);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case I.AMPERSAND:{this._startCharacterReference();break}case I.LESS_THAN_SIGN:{this.state=R.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(bt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=R.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(bt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(bt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(bt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ui(t))this._createStartTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=R.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=R.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(re.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(re.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=R.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ui(t))this._createEndTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(re.missingEndTagName),this.state=R.DATA;break}case I.EOF:{this._err(re.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=R.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.tagName+=bt;break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ha(t)?hl(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=R.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ui(t)?(this.state=R.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=R.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=R.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=R.SELF_CLOSING_START_TAG,!1;case I.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=R.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===I.SOLIDUS?this.state=R.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ui(t)?(this.state=R.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case I.SOLIDUS:{this.state=R.SCRIPT_DATA_END_TAG_OPEN;break}case I.EXCLAMATION_MARK:{this.state=R.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=R.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ui(t)?(this.state=R.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===I.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(bt);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(bt);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(bt);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ui(t)?(this._emitChars("<"),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ui(t)?(this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&$E(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(bt);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(bt);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(bt);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.SOLIDUS?(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&$E(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(re.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=R.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this._leaveAttrName(),this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(re.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.name+=bt;break}default:this.currentAttr.name+=String.fromCodePoint(ha(t)?hl(t):t)}}_stateAfterAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{this.state=R.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=R.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingAttributeValue),this.state=R.DATA,this.emitCurrentTagToken();break}default:this.state=R.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=bt;break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=bt;break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=bt;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(re.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=R.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBetweenAttributes),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=R.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.unexpectedSolidusInTag),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case I.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.data+=bt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(wn.DASH_DASH,!0)?(this._createCommentToken(wn.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(wn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(wn.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(wn.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(re.cdataInHtmlContent),this._createCommentToken(wn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=R.BOGUS_COMMENT):this._ensureHibernation()||(this._err(re.incorrectlyOpenedComment),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=R.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptClosingOfEmptyComment),this.state=R.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptClosingOfEmptyComment),this.state=R.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=R.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{n.data+="<",this.state=R.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.data+=bt;break}case I.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case I.EXCLAMATION_MARK:{n.data+="!",this.state=R.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=R.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=R.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(re.nestedComment),this.state=R.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case I.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case I.EXCLAMATION_MARK:{this.state=R.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{n.data+="-";break}case I.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{n.data+="--!",this.state=R.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(re.incorrectlyClosedComment),this.state=R.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=R.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(re.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBeforeDoctypeName),this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ha(t))this._createDoctypeToken(String.fromCharCode(hl(t))),this.state=R.DOCTYPE_NAME;else switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.NULL:{this._err(re.unexpectedNullCharacter),this._createDoctypeToken(bt),this.state=R.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.EOF:{this._err(re.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=R.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=R.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.name+=bt;break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ha(t)?hl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(wn.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(wn.SYSTEM,!1)?this.state=R.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(re.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=bt;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.EOF:{this._err(re.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 I.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=bt;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.EOF:{this._err(re.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.QUOTATION_MARK:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=bt;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.EOF:{this._err(re.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 I.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=bt;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.EOF:{this._err(re.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.NULL:{this._err(re.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=R.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(re.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=R.CDATA_SECTION_END:(this._emitChars("]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=R.DATA;break}case I.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=R.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(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&jE(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){jE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(re.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const VE=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),qE=new Set([...VE,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),pl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),LI=new Set([...pl,g.OL,g.UL]),DI=new Set([...pl,g.BUTTON]),YE=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),WE=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),MI=new Set([g.TR,g.TEMPLATE,g.HTML]),FI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),BI=new Set([g.TABLE,g.TEMPLATE,g.HTML]),UI=new Set([g.TD,g.TH]);class HI{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===me.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 s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===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])!==me.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(Xf,me.HTML)}popUntilTableCellPopped(){this.popUntilPopped(UI,me.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(BI,me.HTML)}clearBackToTableBodyContext(){this.clearBackTo(FI,me.HTML)}clearBackToTableRowContext(){this.clearBackTo(MI,me.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case me.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case me.SVG:{if(WE.has(s))return!1;break}case me.MATHML:{if(YE.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,pl)}hasInListItemScope(t){return this.hasInDynamicScope(t,LI)}hasInButtonScope(t){return this.hasInDynamicScope(t,DI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case me.HTML:{if(Xf.has(n))return!0;if(pl.has(n))return!1;break}case me.SVG:{if(WE.has(n))return!1;break}case me.MATHML:{if(YE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===me.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===me.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===me.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&VE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&qE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&qE.has(this.currentTagId);)this.pop()}}const Qf=3;var _r;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(_r||(_r={}));const GE={type:_r.Marker};class jI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=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===_r.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Qf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Qf)return;const s=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=>s.get(d.name)===d.value)&&(a+=1,a>=Qf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(GE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:_r.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:_r.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(GE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===_r.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===_r.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===_r.Element&&n.element===t)}}const li={createDocument(){return{nodeName:"#document",mode:qn.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 s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};li.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(li.isTextNode(n)){n.value+=t;return}}li.appendChild(e,li.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&li.isTextNode(r)?r.value+=t:li.insertBefore(e,li.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=H(H({},e.sourceCodeLocation),t)}},XE="html",zI="about:legacy-compat",$I="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",QE=["+//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//"],VI=[...QE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],qI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),KE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],YI=[...KE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function JE(e,t){return t.some(n=>e.startsWith(n))}function WI(e){return e.name===XE&&e.publicId===null&&(e.systemId===null||e.systemId===zI)}function GI(e){if(e.name!==XE)return qn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===$I)return qn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),qI.has(n))return qn.QUIRKS;let r=t===null?VI:QE;if(JE(n,r))return qn.QUIRKS;if(r=t===null?KE:YI,JE(n,r))return qn.LIMITED_QUIRKS}return qn.NO_QUIRKS}const ZE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},XI="definitionurl",QI="definitionURL",KI=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])),JI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:me.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:me.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:me.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:me.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:me.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:me.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:me.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:me.XML}],["xml:space",{prefix:"xml",name:"space",namespace:me.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:me.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:me.XMLNS}]]),ZI=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])),eP=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function tP(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===Ji.COLOR||r===Ji.SIZE||r===Ji.FACE)||eP.has(t)}function ey(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===XI){e.attrs[t].name=QI;break}}function ty(e){for(let t=0;t<e.attrs.length;t++){const n=KI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Kf(e){for(let t=0;t<e.attrs.length;t++){const n=JI.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 nP(e){const t=ZI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=$s(e.tagName))}function rP(e,t){return t===me.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function iP(e,t,n){if(t===me.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ji.ENCODING){const s=n[r].value.toLowerCase();return s===ZE.TEXT_HTML||s===ZE.APPLICATION_XML}}return t===me.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function sP(e,t,n,r){return(!r||r===me.HTML)&&iP(e,t,n)||(!r||r===me.MATHML)&&rP(e,t)}const oP="hidden",aP=8,uP=3;var U;(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"})(U||(U={}));const lP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ny=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),ry={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:li,onParseError:null};class iy{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=U.INITIAL,this.originalInsertionMode=U.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=H(H({},ry),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 RI(this.options,this),this.activeFormattingElements=new jI(this.treeAdapter),this.fragmentContextID=r?$s(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new HI(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=H(H({},ry),n);t!=null||(t=r.treeAdapter.createElement(Q.TEMPLATE,me.HTML,[]));const s=r.treeAdapter.createElement("documentmock",me.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(U.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 s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:lP,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 s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.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)===me.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,me.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=U.TEXT}switchToPlaintextParsing(){this.insertionMode=U.TEXT,this.originalInsertionMode=U.IN_BODY,this.tokenizer.state=kt.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)===Q.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==me.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=kt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=kt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=kt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=kt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),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&&ce(H({},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,me.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,me.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(Q.HTML,me.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),a=n.type===Ke.END_TAG&&s===n.tagName?{endTag:H({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===Q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===me.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,me.HTML)}_processToken(t){switch(t.type){case Ke.CHARACTER:{this.onCharacter(t);break}case Ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ke.COMMENT:{this.onComment(t);break}case Ke.DOCTYPE:{this.onDoctype(t);break}case Ke.START_TAG:{this._processStartTag(t);break}case Ke.END_TAG:{this.onEndTag(t);break}case Ke.EOF:{this.onEof(t);break}case Ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return sP(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===_r.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];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=U.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=U.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=U.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=U.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=U.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=U.IN_TABLE;return}case g.BODY:{this.insertionMode=U.IN_BODY;return}case g.FRAMESET:{this.insertionMode=U.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?U.AFTER_HEAD:U.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=U.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=U.IN_HEAD;return}break}}this.insertionMode=U.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=U.IN_SELECT_IN_TABLE;return}}this.insertionMode=U.IN_SELECT}_isElementCausesFosterParenting(t){return ny.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===me.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return CI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){UR(this,t);return}switch(this.insertionMode){case U.INITIAL:{pa(this,t);break}case U.BEFORE_HTML:{ma(this,t);break}case U.BEFORE_HEAD:{ga(this,t);break}case U.IN_HEAD:{Ea(this,t);break}case U.IN_HEAD_NO_SCRIPT:{ya(this,t);break}case U.AFTER_HEAD:{Ta(this,t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:{oy(this,t);break}case U.TEXT:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{th(this,t);break}case U.IN_TABLE_TEXT:{py(this,t);break}case U.IN_COLUMN_GROUP:{El(this,t);break}case U.AFTER_BODY:{bl(this,t);break}case U.AFTER_AFTER_BODY:{xl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){BR(this,t);return}switch(this.insertionMode){case U.INITIAL:{pa(this,t);break}case U.BEFORE_HTML:{ma(this,t);break}case U.BEFORE_HEAD:{ga(this,t);break}case U.IN_HEAD:{Ea(this,t);break}case U.IN_HEAD_NO_SCRIPT:{ya(this,t);break}case U.AFTER_HEAD:{Ta(this,t);break}case U.TEXT:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{th(this,t);break}case U.IN_COLUMN_GROUP:{El(this,t);break}case U.AFTER_BODY:{bl(this,t);break}case U.AFTER_AFTER_BODY:{xl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Zf(this,t);return}switch(this.insertionMode){case U.INITIAL:case U.BEFORE_HTML:case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_TEMPLATE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{Zf(this,t);break}case U.IN_TABLE_TEXT:{_a(this,t);break}case U.AFTER_BODY:{gP(this,t);break}case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{EP(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case U.INITIAL:{yP(this,t);break}case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:{this._err(t,re.misplacedDoctype);break}case U.IN_TABLE_TEXT:{_a(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,re.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?HR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{pa(this,t);break}case U.BEFORE_HTML:{TP(this,t);break}case U.BEFORE_HEAD:{xP(this,t);break}case U.IN_HEAD:{or(this,t);break}case U.IN_HEAD_NO_SCRIPT:{SP(this,t);break}case U.AFTER_HEAD:{AP(this,t);break}case U.IN_BODY:{on(this,t);break}case U.IN_TABLE:{Vs(this,t);break}case U.IN_TABLE_TEXT:{_a(this,t);break}case U.IN_CAPTION:{_R(this,t);break}case U.IN_COLUMN_GROUP:{nh(this,t);break}case U.IN_TABLE_BODY:{yl(this,t);break}case U.IN_ROW:{Tl(this,t);break}case U.IN_CELL:{vR(this,t);break}case U.IN_SELECT:{Ey(this,t);break}case U.IN_SELECT_IN_TABLE:{NR(this,t);break}case U.IN_TEMPLATE:{CR(this,t);break}case U.AFTER_BODY:{IR(this,t);break}case U.IN_FRAMESET:{PR(this,t);break}case U.AFTER_FRAMESET:{LR(this,t);break}case U.AFTER_AFTER_BODY:{MR(this,t);break}case U.AFTER_AFTER_FRAMESET:{FR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?jR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{pa(this,t);break}case U.BEFORE_HTML:{bP(this,t);break}case U.BEFORE_HEAD:{_P(this,t);break}case U.IN_HEAD:{wP(this,t);break}case U.IN_HEAD_NO_SCRIPT:{vP(this,t);break}case U.AFTER_HEAD:{NP(this,t);break}case U.IN_BODY:{gl(this,t);break}case U.TEXT:{fR(this,t);break}case U.IN_TABLE:{ba(this,t);break}case U.IN_TABLE_TEXT:{_a(this,t);break}case U.IN_CAPTION:{wR(this,t);break}case U.IN_COLUMN_GROUP:{SR(this,t);break}case U.IN_TABLE_BODY:{rh(this,t);break}case U.IN_ROW:{gy(this,t);break}case U.IN_CELL:{AR(this,t);break}case U.IN_SELECT:{yy(this,t);break}case U.IN_SELECT_IN_TABLE:{kR(this,t);break}case U.IN_TEMPLATE:{OR(this,t);break}case U.AFTER_BODY:{by(this,t);break}case U.IN_FRAMESET:{RR(this,t);break}case U.AFTER_FRAMESET:{DR(this,t);break}case U.AFTER_AFTER_BODY:{xl(this,t);break}}}onEof(t){switch(this.insertionMode){case U.INITIAL:{pa(this,t);break}case U.BEFORE_HTML:{ma(this,t);break}case U.BEFORE_HEAD:{ga(this,t);break}case U.IN_HEAD:{Ea(this,t);break}case U.IN_HEAD_NO_SCRIPT:{ya(this,t);break}case U.AFTER_HEAD:{Ta(this,t);break}case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{fy(this,t);break}case U.TEXT:{hR(this,t);break}case U.IN_TABLE_TEXT:{_a(this,t);break}case U.IN_TEMPLATE:{Ty(this,t);break}case U.AFTER_BODY:case U.IN_FRAMESET:case U.AFTER_FRAMESET:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{eh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===I.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 U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.TEXT:case U.IN_COLUMN_GROUP:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{this._insertCharacters(t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:case U.AFTER_BODY:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{sy(this,t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{th(this,t);break}case U.IN_TABLE_TEXT:{hy(this,t);break}}}}function cP(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):dy(e,t),n}function dP(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function fP(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=uP;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=hP(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function hP(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 pP(e,t,n){const r=e.treeAdapter.getTagName(t),s=$s(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===me.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function mP(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function Jf(e,t){for(let n=0;n<aP;n++){const r=cP(e,t);if(!r)break;const s=dP(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=fP(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&pP(e,u,a),mP(e,s,r)}}function Zf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function gP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function EP(e,t){e._appendCommentNode(t,e.document)}function eh(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],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.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 yP(e,t){e._setDocumentType(t);const n=t.forceQuirks?qn.QUIRKS:GI(t);WI(t)||e._err(t,re.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=U.BEFORE_HTML}function pa(e,t){e._err(t,re.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,qn.QUIRKS),e.insertionMode=U.BEFORE_HTML,e._processToken(t)}function TP(e,t){t.tagID===g.HTML?(e._insertElement(t,me.HTML),e.insertionMode=U.BEFORE_HEAD):ma(e,t)}function bP(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&ma(e,t)}function ma(e,t){e._insertFakeRootElement(),e.insertionMode=U.BEFORE_HEAD,e._processToken(t)}function xP(e,t){switch(t.tagID){case g.HTML:{on(e,t);break}case g.HEAD:{e._insertElement(t,me.HTML),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD;break}default:ga(e,t)}}function _P(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?ga(e,t):e._err(t,re.endTagWithoutMatchingOpenElement)}function ga(e,t){e._insertFakeElement(Q.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD,e._processToken(t)}function or(e,t){switch(t.tagID){case g.HTML:{on(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,kt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,kt.RAWTEXT):(e._insertElement(t,me.HTML),e.insertionMode=U.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,kt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,kt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=U.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(U.IN_TEMPLATE);break}case g.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:Ea(e,t)}}function wP(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=U.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Ea(e,t);break}case g.TEMPLATE:{Zi(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function Zi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,re.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,re.endTagWithoutMatchingOpenElement)}function Ea(e,t){e.openElements.pop(),e.insertionMode=U.AFTER_HEAD,e._processToken(t)}function SP(e,t){switch(t.tagID){case g.HTML:{on(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{or(e,t);break}case g.NOSCRIPT:{e._err(t,re.nestedNoscriptInHead);break}default:ya(e,t)}}function vP(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=U.IN_HEAD;break}case g.BR:{ya(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function ya(e,t){const n=t.type===Ke.EOF?re.openElementsLeftAfterEof:re.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=U.IN_HEAD,e._processToken(t)}function AP(e,t){switch(t.tagID){case g.HTML:{on(e,t);break}case g.BODY:{e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=U.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,me.HTML),e.insertionMode=U.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,re.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),or(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:Ta(e,t)}}function NP(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ta(e,t);break}case g.TEMPLATE:{Zi(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function Ta(e,t){e._insertFakeElement(Q.BODY,g.BODY),e.insertionMode=U.IN_BODY,ml(e,t)}function ml(e,t){switch(t.type){case Ke.CHARACTER:{oy(e,t);break}case Ke.WHITESPACE_CHARACTER:{sy(e,t);break}case Ke.COMMENT:{Zf(e,t);break}case Ke.START_TAG:{on(e,t);break}case Ke.END_TAG:{gl(e,t);break}case Ke.EOF:{fy(e,t);break}}}function sy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function oy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function kP(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function CP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function OP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,me.HTML),e.insertionMode=U.IN_FRAMESET)}function IP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function PP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Xf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,me.HTML)}function RP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function LP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),n||(e.formElement=e.openElements.current))}function DP(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function MP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.tokenizer.state=kt.PLAINTEXT}function FP(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1}function BP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(Jf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function UP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function HP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Jf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function jP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function zP(e,t){e.treeAdapter.getDocumentMode(e.document)!==qn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=U.IN_TABLE}function ay(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function uy(e){const t=HE(e,Ji.TYPE);return t!=null&&t.toLowerCase()===oP}function $P(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),uy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function VP(e,t){e._appendElement(t,me.HTML),t.ackSelfClosing=!0}function qP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function YP(e,t){t.tagName=Q.IMG,t.tagID=g.IMG,ay(e,t)}function WP(e,t){e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.tokenizer.state=kt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=U.TEXT}function GP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,kt.RAWTEXT)}function XP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,kt.RAWTEXT)}function ly(e,t){e._switchToTextParsing(t,kt.RAWTEXT)}function QP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===U.IN_TABLE||e.insertionMode===U.IN_CAPTION||e.insertionMode===U.IN_TABLE_BODY||e.insertionMode===U.IN_ROW||e.insertionMode===U.IN_CELL?U.IN_SELECT_IN_TABLE:U.IN_SELECT}function KP(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function JP(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,me.HTML)}function ZP(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,me.HTML)}function eR(e,t){e._reconstructActiveFormattingElements(),ey(t),Kf(t),t.selfClosing?e._appendElement(t,me.MATHML):e._insertElement(t,me.MATHML),t.ackSelfClosing=!0}function tR(e,t){e._reconstructActiveFormattingElements(),ty(t),Kf(t),t.selfClosing?e._appendElement(t,me.SVG):e._insertElement(t,me.SVG),t.ackSelfClosing=!0}function cy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function on(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{UP(e,t);break}case g.A:{BP(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{PP(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{IP(e,t);break}case g.LI:case g.DD:case g.DT:{DP(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{ay(e,t);break}case g.HR:{qP(e,t);break}case g.RB:case g.RTC:{JP(e,t);break}case g.RT:case g.RP:{ZP(e,t);break}case g.PRE:case g.LISTING:{RP(e,t);break}case g.XMP:{GP(e,t);break}case g.SVG:{tR(e,t);break}case g.HTML:{kP(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{or(e,t);break}case g.BODY:{CP(e,t);break}case g.FORM:{LP(e,t);break}case g.NOBR:{HP(e,t);break}case g.MATH:{eR(e,t);break}case g.TABLE:{zP(e,t);break}case g.INPUT:{$P(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{VP(e,t);break}case g.IMAGE:{YP(e,t);break}case g.BUTTON:{FP(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{jP(e,t);break}case g.IFRAME:{XP(e,t);break}case g.SELECT:{QP(e,t);break}case g.OPTION:case g.OPTGROUP:{KP(e,t);break}case g.NOEMBED:case g.NOFRAMES:{ly(e,t);break}case g.FRAMESET:{OP(e,t);break}case g.TEXTAREA:{WP(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?ly(e,t):cy(e,t);break}case g.PLAINTEXT:{MP(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:cy(e,t)}}function nR(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=U.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function rR(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=U.AFTER_BODY,by(e,t))}function iR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function sR(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function oR(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(Q.P,g.P),e._closePElement()}function aR(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function uR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function lR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function cR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function dR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function dy(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function gl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{Jf(e,t);break}case g.P:{oR(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{iR(e,t);break}case g.LI:{aR(e);break}case g.DD:case g.DT:{uR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{lR(e);break}case g.BR:{dR(e);break}case g.BODY:{nR(e,t);break}case g.HTML:{rR(e,t);break}case g.FORM:{sR(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{cR(e,t);break}case g.TEMPLATE:{Zi(e,t);break}default:dy(e,t)}}function fy(e,t){e.tmplInsertionModeStack.length>0?Ty(e,t):eh(e,t)}function fR(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function hR(e,t){e._err(t,re.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function th(e,t){if(e.openElements.currentTagId!==void 0&&ny.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=U.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{py(e,t);break}case Ke.WHITESPACE_CHARACTER:{hy(e,t);break}}else xa(e,t)}function pR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,me.HTML),e.insertionMode=U.IN_CAPTION}function mR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=U.IN_COLUMN_GROUP}function gR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,g.COLGROUP),e.insertionMode=U.IN_COLUMN_GROUP,nh(e,t)}function ER(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=U.IN_TABLE_BODY}function yR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,g.TBODY),e.insertionMode=U.IN_TABLE_BODY,yl(e,t)}function TR(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function bR(e,t){uy(t)?e._appendElement(t,me.HTML):xa(e,t),t.ackSelfClosing=!0}function xR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,me.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Vs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{yR(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{or(e,t);break}case g.COL:{gR(e,t);break}case g.FORM:{xR(e,t);break}case g.TABLE:{TR(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{ER(e,t);break}case g.INPUT:{bR(e,t);break}case g.CAPTION:{pR(e,t);break}case g.COLGROUP:{mR(e,t);break}default:xa(e,t)}}function ba(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Zi(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:xa(e,t)}}function xa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ml(e,t),e.fosterParentingEnabled=n}function hy(e,t){e.pendingCharacterTokens.push(t)}function py(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function _a(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)xa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const my=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function _R(e,t){const n=t.tagID;my.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,Vs(e,t)):on(e,t)}function wR(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,n===g.TABLE&&ba(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:gl(e,t)}}function nh(e,t){switch(t.tagID){case g.HTML:{on(e,t);break}case g.COL:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{or(e,t);break}default:El(e,t)}}function SR(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case g.TEMPLATE:{Zi(e,t);break}case g.COL:break;default:El(e,t)}}function El(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE,e._processToken(t))}function yl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,me.HTML),e.insertionMode=U.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Q.TR,g.TR),e.insertionMode=U.IN_ROW,Tl(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,Vs(e,t));break}default:Vs(e,t)}}function rh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,ba(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:ba(e,t)}}function Tl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,me.HTML),e.insertionMode=U.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,yl(e,t));break}default:Vs(e,t)}}function gy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,rh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,rh(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:ba(e,t)}}function vR(e,t){const n=t.tagID;my.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Tl(e,t)):on(e,t)}function AR(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),gy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:gl(e,t)}}function Ey(e,t){switch(t.tagID){case g.HTML:{on(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,me.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,me.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{or(e,t);break}}}function yy(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{Zi(e,t);break}}}function NR(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ey(e,t)}function kR(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):yy(e,t)}function CR(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{or(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=U.IN_TABLE,e.insertionMode=U.IN_TABLE,Vs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=U.IN_COLUMN_GROUP,e.insertionMode=U.IN_COLUMN_GROUP,nh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=U.IN_TABLE_BODY,e.insertionMode=U.IN_TABLE_BODY,yl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=U.IN_ROW,e.insertionMode=U.IN_ROW,Tl(e,t);break}default:e.tmplInsertionModeStack[0]=U.IN_BODY,e.insertionMode=U.IN_BODY,on(e,t)}}function OR(e,t){t.tagID===g.TEMPLATE&&Zi(e,t)}function Ty(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):eh(e,t)}function IR(e,t){t.tagID===g.HTML?on(e,t):bl(e,t)}function by(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=U.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else bl(e,t)}function bl(e,t){e.insertionMode=U.IN_BODY,ml(e,t)}function PR(e,t){switch(t.tagID){case g.HTML:{on(e,t);break}case g.FRAMESET:{e._insertElement(t,me.HTML);break}case g.FRAME:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{or(e,t);break}}}function RR(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=U.AFTER_FRAMESET))}function LR(e,t){switch(t.tagID){case g.HTML:{on(e,t);break}case g.NOFRAMES:{or(e,t);break}}}function DR(e,t){t.tagID===g.HTML&&(e.insertionMode=U.AFTER_AFTER_FRAMESET)}function MR(e,t){t.tagID===g.HTML?on(e,t):xl(e,t)}function xl(e,t){e.insertionMode=U.IN_BODY,ml(e,t)}function FR(e,t){switch(t.tagID){case g.HTML:{on(e,t);break}case g.NOFRAMES:{or(e,t);break}}}function BR(e,t){t.chars=bt,e._insertCharacters(t)}function UR(e,t){e._insertCharacters(t),e.framesetOk=!1}function xy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==me.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function HR(e,t){if(tP(t))xy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===me.MATHML?ey(t):r===me.SVG&&(nP(t),ty(t)),Kf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function jR(e,t){if(t.tagID===g.P||t.tagID===g.BR){xy(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)===me.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}Q.AREA,Q.BASE,Q.BASEFONT,Q.BGSOUND,Q.BR,Q.COL,Q.EMBED,Q.FRAME,Q.HR,Q.IMG,Q.INPUT,Q.KEYGEN,Q.LINK,Q.META,Q.PARAM,Q.SOURCE,Q.TRACK,Q.WBR;const zR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,$R=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),_y={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function wy(e,t){const n=ZR(e),r=DE("type",{handlers:{root:VR,element:qR,text:YR,comment:vy,doctype:WR,raw:XR},unknown:QR}),s={parser:n?new iy(_y):iy.getFragmentParser(void 0,_y),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),qs(s,br());const a=n?s.parser.document:s.parser.getFragment(),u=eI(a,{file:s.options.file});return s.stitches&&cl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Sy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function VR(e,t){Sy(e.children,t)}function qR(e,t){KR(e,t),Sy(e.children,t),JR(e,t)}function YR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:wa(e)};qs(t,br(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function WR(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:wa(e)};qs(t,br(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function GR(e,t){t.stitches=!0;const n=e6(e);if("children"in e&&"children"in n){const r=wy({type:"root",children:e.children},t.options);n.children=r.children}vy({type:"comment",value:{stitch:n}},t)}function vy(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:wa(e)};qs(t,br(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function XR(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,Ay(t,br(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(zR,"&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 QR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))GR(n,t);else{let r="";throw $R.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 qs(e,t){Ay(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=kt.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 Ay(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 KR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===kt.PLAINTEXT)return;qs(t,br(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:Ki.html;s===Ki.html&&n==="svg"&&(s=Ki.svg);const a=sI(ce(H({},e),{children:[]}),{space:s===Ki.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:$s(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:wa(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function JR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&hI.includes(n)||t.parser.tokenizer.state===kt.PLAINTEXT)return;qs(t,Zu(e));const r={type:Ke.END_TAG,tagName:n,tagID:$s(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:wa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===kt.RCDATA||t.parser.tokenizer.state===kt.RAWTEXT||t.parser.tokenizer.state===kt.SCRIPT_DATA)&&(t.parser.tokenizer.state=kt.DATA)}function ZR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function wa(e){const t=br(e)||{line:void 0,column:void 0,offset:void 0},n=Zu(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 e6(e){return"children"in e?Qi(ce(H({},e),{children:[]})):Qi(e)}function Ny(e){return function(t,n){return wy(t,ce(H({},e),{file:n}))}}const es=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ky={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...es,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...es],h2:[["className","sr-only"]],img:[...es,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...es,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...es],table:[...es],ul:[...es,["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"]},ci={}.hasOwnProperty;function t6(e,t){let n={type:"root",children:[]};const r={schema:t?H(H({},ky),t):ky,stack:[]},s=Cy(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function Cy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return n6(e,n);case"doctype":return r6(e,n);case"element":return i6(e,n);case"root":return s6(e,n);case"text":return o6(e,n)}}}function n6(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Sa(a,t),a}}function r6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Sa(n,t),n}}function i6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Oy(e,t.children),s=a6(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&&ci.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:s,children:r};return Sa(u,t),u}function s6(e,t){const r={type:"root",children:Oy(e,t.children)};return Sa(r,t),r}function o6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Sa(r,t),r}function Oy(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=Cy(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function a6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&ci.call(r,n)?r[n]:void 0,u=r&&ci.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(ci.call(c,f)){const p=c[f];let m=Iy(e,Ry(a,f),f,p);m==null&&(m=Iy(e,Ry(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&ci.call(s,n)){const p=s[n];for(f in p)ci.call(p,f)&&!ci.call(d,f)&&(d[f]=p[f])}return d}function Iy(e,t,n,r){return t?Array.isArray(r)?u6(e,t,n,r):Py(e,t,n,r):void 0}function u6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Py(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Py(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&l6(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function l6(e,t,n){const r=e.schema.protocols&&ci.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),c=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function Sa(e,t){const n=S1(t);t.data&&(e.data=Qi(t.data)),n&&(e.position=n)}function Ry(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function c6(e){return function(t){return t6(t,e)}}const Ly=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return _.jsx("a",ce(H(H({className:F(e,`${O}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},d6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ut();return!e&&!t?null:_.jsx("div",{className:F(n,`${O}-disclaimer`),children:t?_.jsx(AE,{rehypePlugins:[Ny,c6],components:{ul:({children:r})=>_.jsx("ul",{className:F(n,`${O}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:F(n,`${O}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:F(n,`${O}-li`),children:r}),a:({href:r,title:s,children:a})=>_.jsx(Ly,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>_.jsx("img",{className:F(n,`${O}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>_.jsx("p",{className:F(n,`${O}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:F(n,`${O}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:F(n,`${O}-disclaimer-text`),children:e})})},ih=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a}=hn(),{globalClassName:u,searchConfig:c,enableEscalationToAgent:d}=ut(),f=B.useRef(null),p=t||!s&&!a,m=y=>{var A;y.preventDefault();const x=(((A=f.current)==null?void 0:A.value)||"").trim();x&&(f.current.value="",r(x))},b=()=>{r("Can you connect me to a human?")};return _.jsxs("div",{className:F(u,e,`cim-${n}-component`,`${O}-search-bar-wrapper`),children:[_.jsxs("form",{className:F(u,e,`cim-${n}-component`,`${O}-search-bar`),name:`${O}-search-form`,onSubmit:m,children:[_.jsx("input",{className:F(u,e,`cim-${n}-component`,`${O}-search-input`),type:"text",ref:f,placeholder:(c==null?void 0:c.placeholder)||"Ask us anything",name:`${O}-user-input`,disabled:p}),_.jsx($N,{className:e,globalClassName:u,searchConfig:c,componentType:n,isLoading:p}),d&&_.jsx(ir,{className:F(u,`${O}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:p,onClick:b,icon:_.jsx(IN,{})})]}),_.jsx(d6,{})]})};function f6(e){return at({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function h6(e){return at({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const Dy=B.createContext({isOpen:!1}),sh=B.createContext(null),My=B.createContext(null),Ys=()=>{var n,r;const e=B.useContext(sh),t=B.useContext(My);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Fy=({onClearChat:e,componentType:t})=>{const n=Ys(),r=()=>{e(),n()};return _.jsxs("button",{className:F(`${O}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(h6,{}),"Clear chat"]})},By=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=ut(),r=Ys(),[s,a]=B.useState(!1),u=()=>Ue(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return _.jsxs("button",{className:F(`${O}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[_.jsx(f6,{}),"Download transcript"]})};function p6(e){return e==null?[]:Array.isArray(e)?e:[e]}var m6=(e,...t)=>e.concat(t),g6=(e,...t)=>e.filter(n=>!t.includes(n)),E6=e=>Array.from(new Set(e));function Uy(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?s?c:0:a>=u?s?0:t>u?u:t:a}function y6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return Uy(e,t,{step:-r,loop:s})}var T6=e=>Array.isArray(e),Hy=e=>e!=null&&typeof e=="object",b6=e=>Hy(e)&&!T6(e),_l=e=>typeof e=="string",Ws=e=>typeof e=="function",x6=e=>e==null,_6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),w6=e=>Object.prototype.toString.call(e),jy=Function.prototype.toString,S6=jy.call(Object),v6=e=>{if(!Hy(e)||w6(e)!="[object Object]"||k6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=_6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&jy.call(n)==S6},A6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,N6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,k6=e=>A6(e)||N6(e),C6=e=>e(),O6=()=>{},oh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function I6(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:P6,max:R6}=Math,L6=e=>Number.isNaN(e),D6=e=>L6(e)?0:e,zy=(e,t,n)=>P6(R6(D6(e),t),n);function ah(e){if(!v6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=ah(s))}return n}function uh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function M6(e,t){if(e==null)throw new Error(t())}function F6(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var B6=Object.defineProperty,U6=(e,t,n)=>t in e?B6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lh=(e,t,n)=>U6(e,typeof t!="symbol"?t+"":t,n),$y=()=>{},wl=e=>typeof e=="object"&&e!==null,Gs=e=>e?"":void 0,Vy=e=>e?"true":void 0,H6=1,j6=9,z6=11,$t=e=>wl(e)&&e.nodeType===H6&&typeof e.nodeName=="string",Sl=e=>wl(e)&&e.nodeType===j6,$6=e=>wl(e)&&e===e.window,qy=e=>$t(e)?e.localName||"":"#document";function V6(e){return["html","body","#document"].includes(qy(e))}var q6=e=>wl(e)&&e.nodeType!==void 0,ts=e=>q6(e)&&e.nodeType===z6&&"host"in e,Y6=e=>$t(e)&&e.localName==="input",W6=e=>$t(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function va(e){if(!e)return!1;const t=e.getRootNode();return Ks(t)===e}var G6=/(textarea|select)/;function X6(e){if(e==null||!$t(e))return!1;try{return Y6(e)&&e.selectionStart!=null||G6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Xs(e,t){var r;if(!e||!t||!$t(e)||!$t(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ts(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function wr(e){var t;return Sl(e)?e:$6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function Q6(e){return wr(e).documentElement}function Qs(e){var t,n,r;return ts(e)?Qs(e.host):Sl(e)?(t=e.defaultView)!=null?t:window:$t(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Ks(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 K6(e){if(qy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ts(e)&&e.host||Q6(e);return ts(t)?t.host:t}function ch(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Sl(t)||ts(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var dh=new WeakMap;function Js(e){return dh.has(e)||dh.set(e,Qs(e).getComputedStyle(e)),dh.get(e)}var fh=new Set(["menu","listbox","dialog","grid","tree","region"]),J6=e=>fh.has(e),Yy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Wy(e,t){const n=new Set,r=ch(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Yy(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(m&&J6(m)&&!b&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function Gy(e,t){const n=ch(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Yy(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";m&&fh.has(m)&&!b&&(t(p),s(p))}}}};s(e)}function Z6(e){const t=new Set;return Gy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function e4(e){const t=e.getAttribute("role");return!!(t&&fh.has(t))}function t4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function n4(e){var t;return t4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function r4(e){if(!e.id)return!1;const t=ch(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&e4(e))}var hh=()=>typeof document!="undefined";function i4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var ph=e=>hh()&&e.test(i4()),s4=e=>hh()&&e.test(navigator.vendor),Xy=()=>hh()&&!!navigator.maxTouchPoints,o4=()=>ph(/^iPhone/i),a4=()=>ph(/^iPad/i)||mh()&&navigator.maxTouchPoints>1,vl=()=>o4()||a4(),u4=()=>mh()||vl(),mh=()=>ph(/^Mac/i),l4=()=>u4()&&s4(/apple/i);function c4(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function ar(e){var n;const t=c4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Qy=e=>e.button===0,d4=e=>e.button===2||mh()&&e.ctrlKey&&e.button===0,f4=e=>"touches"in e&&e.touches.length>0,h4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Ky={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function p4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=h4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in Ky&&(s=Ky[s]),s}function Jy(e,t="client"){const n=f4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Vt=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},Zy=e=>$t(e)&&e.tagName==="IFRAME",m4=/^(audio|video|details)$/;function eT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var g4=e=>!Number.isNaN(eT(e)),E4=e=>eT(e)<0;function y4(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function tT(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<s.length;){const d=s[c++];if(!d||a.has(d))continue;a.add(d);const f=y4(d,t);if(f){const p=Array.from(f.querySelectorAll(Al)).filter(n),m=u.get(d);if(m!==void 0){const b=m+1;r.splice(b,0,...p),p.forEach((y,x)=>{u.set(y,b+x)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,b+x)})}s.push(...p)}}return r}var Al="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",nT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Al));(n==!0||n=="if-empty"&&s.length===0)&&$t(e)&&Sr(e)&&s.unshift(e);const u=[];for(const c of s)if(Sr(c)){if(Zy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...nT(d,{getShadowRoot:r}));continue}u.push(c)}return r?tT(u,r,Sr):u};function Sr(e){return!$t(e)||e.closest("[inert]")?!1:e.matches(Al)&&W6(e)}function Zs(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Al));n&&ns(e)&&s.unshift(e);const a=[];for(const u of s)if(ns(u)){if(Zy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Zs(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=tT(a,r,ns);return!u.length&&n?s:u}return!a.length&&n?s:a}function ns(e){return $t(e)&&e.tabIndex>0?!0:Sr(e)&&!E4(e)}function T4(e,t={}){const n=Zs(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function b4(e,t={}){const{current:n,getShadowRoot:r}=t,s=Zs(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Ks(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function Aa(e){return e.tabIndex<0&&(m4.test(e.localName)||X6(e))&&!g4(e)?0:e.tabIndex}function rT(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)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=Zs(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var x4=class l2{constructor(){lh(this,"id",null),lh(this,"fn_cleanup"),lh(this,"cleanup",()=>{this.cancel()})}static create(){return new l2}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 Ft(e){const t=x4.create();return t.request(e),t.cleanup}function iT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function gh(e){const t=K6(e);return V6(t)?wr(t).body:$t(t)&&S4(t)?t:gh(t)}var _4=/auto|scroll|overlay|hidden|clip/,w4=new Set(["inline","contents"]);function S4(e){const t=Qs(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return _4.test(n+s+r)&&!w4.has(a)}var eo="default",Eh="",Nl=new WeakMap;function v4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return vl()?(eo==="default"&&(Eh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),eo="disabled"):t&&(Nl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>A4({target:t,doc:r})}function A4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(vl()){if(eo!=="disabled")return;eo="restoring",setTimeout(()=>{iT(()=>{eo==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Eh||""),Eh="",eo="default")})},300)}else if(t&&Nl.has(t)){const a=Nl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Nl.delete(t)}}function N4(e={}){const u=e,{defer:t,target:n}=u,r=En(u,["defer","target"]),s=t?Ft:c=>c(),a=[];return a.push(s(()=>{const c=typeof n=="function"?n():n;a.push(v4(ce(H({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function k4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=c=>{const d=Jy(c),f=Math.sqrt(ld(d.x,2)+ld(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=Jy(c);r({point:d,event:c})},u=[Vt(e,"pointermove",s,!1),Vt(e,"pointerup",a,!1),Vt(e,"pointercancel",a,!1),Vt(e,"contextmenu",a,!1),N4({doc:e})];return()=>{u.forEach(c=>c())}}function C4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,b]=T4(e,{includeContainer:!0,getShadowRoot:a}),y=b4(c,{current:n,getShadowRoot:a}),x=!m&&!b;f.shiftKey&&va(y)?(s==null||s(),p=b):f.shiftKey&&(va(m)||x)?p=n:!f.shiftKey&&va(n)?(s==null||s(),p=m):!f.shiftKey&&(va(b)||x)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Vt(u,"keydown",d,!0)}function O4(e,t){const c=t,{defer:n,triggerElement:r}=c,s=En(c,["defer","triggerElement"]),a=n?Ft:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(C4(d,H({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function I4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function kl(e,t){if(!e)return $y;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function P4(e,t,n){if(!e)return $y;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 R4(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),c(f))})}),()=>t.abort()]}function L4(e,t){const{timeout:n,rootNode:r}=t,s=Qs(r),a=wr(r),u=new s.AbortController;return R4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var D4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),M4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,sT=e=>{const t={};let n;for(;n=M4.exec(e);)t[n[1]]=n[2];return t},F4=(e,t)=>{if(_l(e)){if(_l(t))return`${e};${t}`;e=sT(e)}else _l(t)&&(t=sT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Bt(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=oh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=D4(t[s],n[s]);continue}if(s==="style"){t[s]=F4(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function X7(e){return e}var to=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(to||{}),yh="__init__";function B4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>wr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>Ks(t()),a=u=>t().getElementById(u);return ce(H({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:va,getById:a})}function U4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var no=()=>e=>Array.from(new Set(e)),oT=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Cl(e){var m,b;const t=(m=e().value)!=null?m:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=B.useState(t),[s,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(s);c.current=u?e().value:s;const d=B.useRef(c.current);oT(()=>{d.current=c.current},[s,e().value]);const f=y=>{var v,w;const x=d.current,A=Ws(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:A,prev:x}),u||a(A),n(A,x)||(w=(v=e()).onChange)==null||w.call(v,A,x)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?Ms.flushSync:C6)(()=>f(y))},invoke(y,x){var A,v;(v=(A=e()).onChange)==null||v.call(A,y,x)},hash(y){var x,A,v;return(v=(A=(x=e()).hash)==null?void 0:A.call(x,y))!=null?v:String(y)}}}Cl.cleanup=e=>{B.useEffect(()=>e,[])},Cl.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function H4(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var j4=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Ol(e,t={}){var le,Z,Ae,de,oe,Se;const n=B.useMemo(()=>{const{id:se,ids:Y,getRootNode:ae}=t;return B4({id:se,ids:Y,getRootNode:ae})},[t]),r=(...se)=>{e.debug&&console.log(...se)},s=(Z=(le=e.props)==null?void 0:le.call(e,{props:ah(t),scope:n}))!=null?Z:t,a=z4(s),u=(Ae=e.context)==null?void 0:Ae.call(e,{prop:a,bindable:Cl,scope:n,flush:uT,getContext(){return d},getComputed(){return G},getRefs(){return A},getEvent(){return y()}}),c=aT(u),d={get(se){var Y;return(Y=c.current)==null?void 0:Y[se].ref.current},set(se,Y){var ae;(ae=c.current)==null||ae[se].set(Y)},initial(se){var Y;return(Y=c.current)==null?void 0:Y[se].initial},hash(se){var ae,N;const Y=(ae=c.current)==null?void 0:ae[se].get();return(N=c.current)==null?void 0:N[se].hash(Y)}},f=B.useRef(new Map),p=B.useRef(null),m=B.useRef(null),b=B.useRef({type:""}),y=()=>ce(H({},b.current),{current(){return b.current},previous(){return m.current}}),x=()=>ce(H({},L),{matches(...se){return se.includes(L.ref.current)},hasTag(se){var Y,ae;return!!((ae=(Y=e.states[L.ref.current])==null?void 0:Y.tags)!=null&&ae.includes(se))}}),A=H4((oe=(de=e.refs)==null?void 0:de.call(e,{prop:a,context:d}))!=null?oe:{}),v=()=>({state:x(),context:d,event:y(),prop:a,send:$,action:w,guard:k,track:j4,refs:A,computed:G,flush:uT,scope:n,choose:j}),w=se=>{const Y=Ws(se)?se(v()):se;if(!Y)return;const ae=Y.map(N=>{var ee,P;const D=(P=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:P[N];return D||uh(`[zag-js] No implementation found for action "${JSON.stringify(N)}"`),D});for(const N of ae)N==null||N(v())},k=se=>{var Y,ae;return Ws(se)?se(v()):(ae=(Y=e.implementations)==null?void 0:Y.guards)==null?void 0:ae[se](v())},C=se=>{const Y=Ws(se)?se(v()):se;if(!Y)return;const ae=Y.map(D=>{var P,ve;const ee=(ve=(P=e.implementations)==null?void 0:P.effects)==null?void 0:ve[D];return ee||uh(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),ee}),N=[];for(const D of ae){const ee=D==null?void 0:D(v());ee&&N.push(ee)}return()=>N.forEach(D=>D==null?void 0:D())},j=se=>p6(se).find(Y=>{let ae=!Y.guard;return _l(Y.guard)?ae=!!k(Y.guard):Ws(Y.guard)&&(ae=Y.guard(v())),ae}),G=se=>{M6(e.computed,()=>"[zag-js] No computed object found on machine");const Y=e.computed[se];return Y({context:d,event:y(),prop:a,refs:A,scope:n,computed:G})},L=Cl(()=>({defaultValue:e.initialState({prop:a}),onChange(se,Y){var N,D,ee,P;if(Y){const ve=f.current.get(Y);ve==null||ve(),f.current.delete(Y)}Y&&w((N=e.states[Y])==null?void 0:N.exit),w((D=p.current)==null?void 0:D.actions);const ae=C((ee=e.states[se])==null?void 0:ee.effects);if(ae&&f.current.set(se,ae),Y===yh){w(e.entry);const ve=C(e.effects);ve&&f.current.set(yh,ve)}w((P=e.states[se])==null?void 0:P.entry)}})),W=B.useRef(void 0),ie=B.useRef(to.NotStarted);oT(()=>{queueMicrotask(()=>{var D;const ae=ie.current===to.Started;ie.current=to.Started,r(ae?"rehydrating...":"initializing...");const N=(D=W.current)!=null?D:L.initial;L.invoke(N,ae?L.get():yh)});const se=f.current,Y=L.ref.current;return()=>{r("unmounting..."),W.current=Y,ie.current=to.Stopped,se.forEach(ae=>ae==null?void 0:ae()),f.current=new Map,p.current=null,queueMicrotask(()=>{w(e.exit)})}},[]);const fe=()=>"ref"in L?L.ref.current:L.get(),$=se=>{queueMicrotask(()=>{var P,ve,Ce,he,Le;if(ie.current!==to.Started)return;m.current=b.current,b.current=se;let Y=fe();const ae=(Ce=(P=e.states[Y].on)==null?void 0:P[se.type])!=null?Ce:(ve=e.on)==null?void 0:ve[se.type],N=j(ae);if(!N)return;p.current=N;const D=(he=N.target)!=null?he:Y;r("transition",se.type,N.target||Y,`(${N.actions})`);const ee=D!==Y;ee?Ms.flushSync(()=>L.set(D)):N.reenter&&!ee?L.invoke(Y,Y):w((Le=N.actions)!=null?Le:[])})};return(Se=e.watch)==null||Se.call(e,v()),{state:x(),send:$,context:d,prop:a,scope:n,refs:A,computed:G,event:y(),getStatus:()=>ie.current}}function aT(e){const t=B.useRef(e);return t.current=e,t}function z4(e){const t=aT(e);return function(r){return t.current[r]}}function uT(e){queueMicrotask(()=>{Ms.flushSync(()=>e())})}var Th=U4(e=>e);function Il(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function $4(e){var r,s;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=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const bh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=En(f,["asChild","children"]);if(!s)return B.createElement(e,ce(H({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=$4(c);return B.cloneElement(c,ce(H({},Bt(u,c.props)),{ref:r?Il(r,d):d}))}));return t.displayName=e.displayName||e.name,t},an=(()=>{const e=new Map;return new Proxy(bh,{apply(t,n,r){return bh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,bh(r)),e.get(r)}})})();function V4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function rs(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const m=new Error(a!=null?a:V4(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[q4,xh]=rs({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[lT,Na]=rs({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),cT=B.forwardRef((e,t)=>{const n=xh(),r=Na(),s=Bt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(an.div,ce(H({},s),{ref:Il(r.ref,t)}))});cT.displayName="PopoverContent";const dT=B.forwardRef((e,t)=>{const n=xh(),r=Na(),s=Bt(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(an.div,ce(H({},s),{ref:t}))});dT.displayName="PopoverPositioner";const ka=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},H({},e)]),fT=e=>ka()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function Y4(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var W4={props({props:e}){return ce(H({},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",Js(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Ft(()=>{var c,d;const u=Pl(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})=>{Ft(()=>{e.set("prevAnimationName",Pl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,b;((b=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?b:d.target)===s&&e.set("prevAnimationName",Pl(t.get("styles")))},u=d=>{const f=Pl(t.get("styles"));ar(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const c=kl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),iT(()=>c())}}}}};function Pl(e){return(e==null?void 0:e.animationName)||"none"}no()(["onExitComplete","present","immediate"]);function G4(e,t={}){const{sync:n=!1}=t,r=X4(e);return B.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function X4(e){const t=B.useRef(e);return t.current=e,t}const _h=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=En(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=ce(H({},a),{present:r,onExitComplete:G4(e.onExitComplete)}),d=Ol(W4,c),f=Y4(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var is=(e,t=[])=>({parts:(...n)=>{if(Q4(t))return is(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>is(e,[...t,...n]),omit:(...n)=>is(e,t.filter(r=>!n.includes(r))),rename:n=>is(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${ro(e)}"][data-part="${ro(r)}"]`,`& [data-scope="${ro(e)}"][data-part="${ro(r)}"]`].join(", "),attrs:{"data-scope":ro(e),"data-part":ro(r)}}}),{})}),ro=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Q4=e=>e.length===0;const K4=["top","right","bottom","left"],di=Math.min,Hr=Math.max,Rl=Math.round,Ll=Math.floor,vr=e=>({x:e,y:e}),J4={left:"right",right:"left",bottom:"top",top:"bottom"};function hT(e,t,n){return Hr(e,di(t,n))}function jr(e,t){return typeof e=="function"?e(t):e}function fi(e){return e.split("-")[0]}function io(e){return e.split("-")[1]}function wh(e){return e==="x"?"y":"x"}function Sh(e){return e==="y"?"height":"width"}function Ar(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function vh(e){return wh(Ar(e))}function Z4(e,t,n){n===void 0&&(n=!1);const r=io(e),s=vh(e),a=Sh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Dl(u)),[u,Dl(u)]}function eL(e){const t=Dl(e);return[Ah(e),t,Ah(t)]}function Ah(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const pT=["left","right"],mT=["right","left"],tL=["top","bottom"],nL=["bottom","top"];function rL(e,t,n){switch(e){case"top":case"bottom":return n?t?mT:pT:t?pT:mT;case"left":case"right":return t?tL:nL;default:return[]}}function iL(e,t,n,r){const s=io(e);let a=rL(fi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Ah)))),a}function Dl(e){const t=fi(e);return J4[t]+e.slice(t.length)}function sL(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function gT(e){return typeof e!="number"?sL(e):{top:e,right:e,bottom:e,left:e}}function Ml(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function ET(e,t,n){let{reference:r,floating:s}=e;const a=Ar(t),u=vh(t),c=Sh(u),d=fi(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const x=io(t);return x&&(y[u]+=b*(x==="end"?1:-1)*(n&&f?-1:1)),y}function oL(e,t){return Ue(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=jr(t,e),x=gT(y),v=c[b?m==="floating"?"reference":"floating":m],w=Ml(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),k=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),j=(yield a.isElement==null?void 0:a.isElement(C))&&(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1},G=Ml(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:C,strategy:d}):k);return{top:(w.top-G.top+x.top)/j.y,bottom:(G.bottom-w.bottom+x.bottom)/j.y,left:(w.left-G.left+x.left)/j.x,right:(G.right-w.right+x.right)/j.x}})}const aL=50,uL=(e,t,n)=>Ue(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,c=u.detectOverflow?u:ce(H({},u),{detectOverflow:oL}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=ET(f,r,d),b=r,y=0;const x={};for(let A=0;A<a.length;A++){const v=a[A];if(!v)continue;const{name:w,fn:k}=v,{x:C,y:j,data:G,reset:L}=yield k({x:p,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:x,rects:f,platform:c,elements:{reference:e,floating:t}});p=C!=null?C:p,m=j!=null?j:m,x[w]=H(H({},x[w]),G),L&&y<aL&&(y++,typeof L=="object"&&(L.placement&&(b=L.placement),L.rects&&(f=L.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):L.rects),{x:p,y:m}=ET(f,b,d)),A=-1)}return{x:p,y:m,placement:b,strategy:s,middlewareData:x}}),lL=e=>({name:"arrow",options:e,fn(n){return Ue(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=jr(e,n)||{};if(p==null)return{};const b=gT(m),y={x:r,y:s},x=vh(a),A=Sh(x),v=yield c.getDimensions(p),w=x==="y",k=w?"top":"left",C=w?"bottom":"right",j=w?"clientHeight":"clientWidth",G=u.reference[A]+u.reference[x]-y[x]-u.floating[A],L=y[x]-u.reference[x],W=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ie=W?W[j]:0;(!ie||!(yield c.isElement==null?void 0:c.isElement(W)))&&(ie=d.floating[j]||u.floating[A]);const fe=G/2-L/2,$=ie/2-v[A]/2-1,le=di(b[k],$),Z=di(b[C],$),Ae=ie-v[A]-Z,de=ie/2-v[A]/2+fe,oe=hT(le,de,Ae),Se=!f.arrow&&io(a)!=null&&de!==oe&&u.reference[A]/2-(de<le?le:Z)-v[A]/2<0,se=Se?de<le?de-le:de-Ae:0;return{[x]:y[x]+se,data:H({[x]:oe,centerOffset:de-oe-se},Se&&{alignmentOffset:se}),reset:Se}})}}),cL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ue(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,oe=jr(e,n),{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:v=!0}=oe,w=En(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=fi(a),C=Ar(d),j=fi(d)===d,G=yield f.isRTL==null?void 0:f.isRTL(p.floating),L=y||(j||!v?[Dl(d)]:eL(d)),W=A!=="none";!y&&W&&L.push(...iL(d,v,A,G));const ie=[d,...L],fe=yield f.detectOverflow(n,w),$=[];let le=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&$.push(fe[k]),b){const Se=Z4(a,c,G);$.push(fe[Se[0]],fe[Se[1]])}if(le=[...le,{placement:a,overflows:$}],!$.every(Se=>Se<=0)){var Z,Ae;const Se=(((Z=u.flip)==null?void 0:Z.index)||0)+1,se=ie[Se];if(se&&(!(b==="alignment"?C!==Ar(se):!1)||le.every(N=>Ar(N.placement)===C?N.overflows[0]>0:!0)))return{data:{index:Se,overflows:le},reset:{placement:se}};let Y=(Ae=le.filter(ae=>ae.overflows[0]<=0).sort((ae,N)=>ae.overflows[1]-N.overflows[1])[0])==null?void 0:Ae.placement;if(!Y)switch(x){case"bestFit":{var de;const ae=(de=le.filter(N=>{if(W){const D=Ar(N.placement);return D===C||D==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(D=>D>0).reduce((D,ee)=>D+ee,0)]).sort((N,D)=>N[1]-D[1])[0])==null?void 0:de[0];ae&&(Y=ae);break}case"initialPlacement":Y=d;break}if(a!==Y)return{reset:{placement:Y}}}return{}})}}};function yT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function TT(e){return K4.some(t=>e[t]>=0)}const dL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ue(this,null,function*(){const{rects:r,platform:s}=n,c=jr(e,n),{strategy:a="referenceHidden"}=c,u=En(c,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,ce(H({},u),{elementContext:"reference"})),f=yT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:TT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,ce(H({},u),{altBoundary:!0})),f=yT(d,r.floating);return{data:{escapedOffsets:f,escaped:TT(f)}}}default:return{}}})}}},bT=new Set(["left","top"]);function fL(e,t){return Ue(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=fi(n),c=io(n),d=Ar(n)==="y",f=bT.has(u)?-1:1,p=a&&d?-1:1,m=jr(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof x=="number"&&(y=c==="end"?x*-1:x),d?{x:y*p,y:b*f}:{x:b*f,y:y*p}})}const hL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ue(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield fL(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:ce(H({},f),{placement:c})}})}}},pL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ue(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,C=jr(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:j=>{let{x:G,y:L}=j;return{x:G,y:L}}}}=C,p=En(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},b=yield u.detectOverflow(n,p),y=Ar(a),x=wh(y);let A=m[x],v=m[y];const w=(j,G)=>hT(G+b[j==="y"?"top":"left"],G,G-b[j==="y"?"bottom":"right"]);c&&(A=w(x,A)),d&&(v=w(y,v));const k=f.fn(ce(H({},n),{[x]:A,[y]:v}));return ce(H({},k),{data:{x:k.x-r,y:k.y-s,enabled:{[x]:c,[y]:d}}})})}}},mL=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=jr(e,t),b={x:s,y:a},y=Ar(u),x=wh(y);let A=b[x],v=b[y];const w=jr(f,t),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(n=w.mainAxis)!=null?n:0,crossAxis:(r=w.crossAxis)!=null?r:0};if(p){const G=x==="y"?"height":"width",L=c.reference[x]-c.floating[G]+k.mainAxis,W=c.reference[x]+c.reference[G]-k.mainAxis;A<L?A=L:A>W&&(A=W)}if(m){var C,j;const G=x==="y"?"width":"height",L=bT.has(fi(u)),W=c.reference[y]-c.floating[G]+(L&&((C=d.offset)==null?void 0:C[y])||0)+(L?0:k.crossAxis),ie=c.reference[y]+c.reference[G]+(L?0:((j=d.offset)==null?void 0:j[y])||0)-(L?k.crossAxis:0);v<W?v=W:v>ie&&(v=ie)}return{[x]:A,[y]:v}}}},gL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ue(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,$=jr(e,n),{apply:c=()=>{}}=$,d=En($,["apply"]),f=yield a.detectOverflow(n,d),p=fi(r),m=io(r),b=Ar(r)==="y",{width:y,height:x}=s.floating;let A,v;p==="top"||p==="bottom"?(A=p,v=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(v=p,A=m==="end"?"top":"bottom");const w=x-f.top-f.bottom,k=y-f.left-f.right,C=di(x-f[A],w),j=di(y-f[v],k),G=n.middlewareData.shift,L=!G;let W=C,ie=j;G!=null&&G.enabled.x&&(ie=k),G!=null&&G.enabled.y&&(W=w),L&&!m&&(b?ie=y-2*Hr(f.left,f.right):W=x-2*Hr(f.top,f.bottom)),yield c(ce(H({},n),{availableWidth:ie,availableHeight:W}));const fe=yield a.getDimensions(u.floating);return y!==fe.width||x!==fe.height?{reset:{rects:!0}}:{}})}}};function Fl(){return typeof window!="undefined"}function so(e){return xT(e)?(e.nodeName||"").toLowerCase():"#document"}function Fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nr(e){var t;return(t=(xT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xT(e){return Fl()?e instanceof Node||e instanceof Fn(e).Node:!1}function ur(e){return Fl()?e instanceof Element||e instanceof Fn(e).Element:!1}function kr(e){return Fl()?e instanceof HTMLElement||e instanceof Fn(e).HTMLElement:!1}function _T(e){return!Fl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Fn(e).ShadowRoot}function Ca(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function EL(e){return/^(table|td|th)$/.test(so(e))}function Bl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const yL=/transform|translate|scale|rotate|perspective|filter/,TL=/paint|layout|strict|content/,ss=e=>!!e&&e!=="none";let Nh;function kh(e){const t=ur(e)?lr(e):e;return ss(t.transform)||ss(t.translate)||ss(t.scale)||ss(t.rotate)||ss(t.perspective)||!Ch()&&(ss(t.backdropFilter)||ss(t.filter))||yL.test(t.willChange||"")||TL.test(t.contain||"")}function bL(e){let t=hi(e);for(;kr(t)&&!oo(t);){if(kh(t))return t;if(Bl(t))return null;t=hi(t)}return null}function Ch(){return Nh==null&&(Nh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Nh}function oo(e){return/^(html|body|#document)$/.test(so(e))}function lr(e){return Fn(e).getComputedStyle(e)}function Ul(e){return ur(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if(so(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_T(e)&&e.host||Nr(e);return _T(t)?t.host:t}function wT(e){const t=hi(e);return oo(t)?(e.ownerDocument||e).body:kr(t)&&Ca(t)?t:wT(t)}function Oa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=wT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Fn(s);if(a){const c=Oh(u);return t.concat(u,u.visualViewport||[],Ca(s)?s:[],c&&n?Oa(c):[])}else return t.concat(s,Oa(s,[],n))}function Oh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ST(e){const t=lr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=kr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=Rl(n)!==a||Rl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Ih(e){return ur(e)?e:e.contextElement}function ao(e){const t=Ih(e);if(!kr(t))return vr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=ST(t);let u=(a?Rl(n.width):n.width)/r,c=(a?Rl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const xL=vr(0);function vT(e){const t=Fn(e);return!Ch()||!t.visualViewport?xL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _L(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fn(e)?!1:t}function os(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Ih(e);let u=vr(1);t&&(r?ur(r)&&(u=ao(r)):u=ao(e));const c=_L(a,n,r)?vT(a):vr(0);let d=(s.left+c.x)/u.x,f=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const b=Fn(a),y=r&&ur(r)?Fn(r):r;let x=b,A=Oh(x);for(;A&&r&&y!==x;){const v=ao(A),w=A.getBoundingClientRect(),k=lr(A),C=w.left+(A.clientLeft+parseFloat(k.paddingLeft))*v.x,j=w.top+(A.clientTop+parseFloat(k.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,m*=v.y,d+=C,f+=j,x=Fn(A),A=Oh(x)}}return Ml({width:p,height:m,x:d,y:f})}function Hl(e,t){const n=Ul(e).scrollLeft;return t?t.left+n:os(Nr(e)).left+n}function AT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Hl(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function wL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Nr(r),c=t?Bl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=vr(1);const p=vr(0),m=kr(r);if((m||!m&&!a)&&((so(r)!=="body"||Ca(u))&&(d=Ul(r)),kr(r))){const y=os(r);f=ao(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!m&&!a?AT(u,d):vr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function SL(e){return Array.from(e.getClientRects())}function vL(e){const t=Nr(e),n=Ul(e),r=e.ownerDocument.body,s=Hr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Hr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Hl(e);const c=-n.scrollTop;return lr(r).direction==="rtl"&&(u+=Hr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const NT=25;function AL(e,t){const n=Fn(e),r=Nr(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(s){a=s.width,u=s.height;const p=Ch();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=Hl(r);if(f<=0){const p=r.ownerDocument,m=p.body,b=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-y);x<=NT&&(a-=x)}else f<=NT&&(a+=f);return{width:a,height:u,x:c,y:d}}const NL=new Set(["absolute","fixed"]);function kL(e,t){const n=os(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=kr(e)?ao(e):vr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function kT(e,t,n){let r;if(t==="viewport")r=AL(e,n);else if(t==="document")r=vL(Nr(e));else if(ur(t))r=kL(t,n);else{const s=vT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Ml(r)}function CT(e,t){const n=hi(e);return n===t||!ur(n)||oo(n)?!1:lr(n).position==="fixed"||CT(n,t)}function CL(e,t){const n=t.get(e);if(n)return n;let r=Oa(e,[],!1).filter(c=>ur(c)&&so(c)!=="body"),s=null;const a=lr(e).position==="fixed";let u=a?hi(e):e;for(;ur(u)&&!oo(u);){const c=lr(u),d=kh(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&NL.has(s.position)||Ca(u)&&!d&&CT(e,u))?r=r.filter(p=>p!==u):s=c,u=hi(u)}return t.set(e,r),r}function OL(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Bl(t)?[]:CL(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=kT(t,p,s);return f.top=Hr(m.top,f.top),f.right=di(m.right,f.right),f.bottom=di(m.bottom,f.bottom),f.left=Hr(m.left,f.left),f},kT(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function IL(e){const{width:t,height:n}=ST(e);return{width:t,height:n}}function PL(e,t,n){const r=kr(t),s=Nr(t),a=n==="fixed",u=os(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=vr(0);function f(){d.x=Hl(s)}if(r||!r&&!a)if((so(t)!=="body"||Ca(s))&&(c=Ul(t)),r){const y=os(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?AT(s,c):vr(0),m=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:m,y:b,width:u.width,height:u.height}}function Ph(e){return lr(e).position==="static"}function OT(e,t){if(!kr(e)||lr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Nr(e)===n&&(n=n.ownerDocument.body),n}function IT(e,t){const n=Fn(e);if(Bl(e))return n;if(!kr(e)){let s=hi(e);for(;s&&!oo(s);){if(ur(s)&&!Ph(s))return s;s=hi(s)}return n}let r=OT(e,t);for(;r&&EL(r)&&Ph(r);)r=OT(r,t);return r&&oo(r)&&Ph(r)&&!kh(r)?n:r||bL(e)||n}const RL=function(e){return Ue(this,null,function*(){const t=this.getOffsetParent||IT,n=this.getDimensions,r=yield n(e.floating);return{reference:PL(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function LL(e){return lr(e).direction==="rtl"}const DL={convertOffsetParentRelativeRectToViewportRelativeRect:wL,getDocumentElement:Nr,getClippingRect:OL,getOffsetParent:IT,getElementRects:RL,getClientRects:SL,getDimensions:IL,getScale:ao,isElement:ur,isRTL:LL};function PT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ML(e,t){let n=null,r;const s=Nr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:b,height:y}=f;if(c||t(),!b||!y)return;const x=Ll(m),A=Ll(s.clientWidth-(p+b)),v=Ll(s.clientHeight-(m+y)),w=Ll(p),C={rootMargin:-x+"px "+-A+"px "+-v+"px "+-w+"px",threshold:Hr(0,di(1,d))||1};let j=!0;function G(L){const W=L[0].intersectionRatio;if(W!==d){if(!j)return u();W?u(!1,W):r=setTimeout(()=>{u(!1,1e-7)},1e3)}W===1&&!PT(f,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(G,ce(H({},C),{root:s.ownerDocument}))}catch(L){n=new IntersectionObserver(G,C)}n.observe(e)}return u(!0),a}function FL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Ih(e),p=s||a?[...f?Oa(f):[],...Oa(t)]:[];p.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=f&&c?ML(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(w=>{let[k]=w;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let x,A=d?os(e):null;d&&v();function v(){const w=os(e);A&&!PT(A,w)&&n(),A=w,x=requestAnimationFrame(v)}return n(),()=>{var w;p.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),m==null||m(),(w=y)==null||w.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const BL=hL,UL=pL,HL=cL,jL=gL,zL=dL,$L=lL,VL=mL,qL=(e,t,n)=>{const r=new Map,s=H({platform:DL},n),a=ce(H({},s.platform),{_c:r});return uL(e,t,ce(H({},s),{platform:a}))};function RT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return ce(H({},s),{toJSON:()=>s})}function YL(e){if(!e)return RT();const{x:t,y:n,width:r,height:s}=e;return RT(t,n,r,s)}function WL(e,t){return{contextElement:$t(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?YL(r):n.getBoundingClientRect()}}}var Ia=e=>({variable:e,reference:`var(${e})`}),zr={arrowSize:Ia("--arrow-size"),arrowSizeHalf:Ia("--arrow-size-half"),arrowBg:Ia("--arrow-background"),transformOrigin:Ia("--transform-origin"),arrowOffset:Ia("--arrow-offset")},GL=e=>e==="top"||e==="bottom"?"y":"x";function XL(e,t){return{name:"transformOrigin",fn(n){var fe,$,le,Z,Ae;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=GL(d),p=((fe=s.arrow)==null?void 0:fe.x)||0,m=(($=s.arrow)==null?void 0:$.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+b/2,A=m+y/2,v=Math.abs(((le=s.shift)==null?void 0:le.y)||0),w=u.reference.height/2,k=y/2,C=(Ae=(Z=e.offset)==null?void 0:Z.mainAxis)!=null?Ae:e.gutter,j=typeof C=="number"?C+k:C!=null?C:k,G=v>j,L={top:`${x}px calc(100% + ${j}px)`,bottom:`${x}px ${-j}px`,left:`calc(100% + ${j}px) ${A}px`,right:`${-j}px ${A}px`}[d],W=`${x}px ${u.reference.y+w-c}px`,ie=!!e.overlap&&f==="y"&&G;return r.floating.style.setProperty(zr.transformOrigin.variable,ie?W:L),{data:{transformOrigin:ie?W:L}}}}}var QL={name:"rects",fn({rects:e}){return{data:e}}},KL=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${zr.arrowOffset.reference})`}),{}}}};function JL(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var ZL={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function LT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Rh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function e5(e,t,n){const r=e||t.createElement("div");return $L({element:r,padding:n.arrowPadding})}function t5(e,t){var n;if(!x6((n=t.offset)!=null?n:t.gutter))return BL(({placement:r})=>{var p,m,b,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:c}=JL(r),d=c?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return ah({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function n5(e){if(!e.flip)return;const t=Rh(e.boundary);return HL(ce(H({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function r5(e){if(!e.slide&&!e.overlap)return;const t=Rh(e.boundary);return UL(ce(H({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:VL()}))}function i5(e){return jL({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function s5(e){var t;if(e.hideWhenDetached)return zL({strategy:"referenceHidden",boundary:(t=Rh(e.boundary))!=null?t:"clippingAncestors"})}function o5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function a5(e,t,n={}){const r=WL(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},ZL,n),a=t.querySelector("[data-part=arrow]"),u=[t5(a,s),n5(s),r5(s),e5(a,t.ownerDocument,s),KL(a),XL({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),i5(s),s5(s),QL],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>Ue(null,null,function*(){var j;if(!r||!t)return;const A=yield qL(r,t,{placement:c,middleware:u,strategy:d});f==null||f(A),p==null||p({placed:!0});const v=Qs(t),w=LT(v,A.x),k=LT(v,A.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${k}px`),s.hideWhenDetached&&(((j=A.middlewareData.hide)==null?void 0:j.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const G=Js(C);t.style.setProperty("--z-index",G.zIndex)}}),b=()=>Ue(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=o5(s.listeners),x=s.listeners?FL(r,t,b,y):O6;return b(),()=>{x==null||x(),p==null||p({placed:!1})}}function DT(e,t,n={}){const c=n,{defer:r}=c,s=En(c,["defer"]),a=r?Ft:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(a5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var u5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function l5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:zr.arrowSize.reference,height:zr.arrowSize.reference,[zr.arrowSizeHalf.variable]:`calc(${zr.arrowSize.reference} / 2)`,[zr.arrowOffset.variable]:`calc(${zr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?u5[t.split("-")[0]]:void 0,background:zr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,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 uo=new WeakMap,jl=new WeakMap,zl={},Lh=0,MT=e=>e&&(e.host||MT(e.parentNode)),c5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=MT(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),d5=new Set(["script","output","status","next-route-announcer"]),f5=e=>d5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),h5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=c5(n,Array.isArray(e)?e:[e]);zl[r]||(zl[r]=new WeakMap);const c=zl[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&$t(y)&&Gy(y,x=>{m(x)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(f.has(x))b(x);else try{if(f5(x))return;const v=x.getAttribute(s)==="true",w=(uo.get(x)||0)+1,k=(c.get(x)||0)+1;uo.set(x,w),c.set(x,k),d.push(x),w===1&&v&&jl.set(x,!0),k===1&&x.setAttribute(r,""),v||x.setAttribute(s,"true")}catch(A){console.error("[zag-js > ariaHidden] cannot operate on ",x,A)}})};return b(n),f.clear(),Lh++,()=>{d.forEach(y=>{const x=uo.get(y)-1,A=c.get(y)-1;uo.set(y,x),c.set(y,A),x||(jl.has(y)||y.removeAttribute(s),jl.delete(y)),A||y.removeAttribute(r)}),Lh--,Lh||(uo=new WeakMap,uo=new WeakMap,jl=new WeakMap,zl={})}},p5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,m5=(e,t=p5(e),n="data-aria-hidden",r=!0)=>{if(t)return h5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},g5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function FT(e,t={}){const{defer:n=!0}=t,r=n?g5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(m5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function E5(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function y5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var BT="pointerdown.outside",UT="focus.outside";function T5(e){for(const t of e)if($t(t)&&Sr(t))return!0;return!1}var HT=e=>"clientY"in e;function b5(e,t){if(!HT(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 x5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function jT(e,t){if(!t||!HT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},c={x:e.clientX,y:e.clientY};return x5(u,c)?r||a:!1}function _5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=wr(e),f=Qs(e),p=E5(f),m=y5(f);function b(C,j){if(!$t(j)||!j.isConnected||Xs(e,j)||b5(e,C)||c&&Wy(e,j))return!1;const G=d.querySelector(`[aria-controls="${e.id}"]`);if(G){const W=gh(G);if(jT(C,W))return!1}const L=gh(e);return jT(C,L)?!1:!(n!=null&&n(j))}const y=new Set,x=ts(e==null?void 0:e.getRootNode());function A(C){function j(G){var fe,$;const L=u&&!Xy()?Ft:le=>le(),W=G!=null?G:C,ie=($=(fe=W==null?void 0:W.composedPath)==null?void 0:fe.call(W))!=null?$:[W==null?void 0:W.target];L(()=>{const le=x?ie[0]:ar(C);if(!(!e||!b(C,le))){if(s||a){const Z=oh(s,a);e.addEventListener(BT,Z,{once:!0})}zT(e,BT,{bubbles:!1,cancelable:!0,detail:{originalEvent:W,contextmenu:d4(W),focusable:T5(ie),target:le}})}})}C.pointerType==="touch"?(y.forEach(G=>G()),y.add(Vt(d,"click",j,{once:!0})),y.add(m.addEventListener("click",j,{once:!0})),y.add(p.addEventListener("click",j,{once:!0}))):j()}const v=new Set,w=setTimeout(()=>{v.add(Vt(d,"pointerdown",A,!0)),v.add(m.addEventListener("pointerdown",A,!0)),v.add(p.addEventListener("pointerdown",A,!0))},0);function k(C){(u?Ft:G=>G())(()=>{var W,ie;const G=(ie=(W=C==null?void 0:C.composedPath)==null?void 0:W.call(C))!=null?ie:[C==null?void 0:C.target],L=x?G[0]:ar(C);if(!(!e||!b(C,L))){if(r||a){const fe=oh(r,a);e.addEventListener(UT,fe,{once:!0})}zT(e,UT,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Sr(L),target:L}})}})}return Xy()||(v.add(Vt(d,"focusin",k,!0)),v.add(m.addEventListener("focusin",k,!0)),v.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(w),y.forEach(C=>C()),v.forEach(C=>C())}}function w5(e,t){const{defer:n}=t,r=n?Ft:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(_5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function zT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function S5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Vt(wr(e),"keydown",n,{capture:!0})}var $T="layer:request-dismiss",Yn={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=>Xs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Xs(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=>Yn.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];A5(e,$T,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),v5(e,$T,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function v5(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function A5(e,t,n){e.addEventListener(t,n,{once:!0})}var VT;function qT(){Yn.layers.forEach(({node:e})=>{e.style.pointerEvents=Yn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function N5(e){e.style.pointerEvents=""}function k5(e,t){const n=wr(e),r=[];return Yn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(VT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=L4(()=>{const c=s();return $t(c)?c:null},{timeout:1e3});a.then(c=>r.push(kl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Yn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=VT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function C5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){uh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};Yn.add(f),qT();function p(A){var w,k;const v=ar(A.detail.originalEvent);Yn.isBelowPointerBlockingLayer(e)||Yn.isInBranch(v)||((w=t.onPointerDownOutside)==null||w.call(t,A),(k=t.onInteractOutside)==null||k.call(t,A),!A.defaultPrevented&&(c&&console.log("onPointerDownOutside:",A.detail.originalEvent),r==null||r()))}function m(A){var w,k;const v=ar(A.detail.originalEvent);Yn.isInBranch(v)||((w=t.onFocusOutside)==null||w.call(t,A),(k=t.onInteractOutside)==null||k.call(t,A),!A.defaultPrevented&&(c&&console.log("onFocusOutside:",A.detail.originalEvent),r==null||r()))}function b(A){var v;Yn.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,A),!A.defaultPrevented&&r&&(A.preventDefault(),r()))}function y(A){var C;if(!e)return!1;const v=typeof u=="function"?u():u,w=Array.isArray(v)?v:[v],k=(C=t.persistentElements)==null?void 0:C.map(j=>j()).filter($t);return k&&w.push(...k),w.some(j=>Xs(j,A))||Yn.isInNestedLayer(e,A)}const x=[a?k5(e,t.persistentElements):void 0,S5(e,b),w5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{Yn.remove(e),qT(),N5(e),x.forEach(A=>A==null?void 0:A())}}function YT(e,t){const{defer:n}=t,r=n?Ft:a=>a(),s=[];return s.push(r(()=>{const a=Ws(e)?e():e;s.push(C5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var O5=Object.defineProperty,I5=(e,t,n)=>t in e?O5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xt=(e,t,n)=>I5(e,typeof t!="symbol"?t+"":t,n),WT={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()}},P5=[],R5=class{constructor(e,t){xt(this,"trapStack"),xt(this,"config"),xt(this,"doc"),xt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),xt(this,"portalContainers",new Set),xt(this,"listenerCleanups",[]),xt(this,"handleFocus",r=>{const s=ar(r),a=this.findContainerIndex(s,r)>=0;if(a||Sl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Aa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Aa(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),xt(this,"handlePointerDown",r=>{const s=ar(r);if(!(this.findContainerIndex(s,r)>=0)){if(Ra(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ra(this.config.allowOutsideClick,r)||r.preventDefault()}}),xt(this,"handleClick",r=>{const s=ar(r);this.findContainerIndex(s,r)>=0||Ra(this.config.clickOutsideDeactivates,r)||Ra(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),xt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;Pa(r)&&r.preventDefault(),this.tryFocus(a)}}),xt(this,"handleEscapeKey",r=>{L5(r)&&Ra(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),xt(this,"_mutationObserver"),xt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return n4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?r4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),xt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),xt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Sr(r)){const s=Ks(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;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}),xt(this,"tryFocus",r=>{if(r!==!1&&r!==Ks(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,D5(r)&&r.select()}}),xt(this,"deactivate",r=>{if(!this.state.active)return this;const s=H({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(),WT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),c=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{GT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),xt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),xt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),xt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),xt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),xt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),xt(this,"getNodeForOption",(r,{hasFallback:s=!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&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),xt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||ar(s);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Sr(u)&&!ns(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[m];c=Aa(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Pa(s)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Sr(u)&&!ns(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[m];c=Aa(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Pa(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||P5;const n=H({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Pa(r)&&!r.shiftKey},isKeyBackward(r){return Pa(r)&&r.shiftKey}},t);this.doc=n.document||wr(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=>{Z6(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:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Wy(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Zs(e,{getShadowRoot:this.config.getShadowRoot}),n=nT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let c=!1;for(let f=0;f<t.length;f++)if(Aa(t[f])>0){c=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(ns(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(ns(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:s,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 WT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?GT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Vt(this.doc,"focusin",this.handleFocus,!0),Vt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Vt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Vt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Vt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Vt(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=Ks(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Pa=e=>e.key==="Tab",Ra=(e,...t)=>typeof e=="function"?e(...t):e,L5=e=>!e.isComposing&&e.key==="Escape",GT=e=>setTimeout(e,0),D5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function XT(e,t={}){let n;const r=Ft(()=>{const s=typeof e=="function"?e():e;if(s){n=new R5(s,ce(H({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:wr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Dh="data-scroll-lock";function M5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function QT(e){const t=Js(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function KT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Dh))return;const u=QT(r)||QT(s),c=n.innerWidth-r.clientWidth;s.setAttribute(Dh,"");const d=()=>P4(r,"--scrollbar-width",`${c}px`),f=M5(r),p=()=>{const x={overflow:"hidden"};return!u&&c>0&&(x[f]=`${c}px`),kl(s,x)},m=()=>{var G,L;const{scrollX:x,scrollY:A,visualViewport:v}=n,w=(G=v==null?void 0:v.offsetLeft)!=null?G:0,k=(L=v==null?void 0:v.offsetTop)!=null?L:0,C={position:"fixed",overflow:"hidden",top:`${-(A-Math.floor(k))}px`,left:`${-(x-Math.floor(w))}px`,right:"0"};!u&&c>0&&(C[f]=`${c}px`);const j=kl(s,C);return()=>{j==null||j(),n.scrollTo({left:x,top:A,behavior:"instant"})}},b=[d(),vl()?m():p()];return()=>{b.forEach(x=>x==null?void 0:x()),s.removeAttribute(Dh)}}var F5=is("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Cr=F5.build(),JT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},ZT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Mh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},B5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Fh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Bh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},U5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},tb=e=>e.getById(JT(e)),lo=e=>e.getById(ZT(e)),co=e=>e.getById(Mh(e)),nb=e=>e.getById(eb(e)),H5=e=>e.getById(Fh(e)),j5=e=>e.getById(Bh(e));function z5(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),b=l5(ce(H({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(ce(H({id:B5(c)},Cr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(ce(H({},Cr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(ce(H({},Cr.anchor.attrs),{dir:u("dir"),id:JT(c)}))},getTriggerProps(){return t.button(ce(H({},Cr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:ZT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Mh(c),onPointerDown(y){Qy(y)&&l4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(ce(H({},Cr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ce(H({id:eb(c)},Cr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(ce(H({},Cr.content.attrs),{dir:u("dir"),id:Mh(c),tabIndex:-1,role:"dialog","aria-modal":Vy(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Gs(d),"aria-labelledby":m.title?Fh(c):void 0,"aria-describedby":m.description?Bh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(ce(H({},Cr.title.attrs),{id:Fh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ce(H({},Cr.description.attrs),{id:Bh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ce(H({},Cr.closeTrigger.attrs),{dir:u("dir"),id:U5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var $5={props({props:e}){return ce(H({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:H({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=tb(n))!=null?a:lo(n);return DT(r,()=>nb(n),ce(H({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>co(n);let s=!0;return YT(r,{type:"popover",pointerBlocking:t("modal"),exclude:lo(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&&(s=!(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:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:O4(()=>co(t),{triggerElement:lo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?FT(()=>[co(t),lo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return KT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?XT(()=>co(t),{initialFocus:()=>rT({root:co(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=tb(n))!=null?u:lo(n);DT(s,()=>nb(n),ce(H(H({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Ft(()=>{Object.assign(e.get("renderedElements"),{title:!!H5(t),description:!!j5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Ft(()=>{const n=rT({root:co(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Ft(()=>{const a=lo(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})}}}};no()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[K7,$l]=rs({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[J7,Uh]=rs({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),V5=e=>{const t=B.useId(),{getRootNode:n}=$l(),{dir:r}=Uh(),s=H({id:t,dir:r,getRootNode:n},e),a=Ol($5,s);return z5(a,Th)},q5=e=>{const[t,u]=fT(e),c=u,{children:n}=c,r=En(c,["children"]),s=V5(r),a=_h(Bt({present:s.open},t));return _.jsx(q4,{value:s,children:_.jsx(lT,{value:a,children:n})})},rb=B.forwardRef((e,t)=>{const n=xh(),r=Na(),s=Bt(ce(H({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(an.button,ce(H({},s),{ref:t}))});rb.displayName="PopoverTrigger";function Y5(e){return at({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function W5(e){return at({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function ib(e){return at({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function sb(e){return at({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function G5(e){return at({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function X5(e){return at({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function Hh(e){return at({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function ob(e){return at({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const Q5=({className:e,componentType:t,children:n})=>{const[r,s]=B.useState(!1),{globalClassName:a}=ut(),u=f=>{s(f.open)},c=B.useCallback(()=>{s(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return _.jsxs(q5,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(rb,{"aria-label":`Overflow menu for ${t}`,className:F(`${O}-overflow-menu-button-trigger`,`${O}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(ob,{})}),_.jsx(dT,{children:_.jsx(cT,{className:F(`${O}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(My.Provider,{value:d,children:n})})})]})};function ab(e){return at({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function ub(e){return at({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[K5,as]=rs({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),jh=B.forwardRef((e,t)=>{const n=as(),r=Bt(n.getControlProps(),e);return _.jsx(an.div,ce(H(H({},r),e),{ref:t}))});jh.displayName="CarouselControl";const zh=B.forwardRef((e,t)=>{const[n,r]=ka()(e,["readOnly","index"]),s=as(),a=Bt(s.getIndicatorProps(n),r);return _.jsx(an.button,ce(H({},a),{ref:t}))});zh.displayName="CarouselIndicator";const $h=B.forwardRef((e,t)=>{const n=as(),r=Bt(n.getIndicatorGroupProps(),e);return _.jsx(an.div,ce(H({},r),{ref:t}))});$h.displayName="CarouselIndicatorGroup";const Vh=B.forwardRef((e,t)=>{const[n,r]=ka()(e,["index","snapAlign"]),s=as(),a=Bt(s.getItemProps(n),r);return _.jsx(an.div,ce(H({},a),{ref:t}))});Vh.displayName="CarouselItem";const qh=B.forwardRef((e,t)=>{const n=as(),r=Bt(n.getItemGroupProps(),e);return _.jsx(an.div,ce(H({},r),{ref:t}))});qh.displayName="CarouselItemGroup";const Yh=B.forwardRef((e,t)=>{const n=as(),r=Bt(n.getNextTriggerProps(),e);return _.jsx(an.button,ce(H({},r),{ref:t}))});Yh.displayName="CarouselNextTrigger";const Wh=B.forwardRef((e,t)=>{const n=as(),r=Bt(n.getPrevTriggerProps(),e);return _.jsx(an.button,ce(H({},r),{ref:t}))});Wh.displayName="CarouselPrevTrigger";function J5(e){const t=Js(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(b,y){let x=parseFloat(b);return/%/.test(b)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=c(r,n.width),f=c(s,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function Z5(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 lb(e){let t=[];for(const n of e.children)t=t.concat(n,lb(n));return t}function cb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?lb(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!Z5(n,m,u))continue;const b=Js(p);let[y,x]=b.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const A=a==="x"?x:y,v=m[c]-n[c]+e[f];switch(A){case"none":break;case"start":r[a].start.push({node:p,position:v});break;case"center":r[a].center.push({node:p,position:v+m[d]/2});break;case"end":r[a].end.push({node:p,position:v+m[d]});break}}}return r}function db(e){const t=e.getBoundingClientRect(),n=J5(e),r=cb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:fb([...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(hb(0,s.x))),y:fb([...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(hb(0,s.y)))}}function eD(e,t,n){const r=cb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var fb=e=>[...new Set(e)],hb=(e,t)=>n=>Math.max(e,Math.min(t,n)),tD=is("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),$r=tD.build(),nD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},rD=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},Vl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},iD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},sD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},oD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},pb=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},Sn=e=>e.getById(Vl(e)),mb=e=>I4(Sn(e),"[data-part=item]"),aD=(e,t)=>e.getById(pb(e,t)),gb=e=>{const t=Sn(e);if(!t)return;const n=Zs(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function uD(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),b=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),A=c("slidesPerPage"),v=c("padding"),w=c("translations");return{isPlaying:d,isDragging:f,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return x/y.length},scrollToIndex(k,C){a({type:"INDEX.SET",index:k,instant:C})},scrollTo(k,C){a({type:"PAGE.SET",index:k,instant:C})},scrollNext(k){a({type:"PAGE.NEXT",instant:k})},scrollPrev(k){a({type:"PAGE.PREV",instant:k})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(k){return Array.from(r.get("slidesInView")).includes(k)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(ce(H({},$r.root.attrs),{id:nD(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":A,"--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(ce(H({},$r.itemGroup.attrs),{id:Vl(u),"data-orientation":c("orientation"),"data-dragging":Gs(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(k){Xs(k.currentTarget,ar(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){Xs(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!c("allowMouseDrag")||!Qy(k))return;const C=ar(k);Sr(C)&&C!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:I6(k=>{const C=c("orientation")==="horizontal"?"deltaX":"deltaY";k[C]<0&&!s("canScrollPrev")||k[C]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:v,[b?"paddingInline":"paddingBlock"]:v,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const C=r.get("slidesInView").includes(k.index);return t.element(ce(H({},$r.item.attrs),{id:rD(u,k.index),dir:c("dir"),role:"group","data-index":k.index,"data-inview":Gs(C),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":w.item(k.index,c("slideCount")),"aria-hidden":Vy(!C),style:{scrollSnapAlign:(()=>{var ie;const j=(ie=k.snapAlign)!=null?ie:"start",G=c("slidesPerMove"),L=G==="auto"?Math.floor(c("slidesPerPage")):G;return(k.index+L)%L===0?j:void 0})()}}))},getControlProps(){return t.element(ce(H({},$r.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(ce(H({},$r.prevTrigger.attrs),{id:sD(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":w.prevTrigger,"data-orientation":c("orientation"),"aria-controls":Vl(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ce(H({},$r.nextTrigger.attrs),{dir:c("dir"),id:iD(u),type:"button","aria-label":w.nextTrigger,"data-orientation":c("orientation"),"aria-controls":Vl(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ce(H({},$r.indicatorGroup.attrs),{dir:c("dir"),id:oD(u),"data-orientation":c("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const C="indicator",j={ArrowDown(W){b||(a({type:"PAGE.NEXT",src:C}),W.preventDefault())},ArrowUp(W){b||(a({type:"PAGE.PREV",src:C}),W.preventDefault())},ArrowRight(W){b&&(a({type:"PAGE.NEXT",src:C}),W.preventDefault())},ArrowLeft(W){b&&(a({type:"PAGE.PREV",src:C}),W.preventDefault())},Home(W){a({type:"PAGE.SET",index:0,src:C}),W.preventDefault()},End(W){a({type:"PAGE.SET",index:y.length-1,src:C}),W.preventDefault()}},G=p4(k,{dir:c("dir"),orientation:c("orientation")}),L=j[G];L==null||L(k)}}))},getIndicatorProps(k){return t.button(ce(H({},$r.indicator.attrs),{dir:c("dir"),id:pb(u,k.index),type:"button","data-orientation":c("orientation"),"data-index":k.index,"data-readonly":Gs(k.readOnly),"data-current":Gs(k.index===x),"aria-label":w.indicator(k.index),onClick(C){C.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ce(H({},$r.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":Gs(d),"aria-label":d?w.autoplayStop:w.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var lD={props({props:e}){return F6(e,["slideCount"],"carousel"),ce(H({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:H({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:cD(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 b6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({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(Sn(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=Sn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),gb(e)});return gb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Sn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Ft(()=>{s(),Ft(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return mb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Sn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var b;const p=f.target,m=Number((b=p.dataset.index)!=null?b:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?m6(d,m):g6(d,m)},n.get("slidesInView"));n.set("slidesInView",E6(c))},{root:r,threshold:t("inViewThreshold")});return mb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Sn(n);return r?Vt(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 Vt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return k4(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 Vt(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:s}){var f;const a=t.instant?"instant":"smooth",u=zy((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=Sn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";s(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Sn(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=Uy(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=y6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Sn(r);if(!s)return;const a=eD(s,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=zy(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Sn(n);if(!r)return;const s=db(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Sn(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=Sn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Sn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=db(r),c=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);Ft(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=aD(n,e.get("page"));r&&Ft(()=>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 cD(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}no()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),no()(["index","readOnly"]),no()(["index","snapAlign"]);const dD=e=>{const t=B.useId(),{getRootNode:n}=$l(),{dir:r}=Uh(),s=H({id:t,dir:r,getRootNode:n},e),a=Ol(lD,s);return uD(a,Th)},Gh=B.forwardRef((e,t)=>{const[n,r]=ka()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=dD(n),a=Bt(s.getRootProps(),r);return _.jsx(K5,{value:s,children:_.jsx(an.div,ce(H({},a),{ref:t}))})});Gh.displayName="CarouselRoot";const fD=180,hD=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},pD=({globalClassName:e,className:t,itemMinWidth:n=fD,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ie,fe)=>({node:ie,key:B.isValidElement(ie)&&ie.key!=null?ie.key:`carousel-item-${fe}`})),b=m.length,y=B.useRef(null),[x,A]=B.useState(0),{width:v}=oN();B.useLayoutEffect(()=>{y.current&&A(y.current.getBoundingClientRect().width)},[v,b]);const w=hD(r),k=n+w,C=x>0?(x+w)/k:1,j=Math.max(1,Math.floor(C));if(b===0)return null;const G=b>j,L=Math.ceil(b/j),W=G?Math.max(1,C):j;return _.jsxs(Gh,{ref:y,className:F(e,t,`${O}-carousel`),slidesPerPage:W,slidesPerMove:j,spacing:r,loop:s,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":f,children:[_.jsx(qh,{className:F(e,`${O}-carousel__item-group`,{"carousel-row-container":!G}),children:m.map(({node:ie,key:fe},$)=>_.jsx(Vh,{index:$,className:F(e,`${O}-carousel__item`),children:ie},fe))}),c&&G&&_.jsxs(jh,{className:F(e,`${O}-carousel__control`),children:[_.jsx(Wh,{className:F(e,`${O}-carousel__prev-trigger`),"aria-label":"Previous slide",children:_.jsx(ib,{size:"16px"})}),_.jsx(Yh,{className:F(e,`${O}-carousel__next-trigger`),"aria-label":"Next slide",children:_.jsx(sb,{size:"16px"})})]}),u&&G&&_.jsx($h,{className:F(e,`${O}-carousel__indicator-group`),children:Array.from({length:L},(ie,fe)=>_.jsx(zh,{index:fe,className:F(e,`${O}-carousel__indicator`),"aria-label":`Go to slide group ${fe+1}`},fe))})]})},mD=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:F(e,`${O}-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"})})}),[gD,ED]=rs({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),yD=e=>ka()(e,["lazyMount","unmountOnExit"]),[TD,La]=rs({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Eb=B.forwardRef((e,t)=>{const n=La(),r=ED(),s=_h(ce(H({},r),{present:n.open})),a=Bt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:_.jsx(an.div,ce(H({},a),{ref:Il(s.ref,t)}))});Eb.displayName="DialogBackdrop";const Xh=B.forwardRef((e,t)=>{const n=La(),r=Na(),s=Bt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(an.div,ce(H({},s),{ref:Il(r.ref,t)}))});Xh.displayName="DialogContent";const Qh=B.forwardRef((e,t)=>{const n=La(),r=Bt(n.getDescriptionProps(),e);return _.jsx(an.div,ce(H({},r),{ref:t}))});Qh.displayName="DialogDescription";const Kh=B.forwardRef((e,t)=>{const n=La(),r=Bt(n.getPositionerProps(),e);return Na().unmounted?null:_.jsx(an.div,ce(H({},r),{ref:t}))});Kh.displayName="DialogPositioner";var bD=is("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),us=bD.build(),yb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Tb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},bb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},ql=e=>e.getById(Jh(e)),xD=e=>e.getById(yb(e)),_D=e=>e.getById(Tb(e)),wD=e=>e.getById(bb(e)),SD=e=>e.getById(Zh(e)),vD=e=>e.getById(ep(e)),AD=e=>e.getById(xb(e));function ND(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ce(H({},us.trigger.attrs),{dir:a("dir"),id:bb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Jh(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ce(H({},us.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Tb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ce(H({},us.positioner.attrs),{dir:a("dir"),id:yb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(ce(H({},us.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Jh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:Zh(u),"aria-describedby":f.description?ep(u):void 0}))},getTitleProps(){return t.element(ce(H({},us.title.attrs),{dir:a("dir"),id:Zh(u)}))},getDescriptionProps(){return t.element(ce(H({},us.description.attrs),{dir:a("dir"),id:ep(u)}))},getCloseTriggerProps(){return t.button(ce(H({},us.closeTrigger.attrs),{dir:a("dir"),id:xb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var kD={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>AD(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return H({role:"dialog",modal:s,trapFocus:s,preventScroll:s,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 YT(()=>ql(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[wD(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return KT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?XT(()=>ql(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?FT(()=>[ql(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Ft(()=>{e.set("rendered",{title:!!SD(t),description:!!vD(t)})})},syncZIndex({scope:e}){Ft(()=>{const t=ql(e);if(!t)return;const n=Js(t);[xD(e),_D(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.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})}}}};no()(["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 CD=e=>{const t=B.useId(),{getRootNode:n}=$l(),{dir:r}=Uh(),s=H({id:t,getRootNode:n,dir:r},e),a=Ol(kD,s);return ND(a,Th)},_b=e=>{const[t,c]=fT(e),d=c,{children:n}=d,r=En(d,["children"]),[s]=yD(t),a=CD(r),u=_h(Bt({present:a.open},t));return _.jsx(TD,{value:a,children:_.jsx(gD,{value:s,children:_.jsx(lT,{value:u,children:n})})})},wb=B.forwardRef((e,t)=>{const n=La(),r=Bt(n.getTitleProps(),e);return _.jsx(an.h2,ce(H({},r),{ref:t}))});wb.displayName="DialogTitle";const OD=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=B.useMemo(()=>({isOpen:t}),[t]);return _.jsx(sh.Provider,{value:r,children:_.jsx(Dy.Provider,{value:s,children:e})})},Sb=()=>B.useContext(Dy),vb=()=>{const e=B.useContext(sh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},ID=`${O}-overflow-menu-button-trigger`,PD=({componentType:e,children:t})=>{const{isOpen:n}=Sb(),{closeMenu:r}=vb(),{globalClassName:s}=ut(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${ID}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?_.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:F(`${O}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},RD=({componentType:e,className:t})=>{const{toggleMenu:n}=vb(),{isOpen:r}=Sb(),{globalClassName:s}=ut();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:F(`${O}-overflow-menu-button-trigger`,`${O}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:_.jsx(ob,{})})};class LD{constructor(){Xe(this,"initialState",Mg);Xe(this,"promptsStateProxy");Xe(this,"promptsParamsProxy");Xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return FD(n,r),Reflect.set(t,n,r)});Xe(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Xe(this,"updatePromptsParamsProxy",t=>new Proxy(H({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const pi=new LD,DD=e=>{window.addEventListener(rf,e)},MD=e=>{window.removeEventListener(rf,e)},FD=(e,t)=>{const n=new CustomEvent(rf,{detail:{property:e,value:t}});window.dispatchEvent(n)},Ab=e=>{const t=pi.isOpen,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isOpen=n},BD=e=>{const t=pi.isInline,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isInline=n},UD=({elementId:e,entryType:t,params:n,isInline:r})=>{pi.promptsStateProxy.elementId=e,t&&(pi.promptsStateProxy.entryType=t),typeof r=="boolean"&&BD(r),n&&pi.updatePromptsParamsProxy(n),pi.isOpen||Ab(!0)},HD=()=>{const e=B.useContext(Bg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},Yl=()=>{const e=B.useContext(Fg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},jD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),{previousComponentType:r}=ri(),s=Ys(),a=()=>{Gu(r||"dialog"),s()};return t?_.jsx(ir,{className:F(n,`${O}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(ab,{})}):_.jsxs("button",{className:F(n,`${O}-overflow-menu-button`,`${O}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(ab,{}),"Show ",r||"dialog"]})},zD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),{isModalFullscreen:r}=ri(),s=Ys(),a=()=>{sf(!r),s()},u=r?UN:HN,c="Toggle Fullscreen";return t?_.jsx(ir,{ariaLabel:c,title:c,className:F(n,`${O}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:F(n,`${O}-overflow-menu-button`,`${O}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),c]})},$D=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),{dialogPosition:r}=ri(),s=Ys(),a=r==="bottom-left",u=()=>{of(a?"bottom-right":"bottom-left"),s()},c=a?W5:Y5,d=a?"Move right":"Move left";return t?_.jsx(ir,{className:F(n,`${O}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(c,{})}):_.jsxs("button",{className:F(n,`${O}-overflow-menu-button`,`${O}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(c,{}),d]})},Nb=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:c}=ut(),{mode:d}=ri(),f=u==="messaging"&&c&&!!r,p=d==="standalone",m=e==="modal",b=m?jD:Ob,y=m?zD:$D,x=B.useMemo(()=>s?PN(s):{},[s]);return _.jsx(OD,{children:_.jsxs("div",{className:F(a,`${O}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:F(a,`${O}-${e}-header`,{standalone:p,embedded:!p}),style:x,children:[(s==null?void 0:s.logoUrl)&&_.jsx("img",{alt:"",role:"img",className:F(a,`${O}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),_.jsx(wb,{className:F(a,`${O}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),_.jsxs("div",{className:F(a,`${O}-${e}-controls`),children:[_.jsx(b,{componentType:e,isIcon:!0}),_.jsx(RD,{componentType:e}),_.jsx(mD,{className:F(a,`cim-${e}-component`),onClick:n})]})]}),_.jsxs(PD,{componentType:e,children:[_.jsx(y,{componentType:e}),_.jsx(GD,{componentType:e}),_.jsx(Fy,{componentType:e,onClearChat:t}),f&&_.jsx(By,{componentType:e,onDownloadTranscript:r})]})]})})},Wl="USD",Vr=(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}`}},VD=({retailPrice:e,discountPrice:t,currencyCode:n=Wl})=>{const r=n||Wl,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:Vr(a,r),comparePrice:Vr(u,r),hasDiscount:s}},kb=e=>typeof e=="number"&&Number.isFinite(e),qD=({priceBreakdown:e,currencyCode:t=Wl})=>{if(!e)return null;const n=t||Wl,r=[e.sales,e.original],s=r.map(p=>p==null?void 0:p.min).filter(kb),a=r.map(p=>p==null?void 0:p.max).filter(kb);if(s.length===0||a.length===0)return null;const u=Math.min(...s),c=Math.max(...a);if(u===c)return null;const d=Vr(u,n),f=Vr(c,n);return d===null||f===null?null:{range:`${d} – ${f}`,low:d,high:f}},tp=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:c,hasDiscount:d}=VD({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return _.jsxs("div",{className:F(s,a,`${O}-price`),style:f,children:[_.jsx("span",{className:F(s,`${O}-price__amount`),children:u}),d&&c&&_.jsx("span",{className:F(s,`${O}-price__compare`),children:c})]})},YD={sparkle:Hh,plus:G5,"paper-plane":X5},Cb=({icon:e,className:t})=>{const n=YD[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},WD=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=ut(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=x=>()=>{a(x)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},b=x=>_.jsxs(_.Fragment,{children:[c&&_.jsx(Cb,{icon:c,className:`${O}-suggestion-button-icon`}),_.jsx("span",{children:x})]});return _.jsx("div",{className:F(t,`${O}-suggestion-container ${f}`,e),children:n.map(x=>s?_.jsx(Ku,{disabled:r,className:F(t,`${O}-suggestion-button standalone`,m),onClick:p(x),children:b(x)},x):_.jsx("button",{disabled:r,className:F(t,`${O}-suggestion-button embedded`,m),onClick:p(x),children:b(x)},x))})},GD=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ut();if(!r)return null;const s=()=>{Br(!1),Wu(!0)};return t?_.jsx(ir,{className:F(n,`${O}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:_.jsx(e1,{})}):_.jsxs("button",{className:F(n,`${O}-overflow-menu-button`,`${O}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(e1,{}),"Minimize"]})},Ob=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),r=Ys(),s=()=>{Gu("modal"),r()};return t?_.jsx(ir,{className:F(n,`${O}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:_.jsx(ub,{})}):_.jsxs("button",{className:F(n,`${O}-overflow-menu-button`,`${O}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(ub,{}),"Show modal"]})},XD=["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"],QD=3e3,KD=400,JD=({globalClassName:e,isWidgetStandalone:t,messages:n=XD})=>{const[r,s]=B.useState(0),[a,u]=B.useState(!0);return B.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},KD)},QD);return()=>{clearInterval(d),clearTimeout(c)}},[n.length]),_.jsxs("div",{className:F(e,`${O}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[_.jsxs("div",{className:`${O}-connecting-pulse-wrapper`,children:[_.jsx("div",{className:`${O}-connecting-pulse`}),_.jsx("div",{className:`${O}-connecting-ring`})]}),_.jsx("span",{className:F(`${O}-connecting-text`,a&&`${O}-connecting-text--visible`),children:n[r]})]})},ZD=({shouldShow:e,loadingText:t})=>e?_.jsx("span",{className:`${O}-processing-text`,children:t}):null,e8=({shouldShow:e})=>e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:`${O}-processing-shimmer-bar`}),_.jsx("div",{className:`${O}-processing-shimmer-bar`}),_.jsx("div",{className:`${O}-processing-shimmer-bar`})]}):null,np=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>_.jsxs("div",{className:F(e,`${O}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[_.jsx(ZD,{shouldShow:!!n,loadingText:n}),_.jsx(e8,{shouldShow:!n})]});function Ib(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function t8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function n8(e,t,n){const s=ul((n||{}).ignore||[]),a=r8(t);let u=-1;for(;++u<a.length;)mE(e,"text",c);function c(f,p){let m=-1,b;for(;++m<p.length;){const y=p[m],x=b?b.children:void 0;if(s(y,x?x.indexOf(y):void 0,b))return;b=y}if(b)return d(f,p)}function d(f,p){const m=p[p.length-1],b=a[u][0],y=a[u][1];let x=0;const v=m.children.indexOf(f);let w=!1,k=[];b.lastIndex=0;let C=b.exec(f.value);for(;C;){const j=C.index,G={index:C.index,input:C.input,stack:[...p,f]};let L=y(...C,G);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?b.lastIndex=j+1:(x!==j&&k.push({type:"text",value:f.value.slice(x,j)}),Array.isArray(L)?k.push(...L):L&&k.push(L),x=j+C[0].length,w=!0),!b.global)break;C=b.exec(f.value)}return w?(x<f.value.length&&k.push({type:"text",value:f.value.slice(x)}),m.children.splice(v,1,...k)):k=[f],v+k.length}}function r8(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 s=n[r];t.push([i8(s[0]),s8(s[1])])}return t}function i8(e){return typeof e=="string"?new RegExp(t8(e),"g"):e}function s8(e){return typeof e=="function"?e:function(){return e}}const rp="phrasing",ip=["autolink","link","image","label"];function o8(){return{transforms:[h8],enter:{literalAutolink:u8,literalAutolinkEmail:sp,literalAutolinkHttp:sp,literalAutolinkWww:sp},exit:{literalAutolink:f8,literalAutolinkEmail:d8,literalAutolinkHttp:l8,literalAutolinkWww:c8}}}function a8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:rp,notInConstruct:ip},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:rp,notInConstruct:ip},{character:":",before:"[ps]",after:"\\/",inConstruct:rp,notInConstruct:ip}]}}function u8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function sp(e){this.config.enter.autolinkProtocol.call(this,e)}function l8(e){this.config.exit.autolinkProtocol.call(this,e)}function c8(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 d8(e){this.config.exit.autolinkEmail.call(this,e)}function f8(e){this.exit(e)}function h8(e){n8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,p8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),m8]],{ignore:["link","linkReference"]})}function p8(e,t,n,r,s){let a="";if(!Pb(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!g8(n)))return!1;const u=E8(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 m8(e,t,n,r){return!Pb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function g8(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 E8(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 s=Ib(e,"(");let a=Ib(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Pb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Gi(n)||tl(n))&&(!t||n!==47)}Rb.peek=A8;function y8(){this.buffer()}function T8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function b8(){this.buffer()}function x8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function _8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=sr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function w8(e){this.exit(e)}function S8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=sr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function v8(e){this.exit(e)}function A8(){return"["}function Rb(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=s.move("]"),a}function N8(){return{enter:{gfmFootnoteCallString:y8,gfmFootnoteCall:T8,gfmFootnoteDefinitionLabelString:b8,gfmFootnoteDefinition:x8},exit:{gfmFootnoteCallString:_8,gfmFootnoteCall:w8,gfmFootnoteDefinitionLabelString:S8,gfmFootnoteDefinition:v8}}}function k8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Rb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
38
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?Lb:C8))),f(),d}}function C8(e,t,n){return t===0?e:Lb(e,t,n)}function Lb(e,t,n){return(n?"":" ")+e}const O8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Db.peek=D8;function I8(){return{canContainEols:["delete"],enter:{strikethrough:R8},exit:{strikethrough:L8}}}function P8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:O8}],handlers:{delete:Db}}}function R8(e){this.enter({type:"delete",children:[]},e)}function L8(e){this.exit(e)}function Db(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,ce(H({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function D8(){return"~"}function M8(e){return e.length}function F8(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||M8,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const A=[],v=[];let w=-1;for(e[p].length>f&&(f=e[p].length);++w<e[p].length;){const k=B8(e[p][w]);if(n.alignDelimiters!==!1){const C=s(k);v[w]=C,(d[w]===void 0||C>d[w])&&(d[w]=C)}A.push(k)}u[p]=A,c[p]=v}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=Mb(r[m]);else{const A=Mb(r);for(;++m<f;)a[m]=A}m=-1;const b=[],y=[];for(;++m<f;){const A=a[m];let v="",w="";A===99?(v=":",w=":"):A===108?v=":":A===114&&(w=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[m]-v.length-w.length);const C=v+"-".repeat(k)+w;n.alignDelimiters!==!1&&(k=v.length+k+w.length,k>d[m]&&(d[m]=k),y[m]=k),b[m]=C}u.splice(1,0,b),c.splice(1,0,y),p=-1;const x=[];for(;++p<u.length;){const A=u[p],v=c[p];m=-1;const w=[];for(;++m<f;){const k=A[m]||"";let C="",j="";if(n.alignDelimiters!==!1){const G=d[m]-(v[m]||0),L=a[m];L===114?C=" ".repeat(G):L===99?G%2?(C=" ".repeat(G/2+.5),j=" ".repeat(G/2-.5)):(C=" ".repeat(G/2),j=C):j=" ".repeat(G)}n.delimiterStart!==!1&&!m&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&w.push(" "),n.alignDelimiters!==!1&&w.push(C),w.push(k),n.alignDelimiters!==!1&&w.push(j),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&w.push("|")}x.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return x.join(`
39
+ `)}function B8(e){return e==null?"":String(e)}function Mb(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 U8(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),H8);return s(),u}function H8(e,t,n){return">"+(n?"":" ")+e}function j8(e,t){return Fb(e,t.inConstruct,!0)&&!Fb(e,t.notInConstruct,!1)}function Fb(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 Bb(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
40
+ `&&j8(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
+ `}function z8(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>u&&(u=a):a=1,s=r+t.length,r=n.indexOf(t,s);return u}function $8(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 V8(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 q8(e,t,n,r){const s=V8(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if($8(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,Y8);return m(),b}const c=n.createTracker(r),d=s.repeat(Math.max(z8(a,s)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,H({before:p,after:" ",encode:["`"]},c.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,H({before:p,after:`
42
+ `,encode:["`"]},c.current()))),m()}return p+=c.move(`
43
+ `),a&&(p+=c.move(a+`
44
+ `)),p+=c.move(d),f(),p}function Y8(e,t,n){return(n?"":" ")+e}function op(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 W8(e,t,n,r){const s=op(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),H({before:f,after:"]"},d.current()))),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,H({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({before:f,after:e.title?" ":`
45
+ `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,H({before:f,after:s},d.current()))),f+=d.move(s),c()),u(),f}function G8(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 Da(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Gl(e,t,n){const r=Hs(e),s=Hs(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ub.peek=X8;function Ub(e,t,n,r){const s=G8(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(s);let d=u.move(n.containerPhrasing(e,H({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=Gl(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Da(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=Gl(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Da(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function X8(e,t,n){return n.options.emphasis||"*"}function Q8(e,t){let n=!1;return cl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Pf}),!!((!e.depth||e.depth<3)&&xf(e)&&(t.options.setext||n))}function K8(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Q8(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,ce(H({},a.current()),{before:`
46
46
  `,after:`
47
- `}));return m(),p(),T+`
48
- `+(s===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
49
- `))+1))}const u="#".repeat(s),l=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,U({before:"# ",after:`
50
- `},a.current()));return/^[\t ]/.test(f)&&(f=Oa(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}Bb.peek=q8;function Bb(e){return e.value||""}function q8(){return"<"}Ub.peek=Y8;function Ub(e,t,n,r){const s=ip(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,U({before:f,after:"]"},d.current()))),f+=d.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,U({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,U({before:f,after:e.title?" ":")"},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,U({before:f,after:s},d.current()))),f+=d.move(s),l()),f+=d.move(")"),u(),f}function Y8(){return"!"}Hb.peek=W8;function Hb(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("![");const f=n.safe(e.alt,U({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),U({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function W8(){return"!"}jb.peek=G8;function jb(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";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],l=n.compilePattern(u);let d;if(u.atBreak)for(;d=l.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function G8(){return"`"}function zb(e,t){const n=Tf(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))}$b.peek=X8;function $b(e,t,n,r){const s=ip(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(zb(e,n)){const p=n.stack;n.stack=[],l=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,U({before:m,after:">"},u.current()))),m+=u.move(">"),l(),n.stack=p,m}l=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,U({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,U({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,U({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,U({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),l(),f}function X8(e,t,n){return zb(e,n)?"<":"["}Vb.peek=Q8;function Vb(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("[");const f=n.containerPhrasing(e,U({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),U({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function Q8(){return"["}function sp(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 K8(e){const t=sp(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 J8(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 qb(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 Z8(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?J8(n):sp(n);const l=e.ordered?u==="."?")":".":K8(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),qb(n)===u&&p){let m=-1;for(;++m<e.children.length;){const T=e.children[m];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=l),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function eM(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 tM(e,t,n,r){const s=eM(n);let a=n.bulletCurrent||sp(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;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(u-a.length)),l.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),p);return d(),f;function p(m,T,y){return T?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function nM(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const rM=rl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function iM(e,t,n,r){return(e.children.some(function(u){return rM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function sM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Yb.peek=oM;function Yb(e,t,n,r){const s=sM(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(s+s);let d=u.move(n.containerPhrasing(e,U({after:s,before:l},u.current())));const f=d.charCodeAt(0),p=$l(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Oa(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=$l(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+Oa(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function oM(e,t,n){return n.options.strong||"*"}function aM(e,t,n,r){return n.safe(e.value,r)}function uM(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 lM(e,t,n){const r=(qb(n)+(n.options.ruleSpaces?" ":"")).repeat(uM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Wb={blockquote:P8,break:Mb,code:B8,definition:H8,emphasis:Fb,hardBreak:Mb,heading:V8,html:Bb,image:Ub,imageReference:Hb,inlineCode:jb,link:$b,linkReference:Vb,list:Z8,listItem:tM,paragraph:nM,root:iM,strong:Yb,text:aM,thematicBreak:lM};function cM(){return{enter:{table:dM,tableData:Gb,tableHeader:Gb,tableRow:hM},exit:{codeText:pM,table:fM,tableData:op,tableHeader:op,tableRow:op}}}function dM(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 fM(e){this.exit(e),this.data.inTable=void 0}function hM(e){this.enter({type:"tableRow",children:[]},e)}function op(e){this.exit(e)}function Gb(e){this.enter({type:"tableCell",children:[]},e)}function pM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,mM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function mM(e,t){return t==="|"?t:e}function gM(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=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:l}};function u(y,x,v,A){return f(p(y,v,A),y.align)}function l(y,x,v,A){const S=m(y,v,A),k=f([S]);return k.slice(0,k.indexOf(`
52
- `))}function d(y,x,v,A){const S=v.enter("tableCell"),k=v.enter("phrasing"),I=v.containerPhrasing(y,ue(U({},A),{before:a,after:a}));return k(),S(),I}function f(y,x){return O8(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function p(y,x,v){const A=y.children;let S=-1;const k=[],I=x.enter("table");for(;++S<A.length;)k[S]=m(A[S],x,v);return I(),k}function m(y,x,v){const A=y.children;let S=-1;const k=[],I=x.enter("tableRow");for(;++S<A.length;)k[S]=d(A[S],y,x,v);return I(),k}function T(y,x,v){let A=Wb.inlineCode(y,x,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function EM(){return{exit:{taskListCheckValueChecked:Xb,taskListCheckValueUnchecked:Xb,paragraph:TM}}}function yM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:bM}}}function Xb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function TM(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 s=t.children;let a=-1,u;for(;++a<s.length;){const l=s[a];if(l.type==="paragraph"){u=l;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 bM(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(u);let d=Wb.listItem(e,t,n,U(U({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function _M(){return[ZD(),b8(),S8(),cM(),EM()]}function xM(e){return{extensions:[e8(),_8(e),v8(),gM(e),yM()]}}const wM={tokenize:CM,partial:!0},Qb={tokenize:OM,partial:!0},Kb={tokenize:IM,partial:!0},Jb={tokenize:PM,partial:!0},SM={tokenize:RM,partial:!0},Zb={name:"wwwAutolink",tokenize:NM,previous:t_},e_={name:"protocolAutolink",tokenize:kM,previous:n_},qr={name:"emailAutolink",tokenize:AM,previous:r_},Cr={};function vM(){return{text:Cr}}let us=48;for(;us<123;)Cr[us]=qr,us++,us===58?us=65:us===91&&(us=97);Cr[43]=qr,Cr[45]=qr,Cr[46]=qr,Cr[95]=qr,Cr[72]=[qr,e_],Cr[104]=[qr,e_],Cr[87]=[qr,Zb],Cr[119]=[qr,Zb];function AM(e,t,n){const r=this;let s,a;return u;function u(m){return!ap(m)||!r_.call(r,r.previous)||up(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return ap(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(SM,p,f)(m):m===45||m===95||tn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&dn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function NM(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!t_.call(r,r.previous)||up(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(wM,e.attempt(Qb,e.attempt(Kb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function kM(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&n_.call(r,r.previous)&&!up(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(dn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const T=s.toLowerCase();if(T==="http"||T==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||Xu(m)||dt(m)||Wi(m)||Qu(m)?n(m):e.attempt(Qb,e.attempt(Kb,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function CM(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function OM(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(Jb,d,l)(f):f===null||dt(f)||Wi(f)||f!==45&&Qu(f)?d(f):(a=!0,e.consume(f),u)}function l(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function IM(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):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(Jb,t,a)(u):u===null||dt(u)||Wi(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function PM(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),s):l===60||l===null||dt(l)||Wi(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||dt(l)||Wi(l)?t(l):r(l)}function a(l){return dn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):dn(l)?(e.consume(l),u):n(l)}}function RM(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return tn(a)?n(a):t(a)}}function t_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||dt(e)}function n_(e){return!dn(e)}function r_(e){return!(e===47||ap(e))}function ap(e){return e===43||e===45||e===46||e===95||tn(e)}function up(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 LM={tokenize:zM,partial:!0};function DM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:UM,continuation:{tokenize:HM},exit:jM}},text:{91:{name:"gfmFootnoteCall",tokenize:BM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:MM,resolveTo:FM}}}}function MM(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][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 l;function l(d){if(!u||!u._balanced)return n(d);const f=nr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function FM(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)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.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)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,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,...l),e}function BM(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return l;function l(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||dt(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return s.includes(nr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return dt(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function UM(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(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&&!l||x===null||x===91||dt(x))return n(x);if(x===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=nr(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return dt(x)||(l=!0),u++,e.consume(x),x===92?m:p}function m(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"),s.includes(a)||s.push(a),tt(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function HM(e,t,n){return e.check(na,t,e.attempt(LM,t,n))}function jM(e){e.exit("gfmFootnoteDefinition")}function zM(e,t,n){const r=this;return tt(e,s,"gfmFootnoteDefinitionIndent",5);function s(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 $M(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,l){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&Pn(T,T.length,0,Ku(y,u.slice(f+1,d),l)),Pn(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),Pn(u,f-1,d-f+3,T),d=f+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,l,d){const f=this.previous,p=this.events;let m=0;return T;function T(x){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const v=Us(f);if(x===126)return m>1?d(x):(u.consume(x),m++,y);if(m<2&&!n)return d(x);const A=u.exit("strikethroughSequenceTemporary"),S=Us(x);return A._open=!S||S===2&&!!v,A._close=!v||v===2&&!!S,l(x)}}}class VM{constructor(){this.map=[]}add(t,n,r){qM(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 s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function qM(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function YM(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function WM(){return{flow:{null:{name:"table",tokenize:GM,resolveAll:XM}}}}function GM(e,t,n){const r=this;let s=0,a=0,u;return l;function l($){let se=r.events.length-1;for(;se>-1;){const fe=r.events[se][1].type;if(fe==="lineEnding"||fe==="linePrefix")se--;else break}const ee=se>-1?r.events[se][1].type:null,xe=ee==="tableHead"||ee==="tableRow"?R:d;return xe===R&&r.parser.lazy[r.now().line]?n($):xe($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):Be($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):Je($)?tt(e,p,"whitespace")($):(a+=1,u&&(u=!1,s+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m($)))}function m($){return $===null||$===124||dt($)?(e.exit("data"),p($)):(e.consume($),$===92?T:m)}function T($){return $===92||$===124?(e.consume($),m):m($)}function y($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),u=!1,Je($)?tt(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):x($))}function x($){return $===45||$===58?A($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),v):Y($)}function v($){return Je($)?tt(e,A,"whitespace")($):A($)}function A($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),S):$===45?(a+=1,S($)):$===null||Be($)?j($):Y($)}function S($){return $===45?(e.enter("tableDelimiterFiller"),k($)):Y($)}function k($){return $===45?(e.consume($),k):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I($))}function I($){return Je($)?tt(e,j,"whitespace")($):j($)}function j($){return $===124?x($):$===null||Be($)?!u||s!==a?Y($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):Y($)}function Y($){return n($)}function R($){return e.enter("tableRow"),W($)}function W($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),W):$===null||Be($)?(e.exit("tableRow"),t($)):Je($)?tt(e,W,"whitespace")($):(e.enter("data"),ie($))}function ie($){return $===null||$===124||dt($)?(e.exit("data"),W($)):(e.consume($),$===92?de:ie)}function de($){return $===92||$===124?(e.consume($),ie):ie($)}}function XM(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,p,m;const T=new VM;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(l=!1,d!==0&&(i_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",f,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,p={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",p,t]])),s=x.type==="tableDelimiterRow"?2:p?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=Vl(T,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=Vl(T,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):x.type==="tableHead"?(l=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=Vl(T,t,a,s,n,m)):u[1]!==0&&(m=Vl(T,t,u,s,n,m)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&i_(T,t,d,f,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=YM(t.events,n))}return e}function Vl(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},co(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=co(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 f=co(t.events,n[2]),p=co(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,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",m,t]])}return s!==void 0&&(a.end=Object.assign({},co(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function i_(e,t,n,r,s){const a=[],u=co(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function co(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const QM={name:"tasklistCheck",tokenize:JM};function KM(){return{text:{91:QM}}}function JM(e,t,n){const r=this;return s;function s(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 dt(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"),l):n(d)}function l(d){return Be(d)?t(d):Je(d)?e.check({tokenize:ZM},t,n)(d):n(d)}}function ZM(e,t,n){return tt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function e9(e){return R1([vM(),DM(),$M(e),WM(),KM()])}const t9={};function n9(e){const t=this,n=e||t9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(e9(n)),a.push(_M()),u.push(xM(n))}const r9=()=>_.jsx("span",{className:`${C}-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"})})}),fo=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>_.jsx(SE,{remarkPlugins:[n9],rehypePlugins:[vy],components:{h1:({children:s})=>_.jsx("h1",{className:F(e,`${C}-header h1`),children:s}),h2:({children:s})=>_.jsx("h2",{className:F(e,`${C}-header h2`),children:s}),h3:({children:s})=>_.jsx("h3",{className:F(e,`${C}-header h3`),children:s}),ul:({children:s})=>_.jsx("ul",{className:F(e,`${C}-ul`),children:s}),ol:({children:s})=>_.jsx("ol",{className:F(e,`${C}-ol`),children:s}),li:({children:s})=>_.jsx("li",{className:F(e,`${C}-li`),children:s}),a:({href:s,children:a})=>_.jsx(Py,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>_.jsx("div",{className:F(e,`${C}-table-container`),children:_.jsx("table",{className:F(e,`${C}-table`),children:s})}),thead:({children:s})=>_.jsx("thead",{className:F(e,`${C}-thead`),children:s}),tbody:({children:s})=>_.jsx("tbody",{className:F(e,`${C}-tbody`),children:s}),tr:({children:s})=>_.jsx("tr",{className:F(e,`${C}-tr`),children:s}),th:({children:s})=>_.jsx("th",{className:F(e,`${C}-th`),children:s}),td:({children:s})=>_.jsx("td",{className:F(e,`${C}-td`),children:s}),span:({className:s,children:a})=>s===`${C}-blinking-cursor`?_.jsx(r9,{}):_.jsx("span",{children:a})},children:r+(n?`<span className='${C}-blinking-cursor'></span>`:"")}),ql=()=>H.useContext(Hg),Yl=()=>{const{sendMessage:e,loading:t,isConnected:n}=cn(),{mode:r,status:s}=ri();return H.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function i9(e){return e.includes("-")&&e===e.toLowerCase()}function Wl({tagName:e,props:t,label:n}){const r=H.useRef(null),s=H.useRef(null),a=H.useRef(e),u=H.useRef(null);return H.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!i9(e)){u.current!==e&&(u.current=e,Pt(!0,"error",`[CimulateOverrides] ${n||"Override"} rejected: "${e}" is not a valid custom element name (must contain a hyphen and be lowercase, e.g. "product-card").`)),s.current=null,l.replaceChildren();return}const d=s.current;if(d&&d.isConnected)try{d.props=t;return}catch(f){Pt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error during props update:`,f),s.current=null,l.replaceChildren();return}try{const f=document.createElement(e);f.props=t,l.replaceChildren(f);const p=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(p)?f:null}catch(f){Pt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),H.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),_.jsx("div",{ref:r,"data-override":n||"custom"})}class s9 extends H.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){Pt(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function o9(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Image_Off"},child:[{tag:"path",attr:{d:"M19.937,14.218l0,-8.654c0,-0.829 -0.672,-1.5 -1.5,-1.5l-10.628,-0c-0.276,-0 -0.5,-0.225 -0.5,-0.5c0,-0.276 0.224,-0.5 0.5,-0.5l10.628,-0c1.38,-0 2.5,1.118 2.5,2.5l0,10.624c0,0.276 -0.224,0.5 -0.5,0.501c-0.276,-0 -0.5,-0.225 -0.5,-0.5l0,-0.556l-4.583,-4.584c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.162,0.162 2.37,2.37 3.876,3.876Zm-0.121,6.304c-0.395,0.262 -0.869,0.415 -1.379,0.415l-12.874,-0c-1.381,-0 -2.5,-1.119 -2.5,-2.5l0,-12.873c0,-0.51 0.153,-0.984 0.414,-1.38l-0.263,-0.263c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.088,0.088 0.176,0.176 0.263,0.263c0.245,0.245 16.095,16.094 16.339,16.338l0.263,0.263c0.455,0.456 -0.252,1.163 -0.707,0.707c-0.088,-0.087 -0.175,-0.175 -0.263,-0.263Zm-11.104,-11.103l-2.001,-2.001c-0.094,0.196 -0.146,0.415 -0.146,0.647c-0,0.829 0.672,1.5 1.5,1.5c0.232,-0 0.451,-0.052 0.647,-0.146Zm-2.733,-2.733l-1.77,-1.77c-0.093,0.196 -0.146,0.416 -0.146,0.648l0,10.717l1.926,-1.926c0.587,-0.586 1.536,-0.586 2.122,-0l0.555,0.554c0.195,0.196 0.511,0.196 0.706,0l2.415,-2.415l-2.343,-2.343c-0.395,0.262 -0.869,0.414 -1.379,0.414c-1.38,-0 -2.5,-1.119 -2.5,-2.5c-0,-0.509 0.152,-0.983 0.414,-1.379Zm-1.916,11.009l0,0.741c0,0.829 0.671,1.5 1.5,1.5l12.874,0c0.232,0 0.451,-0.052 0.647,-0.145c-0.165,-0.165 -3.264,-3.263 -6.59,-6.59l-2.414,2.415c-0.585,0.586 -1.537,0.586 -2.122,0l-0.554,-0.554c-0.195,-0.196 -0.512,-0.196 -0.708,0l-2.633,2.633Z"},child:[]}]}]})(e)}const a9=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=cn();return _.jsx("div",{className:F(t,`${C}-msg-product-card__image-wrapper`),children:e?n?_.jsx("button",{type:"button",className:F(t,`${C}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:_.jsx("img",{className:F(t,`${C}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,children:_.jsx("img",{className:F(t,`${C}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):_.jsx("img",{className:F(t,`${C}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):_.jsx("div",{className:F(t,`${C}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:_.jsx(o9,{"aria-hidden":"true"})})})},u9=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=cn();return n?_.jsx("button",{type:"button",disabled:l,onClick:u,className:F(t,`${C}-msg-product-card__title-link`),"aria-label":a,children:e}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:F(t,`${C}-msg-product-card__title-link`),"aria-label":a,children:e}):_.jsx("p",{className:F(t,`${C}-msg-product-card__title`),children:e})},l9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=at(),{overrides:u,isInitialized:l}=ql(),{sendMessage:d,loading:f}=cn(),p=Yl(),m=l?u.ProductTile:void 0;if(m){const $={name:"ProductTile",payload:s!=null?s:{},api:p};return _.jsx(Wl,{tagName:m,props:$,label:"ProductTile"})}const{id:T,name:y,imageUrl:x,description:v,productPageUrl:A,price:S,priceBreakdown:k,discountPrice:I,listPrice:j,currencyCode:Y}=e,R=I!=null?I:S,W=BD({priceBreakdown:k,currencyCode:Y}),ie=()=>{if(f)return;const $=y||"this product",se=T?` [SKU: ${T}]`:"";d(`Show me details for ${$}${se}`)},de=r?`View details for ${y}`:`Go to product page for ${y}`;return _.jsxs("div",{className:F(t,`${C}-msg-product-card`),children:[_.jsx(a9,{imageUrl:x||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:de,name:y,showInWidgetDetails:ie}),_.jsxs("div",{className:F(t,`${C}-msg-product-card__content`),children:[_.jsxs("div",{className:F(t,`${C}-msg-product-card__content-header`),children:[_.jsx(u9,{name:y||T,globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:de,showInWidgetDetails:ie}),a&&v&&_.jsx("div",{className:F(t,`${C}-msg-product-card__description`),title:v,children:_.jsx(fo,{globalClassName:t,text:v})})]}),_.jsx("div",{className:F(t,`${C}-msg-product-card__price-row`),children:W?_.jsx("span",{className:F(t,`${C}-msg-product-card__price`),"aria-label":`Price from ${W.low} to ${W.high}`,children:W.range}):_.jsx(Zh,{globalClassName:t,retailPrice:j,discountPrice:R,currencyCode:Y})})]})]})},c9=e=>{var t,n;return{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,listPrice:(t=e.data.listPrice)!=null?t:void 0,priceBreakdown:(n=e.data.priceBreakdown)!=null?n:void 0,currencyCode:e.data.currencyCode}},d9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=at(),{overrides:l,isInitialized:d}=ql(),f=Yl(),p=d?l.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return _.jsx(Wl,{tagName:p,props:m,label:"ProductCarousel"})}return _.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&_.jsx("p",{className:F(n,`${C}-product-carousel-title`),children:e}),_.jsx(aD,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>_.jsxs("div",{className:F(n,`${C}-product-carousel-item`),children:[_.jsx(l9,{product:c9(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&_.jsx("p",{className:F(n,`${C}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},lp=44,f9=400,h9=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?lp:Math.min(Math.max(Math.round(t),lp),f9)},p9=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},m9="parentOrigin",g9=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(m9,t),n.toString()}catch(n){return e}},E9=(e,t,n)=>{if(!e||!t)return null;try{const r=new URL(e,window.location.href);return r.origin!==window.location.origin||!/\/Payments-Express\/?$/.test(r.pathname)?null:(r.pathname=r.pathname.replace(/\/Payments-Express\/?$/,"/Payments-ExpressProduct"),r.searchParams.set("pid",t),r.searchParams.set("quantity",String(n)),r.toString())}catch(r){return null}},s_=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=H.useRef(null),[s,a]=H.useState(!1),[u,l]=H.useState(lp),d=typeof window!="undefined"?window.location.origin:"",f=g9(e,d),p=p9(e);return H.useEffect(()=>{const m=T=>{var x,v,A;if(p&&T.origin!==p||r.current&&T.source!==r.current.contentWindow)return;const y=T.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),l(h9((x=y.payload)==null?void 0:x.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((A=(v=y.payload)==null?void 0:v.orderId)!=null?A:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),_.jsx("div",{className:F(t,`${C}-cart-express`,{[`${C}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:_.jsx("iframe",{ref:r,className:F(t,`${C}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},Gl=({code:e,globalClassName:t})=>_.jsxs("span",{className:F(t,`${C}-cart-chip`),children:[_.jsx(t1,{"aria-hidden":"true"}),_.jsx("span",{children:e})]}),xn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")n===0&&!u?f="Free":f=Vr(u?-n:n,r);else if(l)f=l;else return null;return _.jsxs("div",{className:F(s,`${C}-cart-total-row`,{emphasized:a}),children:[_.jsxs("span",{className:F(s,`${C}-cart-total-label`),children:[e,t&&_.jsx("span",{className:F(s,`${C}-cart-total-badge`),children:t})]}),_.jsx("span",{className:F(s,`${C}-cart-total-value`),children:d?_.jsx("span",{className:F(s,`${C}-cart-total-shimmer`)}):f})]})},y9=({quantity:e,loading:t,globalClassName:n,onChange:r})=>{const[s,a]=H.useState(e.toString());H.useEffect(()=>{a(e.toString())},[e]);const u=f=>{const p=f.target.value;/^\d*$/.test(p)&&a(p)},l=()=>{const f=parseInt(s,10);!isNaN(f)&&f>0&&f!==e?r(f):a(e.toString())},d=f=>{f.key==="Enter"&&(f.preventDefault(),l())};return _.jsx("div",{className:F(n,`${C}-cart-qty-input-wrapper`),children:t?_.jsx(NN,{className:F(n,`${C}-cart-qty-spinner`),"aria-hidden":"true"}):_.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:F(n,`${C}-cart-qty-input`),value:s,disabled:t,onChange:u,onBlur:l,onKeyDown:d,"aria-label":"Quantity"})})},T9=({item:e,currencyCode:t,loading:n,disabled:r,globalClassName:s,onRemove:a,onQuantityChange:u})=>{var d,f,p;const l=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:F(s,`${C}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(s,`${C}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(s,`${C}-cart-item-details`),children:[_.jsx("p",{className:F(s,`${C}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(s,`${C}-cart-item-attrs`),children:[((d=e.variants)!=null?d:[]).map(m=>_.jsxs("p",{className:F(s,`${C}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((f=e.promotions)!=null?f:[]).map(m=>_.jsxs("p",{className:F(s,`${C}-cart-item-attr`),children:["Promotion: ",m]},m))]}),((p=e.coupons)!=null?p:[]).length>0&&_.jsx("div",{className:F(s,`${C}-cart-chips`),children:e.coupons.map(m=>_.jsx(Gl,{code:m,globalClassName:s},m))}),_.jsx("span",{className:F(s,`${C}-cart-item-price`),children:n?_.jsx("span",{className:F(s,`${C}-cart-total-shimmer`)}):_.jsxs(_.Fragment,{children:[l&&_.jsx("span",{className:F(s,`${C}-cart-item-original-price`),children:Vr(e.originalSubtotal,t)}),_.jsx("span",{className:F(s,`${C}-cart-item-final-price`),children:Vr(e.itemSubtotal,t)})]})}),_.jsxs("div",{className:F(s,`${C}-cart-item-footer`),children:[_.jsx("span",{className:F(s,`${C}-cart-qty-heading`),children:"Quantity"}),_.jsx(y9,{quantity:e.quantity,loading:n,globalClassName:s,onChange:m=>u(e,m)}),_.jsx("button",{type:"button",className:F(s,`${C}-cart-item-remove`),disabled:r,onClick:()=>a(e),children:"Remove"})]})]})]})},b9=({cart:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:s,loading:a}=cn(),[u,l]=H.useState(!0),[d,f]=H.useState(""),[p,m]=H.useState(null),{items:T=[],currencyCode:y="USD",subtotal:x,total:v,taxes:A,shippingCost:S,shippingDiscount:k,shippingPromotions:I=[],promotionsDiscount:j,promotions:Y=[],couponsDiscount:R,couponsApplied:W=[],bodyMessage:ie,footerMessage:de,checkoutButtonUrl:$,expressPaymentUrl:se}=e,ee=he=>{a||s(`Remove ${he.name} from my cart`)},xe=he=>{s(he?`I completed express payment. Show my order confirmation for order ${he}.`:"I completed express payment. Show my order confirmation.")},fe=(he,le)=>{p||le<1||(m(he.itemId),s(`Update ${he.name} quantity to ${le}`,{silent:!0}))};H.useEffect(()=>{if(p){const he=setTimeout(()=>{m(null)},300);return()=>clearTimeout(he)}},[e.total,e.subtotal]);const ce=()=>{const he=d.trim();!he||a||(s(`Apply coupon code ${he}`),f(""))};return _.jsxs("div",{className:F(t,`${C}-cart`),children:[_.jsxs("div",{className:F(t,`${C}-cart-box`),children:[ie&&_.jsxs("button",{type:"button",className:F(t,`${C}-cart-summary`),"aria-expanded":u,onClick:()=>l(he=>!he),children:[_.jsx("span",{className:F(t,`${C}-cart-summary-text`),children:_.jsx(fo,{text:ie,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${C}-cart-summary-toggle`),"aria-hidden":"true",children:u?_.jsx(Zg,{}):_.jsx(e1,{})})]}),u&&_.jsxs("div",{className:F(t,`${C}-cart-expanded`,r&&`${C}-cart-expanded-standalone`),children:[_.jsxs("div",{className:F(t,`${C}-cart-items-section`),children:[_.jsx("ul",{className:F(t,`${C}-cart-items`),children:T.map(he=>_.jsx(T9,{item:he,currencyCode:y,loading:p===he.itemId,disabled:a||p===he.itemId,globalClassName:t,onRemove:ee,onQuantityChange:fe},he.itemId))}),W.length>0&&_.jsx("div",{className:F(t,`${C}-cart-chips`,`${C}-cart-applied-coupons`),children:W.map(he=>_.jsx(Gl,{code:he,globalClassName:t},he))})]}),_.jsxs("div",{className:F(t,`${C}-cart-totals`),children:[_.jsx(xn,{label:"Subtotal",value:x,currencyCode:y,globalClassName:t,loading:!!p}),_.jsx(xn,{label:"Coupon",value:R,currencyCode:y,globalClassName:t,isDiscount:!0,loading:!!p}),_.jsx(xn,{label:"Promotions",badge:Y[0],value:j,currencyCode:y,globalClassName:t,isDiscount:!0,loading:!!p}),_.jsx(xn,{label:"Shipping",value:S,currencyCode:y,globalClassName:t,fallback:"TBD",loading:!!p}),_.jsx(xn,{label:"Shipping Discount",badge:I[0],value:k,currencyCode:y,globalClassName:t,isDiscount:!0,loading:!!p}),_.jsx(xn,{label:"Tax",value:A,currencyCode:y,globalClassName:t,fallback:"TBD",loading:!!p}),_.jsx(xn,{label:"Total",value:v,currencyCode:y,globalClassName:t,emphasized:!0,loading:!!p})]})]})]}),_.jsxs("div",{className:F(t,`${C}-cart-coupon`),children:[_.jsxs("div",{className:F(t,`${C}-cart-coupon-field`),children:[_.jsx("span",{className:F(t,`${C}-cart-coupon-icon`),"aria-hidden":"true",children:_.jsx(t1,{})}),_.jsx("input",{type:"text",className:F(t,`${C}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:d,disabled:a,onChange:he=>f(he.target.value),onKeyDown:he=>{he.key==="Enter"&&(he.preventDefault(),ce())}})]}),_.jsx("button",{type:"button",className:F(t,`${C}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:a||!d.trim(),onClick:ce,children:_.jsx(ON,{"aria-hidden":"true"})})]}),se&&_.jsx(s_,{expressPaymentUrl:se,globalClassName:t,onOrderComplete:xe}),$&&_.jsxs("a",{className:F(t,`${C}-cart-checkout-button`),href:$,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[_.jsx(kN,{"aria-hidden":"true"}),_.jsx("span",{children:"Checkout"})]}),_.jsx("p",{className:F(t,`${C}-cart-footer`),children:de||"Shipping and taxes calculated at checkout."})]})},_9=({item:e,currencyCode:t,globalClassName:n})=>{var s,a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:F(n,`${C}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(n,`${C}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(n,`${C}-cart-item-details`),children:[_.jsx("p",{className:F(n,`${C}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(n,`${C}-cart-item-attrs`),children:[((s=e.variants)!=null?s:[]).map(l=>_.jsxs("p",{className:F(n,`${C}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((a=e.promotions)!=null?a:[]).map(l=>_.jsxs("p",{className:F(n,`${C}-cart-item-attr`),children:["Promotion: ",l]},l))]}),((u=e.coupons)!=null?u:[]).length>0&&_.jsx("div",{className:F(n,`${C}-cart-chips`),children:e.coupons.map(l=>_.jsx(Gl,{code:l,globalClassName:n},l))}),_.jsxs("span",{className:F(n,`${C}-cart-item-price`),children:[r&&_.jsx("span",{className:F(n,`${C}-cart-item-original-price`),children:Vr(e.originalSubtotal,t)}),_.jsx("span",{className:F(n,`${C}-cart-item-final-price`),children:Vr(e.itemSubtotal,t)})]}),_.jsx("div",{className:F(n,`${C}-cart-item-footer`),children:_.jsxs("span",{className:F(n,`${C}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},x9=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},w9=({order:e,globalClassName:t})=>{const[n,r]=H.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:T,shippingPromotions:y=[],promotionsDiscount:x,promotions:v=[],couponsDiscount:A,couponsApplied:S=[],bodyMessage:k,footerMessage:I}=e;return _.jsxs("div",{className:F(t,`${C}-cart`),children:[_.jsxs("div",{className:F(t,`${C}-cart-banner`),children:[_.jsx("span",{className:F(t,`${C}-cart-banner-icon`),"aria-hidden":"true",children:_.jsx(IN,{})}),_.jsx("p",{className:F(t,`${C}-cart-banner-text`),children:"Your order is confirmed!"})]}),_.jsxs("div",{className:F(t,`${C}-order-confirmation-meta`),children:[_.jsxs("span",{children:["Order No: ",s]}),_.jsxs("span",{children:["Ordered On: ",x9(a)]})]}),_.jsxs("div",{className:F(t,`${C}-cart-box`),children:[k&&_.jsxs("button",{type:"button",className:F(t,`${C}-cart-summary`),"aria-expanded":n,onClick:()=>r(j=>!j),children:[_.jsx("span",{className:F(t,`${C}-cart-summary-text`),children:_.jsx(fo,{text:k,globalClassName:t,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${C}-cart-summary-toggle`),"aria-hidden":"true",children:n?_.jsx(Zg,{}):_.jsx(e1,{})})]}),n&&_.jsxs("div",{className:F(t,`${C}-cart-expanded`),children:[_.jsx("ul",{className:F(t,`${C}-cart-items`),children:u.map(j=>_.jsx(_9,{item:j,currencyCode:l,globalClassName:t},j.itemId))}),S.length>0&&_.jsx("div",{className:F(t,`${C}-cart-chips`,`${C}-cart-applied-coupons`),children:S.map(j=>_.jsx(Gl,{code:j,globalClassName:t},j))}),_.jsxs("div",{className:F(t,`${C}-cart-totals`),children:[_.jsx(xn,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),_.jsx(xn,{label:"Coupon",value:A,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(xn,{label:"Promotions",badge:v[0],value:x,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(xn,{label:"Shipping",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),_.jsx(xn,{label:"Shipping Discount",badge:y[0],value:T,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(xn,{label:"Tax",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),_.jsx(xn,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),_.jsx("p",{className:F(t,`${C}-cart-footer`),children:I||"Shipping and taxes calculated at checkout."})]})},S9=({image:e,alt:t,globalClassName:n})=>{const[r,s]=H.useState(e.src),[a,u]=H.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return _.jsx("img",{className:F(n,`${C}-pdp-gallery__image`,{[`${C}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},v9=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return _.jsxs(Yh,{className:F(n,`${C}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[_.jsx($h,{className:F(n,`${C}-pdp-gallery__item-group`),children:e.map((s,a)=>_.jsx(zh,{index:a,className:F(n,`${C}-pdp-gallery__item`),children:_.jsx(S9,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&_.jsxs(Uh,{className:F(n,`${C}-pdp-gallery__control`),children:[_.jsx(qh,{className:F(n,`${C}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:_.jsx(nb,{size:"16px"})}),_.jsx(Vh,{className:F(n,`${C}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:_.jsx(rb,{size:"16px"})})]}),r&&_.jsx(jh,{className:F(n,`${C}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>_.jsx(Hh,{index:a,className:F(n,`${C}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Ia="color",cp=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,A9=e=>e.replace(/(^|\/)large\//,"$1medium/"),o_=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Ia&&n.vals.includes(t)),a_=(e,t)=>{const n=A9(t),r=cp(e,n);return n===t?{src:r}:{src:r,fallbackSrc:cp(e,t)}},N9=(e,t)=>{var l,d;const n=((l=e.imgGroups)!=null?l:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>o_(f,t)),s=n.find(f=>f.vattr===null),a=r||s||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(f=>a_(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[a_(e.baseUrl,e.imageUrl)]:[]},k9=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&o_(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?cp(e.baseUrl,r):""},Xl=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(s=>{var a;return((a=s.vars)==null?void 0:a[t])!==n||s.ord===!1?!1:Object.entries(r).every(([u,l])=>{var d;return u===t||((d=s.vars)==null?void 0:d[u])===l})}),C9=(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(s=>{var a;return((a=r.vars)==null?void 0:a[s])===t[s]}))},O9=(e,t,n,r,s)=>{if(!e||e.length===0)return ue(U({},s),{[n]:r});const a=e.find(l=>{var d;return((d=l.vars)==null?void 0:d[n])===r&&l.ord!==!1&&Object.keys(l.vars).length>=t.length&&Object.entries(s).every(([f,p])=>{var m;return f===n||((m=l.vars)==null?void 0:m[f])===p})});if(a)return U({},a.vars);const u=e.find(l=>{var d;return((d=l.vars)==null?void 0:d[n])===r&&l.ord!==!1&&Object.keys(l.vars).length>=t.length});return u?U({},u.vars):ue(U({},s),{[n]:r})},u_=(e,t)=>{var s,a,u,l;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(s=e.id)!=null?s: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(([f,p])=>{var m;return((m=d.vars)==null?void 0:m[f])===p}));return(l=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?l:null},I9=(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(([s,a])=>{var u;return((u=r.vars)==null?void 0:u[s])===a}));return n!=null&&n.pr?n.pr:e.pr},P9=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>Xl(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},R9=300,L9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var _e,ne,Ee,re,ve,$e,gt;const{addToCart:s,sendMessage:a,loading:u}=cn(),l=e.data,d=(_e=l.vattr)!=null?_e:[],[f,p]=H.useState(()=>P9(l)),m=C9(l.vmat,f),T=(Ee=(ne=l.quantity)==null?void 0:ne.minQuantity)!=null?Ee:1,y=(ve=(re=l.quantity)==null?void 0:re.maxQuantity)!=null?ve:Number.POSITIVE_INFINITY,x=(gt=($e=l.quantity)==null?void 0:$e.increment)!=null?gt:1,[v,A]=H.useState(T),[S,k]=H.useState(!1),I=H.useRef(!1);H.useEffect(()=>{S&&(u?I.current=!0:I.current&&(I.current=!1,k(!1)))},[S,u]);const j=f[Ia],Y=H.useMemo(()=>N9(l,j),[l,j]),R=H.useMemo(()=>I9(l,f),[l,f]),W=d.find(Ce=>Ce.id===Ia),ie=d.filter(Ce=>Ce.id!==Ia),de=u_(l,f),[$,se]=H.useState(v),ee=H.useRef(de),xe=ee.current===de?$:v;H.useEffect(()=>{if(ee.current!==de){ee.current=de,se(v);return}const Ce=window.setTimeout(()=>se(v),R9);return()=>window.clearTimeout(Ce)},[v,de]);const fe=v===$,ce=H.useMemo(()=>m&&(ee.current!==de||fe)?E9(l.expressPaymentUrl,de,xe):null,[l.expressPaymentUrl,de,xe,m,fe]),he=H.useCallback(Ce=>{a(Ce?`I completed express payment. Show my order confirmation for order ${Ce}.`:"I completed express payment. Show my order confirmation.")},[a]),le=(Ce,We)=>()=>{p(Ze=>{const Pe=!Xl(l.vmat,Ce,We,Ze);return Ce===Ia||Pe?O9(l.vmat,d,Ce,We,Ze):ue(U({},Ze),{[Ce]:We})})},K=()=>{if(u)return;const Ce=u_(l,f);if(!Ce)return;const We=d.map(Ze=>{const Pe=Ze.opts.find(Et=>Et.val===f[Ze.id]);return Pe?{label:Ze.lbl||Ze.id,value:Pe.name||Pe.val}:null}).filter(Ze=>Ze!==null);k(!0),s({productName:l.name,sku:Ce,quantity:v,variants:We})},ae=!m||v-x<T,N=!m||v+x>y,D=Ce=>{var Ze;const We=f[Ce.id];return(Ze=Ce.opts.find(Pe=>Pe.val===We))==null?void 0:Ze.name},J=()=>A(Ce=>Math.max(T,Ce-x)),P=()=>A(Ce=>Math.min(y,Ce+x)),Se=Ce=>_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${Ce.id}`,className:F(t,`${C}-msg-pdp__variant-name`),children:Ce.lbl||Ce.id}),D(Ce)&&_.jsx("span",{className:F(t,`${C}-msg-pdp__variant-value`),children:D(Ce)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ce.id}`,className:F(t,`${C}-msg-pdp__chips`),children:Ce.opts.map(We=>{const Ze=Xl(l.vmat,Ce.id,We.val,f),Pe=f[Ce.id]===We.val;return _.jsxs("label",{className:F(`${C}-msg-pdp__chip`,{selected:Pe,unavailable:!Ze}),children:[_.jsx("input",{type:"radio",name:`variant-${Ce.id}`,value:We.val,checked:Pe,"aria-description":Ze?void 0:"unavailable",onChange:le(Ce.id,We.val),className:`${C}-msg-pdp__radio-input`}),_.jsx("span",{children:We.name||We.val})]},We.val)})})]},Ce.id),Me=Ce=>_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${Ce.id}`,className:F(t,`${C}-msg-pdp__variant-name`),children:Ce.lbl||"Color"}),D(Ce)&&_.jsx("span",{className:F(t,`${C}-msg-pdp__variant-value`),children:D(Ce)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ce.id}`,className:F(t,`${C}-msg-pdp__swatches`),children:Ce.opts.map(We=>{const Ze=Xl(l.vmat,Ce.id,We.val,f),Pe=f[Ce.id]===We.val,Et=k9(l,We.val);return Et?_.jsxs("label",{className:F(`${C}-msg-pdp__swatch`,{selected:Pe,unavailable:!Ze}),children:[_.jsx("input",{type:"radio",name:`variant-${Ce.id}`,value:We.val,checked:Pe,"aria-label":We.name||We.val,"aria-description":Ze?void 0:"unavailable",onChange:le(Ce.id,We.val),className:`${C}-msg-pdp__radio-input`}),_.jsx("img",{className:F(t,`${C}-msg-pdp__swatch-image`),src:Et,alt:We.name||We.val,loading:"lazy"})]},We.val):_.jsxs("label",{className:F(`${C}-msg-pdp__chip`,{selected:Pe,unavailable:!Ze}),children:[_.jsx("input",{type:"radio",name:`variant-${Ce.id}`,value:We.val,checked:Pe,"aria-description":Ze?void 0:"unavailable",onChange:le(Ce.id,We.val),className:`${C}-msg-pdp__radio-input`}),_.jsx("span",{children:We.name||We.val})]},We.val)})})]});return _.jsx("div",{className:F(t,`${C}-msg-pdp`),children:_.jsxs("div",{className:F(t,`${C}-msg-pdp__card`),children:[_.jsx("div",{className:F(t,`${C}-msg-pdp__gallery`),children:_.jsx(v9,{images:Y,altText:l.name,globalClassName:t})}),_.jsxs("div",{className:F(t,`${C}-msg-pdp__content`),children:[l.slugUrl?_.jsx("a",{href:l.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:F(t,`${C}-msg-pdp__title-link`),"aria-label":`Go to product page for ${l.name}`,children:l.name}):_.jsx("p",{className:F(t,`${C}-msg-pdp__title`),children:l.name}),_.jsx(Zh,{globalClassName:t,className:`${C}-msg-pdp__price`,retailPrice:R==null?void 0:R.orig,discountPrice:(R==null?void 0:R.cur)||(R==null?void 0:R.prom),currencyCode:l.ccy,fontSize:"14px"}),l.dscr&&_.jsx("div",{className:F(t,`${C}-msg-pdp__description`),children:_.jsx(fo,{globalClassName:t,text:l.dscr})}),W&&Me(W),ie.map(Se),r&&_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant-label`),children:[_.jsx("span",{className:F(t,`${C}-msg-pdp__variant-name`),children:"Quantity"}),_.jsx("span",{className:F(t,`${C}-msg-pdp__variant-value`),children:v})]}),_.jsxs("div",{className:F(t,`${C}-msg-pdp__stepper`),children:[_.jsx(tr,{className:`${C}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:_.jsx(yN,{}),disabled:ae,onClick:J}),_.jsx("span",{className:F(t,`${C}-msg-pdp__quantity`),children:v}),_.jsx(tr,{className:`${C}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:_.jsx(TN,{}),disabled:N,onClick:P})]})]}),r&&_.jsxs("div",{className:F(t,`${C}-msg-pdp__actions`),children:[ce&&_.jsx(s_,{expressPaymentUrl:ce,globalClassName:t,onOrderComplete:he},ce),_.jsx(Yu,{className:`${C}-msg-pdp__add-to-cart`,disabled:!m||u||S,onClick:K,children:S?"Adding...":"Add to cart"})]})]})]})})},D9=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},M9=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:s=!1})=>{const{addToCart:a,loading:u}=cn();if(!e.length)return null;const l=`auto repeat(${e.length}, 1fr)`,d=`${90+e.length*140}px`,f=p=>()=>{u||a({productName:p.name,sku:p.id})};return _.jsx("div",{className:F(n,`${C}-product-comparison`),children:_.jsxs("div",{className:`${C}-product-comparison__grid`,style:{gridTemplateColumns:l,minWidth:d},children:[_.jsxs("div",{className:`${C}-product-comparison__header`,children:[_.jsx("div",{className:`${C}-product-comparison__header-spacer`}),e.map(p=>{var T,y,x,v;const m=D9(p);return _.jsxs("div",{className:F(n,`${C}-product-comparison__product-col`),children:[m&&_.jsx("img",{className:F(n,`${C}-product-comparison__image`),src:m,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?_.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:F(n,`${C}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):_.jsx("span",{className:F(n,`${C}-product-comparison__name`),children:p.name}),_.jsx(Zh,{globalClassName:n,retailPrice:(T=p.pr)==null?void 0:T.orig,discountPrice:(v=(y=p.pr)==null?void 0:y.prom)!=null?v:(x=p.pr)==null?void 0:x.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),_.jsx("div",{className:`${C}-product-comparison__table`,children:t.map(p=>_.jsxs("div",{className:`${C}-product-comparison__row`,children:[_.jsx("div",{className:F(n,`${C}-product-comparison__row-label`),children:p.row_name}),e.map((m,T)=>_.jsx("div",{className:F(n,`${C}-product-comparison__row-value`),children:p.values[T]},`${p.row_name}-${m.id}`))]},p.row_name))}),s&&_.jsxs("div",{className:`${C}-product-comparison__footer`,children:[_.jsx("div",{className:`${C}-product-comparison__footer-spacer`}),e.map(p=>_.jsx("div",{className:F(n,`${C}-product-comparison__footer-cell`),children:_.jsxs(Yu,{className:`${C}-product-comparison__add-to-cart`,disabled:u,onClick:f(p),children:[_.jsx(AN,{size:"14px"}),"Add to cart"]})},`cart-${p.id}`))]})]})})},l_=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:s,loading:a}=cn(),{isCartMgmtSupported:u,logger:l}=at(),{overrides:d,isInitialized:f}=ql(),p=Yl(),m=H.useMemo(()=>e.response.map(T=>{var x,v;if(T.type!=="markdown")return T;const y=dg((v=(x=T.data)==null?void 0:x.content)!=null?v:"");return y&&y.type!=="markdown"?y:T}),[e.response]);return _.jsx(_.Fragment,{children:m.map((T,y)=>{var x,v,A,S,k,I,j,Y,R,W,ie,de,$,se,ee,xe,fe,ce,he,le,K,ae,N,D,J;switch(T.type){case"markdown":{const P=(v=(x=T.data)==null?void 0:x.content)!=null?v:"";return T.index===ji&&fg(P)?null:_.jsx(fo,{text:P,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1},`${T.type}-${(A=T.index)!=null?A:y}`)}case"product_carousel":return _.jsx(d9,{title:(k=(S=T.data)==null?void 0:S.title)!=null?k:"",products:(j=(I=T.data)==null?void 0:I.products)!=null?j:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(Y=T.index)!=null?Y:y}`);case"product_tile":return _.jsx(L9,{product:T.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(R=T.index)!=null?R:y}`);case"product_comparison":return _.jsx(M9,{products:(ie=(W=T.data)==null?void 0:W.products)!=null?ie:[],table:($=(de=T.data)==null?void 0:de.table)!=null?$:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(se=T.index)!=null?se:y}`);case"cart":{const P=(fe=(xe=(ee=T.data)==null?void 0:ee.cart)==null?void 0:xe.cartSummary)==null?void 0:fe.cartDetails;return P?_.jsx(b9,{cart:P,productsToHighlight:T.data.products_to_highlight,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${T.type}-${(ce=T.index)!=null?ce:y}`):null}case"order_confirmation":{const P=(le=(he=T.data)==null?void 0:he.order)==null?void 0:le.orderDetails;return P?_.jsx(w9,{order:P,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${T.type}-${(K=T.index)!=null?K:y}`):null}case"tool_results":{const P=T.data,Se=T.output_name,Me=f&&Se&&Object.prototype.hasOwnProperty.call(d,Se)?d[Se]:void 0,_e=typeof Me=="string"?Me:void 0;if(!_e||!Se)return l!=null&&l.isDevelopment&&(Se?l.warn(`🦜 tool_results "${Se}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${Se}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(d),payload:P}):l.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:P})),null;const ne={name:Se,payload:P,api:p};return _.jsx(s9,{overrideName:Se,children:_.jsx(Wl,{tagName:_e,props:ne,label:`toolResult:${Se}`})},`${T.type}-${Se}-${(ae=T.index)!=null?ae:y}`)}case"suggestions":return _.jsx("div",{style:{marginTop:"0.5rem"},children:_.jsx(HD,{disabled:a,suggestions:(D=(N=T.data)==null?void 0:N.display_text)!=null?D:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:s})},`${T.type}-${(J=T.index)!=null?J:y}`);default:return null}})})},F9=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=at(),a=H.useMemo(()=>{if(typeof e.content!="string")return null;try{const d=JSON.parse(e.content);if(d&&typeof d=="object"&&Array.isArray(d.response))return d}catch(d){return null}const l=dg(e.content);return l?{response:[l]}:null},[e.content]),u=H.useMemo(()=>{const l="Oops, I had trouble with your request.";if(typeof e.content!="string")return s==null||s.warn("Message content is not richtext format. Showing fallback text.",e.content),l;const d=e.content.trim();try{const f=JSON.parse(d);if(typeof f=="object"&&f!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),f.text||f.message||l}catch(f){if(d.startsWith("{")||d.startsWith("["))return s==null||s.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),l}return e.content||l},[s,e.content]);switch(e.role){case"user":return _.jsx("div",{className:F(t,`${C}-message`,r?"standalone":"embedded"),children:_.jsx("div",{className:F(t,`${C}-user-message`,r?"standalone":"embedded"),children:_.jsxs("div",{className:F(t,`${C}-user-message-row`,r?"standalone":"embedded"),children:[_.jsx("span",{className:F(t,`${C}-message-icon user-message-icon`,r?"standalone":"embedded"),children:_.jsx(CN,{})}),_.jsx("p",{className:F(t,`${C}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return _.jsx("div",{className:F(t,`${C}-message-group`,r?"standalone":"embedded"),children:_.jsx("div",{className:`${C}-message-group-child`,children:a?_.jsx(l_,{content:a,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):_.jsx(fo,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return _.jsx("div",{className:F(t,`${C}-message`,r?"standalone":"embedded"),children:_.jsx("p",{className:F(t,`${C}-reset-message`),children:e.content})})}},B9=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>_.jsxs("div",{className:F(n,`${C}-send-error`,r?"standalone":"embedded"),role:"alert",children:[_.jsx("span",{className:F(n,`${C}-send-error-text`),children:e}),_.jsxs("button",{type:"button",className:F(n,`${C}-retry-button`),onClick:t,children:[_.jsx(LN,{"aria-hidden":"true"})," Retry"]})]}),U9="You are offline or we couldn't reach the assistant. Check connection and try again.",dp=({isWidgetStandalone:e})=>{var se,ee;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=at(),{messages:a,streamingBlocks:u,isAgentTyping:l,loading:d,progressMessage:f,connectionStatus:p,error:m,sendError:T,retryLastMessage:y,retryConnection:x}=cn(),v=H.useRef(null),A=a.filter(xe=>!xe.silent),S=A.length>0,k=u.some(iA),I=A[A.length-1];let j=!1;if(I)try{const xe=JSON.parse(I.content);Array.isArray(xe==null?void 0:xe.response)&&(j=xe.response.some(fe=>fe.type==="suggestions"))}catch(xe){}const Y=S&&(d||l)&&!k&&!j,R=p==="reconnecting"&&!Y,W=p==="error";let ie=null;W?ie={message:m!=null?m:U9,kind:"connection",onRetry:x}:T&&(ie={message:T.message,kind:"send",onRetry:y}),H.useEffect(()=>{var xe;(xe=v.current)==null||xe.scrollIntoView({behavior:"smooth"})},[]),H.useEffect(()=>{var xe;s&&((xe=v.current)==null||xe.scrollIntoView({behavior:"smooth"}))},[a,u,T,m,s]);const de=(se=ie==null?void 0:ie.message)!=null?se:null,$=(ee=ie==null?void 0:ie.kind)!=null?ee:null;return H.useEffect(()=>{de&&(r==null||r.error("Error message shown to user",{message:de,kind:$}))},[de,$,r]),_.jsxs(_.Fragment,{children:[d&&!S&&_.jsx(qD,{globalClassName:t,isWidgetStandalone:e}),A.map(xe=>_.jsx(F9,{message:xe,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},xe.id)),ie&&_.jsx(B9,{message:ie.message,onRetry:ie.onRetry,globalClassName:t,isWidgetStandalone:e}),k&&_.jsxs("div",{className:F(t,`${C}-message-group`,e?"standalone":"embedded"),children:[_.jsx(l_,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(d||l)&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e})]}),Y&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),R&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),_.jsx("div",{ref:v})]})},H9=()=>_.jsxs("svg",{className:`${C}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),j9=()=>_.jsx("svg",{className:`${C}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("path",{d:"M8 1v3M8 12v3M1 8h3M12 8h3M3.05 3.05l2.12 2.12M10.83 10.83l2.12 2.12M3.05 12.95l2.12-2.12M10.83 5.17l2.12-2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),z9=(e,t)=>e===0?[]:e<0?t:t.slice(-e),fp=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=at(),s=e!=null?e:r,{overrides:a,isInitialized:u}=ql(),l=Yl();if(t.length===0||s===0)return null;const d=z9(s,t),f=u?a.ProgressSteps:void 0;if(f){const p={name:"ProgressSteps",payload:{steps:d},api:l};return _.jsx(Wl,{tagName:f,props:p,label:"ProgressSteps"})}return _.jsx("div",{className:F(n,`${C}-progress-steps-panel`),children:_.jsx("div",{className:`${C}-progress-steps`,children:_.jsx("ul",{className:`${C}-progress-steps-list`,children:d.map((p,m)=>{const T=m<d.length-1,y=m===d.length-1;return _.jsxs("li",{className:F(`${C}-progress-step`,y&&"active"),children:[y&&_.jsx("span",{className:`${C}-progress-step-arc`}),_.jsx("span",{className:`${C}-progress-step-text`,children:p}),_.jsx("span",{className:F(`${C}-progress-step-icon`,T?"done":"active"),children:T?_.jsx(H9,{}):_.jsx(j9,{})})]},`${m}-${p}`)})})})})},c_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=at(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:l,downloadTranscript:d}=cn(),f=s;return _.jsxs("div",{className:F(e,`${C}-container`,`${C}-embedded-chat`),style:t,children:[_.jsx("div",{className:F(e,`${C}-message-container`,`container-${n}`,"embedded"),children:_.jsx(dp,{isWidgetStandalone:!0})}),_.jsx(fp,{steps:l,globalClassName:e}),_.jsx(nh,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:p=>a(p)}),_.jsx("div",{className:F(`${C}-embedded-chat-menu`),children:_.jsxs($5,{componentType:"chat",children:[_.jsx(kb,{componentType:"chat"}),_.jsx(Dy,{componentType:"chat",onClearChat:u}),r&&_.jsx(My,{componentType:"chat",onDownloadTranscript:d})]})})]})},d_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=H.useState((d=e.container)==null?void 0:d.current),a=H.useSyncExternalStore(V9,()=>!1,()=>!0),{getRootNode:u}=Bl();if(H.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const l=r!=null?r:$9(u);return _.jsx(_.Fragment,{children:H.Children.map(t,f=>Ds.createPortal(f,l))})},$9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return es(n)?n:xr(t).body},V9=()=>()=>{},f_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=at(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=ri(),{loading:d,isAgentTyping:f,sendMessage:p,resetConversation:m,progressSteps:T,downloadTranscript:y}=cn(),{isOpen:x}=s||{},v=!!s.isOpen,A=r==="standalone",S=f||d,k=()=>{Br(!1)};return v?_.jsx(bb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:v,children:_.jsx(d_,{children:_.jsx(Xh,{className:F(e,`${C}-container`,`${C}-dialog`,a,u&&"full-height"),style:U(U({},t),l&&{width:l}),children:_.jsxs(Wh,{className:F(e,`${C}-dialog-content`,{standalone:A,embedded:!A}),children:[_.jsx(vb,{componentType:"dialog",onClearChat:m,onClose:k,onDownloadTranscript:y}),_.jsx(Gh,{className:F(e,`${C}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:_.jsx(dp,{isWidgetStandalone:A,isOpen:x})}),_.jsx(fp,{steps:T,globalClassName:e}),_.jsx(nh,{componentType:"dialog",isLoading:S,onSubmit:I=>p(I)})]})})})}):null},h_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=at(),{mode:r,status:s,isModalFullscreen:a}=ri(),{loading:u,isAgentTyping:l,sendMessage:d,resetConversation:f,progressSteps:p,downloadTranscript:m}=cn(),{isOpen:T}=s||{},y=!!s.isOpen,x=r==="standalone",v=l||u,A=({open:k})=>{Br(k)},S=()=>{Br(!1)};return y?_.jsx(bb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:_.jsx(d_,{children:_.jsxs("div",{className:F(e,`${C}-modal-container`),style:t,children:[_.jsx(mb,{className:F(e,`${C}-modal-backdrop`)}),_.jsx(Xh,{className:F(e,`${C}-container`,`${C}-modal`,{fullscreen:a,standalone:x,embedded:!x}),children:_.jsxs(Wh,{className:F(e,`${C}-modal-content`,{standalone:x,embedded:!x}),children:[_.jsx(vb,{componentType:"modal",onClearChat:f,onClose:S,onDownloadTranscript:m}),_.jsx(Gh,{className:F(e,`${C}-message-container`,`container-${n}`,{standalone:x,embedded:!x}),children:_.jsx(dp,{isWidgetStandalone:x,isOpen:T})}),_.jsx(fp,{steps:p,globalClassName:e}),_.jsx(nh,{componentType:"modal",isLoading:v,onSubmit:k=>d(k)})]})})]})})}):null},q9=()=>{const e=ri(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(wN,{}):t==="dialog"?_.jsx(f_,{}):t==="modal"?_.jsx(h_,{}):_.jsx(c_,{})},Y9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=RD();H.useEffect(()=>{const a=u=>{const{property:l,value:d}=u.detail||{};!l||d===void 0||(l==="isOpen"&&e(d),l==="isInline"&&t(d),l==="elementId"&&n(d),l==="entryType"&&r(d),l==="params"&&s(d))};return kD(a),()=>{CD(a)}},[e,t,n,r,s])};function W9({isReady:e,hasError:t,transmit:n}){const r=H.useRef([]),s=H.useRef(e);s.current=e;const a=H.useRef(n);a.current=n;const u=H.useCallback(l=>{s.current?a.current(l):r.current.push(l)},[]);return H.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(d=>a.current(d))}},[e]),H.useEffect(()=>{t&&(r.current=[])},[t]),u}const p_={copilot:"Ask Copilot",messaging:"Ask a question"},G9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=at(),{placeholder:s,isResponseLoading:a}=jl(),u=s||p_[r],[l,d]=H.useState(""),f=t||a,p=m=>{const T=l.trim();T&&(m.preventDefault(),e(T),d(""))};return _.jsxs("form",{className:F(n,`${C}-prompts-input-container`),name:`${C}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${C}-prompts-input`,"aria-label":u,children:_.jsx(Bh,{className:F(n,`${C}-prompts-input-icon`)})}),_.jsx("input",{id:`${C}-prompts-input`,className:F(n,`${C}-prompts-input`),name:`${C}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),_.jsx(tr,{className:F(n,`${C}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(uf,{}),disabled:f})]})},X9=()=>{const{globalClassName:e,mode:t}=at(),{placeholder:n}=jl(),r=n||p_[t];return _.jsxs("div",{className:F(e,`${C}-prompts-header`),children:[_.jsx(Bh,{className:F(e,`${C}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:F(e,`${C}-prompts-header-text`),children:r})]})},m_=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:s}=at(),a=s==null?void 0:s.icon,u=(l=s==null?void 0:s.iconPosition)!=null?l:"left";return _.jsxs("button",{className:F(r,`${C}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&_.jsx(Nb,{icon:a,className:`${C}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},Q9="Ask me something else",K9=({label:e,disabled:t=!1})=>_.jsx(m_,{label:e||Q9,disabled:t,onClick:()=>Br(!0)}),J9=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),Z9=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=at(),{staticQuestions:r,askElseButtonLabel:s,disableAskElseButton:a}=jl(),u=J9(r);if(u.length===0)return null;const l=d=>()=>{const f=d.trim();f&&e(f)};return _.jsxs("div",{className:F(n,`${C}-prompts-button-group`),children:[u.map(d=>_.jsx(m_,{label:d,disabled:t,onClick:l(d)},d)),!a&&_.jsx(K9,{label:s,disabled:t})]})},eF=()=>{const{globalClassName:e,themeVariables:t}=at(),{isOpen:n,elementId:r,promptsDisplay:s}=jl(),{isConnected:a,sendMessage:u,connectionStatus:l}=cn(),d=s!=="buttons",f=s!=="input",[p,m]=H.useState(null),T=l==="error",y=l==="connecting",x=W9({isReady:a,hasError:T,transmit:u});H.useEffect(()=>{if(!r||p)return;const A=document.getElementById(r);A&&m(A)},[r,p]);const v=H.useCallback(A=>{Br(!0),x(A)},[x]);return!n||!p?null:Ds.createPortal(_.jsxs("div",{className:F(e,`${C}-prompts-extension-container`),style:t,children:[d&&_.jsx(G9,{onSubmit:v,disabled:T}),!d&&_.jsx(X9,{}),f&&_.jsx(Z9,{onPromptClick:v,disabled:T}),!T&&y&&_.jsx("p",{className:F(e,`${C}-prompts-connecting-message`),children:"Connecting to agent..."}),T&&_.jsx("p",{className:F(e,`${C}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),p)},tF=()=>(Y9(),_.jsx(eF,{})),g_=e=>_.jsxs(jg,ue(U({},e),{children:[_.jsx(q9,{}),_.jsx(tF,{})]}));var Ql={},E_;function nF(){if(E_)return Ql;E_=1;var e=Yg();return Ql.createRoot=e.createRoot,Ql.hydrateRoot=e.hydrateRoot,Ql}var rF=nF();const y_=(e,t,n,r)=>{rF.createRoot(e).render(_.jsx(g_,ue(U({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},iF=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=pn(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let l;const d=(p,m)=>{for(const T of p)if(T.type==="childList"&&T.addedNodes.length)for(const y of T.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(Pt(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(l),y_(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),Pt(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},sF=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=pn(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){Pt(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){Pt(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){Pt(!0,"warn","Container element not found for id:",t),Pt(!0,"warn","Beginning observation for element"),iF(U({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}y_(l,s,n,r)};class oF extends HTMLElement{constructor(){super(...arguments);Ge(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const aF={components:{setEntryType:Bg,toggleWidgetOpen:Br,toggleWidgetMinimized:zu,toggleModalFullscreen:nf,setWidgetType:$u,setWidgetDialogPosition:rf,loadPromptsComponent:PD,togglePromptsExtensionOpen:Sb}};De.AgentForceWidget=g_,De.AgentforceWidgetProvider=jg,De.CIMULATE_WIDGET_READY_EVENT=yg,De.MessagingDialog=f_,De.MessagingEmbed=c_,De.MessagingModal=h_,De.MessagingProvider=xg,De.OverrideElement=oF,De.eventHandlers=aF,De.injectMessagingWidget=sF,De.useMessaging=cn,Object.defineProperty(De,Symbol.toStringTag,{value:"Module"})}));
47
+ `}));return m(),p(),b+`
48
+ `+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
49
+ `))+1))}const u="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,H({before:"# ",after:`
50
+ `},a.current()));return/^[\t ]/.test(f)&&(f=Da(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}Hb.peek=J8;function Hb(e){return e.value||""}function J8(){return"<"}jb.peek=Z8;function jb(e,t,n,r){const s=op(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,H({before:f,after:"]"},d.current()))),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,H({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,H({before:f,after:s},d.current()))),f+=d.move(s),c()),f+=d.move(")"),u(),f}function Z8(){return"!"}zb.peek=eM;function zb(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,H({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),H({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function eM(){return"!"}$b.peek=tM;function $b(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";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 f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function tM(){return"`"}function Vb(e,t){const n=xf(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))}qb.peek=nM;function qb(e,t,n,r){const s=op(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(Vb(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,H({before:m,after:">"},u.current()))),m+=u.move(">"),c(),n.stack=p,m}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,H({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,H({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,H({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,H({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),c(),f}function nM(e,t,n){return Vb(e,n)?"<":"["}Yb.peek=rM;function Yb(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,H({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),H({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function rM(){return"["}function ap(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 iM(e){const t=ap(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 sM(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 Wb(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 oM(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?sM(n):ap(n);const c=e.ordered?u==="."?")":".":iM(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),Wb(n)===u&&p){let m=-1;for(;++m<e.children.length;){const b=e.children[m];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function aM(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 uM(e,t,n,r){const s=aM(n);let a=n.bulletCurrent||ap(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;(s==="tab"||s==="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"),f=n.indentLines(n.containerFlow(e,c.current()),p);return d(),f;function p(m,b,y){return b?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function lM(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const cM=ul(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function dM(e,t,n,r){return(e.children.some(function(u){return cM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function fM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Gb.peek=hM;function Gb(e,t,n,r){const s=fM(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(s+s);let d=u.move(n.containerPhrasing(e,H({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=Gl(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Da(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=Gl(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Da(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function hM(e,t,n){return n.options.strong||"*"}function pM(e,t,n,r){return n.safe(e.value,r)}function mM(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 gM(e,t,n){const r=(Wb(n)+(n.options.ruleSpaces?" ":"")).repeat(mM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Xb={blockquote:U8,break:Bb,code:q8,definition:W8,emphasis:Ub,hardBreak:Bb,heading:K8,html:Hb,image:jb,imageReference:zb,inlineCode:$b,link:qb,linkReference:Yb,list:oM,listItem:uM,paragraph:lM,root:dM,strong:Gb,text:pM,thematicBreak:gM};function EM(){return{enter:{table:yM,tableData:Qb,tableHeader:Qb,tableRow:bM},exit:{codeText:xM,table:TM,tableData:up,tableHeader:up,tableRow:up}}}function yM(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 TM(e){this.exit(e),this.data.inTable=void 0}function bM(e){this.enter({type:"tableRow",children:[]},e)}function up(e){this.exit(e)}function Qb(e){this.enter({type:"tableCell",children:[]},e)}function xM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,_M));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function _M(e,t){return t==="|"?t:e}function wM(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=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:b,table:u,tableCell:d,tableRow:c}};function u(y,x,A,v){return f(p(y,A,v),y.align)}function c(y,x,A,v){const w=m(y,A,v),k=f([w]);return k.slice(0,k.indexOf(`
52
+ `))}function d(y,x,A,v){const w=A.enter("tableCell"),k=A.enter("phrasing"),C=A.containerPhrasing(y,ce(H({},v),{before:a,after:a}));return k(),w(),C}function f(y,x){return F8(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function p(y,x,A){const v=y.children;let w=-1;const k=[],C=x.enter("table");for(;++w<v.length;)k[w]=m(v[w],x,A);return C(),k}function m(y,x,A){const v=y.children;let w=-1;const k=[],C=x.enter("tableRow");for(;++w<v.length;)k[w]=d(v[w],y,x,A);return C(),k}function b(y,x,A){let v=Xb.inlineCode(y,x,A);return A.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function SM(){return{exit:{taskListCheckValueChecked:Kb,taskListCheckValueUnchecked:Kb,paragraph:AM}}}function vM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:NM}}}function Kb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function AM(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 s=t.children;let a=-1,u;for(;++a<s.length;){const c=s[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 NM(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=Xb.listItem(e,t,n,H(H({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function kM(){return[o8(),N8(),I8(),EM(),SM()]}function CM(e){return{extensions:[a8(),k8(e),P8(),wM(e),vM()]}}const OM={tokenize:MM,partial:!0},Jb={tokenize:FM,partial:!0},Zb={tokenize:BM,partial:!0},ex={tokenize:UM,partial:!0},IM={tokenize:HM,partial:!0},tx={name:"wwwAutolink",tokenize:LM,previous:rx},nx={name:"protocolAutolink",tokenize:DM,previous:ix},qr={name:"emailAutolink",tokenize:RM,previous:sx},Or={};function PM(){return{text:Or}}let ls=48;for(;ls<123;)Or[ls]=qr,ls++,ls===58?ls=65:ls===91&&(ls=97);Or[43]=qr,Or[45]=qr,Or[46]=qr,Or[95]=qr,Or[72]=[qr,nx],Or[104]=[qr,nx],Or[87]=[qr,tx],Or[119]=[qr,tx];function RM(e,t,n){const r=this;let s,a;return u;function u(m){return!lp(m)||!sx.call(r,r.previous)||cp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return lp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(IM,p,f)(m):m===45||m===95||sn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function LM(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!rx.call(r,r.previous)||cp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(OM,e.attempt(Jb,e.attempt(Zb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function DM(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&ix.call(r,r.previous)&&!cp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(pn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||el(m)||ht(m)||Gi(m)||tl(m)?n(m):e.attempt(Jb,e.attempt(Zb,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function MM(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function FM(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(ex,d,c)(f):f===null||ht(f)||Gi(f)||f!==45&&tl(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function BM(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):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(ex,t,a)(u):u===null||ht(u)||Gi(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function UM(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),s):c===60||c===null||ht(c)||Gi(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||ht(c)||Gi(c)?t(c):r(c)}function a(c){return pn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):pn(c)?(e.consume(c),u):n(c)}}function HM(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return sn(a)?n(a):t(a)}}function rx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function ix(e){return!pn(e)}function sx(e){return!(e===47||lp(e))}function lp(e){return e===43||e===45||e===46||e===95||sn(e)}function cp(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 jM={tokenize:XM,partial:!0};function zM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:YM,continuation:{tokenize:WM},exit:GM}},text:{91:{name:"gfmFootnoteCall",tokenize:qM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$M,resolveTo:VM}}}}function $M(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][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 f=sr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function VM(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)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.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",s,t],["exit",s,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 qM(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||ht(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(sr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ht(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function YM(e,t,n){const r=this,s=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"),f}function f(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||ht(x))return n(x);if(x===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=sr(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ht(x)||(c=!0),u++,e.consume(x),x===92?m:p}function m(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}function b(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),nt(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function WM(e,t,n){return e.check(aa,t,e.attempt(jM,t,n))}function GM(e){e.exit("gfmFootnoteDefinition")}function XM(e,t,n){const r=this;return nt(e,s,"gfmFootnoteDefinitionIndent",5);function s(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 QM(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&Mn(b,b.length,0,nl(y,u.slice(f+1,d),c)),Mn(b,b.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Mn(u,f-1,d-f+3,b),d=f+b.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 f=this.previous,p=this.events;let m=0;return b;function b(x){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const A=Hs(f);if(x===126)return m>1?d(x):(u.consume(x),m++,y);if(m<2&&!n)return d(x);const v=u.exit("strikethroughSequenceTemporary"),w=Hs(x);return v._open=!w||w===2&&!!A,v._close=!A||A===2&&!!w,c(x)}}}class KM{constructor(){this.map=[]}add(t,n,r){JM(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 s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function JM(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function ZM(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function e9(){return{flow:{null:{name:"table",tokenize:t9,resolveAll:n9}}}}function t9(e,t,n){const r=this;let s=0,a=0,u;return c;function c($){let le=r.events.length-1;for(;le>-1;){const de=r.events[le][1].type;if(de==="lineEnding"||de==="linePrefix")le--;else break}const Z=le>-1?r.events[le][1].type:null,Ae=Z==="tableHead"||Z==="tableRow"?L:d;return Ae===L&&r.parser.lazy[r.now().line]?n($):Ae($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):He($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):et($)?nt(e,p,"whitespace")($):(a+=1,u&&(u=!1,s+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m($)))}function m($){return $===null||$===124||ht($)?(e.exit("data"),p($)):(e.consume($),$===92?b:m)}function b($){return $===92||$===124?(e.consume($),m):m($)}function y($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),u=!1,et($)?nt(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):x($))}function x($){return $===45||$===58?v($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),A):G($)}function A($){return et($)?nt(e,v,"whitespace")($):v($)}function v($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),w):$===45?(a+=1,w($)):$===null||He($)?j($):G($)}function w($){return $===45?(e.enter("tableDelimiterFiller"),k($)):G($)}function k($){return $===45?(e.consume($),k):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C($))}function C($){return et($)?nt(e,j,"whitespace")($):j($)}function j($){return $===124?x($):$===null||He($)?!u||s!==a?G($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):G($)}function G($){return n($)}function L($){return e.enter("tableRow"),W($)}function W($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),W):$===null||He($)?(e.exit("tableRow"),t($)):et($)?nt(e,W,"whitespace")($):(e.enter("data"),ie($))}function ie($){return $===null||$===124||ht($)?(e.exit("data"),W($)):(e.consume($),$===92?fe:ie)}function fe($){return $===92||$===124?(e.consume($),ie):ie($)}}function n9(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const b=new KM;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(c=!1,d!==0&&(ox(b,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",f,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,m=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)},b.add(n,0,[["enter",p,t]])),s=x.type==="tableDelimiterRow"?2:p?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=Xl(b,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=Xl(b,t,a,s,void 0,m)),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],m=Xl(b,t,a,s,n,m)):u[1]!==0&&(m=Xl(b,t,u,s,n,m)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&ox(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=ZM(t.events,n))}return e}function Xl(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},fo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=fo(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 f=fo(t.events,n[2]),p=fo(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,A=n[3]-n[2]-1;e.add(x,A,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},fo(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function ox(e,t,n,r,s){const a=[],u=fo(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function fo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const r9={name:"tasklistCheck",tokenize:s9};function i9(){return{text:{91:r9}}}function s9(e,t,n){const r=this;return s;function s(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 ht(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 He(d)?t(d):et(d)?e.check({tokenize:o9},t,n)(d):n(d)}}function o9(e,t,n){return nt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function a9(e){return D1([PM(),zM(),QM(e),e9(),i9()])}const u9={};function l9(e){const t=this,n=e||u9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(a9(n)),a.push(kM()),u.push(CM(n))}const c9=()=>_.jsx("span",{className:`${O}-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"})})}),ho=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>_.jsx(AE,{remarkPlugins:[l9],rehypePlugins:[Ny],components:{h1:({children:s})=>_.jsx("h1",{className:F(e,`${O}-header h1`),children:s}),h2:({children:s})=>_.jsx("h2",{className:F(e,`${O}-header h2`),children:s}),h3:({children:s})=>_.jsx("h3",{className:F(e,`${O}-header h3`),children:s}),ul:({children:s})=>_.jsx("ul",{className:F(e,`${O}-ul`),children:s}),ol:({children:s})=>_.jsx("ol",{className:F(e,`${O}-ol`),children:s}),li:({children:s})=>_.jsx("li",{className:F(e,`${O}-li`),children:s}),a:({href:s,children:a})=>_.jsx(Ly,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>_.jsx("div",{className:F(e,`${O}-table-container`),children:_.jsx("table",{className:F(e,`${O}-table`),children:s})}),thead:({children:s})=>_.jsx("thead",{className:F(e,`${O}-thead`),children:s}),tbody:({children:s})=>_.jsx("tbody",{className:F(e,`${O}-tbody`),children:s}),tr:({children:s})=>_.jsx("tr",{className:F(e,`${O}-tr`),children:s}),th:({children:s})=>_.jsx("th",{className:F(e,`${O}-th`),children:s}),td:({children:s})=>_.jsx("td",{className:F(e,`${O}-td`),children:s}),span:({className:s,children:a})=>s===`${O}-blinking-cursor`?_.jsx(c9,{}):_.jsx("span",{children:a})},children:r+(n?`<span className='${O}-blinking-cursor'></span>`:"")}),po=()=>B.useContext(zg),mo=()=>{const{sendMessage:e,loading:t,isConnected:n}=hn(),{mode:r,status:s}=ri();return B.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function d9(e){return e.includes("-")&&e===e.toLowerCase()}function go({tagName:e,props:t,label:n}){const r=B.useRef(null),s=B.useRef(null),a=B.useRef(e),u=B.useRef(null);return B.useEffect(()=>{const c=r.current;if(!c)return;if(a.current!==e&&(a.current=e,s.current=null),!d9(e)){u.current!==e&&(u.current=e,Rt(!0,"error",`[CimulateOverrides] ${n||"Override"} rejected: "${e}" is not a valid custom element name (must contain a hyphen and be lowercase, e.g. "product-card").`)),s.current=null,c.replaceChildren();return}const d=s.current;if(d&&d.isConnected)try{d.props=t;return}catch(f){Rt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error during props update:`,f),s.current=null,c.replaceChildren();return}try{const f=document.createElement(e);f.props=t,c.replaceChildren(f);const p=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(p)?f:null}catch(f){Rt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,c.replaceChildren()}},[e,t,n]),B.useEffect(()=>{const c=r.current;return()=>{s.current=null,c==null||c.replaceChildren()}},[]),_.jsx("div",{ref:r,"data-override":n||"custom"})}class f9 extends B.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){Rt(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function h9(e){return at({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Image_Off"},child:[{tag:"path",attr:{d:"M19.937,14.218l0,-8.654c0,-0.829 -0.672,-1.5 -1.5,-1.5l-10.628,-0c-0.276,-0 -0.5,-0.225 -0.5,-0.5c0,-0.276 0.224,-0.5 0.5,-0.5l10.628,-0c1.38,-0 2.5,1.118 2.5,2.5l0,10.624c0,0.276 -0.224,0.5 -0.5,0.501c-0.276,-0 -0.5,-0.225 -0.5,-0.5l0,-0.556l-4.583,-4.584c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.162,0.162 2.37,2.37 3.876,3.876Zm-0.121,6.304c-0.395,0.262 -0.869,0.415 -1.379,0.415l-12.874,-0c-1.381,-0 -2.5,-1.119 -2.5,-2.5l0,-12.873c0,-0.51 0.153,-0.984 0.414,-1.38l-0.263,-0.263c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.088,0.088 0.176,0.176 0.263,0.263c0.245,0.245 16.095,16.094 16.339,16.338l0.263,0.263c0.455,0.456 -0.252,1.163 -0.707,0.707c-0.088,-0.087 -0.175,-0.175 -0.263,-0.263Zm-11.104,-11.103l-2.001,-2.001c-0.094,0.196 -0.146,0.415 -0.146,0.647c-0,0.829 0.672,1.5 1.5,1.5c0.232,-0 0.451,-0.052 0.647,-0.146Zm-2.733,-2.733l-1.77,-1.77c-0.093,0.196 -0.146,0.416 -0.146,0.648l0,10.717l1.926,-1.926c0.587,-0.586 1.536,-0.586 2.122,-0l0.555,0.554c0.195,0.196 0.511,0.196 0.706,0l2.415,-2.415l-2.343,-2.343c-0.395,0.262 -0.869,0.414 -1.379,0.414c-1.38,-0 -2.5,-1.119 -2.5,-2.5c-0,-0.509 0.152,-0.983 0.414,-1.379Zm-1.916,11.009l0,0.741c0,0.829 0.671,1.5 1.5,1.5l12.874,0c0.232,0 0.451,-0.052 0.647,-0.145c-0.165,-0.165 -3.264,-3.263 -6.59,-6.59l-2.414,2.415c-0.585,0.586 -1.537,0.586 -2.122,0l-0.554,-0.554c-0.195,-0.196 -0.512,-0.196 -0.708,0l-2.633,2.633Z"},child:[]}]}]})(e)}const p9=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:c})=>{const{loading:d}=hn();return _.jsx("div",{className:F(t,`${O}-msg-product-card__image-wrapper`),children:e?n?_.jsx("button",{type:"button",className:F(t,`${O}-msg-product-card__image-button`),onClick:c,disabled:d,"aria-label":a,children:_.jsx("img",{className:F(t,`${O}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,children:_.jsx("img",{className:F(t,`${O}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):_.jsx("img",{className:F(t,`${O}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):_.jsx("div",{className:F(t,`${O}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:_.jsx(h9,{"aria-hidden":"true"})})})},m9=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:c}=hn();return n?_.jsx("button",{type:"button",disabled:c,onClick:u,className:F(t,`${O}-msg-product-card__title-link`),"aria-label":a,children:e}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:F(t,`${O}-msg-product-card__title-link`),"aria-label":a,children:e}):_.jsx("p",{className:F(t,`${O}-msg-product-card__title`),children:e})},g9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=ut(),{overrides:u,isInitialized:c}=po(),{sendMessage:d,loading:f}=hn(),p=mo(),m=c?u.ProductTile:void 0;if(m){const $={name:"ProductTile",payload:s!=null?s:{},api:p};return _.jsx(go,{tagName:m,props:$,label:"ProductTile"})}const{id:b,name:y,imageUrl:x,description:A,productPageUrl:v,price:w,priceBreakdown:k,discountPrice:C,listPrice:j,currencyCode:G}=e,L=C!=null?C:w,W=qD({priceBreakdown:k,currencyCode:G}),ie=()=>{if(f)return;const $=y||"this product",le=b?` [SKU: ${b}]`:"";d(`Show me details for ${$}${le}`)},fe=r?`View details for ${y}`:`Go to product page for ${y}`;return _.jsxs("div",{className:F(t,`${O}-msg-product-card`),children:[_.jsx(p9,{imageUrl:x||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:v,openLinksInNewTab:n,ariaLabel:fe,name:y,showInWidgetDetails:ie}),_.jsxs("div",{className:F(t,`${O}-msg-product-card__content`),children:[_.jsxs("div",{className:F(t,`${O}-msg-product-card__content-header`),children:[_.jsx(m9,{name:y||b,globalClassName:t,isCartMgmtSupported:r,productPageUrl:v,openLinksInNewTab:n,ariaLabel:fe,showInWidgetDetails:ie}),a&&A&&_.jsx("div",{className:F(t,`${O}-msg-product-card__description`),title:A,children:_.jsx(ho,{globalClassName:t,text:A})})]}),_.jsx("div",{className:F(t,`${O}-msg-product-card__price-row`),children:W?_.jsx("span",{className:F(t,`${O}-msg-product-card__price`),"aria-label":`Price from ${W.low} to ${W.high}`,children:W.range}):_.jsx(tp,{globalClassName:t,retailPrice:j,discountPrice:L,currencyCode:G})})]})]})},E9=e=>{var t,n;return{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,listPrice:(t=e.data.listPrice)!=null?t:void 0,priceBreakdown:(n=e.data.priceBreakdown)!=null?n:void 0,currencyCode:e.data.currencyCode}},y9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=ut(),{overrides:c,isInitialized:d}=po(),f=mo(),p=d?c.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return _.jsx(go,{tagName:p,props:m,label:"ProductCarousel"})}return _.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&_.jsx("p",{className:F(n,`${O}-product-carousel-title`),children:e}),_.jsx(pD,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>_.jsxs("div",{className:F(n,`${O}-product-carousel-item`),children:[_.jsx(g9,{product:E9(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&_.jsx("p",{className:F(n,`${O}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},dp=44,T9=400,b9=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?dp:Math.min(Math.max(Math.round(t),dp),T9)},x9=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},_9="parentOrigin",w9=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(_9,t),n.toString()}catch(n){return e}},S9=(e,t,n)=>{if(!e||!t)return null;try{const r=new URL(e,window.location.href);return r.origin!==window.location.origin||!/\/Payments-Express\/?$/.test(r.pathname)?null:(r.pathname=r.pathname.replace(/\/Payments-Express\/?$/,"/Payments-ExpressProduct"),r.searchParams.set("pid",t),r.searchParams.set("quantity",String(n)),r.toString())}catch(r){return null}},ax=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=B.useRef(null),[s,a]=B.useState(!1),[u,c]=B.useState(dp),d=typeof window!="undefined"?window.location.origin:"",f=w9(e,d),p=x9(e);return B.useEffect(()=>{const m=b=>{var x,A,v;if(p&&b.origin!==p||r.current&&b.source!==r.current.contentWindow)return;const y=b.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),c(b9((x=y.payload)==null?void 0:x.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((v=(A=y.payload)==null?void 0:A.orderId)!=null?v:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),_.jsx("div",{className:F(t,`${O}-cart-express`,{[`${O}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:_.jsx("iframe",{ref:r,className:F(t,`${O}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},Ql=({code:e,globalClassName:t})=>_.jsxs("span",{className:F(t,`${O}-cart-chip`),children:[_.jsx(r1,{"aria-hidden":"true"}),_.jsx("span",{children:e})]}),vn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:c,loading:d})=>{let f;if(typeof n=="number")n===0&&!u?f="Free":f=Vr(u?-n:n,r);else if(c)f=c;else return null;return _.jsxs("div",{className:F(s,`${O}-cart-total-row`,{emphasized:a}),children:[_.jsxs("span",{className:F(s,`${O}-cart-total-label`),children:[e,t&&_.jsx("span",{className:F(s,`${O}-cart-total-badge`),children:t})]}),_.jsx("span",{className:F(s,`${O}-cart-total-value`),children:d?_.jsx("span",{className:F(s,`${O}-cart-total-shimmer`)}):f})]})},v9=({quantity:e,loading:t,disabled:n,globalClassName:r,onChange:s})=>{const[a,u]=B.useState(e.toString());B.useEffect(()=>{u(e.toString())},[e]);const c=p=>{if(n)return;const m=p.target.value;/^\d*$/.test(m)&&u(m)},d=()=>{const p=parseInt(a,10);!n&&!isNaN(p)&&p>0&&p!==e?s(p):u(e.toString())},f=p=>{p.key==="Enter"&&(p.preventDefault(),d())};return _.jsx("div",{className:F(r,`${O}-cart-qty-input-wrapper`),children:t?_.jsx(LN,{className:F(r,`${O}-cart-qty-spinner`),"aria-hidden":"true"}):_.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:F(r,`${O}-cart-qty-input`),value:a,disabled:n,onChange:c,onBlur:d,onKeyDown:f,"aria-label":"Quantity"})})},A9=({item:e,currencyCode:t,loading:n,disabled:r,globalClassName:s,onRemove:a,onQuantityChange:u})=>{var d,f,p;const c=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:F(s,`${O}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(s,`${O}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(s,`${O}-cart-item-details`),children:[_.jsx("p",{className:F(s,`${O}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(s,`${O}-cart-item-attrs`),children:[((d=e.variants)!=null?d:[]).map(m=>_.jsxs("p",{className:F(s,`${O}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((f=e.promotions)!=null?f:[]).map(m=>_.jsxs("p",{className:F(s,`${O}-cart-item-attr`),children:["Promotion: ",m]},m))]}),((p=e.coupons)!=null?p:[]).length>0&&_.jsx("div",{className:F(s,`${O}-cart-chips`),children:e.coupons.map(m=>_.jsx(Ql,{code:m,globalClassName:s},m))}),_.jsx("span",{className:F(s,`${O}-cart-item-price`),children:n?_.jsx("span",{className:F(s,`${O}-cart-total-shimmer`)}):_.jsxs(_.Fragment,{children:[c&&_.jsx("span",{className:F(s,`${O}-cart-item-original-price`),children:Vr(e.originalSubtotal,t)}),_.jsx("span",{className:F(s,`${O}-cart-item-final-price`),children:Vr(e.itemSubtotal,t)})]})}),_.jsxs("div",{className:F(s,`${O}-cart-item-footer`),children:[_.jsx("span",{className:F(s,`${O}-cart-qty-heading`),children:"Quantity"}),_.jsx(v9,{quantity:e.quantity,loading:n,disabled:r,globalClassName:s,onChange:m=>u(e,m)}),_.jsx("button",{type:"button",className:F(s,`${O}-cart-item-remove`),disabled:r,onClick:()=>a(e),children:"Remove"})]})]})]})},N9=({cart:e,messageId:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s,loading:a,cartUpdating:u}=hn(),[c,d]=B.useState(!0),[f,p]=B.useState(""),[m,b]=B.useState(null),y=a||u,{items:x=[],currencyCode:A="USD",subtotal:v,total:w,taxes:k,shippingCost:C,shippingDiscount:j,shippingPromotions:G=[],promotionsDiscount:L,promotions:W=[],couponsDiscount:ie,couponsApplied:fe=[],bodyMessage:$,footerMessage:le,checkoutButtonUrl:Z,expressPaymentUrl:Ae}=e,de=Y=>{y||s(`Remove ${Y.name} from my cart`)},oe=Y=>{s(Y?`I completed express payment. Show my order confirmation for order ${Y}.`:"I completed express payment. Show my order confirmation.")},Se=(Y,ae)=>{y||m||ae<1||(b(Y.itemId),s(`Update ${Y.name} quantity to ${ae}`,{silent:!0,reconcileMessageId:t}).then(N=>{N.outcome==="success"?setTimeout(()=>b(null),300):b(null)}))},se=()=>{const Y=f.trim();!Y||y||(s(`Apply coupon code ${Y}`),p(""))};return _.jsxs("div",{className:F(n,`${O}-cart`),children:[_.jsxs("div",{className:F(n,`${O}-cart-box`),children:[$&&_.jsxs("button",{type:"button",className:F(n,`${O}-cart-summary`),"aria-expanded":c,onClick:()=>d(Y=>!Y),children:[_.jsx("span",{className:F(n,`${O}-cart-summary-text`),children:_.jsx(ho,{text:$,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1})}),_.jsx("span",{className:F(n,`${O}-cart-summary-toggle`),"aria-hidden":"true",children:c?_.jsx(t1,{}):_.jsx(n1,{})})]}),c&&_.jsxs("div",{className:F(n,`${O}-cart-expanded`),children:[_.jsxs("div",{className:F(n,`${O}-cart-items-section`),children:[_.jsx("ul",{className:F(n,`${O}-cart-items`),children:x.map(Y=>_.jsx(A9,{item:Y,currencyCode:A,loading:m===Y.itemId,disabled:y||m===Y.itemId,globalClassName:n,onRemove:de,onQuantityChange:Se},Y.itemId))}),fe.length>0&&_.jsx("div",{className:F(n,`${O}-cart-chips`,`${O}-cart-applied-coupons`),children:fe.map(Y=>_.jsx(Ql,{code:Y,globalClassName:n},Y))})]}),_.jsxs("div",{className:F(n,`${O}-cart-totals`),children:[_.jsx(vn,{label:"Subtotal",value:v,currencyCode:A,globalClassName:n,loading:!!m}),_.jsx(vn,{label:"Coupon",value:ie,currencyCode:A,globalClassName:n,isDiscount:!0,loading:!!m}),_.jsx(vn,{label:"Promotions",badge:W[0],value:L,currencyCode:A,globalClassName:n,isDiscount:!0,loading:!!m}),_.jsx(vn,{label:"Shipping",value:C,currencyCode:A,globalClassName:n,fallback:"TBD",loading:!!m}),_.jsx(vn,{label:"Shipping Discount",badge:G[0],value:j,currencyCode:A,globalClassName:n,isDiscount:!0,loading:!!m}),_.jsx(vn,{label:"Tax",value:k,currencyCode:A,globalClassName:n,fallback:"TBD",loading:!!m}),_.jsx(vn,{label:"Total",value:w,currencyCode:A,globalClassName:n,emphasized:!0,loading:!!m})]})]})]}),_.jsxs("div",{className:F(n,`${O}-cart-coupon`),children:[_.jsxs("div",{className:F(n,`${O}-cart-coupon-field`),children:[_.jsx("span",{className:F(n,`${O}-cart-coupon-icon`),"aria-hidden":"true",children:_.jsx(r1,{})}),_.jsx("input",{type:"text",className:F(n,`${O}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:f,disabled:y,onChange:Y=>p(Y.target.value),onKeyDown:Y=>{Y.key==="Enter"&&(Y.preventDefault(),se())}})]}),_.jsx("button",{type:"button",className:F(n,`${O}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:y||!f.trim(),onClick:se,children:_.jsx(FN,{"aria-hidden":"true"})})]}),Ae&&_.jsx(ax,{expressPaymentUrl:Ae,globalClassName:n,onOrderComplete:oe}),Z&&_.jsxs("a",{className:F(n,`${O}-cart-checkout-button`),href:Z,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[_.jsx(DN,{"aria-hidden":"true"}),_.jsx("span",{children:"Checkout"})]}),_.jsx("p",{className:F(n,`${O}-cart-footer`),children:le||"Shipping and taxes calculated at checkout."})]})},k9=({item:e,currencyCode:t,globalClassName:n})=>{var s,a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:F(n,`${O}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(n,`${O}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(n,`${O}-cart-item-details`),children:[_.jsx("p",{className:F(n,`${O}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(n,`${O}-cart-item-attrs`),children:[((s=e.variants)!=null?s:[]).map(c=>_.jsxs("p",{className:F(n,`${O}-cart-item-attr`),children:[c.lbl,": ",c.value]},`${c.type}-${c.value}`)),((a=e.promotions)!=null?a:[]).map(c=>_.jsxs("p",{className:F(n,`${O}-cart-item-attr`),children:["Promotion: ",c]},c))]}),((u=e.coupons)!=null?u:[]).length>0&&_.jsx("div",{className:F(n,`${O}-cart-chips`),children:e.coupons.map(c=>_.jsx(Ql,{code:c,globalClassName:n},c))}),_.jsxs("span",{className:F(n,`${O}-cart-item-price`),children:[r&&_.jsx("span",{className:F(n,`${O}-cart-item-original-price`),children:Vr(e.originalSubtotal,t)}),_.jsx("span",{className:F(n,`${O}-cart-item-final-price`),children:Vr(e.itemSubtotal,t)})]}),_.jsx("div",{className:F(n,`${O}-cart-item-footer`),children:_.jsxs("span",{className:F(n,`${O}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},C9=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},O9=({order:e,globalClassName:t})=>{const[n,r]=B.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:c="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:b,shippingPromotions:y=[],promotionsDiscount:x,promotions:A=[],couponsDiscount:v,couponsApplied:w=[],bodyMessage:k,footerMessage:C}=e;return _.jsxs("div",{className:F(t,`${O}-cart`),children:[_.jsxs("div",{className:F(t,`${O}-cart-banner`),children:[_.jsx("span",{className:F(t,`${O}-cart-banner-icon`),"aria-hidden":"true",children:_.jsx(BN,{})}),_.jsx("p",{className:F(t,`${O}-cart-banner-text`),children:"Your order is confirmed!"})]}),_.jsxs("div",{className:F(t,`${O}-order-confirmation-meta`),children:[_.jsxs("span",{children:["Order No: ",s]}),_.jsxs("span",{children:["Ordered On: ",C9(a)]})]}),_.jsxs("div",{className:F(t,`${O}-cart-box`),children:[k&&_.jsxs("button",{type:"button",className:F(t,`${O}-cart-summary`),"aria-expanded":n,onClick:()=>r(j=>!j),children:[_.jsx("span",{className:F(t,`${O}-cart-summary-text`),children:_.jsx(ho,{text:k,globalClassName:t,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${O}-cart-summary-toggle`),"aria-hidden":"true",children:n?_.jsx(t1,{}):_.jsx(n1,{})})]}),n&&_.jsxs("div",{className:F(t,`${O}-cart-expanded`),children:[_.jsx("ul",{className:F(t,`${O}-cart-items`),children:u.map(j=>_.jsx(k9,{item:j,currencyCode:c,globalClassName:t},j.itemId))}),w.length>0&&_.jsx("div",{className:F(t,`${O}-cart-chips`,`${O}-cart-applied-coupons`),children:w.map(j=>_.jsx(Ql,{code:j,globalClassName:t},j))}),_.jsxs("div",{className:F(t,`${O}-cart-totals`),children:[_.jsx(vn,{label:"Subtotal",value:d,currencyCode:c,globalClassName:t}),_.jsx(vn,{label:"Coupon",value:v,currencyCode:c,globalClassName:t,isDiscount:!0}),_.jsx(vn,{label:"Promotions",badge:A[0],value:x,currencyCode:c,globalClassName:t,isDiscount:!0}),_.jsx(vn,{label:"Shipping",value:m,currencyCode:c,globalClassName:t,fallback:"TBD"}),_.jsx(vn,{label:"Shipping Discount",badge:y[0],value:b,currencyCode:c,globalClassName:t,isDiscount:!0}),_.jsx(vn,{label:"Tax",value:p,currencyCode:c,globalClassName:t,fallback:"TBD"}),_.jsx(vn,{label:"Total",value:f,currencyCode:c,globalClassName:t,emphasized:!0})]})]})]}),_.jsx("p",{className:F(t,`${O}-cart-footer`),children:C||"Shipping and taxes calculated at checkout."})]})},I9=({image:e,alt:t,globalClassName:n})=>{const[r,s]=B.useState(e.src),[a,u]=B.useState(!1),c=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return _.jsx("img",{className:F(n,`${O}-pdp-gallery__image`,{[`${O}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:c})},P9=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return _.jsxs(Gh,{className:F(n,`${O}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[_.jsx(qh,{className:F(n,`${O}-pdp-gallery__item-group`),children:e.map((s,a)=>_.jsx(Vh,{index:a,className:F(n,`${O}-pdp-gallery__item`),children:_.jsx(I9,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&_.jsxs(jh,{className:F(n,`${O}-pdp-gallery__control`),children:[_.jsx(Wh,{className:F(n,`${O}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:_.jsx(ib,{size:"16px"})}),_.jsx(Yh,{className:F(n,`${O}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:_.jsx(sb,{size:"16px"})})]}),r&&_.jsx($h,{className:F(n,`${O}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>_.jsx(zh,{index:a,className:F(n,`${O}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Ma="color",fp=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,R9=e=>e.replace(/(^|\/)large\//,"$1medium/"),ux=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Ma&&n.vals.includes(t)),lx=(e,t)=>{const n=R9(t),r=fp(e,n);return n===t?{src:r}:{src:r,fallbackSrc:fp(e,t)}},L9=(e,t)=>{var c,d;const n=((c=e.imgGroups)!=null?c:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>ux(f,t)),s=n.find(f=>f.vattr===null),a=r||s||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(f=>lx(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[lx(e.baseUrl,e.imageUrl)]:[]},D9=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(c=>c.viewType==="swatch"&&ux(c,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?fp(e.baseUrl,r):""},Kl=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(s=>{var a;return((a=s.vars)==null?void 0:a[t])!==n||s.ord===!1?!1:Object.entries(r).every(([u,c])=>{var d;return u===t||((d=s.vars)==null?void 0:d[u])===c})}),M9=(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(s=>{var a;return((a=r.vars)==null?void 0:a[s])===t[s]}))},F9=(e,t,n,r,s)=>{if(!e||e.length===0)return ce(H({},s),{[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(s).every(([f,p])=>{var m;return f===n||((m=c.vars)==null?void 0:m[f])===p})});if(a)return H({},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?H({},u.vars):ce(H({},s),{[n]:r})},cx=(e,t)=>{var s,a,u,c;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(s=e.id)!=null?s: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(([f,p])=>{var m;return((m=d.vars)==null?void 0:m[f])===p}));return(c=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?c:null},B9=(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(([s,a])=>{var u;return((u=r.vars)==null?void 0:u[s])===a}));return n!=null&&n.pr?n.pr:e.pr},U9=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>Kl(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},H9=300,j9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var dt,qt,Dt,An,Ee,ke,K;const{addToCart:s,sendMessage:a,loading:u}=hn(),{overrides:c,isInitialized:d}=po(),f=mo(),p=e.data,m=(dt=p.vattr)!=null?dt:[],[b,y]=B.useState(()=>U9(p)),x=M9(p.vmat,b),A=(Dt=(qt=p.quantity)==null?void 0:qt.minQuantity)!=null?Dt:1,v=(Ee=(An=p.quantity)==null?void 0:An.maxQuantity)!=null?Ee:Number.POSITIVE_INFINITY,w=(K=(ke=p.quantity)==null?void 0:ke.increment)!=null?K:1,[k,C]=B.useState(A),[j,G]=B.useState(!1),L=B.useRef(!1);B.useEffect(()=>{j&&(u?L.current=!0:L.current&&(L.current=!1,G(!1)))},[j,u]);const W=b[Ma],ie=B.useMemo(()=>L9(p,W),[p,W]),fe=B.useMemo(()=>B9(p,b),[p,b]),$=m.find(ne=>ne.id===Ma),le=m.filter(ne=>ne.id!==Ma),Z=cx(p,b),[Ae,de]=B.useState(k),oe=B.useRef(Z),Se=oe.current===Z?Ae:k;B.useEffect(()=>{if(oe.current!==Z){oe.current=Z,de(k);return}const ne=window.setTimeout(()=>de(k),H9);return()=>window.clearTimeout(ne)},[k,Z]);const se=k===Ae,Y=B.useMemo(()=>x&&(oe.current!==Z||se)?S9(p.expressPaymentUrl,Z,Se):null,[p.expressPaymentUrl,Z,Se,x,se]),ae=B.useCallback(ne=>{a(ne?`I completed express payment. Show my order confirmation for order ${ne}.`:"I completed express payment. Show my order confirmation.")},[a]),N=d?c.ProductDetailCard:void 0;if(N){const ne={name:"ProductDetailCard",payload:e,api:f};return _.jsx(go,{tagName:N,props:ne,label:"ProductDetailCard"})}const D=(ne,ge)=>()=>{y(je=>{const Qe=!Kl(p.vmat,ne,ge,je);return ne===Ma||Qe?F9(p.vmat,m,ne,ge,je):ce(H({},je),{[ne]:ge})})},ee=()=>{if(u)return;const ne=cx(p,b);if(!ne)return;const ge=m.map(je=>{const Qe=je.opts.find(Ct=>Ct.val===b[je.id]);return Qe?{label:je.lbl||je.id,value:Qe.name||Qe.val}:null}).filter(je=>je!==null);G(!0),s({productName:p.name,sku:ne,quantity:k,variants:ge})},P=!x||k-w<A,ve=!x||k+w>v,Ce=ne=>{var je;const ge=b[ne.id];return(je=ne.opts.find(Qe=>Qe.val===ge))==null?void 0:je.name},he=()=>C(ne=>Math.max(A,ne-w)),Le=()=>C(ne=>Math.min(v,ne+w)),Be=ne=>_.jsxs("div",{className:F(t,`${O}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${O}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${ne.id}`,className:F(t,`${O}-msg-pdp__variant-name`),children:ne.lbl||ne.id}),Ce(ne)&&_.jsx("span",{className:F(t,`${O}-msg-pdp__variant-value`),children:Ce(ne)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${ne.id}`,className:F(t,`${O}-msg-pdp__chips`),children:ne.opts.map(ge=>{const je=Kl(p.vmat,ne.id,ge.val,b),Qe=b[ne.id]===ge.val;return _.jsxs("label",{className:F(`${O}-msg-pdp__chip`,{selected:Qe,unavailable:!je}),children:[_.jsx("input",{type:"radio",name:`variant-${ne.id}`,value:ge.val,checked:Qe,"aria-description":je?void 0:"unavailable",onChange:D(ne.id,ge.val),className:`${O}-msg-pdp__radio-input`}),_.jsx("span",{children:ge.name||ge.val})]},ge.val)})})]},ne.id),Ge=ne=>_.jsxs("div",{className:F(t,`${O}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${O}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${ne.id}`,className:F(t,`${O}-msg-pdp__variant-name`),children:ne.lbl||"Color"}),Ce(ne)&&_.jsx("span",{className:F(t,`${O}-msg-pdp__variant-value`),children:Ce(ne)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${ne.id}`,className:F(t,`${O}-msg-pdp__swatches`),children:ne.opts.map(ge=>{const je=Kl(p.vmat,ne.id,ge.val,b),Qe=b[ne.id]===ge.val,Ct=D9(p,ge.val);return Ct?_.jsxs("label",{className:F(`${O}-msg-pdp__swatch`,{selected:Qe,unavailable:!je}),children:[_.jsx("input",{type:"radio",name:`variant-${ne.id}`,value:ge.val,checked:Qe,"aria-label":ge.name||ge.val,"aria-description":je?void 0:"unavailable",onChange:D(ne.id,ge.val),className:`${O}-msg-pdp__radio-input`}),_.jsx("img",{className:F(t,`${O}-msg-pdp__swatch-image`),src:Ct,alt:ge.name||ge.val,loading:"lazy"})]},ge.val):_.jsxs("label",{className:F(`${O}-msg-pdp__chip`,{selected:Qe,unavailable:!je}),children:[_.jsx("input",{type:"radio",name:`variant-${ne.id}`,value:ge.val,checked:Qe,"aria-description":je?void 0:"unavailable",onChange:D(ne.id,ge.val),className:`${O}-msg-pdp__radio-input`}),_.jsx("span",{children:ge.name||ge.val})]},ge.val)})})]});return _.jsx("div",{className:F(t,`${O}-msg-pdp`),children:_.jsxs("div",{className:F(t,`${O}-msg-pdp__card`),children:[_.jsx("div",{className:F(t,`${O}-msg-pdp__gallery`),children:_.jsx(P9,{images:ie,altText:p.name,globalClassName:t})}),_.jsxs("div",{className:F(t,`${O}-msg-pdp__content`),children:[p.slugUrl?_.jsx("a",{href:p.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:F(t,`${O}-msg-pdp__title-link`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):_.jsx("p",{className:F(t,`${O}-msg-pdp__title`),children:p.name}),_.jsx(tp,{globalClassName:t,className:`${O}-msg-pdp__price`,retailPrice:fe==null?void 0:fe.orig,discountPrice:(fe==null?void 0:fe.cur)||(fe==null?void 0:fe.prom),currencyCode:p.ccy,fontSize:"14px"}),p.dscr&&_.jsx("div",{className:F(t,`${O}-msg-pdp__description`),children:_.jsx(ho,{globalClassName:t,text:p.dscr})}),$&&Ge($),le.map(Be),r&&_.jsxs("div",{className:F(t,`${O}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${O}-msg-pdp__variant-label`),children:[_.jsx("span",{className:F(t,`${O}-msg-pdp__variant-name`),children:"Quantity"}),_.jsx("span",{className:F(t,`${O}-msg-pdp__variant-value`),children:k})]}),_.jsxs("div",{className:F(t,`${O}-msg-pdp__stepper`),children:[_.jsx(ir,{className:`${O}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:_.jsx(vN,{}),disabled:P,onClick:he}),_.jsx("span",{className:F(t,`${O}-msg-pdp__quantity`),children:k}),_.jsx(ir,{className:`${O}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:_.jsx(AN,{}),disabled:ve,onClick:Le})]})]}),r&&_.jsxs("div",{className:F(t,`${O}-msg-pdp__actions`),children:[Y&&_.jsx(ax,{expressPaymentUrl:Y,globalClassName:t,onOrderComplete:ae},Y),_.jsx(Ku,{className:`${O}-msg-pdp__add-to-cart`,disabled:!x||u||j,onClick:ee,children:j?"Adding...":"Add to cart"})]})]})]})})},z9=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},$9=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:s=!1})=>{const{addToCart:a,loading:u}=hn(),{overrides:c,isInitialized:d}=po(),f=mo(),p=d?c.ProductComparison:void 0;if(p){const x={name:"ProductComparison",payload:{products:e,table:t},api:f};return _.jsx(go,{tagName:p,props:x,label:"ProductComparison"})}if(!e.length)return null;const m=`auto repeat(${e.length}, 1fr)`,b=`${90+e.length*140}px`,y=x=>()=>{u||a({productName:x.name,sku:x.id})};return _.jsx("div",{className:F(n,`${O}-product-comparison`),children:_.jsxs("div",{className:`${O}-product-comparison__grid`,style:{gridTemplateColumns:m,minWidth:b},children:[_.jsxs("div",{className:`${O}-product-comparison__header`,children:[_.jsx("div",{className:`${O}-product-comparison__header-spacer`}),e.map(x=>{var v,w,k,C;const A=z9(x);return _.jsxs("div",{className:F(n,`${O}-product-comparison__product-col`),children:[A&&_.jsx("img",{className:F(n,`${O}-product-comparison__image`),src:A,alt:x.name||"Product image",loading:"eager"}),x.slugUrl?_.jsx("a",{href:x.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:F(n,`${O}-product-comparison__name`),"aria-label":`Go to product page for ${x.name}`,children:x.name}):_.jsx("span",{className:F(n,`${O}-product-comparison__name`),children:x.name}),_.jsx(tp,{globalClassName:n,retailPrice:(v=x.pr)==null?void 0:v.orig,discountPrice:(C=(w=x.pr)==null?void 0:w.prom)!=null?C:(k=x.pr)==null?void 0:k.cur,currencyCode:x.ccy,fontSize:"0.875rem"})]},x.id)})]}),_.jsx("div",{className:`${O}-product-comparison__table`,children:t.map(x=>_.jsxs("div",{className:`${O}-product-comparison__row`,children:[_.jsx("div",{className:F(n,`${O}-product-comparison__row-label`),children:x.row_name}),e.map((A,v)=>_.jsx("div",{className:F(n,`${O}-product-comparison__row-value`),children:x.values[v]},`${x.row_name}-${A.id}`))]},x.row_name))}),s&&_.jsxs("div",{className:`${O}-product-comparison__footer`,children:[_.jsx("div",{className:`${O}-product-comparison__footer-spacer`}),e.map(x=>_.jsx("div",{className:F(n,`${O}-product-comparison__footer-cell`),children:_.jsxs(Ku,{className:`${O}-product-comparison__add-to-cart`,disabled:u,onClick:y(x),children:[_.jsx(RN,{size:"14px"}),"Add to cart"]})},`cart-${x.id}`))]})]})})},dx=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{sendMessage:a,loading:u,cartUpdating:c}=hn(),{isCartMgmtSupported:d,logger:f}=ut(),{overrides:p,isInitialized:m}=po(),b=mo(),y=B.useMemo(()=>e.response.map(x=>{var v,w;if(x.type!=="markdown")return x;const A=hg((w=(v=x.data)==null?void 0:v.content)!=null?w:"");return A&&A.type!=="markdown"?A:x}),[e.response]);return _.jsx(_.Fragment,{children:y.map((x,A)=>{var v,w,k,C,j,G,L,W,ie,fe,$,le,Z,Ae,de,oe,Se,se,Y,ae,N,D,ee,P,ve;switch(x.type){case"markdown":{const Ce=(w=(v=x.data)==null?void 0:v.content)!=null?w:"";return x.index===ji&&pg(Ce)?null:_.jsx(ho,{text:Ce,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${x.type}-${(k=x.index)!=null?k:A}`)}case"product_carousel":return _.jsx(y9,{title:(j=(C=x.data)==null?void 0:C.title)!=null?j:"",products:(L=(G=x.data)==null?void 0:G.products)!=null?L:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(W=x.index)!=null?W:A}`);case"product_tile":return _.jsx(j9,{product:x.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(ie=x.index)!=null?ie:A}`);case"product_comparison":return _.jsx($9,{products:($=(fe=x.data)==null?void 0:fe.products)!=null?$:[],table:(Z=(le=x.data)==null?void 0:le.table)!=null?Z:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(Ae=x.index)!=null?Ae:A}`);case"cart":{const Ce=(Se=(oe=(de=x.data)==null?void 0:de.cart)==null?void 0:oe.cartSummary)==null?void 0:Se.cartDetails;return Ce?_.jsx(N9,{cart:Ce,messageId:t,productsToHighlight:x.data.products_to_highlight,globalClassName:n,openLinksInNewTab:r},`${x.type}-${(se=x.index)!=null?se:A}`):null}case"order_confirmation":{const Ce=(ae=(Y=x.data)==null?void 0:Y.order)==null?void 0:ae.orderDetails;return Ce?_.jsx(O9,{order:Ce,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${x.type}-${(N=x.index)!=null?N:A}`):null}case"tool_results":{const Ce=x.data,he=x.output_name,Le=m&&he&&Object.prototype.hasOwnProperty.call(p,he)?p[he]:void 0,Be=typeof Le=="string"?Le:void 0;if(!Be||!he)return f!=null&&f.isDevelopment&&(he?f.warn(`🦜 tool_results "${he}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${he}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(p),payload:Ce}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:Ce})),null;const Ge={name:he,payload:Ce,api:b};return _.jsx(f9,{overrideName:he,children:_.jsx(go,{tagName:Be,props:Ge,label:`toolResult:${he}`})},`${x.type}-${he}-${(D=x.index)!=null?D:A}`)}case"suggestions":return _.jsx("div",{style:{marginTop:"0.5rem"},children:_.jsx(WD,{disabled:u||c,suggestions:(P=(ee=x.data)==null?void 0:ee.display_text)!=null?P:[],globalClassName:n,isWidgetStandalone:s,onSuggestionClick:a})},`${x.type}-${(ve=x.index)!=null?ve:A}`);default:return null}})})},V9=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=ut(),a=B.useMemo(()=>{if(typeof e.content!="string")return null;const c=Hd(e.content);if(c)return c;const d=hg(e.content);return d?{response:[d]}:null},[e.content]),u=B.useMemo(()=>{const c="Oops, I had trouble with your request.";if(typeof e.content!="string")return s==null||s.warn("Message content is not richtext format. Showing fallback text.",e.content),c;const d=e.content.trim();try{const f=JSON.parse(d);if(typeof f=="object"&&f!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),f.text||f.message||c}catch(f){if(d.startsWith("{")||d.startsWith("["))return s==null||s.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),c}return e.content||c},[s,e.content]);switch(e.role){case"user":return _.jsx("div",{className:F(t,`${O}-message`,r?"standalone":"embedded"),children:_.jsx("div",{className:F(t,`${O}-user-message`,r?"standalone":"embedded"),children:_.jsxs("div",{className:F(t,`${O}-user-message-row`,r?"standalone":"embedded"),children:[_.jsx("span",{className:F(t,`${O}-message-icon user-message-icon`,r?"standalone":"embedded"),children:_.jsx(MN,{})}),_.jsx("p",{className:F(t,`${O}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return _.jsx("div",{className:F(t,`${O}-message-group`,r?"standalone":"embedded"),children:_.jsx("div",{className:`${O}-message-group-child`,children:a?_.jsx(dx,{content:a,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):_.jsx(ho,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return _.jsx("div",{className:F(t,`${O}-message`,r?"standalone":"embedded"),children:_.jsx("p",{className:F(t,`${O}-reset-message`),children:e.content})})}},q9=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>_.jsxs("div",{className:F(n,`${O}-send-error`,r?"standalone":"embedded"),role:"alert",children:[_.jsx("span",{className:F(n,`${O}-send-error-text`),children:e}),_.jsxs("button",{type:"button",className:F(n,`${O}-retry-button`),onClick:t,children:[_.jsx(jN,{"aria-hidden":"true"})," Retry"]})]}),Y9="You are offline or we couldn't reach the assistant. Check connection and try again.",hp=({isWidgetStandalone:e})=>{var $,le;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=ut(),{messages:a,streamingBlocks:u,isAgentTyping:c,loading:d,progressMessage:f,connectionStatus:p,error:m,sendError:b,retryLastMessage:y,retryConnection:x}=hn(),A=B.useRef(null),v=a.length>0,w=u.some(uA),k=a[a.length-1],C=k?aA(k.content,"suggestions"):!1,j=v&&(d||c)&&!w&&!C,G=p==="reconnecting"&&!j,L=p==="error";let W=null;L?W={message:m!=null?m:Y9,kind:"connection",onRetry:x}:b&&(W={message:b.message,kind:"send",onRetry:y}),B.useEffect(()=>{var Z;(Z=A.current)==null||Z.scrollIntoView({behavior:"smooth"})},[]),B.useEffect(()=>{var Z;s&&((Z=A.current)==null||Z.scrollIntoView({behavior:"smooth"}))},[a,u,b,m,s]);const ie=($=W==null?void 0:W.message)!=null?$:null,fe=(le=W==null?void 0:W.kind)!=null?le:null;return B.useEffect(()=>{ie&&(r==null||r.error("Error message shown to user",{message:ie,kind:fe}))},[ie,fe,r]),_.jsxs(_.Fragment,{children:[d&&!v&&_.jsx(JD,{globalClassName:t,isWidgetStandalone:e}),a.map(Z=>_.jsx(V9,{message:Z,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},Z.id)),W&&_.jsx(q9,{message:W.message,onRetry:W.onRetry,globalClassName:t,isWidgetStandalone:e}),w&&_.jsxs("div",{className:F(t,`${O}-message-group`,e?"standalone":"embedded"),children:[_.jsx(dx,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(d||c)&&_.jsx(np,{globalClassName:t,isWidgetStandalone:e})]}),j&&_.jsx(np,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),G&&_.jsx(np,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),_.jsx("div",{ref:A})]})},W9=()=>_.jsxs("svg",{className:`${O}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),G9=()=>_.jsx("svg",{className:`${O}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("path",{d:"M8 1v3M8 12v3M1 8h3M12 8h3M3.05 3.05l2.12 2.12M10.83 10.83l2.12 2.12M3.05 12.95l2.12-2.12M10.83 5.17l2.12-2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),X9=(e,t)=>e===0?[]:e<0?t:t.slice(-e),pp=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=ut(),s=e!=null?e:r,{overrides:a,isInitialized:u}=po(),c=mo();if(t.length===0||s===0)return null;const d=X9(s,t),f=u?a.ProgressSteps:void 0;if(f){const p={name:"ProgressSteps",payload:{steps:d},api:c};return _.jsx(go,{tagName:f,props:p,label:"ProgressSteps"})}return _.jsx("div",{className:F(n,`${O}-progress-steps-panel`),children:_.jsx("div",{className:`${O}-progress-steps`,children:_.jsx("ul",{className:`${O}-progress-steps-list`,children:d.map((p,m)=>{const b=m<d.length-1,y=m===d.length-1;return _.jsxs("li",{className:F(`${O}-progress-step`,y&&"active"),children:[y&&_.jsx("span",{className:`${O}-progress-step-arc`}),_.jsx("span",{className:`${O}-progress-step-text`,children:p}),_.jsx("span",{className:F(`${O}-progress-step-icon`,b?"done":"active"),children:b?_.jsx(W9,{}):_.jsx(G9,{})})]},`${m}-${p}`)})})})})},fx=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=ut(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:c,downloadTranscript:d}=hn(),f=s;return _.jsxs("div",{className:F(e,`${O}-container`,`${O}-embedded-chat`),style:t,children:[_.jsx("div",{className:F(e,`${O}-message-container`,`container-${n}`,"embedded"),children:_.jsx(hp,{isWidgetStandalone:!1})}),_.jsx(pp,{steps:c,globalClassName:e}),_.jsx(ih,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:p=>a(p)}),_.jsx("div",{className:F(`${O}-embedded-chat-menu`),children:_.jsxs(Q5,{componentType:"chat",children:[_.jsx(Ob,{componentType:"chat"}),_.jsx(Fy,{componentType:"chat",onClearChat:u}),r&&_.jsx(By,{componentType:"chat",onDownloadTranscript:d})]})})]})},hx=e=>{var d;const{children:t,disabled:n}=e,[r,s]=B.useState((d=e.container)==null?void 0:d.current),a=B.useSyncExternalStore(K9,()=>!1,()=>!0),{getRootNode:u}=$l();if(B.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const c=r!=null?r:Q9(u);return _.jsx(_.Fragment,{children:B.Children.map(t,f=>Ms.createPortal(f,c))})},Q9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ts(n)?n:wr(t).body},K9=()=>()=>{},px=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ut(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=ri(),{loading:d,isAgentTyping:f,sendMessage:p,resetConversation:m,progressSteps:b,downloadTranscript:y}=hn(),{isOpen:x}=s||{},A=!!s.isOpen,v=r==="standalone",w=f||d,k=()=>{Br(!1)};return A?_.jsx(_b,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:A,children:_.jsx(hx,{children:_.jsx(Kh,{className:F(e,`${O}-container`,`${O}-dialog`,a,u&&"full-height"),style:H(H({},t),c&&{width:c}),children:_.jsxs(Xh,{className:F(e,`${O}-dialog-content`,{standalone:v,embedded:!v}),children:[_.jsx(Nb,{componentType:"dialog",onClearChat:m,onClose:k,onDownloadTranscript:y}),_.jsx(Qh,{className:F(e,`${O}-message-container`,`container-${n}`,{standalone:v,embedded:!v}),children:_.jsx(hp,{isWidgetStandalone:v,isOpen:x})}),_.jsx(pp,{steps:b,globalClassName:e}),_.jsx(ih,{componentType:"dialog",isLoading:w,onSubmit:C=>p(C)})]})})})}):null},mx=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ut(),{mode:r,status:s,isModalFullscreen:a}=ri(),{loading:u,isAgentTyping:c,sendMessage:d,resetConversation:f,progressSteps:p,downloadTranscript:m}=hn(),{isOpen:b}=s||{},y=!!s.isOpen,x=r==="standalone",A=c||u,v=({open:k})=>{Br(k)},w=()=>{Br(!1)};return y?_.jsx(_b,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:v,children:_.jsx(hx,{children:_.jsxs("div",{className:F(e,`${O}-modal-container`),style:t,children:[_.jsx(Eb,{className:F(e,`${O}-modal-backdrop`)}),_.jsx(Kh,{className:F(e,`${O}-container`,`${O}-modal`,{fullscreen:a,standalone:x,embedded:!x}),children:_.jsxs(Xh,{className:F(e,`${O}-modal-content`,{standalone:x,embedded:!x}),children:[_.jsx(Nb,{componentType:"modal",onClearChat:f,onClose:w,onDownloadTranscript:m}),_.jsx(Qh,{className:F(e,`${O}-message-container`,`container-${n}`,{standalone:x,embedded:!x}),children:_.jsx(hp,{isWidgetStandalone:x,isOpen:b})}),_.jsx(pp,{steps:p,globalClassName:e}),_.jsx(ih,{componentType:"modal",isLoading:A,onSubmit:k=>d(k)})]})})]})})}):null},J9=()=>{const e=ri(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(ON,{}):t==="dialog"?_.jsx(px,{}):t==="modal"?_.jsx(mx,{}):_.jsx(fx,{})},Z9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=HD();B.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&s(d))};return DD(a),()=>{MD(a)}},[e,t,n,r,s])};function eF({isReady:e,hasError:t,transmit:n}){const r=B.useRef([]),s=B.useRef(e);s.current=e;const a=B.useRef(n);a.current=n;const u=B.useCallback(c=>{s.current?a.current(c):r.current.push(c)},[]);return B.useEffect(()=>{if(e&&r.current.length){const c=r.current;r.current=[],c.forEach(d=>a.current(d))}},[e]),B.useEffect(()=>{t&&(r.current=[])},[t]),u}const gx={copilot:"Ask Copilot",messaging:"Ask a question"},tF=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ut(),{placeholder:s,isResponseLoading:a}=Yl(),u=s||gx[r],[c,d]=B.useState(""),f=t||a,p=m=>{const b=c.trim();b&&(m.preventDefault(),e(b),d(""))};return _.jsxs("form",{className:F(n,`${O}-prompts-input-container`),name:`${O}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${O}-prompts-input`,"aria-label":u,children:_.jsx(Hh,{className:F(n,`${O}-prompts-input-icon`)})}),_.jsx("input",{id:`${O}-prompts-input`,className:F(n,`${O}-prompts-input`),name:`${O}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),_.jsx(ir,{className:F(n,`${O}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(cf,{}),disabled:f})]})},nF=()=>{const{globalClassName:e,mode:t}=ut(),{placeholder:n}=Yl(),r=n||gx[t];return _.jsxs("div",{className:F(e,`${O}-prompts-header`),children:[_.jsx(Hh,{className:F(e,`${O}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:F(e,`${O}-prompts-header-text`),children:r})]})},Ex=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:s}=ut(),a=s==null?void 0:s.icon,u=(c=s==null?void 0:s.iconPosition)!=null?c:"left";return _.jsxs("button",{className:F(r,`${O}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&_.jsx(Cb,{icon:a,className:`${O}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},rF="Ask me something else",iF=({label:e,disabled:t=!1})=>_.jsx(Ex,{label:e||rF,disabled:t,onClick:()=>Br(!0)}),sF=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),oF=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=ut(),{staticQuestions:r,askElseButtonLabel:s,disableAskElseButton:a}=Yl(),u=sF(r);if(u.length===0)return null;const c=d=>()=>{const f=d.trim();f&&e(f)};return _.jsxs("div",{className:F(n,`${O}-prompts-button-group`),children:[u.map(d=>_.jsx(Ex,{label:d,disabled:t,onClick:c(d)},d)),!a&&_.jsx(iF,{label:s,disabled:t})]})},aF=()=>{const{globalClassName:e,themeVariables:t}=ut(),{isOpen:n,elementId:r,promptsDisplay:s}=Yl(),{isConnected:a,sendMessage:u,connectionStatus:c}=hn(),d=s!=="buttons",f=s!=="input",[p,m]=B.useState(null),b=c==="error",y=c==="connecting",x=eF({isReady:a,hasError:b,transmit:u});B.useEffect(()=>{if(!r||p)return;const v=document.getElementById(r);v&&m(v)},[r,p]);const A=B.useCallback(v=>{Br(!0),x(v)},[x]);return!n||!p?null:Ms.createPortal(_.jsxs("div",{className:F(e,`${O}-prompts-extension-container`),style:t,children:[d&&_.jsx(tF,{onSubmit:A,disabled:b}),!d&&_.jsx(nF,{}),f&&_.jsx(oF,{onPromptClick:A,disabled:b}),!b&&y&&_.jsx("p",{className:F(e,`${O}-prompts-connecting-message`),children:"Connecting to agent..."}),b&&_.jsx("p",{className:F(e,`${O}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),p)},uF=()=>(Z9(),_.jsx(aF,{})),yx=e=>_.jsxs($g,ce(H({},e),{children:[_.jsx(J9,{}),_.jsx(uF,{})]}));var Jl={},Tx;function lF(){if(Tx)return Jl;Tx=1;var e=Gg();return Jl.createRoot=e.createRoot,Jl.hydrateRoot=e.hydrateRoot,Jl}var cF=lF();const bx=(e,t,n,r)=>{cF.createRoot(e).render(_.jsx(yx,ce(H({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},dF=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=En(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let c;const d=(p,m)=>{for(const b of p)if(b.type==="childList"&&b.addedNodes.length)for(const y of b.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(Rt(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(c),bx(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),c=setTimeout(()=>{f.disconnect(),Rt(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},fF=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=En(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){Rt(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){Rt(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const c=document.getElementById(t);if(!c){Rt(!0,"warn","Container element not found for id:",t),Rt(!0,"warn","Beginning observation for element"),dF(H({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}bx(c,s,n,r)};class hF extends HTMLElement{constructor(){super(...arguments);Xe(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const pF={components:{setEntryType:Hg,toggleWidgetOpen:Br,toggleWidgetMinimized:Wu,toggleModalFullscreen:sf,setWidgetType:Gu,setWidgetDialogPosition:of,loadPromptsComponent:UD,togglePromptsExtensionOpen:Ab}};Me.AgentForceWidget=yx,Me.AgentforceWidgetProvider=$g,Me.CIMULATE_WIDGET_READY_EVENT=bg,Me.MessagingDialog=px,Me.MessagingEmbed=fx,Me.MessagingModal=mx,Me.MessagingProvider=Sg,Me.OverrideElement=hF,Me.eventHandlers=pF,Me.injectMessagingWidget=fF,Me.useMessaging=hn,Object.defineProperty(Me,Symbol.toStringTag,{value:"Module"})}));