@cimulate/copilot-widget 1.39.0 → 1.39.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +2 -0
- package/dist/cimulate-copilot-widget.es.js +1149 -1130
- package/dist/cimulate-copilot-widget.umd.js +19 -19
- package/dist/copilot.es.js +1154 -1135
- package/dist/copilot.umd.js +19 -19
- package/dist/messaging.es.js +1265 -1234
- package/dist/messaging.umd.js +19 -19
- package/package.json +7 -7
package/dist/messaging.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(Ue,Ge){typeof exports=="object"&&typeof module!="undefined"?Ge(exports):typeof define=="function"&&define.amd?define(["exports"],Ge):(Ue=typeof globalThis!="undefined"?globalThis:Ue||self,Ge(Ue.CimulateMessaging={}))})(this,(function(Ue){"use strict";var BU=Object.defineProperty,UU=Object.defineProperties;var HU=Object.getOwnPropertyDescriptors;var Sd=Object.getOwnPropertySymbols;var WS=Object.prototype.hasOwnProperty,GS=Object.prototype.propertyIsEnumerable;var Xo=(Ue,Ge)=>(Ge=Symbol[Ue])?Ge:Symbol.for("Symbol."+Ue),jU=Ue=>{throw TypeError(Ue)},vd=Math.pow,_0=(Ue,Ge,rt)=>Ge in Ue?BU(Ue,Ge,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Ue[Ge]=rt,U=(Ue,Ge)=>{for(var rt in Ge||(Ge={}))WS.call(Ge,rt)&&_0(Ue,rt,Ge[rt]);if(Sd)for(var rt of Sd(Ge))GS.call(Ge,rt)&&_0(Ue,rt,Ge[rt]);return Ue},ae=(Ue,Ge)=>UU(Ue,HU(Ge));var An=(Ue,Ge)=>{var rt={};for(var Et in Ue)WS.call(Ue,Et)&&Ge.indexOf(Et)<0&&(rt[Et]=Ue[Et]);if(Ue!=null&&Sd)for(var Et of Sd(Ue))Ge.indexOf(Et)<0&&GS.call(Ue,Et)&&(rt[Et]=Ue[Et]);return rt};var Ke=(Ue,Ge,rt)=>_0(Ue,typeof Ge!="symbol"?Ge+"":Ge,rt);var De=(Ue,Ge,rt)=>new Promise((Et,Dt)=>{var St=vt=>{try{sn(rt.next(vt))}catch(_n){Dt(_n)}},ze=vt=>{try{sn(rt.throw(vt))}catch(_n){Dt(_n)}},sn=vt=>vt.done?Et(vt.value):Promise.resolve(vt.value).then(St,ze);sn((rt=rt.apply(Ue,Ge)).next())}),Rs=function(Ue,Ge){this[0]=Ue,this[1]=Ge},x0=(Ue,Ge,rt)=>{var Et=(sn,vt,_n,ur)=>{try{var $i=rt[sn](vt),Ls=(vt=$i.value)instanceof Rs,Ds=$i.done;Promise.resolve(Ls?vt[0]:vt).then(Cn=>Ls?Et(sn==="return"?sn:"next",vt[1]?{done:Cn.done,value:Cn.value}:Cn,_n,ur):_n({value:Cn,done:Ds})).catch(Cn=>Et("throw",Cn,_n,ur))}catch(Cn){ur(Cn)}},Dt=(sn,vt,_n,ur)=>ze[sn]=$i=>(vt=new Promise((Ls,Ds,Cn)=>(Cn=()=>Et(sn,$i,Ls,Ds),St?St.then(Cn):Cn())),ur=()=>St===_n&&(St=0),St=_n=vt.then(ur,ur),vt),St,ze={};return rt=rt.apply(Ue,Ge),ze[Xo("asyncIterator")]=()=>ze,Dt("next"),Dt("throw"),Dt("return"),ze},S0=Ue=>{var Ge=Ue[Xo("asyncIterator")],rt=!1,Et,Dt={};return Ge==null?(Ge=Ue[Xo("iterator")](),Et=St=>Dt[St]=ze=>Ge[St](ze)):(Ge=Ge.call(Ue),Et=St=>Dt[St]=ze=>{if(rt){if(rt=!1,St==="throw")throw ze;return ze}return rt=!0,{done:!1,value:new Rs(new Promise(sn=>{var vt=Ge[St](ze);vt instanceof Object||jU("Object expected"),sn(vt)}),1)}}),Dt[Xo("iterator")]=()=>Dt,Et("next"),"throw"in Ge?Et("throw"):Dt.throw=St=>{throw St},"return"in Ge&&Et("return"),Dt},XS=(Ue,Ge,rt)=>(Ge=Ue[Xo("asyncIterator")])?Ge.call(Ue):(Ue=Ue[Xo("iterator")](),Ge={},rt=(Et,Dt)=>(Dt=Ue[Et])&&(Ge[Et]=St=>new Promise((ze,sn,vt)=>(St=Dt.call(Ue,St),vt=St.done,Promise.resolve(St.value).then(_n=>ze({value:_n,done:vt}),sn)))),rt("next"),rt("return"),Ge);var Ge=document.createElement("style");Ge.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:var(--cim-widget-border-radius);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-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.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;min-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:var(--cim-widget-border-radius);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.cim-widget-cart-busy{opacity:.7}.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:.875rem;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:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-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:var(--cim-widget-border-radius);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-chip.inactive{opacity:.5}.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:var(--cim-widget-border-radius);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-primary-color, #3182ce);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-primary-color, #3182ce);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-primary-color, #3182ce) 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: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 #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-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-jump-to-latest{position:sticky;bottom:.75rem;z-index:9999;height:0;pointer-events:none}.cim-widget-jump-to-latest-button{position:absolute;right:0;bottom:0;pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:3rem;height:3rem;padding:0;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:50%;background-color:var(--cim-widget-background-color, #fff);color:var(--cim-widget-primary-color, #3182ce);box-shadow:0 2px 8px #0000001f;font-family:var(--cim-widget-font-family);font-size:.8125rem;font-weight:600;line-height:1;cursor:pointer}.cim-widget-jump-to-latest-button:hover{background-color:var(--cim-widget-background-color, #fff)}.cim-widget-jump-to-latest-button:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}.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-font-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-font-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:var(--cim-widget-border-radius);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:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;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:var(--cim-widget-border-radius);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:var(--cim-widget-border-radius);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(Ge);function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Et={exports:{}},Dt={},St={exports:{}},ze={};var sn;function vt(){if(sn)return ze;sn=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 y(F){return F===null||typeof F!="object"?null:(F=m&&F[m]||F["@@iterator"],typeof F=="function"?F:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,A={};function x(F,ee,R){this.props=F,this.context=ee,this.refs=A,this.updater=R||T}x.prototype.isReactComponent={},x.prototype.setState=function(F,ee){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,ee,"setState")},x.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function S(){}S.prototype=x.prototype;function N(F,ee,R){this.props=F,this.context=ee,this.refs=A,this.updater=R||T}var O=N.prototype=new S;O.constructor=N,_(O,x.prototype),O.isPureReactComponent=!0;var j=Array.isArray,V=Object.prototype.hasOwnProperty,D={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function Z(F,ee,R){var Ce,Re={},he=null,Se=null;if(ee!=null)for(Ce in ee.ref!==void 0&&(Se=ee.ref),ee.key!==void 0&&(he=""+ee.key),ee)V.call(ee,Ce)&&!W.hasOwnProperty(Ce)&&(Re[Ce]=ee[Ce]);var $e=arguments.length-2;if($e===1)Re.children=R;else if(1<$e){for(var He=Array($e),et=0;et<$e;et++)He[et]=arguments[et+2];Re.children=He}if(F&&F.defaultProps)for(Ce in $e=F.defaultProps,$e)Re[Ce]===void 0&&(Re[Ce]=$e[Ce]);return{$$typeof:e,type:F,key:he,ref:Se,props:Re,_owner:D.current}}function re(F,ee){return{$$typeof:e,type:F.type,key:ee,ref:F.ref,props:F.props,_owner:F._owner}}function z(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function K(F){var ee={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(R){return ee[R]})}var oe=/\/+/g;function de(F,ee){return typeof F=="object"&&F!==null&&F.key!=null?K(""+F.key):ee.toString(36)}function fe(F,ee,R,Ce,Re){var he=typeof F;(he==="undefined"||he==="boolean")&&(F=null);var Se=!1;if(F===null)Se=!0;else switch(he){case"string":case"number":Se=!0;break;case"object":switch(F.$$typeof){case e:case t:Se=!0}}if(Se)return Se=F,Re=Re(Se),F=Ce===""?"."+de(Se,0):Ce,j(Re)?(R="",F!=null&&(R=F.replace(oe,"$&/")+"/"),fe(Re,ee,R,"",function(et){return et})):Re!=null&&(z(Re)&&(Re=re(Re,R+(!Re.key||Se&&Se.key===Re.key?"":(""+Re.key).replace(oe,"$&/")+"/")+F)),ee.push(Re)),1;if(Se=0,Ce=Ce===""?".":Ce+":",j(F))for(var $e=0;$e<F.length;$e++){he=F[$e];var He=Ce+de(he,$e);Se+=fe(he,ee,R,He,Re)}else if(He=y(F),typeof He=="function")for(F=He.call(F),$e=0;!(he=F.next()).done;)he=he.value,He=Ce+de(he,$e++),Se+=fe(he,ee,R,He,Re);else if(he==="object")throw ee=String(F),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return Se}function te(F,ee,R){if(F==null)return F;var Ce=[],Re=0;return fe(F,Ce,"","",function(he){return ee.call(R,he,Re++)}),Ce}function ve(F){if(F._status===-1){var ee=F._result;ee=ee(),ee.then(function(R){(F._status===0||F._status===-1)&&(F._status=1,F._result=R)},function(R){(F._status===0||F._status===-1)&&(F._status=2,F._result=R)}),F._status===-1&&(F._status=0,F._result=ee)}if(F._status===1)return F._result.default;throw F._result}var ue={current:null},Q={transition:null},le={ReactCurrentDispatcher:ue,ReactCurrentBatchConfig:Q,ReactCurrentOwner:D};function C(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:te,forEach:function(F,ee,R){te(F,function(){ee.apply(this,arguments)},R)},count:function(F){var ee=0;return te(F,function(){ee++}),ee},toArray:function(F){return te(F,function(ee){return ee})||[]},only:function(F){if(!z(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},ze.Component=x,ze.Fragment=n,ze.Profiler=s,ze.PureComponent=N,ze.StrictMode=r,ze.Suspense=d,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,ze.act=C,ze.cloneElement=function(F,ee,R){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var Ce=_({},F.props),Re=F.key,he=F.ref,Se=F._owner;if(ee!=null){if(ee.ref!==void 0&&(he=ee.ref,Se=D.current),ee.key!==void 0&&(Re=""+ee.key),F.type&&F.type.defaultProps)var $e=F.type.defaultProps;for(He in ee)V.call(ee,He)&&!W.hasOwnProperty(He)&&(Ce[He]=ee[He]===void 0&&$e!==void 0?$e[He]:ee[He])}var He=arguments.length-2;if(He===1)Ce.children=R;else if(1<He){$e=Array(He);for(var et=0;et<He;et++)$e[et]=arguments[et+2];Ce.children=$e}return{$$typeof:e,type:F.type,key:Re,ref:he,props:Ce,_owner:Se}},ze.createContext=function(F){return F={$$typeof:u,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:a,_context:F},F.Consumer=F},ze.createElement=Z,ze.createFactory=function(F){var ee=Z.bind(null,F);return ee.type=F,ee},ze.createRef=function(){return{current:null}},ze.forwardRef=function(F){return{$$typeof:l,render:F}},ze.isValidElement=z,ze.lazy=function(F){return{$$typeof:p,_payload:{_status:-1,_result:F},_init:ve}},ze.memo=function(F,ee){return{$$typeof:f,type:F,compare:ee===void 0?null:ee}},ze.startTransition=function(F){var ee=Q.transition;Q.transition={};try{F()}finally{Q.transition=ee}},ze.unstable_act=C,ze.useCallback=function(F,ee){return ue.current.useCallback(F,ee)},ze.useContext=function(F){return ue.current.useContext(F)},ze.useDebugValue=function(){},ze.useDeferredValue=function(F){return ue.current.useDeferredValue(F)},ze.useEffect=function(F,ee){return ue.current.useEffect(F,ee)},ze.useId=function(){return ue.current.useId()},ze.useImperativeHandle=function(F,ee,R){return ue.current.useImperativeHandle(F,ee,R)},ze.useInsertionEffect=function(F,ee){return ue.current.useInsertionEffect(F,ee)},ze.useLayoutEffect=function(F,ee){return ue.current.useLayoutEffect(F,ee)},ze.useMemo=function(F,ee){return ue.current.useMemo(F,ee)},ze.useReducer=function(F,ee,R){return ue.current.useReducer(F,ee,R)},ze.useRef=function(F){return ue.current.useRef(F)},ze.useState=function(F){return ue.current.useState(F)},ze.useSyncExternalStore=function(F,ee,R){return ue.current.useSyncExternalStore(F,ee,R)},ze.useTransition=function(){return ue.current.useTransition()},ze.version="18.3.1",ze}var _n;function ur(){return _n||(_n=1,St.exports=vt()),St.exports}var $i;function Ls(){if($i)return Dt;$i=1;var e=ur(),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={},y=null,T=null;f!==void 0&&(y=""+f),d.key!==void 0&&(y=""+d.key),d.ref!==void 0&&(T=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:y,ref:T,props:m,_owner:s.current}}return Dt.Fragment=n,Dt.jsx=u,Dt.jsxs=u,Dt}var Ds;function Cn(){return Ds||(Ds=1,Et.exports=Ls()),Et.exports}var w=Cn(),P=ur();const Vi=rt(P),Ar=Object.create(null);Ar.open="0",Ar.close="1",Ar.ping="2",Ar.pong="3",Ar.message="4",Ar.upgrade="5",Ar.noop="6";const Ou=Object.create(null);Object.keys(Ar).forEach(e=>{Ou[Ar[e]]=e});const Ad={type:"error",data:"parser error"},v0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",A0=typeof ArrayBuffer=="function",C0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Cd=({type:e,data:t},n,r)=>v0&&t instanceof Blob?n?r(t):N0(t,r):A0&&(t instanceof ArrayBuffer||C0(t))?n?r(t):N0(new Blob([t]),r):r(Ar[e]+(t||"")),N0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function k0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Nd;function ZS(e,t){if(v0&&e.data instanceof Blob)return e.data.arrayBuffer().then(k0).then(t);if(A0&&(e.data instanceof ArrayBuffer||C0(e.data)))return t(k0(e.data));Cd(e,!1,n=>{Nd||(Nd=new TextEncoder),t(Nd.encode(n))})}const O0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ko=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<O0.length;e++)Ko[O0.charCodeAt(e)]=e;const e2=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=Ko[e.charCodeAt(r)],u=Ko[e.charCodeAt(r+1)],l=Ko[e.charCodeAt(r+2)],d=Ko[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},t2=typeof ArrayBuffer=="function",kd=(e,t)=>{if(typeof e!="string")return{type:"message",data:I0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:n2(e.substring(1),t)}:Ou[n]?e.length>1?{type:Ou[n],data:e.substring(1)}:{type:Ou[n]}:Ad},n2=(e,t)=>{if(t2){const n=e2(e);return I0(n,t)}else return{base64:!0,data:e}},I0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,P0="",r2=(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(P0))})})},i2=(e,t)=>{const n=e.split(P0),r=[];for(let s=0;s<n.length;s++){const a=kd(n[s],t);if(r.push(a),a.type==="error")break}return r};function s2(){return new TransformStream({transform(e,t){ZS(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 Od;function Iu(e){return e.reduce((t,n)=>t+n.length,0)}function Pu(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 o2(e,t){Od||(Od=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(Iu(n)<1)break;const d=Pu(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(Iu(n)<2)break;const d=Pu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Iu(n)<8)break;const d=Pu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(Ad);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Iu(n)<s)break;const d=Pu(n,s);l.enqueue(kd(a?d:Od.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(Ad);break}}}})}const R0=4;function $t(e){if(e)return a2(e)}function a2(e){for(var t in $t.prototype)e[t]=$t.prototype[t];return e}$t.prototype.on=$t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},$t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},$t.prototype.off=$t.prototype.removeListener=$t.prototype.removeAllListeners=$t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,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},$t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this},$t.prototype.emitReserved=$t.prototype.emit,$t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},$t.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Ru=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Qn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),u2="arraybuffer";function zU(){}function L0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const l2=Qn.setTimeout,c2=Qn.clearTimeout;function Lu(e,t){t.useNativeTimers?(e.setTimeoutFn=l2.bind(Qn),e.clearTimeoutFn=c2.bind(Qn)):(e.setTimeoutFn=Qn.setTimeout.bind(Qn),e.clearTimeoutFn=Qn.clearTimeout.bind(Qn))}const d2=1.33;function f2(e){return typeof e=="string"?h2(e):Math.ceil((e.byteLength||e.size)*d2)}function h2(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 p2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function m2(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 g2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Id extends $t{constructor(t){super(),this.writable=!1,Lu(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 g2(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=kd(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=p2(t);return n.length?"?"+n:""}}class E2 extends Id{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)};i2(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,r2(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 M0=!1;try{M0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const y2=M0;function T2(){}class b2 extends E2{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 Cr extends $t{constructor(t,n,r){super(),this.createRequest=t,Lu(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=L0(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=Cr.requestsCount++,Cr.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=T2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Cr.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(Cr.requestsCount=0,Cr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",F0);else if(typeof addEventListener=="function"){const e="onpagehide"in Qn?"pagehide":"unload";addEventListener(e,F0,!1)}}function F0(){for(let e in Cr.requests)Cr.requests.hasOwnProperty(e)&&Cr.requests[e].abort()}const w2=(function(){const e=B0({xdomain:!1});return e&&e.responseType!==null})();class _2 extends b2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=w2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Cr(B0,this.uri(),t)}}function B0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||y2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Qn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const U0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class x2 extends Id{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=U0?{}:L0(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&&Ru(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=D0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Pd=Qn.WebSocket||Qn.MozWebSocket;class S2 extends x2{createSocket(t,n,r){return U0?new Pd(t,n,r):n?new Pd(t,n):new Pd(t)}doWrite(t,n){this.ws.send(n)}}class v2 extends Id{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=o2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=s2();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&&Ru(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const A2={websocket:S2,webtransport:v2,polling:_2},C2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,N2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Rd(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=C2.exec(e||""),a={},u=14;for(;u--;)a[N2[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=k2(a,a.path),a.queryKey=O2(a,a.query),a}function k2(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 O2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Ld=typeof addEventListener=="function"&&typeof removeEventListener=="function",Du=[];Ld&&addEventListener("offline",()=>{Du.forEach(e=>e())},!1);class ci extends $t{constructor(t,n){if(super(),this.binaryType=u2,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=Rd(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=Rd(n.host).host);Lu(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=m2(this.opts.query)),Ld&&(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"})},Du.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=R0,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&&ci.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",ci.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+=f2(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,Ru(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,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(ci.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(),Ld&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Du.indexOf(this._offlineEventListener);r!==-1&&Du.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ci.protocol=R0;class I2 extends ci{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;ci.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;ci.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 y=new Error("probe error");y.transport=n.name,this.emitReserved("upgradeError",y)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const y=new Error("probe error: "+m);y.transport=n.name,a(),this.emitReserved("upgradeError",y)};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 P2=class extends I2{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=>A2[a]).filter(a=>!!a)),super(r?s:t,s)}};function R2(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=Rd(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 L2=typeof ArrayBuffer=="function",D2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,H0=Object.prototype.toString,M2=typeof Blob=="function"||typeof Blob!="undefined"&&H0.call(Blob)==="[object BlobConstructor]",F2=typeof File=="function"||typeof File!="undefined"&&H0.call(File)==="[object FileConstructor]";function Dd(e){return L2&&(e instanceof ArrayBuffer||D2(e))||M2&&e instanceof Blob||F2&&e instanceof File}function Mu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Mu(e[n]))return!0;return!1}if(Dd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Mu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Mu(e[n]))return!0;return!1}function B2(e){const t=[],n=e.data,r=e;return r.data=Fu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Fu(e,t,n){if(!e)return e;if(Dd(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]=Fu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Fu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Fu(e[s],t));return r}return e}function U2(e,t){return e.data=Md(e.data,t),delete e.attachments,e}function Md(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]=Md(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Md(e[n],t));return e}const H2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var st;(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"})(st||(st={}));class j2{constructor(t){this.replacer=t}encode(t){return(t.type===st.EVENT||t.type===st.ACK)&&Mu(t)?this.encodeAsBinary({type:t.type===st.EVENT?st.BINARY_EVENT:st.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===st.BINARY_EVENT||t.type===st.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=B2(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Fd extends $t{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===st.BINARY_EVENT;r||n.type===st.BINARY_ACK?(n.type=r?st.EVENT:st.ACK,this.reconstructor=new z2(n)):super.emitReserved("decoded",n)}else if(Dd(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(st[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===st.BINARY_EVENT||r.type===st.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(!$2(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(Fd.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 st.CONNECT:return j0(n);case st.DISCONNECT:return n===void 0;case st.CONNECT_ERROR:return typeof n=="string"||j0(n);case st.EVENT:case st.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&H2.indexOf(n[0])===-1);case st.ACK:case st.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=U2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const $2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function j0(e){return Object.prototype.toString.call(e)==="[object Object]"}const V2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Fd,Encoder:j2,get PacketType(){return st}},Symbol.toStringTag,{value:"Module"}));function lr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const q2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class z0 extends $t{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[lr(t,"open",this.onopen.bind(this)),lr(t,"packet",this.onpacket.bind(this)),lr(t,"error",this.onerror.bind(this)),lr(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(q2.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:st.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:st.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 st.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 st.EVENT:case st.BINARY_EVENT:this.onevent(t);break;case st.ACK:case st.BINARY_ACK:this.onack(t);break;case st.DISCONNECT:this.ondisconnect();break;case st.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:st.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:st.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 Ms(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}Ms.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},Ms.prototype.reset=function(){this.attempts=0},Ms.prototype.setMin=function(e){this.ms=e},Ms.prototype.setMax=function(e){this.max=e},Ms.prototype.setJitter=function(e){this.jitter=e};class Bd extends $t{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Lu(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 Ms({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||V2;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 P2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=lr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=lr(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(lr(t,"ping",this.onping.bind(this)),lr(t,"data",this.ondata.bind(this)),lr(t,"error",this.onerror.bind(this)),lr(t,"close",this.onclose.bind(this)),lr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Ru(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new z0(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 Qo={};function Ud(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=R2(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Qo[s]&&a in Qo[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new Bd(r,t):(Qo[s]||(Qo[s]=new Bd(r,t)),d=Qo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Ud,{Manager:Bd,Socket:z0,io:Ud,connect:Ud});const $0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&$0.call(Blob),typeof File=="function"||typeof File!="undefined"&&$0.call(File);var V0;(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"})(V0||(V0={}));const Bu="cimulate",Hd=`${Bu}:pdp-update`,jd=`${Bu}:ui-state-update`,zd=`${Bu}:prompts-state-update`,$d=`${Bu}:session-state`,Y2=e=>{window.addEventListener(Hd,e)},W2=e=>{window.removeEventListener(Hd,e)},G2=(e,t,n)=>{const r=new CustomEvent(Hd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},q0=e=>{window.addEventListener($d,e)},Y0=e=>{window.removeEventListener($d,e)},W0=(e,t,n)=>{const r=new CustomEvent($d,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class X2{constructor(){Ke(this,"initialParams",{productId:"",productName:"",pdpLink:""});Ke(this,"proxy");Ke(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ke(this,"_fullSet",(t,n,r)=>(G2(n,r),Reflect.set(t,n,r)));Ke(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const Jo=new X2,G0=["ask_cim","search","browse","pdp"],X0=e=>G0.includes(e),K0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(K0)),new Map(Object.entries(K0).map(([e,t])=>[t,e]));const At=(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 K2{constructor(t=!1){Ke(this,"isDevelopment");Ke(this,"_log",(t,n,...r)=>{At(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 Q2=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!X0(e.type)){At(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&At(n,"warn",`initialEntry.type "${e.type}" conflicts with the deprecated entryType "${t}". entryType wins for the UI entry type; initialEntry params are still seeded. Prefer initialEntry on its own.`),e.type==="pdp"){if(!((r=e.params)!=null&&r.productId)){At(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}Jo.updateProxy(e.params);return}At(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}},Uu=(e,t)=>{if(/^(https?:)?\/\//i.test(t)||/^data:/i.test(t)||!e)return t;try{return new URL(t,e).href}catch(n){return`${e}${t}`}},J2="ccDevMode",Z2=(e=typeof window!="undefined"?window.location.search:"")=>{var t;return((t=new URLSearchParams(e).get(J2))==null?void 0:t.toLowerCase())==="true"};let ev=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 tv{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 De(this,null,function*(){if(this.reading)return void this.logger.warn("SSE already connected, ignoring duplicate connect()");this.controller=new AbortController,this.reading=!0;const t=yield fetch(this.url,{method:"GET",headers:ae(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 De(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(Ue,Ge){typeof exports=="object"&&typeof module!="undefined"?Ge(exports):typeof define=="function"&&define.amd?define(["exports"],Ge):(Ue=typeof globalThis!="undefined"?globalThis:Ue||self,Ge(Ue.CimulateMessaging={}))})(this,(function(Ue){"use strict";var HU=Object.defineProperty,jU=Object.defineProperties;var zU=Object.getOwnPropertyDescriptors;var Sd=Object.getOwnPropertySymbols;var WS=Object.prototype.hasOwnProperty,GS=Object.prototype.propertyIsEnumerable;var Xo=(Ue,Ge)=>(Ge=Symbol[Ue])?Ge:Symbol.for("Symbol."+Ue),$U=Ue=>{throw TypeError(Ue)},vd=Math.pow,_0=(Ue,Ge,rt)=>Ge in Ue?HU(Ue,Ge,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Ue[Ge]=rt,U=(Ue,Ge)=>{for(var rt in Ge||(Ge={}))WS.call(Ge,rt)&&_0(Ue,rt,Ge[rt]);if(Sd)for(var rt of Sd(Ge))GS.call(Ge,rt)&&_0(Ue,rt,Ge[rt]);return Ue},ae=(Ue,Ge)=>jU(Ue,zU(Ge));var An=(Ue,Ge)=>{var rt={};for(var Et in Ue)WS.call(Ue,Et)&&Ge.indexOf(Et)<0&&(rt[Et]=Ue[Et]);if(Ue!=null&&Sd)for(var Et of Sd(Ue))Ge.indexOf(Et)<0&&GS.call(Ue,Et)&&(rt[Et]=Ue[Et]);return rt};var Ke=(Ue,Ge,rt)=>_0(Ue,typeof Ge!="symbol"?Ge+"":Ge,rt);var De=(Ue,Ge,rt)=>new Promise((Et,Dt)=>{var St=vt=>{try{sn(rt.next(vt))}catch(_n){Dt(_n)}},ze=vt=>{try{sn(rt.throw(vt))}catch(_n){Dt(_n)}},sn=vt=>vt.done?Et(vt.value):Promise.resolve(vt.value).then(St,ze);sn((rt=rt.apply(Ue,Ge)).next())}),Rs=function(Ue,Ge){this[0]=Ue,this[1]=Ge},x0=(Ue,Ge,rt)=>{var Et=(sn,vt,_n,ur)=>{try{var $i=rt[sn](vt),Ls=(vt=$i.value)instanceof Rs,Ds=$i.done;Promise.resolve(Ls?vt[0]:vt).then(Cn=>Ls?Et(sn==="return"?sn:"next",vt[1]?{done:Cn.done,value:Cn.value}:Cn,_n,ur):_n({value:Cn,done:Ds})).catch(Cn=>Et("throw",Cn,_n,ur))}catch(Cn){ur(Cn)}},Dt=(sn,vt,_n,ur)=>ze[sn]=$i=>(vt=new Promise((Ls,Ds,Cn)=>(Cn=()=>Et(sn,$i,Ls,Ds),St?St.then(Cn):Cn())),ur=()=>St===_n&&(St=0),St=_n=vt.then(ur,ur),vt),St,ze={};return rt=rt.apply(Ue,Ge),ze[Xo("asyncIterator")]=()=>ze,Dt("next"),Dt("throw"),Dt("return"),ze},S0=Ue=>{var Ge=Ue[Xo("asyncIterator")],rt=!1,Et,Dt={};return Ge==null?(Ge=Ue[Xo("iterator")](),Et=St=>Dt[St]=ze=>Ge[St](ze)):(Ge=Ge.call(Ue),Et=St=>Dt[St]=ze=>{if(rt){if(rt=!1,St==="throw")throw ze;return ze}return rt=!0,{done:!1,value:new Rs(new Promise(sn=>{var vt=Ge[St](ze);vt instanceof Object||$U("Object expected"),sn(vt)}),1)}}),Dt[Xo("iterator")]=()=>Dt,Et("next"),"throw"in Ge?Et("throw"):Dt.throw=St=>{throw St},"return"in Ge&&Et("return"),Dt},XS=(Ue,Ge,rt)=>(Ge=Ue[Xo("asyncIterator")])?Ge.call(Ue):(Ue=Ue[Xo("iterator")](),Ge={},rt=(Et,Dt)=>(Dt=Ue[Et])&&(Ge[Et]=St=>new Promise((ze,sn,vt)=>(St=Dt.call(Ue,St),vt=St.done,Promise.resolve(St.value).then(_n=>ze({value:_n,done:vt}),sn)))),rt("next"),rt("return"),Ge);var Ge=document.createElement("style");Ge.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:var(--cim-widget-border-radius);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-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.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;min-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:var(--cim-widget-border-radius);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.cim-widget-cart-busy{opacity:.7}.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:.875rem;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:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-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:var(--cim-widget-border-radius);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-chip.inactive{opacity:.5}.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:var(--cim-widget-border-radius);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-primary-color, #3182ce);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-primary-color, #3182ce);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-primary-color, #3182ce) 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: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 #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-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-jump-to-latest{position:sticky;bottom:.75rem;z-index:9999;height:0;pointer-events:none}.cim-widget-jump-to-latest-button{position:absolute;right:0;bottom:0;pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:3rem;height:3rem;padding:0;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:50%;background-color:var(--cim-widget-background-color, #fff);color:var(--cim-widget-primary-color, #3182ce);box-shadow:0 2px 8px #0000001f;font-family:var(--cim-widget-font-family);font-size:.8125rem;font-weight:600;line-height:1;cursor:pointer}.cim-widget-jump-to-latest-button:hover{background-color:var(--cim-widget-background-color, #fff)}.cim-widget-jump-to-latest-button:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}.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-font-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-font-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:var(--cim-widget-border-radius);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:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;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:var(--cim-widget-border-radius);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:var(--cim-widget-border-radius);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(Ge);function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Et={exports:{}},Dt={},St={exports:{}},ze={};var sn;function vt(){if(sn)return ze;sn=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 y(F){return F===null||typeof F!="object"?null:(F=m&&F[m]||F["@@iterator"],typeof F=="function"?F:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,A={};function x(F,ee,R){this.props=F,this.context=ee,this.refs=A,this.updater=R||T}x.prototype.isReactComponent={},x.prototype.setState=function(F,ee){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,ee,"setState")},x.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function S(){}S.prototype=x.prototype;function N(F,ee,R){this.props=F,this.context=ee,this.refs=A,this.updater=R||T}var O=N.prototype=new S;O.constructor=N,_(O,x.prototype),O.isPureReactComponent=!0;var j=Array.isArray,V=Object.prototype.hasOwnProperty,D={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function Z(F,ee,R){var Ce,Re={},he=null,Se=null;if(ee!=null)for(Ce in ee.ref!==void 0&&(Se=ee.ref),ee.key!==void 0&&(he=""+ee.key),ee)V.call(ee,Ce)&&!W.hasOwnProperty(Ce)&&(Re[Ce]=ee[Ce]);var $e=arguments.length-2;if($e===1)Re.children=R;else if(1<$e){for(var He=Array($e),et=0;et<$e;et++)He[et]=arguments[et+2];Re.children=He}if(F&&F.defaultProps)for(Ce in $e=F.defaultProps,$e)Re[Ce]===void 0&&(Re[Ce]=$e[Ce]);return{$$typeof:e,type:F,key:he,ref:Se,props:Re,_owner:D.current}}function re(F,ee){return{$$typeof:e,type:F.type,key:ee,ref:F.ref,props:F.props,_owner:F._owner}}function z(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function K(F){var ee={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(R){return ee[R]})}var oe=/\/+/g;function de(F,ee){return typeof F=="object"&&F!==null&&F.key!=null?K(""+F.key):ee.toString(36)}function fe(F,ee,R,Ce,Re){var he=typeof F;(he==="undefined"||he==="boolean")&&(F=null);var Se=!1;if(F===null)Se=!0;else switch(he){case"string":case"number":Se=!0;break;case"object":switch(F.$$typeof){case e:case t:Se=!0}}if(Se)return Se=F,Re=Re(Se),F=Ce===""?"."+de(Se,0):Ce,j(Re)?(R="",F!=null&&(R=F.replace(oe,"$&/")+"/"),fe(Re,ee,R,"",function(et){return et})):Re!=null&&(z(Re)&&(Re=re(Re,R+(!Re.key||Se&&Se.key===Re.key?"":(""+Re.key).replace(oe,"$&/")+"/")+F)),ee.push(Re)),1;if(Se=0,Ce=Ce===""?".":Ce+":",j(F))for(var $e=0;$e<F.length;$e++){he=F[$e];var He=Ce+de(he,$e);Se+=fe(he,ee,R,He,Re)}else if(He=y(F),typeof He=="function")for(F=He.call(F),$e=0;!(he=F.next()).done;)he=he.value,He=Ce+de(he,$e++),Se+=fe(he,ee,R,He,Re);else if(he==="object")throw ee=String(F),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return Se}function te(F,ee,R){if(F==null)return F;var Ce=[],Re=0;return fe(F,Ce,"","",function(he){return ee.call(R,he,Re++)}),Ce}function ve(F){if(F._status===-1){var ee=F._result;ee=ee(),ee.then(function(R){(F._status===0||F._status===-1)&&(F._status=1,F._result=R)},function(R){(F._status===0||F._status===-1)&&(F._status=2,F._result=R)}),F._status===-1&&(F._status=0,F._result=ee)}if(F._status===1)return F._result.default;throw F._result}var ue={current:null},Q={transition:null},le={ReactCurrentDispatcher:ue,ReactCurrentBatchConfig:Q,ReactCurrentOwner:D};function C(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:te,forEach:function(F,ee,R){te(F,function(){ee.apply(this,arguments)},R)},count:function(F){var ee=0;return te(F,function(){ee++}),ee},toArray:function(F){return te(F,function(ee){return ee})||[]},only:function(F){if(!z(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},ze.Component=x,ze.Fragment=n,ze.Profiler=s,ze.PureComponent=N,ze.StrictMode=r,ze.Suspense=d,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,ze.act=C,ze.cloneElement=function(F,ee,R){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var Ce=_({},F.props),Re=F.key,he=F.ref,Se=F._owner;if(ee!=null){if(ee.ref!==void 0&&(he=ee.ref,Se=D.current),ee.key!==void 0&&(Re=""+ee.key),F.type&&F.type.defaultProps)var $e=F.type.defaultProps;for(He in ee)V.call(ee,He)&&!W.hasOwnProperty(He)&&(Ce[He]=ee[He]===void 0&&$e!==void 0?$e[He]:ee[He])}var He=arguments.length-2;if(He===1)Ce.children=R;else if(1<He){$e=Array(He);for(var et=0;et<He;et++)$e[et]=arguments[et+2];Ce.children=$e}return{$$typeof:e,type:F.type,key:Re,ref:he,props:Ce,_owner:Se}},ze.createContext=function(F){return F={$$typeof:u,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:a,_context:F},F.Consumer=F},ze.createElement=Z,ze.createFactory=function(F){var ee=Z.bind(null,F);return ee.type=F,ee},ze.createRef=function(){return{current:null}},ze.forwardRef=function(F){return{$$typeof:l,render:F}},ze.isValidElement=z,ze.lazy=function(F){return{$$typeof:p,_payload:{_status:-1,_result:F},_init:ve}},ze.memo=function(F,ee){return{$$typeof:f,type:F,compare:ee===void 0?null:ee}},ze.startTransition=function(F){var ee=Q.transition;Q.transition={};try{F()}finally{Q.transition=ee}},ze.unstable_act=C,ze.useCallback=function(F,ee){return ue.current.useCallback(F,ee)},ze.useContext=function(F){return ue.current.useContext(F)},ze.useDebugValue=function(){},ze.useDeferredValue=function(F){return ue.current.useDeferredValue(F)},ze.useEffect=function(F,ee){return ue.current.useEffect(F,ee)},ze.useId=function(){return ue.current.useId()},ze.useImperativeHandle=function(F,ee,R){return ue.current.useImperativeHandle(F,ee,R)},ze.useInsertionEffect=function(F,ee){return ue.current.useInsertionEffect(F,ee)},ze.useLayoutEffect=function(F,ee){return ue.current.useLayoutEffect(F,ee)},ze.useMemo=function(F,ee){return ue.current.useMemo(F,ee)},ze.useReducer=function(F,ee,R){return ue.current.useReducer(F,ee,R)},ze.useRef=function(F){return ue.current.useRef(F)},ze.useState=function(F){return ue.current.useState(F)},ze.useSyncExternalStore=function(F,ee,R){return ue.current.useSyncExternalStore(F,ee,R)},ze.useTransition=function(){return ue.current.useTransition()},ze.version="18.3.1",ze}var _n;function ur(){return _n||(_n=1,St.exports=vt()),St.exports}var $i;function Ls(){if($i)return Dt;$i=1;var e=ur(),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={},y=null,T=null;f!==void 0&&(y=""+f),d.key!==void 0&&(y=""+d.key),d.ref!==void 0&&(T=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:y,ref:T,props:m,_owner:s.current}}return Dt.Fragment=n,Dt.jsx=u,Dt.jsxs=u,Dt}var Ds;function Cn(){return Ds||(Ds=1,Et.exports=Ls()),Et.exports}var w=Cn(),P=ur();const Vi=rt(P),Ar=Object.create(null);Ar.open="0",Ar.close="1",Ar.ping="2",Ar.pong="3",Ar.message="4",Ar.upgrade="5",Ar.noop="6";const Ou=Object.create(null);Object.keys(Ar).forEach(e=>{Ou[Ar[e]]=e});const Ad={type:"error",data:"parser error"},v0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",A0=typeof ArrayBuffer=="function",C0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Cd=({type:e,data:t},n,r)=>v0&&t instanceof Blob?n?r(t):N0(t,r):A0&&(t instanceof ArrayBuffer||C0(t))?n?r(t):N0(new Blob([t]),r):r(Ar[e]+(t||"")),N0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function k0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Nd;function ZS(e,t){if(v0&&e.data instanceof Blob)return e.data.arrayBuffer().then(k0).then(t);if(A0&&(e.data instanceof ArrayBuffer||C0(e.data)))return t(k0(e.data));Cd(e,!1,n=>{Nd||(Nd=new TextEncoder),t(Nd.encode(n))})}const O0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ko=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<O0.length;e++)Ko[O0.charCodeAt(e)]=e;const e2=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=Ko[e.charCodeAt(r)],u=Ko[e.charCodeAt(r+1)],l=Ko[e.charCodeAt(r+2)],d=Ko[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},t2=typeof ArrayBuffer=="function",kd=(e,t)=>{if(typeof e!="string")return{type:"message",data:I0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:n2(e.substring(1),t)}:Ou[n]?e.length>1?{type:Ou[n],data:e.substring(1)}:{type:Ou[n]}:Ad},n2=(e,t)=>{if(t2){const n=e2(e);return I0(n,t)}else return{base64:!0,data:e}},I0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,P0="",r2=(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(P0))})})},i2=(e,t)=>{const n=e.split(P0),r=[];for(let s=0;s<n.length;s++){const a=kd(n[s],t);if(r.push(a),a.type==="error")break}return r};function s2(){return new TransformStream({transform(e,t){ZS(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 Od;function Iu(e){return e.reduce((t,n)=>t+n.length,0)}function Pu(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 o2(e,t){Od||(Od=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(Iu(n)<1)break;const d=Pu(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(Iu(n)<2)break;const d=Pu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Iu(n)<8)break;const d=Pu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(Ad);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Iu(n)<s)break;const d=Pu(n,s);l.enqueue(kd(a?d:Od.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(Ad);break}}}})}const R0=4;function $t(e){if(e)return a2(e)}function a2(e){for(var t in $t.prototype)e[t]=$t.prototype[t];return e}$t.prototype.on=$t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},$t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},$t.prototype.off=$t.prototype.removeListener=$t.prototype.removeAllListeners=$t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,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},$t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this},$t.prototype.emitReserved=$t.prototype.emit,$t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},$t.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Ru=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Qn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),u2="arraybuffer";function VU(){}function L0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const l2=Qn.setTimeout,c2=Qn.clearTimeout;function Lu(e,t){t.useNativeTimers?(e.setTimeoutFn=l2.bind(Qn),e.clearTimeoutFn=c2.bind(Qn)):(e.setTimeoutFn=Qn.setTimeout.bind(Qn),e.clearTimeoutFn=Qn.clearTimeout.bind(Qn))}const d2=1.33;function f2(e){return typeof e=="string"?h2(e):Math.ceil((e.byteLength||e.size)*d2)}function h2(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 p2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function m2(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 g2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Id extends $t{constructor(t){super(),this.writable=!1,Lu(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 g2(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=kd(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=p2(t);return n.length?"?"+n:""}}class E2 extends Id{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)};i2(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,r2(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 M0=!1;try{M0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const y2=M0;function T2(){}class b2 extends E2{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 Cr extends $t{constructor(t,n,r){super(),this.createRequest=t,Lu(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=L0(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=Cr.requestsCount++,Cr.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=T2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Cr.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(Cr.requestsCount=0,Cr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",F0);else if(typeof addEventListener=="function"){const e="onpagehide"in Qn?"pagehide":"unload";addEventListener(e,F0,!1)}}function F0(){for(let e in Cr.requests)Cr.requests.hasOwnProperty(e)&&Cr.requests[e].abort()}const w2=(function(){const e=B0({xdomain:!1});return e&&e.responseType!==null})();class _2 extends b2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=w2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Cr(B0,this.uri(),t)}}function B0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||y2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Qn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const U0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class x2 extends Id{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=U0?{}:L0(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&&Ru(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=D0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Pd=Qn.WebSocket||Qn.MozWebSocket;class S2 extends x2{createSocket(t,n,r){return U0?new Pd(t,n,r):n?new Pd(t,n):new Pd(t)}doWrite(t,n){this.ws.send(n)}}class v2 extends Id{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=o2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=s2();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&&Ru(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const A2={websocket:S2,webtransport:v2,polling:_2},C2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,N2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Rd(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=C2.exec(e||""),a={},u=14;for(;u--;)a[N2[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=k2(a,a.path),a.queryKey=O2(a,a.query),a}function k2(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 O2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Ld=typeof addEventListener=="function"&&typeof removeEventListener=="function",Du=[];Ld&&addEventListener("offline",()=>{Du.forEach(e=>e())},!1);class ci extends $t{constructor(t,n){if(super(),this.binaryType=u2,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=Rd(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=Rd(n.host).host);Lu(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=m2(this.opts.query)),Ld&&(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"})},Du.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=R0,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&&ci.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",ci.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+=f2(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,Ru(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,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(ci.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(),Ld&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Du.indexOf(this._offlineEventListener);r!==-1&&Du.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ci.protocol=R0;class I2 extends ci{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;ci.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;ci.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 y=new Error("probe error");y.transport=n.name,this.emitReserved("upgradeError",y)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const y=new Error("probe error: "+m);y.transport=n.name,a(),this.emitReserved("upgradeError",y)};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 P2=class extends I2{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=>A2[a]).filter(a=>!!a)),super(r?s:t,s)}};function R2(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=Rd(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 L2=typeof ArrayBuffer=="function",D2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,H0=Object.prototype.toString,M2=typeof Blob=="function"||typeof Blob!="undefined"&&H0.call(Blob)==="[object BlobConstructor]",F2=typeof File=="function"||typeof File!="undefined"&&H0.call(File)==="[object FileConstructor]";function Dd(e){return L2&&(e instanceof ArrayBuffer||D2(e))||M2&&e instanceof Blob||F2&&e instanceof File}function Mu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Mu(e[n]))return!0;return!1}if(Dd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Mu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Mu(e[n]))return!0;return!1}function B2(e){const t=[],n=e.data,r=e;return r.data=Fu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Fu(e,t,n){if(!e)return e;if(Dd(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]=Fu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Fu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Fu(e[s],t));return r}return e}function U2(e,t){return e.data=Md(e.data,t),delete e.attachments,e}function Md(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]=Md(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Md(e[n],t));return e}const H2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var st;(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"})(st||(st={}));class j2{constructor(t){this.replacer=t}encode(t){return(t.type===st.EVENT||t.type===st.ACK)&&Mu(t)?this.encodeAsBinary({type:t.type===st.EVENT?st.BINARY_EVENT:st.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===st.BINARY_EVENT||t.type===st.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=B2(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Fd extends $t{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===st.BINARY_EVENT;r||n.type===st.BINARY_ACK?(n.type=r?st.EVENT:st.ACK,this.reconstructor=new z2(n)):super.emitReserved("decoded",n)}else if(Dd(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(st[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===st.BINARY_EVENT||r.type===st.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(!$2(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(Fd.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 st.CONNECT:return j0(n);case st.DISCONNECT:return n===void 0;case st.CONNECT_ERROR:return typeof n=="string"||j0(n);case st.EVENT:case st.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&H2.indexOf(n[0])===-1);case st.ACK:case st.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=U2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const $2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function j0(e){return Object.prototype.toString.call(e)==="[object Object]"}const V2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Fd,Encoder:j2,get PacketType(){return st}},Symbol.toStringTag,{value:"Module"}));function lr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const q2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class z0 extends $t{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[lr(t,"open",this.onopen.bind(this)),lr(t,"packet",this.onpacket.bind(this)),lr(t,"error",this.onerror.bind(this)),lr(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(q2.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:st.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:st.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 st.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 st.EVENT:case st.BINARY_EVENT:this.onevent(t);break;case st.ACK:case st.BINARY_ACK:this.onack(t);break;case st.DISCONNECT:this.ondisconnect();break;case st.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:st.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:st.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 Ms(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}Ms.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},Ms.prototype.reset=function(){this.attempts=0},Ms.prototype.setMin=function(e){this.ms=e},Ms.prototype.setMax=function(e){this.max=e},Ms.prototype.setJitter=function(e){this.jitter=e};class Bd extends $t{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Lu(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 Ms({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||V2;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 P2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=lr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=lr(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(lr(t,"ping",this.onping.bind(this)),lr(t,"data",this.ondata.bind(this)),lr(t,"error",this.onerror.bind(this)),lr(t,"close",this.onclose.bind(this)),lr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Ru(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new z0(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 Qo={};function Ud(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=R2(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Qo[s]&&a in Qo[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new Bd(r,t):(Qo[s]||(Qo[s]=new Bd(r,t)),d=Qo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Ud,{Manager:Bd,Socket:z0,io:Ud,connect:Ud});const $0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&$0.call(Blob),typeof File=="function"||typeof File!="undefined"&&$0.call(File);var V0;(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"})(V0||(V0={}));const Bu="cimulate",Hd=`${Bu}:pdp-update`,jd=`${Bu}:ui-state-update`,zd=`${Bu}:prompts-state-update`,$d=`${Bu}:session-state`,Y2=e=>{window.addEventListener(Hd,e)},W2=e=>{window.removeEventListener(Hd,e)},G2=(e,t,n)=>{const r=new CustomEvent(Hd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},q0=e=>{window.addEventListener($d,e)},Y0=e=>{window.removeEventListener($d,e)},W0=(e,t,n)=>{const r=new CustomEvent($d,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class X2{constructor(){Ke(this,"initialParams",{productId:"",productName:"",pdpLink:""});Ke(this,"proxy");Ke(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ke(this,"_fullSet",(t,n,r)=>(G2(n,r),Reflect.set(t,n,r)));Ke(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const Jo=new X2,G0=["ask_cim","search","browse","pdp"],X0=e=>G0.includes(e),K0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(K0)),new Map(Object.entries(K0).map(([e,t])=>[t,e]));const At=(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 K2{constructor(t=!1){Ke(this,"isDevelopment");Ke(this,"_log",(t,n,...r)=>{At(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 Q2=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!X0(e.type)){At(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&At(n,"warn",`initialEntry.type "${e.type}" conflicts with the deprecated entryType "${t}". entryType wins for the UI entry type; initialEntry params are still seeded. Prefer initialEntry on its own.`),e.type==="pdp"){if(!((r=e.params)!=null&&r.productId)){At(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}Jo.updateProxy(e.params);return}At(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}},Uu=(e,t)=>{if(/^(https?:)?\/\//i.test(t)||/^data:/i.test(t)||!e)return t;try{return new URL(t,e).href}catch(n){return`${e}${t}`}},J2="ccDevMode",Z2=(e=typeof window!="undefined"?window.location.search:"")=>{var t;return((t=new URLSearchParams(e).get(J2))==null?void 0:t.toLowerCase())==="true"};let ev=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 tv{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 De(this,null,function*(){if(this.reading)return void this.logger.warn("SSE already connected, ignoring duplicate connect()");this.controller=new AbortController,this.reading=!0;const t=yield fetch(this.url,{method:"GET",headers:ae(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 De(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,`
|
|
3
3
|
`).replace(/\r/g,`
|
|
4
4
|
`);(l=s.indexOf(`
|
|
5
5
|
|
|
@@ -13,40 +13,40 @@
|
|
|
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
14
|
`),l=u===-1?-1:a.indexOf(`
|
|
15
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=Wi(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Zu.assertOptions(r,{silentJSONParsing:dn.transitional(dn.boolean),forcedJSONParsing:dn.transitional(dn.boolean),clarifyTimeoutError:dn.transitional(dn.boolean),legacyInterceptorReqResOrdering:dn.transitional(dn.boolean),advertiseZstdAcceptEncoding:dn.transitional(dn.boolean),validateStatusUndefinedResolves:dn.transitional(dn.boolean)},!1),s!=null&&(Y.isFunction(s)?n.paramsSerializer={serialize:s}:Zu.assertOptions(s,{encode:dn.function,serialize:dn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Zu.assertOptions(n,{baseUrl:dn.spelling("baseURL"),withXsrfToken:dn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Y.merge(a.common,a[n.method]);a&&Y.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=cn.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;d=d&&A.synchronous;const x=n.transitional||tf;x&&x.legacyInterceptorReqResOrdering?l.unshift(A.fulfilled,A.rejected):l.push(A.fulfilled,A.rejected)});const f=[];this.interceptors.response.forEach(function(A){f.push(A.fulfilled,A.rejected)});let p,m=0,y;if(!d){const _=[jg.bind(this),void 0];for(_.unshift(...l),_.push(...f),y=_.length,p=Promise.resolve(n);m<y;)p=p.then(_[m++],_[m++]);return p}y=l.length;let T=n;for(;m<y;){const _=l[m++],A=l[m++];try{T=_(T)}catch(x){A.call(this,x);break}}try{p=jg.call(this,T)}catch(_){return Promise.reject(_)}for(m=0,y=f.length;m<y;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=Wi(this.defaults,t);const n=Ig(t.baseURL,t.url,t.allowAbsoluteUrls,t);return wg(n,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){Gi.prototype[t]=function(n,r){return this.request(Wi(r||{},{method:t,url:n,data:r&&Y.hasOwnProp(r,"data")?r.data:void 0}))}}),Y.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(Wi(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Gi.prototype[t]=n(),t!=="query"&&(Gi.prototype[t+"Form"]=n(!0))});let fC=class QS{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 ia(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 QS(function(s){t=s}),cancel:t}}};function hC(e){return function(n){return e.apply(null,n)}}function pC(e){return Y.isObject(e)&&e.isAxiosError===!0}const lf={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(lf).forEach(([e,t])=>{lf[t]=e});function $g(e){const t=new Gi(e),n=ig(Gi.prototype.request,t);return Y.extend(n,Gi.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return $g(Wi(e,s))},n}const Bt=$g(ra);Bt.Axios=Gi,Bt.CanceledError=ia,Bt.CancelToken=fC,Bt.isCancel=Ag,Bt.VERSION=of,Bt.toFormData=Gu,Bt.AxiosError=Ne,Bt.Cancel=Bt.CanceledError,Bt.all=function(t){return Promise.all(t)},Bt.spread=hC,Bt.isAxiosError=pC,Bt.mergeConfig=Wi,Bt.AxiosHeaders=cn,Bt.formToJSON=e=>vg(Y.isHTMLForm(e)?new FormData(e):e),Bt.getAdapter=Hg.getAdapter,Bt.HttpStatusCode=lf,Bt.default=Bt;const{Axios:XU,AxiosError:KU,CanceledError:QU,isCancel:JU,CancelToken:ZU,VERSION:eH,all:tH,Cancel:nH,isAxiosError:rH,spread:iH,toFormData:sH,AxiosHeaders:oH,HttpStatusCode:aH,formToJSON:uH,getAdapter:lH,mergeConfig:cH,create:dH}=Bt;class mC{constructor(t,n,r,s=!1,a,u){Ke(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ke(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ke(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ke(this,"baseApiUrl");Ke(this,"headers",{});Ke(this,"fetchConfig",()=>De(this,null,function*(){try{const t=yield Bt.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}}));Ke(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 gC{constructor(t,n,r,s=!1,a,u){Ke(this,"apiService");Ke(this,"config",null);Ke(this,"getConfig",()=>De(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}}));Ke(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ke(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ke(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ke(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ke(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ke(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ke(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ke(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ke(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ke(this,"getProductField",t=>this.config?this.config[t]:"");Ke(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new mC(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 EC={copilot:"Your Search Assistant",messaging:"Commerce Client"},Vg=P.createContext(null),yC=({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:y,searchConfig:T,suggestionButtonConfig:_,progressStepsLimit:A=3,messageAlignment:x="start",autoScroll:S=!0,showProductDescription:N=!1,componentConfig:O,conversationHistory:j,resetConversationMessage:V="",apiKey:D,apiToken:W,baseUrl:Z,customerId:re,tenantId:z,theme:K,isDevelopment:oe,__features:de,routingAttributes:fe,enableDownloadTranscript:te=!0,enableEscalationToAgent:ve=!1,showProductCaptions:ue=!1,staticQuestions:Q,staticQuestionsStrategy:le="append",children:C})=>{const F=e==="messaging",ee=P.useMemo(()=>{const He=fe==null?void 0:fe.isCartMgmtSupported;return He===!0||He==="true"},[fe]),R=P.useMemo(()=>F?{config:null}:new gC(Z,D,W,oe,re,z),[F,Z,D,W,oe,re,z]),Ce=P.useMemo(()=>new K2(oe),[oe]);P.useEffect(()=>{F||!R||R.config||R.getConfig()},[R,F]);const Re=P.useMemo(()=>sv(K),[K]),he=P.useMemo(()=>{const He=(T==null?void 0:T.placeholder)||m,et=(T==null?void 0:T.buttonLabel)||y;let pt="icon";return T!=null&&T.buttonType?pt=T.buttonType:y&&(pt="text"),ae(U({},T||{}),{placeholder:He,buttonLabel:et,buttonType:pt})},[T,m,y]),Se=P.useMemo(()=>ae(U({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||EC[e!=null?e:"copilot"]}),[r,t,n,e]),$e=P.useMemo(()=>({configModule:R,mode:e!=null?e:"copilot",headerConfig:Se,entryMessage:a,staticQuestions:Q||[],staticQuestionsStrategy:le,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:Re,logger:Ce,searchConfig:he,suggestionButtonConfig:_,progressStepsLimit:A,messageAlignment:x,autoScroll:S,showProductDescription:!!N,enableMinimize:!!(O!=null&&O.enableMinimize),enableDownloadTranscript:te,enableEscalationToAgent:ve,showProductCaptions:!!ue,resetConversationMessage:V,conversationHistory:{sinceHours:typeof(j==null?void 0:j.sinceHours)=="number"?j.sinceHours:F?24:1,limit:j==null?void 0:j.limit},features:de,isCartMgmtSupported:ee}),[R,e,Se,a,Q,le,s,f,p,l,d,u,he,_,x,S,N,O,te,ve,A,ue,V,Ce,Re,j,de,ee,F]);return w.jsx(Vg.Provider,{value:$e,children:C})},ft=()=>{const e=P.useContext(Vg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},qg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],fi=-1;function Yg(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e,n=typeof t.text=="string"?t.text:"",r=typeof t.message=="string"?t.message:"";return n||r||null}function Wg(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"){if(!Array.isArray(t)&&typeof t.type=="string"&&typeof t.index=="number"&&qg.includes(t.type))return t;const n=Yg(t);return n?{type:"markdown",index:fi,data:{content:n}}:null}}catch(t){}return{type:"markdown",index:fi,data:{content:e}}}function cf(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"||!qg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return ae(U({},n),{type:n.type,index:r})}function el(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function df(e){var s,a;if(e.type!=="markdown")return[e];const t=(a=(s=e.data)==null?void 0:s.content)!=null?a:"",n=el(t);if(n)return n.response;const r=cf(t);return[r&&r.type!=="markdown"?r:e]}function TC(e){const t=el(e);if(t)return t.response.flatMap(df);const n=cf(e);return n?df(n):[]}function Gg(e,t){return TC(e).some(n=>n.type===t)}function bC(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.role==="agent"&&Gg(r.content,t))return r.id}}function Xg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function wC(e){return e.type==="markdown"&&e.index===fi?!Xg(e.data.content):!0}function _C(e){var s;const t=(s=el(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 xC(e,t){if(t.index===fi){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===fi&&t.type==="markdown"){const a={type:"markdown",index:fi,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 Kg(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const Qg={connectionStatus:"disconnected",loading:!1,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function SC(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return U(ae(U({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ae(U({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return ae(U({},e),{conversationId:t.id});case"ADD_MESSAGE":return Kg(e.messages,t.message)?e:ae(U({},e),{messages:[...e.messages,ae(U({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=Wg(t.token);return n?ae(U({},e),{streamingBlocks:xC(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(Kg(e.messages,t.message))return U(U({},e),n);const r=ae(U({},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]=ae(U({},r),{id:e.messages[s].id}),U(ae(U({},e),{messages:a}),n)}return U(ae(U({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return ae(U({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return U(ae(U({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:ae(U({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return ae(U({},e),{routingResult:t.result});case"SET_ERROR":return ae(U({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return ae(U({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return ae(U({},e),{sendError:null});case"LOAD_HISTORY":return ae(U({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return ae(U({},e),{sessionExpired:t.expired});case"RESET":return ae(U({},Qg),{connectionStatus:e.connectionStatus});default:return e}}const Jg=P.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,canInitialize:!0,sendMessage:()=>De(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>De(null,null,function*(){}),endConversation:()=>De(null,null,function*(){}),retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>De(null,null,function*(){}),getAuthLinkKey:()=>De(null,null,function*(){throw new Error("getAuthLinkKey called without a MessagingProvider")})}),vC=4320*60*1e3;function ff(e,t){return`cim_af_conv_${e}_${t}`}function hf(e,t){return Date.now()-e>t}function AC(e,t,n){try{const r=ff(e,t),s=localStorage.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"||hf(u.storedAt,n)?(localStorage.removeItem(r),null):u}catch(r){return null}}function tl(e,t,n){try{const r=ff(e,t),s={conversationId:n,storedAt:Date.now()};localStorage.setItem(r,JSON.stringify(s))}catch(r){}}function pf(e,t){try{const n=ff(e,t);localStorage.removeItem(n)}catch(n){}}function mf(e,t){return`cim_af_ct_${e}_${t}`}function CC(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(kC(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function NC(e){const t=CC(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function kC(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function Zg(e,t){try{const n=mf(e,t),r=localStorage.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:NC(a.accessToken)==="expired"?(localStorage.removeItem(n),null):a}catch(n){return null}}function OC(e,t,n,r){try{const s=mf(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};localStorage.setItem(s,JSON.stringify(a))}catch(s){}}function IC(e,t){try{const n=mf(e,t);localStorage.removeItem(n)}catch(n){}}function PC(e,t){return`cim_af_conv_${e}_${t}`}function RC(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=PC(e,t);return new BroadcastChannel(n)}catch(n){return null}}function LC(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 DC(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 MC(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function FC(e){if(e)try{e.close()}catch(t){}}function BC(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function UC(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function e1(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 HC(e){if(e.entryType!=="Message")return null;const n=UC(e.entryPayload).abstractMessage;if(!n)return null;const r=e1(n,"staticContent","text")||e1(n,"content","text")||"";if(!r)return null;const s=BC(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 jC(e){const t=[];for(const n of e){const r=HC(n);r&&t.push(r)}return t}const zC=5e3,sa=Symbol("cimulate-abort-conversation");function nl(e={}){const{routingAttributes:t,timeoutMs:n=zC}=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 m=Object.keys(r).length>0;s(m?r:t)},d={routingAttributes:t,setHiddenPrechatFields:m=>{a.settled||!m||Object.assign(r,m)},done:u,abort:()=>{a.settled||(a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer),s(sa))}},f=new CustomEvent(Z0,{detail:d,cancelable:!0});if(!!window.dispatchEvent(f)){u();return}a.timer=setTimeout(u,n)})}const $C=200,VC=1e3;function qC(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=P.useRef(null),u=P.useRef(null),l=P.useRef(null),d=s.sinceHours*60*60*1e3,f=vC,p=P.useCallback(()=>(l.current||(l.current=LC(a.current)),l.current),[]);P.useEffect(()=>{const S=RC(t,n);a.current=S,l.current=null;const N=DC(S,()=>{const O=u.current;if(!O)return null;const j=Zg(t,n);return{conversationId:O,continuationToken:j==null?void 0:j.accessToken,lastEventId:j==null?void 0:j.lastEventId}},()=>{pf(t,n),u.current=null});return()=>{N(),FC(S),a.current=null}},[t,n]);const m=P.useCallback((S,N)=>De(null,null,function*(){var D,W,Z;const O=(D=N==null?void 0:N.createIfMissing)!=null?D:!0,j=(W=N==null?void 0:N.isCurrent)!=null?W:(()=>!0);let V=AC(t,n,f);if(!V){const re=yield p();re&&!hf(re.storedAt,f)&&(V=re)}if(!V){if(!O)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const re=yield nl({routingAttributes:r});if(re===sa)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!j())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const z=yield S.createConversation(re);return j()?(tl(t,n,z),u.current=z,{conversationId:z,restoredMessages:[],resumed:!1,outcome:"created"}):(yield S.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}try{const re=yield S.listConversations({conversationId:V.conversationId,startTimestamp:Date.now()-f});if(!j())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const z=re.conversations.find(oe=>oe.conversationId===V.conversationId&&!oe.isConversationClosed);if(!z){if(pf(t,n),!O)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const oe=yield nl({routingAttributes:r});if(oe===sa)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!j())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const de=yield S.createConversation(oe);return j()?(tl(t,n,de),u.current=de,{conversationId:de,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}):(yield S.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}S.resumeConversation(z.conversationId),u.current=z.conversationId,tl(t,n,z.conversationId);let K=[];try{const oe=yield S.listConversationEntries(z.conversationId,{limit:Math.min((Z=s.limit)!=null?Z:$C,VC),startTimestamp:Date.now()-d,direction:"FromEnd"});K=jC(oe.conversationEntries).reverse()}catch(oe){}return{conversationId:z.conversationId,restoredMessages:K,resumed:!0,outcome:"resumed"}}catch(re){return{conversationId:V.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:re}}}),[t,n,r,s,d,f,p]),y=P.useCallback(S=>{tl(t,n,S),u.current=S},[t,n]),T=P.useCallback(()=>{pf(t,n),IC(t,n),MC(a.current),u.current=null},[t,n]),_=P.useCallback(()=>{const S=Zg(t,n);return S?{continuationToken:S.accessToken,lastEventId:S.lastEventId}:null},[t,n]),A=P.useCallback(()=>De(null,null,function*(){const S=yield p();return!(S!=null&&S.continuationToken)||hf(S.storedAt,f)?null:{continuationToken:S.continuationToken,lastEventId:S.lastEventId}}),[f,p]),x=P.useCallback((S,N=()=>!0)=>De(null,null,function*(){try{const{accessToken:O,lastEventId:j}=yield S.generateContinuationToken();if(!N())return;OC(t,n,O,j)}catch(O){}}),[t,n]);return{initializeConversation:m,persistConversationId:y,clearPersistedConversation:T,getStoredConnectOptions:_,getPeerConnectOptions:A,persistContinuationToken:x}}const YC="Your session ended due to inactivity. Starting a new session…",t1="This conversation has ended.",WC=300*1e3,GC=2e3,XC=1e4,KC=15e3,QC=2;function n1(e,t,n){return e||t||n===!0}function oa(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function JC(e){const t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{const n=JSON.parse(t);return typeof n=="object"&&n!==null}catch(n){return!1}}function r1(e){if(!e||typeof e!="object")return!1;const t=e,n=t.type==="auth",r=t.type==="api"&&(t.statusCode===401||t.statusCode===403);return n||r}function gf(e){if(r1(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function ZC(e){var y;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((y=e.variants)!=null?y:[]).filter(T=>T.value),s=r.map(T=>`${T.label}: ${T.value}`).join(", "),a=r.map(T=>T.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}}function i1(e,t){return t?{prompt:`${e} (Viewing product details for: ${t})`,display:e}:{prompt:e}}function eN({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:s,resumeUsedLastEventId:a,recoverySteps:u,onExhausted:l,timeoutMs:d=KC,logger:f,isRecoveryInFlight:p}){const m=P.useRef(u);m.current=u;const y=P.useRef(l);y.current=l;const T=P.useRef(f);T.current=f;const _=P.useRef(p);_.current=p;const A=P.useRef(0),x=P.useRef(!1),S=P.useRef(0),[N,O]=P.useState(0);P.useEffect(()=>{if(!t||n){A.current=0,x.current=!1,S.current=0;return}const j=a||A.current>0;if(!(s&&j&&e==="connected"&&!r&&!x.current))return;const D=setTimeout(()=>{De(null,null,function*(){var z,K;if((z=_.current)!=null&&z.call(_)){if(S.current+=1,S.current>QC){x.current=!0,y.current();return}O(oe=>oe+1);return}const W=A.current,Z=m.current;if(W>=Z.length){x.current=!0,y.current();return}S.current=0,(K=T.current)==null||K.warn("🦜 connect bootstrap stalled",{attempt:W});let re;try{yield Promise.race([Promise.resolve(Z[W]()),new Promise((oe,de)=>{re=setTimeout(()=>{de(new Error("connect bootstrap step timed out"))},d)})])}catch(oe){}finally{re!==void 0&&clearTimeout(re),A.current=W+1,O(oe=>oe+1)}})},d);return()=>{clearTimeout(D)}},[e,t,n,r,s,a,d,N])}function tN(e){const t=P.useRef(e);t.current=e,P.useEffect(()=>{const n=({detail:r})=>{(r==null?void 0:r.event)===Hu.RESET_CONVERSATION&&t.current()};return q0(n),()=>{Y0(n)}},[])}function nN(e){const t=P.useRef(e);t.current=e,P.useEffect(()=>{const n=({detail:r})=>{(r==null?void 0:r.event)===Hu.END_CONVERSATION&&t.current()};return q0(n),()=>{Y0(n)}},[])}const Nr={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 rN(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 Gr(e){const{type:t,statusCode:n}=rN(e);if(t==="api"&&typeof n=="number")return n===429?Nr.rateLimit:n>=500?Nr.server:Nr.default;switch(t){case"network":return Nr.network;case"sse":return Nr.interrupted;case"auth":return Nr.connect;default:return Nr.default}}function s1(e){switch(e.code){case"MAX_RECONNECT":return Nr.lost;case"ROUTING_FAILED":return Nr.routing;default:return Nr.connect}}let Xi=null;function iN(e){Xi&&Xi!==e&&console.warn("[CimulateMessaging] A messaging API is already registered; overwriting it. Mounting more than one messaging widget per page is not supported."),Xi=e}function sN(e){Xi===e&&(Xi=null)}function oN(){if(!Xi)throw new Error("Cimulate messaging widget is not ready. Call this after injectMessagingWidget() has run and the widget has mounted.");return Xi}const $s=Symbol("initialization-cancelled"),aN=3e4,o1=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,onProductResult:f,onEndConversation:p,children:m})=>{const{logger:y,conversationHistory:T}=ft(),{status:{isOpen:_}}=Wr(),[A,x]=P.useReducer(SC,Qg),[S,N]=P.useState(!1),[O,j]=P.useState(!1),[V,D]=P.useState(!1),W=P.useRef(A);W.current=A;const Z=qC({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:T}),re=P.useRef(null),z=P.useRef(l),K=P.useRef(d),oe=P.useRef(u),de=P.useRef(f),fe=P.useRef(p),te=P.useRef(!1),ve=P.useRef(!1),ue=P.useRef(!1),Q=P.useRef(0),le=P.useRef(0),C=P.useRef(0),F=P.useRef(null),ee=P.useRef(null),R=P.useRef(null),Ce=P.useRef(0),Re=P.useRef(!1),he=P.useRef(0),Se=P.useRef(0),$e=P.useRef(()=>Promise.reject(new Error("Messaging is unavailable"))),He=P.useRef([]),et=P.useRef(null),pt=P.useCallback((se,Ae)=>{Ae.outcome==="timeout"?(se.timedOut=!0,He.current=He.current.filter(ke=>ke===se||!ke.timedOut)):He.current=He.current.filter(ke=>ke!==se),clearTimeout(se.timeoutId),se.resolve(Ae)},[]);z.current=l,K.current=d,oe.current=u,de.current=f,fe.current=p,P.useEffect(()=>{const se=new iv({baseURL:e,orgId:t,esDeveloperName:n,options:U({enableLogging:a},s?{capabilitiesVersion:s}:{})});re.current=se,Re.current=!1,D(!1),N(!1),j(!1),x({type:"RESET"}),se.on("connected",()=>{var pe;x({type:"SET_CONNECTION_STATUS",status:"connected"}),(pe=oe.current)==null||pe.call(oe)}),se.on("disconnected",()=>{x({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),se.on("reconnecting",()=>{x({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),se.on("message",pe=>{var Ya,Wa;const Fe=ae(U({id:pe.messageId||crypto.randomUUID()},pe.messageId?{serverId:pe.messageId}:{}),{role:"agent",content:pe.content,timestamp:pe.timestamp,sender:pe.sender,raw:pe});y==null||y.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:Fe.id,tokensBeforeFlush:Q.current,streamedFinalOnly:Q.current===0}),Q.current=0;const lt=oa(He.current),qn=lt==null?void 0:lt.options.reconcileMessageId;x({type:"FLUSH_STREAMING",message:Fe,replaceMessageId:qn}),(Ya=z.current)==null||Ya.call(z,Fe),lt&&pt(lt,{outcome:"success"});const{messagingSessionId:Pt}=pe,Yn=Pt?_C(pe.content):null;Pt&&Yn&&((Wa=de.current)==null||Wa.call(de,{agentSessionId:Pt,kind:Yn.kind,productIds:Yn.productIds}))}),se.on("streaming_token",pe=>{var Fe;if(!((Fe=oa(He.current))!=null&&Fe.options.silent)){if(Q.current+=1,y!=null&&y.isDevelopment){const lt=Wg(pe.token);lt?lt.index===fi?y.debug("🦜 streaming_token → markdown fallback",{token:pe.token}):y.debug("🦜 streaming_token parsed",{type:lt.type,index:lt.index,outputName:lt.type==="tool_results"?lt.output_name:void 0}):y.debug("🦜 streaming_token dropped (empty or unrecognized payload shape)",{token:pe.token})}x({type:"APPEND_STREAMING_TOKEN",token:pe.token})}}),se.on("typing_started",()=>{var pe;(pe=oa(He.current))!=null&&pe.options.silent||x({type:"SET_AGENT_TYPING",isTyping:!0})}),se.on("typing_stopped",()=>{var pe;(pe=oa(He.current))!=null&&pe.options.silent||x({type:"SET_AGENT_TYPING",isTyping:!1})}),se.on("progress_indicator",pe=>{var Fe;(Fe=oa(He.current))!=null&&Fe.options.silent||x({type:"ADD_PROGRESS_STEP",message:pe.message})}),se.on("routing_result",pe=>{var Fe;if(x({type:"SET_ROUTING_RESULT",result:pe}),!pe.isSuccessful){const lt=`Routing failed: ${pe.failureType||"unknown"}`;x({type:"SET_ERROR",error:s1({code:"ROUTING_FAILED"})}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(Fe=K.current)==null||Fe.call(K,lt)}}),se.on("participant_changed",pe=>{if(pe.participant.name==="Automated Process")return;const Fe=ae(U({id:crypto.randomUUID()},pe.entryId?{serverId:pe.entryId}:{}),{role:"system",content:pe.action==="add"?`${pe.participant.name||"Agent"} joined the conversation`:`${pe.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});y==null||y.log("🦜 MessagingProvider participant_changed event received",{event:pe}),x({type:"ADD_MESSAGE",message:Fe})}),se.on("conversation_closed",()=>{const pe={id:crypto.randomUUID(),role:"system",content:t1,timestamp:new Date().toISOString()};x({type:"ADD_MESSAGE",message:pe}),x({type:"SET_CONVERSATION_ID",id:null}),Z.clearPersistedConversation()}),se.on("error",pe=>{var Fe;if(y==null||y.log("🦜 MessagingProvider ERROR event received",{event:pe}),pe.code==="SESSION_EXPIRED"){ue.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:s1(pe)}),pe.recoverable||x({type:"SET_CONNECTION_STATUS",status:"error"}),(Fe=K.current)==null||Fe.call(K,pe.message)});const Ae=pe=>{if(pe!==he.current)throw $s},ke=pe=>pe===he.current,be=pe=>De(null,null,function*(){N(!1);let Fe=Z.getStoredConnectOptions(),lt=!1;Fe||(Fe=yield Z.getPeerConnectOptions(),Ae(pe),lt=!!Fe);let qn=!1;try{if(yield se.connect(Fe!=null?Fe:void 0),!ke(pe))throw se.disconnect(),$s;qn=!!(Fe!=null&&Fe.lastEventId)}catch(Yn){if(Ae(pe),Fe&&gf(Yn)){if(y==null||y.log("Stored token expired on connect — falling back to fresh connect"),lt||Z.clearPersistedConversation(),yield se.connect(),!ke(pe))throw se.disconnect(),$s;qn=!1}else throw Yn}j(qn),yield Z.persistContinuationToken(se,()=>ke(pe)),Ae(pe);const Pt=yield Z.initializeConversation(se,{isCurrent:()=>ke(pe)});if(Ae(pe),y==null||y.log("🦜 initial connect complete",{conversationId:Pt.conversationId,resumed:Pt.resumed,outcome:Pt.outcome,restoredMessages:Pt.restoredMessages.length}),Pt.outcome==="aborted")throw x({type:"SET_LOADING",isLoading:!1}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),$s;if(Pt.outcome==="unverified-error"){Pt.conversationId&&(se.resumeConversation(Pt.conversationId),x({type:"SET_CONVERSATION_ID",id:Pt.conversationId})),N(!0);return}x({type:"SET_CONVERSATION_ID",id:Pt.conversationId}),Pt.resumed&&x({type:"LOAD_HISTORY",messages:Pt.restoredMessages}),N(!0),x({type:"SET_LOADING",isLoading:!1})});return ee.current=be,()=>{he.current+=1,Se.current+=1,se.disconnect(),se.off(),re.current=null,ee.current=null,R.current=null,Re.current=!1}},[e,t,n,s,pt]);const bt=P.useCallback(()=>{if(Re.current)return Promise.resolve();if(R.current)return Ce.current===he.current?R.current:R.current.catch(be=>{if(be!==$s)throw be}).then(()=>$e.current());const se=ee.current;if(!se)return Promise.reject(new Error("Messaging is unavailable"));x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_CONNECTION_STATUS",status:"connecting"});const Ae=++he.current;Ce.current=Ae;const ke=se(Ae).then(()=>{Re.current=!0,D(!0)}).catch(be=>{var Fe;if(be===$s)throw be;const pe=be instanceof Error?be.message:String(be);throw x({type:"SET_CONNECTION_STATUS",status:"error"}),x({type:"SET_ERROR",error:Gr(be)}),(Fe=K.current)==null||Fe.call(K,pe),be}).finally(()=>{R.current===ke&&(R.current=null)});return R.current=ke,ke},[]);$e.current=bt,P.useEffect(()=>{_&&bt().catch(()=>{})},[_,e,t,n,s,bt]);const an=P.useCallback(()=>De(null,null,function*(){const se=re.current;if(!se)return!1;const Ae=Z.getStoredConnectOptions();if(!Ae)return y==null||y.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;y==null||y.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{se.disconnect(),yield se.connect(Ae)}catch(be){if(gf(be))return y==null||y.log("🦜 attemptResume: token expired (401) — will start fresh",{error:be instanceof Error?be.message:String(be)}),!1;throw y==null||y.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:be instanceof Error?be.message:String(be)}),be}yield Z.persistContinuationToken(se);const ke=yield Z.initializeConversation(se,{createIfMissing:!1});return ke.outcome==="not-found-or-closed"||!ke.conversationId?(y==null||y.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(ke.outcome==="unverified-error"&&(y==null||y.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:ke.conversationId}),se.resumeConversation(ke.conversationId)),y==null||y.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:ke.conversationId}),x({type:"SET_CONVERSATION_ID",id:ke.conversationId}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),Z.persistConversationId(ke.conversationId),ue.current=!1,x({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[Z,y]),En=P.useCallback(se=>De(null,null,function*(){var ke;const Ae=re.current;if(Ae){se.options.silent||(x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_PROGRESS_MESSAGE",message:""}));try{yield Ae.sendMessage(se.text)}catch(be){const pe=Gr(be);x({type:"SET_SEND_ERROR",error:{text:se.text,displayContent:se.displayContent,options:se.options,message:pe}}),(ke=K.current)==null||ke.call(K,be instanceof Error?be.message:String(be)),pt(se,{outcome:"failure",message:pe})}}}),[pt]),Ht=P.useCallback(se=>De(null,null,function*(){var ke;const Ae=re.current;if(!(!Ae||te.current)){te.current=!0,ve.current=!0;try{if(yield an()){se&&(yield En(se));return}y==null||y.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),ue.current=!1,x({type:"SET_SESSION_EXPIRED",expired:!1}),x({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:YC,timestamp:new Date().toISOString()}}),Z.clearPersistedConversation(),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),Ae.disconnect(),yield Ae.connect(),yield Z.persistContinuationToken(Ae);const be=yield nl({routingAttributes:r});if(be===sa){x({type:"SET_CONNECTION_STATUS",status:"disconnected"});return}const pe=yield Ae.createConversation(be);y==null||y.log("🦜 recoverExpiredSession: new conversation created",{conversationId:pe}),x({type:"SET_CONVERSATION_ID",id:pe}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),Z.persistConversationId(pe),se&&(yield En(se))}catch(be){const pe=be instanceof Error?be.message:String(be);x({type:"SET_ERROR",error:Gr(be)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(ke=K.current)==null||ke.call(K,pe),se&&pt(se,{outcome:"failure",message:Gr(be)})}finally{te.current=!1,ve.current=!1}}}),[r,Z,an,En,y,pt]),je=P.useRef(Ht);je.current=Ht;const _t=P.useCallback(()=>De(null,null,function*(){const se=re.current;if(!se||!Re.current||te.current)return;if(!W.current.conversationId&&!ue.current){se.reconnect();return}te.current=!0;const Ae=De(null,null,function*(){try{(yield an())||(ue.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(ke){ue.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{te.current=!1,F.current=null}});F.current=Ae,yield Ae}),[an]),Gt=P.useRef(_t);Gt.current=_t;const Ie=P.useCallback(()=>De(null,null,function*(){const se=re.current;if(!se||te.current)return;const Ae=Z.getStoredConnectOptions(),ke=Ae==null?void 0:Ae.continuationToken;if(ke){te.current=!0;try{se.disconnect(),yield se.connect({continuationToken:ke}),yield Z.persistContinuationToken(se);const be=W.current.conversationId;be&&se.resumeConversation(be)}catch(be){if(gf(be)){ue.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),x({type:"SET_LOADING",isLoading:!1});return}y==null||y.log("🦜 reconnectOmittingLastEventId: transient connect failure — session kept",{error:be instanceof Error?be.message:String(be)})}finally{te.current=!1}}}),[Z,y]);P.useEffect(()=>{const se=()=>{const lt=Date.now();lt-C.current<GC||(C.current=lt,Gt.current())},Ae=()=>{if(document.visibilityState==="hidden"){le.current=Date.now();return}const lt=re.current;if(!lt)return;const qn=le.current?Date.now()-le.current:0;le.current=0,(ue.current||!lt.isConnected||qn>WC)&&se()},ke=lt=>{lt.persisted&&se()},be=()=>{le.current=Date.now()},pe=()=>se(),Fe=()=>se();return document.addEventListener("visibilitychange",Ae),window.addEventListener("pageshow",ke),window.addEventListener("pagehide",be),document.addEventListener("resume",pe),window.addEventListener("online",Fe),()=>{document.removeEventListener("visibilitychange",Ae),window.removeEventListener("pageshow",ke),window.removeEventListener("pagehide",be),document.removeEventListener("resume",pe),window.removeEventListener("online",Fe)}},[]);const Qe=P.useCallback((se,Ae)=>De(null,null,function*(){var be;const ke=re.current;if(!ke){pt(se,{outcome:"failure",message:"Messaging is unavailable"});return}if(ue.current){yield je.current(se);return}try{yield ke.sendMessage(se.text)}catch(pe){if(r1(pe)){yield je.current(se);return}const Fe=Gr(pe);x({type:"SET_SEND_ERROR",error:Ae(Fe)}),(be=K.current)==null||be.call(K,pe instanceof Error?pe.message:String(pe)),pt(se,{outcome:"failure",message:Fe})}}),[pt]),ot=P.useCallback(se=>De(null,null,function*(){const Ae=F.current;Ae&&(yield Ae),yield se()}),[]),ut=P.useCallback((se,Ae,ke={})=>new Promise(be=>{if(!re.current){be({outcome:"failure",message:"Messaging is unavailable"});return}const Fe={};Object.assign(Fe,{text:se,displayContent:Ae,options:ke,resolve:be,timeoutId:setTimeout(()=>{x({type:"SET_LOADING",isLoading:!1}),pt(Fe,{outcome:"timeout"})},XC)}),He.current.push(Fe),x({type:"CLEAR_SEND_ERROR"}),ke.silent||(x({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"user",content:Ae!=null?Ae:se,timestamp:new Date().toISOString()}}),x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_PROGRESS_MESSAGE",message:""})),ot(()=>Qe(Fe,lt=>({text:se,displayContent:Ae,options:ke,message:lt})))}),[Qe,ot,pt]),tr=P.useCallback((se,Ae)=>{if(!se.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});const ke=Se.current,be=()=>{const lt=()=>ke!==Se.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):ut(se,Ae==null?void 0:Ae.displayContent,Ae);return Re.current?lt():bt().then(lt,qn=>({outcome:"failure",message:Gr(qn)}))},pe=et.current?et.current.then(be):be(),Fe=pe.then(()=>{});return et.current=Fe,Fe.finally(()=>{et.current===Fe&&(et.current=null)}),pe},[ut,bt]),ys=P.useCallback(se=>{if(!re.current)return;const Ae=Se.current,{prompt:ke,display:be}=ZC(se);bt().then(()=>{if(Ae===Se.current)return ut(ke,be)}).catch(()=>{})},[ut,bt]),Ts=P.useCallback(()=>{const se=re.current,Ae=W.current.sendError;if(!se||!Ae)return;const ke=()=>ve.current?Promise.resolve({outcome:"failure",message:Ae.message}):ut(Ae.text,Ae.displayContent,Ae.options),be=et.current?et.current.then(ke):ke(),pe=be.then(()=>{});return et.current=pe,pe.finally(()=>{et.current===pe&&(et.current=null)}),be},[ut]),ce=P.useCallback(()=>{const se=re.current;se&&(R.current||(ue.current=!1,Re.current=!1,D(!1),se.disconnect(),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),bt().catch(()=>{})))},[bt]),xe=P.useCallback(()=>{const se=re.current;if(!se)return Promise.resolve();if(He.current=[],!Re.current)return he.current+=1,Se.current+=1,se.disconnect(),Z.clearPersistedConversation(),x({type:"RESET"}),Promise.resolve();const Ae=++Se.current;return ue.current=!1,j(!1),Z.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),se.endConversation().then(()=>Ae!==Se.current||re.current!==se?null:(se.disconnect(),se.connect().then(()=>se))).then(ke=>De(null,null,function*(){if(!ke||Ae!==Se.current||(yield Z.persistContinuationToken(ke,()=>Ae===Se.current&&re.current===ke),Ae!==Se.current||re.current!==ke))return null;const be=yield nl({routingAttributes:r});return be===sa?null:se.createConversation(be)})).then(ke=>{!ke||Ae!==Se.current||re.current!==se||(x({type:"SET_CONVERSATION_ID",id:ke}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),Z.persistConversationId(ke))}).catch(ke=>{var be;Ae!==Se.current||re.current!==se||(x({type:"SET_ERROR",error:Gr(ke)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(be=K.current)==null||be.call(K,ke.message))})},[r,Z]);tN(xe),eN({connectionStatus:A.connectionStatus,loading:A.loading,hasMessages:A.messages.length>0,sessionExpired:A.sessionExpired,bootstrapSettled:S,resumeUsedLastEventId:O,recoverySteps:[Ie,xe],onExhausted:()=>{var Ae;const se=Gr({type:"network"});x({type:"SET_ERROR",error:se}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(Ae=K.current)==null||Ae.call(K,se)},logger:y,isRecoveryInFlight:()=>te.current||F.current!==null});const We=P.useCallback(()=>De(null,null,function*(){var be;const se=re.current;if(!se||!W.current.conversationId)return;const Ae=yield se.retrieveConversationTranscript(),ke=URL.createObjectURL(Ae);try{const pe=document.createElement("a");pe.href=ke,pe.download=`transcript-${(be=se.conversationId)!=null?be:"conversation"}.pdf`,document.body.appendChild(pe),pe.click(),pe.remove()}finally{URL.revokeObjectURL(ke)}}),[]),Ze=P.useCallback(()=>De(null,null,function*(){const se=re.current;if(!se)return Promise.resolve();if(He.current=[],!Re.current)return he.current+=1,Se.current+=1,se.disconnect(),Z.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),Promise.resolve();const Ae=++Se.current;if(ue.current=!1,j(!1),fe.current)try{yield Promise.race([fe.current(W.current.conversationId),new Promise(be=>setTimeout(be,aN))])}catch(be){y==null||y.error("onEndConversation callback failed",be)}Z.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"});const ke={id:crypto.randomUUID(),role:"system",content:t1,timestamp:new Date().toISOString()};return x({type:"ADD_MESSAGE",message:ke}),Re.current=!1,D(!1),se.endConversation().then(()=>{Ae!==Se.current||re.current!==se||se.disconnect()}).catch(be=>{var pe;Ae!==Se.current||re.current!==se||(x({type:"SET_ERROR",error:Gr(be)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(pe=K.current)==null||pe.call(K,be.message))})}),[y,Z,j]);nN(Ze);const nt=P.useCallback(()=>De(null,null,function*(){const se=re.current;if(!se)throw new Error("getAuthLinkKey called before the messaging client connected");return y==null||y.debug("🦜 getAuthLinkKey: requesting single-use auth link key"),se.getAuthLinkKey()}),[y]);P.useEffect(()=>{const se={getAuthLinkKey:nt};return iN(se),()=>sN(se)},[nt]);const Mt=A.connectionStatus==="connected"&&A.conversationId!==null;P.useEffect(()=>{eg(Mt)},[Mt]),P.useEffect(()=>()=>eg(!1),[]);const yr=P.useMemo(()=>({connectionStatus:A.connectionStatus,isConnected:Mt,isAgentTyping:A.isAgentTyping,conversationId:A.conversationId,messages:A.messages,streamingBlocks:A.streamingBlocks,progressMessage:A.progressMessage,progressSteps:A.progressSteps,error:A.error,sendError:A.sendError,canInitialize:!V&&A.error===null,loading:A.loading,sessionExpired:A.sessionExpired,sendMessage:tr,addToCart:ys,resetConversation:xe,endConversation:Ze,retryLastMessage:Ts,retryConnection:ce,downloadTranscript:We,getAuthLinkKey:nt}),[A,Mt,V,tr,ys,xe,Ze,Ts,ce,We,nt]);return w.jsx(Jg.Provider,{value:yr,children:m})};var a1=Symbol.for("immer-nothing"),u1=Symbol.for("immer-draftable"),jn=Symbol.for("immer-state");function dr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Vs=Object.getPrototypeOf;function qs(e){return!!e&&!!e[jn]}function Ki(e){var t;return e?l1(e)||Array.isArray(e)||!!e[u1]||!!((t=e.constructor)!=null&&t[u1])||aa(e)||sl(e):!1}var uN=Object.prototype.constructor.toString();function l1(e){if(!e||typeof e!="object")return!1;const t=Vs(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)===uN}function rl(e,t){il(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function il(e){const t=e[jn];return t?t.type_:Array.isArray(e)?1:aa(e)?2:sl(e)?3:0}function Ef(e,t){return il(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c1(e,t,n){const r=il(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function lN(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function aa(e){return e instanceof Map}function sl(e){return e instanceof Set}function Qi(e){return e.copy_||e.base_}function yf(e,t){if(aa(e))return new Map(e);if(sl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=l1(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[jn];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(Vs(e),r)}else{const r=Vs(e);if(r!==null&&n)return U({},e);const s=Object.create(r);return Object.assign(s,e)}}function Tf(e,t=!1){return al(e)||qs(e)||!Ki(e)||(il(e)>1&&Object.defineProperties(e,{set:{value:ol},add:{value:ol},clear:{value:ol},delete:{value:ol}}),Object.freeze(e),t&&Object.values(e).forEach(n=>Tf(n,!0))),e}function ol(){dr(2)}function al(e){return Object.isFrozen(e)}var cN={};function Ji(e){const t=cN[e];return t||dr(0,e),t}var ua;function d1(){return ua}function dN(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function f1(e,t){t&&(Ji("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function bf(e){wf(e),e.drafts_.forEach(fN),e.drafts_=null}function wf(e){e===ua&&(ua=e.parent_)}function h1(e){return ua=dN(ua,e)}function fN(e){const t=e[jn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function p1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[jn].modified_&&(bf(t),dr(4)),Ki(e)&&(e=ul(t,e),t.parent_||ll(t,e)),t.patches_&&Ji("Patches").generateReplacementPatches_(n[jn].base_,e,t.patches_,t.inversePatches_)):e=ul(t,n,[]),bf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==a1?e:void 0}function ul(e,t,n){if(al(t))return t;const r=t[jn];if(!r)return rl(t,(s,a)=>m1(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ll(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),rl(a,(l,d)=>m1(e,r,s,l,d,n,u)),ll(e,s,!1),n&&e.patches_&&Ji("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function m1(e,t,n,r,s,a,u){if(qs(s)){const l=a&&t&&t.type_!==3&&!Ef(t.assigned_,r)?a.concat(r):void 0,d=ul(e,s,l);if(c1(n,r,d),qs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Ki(s)&&!al(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ul(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(aa(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&ll(e,s)}}function ll(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Tf(t,n)}function hN(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:d1(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=_f;n&&(s=[r],a=la);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var _f={get(e,t){if(t===jn)return e;const n=Qi(e);if(!Ef(n,t))return pN(e,n,t);const r=n[t];return e.finalized_||!Ki(r)?r:r===xf(e.base_,t)?(vf(e),e.copy_[t]=Af(r,e)):r},has(e,t){return t in Qi(e)},ownKeys(e){return Reflect.ownKeys(Qi(e))},set(e,t,n){const r=g1(Qi(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=xf(Qi(e),t),a=s==null?void 0:s[jn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(lN(n,s)&&(n!==void 0||Ef(e.base_,t)))return!0;vf(e),Sf(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 xf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,vf(e),Sf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Qi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){dr(11)},getPrototypeOf(e){return Vs(e.base_)},setPrototypeOf(){dr(12)}},la={};rl(_f,(e,t)=>{la[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),la.deleteProperty=function(e,t){return la.set.call(this,e,t,void 0)},la.set=function(e,t,n){return _f.set.call(this,e[0],t,n,e[0])};function xf(e,t){const n=e[jn];return(n?Qi(n):e)[t]}function pN(e,t,n){var s;const r=g1(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function g1(e,t){if(!(t in e))return;let n=Vs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Vs(n)}}function Sf(e){e.modified_||(e.modified_=!0,e.parent_&&Sf(e.parent_))}function vf(e){e.copy_||(e.copy_=yf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var mN=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"&&dr(6),r!==void 0&&typeof r!="function"&&dr(7);let s;if(Ki(t)){const a=h1(this),u=Af(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?bf(a):wf(a)}return f1(a,r),p1(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===a1&&(s=void 0),this.autoFreeze_&&Tf(s,!0),r){const a=[],u=[];Ji("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else dr(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){Ki(e)||dr(8),qs(e)&&(e=gN(e));const t=h1(this),n=Af(e,void 0);return n[jn].isManual_=!0,wf(t),n}finishDraft(e,t){const n=e&&e[jn];(!n||!n.isManual_)&&dr(9);const{scope_:r}=n;return f1(r,t),p1(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=Ji("Patches").applyPatches_;return qs(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Af(e,t){const n=aa(e)?Ji("MapSet").proxyMap_(e,t):sl(e)?Ji("MapSet").proxySet_(e,t):hN(e,t);return(t?t.scope_:d1()).drafts_.push(n),n}function gN(e){return qs(e)||dr(10,e),E1(e)}function E1(e){if(!Ki(e)||al(e))return e;const t=e[jn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=yf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=yf(e,!0);return rl(n,(r,s)=>{c1(n,r,E1(s))}),t&&(t.finalized_=!1),n}var EN=new mN,yN=EN.produce;function TN(e,t,n){var r=P.useMemo(function(){return yN(e)},[e]);return P.useReducer(r,t,n)}const bN=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),y1=P.createContext(null),T1=P.createContext(null),wN=({children:e,dispatch:t})=>{const n=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),l=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),y=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),T=P.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:y}),[n,r,s,a,u,l,d,f,p,m,y]);return w.jsx(T1.Provider,{value:T,children:e})},_N=(e,t)=>{const{type:n,payload:r}=t;switch(n){case wt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case wt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case wt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case wt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case wt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case wt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case wt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case wt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case wt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case wt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case wt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case wt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case wt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case wt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case wt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},xN=({promptsConfig:e,children:t})=>{const[n,r]=TN(_N,ae(U(U({},rg),e||{}),{staticQuestions:bN((e==null?void 0:e.staticQuestions)||[])}));return w.jsx(y1.Provider,{value:n,children:w.jsx(wN,{dispatch:r,children:t})})},SN={productId:Jo.productId,pdpLink:Jo.pdpLink},b1=P.createContext(SN),vN=({children:e})=>{const[t,n]=P.useState(Jo.productId),[r,s]=P.useState(Jo.pdpLink);P.useEffect(()=>{const u=({detail:l})=>{if((l==null?void 0:l.property)==="pdp-context"){const d=l.value;n(d.productId),s(d.pdpLink);return}(l==null?void 0:l.property)==="productId"&&n(l.value),(l==null?void 0:l.property)==="pdpLink"&&s(l.value)};return Y2(u),()=>{W2(u)}},[]);const a=P.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(b1.Provider,{value:a,children:e})},AN=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){At(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){At(!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"?(At(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(At(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),At(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,At(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),w1=P.createContext({overrides:{},isInitialized:!1}),CN=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=P.useState({}),[a,u]=P.useState(!1);P.useEffect(()=>{De(null,null,function*(){let f={};e?(At(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield AN(e)):t&&typeof t=="object"?(At(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(At(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=P.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return w.jsx(w1.Provider,{value:l,children:n})},_1=({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:y,entryType:T,initialEntry:_,entryMessage:A,disclaimerText:x,disclaimerMarkdown:S,clientContext:N,searchPlaceholder:O,searchButtonLabel:j,searchConfig:V,suggestionButtonConfig:D,messageAlignment:W,autoScroll:Z,promptsConfig:re,showProductDescription:z,resetConversationMessage:K,conversationHistory:oe,messagingConfig:de,overrides:fe,overridesUrl:te,inlineOverrides:ve,__features:ue,children:Q})=>{const le=p||Z2(),C=P.useRef(!1);return C.current||(C.current=!0,Q2({initialEntry:_,entryType:T,isDevelopment:le})),w.jsx(yC,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:A,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:O,searchButtonLabel:j,searchConfig:V,suggestionButtonConfig:D,messageAlignment:W,autoScroll:Z,showProductDescription:z,componentConfig:y,clientContext:N,disclaimerMarkdown:S,disclaimerText:x,resetConversationMessage:K,conversationHistory:oe,isDevelopment:le,__features:ue,progressStepsLimit:de==null?void 0:de.progressStepsLimit,routingAttributes:de==null?void 0:de.routingAttributes,enableDownloadTranscript:de==null?void 0:de.enableDownloadTranscript,enableEscalationToAgent:de==null?void 0:de.enableEscalationToAgent,showProductCaptions:de==null?void 0:de.showProductCaptions,children:w.jsx(_v,{entryType:T!=null?T:_==null?void 0:_.type,componentConfig:y,componentType:m,children:w.jsx(vN,{children:w.jsx(xN,{promptsConfig:re,children:w.jsx(CN,{overridesUrl:te,inlineOverrides:ve||fe,children:w.jsx(o1,{scrt2Url:(de==null?void 0:de.scrt2Url)||"",orgId:(de==null?void 0:de.orgId)||"",esDeveloperName:(de==null?void 0:de.esDeveloperName)||"",routingAttributes:(de==null?void 0:de.routingAttributes)||{},capabilitiesVersion:de==null?void 0:de.capabilitiesVersion,enableLogging:le,onProductResult:de==null?void 0:de.onProductResult,onEndConversation:de==null?void 0:de.onEndConversation,children:Q})})})})})})};var Cf={exports:{}},kn={},Nf={exports:{}},kf={};var x1;function NN(){return x1||(x1=1,(function(e){function t(Q,le){var C=Q.length;Q.push(le);e:for(;0<C;){var F=C-1>>>1,ee=Q[F];if(0<s(ee,le))Q[F]=le,Q[C]=ee,C=F;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var le=Q[0],C=Q.pop();if(C!==le){Q[0]=C;e:for(var F=0,ee=Q.length,R=ee>>>1;F<R;){var Ce=2*(F+1)-1,Re=Q[Ce],he=Ce+1,Se=Q[he];if(0>s(Re,C))he<ee&&0>s(Se,Re)?(Q[F]=Se,Q[he]=C,F=he):(Q[F]=Re,Q[Ce]=C,F=Ce);else if(he<ee&&0>s(Se,C))Q[F]=Se,Q[he]=C,F=he;else break e}}return le}function s(Q,le){var C=Q.sortIndex-le.sortIndex;return C!==0?C:Q.id-le.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,y=3,T=!1,_=!1,A=!1,x=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(Q){for(var le=n(f);le!==null;){if(le.callback===null)r(f);else if(le.startTime<=Q)r(f),le.sortIndex=le.expirationTime,t(d,le);else break;le=n(f)}}function j(Q){if(A=!1,O(Q),!_)if(n(d)!==null)_=!0,ve(V);else{var le=n(f);le!==null&&ue(j,le.startTime-Q)}}function V(Q,le){_=!1,A&&(A=!1,S(Z),Z=-1),T=!0;var C=y;try{for(O(le),m=n(d);m!==null&&(!(m.expirationTime>le)||Q&&!K());){var F=m.callback;if(typeof F=="function"){m.callback=null,y=m.priorityLevel;var ee=F(m.expirationTime<=le);le=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===n(d)&&r(d),O(le)}else r(d);m=n(d)}if(m!==null)var R=!0;else{var Ce=n(f);Ce!==null&&ue(j,Ce.startTime-le),R=!1}return R}finally{m=null,y=C,T=!1}}var D=!1,W=null,Z=-1,re=5,z=-1;function K(){return!(e.unstable_now()-z<re)}function oe(){if(W!==null){var Q=e.unstable_now();z=Q;var le=!0;try{le=W(!0,Q)}finally{le?de():(D=!1,W=null)}}else D=!1}var de;if(typeof N=="function")de=function(){N(oe)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,te=fe.port2;fe.port1.onmessage=oe,de=function(){te.postMessage(null)}}else de=function(){x(oe,0)};function ve(Q){W=Q,D||(D=!0,de())}function ue(Q,le){Z=x(function(){Q(e.unstable_now())},le)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){_||T||(_=!0,ve(V))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Q){switch(y){case 1:case 2:case 3:var le=3;break;default:le=y}var C=y;y=le;try{return Q()}finally{y=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,le){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var C=y;y=Q;try{return le()}finally{y=C}},e.unstable_scheduleCallback=function(Q,le,C){var F=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?F+C:F):C=F,Q){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=C+ee,Q={id:p++,callback:le,priorityLevel:Q,startTime:C,expirationTime:ee,sortIndex:-1},C>F?(Q.sortIndex=C,t(f,Q),n(d)===null&&Q===n(f)&&(A?(S(Z),Z=-1):A=!0,ue(j,C-F))):(Q.sortIndex=ee,t(d,Q),_||T||(_=!0,ve(V))),Q},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(Q){var le=y;return function(){var C=y;y=le;try{return Q.apply(this,arguments)}finally{y=C}}}})(kf)),kf}var S1;function kN(){return S1||(S1=1,Nf.exports=NN()),Nf.exports}var v1;function ON(){if(v1)return kn;v1=1;var e=ur(),t=kN();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 y(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function T(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 _(i,o,c,h){if(o===null||typeof o=="undefined"||T(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 A(i,o,c,h,E,b,v){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=v}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){x[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];x[o]=new A(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){x[i]=new A(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){x[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){x[i]=new A(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){x[i]=new A(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){x[i]=new A(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){x[i]=new A(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){x[i]=new A(i,5,!1,i.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function N(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,N);x[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(S,N);x[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(S,N);x[o]=new A(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){x[i]=new A(i,1,!1,i.toLowerCase(),null,!1,!1)}),x.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){x[i]=new A(i,1,!1,i.toLowerCase(),null,!0,!0)});function O(i,o,c,h){var E=x.hasOwnProperty(o)?x[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,c,E,h)&&(c=null),h||E===null?y(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,V=Symbol.for("react.element"),D=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),K=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),ve=Symbol.for("react.lazy"),ue=Symbol.for("react.offscreen"),Q=Symbol.iterator;function le(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,F;function ee(i){if(F===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);F=o&&o[1]||""}return`
|
|
16
|
+
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Wi(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Zu.assertOptions(r,{silentJSONParsing:dn.transitional(dn.boolean),forcedJSONParsing:dn.transitional(dn.boolean),clarifyTimeoutError:dn.transitional(dn.boolean),legacyInterceptorReqResOrdering:dn.transitional(dn.boolean),advertiseZstdAcceptEncoding:dn.transitional(dn.boolean),validateStatusUndefinedResolves:dn.transitional(dn.boolean)},!1),s!=null&&(Y.isFunction(s)?n.paramsSerializer={serialize:s}:Zu.assertOptions(s,{encode:dn.function,serialize:dn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Zu.assertOptions(n,{baseUrl:dn.spelling("baseURL"),withXsrfToken:dn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Y.merge(a.common,a[n.method]);a&&Y.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=cn.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;d=d&&A.synchronous;const x=n.transitional||tf;x&&x.legacyInterceptorReqResOrdering?l.unshift(A.fulfilled,A.rejected):l.push(A.fulfilled,A.rejected)});const f=[];this.interceptors.response.forEach(function(A){f.push(A.fulfilled,A.rejected)});let p,m=0,y;if(!d){const _=[jg.bind(this),void 0];for(_.unshift(...l),_.push(...f),y=_.length,p=Promise.resolve(n);m<y;)p=p.then(_[m++],_[m++]);return p}y=l.length;let T=n;for(;m<y;){const _=l[m++],A=l[m++];try{T=_(T)}catch(x){A.call(this,x);break}}try{p=jg.call(this,T)}catch(_){return Promise.reject(_)}for(m=0,y=f.length;m<y;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=Wi(this.defaults,t);const n=Ig(t.baseURL,t.url,t.allowAbsoluteUrls,t);return wg(n,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){Gi.prototype[t]=function(n,r){return this.request(Wi(r||{},{method:t,url:n,data:r&&Y.hasOwnProp(r,"data")?r.data:void 0}))}}),Y.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(Wi(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Gi.prototype[t]=n(),t!=="query"&&(Gi.prototype[t+"Form"]=n(!0))});let fC=class QS{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 ia(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 QS(function(s){t=s}),cancel:t}}};function hC(e){return function(n){return e.apply(null,n)}}function pC(e){return Y.isObject(e)&&e.isAxiosError===!0}const lf={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(lf).forEach(([e,t])=>{lf[t]=e});function $g(e){const t=new Gi(e),n=ig(Gi.prototype.request,t);return Y.extend(n,Gi.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return $g(Wi(e,s))},n}const Bt=$g(ra);Bt.Axios=Gi,Bt.CanceledError=ia,Bt.CancelToken=fC,Bt.isCancel=Ag,Bt.VERSION=of,Bt.toFormData=Gu,Bt.AxiosError=Ne,Bt.Cancel=Bt.CanceledError,Bt.all=function(t){return Promise.all(t)},Bt.spread=hC,Bt.isAxiosError=pC,Bt.mergeConfig=Wi,Bt.AxiosHeaders=cn,Bt.formToJSON=e=>vg(Y.isHTMLForm(e)?new FormData(e):e),Bt.getAdapter=Hg.getAdapter,Bt.HttpStatusCode=lf,Bt.default=Bt;const{Axios:QU,AxiosError:JU,CanceledError:ZU,isCancel:eH,CancelToken:tH,VERSION:nH,all:rH,Cancel:iH,isAxiosError:sH,spread:oH,toFormData:aH,AxiosHeaders:uH,HttpStatusCode:lH,formToJSON:cH,getAdapter:dH,mergeConfig:fH,create:hH}=Bt;class mC{constructor(t,n,r,s=!1,a,u){Ke(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ke(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ke(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ke(this,"baseApiUrl");Ke(this,"headers",{});Ke(this,"fetchConfig",()=>De(this,null,function*(){try{const t=yield Bt.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}}));Ke(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 gC{constructor(t,n,r,s=!1,a,u){Ke(this,"apiService");Ke(this,"config",null);Ke(this,"getConfig",()=>De(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}}));Ke(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ke(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ke(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ke(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ke(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ke(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ke(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ke(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ke(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ke(this,"getProductField",t=>this.config?this.config[t]:"");Ke(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new mC(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 EC={copilot:"Your Search Assistant",messaging:"Commerce Client"},Vg=P.createContext(null),yC=({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:y,searchConfig:T,suggestionButtonConfig:_,progressStepsLimit:A=3,messageAlignment:x="start",autoScroll:S=!0,showProductDescription:N=!1,componentConfig:O,conversationHistory:j,resetConversationMessage:V="",apiKey:D,apiToken:W,baseUrl:Z,customerId:re,tenantId:z,theme:K,isDevelopment:oe,__features:de,routingAttributes:fe,enableDownloadTranscript:te=!0,enableEscalationToAgent:ve=!1,showProductCaptions:ue=!1,staticQuestions:Q,staticQuestionsStrategy:le="append",children:C})=>{const F=e==="messaging",ee=P.useMemo(()=>{const He=fe==null?void 0:fe.isCartMgmtSupported;return He===!0||He==="true"},[fe]),R=P.useMemo(()=>F?{config:null}:new gC(Z,D,W,oe,re,z),[F,Z,D,W,oe,re,z]),Ce=P.useMemo(()=>new K2(oe),[oe]);P.useEffect(()=>{F||!R||R.config||R.getConfig()},[R,F]);const Re=P.useMemo(()=>sv(K),[K]),he=P.useMemo(()=>{const He=(T==null?void 0:T.placeholder)||m,et=(T==null?void 0:T.buttonLabel)||y;let pt="icon";return T!=null&&T.buttonType?pt=T.buttonType:y&&(pt="text"),ae(U({},T||{}),{placeholder:He,buttonLabel:et,buttonType:pt})},[T,m,y]),Se=P.useMemo(()=>ae(U({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||EC[e!=null?e:"copilot"]}),[r,t,n,e]),$e=P.useMemo(()=>({configModule:R,mode:e!=null?e:"copilot",headerConfig:Se,entryMessage:a,staticQuestions:Q||[],staticQuestionsStrategy:le,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:Re,logger:Ce,searchConfig:he,suggestionButtonConfig:_,progressStepsLimit:A,messageAlignment:x,autoScroll:S,showProductDescription:!!N,enableMinimize:!!(O!=null&&O.enableMinimize),enableDownloadTranscript:te,enableEscalationToAgent:ve,showProductCaptions:!!ue,resetConversationMessage:V,conversationHistory:{sinceHours:typeof(j==null?void 0:j.sinceHours)=="number"?j.sinceHours:F?24:1,limit:j==null?void 0:j.limit},features:de,isCartMgmtSupported:ee}),[R,e,Se,a,Q,le,s,f,p,l,d,u,he,_,x,S,N,O,te,ve,A,ue,V,Ce,Re,j,de,ee,F]);return w.jsx(Vg.Provider,{value:$e,children:C})},ft=()=>{const e=P.useContext(Vg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},qg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],fi=-1;function Yg(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e,n=typeof t.text=="string"?t.text:"",r=typeof t.message=="string"?t.message:"";return n||r||null}function Wg(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"){if(!Array.isArray(t)&&typeof t.type=="string"&&typeof t.index=="number"&&qg.includes(t.type))return t;const n=Yg(t);return n?{type:"markdown",index:fi,data:{content:n}}:null}}catch(t){}return{type:"markdown",index:fi,data:{content:e}}}function cf(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"||!qg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return ae(U({},n),{type:n.type,index:r})}function el(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function df(e){var s,a;if(e.type!=="markdown")return[e];const t=(a=(s=e.data)==null?void 0:s.content)!=null?a:"",n=el(t);if(n)return n.response;const r=cf(t);return[r&&r.type!=="markdown"?r:e]}function TC(e){const t=el(e);if(t)return t.response.flatMap(df);const n=cf(e);return n?df(n):[]}function Gg(e,t){return TC(e).some(n=>n.type===t)}function bC(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.role==="agent"&&Gg(r.content,t))return r.id}}function Xg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function wC(e){return e.type==="markdown"&&e.index===fi?!Xg(e.data.content):!0}function _C(e){var s;const t=(s=el(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 xC(e,t){if(t.index===fi){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===fi&&t.type==="markdown"){const a={type:"markdown",index:fi,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 Kg(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const Qg={connectionStatus:"disconnected",loading:!1,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function SC(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return U(ae(U({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ae(U({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return ae(U({},e),{conversationId:t.id});case"ADD_MESSAGE":return Kg(e.messages,t.message)?e:ae(U({},e),{messages:[...e.messages,ae(U({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=Wg(t.token);return n?ae(U({},e),{streamingBlocks:xC(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(Kg(e.messages,t.message))return U(U({},e),n);const r=ae(U({},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]=ae(U({},r),{id:e.messages[s].id}),U(ae(U({},e),{messages:a}),n)}return U(ae(U({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return ae(U({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return U(ae(U({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:ae(U({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return ae(U({},e),{routingResult:t.result});case"SET_ERROR":return ae(U({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return ae(U({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return ae(U({},e),{sendError:null});case"LOAD_HISTORY":return ae(U({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return ae(U({},e),{sessionExpired:t.expired});case"RESET":return ae(U({},Qg),{connectionStatus:e.connectionStatus});default:return e}}const Jg=P.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,canInitialize:!0,sendMessage:()=>De(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>De(null,null,function*(){}),endConversation:()=>De(null,null,function*(){}),retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>De(null,null,function*(){}),getAuthLinkKey:()=>De(null,null,function*(){throw new Error("getAuthLinkKey called without a MessagingProvider")})}),vC=4320*60*1e3;function ff(e,t){return`cim_af_conv_${e}_${t}`}function hf(e,t){return Date.now()-e>t}function AC(e,t,n){try{const r=ff(e,t),s=localStorage.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"||hf(u.storedAt,n)?(localStorage.removeItem(r),null):u}catch(r){return null}}function tl(e,t,n){try{const r=ff(e,t),s={conversationId:n,storedAt:Date.now()};localStorage.setItem(r,JSON.stringify(s))}catch(r){}}function pf(e,t){try{const n=ff(e,t);localStorage.removeItem(n)}catch(n){}}function mf(e,t){return`cim_af_ct_${e}_${t}`}function CC(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(kC(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function NC(e){const t=CC(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function kC(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function Zg(e,t){try{const n=mf(e,t),r=localStorage.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:NC(a.accessToken)==="expired"?(localStorage.removeItem(n),null):a}catch(n){return null}}function OC(e,t,n,r){try{const s=mf(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};localStorage.setItem(s,JSON.stringify(a))}catch(s){}}function IC(e,t){try{const n=mf(e,t);localStorage.removeItem(n)}catch(n){}}function PC(e,t){return`cim_af_conv_${e}_${t}`}function RC(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=PC(e,t);return new BroadcastChannel(n)}catch(n){return null}}function LC(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 DC(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 MC(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function FC(e){if(e)try{e.close()}catch(t){}}function BC(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function UC(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function e1(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 HC(e){if(e.entryType!=="Message")return null;const n=UC(e.entryPayload).abstractMessage;if(!n)return null;const r=e1(n,"staticContent","text")||e1(n,"content","text")||"";if(!r)return null;const s=BC(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 jC(e){const t=[];for(const n of e){const r=HC(n);r&&t.push(r)}return t}const zC=5e3,sa=Symbol("cimulate-abort-conversation");function nl(e={}){const{routingAttributes:t,timeoutMs:n=zC}=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 m=Object.keys(r).length>0;s(m?r:t)},d={routingAttributes:t,setHiddenPrechatFields:m=>{a.settled||!m||Object.assign(r,m)},done:u,abort:()=>{a.settled||(a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer),s(sa))}},f=new CustomEvent(Z0,{detail:d,cancelable:!0});if(!!window.dispatchEvent(f)){u();return}a.timer=setTimeout(u,n)})}const $C=200,VC=1e3;function qC(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=P.useRef(null),u=P.useRef(null),l=P.useRef(null),d=s.sinceHours*60*60*1e3,f=vC,p=P.useCallback(()=>(l.current||(l.current=LC(a.current)),l.current),[]);P.useEffect(()=>{const S=RC(t,n);a.current=S,l.current=null;const N=DC(S,()=>{const O=u.current;if(!O)return null;const j=Zg(t,n);return{conversationId:O,continuationToken:j==null?void 0:j.accessToken,lastEventId:j==null?void 0:j.lastEventId}},()=>{pf(t,n),u.current=null});return()=>{N(),FC(S),a.current=null}},[t,n]);const m=P.useCallback((S,N)=>De(null,null,function*(){var D,W,Z;const O=(D=N==null?void 0:N.createIfMissing)!=null?D:!0,j=(W=N==null?void 0:N.isCurrent)!=null?W:(()=>!0);let V=AC(t,n,f);if(!V){const re=yield p();re&&!hf(re.storedAt,f)&&(V=re)}if(!V){if(!O)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const re=yield nl({routingAttributes:r});if(re===sa)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!j())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const z=yield S.createConversation(re);return j()?(tl(t,n,z),u.current=z,{conversationId:z,restoredMessages:[],resumed:!1,outcome:"created"}):(yield S.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}try{const re=yield S.listConversations({conversationId:V.conversationId,startTimestamp:Date.now()-f});if(!j())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const z=re.conversations.find(oe=>oe.conversationId===V.conversationId&&!oe.isConversationClosed);if(!z){if(pf(t,n),!O)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const oe=yield nl({routingAttributes:r});if(oe===sa)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!j())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const de=yield S.createConversation(oe);return j()?(tl(t,n,de),u.current=de,{conversationId:de,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}):(yield S.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}S.resumeConversation(z.conversationId),u.current=z.conversationId,tl(t,n,z.conversationId);let K=[];try{const oe=yield S.listConversationEntries(z.conversationId,{limit:Math.min((Z=s.limit)!=null?Z:$C,VC),startTimestamp:Date.now()-d,direction:"FromEnd"});K=jC(oe.conversationEntries).reverse()}catch(oe){}return{conversationId:z.conversationId,restoredMessages:K,resumed:!0,outcome:"resumed"}}catch(re){return{conversationId:V.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:re}}}),[t,n,r,s,d,f,p]),y=P.useCallback(S=>{tl(t,n,S),u.current=S},[t,n]),T=P.useCallback(()=>{pf(t,n),IC(t,n),MC(a.current),u.current=null},[t,n]),_=P.useCallback(()=>{const S=Zg(t,n);return S?{continuationToken:S.accessToken,lastEventId:S.lastEventId}:null},[t,n]),A=P.useCallback(()=>De(null,null,function*(){const S=yield p();return!(S!=null&&S.continuationToken)||hf(S.storedAt,f)?null:{continuationToken:S.continuationToken,lastEventId:S.lastEventId}}),[f,p]),x=P.useCallback((S,N=()=>!0)=>De(null,null,function*(){try{const{accessToken:O,lastEventId:j}=yield S.generateContinuationToken();if(!N())return;OC(t,n,O,j)}catch(O){}}),[t,n]);return{initializeConversation:m,persistConversationId:y,clearPersistedConversation:T,getStoredConnectOptions:_,getPeerConnectOptions:A,persistContinuationToken:x}}const YC="Your session ended due to inactivity. Starting a new session…",t1="This conversation has ended.",WC=300*1e3,GC=2e3,XC=1e4,KC=15e3,QC=2;function n1(e,t,n){return e||t||n===!0}function oa(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function JC(e){const t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{const n=JSON.parse(t);return typeof n=="object"&&n!==null}catch(n){return!1}}function r1(e){if(!e||typeof e!="object")return!1;const t=e,n=t.type==="auth",r=t.type==="api"&&(t.statusCode===401||t.statusCode===403);return n||r}function gf(e){if(r1(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function ZC(e){var y;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((y=e.variants)!=null?y:[]).filter(T=>T.value),s=r.map(T=>`${T.label}: ${T.value}`).join(", "),a=r.map(T=>T.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}}function i1(e,t){return t?{prompt:`${e} (Viewing product details for: ${t})`,display:e}:{prompt:e}}function eN({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:s,resumeUsedLastEventId:a,recoverySteps:u,onExhausted:l,timeoutMs:d=KC,logger:f,isRecoveryInFlight:p}){const m=P.useRef(u);m.current=u;const y=P.useRef(l);y.current=l;const T=P.useRef(f);T.current=f;const _=P.useRef(p);_.current=p;const A=P.useRef(0),x=P.useRef(!1),S=P.useRef(0),[N,O]=P.useState(0);P.useEffect(()=>{if(!t||n){A.current=0,x.current=!1,S.current=0;return}const j=a||A.current>0;if(!(s&&j&&e==="connected"&&!r&&!x.current))return;const D=setTimeout(()=>{De(null,null,function*(){var z,K;if((z=_.current)!=null&&z.call(_)){if(S.current+=1,S.current>QC){x.current=!0,y.current();return}O(oe=>oe+1);return}const W=A.current,Z=m.current;if(W>=Z.length){x.current=!0,y.current();return}S.current=0,(K=T.current)==null||K.warn("🦜 connect bootstrap stalled",{attempt:W});let re;try{yield Promise.race([Promise.resolve(Z[W]()),new Promise((oe,de)=>{re=setTimeout(()=>{de(new Error("connect bootstrap step timed out"))},d)})])}catch(oe){}finally{re!==void 0&&clearTimeout(re),A.current=W+1,O(oe=>oe+1)}})},d);return()=>{clearTimeout(D)}},[e,t,n,r,s,a,d,N])}function tN(e){const t=P.useRef(e);t.current=e,P.useEffect(()=>{const n=({detail:r})=>{(r==null?void 0:r.event)===Hu.RESET_CONVERSATION&&t.current()};return q0(n),()=>{Y0(n)}},[])}function nN(e){const t=P.useRef(e);t.current=e,P.useEffect(()=>{const n=({detail:r})=>{(r==null?void 0:r.event)===Hu.END_CONVERSATION&&t.current()};return q0(n),()=>{Y0(n)}},[])}const Nr={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 rN(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 Gr(e){const{type:t,statusCode:n}=rN(e);if(t==="api"&&typeof n=="number")return n===429?Nr.rateLimit:n>=500?Nr.server:Nr.default;switch(t){case"network":return Nr.network;case"sse":return Nr.interrupted;case"auth":return Nr.connect;default:return Nr.default}}function s1(e){switch(e.code){case"MAX_RECONNECT":return Nr.lost;case"ROUTING_FAILED":return Nr.routing;default:return Nr.connect}}let Xi=null;function iN(e){Xi&&Xi!==e&&console.warn("[CimulateMessaging] A messaging API is already registered; overwriting it. Mounting more than one messaging widget per page is not supported."),Xi=e}function sN(e){Xi===e&&(Xi=null)}function oN(){if(!Xi)throw new Error("Cimulate messaging widget is not ready. Call this after injectMessagingWidget() has run and the widget has mounted.");return Xi}const $s=Symbol("initialization-cancelled"),aN=3e4,o1=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,onProductResult:f,onEndConversation:p,children:m})=>{const{logger:y,conversationHistory:T}=ft(),{status:{isOpen:_}}=Wr(),[A,x]=P.useReducer(SC,Qg),[S,N]=P.useState(!1),[O,j]=P.useState(!1),[V,D]=P.useState(!1),W=P.useRef(A);W.current=A;const Z=qC({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:T}),re=P.useRef(null),z=P.useRef(l),K=P.useRef(d),oe=P.useRef(u),de=P.useRef(f),fe=P.useRef(p),te=P.useRef(!1),ve=P.useRef(!1),ue=P.useRef(!1),Q=P.useRef(0),le=P.useRef(0),C=P.useRef(0),F=P.useRef(null),ee=P.useRef(null),R=P.useRef(null),Ce=P.useRef(0),Re=P.useRef(!1),he=P.useRef(0),Se=P.useRef(0),$e=P.useRef(()=>Promise.reject(new Error("Messaging is unavailable"))),He=P.useRef([]),et=P.useRef(null),pt=P.useCallback((se,Ae)=>{Ae.outcome==="timeout"?(se.timedOut=!0,He.current=He.current.filter(ke=>ke===se||!ke.timedOut)):He.current=He.current.filter(ke=>ke!==se),clearTimeout(se.timeoutId),se.resolve(Ae)},[]);z.current=l,K.current=d,oe.current=u,de.current=f,fe.current=p,P.useEffect(()=>{const se=new iv({baseURL:e,orgId:t,esDeveloperName:n,options:U({enableLogging:a},s?{capabilitiesVersion:s}:{})});re.current=se,Re.current=!1,D(!1),N(!1),j(!1),x({type:"RESET"}),se.on("connected",()=>{var pe;x({type:"SET_CONNECTION_STATUS",status:"connected"}),(pe=oe.current)==null||pe.call(oe)}),se.on("disconnected",()=>{x({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),se.on("reconnecting",()=>{x({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),se.on("message",pe=>{var Ya,Wa;const Fe=ae(U({id:pe.messageId||crypto.randomUUID()},pe.messageId?{serverId:pe.messageId}:{}),{role:"agent",content:pe.content,timestamp:pe.timestamp,sender:pe.sender,raw:pe});y==null||y.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:Fe.id,tokensBeforeFlush:Q.current,streamedFinalOnly:Q.current===0}),Q.current=0;const lt=oa(He.current),qn=lt==null?void 0:lt.options.reconcileMessageId;x({type:"FLUSH_STREAMING",message:Fe,replaceMessageId:qn}),(Ya=z.current)==null||Ya.call(z,Fe),lt&&pt(lt,{outcome:"success"});const{messagingSessionId:Pt}=pe,Yn=Pt?_C(pe.content):null;Pt&&Yn&&((Wa=de.current)==null||Wa.call(de,{agentSessionId:Pt,kind:Yn.kind,productIds:Yn.productIds}))}),se.on("streaming_token",pe=>{var Fe;if(!((Fe=oa(He.current))!=null&&Fe.options.silent)){if(Q.current+=1,y!=null&&y.isDevelopment){const lt=Wg(pe.token);lt?lt.index===fi?y.debug("🦜 streaming_token → markdown fallback",{token:pe.token}):y.debug("🦜 streaming_token parsed",{type:lt.type,index:lt.index,outputName:lt.type==="tool_results"?lt.output_name:void 0}):y.debug("🦜 streaming_token dropped (empty or unrecognized payload shape)",{token:pe.token})}x({type:"APPEND_STREAMING_TOKEN",token:pe.token})}}),se.on("typing_started",()=>{var pe;(pe=oa(He.current))!=null&&pe.options.silent||x({type:"SET_AGENT_TYPING",isTyping:!0})}),se.on("typing_stopped",()=>{var pe;(pe=oa(He.current))!=null&&pe.options.silent||x({type:"SET_AGENT_TYPING",isTyping:!1})}),se.on("progress_indicator",pe=>{var Fe;(Fe=oa(He.current))!=null&&Fe.options.silent||x({type:"ADD_PROGRESS_STEP",message:pe.message})}),se.on("routing_result",pe=>{var Fe;if(x({type:"SET_ROUTING_RESULT",result:pe}),!pe.isSuccessful){const lt=`Routing failed: ${pe.failureType||"unknown"}`;x({type:"SET_ERROR",error:s1({code:"ROUTING_FAILED"})}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(Fe=K.current)==null||Fe.call(K,lt)}}),se.on("participant_changed",pe=>{if(pe.participant.name==="Automated Process")return;const Fe=ae(U({id:crypto.randomUUID()},pe.entryId?{serverId:pe.entryId}:{}),{role:"system",content:pe.action==="add"?`${pe.participant.name||"Agent"} joined the conversation`:`${pe.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});y==null||y.log("🦜 MessagingProvider participant_changed event received",{event:pe}),x({type:"ADD_MESSAGE",message:Fe})}),se.on("conversation_closed",()=>{const pe={id:crypto.randomUUID(),role:"system",content:t1,timestamp:new Date().toISOString()};x({type:"ADD_MESSAGE",message:pe}),x({type:"SET_CONVERSATION_ID",id:null}),Z.clearPersistedConversation()}),se.on("error",pe=>{var Fe;if(y==null||y.log("🦜 MessagingProvider ERROR event received",{event:pe}),pe.code==="SESSION_EXPIRED"){ue.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:s1(pe)}),pe.recoverable||x({type:"SET_CONNECTION_STATUS",status:"error"}),(Fe=K.current)==null||Fe.call(K,pe.message)});const Ae=pe=>{if(pe!==he.current)throw $s},ke=pe=>pe===he.current,be=pe=>De(null,null,function*(){N(!1);let Fe=Z.getStoredConnectOptions(),lt=!1;Fe||(Fe=yield Z.getPeerConnectOptions(),Ae(pe),lt=!!Fe);let qn=!1;try{if(yield se.connect(Fe!=null?Fe:void 0),!ke(pe))throw se.disconnect(),$s;qn=!!(Fe!=null&&Fe.lastEventId)}catch(Yn){if(Ae(pe),Fe&&gf(Yn)){if(y==null||y.log("Stored token expired on connect — falling back to fresh connect"),lt||Z.clearPersistedConversation(),yield se.connect(),!ke(pe))throw se.disconnect(),$s;qn=!1}else throw Yn}j(qn),yield Z.persistContinuationToken(se,()=>ke(pe)),Ae(pe);const Pt=yield Z.initializeConversation(se,{isCurrent:()=>ke(pe)});if(Ae(pe),y==null||y.log("🦜 initial connect complete",{conversationId:Pt.conversationId,resumed:Pt.resumed,outcome:Pt.outcome,restoredMessages:Pt.restoredMessages.length}),Pt.outcome==="aborted")throw x({type:"SET_LOADING",isLoading:!1}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),$s;if(Pt.outcome==="unverified-error"){Pt.conversationId&&(se.resumeConversation(Pt.conversationId),x({type:"SET_CONVERSATION_ID",id:Pt.conversationId})),N(!0);return}x({type:"SET_CONVERSATION_ID",id:Pt.conversationId}),Pt.resumed&&x({type:"LOAD_HISTORY",messages:Pt.restoredMessages}),N(!0),x({type:"SET_LOADING",isLoading:!1})});return ee.current=be,()=>{he.current+=1,Se.current+=1,se.disconnect(),se.off(),re.current=null,ee.current=null,R.current=null,Re.current=!1}},[e,t,n,s,pt]);const bt=P.useCallback(()=>{if(Re.current)return Promise.resolve();if(R.current)return Ce.current===he.current?R.current:R.current.catch(be=>{if(be!==$s)throw be}).then(()=>$e.current());const se=ee.current;if(!se)return Promise.reject(new Error("Messaging is unavailable"));x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_CONNECTION_STATUS",status:"connecting"});const Ae=++he.current;Ce.current=Ae;const ke=se(Ae).then(()=>{Re.current=!0,D(!0)}).catch(be=>{var Fe;if(be===$s)throw be;const pe=be instanceof Error?be.message:String(be);throw x({type:"SET_CONNECTION_STATUS",status:"error"}),x({type:"SET_ERROR",error:Gr(be)}),(Fe=K.current)==null||Fe.call(K,pe),be}).finally(()=>{R.current===ke&&(R.current=null)});return R.current=ke,ke},[]);$e.current=bt,P.useEffect(()=>{_&&bt().catch(()=>{})},[_,e,t,n,s,bt]);const an=P.useCallback(()=>De(null,null,function*(){const se=re.current;if(!se)return!1;const Ae=Z.getStoredConnectOptions();if(!Ae)return y==null||y.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;y==null||y.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{se.disconnect(),yield se.connect(Ae)}catch(be){if(gf(be))return y==null||y.log("🦜 attemptResume: token expired (401) — will start fresh",{error:be instanceof Error?be.message:String(be)}),!1;throw y==null||y.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:be instanceof Error?be.message:String(be)}),be}yield Z.persistContinuationToken(se);const ke=yield Z.initializeConversation(se,{createIfMissing:!1});return ke.outcome==="not-found-or-closed"||!ke.conversationId?(y==null||y.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(ke.outcome==="unverified-error"&&(y==null||y.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:ke.conversationId}),se.resumeConversation(ke.conversationId)),y==null||y.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:ke.conversationId}),x({type:"SET_CONVERSATION_ID",id:ke.conversationId}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),Z.persistConversationId(ke.conversationId),ue.current=!1,x({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[Z,y]),En=P.useCallback(se=>De(null,null,function*(){var ke;const Ae=re.current;if(Ae){se.options.silent||(x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_PROGRESS_MESSAGE",message:""}));try{yield Ae.sendMessage(se.text)}catch(be){const pe=Gr(be);x({type:"SET_SEND_ERROR",error:{text:se.text,displayContent:se.displayContent,options:se.options,message:pe}}),(ke=K.current)==null||ke.call(K,be instanceof Error?be.message:String(be)),pt(se,{outcome:"failure",message:pe})}}}),[pt]),Ht=P.useCallback(se=>De(null,null,function*(){var ke;const Ae=re.current;if(!(!Ae||te.current)){te.current=!0,ve.current=!0;try{if(yield an()){se&&(yield En(se));return}y==null||y.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),ue.current=!1,x({type:"SET_SESSION_EXPIRED",expired:!1}),x({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:YC,timestamp:new Date().toISOString()}}),Z.clearPersistedConversation(),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),Ae.disconnect(),yield Ae.connect(),yield Z.persistContinuationToken(Ae);const be=yield nl({routingAttributes:r});if(be===sa){x({type:"SET_CONNECTION_STATUS",status:"disconnected"});return}const pe=yield Ae.createConversation(be);y==null||y.log("🦜 recoverExpiredSession: new conversation created",{conversationId:pe}),x({type:"SET_CONVERSATION_ID",id:pe}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),Z.persistConversationId(pe),se&&(yield En(se))}catch(be){const pe=be instanceof Error?be.message:String(be);x({type:"SET_ERROR",error:Gr(be)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(ke=K.current)==null||ke.call(K,pe),se&&pt(se,{outcome:"failure",message:Gr(be)})}finally{te.current=!1,ve.current=!1}}}),[r,Z,an,En,y,pt]),je=P.useRef(Ht);je.current=Ht;const _t=P.useCallback(()=>De(null,null,function*(){const se=re.current;if(!se||!Re.current||te.current)return;if(!W.current.conversationId&&!ue.current){se.reconnect();return}te.current=!0;const Ae=De(null,null,function*(){try{(yield an())||(ue.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(ke){ue.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{te.current=!1,F.current=null}});F.current=Ae,yield Ae}),[an]),Gt=P.useRef(_t);Gt.current=_t;const Ie=P.useCallback(()=>De(null,null,function*(){const se=re.current;if(!se||te.current)return;const Ae=Z.getStoredConnectOptions(),ke=Ae==null?void 0:Ae.continuationToken;if(ke){te.current=!0;try{se.disconnect(),yield se.connect({continuationToken:ke}),yield Z.persistContinuationToken(se);const be=W.current.conversationId;be&&se.resumeConversation(be)}catch(be){if(gf(be)){ue.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),x({type:"SET_LOADING",isLoading:!1});return}y==null||y.log("🦜 reconnectOmittingLastEventId: transient connect failure — session kept",{error:be instanceof Error?be.message:String(be)})}finally{te.current=!1}}}),[Z,y]);P.useEffect(()=>{const se=()=>{const lt=Date.now();lt-C.current<GC||(C.current=lt,Gt.current())},Ae=()=>{if(document.visibilityState==="hidden"){le.current=Date.now();return}const lt=re.current;if(!lt)return;const qn=le.current?Date.now()-le.current:0;le.current=0,(ue.current||!lt.isConnected||qn>WC)&&se()},ke=lt=>{lt.persisted&&se()},be=()=>{le.current=Date.now()},pe=()=>se(),Fe=()=>se();return document.addEventListener("visibilitychange",Ae),window.addEventListener("pageshow",ke),window.addEventListener("pagehide",be),document.addEventListener("resume",pe),window.addEventListener("online",Fe),()=>{document.removeEventListener("visibilitychange",Ae),window.removeEventListener("pageshow",ke),window.removeEventListener("pagehide",be),document.removeEventListener("resume",pe),window.removeEventListener("online",Fe)}},[]);const Qe=P.useCallback((se,Ae)=>De(null,null,function*(){var be;const ke=re.current;if(!ke){pt(se,{outcome:"failure",message:"Messaging is unavailable"});return}if(ue.current){yield je.current(se);return}try{yield ke.sendMessage(se.text)}catch(pe){if(r1(pe)){yield je.current(se);return}const Fe=Gr(pe);x({type:"SET_SEND_ERROR",error:Ae(Fe)}),(be=K.current)==null||be.call(K,pe instanceof Error?pe.message:String(pe)),pt(se,{outcome:"failure",message:Fe})}}),[pt]),ot=P.useCallback(se=>De(null,null,function*(){const Ae=F.current;Ae&&(yield Ae),yield se()}),[]),ut=P.useCallback((se,Ae,ke={})=>new Promise(be=>{if(!re.current){be({outcome:"failure",message:"Messaging is unavailable"});return}const Fe={};Object.assign(Fe,{text:se,displayContent:Ae,options:ke,resolve:be,timeoutId:setTimeout(()=>{x({type:"SET_LOADING",isLoading:!1}),pt(Fe,{outcome:"timeout"})},XC)}),He.current.push(Fe),x({type:"CLEAR_SEND_ERROR"}),ke.silent||(x({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"user",content:Ae!=null?Ae:se,timestamp:new Date().toISOString()}}),x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_PROGRESS_MESSAGE",message:""})),ot(()=>Qe(Fe,lt=>({text:se,displayContent:Ae,options:ke,message:lt})))}),[Qe,ot,pt]),tr=P.useCallback((se,Ae)=>{if(!se.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});const ke=Se.current,be=()=>{const lt=()=>ke!==Se.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):ut(se,Ae==null?void 0:Ae.displayContent,Ae);return Re.current?lt():bt().then(lt,qn=>({outcome:"failure",message:Gr(qn)}))},pe=et.current?et.current.then(be):be(),Fe=pe.then(()=>{});return et.current=Fe,Fe.finally(()=>{et.current===Fe&&(et.current=null)}),pe},[ut,bt]),ys=P.useCallback(se=>{if(!re.current)return;const Ae=Se.current,{prompt:ke,display:be}=ZC(se);bt().then(()=>{if(Ae===Se.current)return ut(ke,be)}).catch(()=>{})},[ut,bt]),Ts=P.useCallback(()=>{const se=re.current,Ae=W.current.sendError;if(!se||!Ae)return;const ke=()=>ve.current?Promise.resolve({outcome:"failure",message:Ae.message}):ut(Ae.text,Ae.displayContent,Ae.options),be=et.current?et.current.then(ke):ke(),pe=be.then(()=>{});return et.current=pe,pe.finally(()=>{et.current===pe&&(et.current=null)}),be},[ut]),ce=P.useCallback(()=>{const se=re.current;se&&(R.current||(ue.current=!1,Re.current=!1,D(!1),se.disconnect(),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),bt().catch(()=>{})))},[bt]),xe=P.useCallback(()=>{const se=re.current;if(!se)return Promise.resolve();if(He.current=[],!Re.current)return he.current+=1,Se.current+=1,se.disconnect(),Z.clearPersistedConversation(),x({type:"RESET"}),Promise.resolve();const Ae=++Se.current;return ue.current=!1,j(!1),Z.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),se.endConversation().then(()=>Ae!==Se.current||re.current!==se?null:(se.disconnect(),se.connect().then(()=>se))).then(ke=>De(null,null,function*(){if(!ke||Ae!==Se.current||(yield Z.persistContinuationToken(ke,()=>Ae===Se.current&&re.current===ke),Ae!==Se.current||re.current!==ke))return null;const be=yield nl({routingAttributes:r});return be===sa?null:se.createConversation(be)})).then(ke=>{!ke||Ae!==Se.current||re.current!==se||(x({type:"SET_CONVERSATION_ID",id:ke}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),Z.persistConversationId(ke))}).catch(ke=>{var be;Ae!==Se.current||re.current!==se||(x({type:"SET_ERROR",error:Gr(ke)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(be=K.current)==null||be.call(K,ke.message))})},[r,Z]);tN(xe),eN({connectionStatus:A.connectionStatus,loading:A.loading,hasMessages:A.messages.length>0,sessionExpired:A.sessionExpired,bootstrapSettled:S,resumeUsedLastEventId:O,recoverySteps:[Ie,xe],onExhausted:()=>{var Ae;const se=Gr({type:"network"});x({type:"SET_ERROR",error:se}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(Ae=K.current)==null||Ae.call(K,se)},logger:y,isRecoveryInFlight:()=>te.current||F.current!==null});const We=P.useCallback(()=>De(null,null,function*(){var be;const se=re.current;if(!se||!W.current.conversationId)return;const Ae=yield se.retrieveConversationTranscript(),ke=URL.createObjectURL(Ae);try{const pe=document.createElement("a");pe.href=ke,pe.download=`transcript-${(be=se.conversationId)!=null?be:"conversation"}.pdf`,document.body.appendChild(pe),pe.click(),pe.remove()}finally{URL.revokeObjectURL(ke)}}),[]),Ze=P.useCallback(()=>De(null,null,function*(){const se=re.current;if(!se)return Promise.resolve();if(He.current=[],!Re.current)return he.current+=1,Se.current+=1,se.disconnect(),Z.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),Promise.resolve();const Ae=++Se.current;if(ue.current=!1,j(!1),fe.current)try{yield Promise.race([fe.current(W.current.conversationId),new Promise(be=>setTimeout(be,aN))])}catch(be){y==null||y.error("onEndConversation callback failed",be)}Z.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"});const ke={id:crypto.randomUUID(),role:"system",content:t1,timestamp:new Date().toISOString()};return x({type:"ADD_MESSAGE",message:ke}),Re.current=!1,D(!1),se.endConversation().then(()=>{Ae!==Se.current||re.current!==se||se.disconnect()}).catch(be=>{var pe;Ae!==Se.current||re.current!==se||(x({type:"SET_ERROR",error:Gr(be)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(pe=K.current)==null||pe.call(K,be.message))})}),[y,Z,j]);nN(Ze);const nt=P.useCallback(()=>De(null,null,function*(){const se=re.current;if(!se)throw new Error("getAuthLinkKey called before the messaging client connected");return y==null||y.debug("🦜 getAuthLinkKey: requesting single-use auth link key"),se.getAuthLinkKey()}),[y]);P.useEffect(()=>{const se={getAuthLinkKey:nt};return iN(se),()=>sN(se)},[nt]);const Mt=A.connectionStatus==="connected"&&A.conversationId!==null;P.useEffect(()=>{eg(Mt)},[Mt]),P.useEffect(()=>()=>eg(!1),[]);const yr=P.useMemo(()=>({connectionStatus:A.connectionStatus,isConnected:Mt,isAgentTyping:A.isAgentTyping,conversationId:A.conversationId,messages:A.messages,streamingBlocks:A.streamingBlocks,progressMessage:A.progressMessage,progressSteps:A.progressSteps,error:A.error,sendError:A.sendError,canInitialize:!V&&A.error===null,loading:A.loading,sessionExpired:A.sessionExpired,sendMessage:tr,addToCart:ys,resetConversation:xe,endConversation:Ze,retryLastMessage:Ts,retryConnection:ce,downloadTranscript:We,getAuthLinkKey:nt}),[A,Mt,V,tr,ys,xe,Ze,Ts,ce,We,nt]);return w.jsx(Jg.Provider,{value:yr,children:m})};var a1=Symbol.for("immer-nothing"),u1=Symbol.for("immer-draftable"),jn=Symbol.for("immer-state");function dr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Vs=Object.getPrototypeOf;function qs(e){return!!e&&!!e[jn]}function Ki(e){var t;return e?l1(e)||Array.isArray(e)||!!e[u1]||!!((t=e.constructor)!=null&&t[u1])||aa(e)||sl(e):!1}var uN=Object.prototype.constructor.toString();function l1(e){if(!e||typeof e!="object")return!1;const t=Vs(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)===uN}function rl(e,t){il(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function il(e){const t=e[jn];return t?t.type_:Array.isArray(e)?1:aa(e)?2:sl(e)?3:0}function Ef(e,t){return il(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c1(e,t,n){const r=il(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function lN(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function aa(e){return e instanceof Map}function sl(e){return e instanceof Set}function Qi(e){return e.copy_||e.base_}function yf(e,t){if(aa(e))return new Map(e);if(sl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=l1(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[jn];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(Vs(e),r)}else{const r=Vs(e);if(r!==null&&n)return U({},e);const s=Object.create(r);return Object.assign(s,e)}}function Tf(e,t=!1){return al(e)||qs(e)||!Ki(e)||(il(e)>1&&Object.defineProperties(e,{set:{value:ol},add:{value:ol},clear:{value:ol},delete:{value:ol}}),Object.freeze(e),t&&Object.values(e).forEach(n=>Tf(n,!0))),e}function ol(){dr(2)}function al(e){return Object.isFrozen(e)}var cN={};function Ji(e){const t=cN[e];return t||dr(0,e),t}var ua;function d1(){return ua}function dN(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function f1(e,t){t&&(Ji("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function bf(e){wf(e),e.drafts_.forEach(fN),e.drafts_=null}function wf(e){e===ua&&(ua=e.parent_)}function h1(e){return ua=dN(ua,e)}function fN(e){const t=e[jn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function p1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[jn].modified_&&(bf(t),dr(4)),Ki(e)&&(e=ul(t,e),t.parent_||ll(t,e)),t.patches_&&Ji("Patches").generateReplacementPatches_(n[jn].base_,e,t.patches_,t.inversePatches_)):e=ul(t,n,[]),bf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==a1?e:void 0}function ul(e,t,n){if(al(t))return t;const r=t[jn];if(!r)return rl(t,(s,a)=>m1(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ll(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),rl(a,(l,d)=>m1(e,r,s,l,d,n,u)),ll(e,s,!1),n&&e.patches_&&Ji("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function m1(e,t,n,r,s,a,u){if(qs(s)){const l=a&&t&&t.type_!==3&&!Ef(t.assigned_,r)?a.concat(r):void 0,d=ul(e,s,l);if(c1(n,r,d),qs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Ki(s)&&!al(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ul(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(aa(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&ll(e,s)}}function ll(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Tf(t,n)}function hN(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:d1(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=_f;n&&(s=[r],a=la);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var _f={get(e,t){if(t===jn)return e;const n=Qi(e);if(!Ef(n,t))return pN(e,n,t);const r=n[t];return e.finalized_||!Ki(r)?r:r===xf(e.base_,t)?(vf(e),e.copy_[t]=Af(r,e)):r},has(e,t){return t in Qi(e)},ownKeys(e){return Reflect.ownKeys(Qi(e))},set(e,t,n){const r=g1(Qi(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=xf(Qi(e),t),a=s==null?void 0:s[jn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(lN(n,s)&&(n!==void 0||Ef(e.base_,t)))return!0;vf(e),Sf(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 xf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,vf(e),Sf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Qi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){dr(11)},getPrototypeOf(e){return Vs(e.base_)},setPrototypeOf(){dr(12)}},la={};rl(_f,(e,t)=>{la[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),la.deleteProperty=function(e,t){return la.set.call(this,e,t,void 0)},la.set=function(e,t,n){return _f.set.call(this,e[0],t,n,e[0])};function xf(e,t){const n=e[jn];return(n?Qi(n):e)[t]}function pN(e,t,n){var s;const r=g1(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function g1(e,t){if(!(t in e))return;let n=Vs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Vs(n)}}function Sf(e){e.modified_||(e.modified_=!0,e.parent_&&Sf(e.parent_))}function vf(e){e.copy_||(e.copy_=yf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var mN=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"&&dr(6),r!==void 0&&typeof r!="function"&&dr(7);let s;if(Ki(t)){const a=h1(this),u=Af(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?bf(a):wf(a)}return f1(a,r),p1(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===a1&&(s=void 0),this.autoFreeze_&&Tf(s,!0),r){const a=[],u=[];Ji("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else dr(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){Ki(e)||dr(8),qs(e)&&(e=gN(e));const t=h1(this),n=Af(e,void 0);return n[jn].isManual_=!0,wf(t),n}finishDraft(e,t){const n=e&&e[jn];(!n||!n.isManual_)&&dr(9);const{scope_:r}=n;return f1(r,t),p1(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=Ji("Patches").applyPatches_;return qs(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Af(e,t){const n=aa(e)?Ji("MapSet").proxyMap_(e,t):sl(e)?Ji("MapSet").proxySet_(e,t):hN(e,t);return(t?t.scope_:d1()).drafts_.push(n),n}function gN(e){return qs(e)||dr(10,e),E1(e)}function E1(e){if(!Ki(e)||al(e))return e;const t=e[jn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=yf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=yf(e,!0);return rl(n,(r,s)=>{c1(n,r,E1(s))}),t&&(t.finalized_=!1),n}var EN=new mN,yN=EN.produce;function TN(e,t,n){var r=P.useMemo(function(){return yN(e)},[e]);return P.useReducer(r,t,n)}const bN=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),y1=P.createContext(null),T1=P.createContext(null),wN=({children:e,dispatch:t})=>{const n=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),l=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),y=P.useCallback(_=>{t({type:wt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),T=P.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:y}),[n,r,s,a,u,l,d,f,p,m,y]);return w.jsx(T1.Provider,{value:T,children:e})},_N=(e,t)=>{const{type:n,payload:r}=t;switch(n){case wt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case wt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case wt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case wt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case wt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case wt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case wt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case wt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case wt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case wt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case wt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case wt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case wt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case wt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case wt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},xN=({promptsConfig:e,children:t})=>{const[n,r]=TN(_N,ae(U(U({},rg),e||{}),{staticQuestions:bN((e==null?void 0:e.staticQuestions)||[])}));return w.jsx(y1.Provider,{value:n,children:w.jsx(wN,{dispatch:r,children:t})})},SN={productId:Jo.productId,pdpLink:Jo.pdpLink},b1=P.createContext(SN),vN=({children:e})=>{const[t,n]=P.useState(Jo.productId),[r,s]=P.useState(Jo.pdpLink);P.useEffect(()=>{const u=({detail:l})=>{if((l==null?void 0:l.property)==="pdp-context"){const d=l.value;n(d.productId),s(d.pdpLink);return}(l==null?void 0:l.property)==="productId"&&n(l.value),(l==null?void 0:l.property)==="pdpLink"&&s(l.value)};return Y2(u),()=>{W2(u)}},[]);const a=P.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(b1.Provider,{value:a,children:e})},AN=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){At(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){At(!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"?(At(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(At(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),At(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,At(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),w1=P.createContext({overrides:{},isInitialized:!1}),CN=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=P.useState({}),[a,u]=P.useState(!1);P.useEffect(()=>{De(null,null,function*(){let f={};e?(At(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield AN(e)):t&&typeof t=="object"?(At(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(At(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=P.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return w.jsx(w1.Provider,{value:l,children:n})},_1=({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:y,entryType:T,initialEntry:_,entryMessage:A,disclaimerText:x,disclaimerMarkdown:S,clientContext:N,searchPlaceholder:O,searchButtonLabel:j,searchConfig:V,suggestionButtonConfig:D,messageAlignment:W,autoScroll:Z,promptsConfig:re,showProductDescription:z,resetConversationMessage:K,conversationHistory:oe,messagingConfig:de,overrides:fe,overridesUrl:te,inlineOverrides:ve,__features:ue,children:Q})=>{const le=p||Z2(),C=P.useRef(!1);return C.current||(C.current=!0,Q2({initialEntry:_,entryType:T,isDevelopment:le})),w.jsx(yC,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:A,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:O,searchButtonLabel:j,searchConfig:V,suggestionButtonConfig:D,messageAlignment:W,autoScroll:Z,showProductDescription:z,componentConfig:y,clientContext:N,disclaimerMarkdown:S,disclaimerText:x,resetConversationMessage:K,conversationHistory:oe,isDevelopment:le,__features:ue,progressStepsLimit:de==null?void 0:de.progressStepsLimit,routingAttributes:de==null?void 0:de.routingAttributes,enableDownloadTranscript:de==null?void 0:de.enableDownloadTranscript,enableEscalationToAgent:de==null?void 0:de.enableEscalationToAgent,showProductCaptions:de==null?void 0:de.showProductCaptions,children:w.jsx(_v,{entryType:T!=null?T:_==null?void 0:_.type,componentConfig:y,componentType:m,children:w.jsx(vN,{children:w.jsx(xN,{promptsConfig:re,children:w.jsx(CN,{overridesUrl:te,inlineOverrides:ve||fe,children:w.jsx(o1,{scrt2Url:(de==null?void 0:de.scrt2Url)||"",orgId:(de==null?void 0:de.orgId)||"",esDeveloperName:(de==null?void 0:de.esDeveloperName)||"",routingAttributes:(de==null?void 0:de.routingAttributes)||{},capabilitiesVersion:de==null?void 0:de.capabilitiesVersion,enableLogging:le,onProductResult:de==null?void 0:de.onProductResult,onEndConversation:de==null?void 0:de.onEndConversation,children:Q})})})})})})};var Cf={exports:{}},kn={},Nf={exports:{}},kf={};var x1;function NN(){return x1||(x1=1,(function(e){function t(Q,le){var C=Q.length;Q.push(le);e:for(;0<C;){var F=C-1>>>1,ee=Q[F];if(0<s(ee,le))Q[F]=le,Q[C]=ee,C=F;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var le=Q[0],C=Q.pop();if(C!==le){Q[0]=C;e:for(var F=0,ee=Q.length,R=ee>>>1;F<R;){var Ce=2*(F+1)-1,Re=Q[Ce],he=Ce+1,Se=Q[he];if(0>s(Re,C))he<ee&&0>s(Se,Re)?(Q[F]=Se,Q[he]=C,F=he):(Q[F]=Re,Q[Ce]=C,F=Ce);else if(he<ee&&0>s(Se,C))Q[F]=Se,Q[he]=C,F=he;else break e}}return le}function s(Q,le){var C=Q.sortIndex-le.sortIndex;return C!==0?C:Q.id-le.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,y=3,T=!1,_=!1,A=!1,x=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(Q){for(var le=n(f);le!==null;){if(le.callback===null)r(f);else if(le.startTime<=Q)r(f),le.sortIndex=le.expirationTime,t(d,le);else break;le=n(f)}}function j(Q){if(A=!1,O(Q),!_)if(n(d)!==null)_=!0,ve(V);else{var le=n(f);le!==null&&ue(j,le.startTime-Q)}}function V(Q,le){_=!1,A&&(A=!1,S(Z),Z=-1),T=!0;var C=y;try{for(O(le),m=n(d);m!==null&&(!(m.expirationTime>le)||Q&&!K());){var F=m.callback;if(typeof F=="function"){m.callback=null,y=m.priorityLevel;var ee=F(m.expirationTime<=le);le=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===n(d)&&r(d),O(le)}else r(d);m=n(d)}if(m!==null)var R=!0;else{var Ce=n(f);Ce!==null&&ue(j,Ce.startTime-le),R=!1}return R}finally{m=null,y=C,T=!1}}var D=!1,W=null,Z=-1,re=5,z=-1;function K(){return!(e.unstable_now()-z<re)}function oe(){if(W!==null){var Q=e.unstable_now();z=Q;var le=!0;try{le=W(!0,Q)}finally{le?de():(D=!1,W=null)}}else D=!1}var de;if(typeof N=="function")de=function(){N(oe)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,te=fe.port2;fe.port1.onmessage=oe,de=function(){te.postMessage(null)}}else de=function(){x(oe,0)};function ve(Q){W=Q,D||(D=!0,de())}function ue(Q,le){Z=x(function(){Q(e.unstable_now())},le)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){_||T||(_=!0,ve(V))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Q){switch(y){case 1:case 2:case 3:var le=3;break;default:le=y}var C=y;y=le;try{return Q()}finally{y=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,le){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var C=y;y=Q;try{return le()}finally{y=C}},e.unstable_scheduleCallback=function(Q,le,C){var F=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?F+C:F):C=F,Q){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=C+ee,Q={id:p++,callback:le,priorityLevel:Q,startTime:C,expirationTime:ee,sortIndex:-1},C>F?(Q.sortIndex=C,t(f,Q),n(d)===null&&Q===n(f)&&(A?(S(Z),Z=-1):A=!0,ue(j,C-F))):(Q.sortIndex=ee,t(d,Q),_||T||(_=!0,ve(V))),Q},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(Q){var le=y;return function(){var C=y;y=le;try{return Q.apply(this,arguments)}finally{y=C}}}})(kf)),kf}var S1;function kN(){return S1||(S1=1,Nf.exports=NN()),Nf.exports}var v1;function ON(){if(v1)return kn;v1=1;var e=ur(),t=kN();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 y(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function T(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 _(i,o,c,h){if(o===null||typeof o=="undefined"||T(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 A(i,o,c,h,E,b,v){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=v}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){x[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];x[o]=new A(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){x[i]=new A(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){x[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){x[i]=new A(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){x[i]=new A(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){x[i]=new A(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){x[i]=new A(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){x[i]=new A(i,5,!1,i.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function N(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,N);x[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(S,N);x[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(S,N);x[o]=new A(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){x[i]=new A(i,1,!1,i.toLowerCase(),null,!1,!1)}),x.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){x[i]=new A(i,1,!1,i.toLowerCase(),null,!0,!0)});function O(i,o,c,h){var E=x.hasOwnProperty(o)?x[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,c,E,h)&&(c=null),h||E===null?y(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,V=Symbol.for("react.element"),D=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),K=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),ve=Symbol.for("react.lazy"),ue=Symbol.for("react.offscreen"),Q=Symbol.iterator;function le(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,F;function ee(i){if(F===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);F=o&&o[1]||""}return`
|
|
17
17
|
`+F+i}var R=!1;function Ce(i,o){if(!i||R)return"";R=!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(ne){var h=ne}Reflect.construct(i,[],o)}else{try{o.call()}catch(ne){h=ne}i.call(o.prototype)}else{try{throw Error()}catch(ne){h=ne}i()}}catch(ne){if(ne&&h&&typeof ne.stack=="string"){for(var E=ne.stack.split(`
|
|
18
18
|
`),b=h.stack.split(`
|
|
19
19
|
`),v=E.length-1,B=b.length-1;1<=v&&0<=B&&E[v]!==b[B];)B--;for(;1<=v&&0<=B;v--,B--)if(E[v]!==b[B]){if(v!==1||B!==1)do if(v--,B--,0>B||E[v]!==b[B]){var $=`
|
|
20
|
-
`+E[v].replace(" at new "," at ");return i.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",i.displayName)),$}while(1<=v&&0<=B);break}}}finally{R=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?ee(i):""}function Re(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=Ce(i.type,!1),i;case 11:return i=Ce(i.type.render,!1),i;case 1:return i=Ce(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 D:return"Portal";case re:return"Profiler";case Z:return"StrictMode";case de:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case K:return(i.displayName||"Context")+".Consumer";case z:return(i._context.displayName||"Context")+".Provider";case oe:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case te:return o=i.displayName||null,o!==null?o:he(i.type)||"Memo";case ve:o=i._payload,i=i._init;try{return he(i(o))}catch(c){}}return null}function Se(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===Z?"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 $e(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function He(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function et(i){var o=He(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(v){h=""+v,b.call(this,v)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(v){h=""+v},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function pt(i){i._valueTracker||(i._valueTracker=et(i))}function bt(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=He(i)?i.checked?"true":"false":i.value),i=h,i!==c?(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 En(i,o){var c=o.checked;return C({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Ht(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=$e(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 je(i,o){o=o.checked,o!=null&&O(i,"checked",o,!1)}function _t(i,o){je(i,o);var c=$e(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")?Ie(i,o.type,c):o.hasOwnProperty("defaultValue")&&Ie(i,o.type,$e(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function Gt(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 Ie(i,o,c){(o!=="number"||an(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Qe=Array.isArray;function ot(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=""+$e(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 ut(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return C({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function tr(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(Qe(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:$e(c)}}function ys(i,o){var c=$e(o.value),h=$e(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 Ts(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function ce(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 xe(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?ce(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var We,Ze=(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(We=We||document.createElement("div"),We.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=We.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 Mt={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(Mt).forEach(function(i){yr.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Mt[o]=Mt[i]})});function se(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||Mt.hasOwnProperty(i)&&Mt[i]?(""+o).trim():o+"px"}function Ae(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=se(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var ke=C({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 be(i,o){if(o){if(ke[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 pe(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 Fe=null;function lt(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var qn=null,Pt=null,Yn=null;function Ya(i){if(i=mu(i)){if(typeof qn!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Uc(o),qn(i.stateNode,i.type,o))}}function Wa(i){Pt?Yn?Yn.push(i):Yn=[i]:Pt=i}function f_(){if(Pt){var i=Pt,o=Yn;if(Yn=Pt=null,Ya(i),o)for(i=0;i<o.length;i++)Ya(o[i])}}function h_(i,o){return i(o)}function p_(){}var Up=!1;function m_(i,o,c){if(Up)return i(o,c);Up=!0;try{return h_(i,o,c)}finally{Up=!1,(Pt!==null||Yn!==null)&&(p_(),f_())}}function Ga(i,o){var c=i.stateNode;if(c===null)return null;var h=Uc(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 Hp=!1;if(l)try{var Xa={};Object.defineProperty(Xa,"passive",{get:function(){Hp=!0}}),window.addEventListener("test",Xa,Xa),window.removeEventListener("test",Xa,Xa)}catch(i){Hp=!1}function VB(i,o,c,h,E,b,v,B,$){var ne=Array.prototype.slice.call(arguments,3);try{o.apply(c,ne)}catch(Ee){this.onError(Ee)}}var Ka=!1,Ec=null,yc=!1,jp=null,qB={onError:function(i){Ka=!0,Ec=i}};function YB(i,o,c,h,E,b,v,B,$){Ka=!1,Ec=null,VB.apply(qB,arguments)}function WB(i,o,c,h,E,b,v,B,$){if(YB.apply(this,arguments),Ka){if(Ka){var ne=Ec;Ka=!1,Ec=null}else throw Error(n(198));yc||(yc=!0,jp=ne)}}function bs(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 g_(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 E_(i){if(bs(i)!==i)throw Error(n(188))}function GB(i){var o=i.alternate;if(!o){if(o=bs(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 E_(E),i;if(b===h)return E_(E),o;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var v=!1,B=E.child;B;){if(B===c){v=!0,c=E,h=b;break}if(B===h){v=!0,h=E,c=b;break}B=B.sibling}if(!v){for(B=b.child;B;){if(B===c){v=!0,c=b,h=E;break}if(B===h){v=!0,h=b,c=E;break}B=B.sibling}if(!v)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 y_(i){return i=GB(i),i!==null?T_(i):null}function T_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=T_(i);if(o!==null)return o;i=i.sibling}return null}var b_=t.unstable_scheduleCallback,w_=t.unstable_cancelCallback,XB=t.unstable_shouldYield,KB=t.unstable_requestPaint,jt=t.unstable_now,QB=t.unstable_getCurrentPriorityLevel,zp=t.unstable_ImmediatePriority,__=t.unstable_UserBlockingPriority,Tc=t.unstable_NormalPriority,JB=t.unstable_LowPriority,x_=t.unstable_IdlePriority,bc=null,Hr=null;function ZB(i){if(Hr&&typeof Hr.onCommitFiberRoot=="function")try{Hr.onCommitFiberRoot(bc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var Tr=Math.clz32?Math.clz32:n7,e7=Math.log,t7=Math.LN2;function n7(i){return i>>>=0,i===0?32:31-(e7(i)/t7|0)|0}var wc=64,_c=4194304;function Qa(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 xc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,v=c&268435455;if(v!==0){var B=v&~E;B!==0?h=Qa(B):(b&=v,b!==0&&(h=Qa(b)))}else v=c&~E,v!==0?h=Qa(v):b!==0&&(h=Qa(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-Tr(o),E=1<<c,h|=i[c],o&=~E;return h}function r7(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 i7(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var v=31-Tr(b),B=1<<v,$=E[v];$===-1?((B&c)===0||(B&h)!==0)&&(E[v]=r7(B,o)):$<=o&&(i.expiredLanes|=B),b&=~B}}function $p(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function S_(){var i=wc;return wc<<=1,(wc&4194240)===0&&(wc=64),i}function Vp(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function Ja(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-Tr(o),i[o]=c}function s7(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-Tr(c),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function qp(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-Tr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var gt=0;function v_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var A_,Yp,C_,N_,k_,Wp=!1,Sc=[],Si=null,vi=null,Ai=null,Za=new Map,eu=new Map,Ci=[],o7="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 O_(i,o){switch(i){case"focusin":case"focusout":Si=null;break;case"dragenter":case"dragleave":vi=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":Za.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":eu.delete(o.pointerId)}}function tu(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=mu(o),o!==null&&Yp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function a7(i,o,c,h,E){switch(o){case"focusin":return Si=tu(Si,i,o,c,h,E),!0;case"dragenter":return vi=tu(vi,i,o,c,h,E),!0;case"mouseover":return Ai=tu(Ai,i,o,c,h,E),!0;case"pointerover":var b=E.pointerId;return Za.set(b,tu(Za.get(b)||null,i,o,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,eu.set(b,tu(eu.get(b)||null,i,o,c,h,E)),!0}return!1}function I_(i){var o=ws(i.target);if(o!==null){var c=bs(o);if(c!==null){if(o=c.tag,o===13){if(o=g_(c),o!==null){i.blockedOn=o,k_(i.priority,function(){C_(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 vc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=Xp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Fe=h,c.target.dispatchEvent(h),Fe=null}else return o=mu(c),o!==null&&Yp(o),i.blockedOn=c,!1;o.shift()}return!0}function P_(i,o,c){vc(i)&&c.delete(o)}function u7(){Wp=!1,Si!==null&&vc(Si)&&(Si=null),vi!==null&&vc(vi)&&(vi=null),Ai!==null&&vc(Ai)&&(Ai=null),Za.forEach(P_),eu.forEach(P_)}function nu(i,o){i.blockedOn===o&&(i.blockedOn=null,Wp||(Wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,u7)))}function ru(i){function o(E){return nu(E,i)}if(0<Sc.length){nu(Sc[0],i);for(var c=1;c<Sc.length;c++){var h=Sc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(Si!==null&&nu(Si,i),vi!==null&&nu(vi,i),Ai!==null&&nu(Ai,i),Za.forEach(o),eu.forEach(o),c=0;c<Ci.length;c++)h=Ci[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ci.length&&(c=Ci[0],c.blockedOn===null);)I_(c),c.blockedOn===null&&Ci.shift()}var Co=j.ReactCurrentBatchConfig,Ac=!0;function l7(i,o,c,h){var E=gt,b=Co.transition;Co.transition=null;try{gt=1,Gp(i,o,c,h)}finally{gt=E,Co.transition=b}}function c7(i,o,c,h){var E=gt,b=Co.transition;Co.transition=null;try{gt=4,Gp(i,o,c,h)}finally{gt=E,Co.transition=b}}function Gp(i,o,c,h){if(Ac){var E=Xp(i,o,c,h);if(E===null)fm(i,o,h,Cc,c),O_(i,h);else if(a7(E,i,o,c,h))h.stopPropagation();else if(O_(i,h),o&4&&-1<o7.indexOf(i)){for(;E!==null;){var b=mu(E);if(b!==null&&A_(b),b=Xp(i,o,c,h),b===null&&fm(i,o,h,Cc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else fm(i,o,h,null,c)}}var Cc=null;function Xp(i,o,c,h){if(Cc=null,i=lt(h),i=ws(i),i!==null)if(o=bs(i),o===null)i=null;else if(c=o.tag,c===13){if(i=g_(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 R_(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(QB()){case zp:return 1;case __:return 4;case Tc:case JB:return 16;case x_:return 536870912;default:return 16}default:return 16}}var Ni=null,Kp=null,Nc=null;function L_(){if(Nc)return Nc;var i,o=Kp,c=o.length,h,E="value"in Ni?Ni.value:Ni.textContent,b=E.length;for(i=0;i<c&&o[i]===E[i];i++);var v=c-i;for(h=1;h<=v&&o[c-h]===E[b-h];h++);return Nc=E.slice(i,1<h?1-h:void 0)}function kc(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 Oc(){return!0}function D_(){return!1}function Wn(i){function o(c,h,E,b,v){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=v,this.currentTarget=null;for(var B in i)i.hasOwnProperty(B)&&(c=i[B],this[B]=c?c(b):b[B]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Oc:D_,this.isPropagationStopped=D_,this}return C(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=Oc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Oc)},persist:function(){},isPersistent:Oc}),o}var No={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qp=Wn(No),iu=C({},No,{view:0,detail:0}),d7=Wn(iu),Jp,Zp,su,Ic=C({},iu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tm,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!==su&&(su&&i.type==="mousemove"?(Jp=i.screenX-su.screenX,Zp=i.screenY-su.screenY):Zp=Jp=0,su=i),Jp)},movementY:function(i){return"movementY"in i?i.movementY:Zp}}),M_=Wn(Ic),f7=C({},Ic,{dataTransfer:0}),h7=Wn(f7),p7=C({},iu,{relatedTarget:0}),em=Wn(p7),m7=C({},No,{animationName:0,elapsedTime:0,pseudoElement:0}),g7=Wn(m7),E7=C({},No,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),y7=Wn(E7),T7=C({},No,{data:0}),F_=Wn(T7),b7={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},w7={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"},_7={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function x7(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=_7[i])?!!o[i]:!1}function tm(){return x7}var S7=C({},iu,{key:function(i){if(i.key){var o=b7[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=kc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?w7[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tm,charCode:function(i){return i.type==="keypress"?kc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?kc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),v7=Wn(S7),A7=C({},Ic,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),B_=Wn(A7),C7=C({},iu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tm}),N7=Wn(C7),k7=C({},No,{propertyName:0,elapsedTime:0,pseudoElement:0}),O7=Wn(k7),I7=C({},Ic,{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}),P7=Wn(I7),R7=[9,13,27,32],nm=l&&"CompositionEvent"in window,ou=null;l&&"documentMode"in document&&(ou=document.documentMode);var L7=l&&"TextEvent"in window&&!ou,U_=l&&(!nm||ou&&8<ou&&11>=ou),H_=" ",j_=!1;function z_(i,o){switch(i){case"keyup":return R7.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ko=!1;function D7(i,o){switch(i){case"compositionend":return $_(o);case"keypress":return o.which!==32?null:(j_=!0,H_);case"textInput":return i=o.data,i===H_&&j_?null:i;default:return null}}function M7(i,o){if(ko)return i==="compositionend"||!nm&&z_(i,o)?(i=L_(),Nc=Kp=Ni=null,ko=!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 U_&&o.locale!=="ko"?null:o.data;default:return null}}var F7={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 V_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!F7[i.type]:o==="textarea"}function q_(i,o,c,h){Wa(h),o=Mc(o,"onChange"),0<o.length&&(c=new Qp("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var au=null,uu=null;function B7(i){lx(i,0)}function Pc(i){var o=Lo(i);if(bt(o))return i}function U7(i,o){if(i==="change")return o}var Y_=!1;if(l){var rm;if(l){var im="oninput"in document;if(!im){var W_=document.createElement("div");W_.setAttribute("oninput","return;"),im=typeof W_.oninput=="function"}rm=im}else rm=!1;Y_=rm&&(!document.documentMode||9<document.documentMode)}function G_(){au&&(au.detachEvent("onpropertychange",X_),uu=au=null)}function X_(i){if(i.propertyName==="value"&&Pc(uu)){var o=[];q_(o,uu,i,lt(i)),m_(B7,o)}}function H7(i,o,c){i==="focusin"?(G_(),au=o,uu=c,au.attachEvent("onpropertychange",X_)):i==="focusout"&&G_()}function j7(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Pc(uu)}function z7(i,o){if(i==="click")return Pc(o)}function $7(i,o){if(i==="input"||i==="change")return Pc(o)}function V7(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var br=typeof Object.is=="function"?Object.is:V7;function lu(i,o){if(br(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)||!br(i[E],o[E]))return!1}return!0}function K_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Q_(i,o){var c=K_(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=K_(c)}}function J_(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?J_(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Z_(){for(var i=window,o=an();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=an(i.document)}return o}function sm(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 q7(i){var o=Z_(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&J_(c.ownerDocument.documentElement,c)){if(h!==null&&sm(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=Q_(c,b);var v=Q_(c,h);E&&v&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==v.node||i.focusOffset!==v.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(o),i.extend(v.node,v.offset)):(o.setEnd(v.node,v.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 Y7=l&&"documentMode"in document&&11>=document.documentMode,Oo=null,om=null,cu=null,am=!1;function ex(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;am||Oo==null||Oo!==an(h)||(h=Oo,"selectionStart"in h&&sm(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}),cu&&lu(cu,h)||(cu=h,h=Mc(om,"onSelect"),0<h.length&&(o=new Qp("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=Oo)))}function Rc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var Io={animationend:Rc("Animation","AnimationEnd"),animationiteration:Rc("Animation","AnimationIteration"),animationstart:Rc("Animation","AnimationStart"),transitionend:Rc("Transition","TransitionEnd")},um={},tx={};l&&(tx=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function Lc(i){if(um[i])return um[i];if(!Io[i])return i;var o=Io[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in tx)return um[i]=o[c];return i}var nx=Lc("animationend"),rx=Lc("animationiteration"),ix=Lc("animationstart"),sx=Lc("transitionend"),ox=new Map,ax="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 ki(i,o){ox.set(i,o),a(o,[i])}for(var lm=0;lm<ax.length;lm++){var cm=ax[lm],W7=cm.toLowerCase(),G7=cm[0].toUpperCase()+cm.slice(1);ki(W7,"on"+G7)}ki(nx,"onAnimationEnd"),ki(rx,"onAnimationIteration"),ki(ix,"onAnimationStart"),ki("dblclick","onDoubleClick"),ki("focusin","onFocus"),ki("focusout","onBlur"),ki(sx,"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 du="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(" "),X7=new Set("cancel close invalid load scroll toggle".split(" ").concat(du));function ux(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,WB(h,o,void 0,i),i.currentTarget=null}function lx(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 v=h.length-1;0<=v;v--){var B=h[v],$=B.instance,ne=B.currentTarget;if(B=B.listener,$!==b&&E.isPropagationStopped())break e;ux(E,B,ne),b=$}else for(v=0;v<h.length;v++){if(B=h[v],$=B.instance,ne=B.currentTarget,B=B.listener,$!==b&&E.isPropagationStopped())break e;ux(E,B,ne),b=$}}}if(yc)throw i=jp,yc=!1,jp=null,i}function Ct(i,o){var c=o[ym];c===void 0&&(c=o[ym]=new Set);var h=i+"__bubble";c.has(h)||(cx(o,i,2,!1),c.add(h))}function dm(i,o,c){var h=0;o&&(h|=4),cx(c,i,h,o)}var Dc="_reactListening"+Math.random().toString(36).slice(2);function fu(i){if(!i[Dc]){i[Dc]=!0,r.forEach(function(c){c!=="selectionchange"&&(X7.has(c)||dm(c,!1,i),dm(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Dc]||(o[Dc]=!0,dm("selectionchange",!1,o))}}function cx(i,o,c,h){switch(R_(o)){case 1:var E=l7;break;case 4:E=c7;break;default:E=Gp}c=E.bind(null,o,c,i),E=void 0,!Hp||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 fm(i,o,c,h,E){var b=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var v=h.tag;if(v===3||v===4){var B=h.stateNode.containerInfo;if(B===E||B.nodeType===8&&B.parentNode===E)break;if(v===4)for(v=h.return;v!==null;){var $=v.tag;if(($===3||$===4)&&($=v.stateNode.containerInfo,$===E||$.nodeType===8&&$.parentNode===E))return;v=v.return}for(;B!==null;){if(v=ws(B),v===null)return;if($=v.tag,$===5||$===6){h=b=v;continue e}B=B.parentNode}}h=h.return}m_(function(){var ne=b,Ee=lt(c),Te=[];e:{var me=ox.get(i);if(me!==void 0){var Oe=Qp,Le=i;switch(i){case"keypress":if(kc(c)===0)break e;case"keydown":case"keyup":Oe=v7;break;case"focusin":Le="focus",Oe=em;break;case"focusout":Le="blur",Oe=em;break;case"beforeblur":case"afterblur":Oe=em;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":Oe=M_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=h7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=N7;break;case nx:case rx:case ix:Oe=g7;break;case sx:Oe=O7;break;case"scroll":Oe=d7;break;case"wheel":Oe=P7;break;case"copy":case"cut":case"paste":Oe=y7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=B_}var Me=(o&4)!==0,zt=!Me&&i==="scroll",G=Me?me!==null?me+"Capture":null:me;Me=[];for(var q=ne,J;q!==null;){J=q;var _e=J.stateNode;if(J.tag===5&&_e!==null&&(J=_e,G!==null&&(_e=Ga(q,G),_e!=null&&Me.push(hu(q,_e,J)))),zt)break;q=q.return}0<Me.length&&(me=new Oe(me,Le,null,c,Ee),Te.push({event:me,listeners:Me}))}}if((o&7)===0){e:{if(me=i==="mouseover"||i==="pointerover",Oe=i==="mouseout"||i==="pointerout",me&&c!==Fe&&(Le=c.relatedTarget||c.fromElement)&&(ws(Le)||Le[ni]))break e;if((Oe||me)&&(me=Ee.window===Ee?Ee:(me=Ee.ownerDocument)?me.defaultView||me.parentWindow:window,Oe?(Le=c.relatedTarget||c.toElement,Oe=ne,Le=Le?ws(Le):null,Le!==null&&(zt=bs(Le),Le!==zt||Le.tag!==5&&Le.tag!==6)&&(Le=null)):(Oe=null,Le=ne),Oe!==Le)){if(Me=M_,_e="onMouseLeave",G="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(Me=B_,_e="onPointerLeave",G="onPointerEnter",q="pointer"),zt=Oe==null?me:Lo(Oe),J=Le==null?me:Lo(Le),me=new Me(_e,q+"leave",Oe,c,Ee),me.target=zt,me.relatedTarget=J,_e=null,ws(Ee)===ne&&(Me=new Me(G,q+"enter",Le,c,Ee),Me.target=J,Me.relatedTarget=zt,_e=Me),zt=_e,Oe&&Le)t:{for(Me=Oe,G=Le,q=0,J=Me;J;J=Po(J))q++;for(J=0,_e=G;_e;_e=Po(_e))J++;for(;0<q-J;)Me=Po(Me),q--;for(;0<J-q;)G=Po(G),J--;for(;q--;){if(Me===G||G!==null&&Me===G.alternate)break t;Me=Po(Me),G=Po(G)}Me=null}else Me=null;Oe!==null&&dx(Te,me,Oe,Me,!1),Le!==null&&zt!==null&&dx(Te,zt,Le,Me,!0)}}e:{if(me=ne?Lo(ne):window,Oe=me.nodeName&&me.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&me.type==="file")var Be=U7;else if(V_(me))if(Y_)Be=$7;else{Be=j7;var qe=H7}else(Oe=me.nodeName)&&Oe.toLowerCase()==="input"&&(me.type==="checkbox"||me.type==="radio")&&(Be=z7);if(Be&&(Be=Be(i,ne))){q_(Te,Be,c,Ee);break e}qe&&qe(i,me,ne),i==="focusout"&&(qe=me._wrapperState)&&qe.controlled&&me.type==="number"&&Ie(me,"number",me.value)}switch(qe=ne?Lo(ne):window,i){case"focusin":(V_(qe)||qe.contentEditable==="true")&&(Oo=qe,om=ne,cu=null);break;case"focusout":cu=om=Oo=null;break;case"mousedown":am=!0;break;case"contextmenu":case"mouseup":case"dragend":am=!1,ex(Te,c,Ee);break;case"selectionchange":if(Y7)break;case"keydown":case"keyup":ex(Te,c,Ee)}var Ye;if(nm)e:{switch(i){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else ko?z_(i,c)&&(Xe="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Xe="onCompositionStart");Xe&&(U_&&c.locale!=="ko"&&(ko||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&ko&&(Ye=L_()):(Ni=Ee,Kp="value"in Ni?Ni.value:Ni.textContent,ko=!0)),qe=Mc(ne,Xe),0<qe.length&&(Xe=new F_(Xe,i,null,c,Ee),Te.push({event:Xe,listeners:qe}),Ye?Xe.data=Ye:(Ye=$_(c),Ye!==null&&(Xe.data=Ye)))),(Ye=L7?D7(i,c):M7(i,c))&&(ne=Mc(ne,"onBeforeInput"),0<ne.length&&(Ee=new F_("onBeforeInput","beforeinput",null,c,Ee),Te.push({event:Ee,listeners:ne}),Ee.data=Ye))}lx(Te,o)})}function hu(i,o,c){return{instance:i,listener:o,currentTarget:c}}function Mc(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=Ga(i,c),b!=null&&h.unshift(hu(i,b,E)),b=Ga(i,o),b!=null&&h.push(hu(i,b,E))),i=i.return}return h}function Po(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function dx(i,o,c,h,E){for(var b=o._reactName,v=[];c!==null&&c!==h;){var B=c,$=B.alternate,ne=B.stateNode;if($!==null&&$===h)break;B.tag===5&&ne!==null&&(B=ne,E?($=Ga(c,b),$!=null&&v.unshift(hu(c,$,B))):E||($=Ga(c,b),$!=null&&v.push(hu(c,$,B)))),c=c.return}v.length!==0&&i.push({event:o,listeners:v})}var K7=/\r\n?/g,Q7=/\u0000|\uFFFD/g;function fx(i){return(typeof i=="string"?i:""+i).replace(K7,`
|
|
21
|
-
`).replace(Q7,"")}function Fc(i,o,c){if(o=fx(o),fx(i)!==o&&c)throw Error(n(425))}function Bc(){}var hm=null,pm=null;function mm(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 gm=typeof setTimeout=="function"?setTimeout:void 0,J7=typeof clearTimeout=="function"?clearTimeout:void 0,hx=typeof Promise=="function"?Promise:void 0,Z7=typeof queueMicrotask=="function"?queueMicrotask:typeof hx!="undefined"?function(i){return hx.resolve(null).then(i).catch(eU)}:gm;function eU(i){setTimeout(function(){throw i})}function Em(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),ru(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);ru(o)}function Oi(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 px(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 Ro=Math.random().toString(36).slice(2),jr="__reactFiber$"+Ro,pu="__reactProps$"+Ro,ni="__reactContainer$"+Ro,ym="__reactEvents$"+Ro,tU="__reactListeners$"+Ro,nU="__reactHandles$"+Ro;function ws(i){var o=i[jr];if(o)return o;for(var c=i.parentNode;c;){if(o=c[ni]||c[jr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=px(i);i!==null;){if(c=i[jr])return c;i=px(i)}return o}i=c,c=i.parentNode}return null}function mu(i){return i=i[jr]||i[ni],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Lo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Uc(i){return i[pu]||null}var Tm=[],Do=-1;function Ii(i){return{current:i}}function Nt(i){0>Do||(i.current=Tm[Do],Tm[Do]=null,Do--)}function xt(i,o){Do++,Tm[Do]=i.current,i.current=o}var Pi={},yn=Ii(Pi),Dn=Ii(!1),_s=Pi;function Mo(i,o){var c=i.type.contextTypes;if(!c)return Pi;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 Mn(i){return i=i.childContextTypes,i!=null}function Hc(){Nt(Dn),Nt(yn)}function mx(i,o,c){if(yn.current!==Pi)throw Error(n(168));xt(yn,o),xt(Dn,c)}function gx(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,Se(i)||"Unknown",E));return C({},c,h)}function jc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Pi,_s=yn.current,xt(yn,i),xt(Dn,Dn.current),!0}function Ex(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=gx(i,o,_s),h.__reactInternalMemoizedMergedChildContext=i,Nt(Dn),Nt(yn),xt(yn,i)):Nt(Dn),xt(Dn,c)}var ri=null,zc=!1,bm=!1;function yx(i){ri===null?ri=[i]:ri.push(i)}function rU(i){zc=!0,yx(i)}function Ri(){if(!bm&&ri!==null){bm=!0;var i=0,o=gt;try{var c=ri;for(gt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}ri=null,zc=!1}catch(E){throw ri!==null&&(ri=ri.slice(i+1)),b_(zp,Ri),E}finally{gt=o,bm=!1}}return null}var Fo=[],Bo=0,$c=null,Vc=0,nr=[],rr=0,xs=null,ii=1,si="";function Ss(i,o){Fo[Bo++]=Vc,Fo[Bo++]=$c,$c=i,Vc=o}function Tx(i,o,c){nr[rr++]=ii,nr[rr++]=si,nr[rr++]=xs,xs=i;var h=ii;i=si;var E=32-Tr(h)-1;h&=~(1<<E),c+=1;var b=32-Tr(o)+E;if(30<b){var v=E-E%5;b=(h&(1<<v)-1).toString(32),h>>=v,E-=v,ii=1<<32-Tr(o)+E|c<<E|h,si=b+i}else ii=1<<b|c<<E|h,si=i}function wm(i){i.return!==null&&(Ss(i,1),Tx(i,1,0))}function _m(i){for(;i===$c;)$c=Fo[--Bo],Fo[Bo]=null,Vc=Fo[--Bo],Fo[Bo]=null;for(;i===xs;)xs=nr[--rr],nr[rr]=null,si=nr[--rr],nr[rr]=null,ii=nr[--rr],nr[rr]=null}var Gn=null,Xn=null,It=!1,wr=null;function bx(i,o){var c=ar(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 wx(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,Gn=i,Xn=Oi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Gn=i,Xn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=xs!==null?{id:ii,overflow:si}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=ar(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,Gn=i,Xn=null,!0):!1;default:return!1}}function xm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Sm(i){if(It){var o=Xn;if(o){var c=o;if(!wx(i,o)){if(xm(i))throw Error(n(418));o=Oi(c.nextSibling);var h=Gn;o&&wx(i,o)?bx(h,c):(i.flags=i.flags&-4097|2,It=!1,Gn=i)}}else{if(xm(i))throw Error(n(418));i.flags=i.flags&-4097|2,It=!1,Gn=i}}}function _x(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Gn=i}function qc(i){if(i!==Gn)return!1;if(!It)return _x(i),It=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!mm(i.type,i.memoizedProps)),o&&(o=Xn)){if(xm(i))throw xx(),Error(n(418));for(;o;)bx(i,o),o=Oi(o.nextSibling)}if(_x(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){Xn=Oi(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Xn=null}}else Xn=Gn?Oi(i.stateNode.nextSibling):null;return!0}function xx(){for(var i=Xn;i;)i=Oi(i.nextSibling)}function Uo(){Xn=Gn=null,It=!1}function vm(i){wr===null?wr=[i]:wr.push(i)}var iU=j.ReactCurrentBatchConfig;function gu(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(v){var B=E.refs;v===null?delete B[b]:B[b]=v},o._stringRef=b,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Yc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function Sx(i){var o=i._init;return o(i._payload)}function vx(i){function o(G,q){if(i){var J=G.deletions;J===null?(G.deletions=[q],G.flags|=16):J.push(q)}}function c(G,q){if(!i)return null;for(;q!==null;)o(G,q),q=q.sibling;return null}function h(G,q){for(G=new Map;q!==null;)q.key!==null?G.set(q.key,q):G.set(q.index,q),q=q.sibling;return G}function E(G,q){return G=ji(G,q),G.index=0,G.sibling=null,G}function b(G,q,J){return G.index=J,i?(J=G.alternate,J!==null?(J=J.index,J<q?(G.flags|=2,q):J):(G.flags|=2,q)):(G.flags|=1048576,q)}function v(G){return i&&G.alternate===null&&(G.flags|=2),G}function B(G,q,J,_e){return q===null||q.tag!==6?(q=g0(J,G.mode,_e),q.return=G,q):(q=E(q,J),q.return=G,q)}function $(G,q,J,_e){var Be=J.type;return Be===W?Ee(G,q,J.props.children,_e,J.key):q!==null&&(q.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===ve&&Sx(Be)===q.type)?(_e=E(q,J.props),_e.ref=gu(G,q,J),_e.return=G,_e):(_e=gd(J.type,J.key,J.props,null,G.mode,_e),_e.ref=gu(G,q,J),_e.return=G,_e)}function ne(G,q,J,_e){return q===null||q.tag!==4||q.stateNode.containerInfo!==J.containerInfo||q.stateNode.implementation!==J.implementation?(q=E0(J,G.mode,_e),q.return=G,q):(q=E(q,J.children||[]),q.return=G,q)}function Ee(G,q,J,_e,Be){return q===null||q.tag!==7?(q=Ps(J,G.mode,_e,Be),q.return=G,q):(q=E(q,J),q.return=G,q)}function Te(G,q,J){if(typeof q=="string"&&q!==""||typeof q=="number")return q=g0(""+q,G.mode,J),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case V:return J=gd(q.type,q.key,q.props,null,G.mode,J),J.ref=gu(G,null,q),J.return=G,J;case D:return q=E0(q,G.mode,J),q.return=G,q;case ve:var _e=q._init;return Te(G,_e(q._payload),J)}if(Qe(q)||le(q))return q=Ps(q,G.mode,J,null),q.return=G,q;Yc(G,q)}return null}function me(G,q,J,_e){var Be=q!==null?q.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return Be!==null?null:B(G,q,""+J,_e);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case V:return J.key===Be?$(G,q,J,_e):null;case D:return J.key===Be?ne(G,q,J,_e):null;case ve:return Be=J._init,me(G,q,Be(J._payload),_e)}if(Qe(J)||le(J))return Be!==null?null:Ee(G,q,J,_e,null);Yc(G,J)}return null}function Oe(G,q,J,_e,Be){if(typeof _e=="string"&&_e!==""||typeof _e=="number")return G=G.get(J)||null,B(q,G,""+_e,Be);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case V:return G=G.get(_e.key===null?J:_e.key)||null,$(q,G,_e,Be);case D:return G=G.get(_e.key===null?J:_e.key)||null,ne(q,G,_e,Be);case ve:var qe=_e._init;return Oe(G,q,J,qe(_e._payload),Be)}if(Qe(_e)||le(_e))return G=G.get(J)||null,Ee(q,G,_e,Be,null);Yc(q,_e)}return null}function Le(G,q,J,_e){for(var Be=null,qe=null,Ye=q,Xe=q=0,rn=null;Ye!==null&&Xe<J.length;Xe++){Ye.index>Xe?(rn=Ye,Ye=null):rn=Ye.sibling;var ht=me(G,Ye,J[Xe],_e);if(ht===null){Ye===null&&(Ye=rn);break}i&&Ye&&ht.alternate===null&&o(G,Ye),q=b(ht,q,Xe),qe===null?Be=ht:qe.sibling=ht,qe=ht,Ye=rn}if(Xe===J.length)return c(G,Ye),It&&Ss(G,Xe),Be;if(Ye===null){for(;Xe<J.length;Xe++)Ye=Te(G,J[Xe],_e),Ye!==null&&(q=b(Ye,q,Xe),qe===null?Be=Ye:qe.sibling=Ye,qe=Ye);return It&&Ss(G,Xe),Be}for(Ye=h(G,Ye);Xe<J.length;Xe++)rn=Oe(Ye,G,Xe,J[Xe],_e),rn!==null&&(i&&rn.alternate!==null&&Ye.delete(rn.key===null?Xe:rn.key),q=b(rn,q,Xe),qe===null?Be=rn:qe.sibling=rn,qe=rn);return i&&Ye.forEach(function(zi){return o(G,zi)}),It&&Ss(G,Xe),Be}function Me(G,q,J,_e){var Be=le(J);if(typeof Be!="function")throw Error(n(150));if(J=Be.call(J),J==null)throw Error(n(151));for(var qe=Be=null,Ye=q,Xe=q=0,rn=null,ht=J.next();Ye!==null&&!ht.done;Xe++,ht=J.next()){Ye.index>Xe?(rn=Ye,Ye=null):rn=Ye.sibling;var zi=me(G,Ye,ht.value,_e);if(zi===null){Ye===null&&(Ye=rn);break}i&&Ye&&zi.alternate===null&&o(G,Ye),q=b(zi,q,Xe),qe===null?Be=zi:qe.sibling=zi,qe=zi,Ye=rn}if(ht.done)return c(G,Ye),It&&Ss(G,Xe),Be;if(Ye===null){for(;!ht.done;Xe++,ht=J.next())ht=Te(G,ht.value,_e),ht!==null&&(q=b(ht,q,Xe),qe===null?Be=ht:qe.sibling=ht,qe=ht);return It&&Ss(G,Xe),Be}for(Ye=h(G,Ye);!ht.done;Xe++,ht=J.next())ht=Oe(Ye,G,Xe,ht.value,_e),ht!==null&&(i&&ht.alternate!==null&&Ye.delete(ht.key===null?Xe:ht.key),q=b(ht,q,Xe),qe===null?Be=ht:qe.sibling=ht,qe=ht);return i&&Ye.forEach(function(FU){return o(G,FU)}),It&&Ss(G,Xe),Be}function zt(G,q,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 V:e:{for(var Be=J.key,qe=q;qe!==null;){if(qe.key===Be){if(Be=J.type,Be===W){if(qe.tag===7){c(G,qe.sibling),q=E(qe,J.props.children),q.return=G,G=q;break e}}else if(qe.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===ve&&Sx(Be)===qe.type){c(G,qe.sibling),q=E(qe,J.props),q.ref=gu(G,qe,J),q.return=G,G=q;break e}c(G,qe);break}else o(G,qe);qe=qe.sibling}J.type===W?(q=Ps(J.props.children,G.mode,_e,J.key),q.return=G,G=q):(_e=gd(J.type,J.key,J.props,null,G.mode,_e),_e.ref=gu(G,q,J),_e.return=G,G=_e)}return v(G);case D:e:{for(qe=J.key;q!==null;){if(q.key===qe)if(q.tag===4&&q.stateNode.containerInfo===J.containerInfo&&q.stateNode.implementation===J.implementation){c(G,q.sibling),q=E(q,J.children||[]),q.return=G,G=q;break e}else{c(G,q);break}else o(G,q);q=q.sibling}q=E0(J,G.mode,_e),q.return=G,G=q}return v(G);case ve:return qe=J._init,zt(G,q,qe(J._payload),_e)}if(Qe(J))return Le(G,q,J,_e);if(le(J))return Me(G,q,J,_e);Yc(G,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,q!==null&&q.tag===6?(c(G,q.sibling),q=E(q,J),q.return=G,G=q):(c(G,q),q=g0(J,G.mode,_e),q.return=G,G=q),v(G)):c(G,q)}return zt}var Ho=vx(!0),Ax=vx(!1),Wc=Ii(null),Gc=null,jo=null,Am=null;function Cm(){Am=jo=Gc=null}function Nm(i){var o=Wc.current;Nt(Wc),i._currentValue=o}function km(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 zo(i,o){Gc=i,Am=jo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Fn=!0),i.firstContext=null)}function ir(i){var o=i._currentValue;if(Am!==i)if(i={context:i,memoizedValue:o,next:null},jo===null){if(Gc===null)throw Error(n(308));jo=i,Gc.dependencies={lanes:0,firstContext:i}}else jo=jo.next=i;return o}var vs=null;function Om(i){vs===null?vs=[i]:vs.push(i)}function Cx(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,oi(i,h)}function oi(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 Li=!1;function Im(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nx(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 ai(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Di(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(ct&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,oi(i,c)}return E=h.interleaved,E===null?(o.next=o,Om(h)):(o.next=E.next,E.next=o),h.interleaved=o,oi(i,c)}function Xc(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,qp(i,c)}}function kx(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 v={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=v:b=b.next=v,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 Kc(i,o,c,h){var E=i.updateQueue;Li=!1;var b=E.firstBaseUpdate,v=E.lastBaseUpdate,B=E.shared.pending;if(B!==null){E.shared.pending=null;var $=B,ne=$.next;$.next=null,v===null?b=ne:v.next=ne,v=$;var Ee=i.alternate;Ee!==null&&(Ee=Ee.updateQueue,B=Ee.lastBaseUpdate,B!==v&&(B===null?Ee.firstBaseUpdate=ne:B.next=ne,Ee.lastBaseUpdate=$))}if(b!==null){var Te=E.baseState;v=0,Ee=ne=$=null,B=b;do{var me=B.lane,Oe=B.eventTime;if((h&me)===me){Ee!==null&&(Ee=Ee.next={eventTime:Oe,lane:0,tag:B.tag,payload:B.payload,callback:B.callback,next:null});e:{var Le=i,Me=B;switch(me=o,Oe=c,Me.tag){case 1:if(Le=Me.payload,typeof Le=="function"){Te=Le.call(Oe,Te,me);break e}Te=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=Me.payload,me=typeof Le=="function"?Le.call(Oe,Te,me):Le,me==null)break e;Te=C({},Te,me);break e;case 2:Li=!0}}B.callback!==null&&B.lane!==0&&(i.flags|=64,me=E.effects,me===null?E.effects=[B]:me.push(B))}else Oe={eventTime:Oe,lane:me,tag:B.tag,payload:B.payload,callback:B.callback,next:null},Ee===null?(ne=Ee=Oe,$=Te):Ee=Ee.next=Oe,v|=me;if(B=B.next,B===null){if(B=E.shared.pending,B===null)break;me=B,B=me.next,me.next=null,E.lastBaseUpdate=me,E.shared.pending=null}}while(!0);if(Ee===null&&($=Te),E.baseState=$,E.firstBaseUpdate=ne,E.lastBaseUpdate=Ee,o=E.shared.interleaved,o!==null){E=o;do v|=E.lane,E=E.next;while(E!==o)}else b===null&&(E.shared.lanes=0);Ns|=v,i.lanes=v,i.memoizedState=Te}}function Ox(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 Eu={},zr=Ii(Eu),yu=Ii(Eu),Tu=Ii(Eu);function As(i){if(i===Eu)throw Error(n(174));return i}function Pm(i,o){switch(xt(Tu,o),xt(yu,i),xt(zr,Eu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:xe(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=xe(o,i)}Nt(zr),xt(zr,o)}function $o(){Nt(zr),Nt(yu),Nt(Tu)}function Ix(i){As(Tu.current);var o=As(zr.current),c=xe(o,i.type);o!==c&&(xt(yu,i),xt(zr,c))}function Rm(i){yu.current===i&&(Nt(zr),Nt(yu))}var Rt=Ii(0);function Qc(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 Lm=[];function Dm(){for(var i=0;i<Lm.length;i++)Lm[i]._workInProgressVersionPrimary=null;Lm.length=0}var Jc=j.ReactCurrentDispatcher,Mm=j.ReactCurrentBatchConfig,Cs=0,Lt=null,Xt=null,tn=null,Zc=!1,bu=!1,wu=0,sU=0;function Tn(){throw Error(n(321))}function Fm(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!br(i[c],o[c]))return!1;return!0}function Bm(i,o,c,h,E,b){if(Cs=b,Lt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Jc.current=i===null||i.memoizedState===null?lU:cU,i=c(h,E),bu){b=0;do{if(bu=!1,wu=0,25<=b)throw Error(n(301));b+=1,tn=Xt=null,o.updateQueue=null,Jc.current=dU,i=c(h,E)}while(bu)}if(Jc.current=nd,o=Xt!==null&&Xt.next!==null,Cs=0,tn=Xt=Lt=null,Zc=!1,o)throw Error(n(300));return i}function Um(){var i=wu!==0;return wu=0,i}function $r(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tn===null?Lt.memoizedState=tn=i:tn=tn.next=i,tn}function sr(){if(Xt===null){var i=Lt.alternate;i=i!==null?i.memoizedState:null}else i=Xt.next;var o=tn===null?Lt.memoizedState:tn.next;if(o!==null)tn=o,Xt=i;else{if(i===null)throw Error(n(310));Xt=i,i={memoizedState:Xt.memoizedState,baseState:Xt.baseState,baseQueue:Xt.baseQueue,queue:Xt.queue,next:null},tn===null?Lt.memoizedState=tn=i:tn=tn.next=i}return tn}function _u(i,o){return typeof o=="function"?o(i):o}function Hm(i){var o=sr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Xt,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var v=E.next;E.next=b.next,b.next=v}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var B=v=null,$=null,ne=b;do{var Ee=ne.lane;if((Cs&Ee)===Ee)$!==null&&($=$.next={lane:0,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),h=ne.hasEagerState?ne.eagerState:i(h,ne.action);else{var Te={lane:Ee,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null};$===null?(B=$=Te,v=h):$=$.next=Te,Lt.lanes|=Ee,Ns|=Ee}ne=ne.next}while(ne!==null&&ne!==b);$===null?v=h:$.next=B,br(h,o.memoizedState)||(Fn=!0),o.memoizedState=h,o.baseState=v,o.baseQueue=$,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,Lt.lanes|=b,Ns|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function jm(i){var o=sr(),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 v=E=E.next;do b=i(b,v.action),v=v.next;while(v!==E);br(b,o.memoizedState)||(Fn=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),c.lastRenderedState=b}return[b,h]}function Px(){}function Rx(i,o){var c=Lt,h=sr(),E=o(),b=!br(h.memoizedState,E);if(b&&(h.memoizedState=E,Fn=!0),h=h.queue,zm(Mx.bind(null,c,h,i),[i]),h.getSnapshot!==o||b||tn!==null&&tn.memoizedState.tag&1){if(c.flags|=2048,xu(9,Dx.bind(null,c,h,E,o),void 0,null),nn===null)throw Error(n(349));(Cs&30)!==0||Lx(c,o,E)}return E}function Lx(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Lt.updateQueue,o===null?(o={lastEffect:null,stores:null},Lt.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function Dx(i,o,c,h){o.value=c,o.getSnapshot=h,Fx(o)&&Bx(i)}function Mx(i,o,c){return c(function(){Fx(o)&&Bx(i)})}function Fx(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!br(i,c)}catch(h){return!0}}function Bx(i){var o=oi(i,1);o!==null&&vr(o,i,1,-1)}function Ux(i){var o=$r();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_u,lastRenderedState:i},o.queue=i,i=i.dispatch=uU.bind(null,Lt,i),[o.memoizedState,i]}function xu(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=Lt.updateQueue,o===null?(o={lastEffect:null,stores:null},Lt.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 Hx(){return sr().memoizedState}function ed(i,o,c,h){var E=$r();Lt.flags|=i,E.memoizedState=xu(1|o,c,void 0,h===void 0?null:h)}function td(i,o,c,h){var E=sr();h=h===void 0?null:h;var b=void 0;if(Xt!==null){var v=Xt.memoizedState;if(b=v.destroy,h!==null&&Fm(h,v.deps)){E.memoizedState=xu(o,c,b,h);return}}Lt.flags|=i,E.memoizedState=xu(1|o,c,b,h)}function jx(i,o){return ed(8390656,8,i,o)}function zm(i,o){return td(2048,8,i,o)}function zx(i,o){return td(4,2,i,o)}function $x(i,o){return td(4,4,i,o)}function Vx(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 qx(i,o,c){return c=c!=null?c.concat([i]):null,td(4,4,Vx.bind(null,o,i),c)}function $m(){}function Yx(i,o){var c=sr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&Fm(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function Wx(i,o){var c=sr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&Fm(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function Gx(i,o,c){return(Cs&21)===0?(i.baseState&&(i.baseState=!1,Fn=!0),i.memoizedState=c):(br(c,o)||(c=S_(),Lt.lanes|=c,Ns|=c,i.baseState=!0),o)}function oU(i,o){var c=gt;gt=c!==0&&4>c?c:4,i(!0);var h=Mm.transition;Mm.transition={};try{i(!1),o()}finally{gt=c,Mm.transition=h}}function Xx(){return sr().memoizedState}function aU(i,o,c){var h=Ui(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},Kx(i))Qx(o,c);else if(c=Cx(i,o,c,h),c!==null){var E=vn();vr(c,i,h,E),Jx(c,o,h)}}function uU(i,o,c){var h=Ui(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(Kx(i))Qx(o,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var v=o.lastRenderedState,B=b(v,c);if(E.hasEagerState=!0,E.eagerState=B,br(B,v)){var $=o.interleaved;$===null?(E.next=E,Om(o)):(E.next=$.next,$.next=E),o.interleaved=E;return}}catch(ne){}c=Cx(i,o,E,h),c!==null&&(E=vn(),vr(c,i,h,E),Jx(c,o,h))}}function Kx(i){var o=i.alternate;return i===Lt||o!==null&&o===Lt}function Qx(i,o){bu=Zc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function Jx(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,qp(i,c)}}var nd={readContext:ir,useCallback:Tn,useContext:Tn,useEffect:Tn,useImperativeHandle:Tn,useInsertionEffect:Tn,useLayoutEffect:Tn,useMemo:Tn,useReducer:Tn,useRef:Tn,useState:Tn,useDebugValue:Tn,useDeferredValue:Tn,useTransition:Tn,useMutableSource:Tn,useSyncExternalStore:Tn,useId:Tn,unstable_isNewReconciler:!1},lU={readContext:ir,useCallback:function(i,o){return $r().memoizedState=[i,o===void 0?null:o],i},useContext:ir,useEffect:jx,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,ed(4194308,4,Vx.bind(null,o,i),c)},useLayoutEffect:function(i,o){return ed(4194308,4,i,o)},useInsertionEffect:function(i,o){return ed(4,2,i,o)},useMemo:function(i,o){var c=$r();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=$r();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=aU.bind(null,Lt,i),[h.memoizedState,i]},useRef:function(i){var o=$r();return i={current:i},o.memoizedState=i},useState:Ux,useDebugValue:$m,useDeferredValue:function(i){return $r().memoizedState=i},useTransition:function(){var i=Ux(!1),o=i[0];return i=oU.bind(null,i[1]),$r().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=Lt,E=$r();if(It){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),nn===null)throw Error(n(349));(Cs&30)!==0||Lx(h,o,c)}E.memoizedState=c;var b={value:c,getSnapshot:o};return E.queue=b,jx(Mx.bind(null,h,b,i),[i]),h.flags|=2048,xu(9,Dx.bind(null,h,b,c,o),void 0,null),c},useId:function(){var i=$r(),o=nn.identifierPrefix;if(It){var c=si,h=ii;c=(h&~(1<<32-Tr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=wu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=sU++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},cU={readContext:ir,useCallback:Yx,useContext:ir,useEffect:zm,useImperativeHandle:qx,useInsertionEffect:zx,useLayoutEffect:$x,useMemo:Wx,useReducer:Hm,useRef:Hx,useState:function(){return Hm(_u)},useDebugValue:$m,useDeferredValue:function(i){var o=sr();return Gx(o,Xt.memoizedState,i)},useTransition:function(){var i=Hm(_u)[0],o=sr().memoizedState;return[i,o]},useMutableSource:Px,useSyncExternalStore:Rx,useId:Xx,unstable_isNewReconciler:!1},dU={readContext:ir,useCallback:Yx,useContext:ir,useEffect:zm,useImperativeHandle:qx,useInsertionEffect:zx,useLayoutEffect:$x,useMemo:Wx,useReducer:jm,useRef:Hx,useState:function(){return jm(_u)},useDebugValue:$m,useDeferredValue:function(i){var o=sr();return Xt===null?o.memoizedState=i:Gx(o,Xt.memoizedState,i)},useTransition:function(){var i=jm(_u)[0],o=sr().memoizedState;return[i,o]},useMutableSource:Px,useSyncExternalStore:Rx,useId:Xx,unstable_isNewReconciler:!1};function _r(i,o){if(i&&i.defaultProps){o=C({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function Vm(i,o,c,h){o=i.memoizedState,c=c(h,o),c=c==null?o:C({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var rd={isMounted:function(i){return(i=i._reactInternals)?bs(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=vn(),E=Ui(i),b=ai(h,E);b.payload=o,c!=null&&(b.callback=c),o=Di(i,b,E),o!==null&&(vr(o,i,E,h),Xc(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=vn(),E=Ui(i),b=ai(h,E);b.tag=1,b.payload=o,c!=null&&(b.callback=c),o=Di(i,b,E),o!==null&&(vr(o,i,E,h),Xc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=vn(),h=Ui(i),E=ai(c,h);E.tag=2,o!=null&&(E.callback=o),o=Di(i,E,h),o!==null&&(vr(o,i,h,c),Xc(o,i,h))}};function Zx(i,o,c,h,E,b,v){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,v):o.prototype&&o.prototype.isPureReactComponent?!lu(c,h)||!lu(E,b):!0}function eS(i,o,c){var h=!1,E=Pi,b=o.contextType;return typeof b=="object"&&b!==null?b=ir(b):(E=Mn(o)?_s:yn.current,h=o.contextTypes,b=(h=h!=null)?Mo(i,E):Pi),o=new o(c,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=rd,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function tS(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&&rd.enqueueReplaceState(o,o.state,null)}function qm(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},Im(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=ir(b):(b=Mn(o)?_s:yn.current,E.context=Mo(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(Vm(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&&rd.enqueueReplaceState(E,E.state,null),Kc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Vo(i,o){try{var c="",h=o;do c+=Re(h),h=h.return;while(h);var E=c}catch(b){E=`
|
|
20
|
+
`+E[v].replace(" at new "," at ");return i.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",i.displayName)),$}while(1<=v&&0<=B);break}}}finally{R=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?ee(i):""}function Re(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=Ce(i.type,!1),i;case 11:return i=Ce(i.type.render,!1),i;case 1:return i=Ce(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 D:return"Portal";case re:return"Profiler";case Z:return"StrictMode";case de:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case K:return(i.displayName||"Context")+".Consumer";case z:return(i._context.displayName||"Context")+".Provider";case oe:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case te:return o=i.displayName||null,o!==null?o:he(i.type)||"Memo";case ve:o=i._payload,i=i._init;try{return he(i(o))}catch(c){}}return null}function Se(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===Z?"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 $e(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function He(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function et(i){var o=He(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(v){h=""+v,b.call(this,v)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(v){h=""+v},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function pt(i){i._valueTracker||(i._valueTracker=et(i))}function bt(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=He(i)?i.checked?"true":"false":i.value),i=h,i!==c?(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 En(i,o){var c=o.checked;return C({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Ht(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=$e(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 je(i,o){o=o.checked,o!=null&&O(i,"checked",o,!1)}function _t(i,o){je(i,o);var c=$e(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")?Ie(i,o.type,c):o.hasOwnProperty("defaultValue")&&Ie(i,o.type,$e(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function Gt(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 Ie(i,o,c){(o!=="number"||an(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Qe=Array.isArray;function ot(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=""+$e(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 ut(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return C({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function tr(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(Qe(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:$e(c)}}function ys(i,o){var c=$e(o.value),h=$e(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 Ts(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function ce(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 xe(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?ce(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var We,Ze=(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(We=We||document.createElement("div"),We.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=We.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 Mt={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(Mt).forEach(function(i){yr.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Mt[o]=Mt[i]})});function se(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||Mt.hasOwnProperty(i)&&Mt[i]?(""+o).trim():o+"px"}function Ae(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=se(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var ke=C({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 be(i,o){if(o){if(ke[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 pe(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 Fe=null;function lt(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var qn=null,Pt=null,Yn=null;function Ya(i){if(i=mu(i)){if(typeof qn!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Uc(o),qn(i.stateNode,i.type,o))}}function Wa(i){Pt?Yn?Yn.push(i):Yn=[i]:Pt=i}function f_(){if(Pt){var i=Pt,o=Yn;if(Yn=Pt=null,Ya(i),o)for(i=0;i<o.length;i++)Ya(o[i])}}function h_(i,o){return i(o)}function p_(){}var Up=!1;function m_(i,o,c){if(Up)return i(o,c);Up=!0;try{return h_(i,o,c)}finally{Up=!1,(Pt!==null||Yn!==null)&&(p_(),f_())}}function Ga(i,o){var c=i.stateNode;if(c===null)return null;var h=Uc(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 Hp=!1;if(l)try{var Xa={};Object.defineProperty(Xa,"passive",{get:function(){Hp=!0}}),window.addEventListener("test",Xa,Xa),window.removeEventListener("test",Xa,Xa)}catch(i){Hp=!1}function YB(i,o,c,h,E,b,v,B,$){var ne=Array.prototype.slice.call(arguments,3);try{o.apply(c,ne)}catch(Ee){this.onError(Ee)}}var Ka=!1,Ec=null,yc=!1,jp=null,WB={onError:function(i){Ka=!0,Ec=i}};function GB(i,o,c,h,E,b,v,B,$){Ka=!1,Ec=null,YB.apply(WB,arguments)}function XB(i,o,c,h,E,b,v,B,$){if(GB.apply(this,arguments),Ka){if(Ka){var ne=Ec;Ka=!1,Ec=null}else throw Error(n(198));yc||(yc=!0,jp=ne)}}function bs(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 g_(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 E_(i){if(bs(i)!==i)throw Error(n(188))}function KB(i){var o=i.alternate;if(!o){if(o=bs(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 E_(E),i;if(b===h)return E_(E),o;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var v=!1,B=E.child;B;){if(B===c){v=!0,c=E,h=b;break}if(B===h){v=!0,h=E,c=b;break}B=B.sibling}if(!v){for(B=b.child;B;){if(B===c){v=!0,c=b,h=E;break}if(B===h){v=!0,h=b,c=E;break}B=B.sibling}if(!v)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 y_(i){return i=KB(i),i!==null?T_(i):null}function T_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=T_(i);if(o!==null)return o;i=i.sibling}return null}var b_=t.unstable_scheduleCallback,w_=t.unstable_cancelCallback,QB=t.unstable_shouldYield,JB=t.unstable_requestPaint,jt=t.unstable_now,ZB=t.unstable_getCurrentPriorityLevel,zp=t.unstable_ImmediatePriority,__=t.unstable_UserBlockingPriority,Tc=t.unstable_NormalPriority,e7=t.unstable_LowPriority,x_=t.unstable_IdlePriority,bc=null,Hr=null;function t7(i){if(Hr&&typeof Hr.onCommitFiberRoot=="function")try{Hr.onCommitFiberRoot(bc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var Tr=Math.clz32?Math.clz32:i7,n7=Math.log,r7=Math.LN2;function i7(i){return i>>>=0,i===0?32:31-(n7(i)/r7|0)|0}var wc=64,_c=4194304;function Qa(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 xc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,v=c&268435455;if(v!==0){var B=v&~E;B!==0?h=Qa(B):(b&=v,b!==0&&(h=Qa(b)))}else v=c&~E,v!==0?h=Qa(v):b!==0&&(h=Qa(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-Tr(o),E=1<<c,h|=i[c],o&=~E;return h}function s7(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 o7(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var v=31-Tr(b),B=1<<v,$=E[v];$===-1?((B&c)===0||(B&h)!==0)&&(E[v]=s7(B,o)):$<=o&&(i.expiredLanes|=B),b&=~B}}function $p(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function S_(){var i=wc;return wc<<=1,(wc&4194240)===0&&(wc=64),i}function Vp(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function Ja(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-Tr(o),i[o]=c}function a7(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-Tr(c),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function qp(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-Tr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var gt=0;function v_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var A_,Yp,C_,N_,k_,Wp=!1,Sc=[],Si=null,vi=null,Ai=null,Za=new Map,eu=new Map,Ci=[],u7="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 O_(i,o){switch(i){case"focusin":case"focusout":Si=null;break;case"dragenter":case"dragleave":vi=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":Za.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":eu.delete(o.pointerId)}}function tu(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=mu(o),o!==null&&Yp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function l7(i,o,c,h,E){switch(o){case"focusin":return Si=tu(Si,i,o,c,h,E),!0;case"dragenter":return vi=tu(vi,i,o,c,h,E),!0;case"mouseover":return Ai=tu(Ai,i,o,c,h,E),!0;case"pointerover":var b=E.pointerId;return Za.set(b,tu(Za.get(b)||null,i,o,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,eu.set(b,tu(eu.get(b)||null,i,o,c,h,E)),!0}return!1}function I_(i){var o=ws(i.target);if(o!==null){var c=bs(o);if(c!==null){if(o=c.tag,o===13){if(o=g_(c),o!==null){i.blockedOn=o,k_(i.priority,function(){C_(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 vc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=Xp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Fe=h,c.target.dispatchEvent(h),Fe=null}else return o=mu(c),o!==null&&Yp(o),i.blockedOn=c,!1;o.shift()}return!0}function P_(i,o,c){vc(i)&&c.delete(o)}function c7(){Wp=!1,Si!==null&&vc(Si)&&(Si=null),vi!==null&&vc(vi)&&(vi=null),Ai!==null&&vc(Ai)&&(Ai=null),Za.forEach(P_),eu.forEach(P_)}function nu(i,o){i.blockedOn===o&&(i.blockedOn=null,Wp||(Wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,c7)))}function ru(i){function o(E){return nu(E,i)}if(0<Sc.length){nu(Sc[0],i);for(var c=1;c<Sc.length;c++){var h=Sc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(Si!==null&&nu(Si,i),vi!==null&&nu(vi,i),Ai!==null&&nu(Ai,i),Za.forEach(o),eu.forEach(o),c=0;c<Ci.length;c++)h=Ci[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ci.length&&(c=Ci[0],c.blockedOn===null);)I_(c),c.blockedOn===null&&Ci.shift()}var Co=j.ReactCurrentBatchConfig,Ac=!0;function d7(i,o,c,h){var E=gt,b=Co.transition;Co.transition=null;try{gt=1,Gp(i,o,c,h)}finally{gt=E,Co.transition=b}}function f7(i,o,c,h){var E=gt,b=Co.transition;Co.transition=null;try{gt=4,Gp(i,o,c,h)}finally{gt=E,Co.transition=b}}function Gp(i,o,c,h){if(Ac){var E=Xp(i,o,c,h);if(E===null)fm(i,o,h,Cc,c),O_(i,h);else if(l7(E,i,o,c,h))h.stopPropagation();else if(O_(i,h),o&4&&-1<u7.indexOf(i)){for(;E!==null;){var b=mu(E);if(b!==null&&A_(b),b=Xp(i,o,c,h),b===null&&fm(i,o,h,Cc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else fm(i,o,h,null,c)}}var Cc=null;function Xp(i,o,c,h){if(Cc=null,i=lt(h),i=ws(i),i!==null)if(o=bs(i),o===null)i=null;else if(c=o.tag,c===13){if(i=g_(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 R_(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(ZB()){case zp:return 1;case __:return 4;case Tc:case e7:return 16;case x_:return 536870912;default:return 16}default:return 16}}var Ni=null,Kp=null,Nc=null;function L_(){if(Nc)return Nc;var i,o=Kp,c=o.length,h,E="value"in Ni?Ni.value:Ni.textContent,b=E.length;for(i=0;i<c&&o[i]===E[i];i++);var v=c-i;for(h=1;h<=v&&o[c-h]===E[b-h];h++);return Nc=E.slice(i,1<h?1-h:void 0)}function kc(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 Oc(){return!0}function D_(){return!1}function Wn(i){function o(c,h,E,b,v){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=v,this.currentTarget=null;for(var B in i)i.hasOwnProperty(B)&&(c=i[B],this[B]=c?c(b):b[B]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Oc:D_,this.isPropagationStopped=D_,this}return C(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=Oc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Oc)},persist:function(){},isPersistent:Oc}),o}var No={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qp=Wn(No),iu=C({},No,{view:0,detail:0}),h7=Wn(iu),Jp,Zp,su,Ic=C({},iu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tm,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!==su&&(su&&i.type==="mousemove"?(Jp=i.screenX-su.screenX,Zp=i.screenY-su.screenY):Zp=Jp=0,su=i),Jp)},movementY:function(i){return"movementY"in i?i.movementY:Zp}}),M_=Wn(Ic),p7=C({},Ic,{dataTransfer:0}),m7=Wn(p7),g7=C({},iu,{relatedTarget:0}),em=Wn(g7),E7=C({},No,{animationName:0,elapsedTime:0,pseudoElement:0}),y7=Wn(E7),T7=C({},No,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),b7=Wn(T7),w7=C({},No,{data:0}),F_=Wn(w7),_7={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},x7={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"},S7={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function v7(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=S7[i])?!!o[i]:!1}function tm(){return v7}var A7=C({},iu,{key:function(i){if(i.key){var o=_7[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=kc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?x7[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tm,charCode:function(i){return i.type==="keypress"?kc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?kc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),C7=Wn(A7),N7=C({},Ic,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),B_=Wn(N7),k7=C({},iu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tm}),O7=Wn(k7),I7=C({},No,{propertyName:0,elapsedTime:0,pseudoElement:0}),P7=Wn(I7),R7=C({},Ic,{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}),L7=Wn(R7),D7=[9,13,27,32],nm=l&&"CompositionEvent"in window,ou=null;l&&"documentMode"in document&&(ou=document.documentMode);var M7=l&&"TextEvent"in window&&!ou,U_=l&&(!nm||ou&&8<ou&&11>=ou),H_=" ",j_=!1;function z_(i,o){switch(i){case"keyup":return D7.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ko=!1;function F7(i,o){switch(i){case"compositionend":return $_(o);case"keypress":return o.which!==32?null:(j_=!0,H_);case"textInput":return i=o.data,i===H_&&j_?null:i;default:return null}}function B7(i,o){if(ko)return i==="compositionend"||!nm&&z_(i,o)?(i=L_(),Nc=Kp=Ni=null,ko=!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 U_&&o.locale!=="ko"?null:o.data;default:return null}}var U7={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 V_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!U7[i.type]:o==="textarea"}function q_(i,o,c,h){Wa(h),o=Mc(o,"onChange"),0<o.length&&(c=new Qp("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var au=null,uu=null;function H7(i){lx(i,0)}function Pc(i){var o=Lo(i);if(bt(o))return i}function j7(i,o){if(i==="change")return o}var Y_=!1;if(l){var rm;if(l){var im="oninput"in document;if(!im){var W_=document.createElement("div");W_.setAttribute("oninput","return;"),im=typeof W_.oninput=="function"}rm=im}else rm=!1;Y_=rm&&(!document.documentMode||9<document.documentMode)}function G_(){au&&(au.detachEvent("onpropertychange",X_),uu=au=null)}function X_(i){if(i.propertyName==="value"&&Pc(uu)){var o=[];q_(o,uu,i,lt(i)),m_(H7,o)}}function z7(i,o,c){i==="focusin"?(G_(),au=o,uu=c,au.attachEvent("onpropertychange",X_)):i==="focusout"&&G_()}function $7(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Pc(uu)}function V7(i,o){if(i==="click")return Pc(o)}function q7(i,o){if(i==="input"||i==="change")return Pc(o)}function Y7(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var br=typeof Object.is=="function"?Object.is:Y7;function lu(i,o){if(br(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)||!br(i[E],o[E]))return!1}return!0}function K_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Q_(i,o){var c=K_(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=K_(c)}}function J_(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?J_(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Z_(){for(var i=window,o=an();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=an(i.document)}return o}function sm(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 W7(i){var o=Z_(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&J_(c.ownerDocument.documentElement,c)){if(h!==null&&sm(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=Q_(c,b);var v=Q_(c,h);E&&v&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==v.node||i.focusOffset!==v.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(o),i.extend(v.node,v.offset)):(o.setEnd(v.node,v.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 G7=l&&"documentMode"in document&&11>=document.documentMode,Oo=null,om=null,cu=null,am=!1;function ex(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;am||Oo==null||Oo!==an(h)||(h=Oo,"selectionStart"in h&&sm(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}),cu&&lu(cu,h)||(cu=h,h=Mc(om,"onSelect"),0<h.length&&(o=new Qp("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=Oo)))}function Rc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var Io={animationend:Rc("Animation","AnimationEnd"),animationiteration:Rc("Animation","AnimationIteration"),animationstart:Rc("Animation","AnimationStart"),transitionend:Rc("Transition","TransitionEnd")},um={},tx={};l&&(tx=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function Lc(i){if(um[i])return um[i];if(!Io[i])return i;var o=Io[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in tx)return um[i]=o[c];return i}var nx=Lc("animationend"),rx=Lc("animationiteration"),ix=Lc("animationstart"),sx=Lc("transitionend"),ox=new Map,ax="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 ki(i,o){ox.set(i,o),a(o,[i])}for(var lm=0;lm<ax.length;lm++){var cm=ax[lm],X7=cm.toLowerCase(),K7=cm[0].toUpperCase()+cm.slice(1);ki(X7,"on"+K7)}ki(nx,"onAnimationEnd"),ki(rx,"onAnimationIteration"),ki(ix,"onAnimationStart"),ki("dblclick","onDoubleClick"),ki("focusin","onFocus"),ki("focusout","onBlur"),ki(sx,"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 du="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(" "),Q7=new Set("cancel close invalid load scroll toggle".split(" ").concat(du));function ux(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,XB(h,o,void 0,i),i.currentTarget=null}function lx(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 v=h.length-1;0<=v;v--){var B=h[v],$=B.instance,ne=B.currentTarget;if(B=B.listener,$!==b&&E.isPropagationStopped())break e;ux(E,B,ne),b=$}else for(v=0;v<h.length;v++){if(B=h[v],$=B.instance,ne=B.currentTarget,B=B.listener,$!==b&&E.isPropagationStopped())break e;ux(E,B,ne),b=$}}}if(yc)throw i=jp,yc=!1,jp=null,i}function Ct(i,o){var c=o[ym];c===void 0&&(c=o[ym]=new Set);var h=i+"__bubble";c.has(h)||(cx(o,i,2,!1),c.add(h))}function dm(i,o,c){var h=0;o&&(h|=4),cx(c,i,h,o)}var Dc="_reactListening"+Math.random().toString(36).slice(2);function fu(i){if(!i[Dc]){i[Dc]=!0,r.forEach(function(c){c!=="selectionchange"&&(Q7.has(c)||dm(c,!1,i),dm(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Dc]||(o[Dc]=!0,dm("selectionchange",!1,o))}}function cx(i,o,c,h){switch(R_(o)){case 1:var E=d7;break;case 4:E=f7;break;default:E=Gp}c=E.bind(null,o,c,i),E=void 0,!Hp||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 fm(i,o,c,h,E){var b=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var v=h.tag;if(v===3||v===4){var B=h.stateNode.containerInfo;if(B===E||B.nodeType===8&&B.parentNode===E)break;if(v===4)for(v=h.return;v!==null;){var $=v.tag;if(($===3||$===4)&&($=v.stateNode.containerInfo,$===E||$.nodeType===8&&$.parentNode===E))return;v=v.return}for(;B!==null;){if(v=ws(B),v===null)return;if($=v.tag,$===5||$===6){h=b=v;continue e}B=B.parentNode}}h=h.return}m_(function(){var ne=b,Ee=lt(c),Te=[];e:{var me=ox.get(i);if(me!==void 0){var Oe=Qp,Le=i;switch(i){case"keypress":if(kc(c)===0)break e;case"keydown":case"keyup":Oe=C7;break;case"focusin":Le="focus",Oe=em;break;case"focusout":Le="blur",Oe=em;break;case"beforeblur":case"afterblur":Oe=em;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":Oe=M_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=m7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=O7;break;case nx:case rx:case ix:Oe=y7;break;case sx:Oe=P7;break;case"scroll":Oe=h7;break;case"wheel":Oe=L7;break;case"copy":case"cut":case"paste":Oe=b7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=B_}var Me=(o&4)!==0,zt=!Me&&i==="scroll",G=Me?me!==null?me+"Capture":null:me;Me=[];for(var q=ne,J;q!==null;){J=q;var _e=J.stateNode;if(J.tag===5&&_e!==null&&(J=_e,G!==null&&(_e=Ga(q,G),_e!=null&&Me.push(hu(q,_e,J)))),zt)break;q=q.return}0<Me.length&&(me=new Oe(me,Le,null,c,Ee),Te.push({event:me,listeners:Me}))}}if((o&7)===0){e:{if(me=i==="mouseover"||i==="pointerover",Oe=i==="mouseout"||i==="pointerout",me&&c!==Fe&&(Le=c.relatedTarget||c.fromElement)&&(ws(Le)||Le[ni]))break e;if((Oe||me)&&(me=Ee.window===Ee?Ee:(me=Ee.ownerDocument)?me.defaultView||me.parentWindow:window,Oe?(Le=c.relatedTarget||c.toElement,Oe=ne,Le=Le?ws(Le):null,Le!==null&&(zt=bs(Le),Le!==zt||Le.tag!==5&&Le.tag!==6)&&(Le=null)):(Oe=null,Le=ne),Oe!==Le)){if(Me=M_,_e="onMouseLeave",G="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(Me=B_,_e="onPointerLeave",G="onPointerEnter",q="pointer"),zt=Oe==null?me:Lo(Oe),J=Le==null?me:Lo(Le),me=new Me(_e,q+"leave",Oe,c,Ee),me.target=zt,me.relatedTarget=J,_e=null,ws(Ee)===ne&&(Me=new Me(G,q+"enter",Le,c,Ee),Me.target=J,Me.relatedTarget=zt,_e=Me),zt=_e,Oe&&Le)t:{for(Me=Oe,G=Le,q=0,J=Me;J;J=Po(J))q++;for(J=0,_e=G;_e;_e=Po(_e))J++;for(;0<q-J;)Me=Po(Me),q--;for(;0<J-q;)G=Po(G),J--;for(;q--;){if(Me===G||G!==null&&Me===G.alternate)break t;Me=Po(Me),G=Po(G)}Me=null}else Me=null;Oe!==null&&dx(Te,me,Oe,Me,!1),Le!==null&&zt!==null&&dx(Te,zt,Le,Me,!0)}}e:{if(me=ne?Lo(ne):window,Oe=me.nodeName&&me.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&me.type==="file")var Be=j7;else if(V_(me))if(Y_)Be=q7;else{Be=$7;var qe=z7}else(Oe=me.nodeName)&&Oe.toLowerCase()==="input"&&(me.type==="checkbox"||me.type==="radio")&&(Be=V7);if(Be&&(Be=Be(i,ne))){q_(Te,Be,c,Ee);break e}qe&&qe(i,me,ne),i==="focusout"&&(qe=me._wrapperState)&&qe.controlled&&me.type==="number"&&Ie(me,"number",me.value)}switch(qe=ne?Lo(ne):window,i){case"focusin":(V_(qe)||qe.contentEditable==="true")&&(Oo=qe,om=ne,cu=null);break;case"focusout":cu=om=Oo=null;break;case"mousedown":am=!0;break;case"contextmenu":case"mouseup":case"dragend":am=!1,ex(Te,c,Ee);break;case"selectionchange":if(G7)break;case"keydown":case"keyup":ex(Te,c,Ee)}var Ye;if(nm)e:{switch(i){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else ko?z_(i,c)&&(Xe="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Xe="onCompositionStart");Xe&&(U_&&c.locale!=="ko"&&(ko||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&ko&&(Ye=L_()):(Ni=Ee,Kp="value"in Ni?Ni.value:Ni.textContent,ko=!0)),qe=Mc(ne,Xe),0<qe.length&&(Xe=new F_(Xe,i,null,c,Ee),Te.push({event:Xe,listeners:qe}),Ye?Xe.data=Ye:(Ye=$_(c),Ye!==null&&(Xe.data=Ye)))),(Ye=M7?F7(i,c):B7(i,c))&&(ne=Mc(ne,"onBeforeInput"),0<ne.length&&(Ee=new F_("onBeforeInput","beforeinput",null,c,Ee),Te.push({event:Ee,listeners:ne}),Ee.data=Ye))}lx(Te,o)})}function hu(i,o,c){return{instance:i,listener:o,currentTarget:c}}function Mc(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=Ga(i,c),b!=null&&h.unshift(hu(i,b,E)),b=Ga(i,o),b!=null&&h.push(hu(i,b,E))),i=i.return}return h}function Po(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function dx(i,o,c,h,E){for(var b=o._reactName,v=[];c!==null&&c!==h;){var B=c,$=B.alternate,ne=B.stateNode;if($!==null&&$===h)break;B.tag===5&&ne!==null&&(B=ne,E?($=Ga(c,b),$!=null&&v.unshift(hu(c,$,B))):E||($=Ga(c,b),$!=null&&v.push(hu(c,$,B)))),c=c.return}v.length!==0&&i.push({event:o,listeners:v})}var J7=/\r\n?/g,Z7=/\u0000|\uFFFD/g;function fx(i){return(typeof i=="string"?i:""+i).replace(J7,`
|
|
21
|
+
`).replace(Z7,"")}function Fc(i,o,c){if(o=fx(o),fx(i)!==o&&c)throw Error(n(425))}function Bc(){}var hm=null,pm=null;function mm(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 gm=typeof setTimeout=="function"?setTimeout:void 0,eU=typeof clearTimeout=="function"?clearTimeout:void 0,hx=typeof Promise=="function"?Promise:void 0,tU=typeof queueMicrotask=="function"?queueMicrotask:typeof hx!="undefined"?function(i){return hx.resolve(null).then(i).catch(nU)}:gm;function nU(i){setTimeout(function(){throw i})}function Em(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),ru(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);ru(o)}function Oi(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 px(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 Ro=Math.random().toString(36).slice(2),jr="__reactFiber$"+Ro,pu="__reactProps$"+Ro,ni="__reactContainer$"+Ro,ym="__reactEvents$"+Ro,rU="__reactListeners$"+Ro,iU="__reactHandles$"+Ro;function ws(i){var o=i[jr];if(o)return o;for(var c=i.parentNode;c;){if(o=c[ni]||c[jr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=px(i);i!==null;){if(c=i[jr])return c;i=px(i)}return o}i=c,c=i.parentNode}return null}function mu(i){return i=i[jr]||i[ni],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Lo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Uc(i){return i[pu]||null}var Tm=[],Do=-1;function Ii(i){return{current:i}}function Nt(i){0>Do||(i.current=Tm[Do],Tm[Do]=null,Do--)}function xt(i,o){Do++,Tm[Do]=i.current,i.current=o}var Pi={},yn=Ii(Pi),Dn=Ii(!1),_s=Pi;function Mo(i,o){var c=i.type.contextTypes;if(!c)return Pi;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 Mn(i){return i=i.childContextTypes,i!=null}function Hc(){Nt(Dn),Nt(yn)}function mx(i,o,c){if(yn.current!==Pi)throw Error(n(168));xt(yn,o),xt(Dn,c)}function gx(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,Se(i)||"Unknown",E));return C({},c,h)}function jc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Pi,_s=yn.current,xt(yn,i),xt(Dn,Dn.current),!0}function Ex(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=gx(i,o,_s),h.__reactInternalMemoizedMergedChildContext=i,Nt(Dn),Nt(yn),xt(yn,i)):Nt(Dn),xt(Dn,c)}var ri=null,zc=!1,bm=!1;function yx(i){ri===null?ri=[i]:ri.push(i)}function sU(i){zc=!0,yx(i)}function Ri(){if(!bm&&ri!==null){bm=!0;var i=0,o=gt;try{var c=ri;for(gt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}ri=null,zc=!1}catch(E){throw ri!==null&&(ri=ri.slice(i+1)),b_(zp,Ri),E}finally{gt=o,bm=!1}}return null}var Fo=[],Bo=0,$c=null,Vc=0,nr=[],rr=0,xs=null,ii=1,si="";function Ss(i,o){Fo[Bo++]=Vc,Fo[Bo++]=$c,$c=i,Vc=o}function Tx(i,o,c){nr[rr++]=ii,nr[rr++]=si,nr[rr++]=xs,xs=i;var h=ii;i=si;var E=32-Tr(h)-1;h&=~(1<<E),c+=1;var b=32-Tr(o)+E;if(30<b){var v=E-E%5;b=(h&(1<<v)-1).toString(32),h>>=v,E-=v,ii=1<<32-Tr(o)+E|c<<E|h,si=b+i}else ii=1<<b|c<<E|h,si=i}function wm(i){i.return!==null&&(Ss(i,1),Tx(i,1,0))}function _m(i){for(;i===$c;)$c=Fo[--Bo],Fo[Bo]=null,Vc=Fo[--Bo],Fo[Bo]=null;for(;i===xs;)xs=nr[--rr],nr[rr]=null,si=nr[--rr],nr[rr]=null,ii=nr[--rr],nr[rr]=null}var Gn=null,Xn=null,It=!1,wr=null;function bx(i,o){var c=ar(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 wx(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,Gn=i,Xn=Oi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Gn=i,Xn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=xs!==null?{id:ii,overflow:si}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=ar(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,Gn=i,Xn=null,!0):!1;default:return!1}}function xm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Sm(i){if(It){var o=Xn;if(o){var c=o;if(!wx(i,o)){if(xm(i))throw Error(n(418));o=Oi(c.nextSibling);var h=Gn;o&&wx(i,o)?bx(h,c):(i.flags=i.flags&-4097|2,It=!1,Gn=i)}}else{if(xm(i))throw Error(n(418));i.flags=i.flags&-4097|2,It=!1,Gn=i}}}function _x(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Gn=i}function qc(i){if(i!==Gn)return!1;if(!It)return _x(i),It=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!mm(i.type,i.memoizedProps)),o&&(o=Xn)){if(xm(i))throw xx(),Error(n(418));for(;o;)bx(i,o),o=Oi(o.nextSibling)}if(_x(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){Xn=Oi(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Xn=null}}else Xn=Gn?Oi(i.stateNode.nextSibling):null;return!0}function xx(){for(var i=Xn;i;)i=Oi(i.nextSibling)}function Uo(){Xn=Gn=null,It=!1}function vm(i){wr===null?wr=[i]:wr.push(i)}var oU=j.ReactCurrentBatchConfig;function gu(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(v){var B=E.refs;v===null?delete B[b]:B[b]=v},o._stringRef=b,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Yc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function Sx(i){var o=i._init;return o(i._payload)}function vx(i){function o(G,q){if(i){var J=G.deletions;J===null?(G.deletions=[q],G.flags|=16):J.push(q)}}function c(G,q){if(!i)return null;for(;q!==null;)o(G,q),q=q.sibling;return null}function h(G,q){for(G=new Map;q!==null;)q.key!==null?G.set(q.key,q):G.set(q.index,q),q=q.sibling;return G}function E(G,q){return G=ji(G,q),G.index=0,G.sibling=null,G}function b(G,q,J){return G.index=J,i?(J=G.alternate,J!==null?(J=J.index,J<q?(G.flags|=2,q):J):(G.flags|=2,q)):(G.flags|=1048576,q)}function v(G){return i&&G.alternate===null&&(G.flags|=2),G}function B(G,q,J,_e){return q===null||q.tag!==6?(q=g0(J,G.mode,_e),q.return=G,q):(q=E(q,J),q.return=G,q)}function $(G,q,J,_e){var Be=J.type;return Be===W?Ee(G,q,J.props.children,_e,J.key):q!==null&&(q.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===ve&&Sx(Be)===q.type)?(_e=E(q,J.props),_e.ref=gu(G,q,J),_e.return=G,_e):(_e=gd(J.type,J.key,J.props,null,G.mode,_e),_e.ref=gu(G,q,J),_e.return=G,_e)}function ne(G,q,J,_e){return q===null||q.tag!==4||q.stateNode.containerInfo!==J.containerInfo||q.stateNode.implementation!==J.implementation?(q=E0(J,G.mode,_e),q.return=G,q):(q=E(q,J.children||[]),q.return=G,q)}function Ee(G,q,J,_e,Be){return q===null||q.tag!==7?(q=Ps(J,G.mode,_e,Be),q.return=G,q):(q=E(q,J),q.return=G,q)}function Te(G,q,J){if(typeof q=="string"&&q!==""||typeof q=="number")return q=g0(""+q,G.mode,J),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case V:return J=gd(q.type,q.key,q.props,null,G.mode,J),J.ref=gu(G,null,q),J.return=G,J;case D:return q=E0(q,G.mode,J),q.return=G,q;case ve:var _e=q._init;return Te(G,_e(q._payload),J)}if(Qe(q)||le(q))return q=Ps(q,G.mode,J,null),q.return=G,q;Yc(G,q)}return null}function me(G,q,J,_e){var Be=q!==null?q.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return Be!==null?null:B(G,q,""+J,_e);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case V:return J.key===Be?$(G,q,J,_e):null;case D:return J.key===Be?ne(G,q,J,_e):null;case ve:return Be=J._init,me(G,q,Be(J._payload),_e)}if(Qe(J)||le(J))return Be!==null?null:Ee(G,q,J,_e,null);Yc(G,J)}return null}function Oe(G,q,J,_e,Be){if(typeof _e=="string"&&_e!==""||typeof _e=="number")return G=G.get(J)||null,B(q,G,""+_e,Be);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case V:return G=G.get(_e.key===null?J:_e.key)||null,$(q,G,_e,Be);case D:return G=G.get(_e.key===null?J:_e.key)||null,ne(q,G,_e,Be);case ve:var qe=_e._init;return Oe(G,q,J,qe(_e._payload),Be)}if(Qe(_e)||le(_e))return G=G.get(J)||null,Ee(q,G,_e,Be,null);Yc(q,_e)}return null}function Le(G,q,J,_e){for(var Be=null,qe=null,Ye=q,Xe=q=0,rn=null;Ye!==null&&Xe<J.length;Xe++){Ye.index>Xe?(rn=Ye,Ye=null):rn=Ye.sibling;var ht=me(G,Ye,J[Xe],_e);if(ht===null){Ye===null&&(Ye=rn);break}i&&Ye&&ht.alternate===null&&o(G,Ye),q=b(ht,q,Xe),qe===null?Be=ht:qe.sibling=ht,qe=ht,Ye=rn}if(Xe===J.length)return c(G,Ye),It&&Ss(G,Xe),Be;if(Ye===null){for(;Xe<J.length;Xe++)Ye=Te(G,J[Xe],_e),Ye!==null&&(q=b(Ye,q,Xe),qe===null?Be=Ye:qe.sibling=Ye,qe=Ye);return It&&Ss(G,Xe),Be}for(Ye=h(G,Ye);Xe<J.length;Xe++)rn=Oe(Ye,G,Xe,J[Xe],_e),rn!==null&&(i&&rn.alternate!==null&&Ye.delete(rn.key===null?Xe:rn.key),q=b(rn,q,Xe),qe===null?Be=rn:qe.sibling=rn,qe=rn);return i&&Ye.forEach(function(zi){return o(G,zi)}),It&&Ss(G,Xe),Be}function Me(G,q,J,_e){var Be=le(J);if(typeof Be!="function")throw Error(n(150));if(J=Be.call(J),J==null)throw Error(n(151));for(var qe=Be=null,Ye=q,Xe=q=0,rn=null,ht=J.next();Ye!==null&&!ht.done;Xe++,ht=J.next()){Ye.index>Xe?(rn=Ye,Ye=null):rn=Ye.sibling;var zi=me(G,Ye,ht.value,_e);if(zi===null){Ye===null&&(Ye=rn);break}i&&Ye&&zi.alternate===null&&o(G,Ye),q=b(zi,q,Xe),qe===null?Be=zi:qe.sibling=zi,qe=zi,Ye=rn}if(ht.done)return c(G,Ye),It&&Ss(G,Xe),Be;if(Ye===null){for(;!ht.done;Xe++,ht=J.next())ht=Te(G,ht.value,_e),ht!==null&&(q=b(ht,q,Xe),qe===null?Be=ht:qe.sibling=ht,qe=ht);return It&&Ss(G,Xe),Be}for(Ye=h(G,Ye);!ht.done;Xe++,ht=J.next())ht=Oe(Ye,G,Xe,ht.value,_e),ht!==null&&(i&&ht.alternate!==null&&Ye.delete(ht.key===null?Xe:ht.key),q=b(ht,q,Xe),qe===null?Be=ht:qe.sibling=ht,qe=ht);return i&&Ye.forEach(function(UU){return o(G,UU)}),It&&Ss(G,Xe),Be}function zt(G,q,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 V:e:{for(var Be=J.key,qe=q;qe!==null;){if(qe.key===Be){if(Be=J.type,Be===W){if(qe.tag===7){c(G,qe.sibling),q=E(qe,J.props.children),q.return=G,G=q;break e}}else if(qe.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===ve&&Sx(Be)===qe.type){c(G,qe.sibling),q=E(qe,J.props),q.ref=gu(G,qe,J),q.return=G,G=q;break e}c(G,qe);break}else o(G,qe);qe=qe.sibling}J.type===W?(q=Ps(J.props.children,G.mode,_e,J.key),q.return=G,G=q):(_e=gd(J.type,J.key,J.props,null,G.mode,_e),_e.ref=gu(G,q,J),_e.return=G,G=_e)}return v(G);case D:e:{for(qe=J.key;q!==null;){if(q.key===qe)if(q.tag===4&&q.stateNode.containerInfo===J.containerInfo&&q.stateNode.implementation===J.implementation){c(G,q.sibling),q=E(q,J.children||[]),q.return=G,G=q;break e}else{c(G,q);break}else o(G,q);q=q.sibling}q=E0(J,G.mode,_e),q.return=G,G=q}return v(G);case ve:return qe=J._init,zt(G,q,qe(J._payload),_e)}if(Qe(J))return Le(G,q,J,_e);if(le(J))return Me(G,q,J,_e);Yc(G,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,q!==null&&q.tag===6?(c(G,q.sibling),q=E(q,J),q.return=G,G=q):(c(G,q),q=g0(J,G.mode,_e),q.return=G,G=q),v(G)):c(G,q)}return zt}var Ho=vx(!0),Ax=vx(!1),Wc=Ii(null),Gc=null,jo=null,Am=null;function Cm(){Am=jo=Gc=null}function Nm(i){var o=Wc.current;Nt(Wc),i._currentValue=o}function km(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 zo(i,o){Gc=i,Am=jo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Fn=!0),i.firstContext=null)}function ir(i){var o=i._currentValue;if(Am!==i)if(i={context:i,memoizedValue:o,next:null},jo===null){if(Gc===null)throw Error(n(308));jo=i,Gc.dependencies={lanes:0,firstContext:i}}else jo=jo.next=i;return o}var vs=null;function Om(i){vs===null?vs=[i]:vs.push(i)}function Cx(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,oi(i,h)}function oi(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 Li=!1;function Im(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nx(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 ai(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Di(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(ct&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,oi(i,c)}return E=h.interleaved,E===null?(o.next=o,Om(h)):(o.next=E.next,E.next=o),h.interleaved=o,oi(i,c)}function Xc(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,qp(i,c)}}function kx(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 v={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=v:b=b.next=v,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 Kc(i,o,c,h){var E=i.updateQueue;Li=!1;var b=E.firstBaseUpdate,v=E.lastBaseUpdate,B=E.shared.pending;if(B!==null){E.shared.pending=null;var $=B,ne=$.next;$.next=null,v===null?b=ne:v.next=ne,v=$;var Ee=i.alternate;Ee!==null&&(Ee=Ee.updateQueue,B=Ee.lastBaseUpdate,B!==v&&(B===null?Ee.firstBaseUpdate=ne:B.next=ne,Ee.lastBaseUpdate=$))}if(b!==null){var Te=E.baseState;v=0,Ee=ne=$=null,B=b;do{var me=B.lane,Oe=B.eventTime;if((h&me)===me){Ee!==null&&(Ee=Ee.next={eventTime:Oe,lane:0,tag:B.tag,payload:B.payload,callback:B.callback,next:null});e:{var Le=i,Me=B;switch(me=o,Oe=c,Me.tag){case 1:if(Le=Me.payload,typeof Le=="function"){Te=Le.call(Oe,Te,me);break e}Te=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=Me.payload,me=typeof Le=="function"?Le.call(Oe,Te,me):Le,me==null)break e;Te=C({},Te,me);break e;case 2:Li=!0}}B.callback!==null&&B.lane!==0&&(i.flags|=64,me=E.effects,me===null?E.effects=[B]:me.push(B))}else Oe={eventTime:Oe,lane:me,tag:B.tag,payload:B.payload,callback:B.callback,next:null},Ee===null?(ne=Ee=Oe,$=Te):Ee=Ee.next=Oe,v|=me;if(B=B.next,B===null){if(B=E.shared.pending,B===null)break;me=B,B=me.next,me.next=null,E.lastBaseUpdate=me,E.shared.pending=null}}while(!0);if(Ee===null&&($=Te),E.baseState=$,E.firstBaseUpdate=ne,E.lastBaseUpdate=Ee,o=E.shared.interleaved,o!==null){E=o;do v|=E.lane,E=E.next;while(E!==o)}else b===null&&(E.shared.lanes=0);Ns|=v,i.lanes=v,i.memoizedState=Te}}function Ox(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 Eu={},zr=Ii(Eu),yu=Ii(Eu),Tu=Ii(Eu);function As(i){if(i===Eu)throw Error(n(174));return i}function Pm(i,o){switch(xt(Tu,o),xt(yu,i),xt(zr,Eu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:xe(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=xe(o,i)}Nt(zr),xt(zr,o)}function $o(){Nt(zr),Nt(yu),Nt(Tu)}function Ix(i){As(Tu.current);var o=As(zr.current),c=xe(o,i.type);o!==c&&(xt(yu,i),xt(zr,c))}function Rm(i){yu.current===i&&(Nt(zr),Nt(yu))}var Rt=Ii(0);function Qc(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 Lm=[];function Dm(){for(var i=0;i<Lm.length;i++)Lm[i]._workInProgressVersionPrimary=null;Lm.length=0}var Jc=j.ReactCurrentDispatcher,Mm=j.ReactCurrentBatchConfig,Cs=0,Lt=null,Xt=null,tn=null,Zc=!1,bu=!1,wu=0,aU=0;function Tn(){throw Error(n(321))}function Fm(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!br(i[c],o[c]))return!1;return!0}function Bm(i,o,c,h,E,b){if(Cs=b,Lt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Jc.current=i===null||i.memoizedState===null?dU:fU,i=c(h,E),bu){b=0;do{if(bu=!1,wu=0,25<=b)throw Error(n(301));b+=1,tn=Xt=null,o.updateQueue=null,Jc.current=hU,i=c(h,E)}while(bu)}if(Jc.current=nd,o=Xt!==null&&Xt.next!==null,Cs=0,tn=Xt=Lt=null,Zc=!1,o)throw Error(n(300));return i}function Um(){var i=wu!==0;return wu=0,i}function $r(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tn===null?Lt.memoizedState=tn=i:tn=tn.next=i,tn}function sr(){if(Xt===null){var i=Lt.alternate;i=i!==null?i.memoizedState:null}else i=Xt.next;var o=tn===null?Lt.memoizedState:tn.next;if(o!==null)tn=o,Xt=i;else{if(i===null)throw Error(n(310));Xt=i,i={memoizedState:Xt.memoizedState,baseState:Xt.baseState,baseQueue:Xt.baseQueue,queue:Xt.queue,next:null},tn===null?Lt.memoizedState=tn=i:tn=tn.next=i}return tn}function _u(i,o){return typeof o=="function"?o(i):o}function Hm(i){var o=sr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Xt,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var v=E.next;E.next=b.next,b.next=v}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var B=v=null,$=null,ne=b;do{var Ee=ne.lane;if((Cs&Ee)===Ee)$!==null&&($=$.next={lane:0,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),h=ne.hasEagerState?ne.eagerState:i(h,ne.action);else{var Te={lane:Ee,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null};$===null?(B=$=Te,v=h):$=$.next=Te,Lt.lanes|=Ee,Ns|=Ee}ne=ne.next}while(ne!==null&&ne!==b);$===null?v=h:$.next=B,br(h,o.memoizedState)||(Fn=!0),o.memoizedState=h,o.baseState=v,o.baseQueue=$,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,Lt.lanes|=b,Ns|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function jm(i){var o=sr(),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 v=E=E.next;do b=i(b,v.action),v=v.next;while(v!==E);br(b,o.memoizedState)||(Fn=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),c.lastRenderedState=b}return[b,h]}function Px(){}function Rx(i,o){var c=Lt,h=sr(),E=o(),b=!br(h.memoizedState,E);if(b&&(h.memoizedState=E,Fn=!0),h=h.queue,zm(Mx.bind(null,c,h,i),[i]),h.getSnapshot!==o||b||tn!==null&&tn.memoizedState.tag&1){if(c.flags|=2048,xu(9,Dx.bind(null,c,h,E,o),void 0,null),nn===null)throw Error(n(349));(Cs&30)!==0||Lx(c,o,E)}return E}function Lx(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Lt.updateQueue,o===null?(o={lastEffect:null,stores:null},Lt.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function Dx(i,o,c,h){o.value=c,o.getSnapshot=h,Fx(o)&&Bx(i)}function Mx(i,o,c){return c(function(){Fx(o)&&Bx(i)})}function Fx(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!br(i,c)}catch(h){return!0}}function Bx(i){var o=oi(i,1);o!==null&&vr(o,i,1,-1)}function Ux(i){var o=$r();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_u,lastRenderedState:i},o.queue=i,i=i.dispatch=cU.bind(null,Lt,i),[o.memoizedState,i]}function xu(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=Lt.updateQueue,o===null?(o={lastEffect:null,stores:null},Lt.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 Hx(){return sr().memoizedState}function ed(i,o,c,h){var E=$r();Lt.flags|=i,E.memoizedState=xu(1|o,c,void 0,h===void 0?null:h)}function td(i,o,c,h){var E=sr();h=h===void 0?null:h;var b=void 0;if(Xt!==null){var v=Xt.memoizedState;if(b=v.destroy,h!==null&&Fm(h,v.deps)){E.memoizedState=xu(o,c,b,h);return}}Lt.flags|=i,E.memoizedState=xu(1|o,c,b,h)}function jx(i,o){return ed(8390656,8,i,o)}function zm(i,o){return td(2048,8,i,o)}function zx(i,o){return td(4,2,i,o)}function $x(i,o){return td(4,4,i,o)}function Vx(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 qx(i,o,c){return c=c!=null?c.concat([i]):null,td(4,4,Vx.bind(null,o,i),c)}function $m(){}function Yx(i,o){var c=sr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&Fm(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function Wx(i,o){var c=sr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&Fm(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function Gx(i,o,c){return(Cs&21)===0?(i.baseState&&(i.baseState=!1,Fn=!0),i.memoizedState=c):(br(c,o)||(c=S_(),Lt.lanes|=c,Ns|=c,i.baseState=!0),o)}function uU(i,o){var c=gt;gt=c!==0&&4>c?c:4,i(!0);var h=Mm.transition;Mm.transition={};try{i(!1),o()}finally{gt=c,Mm.transition=h}}function Xx(){return sr().memoizedState}function lU(i,o,c){var h=Ui(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},Kx(i))Qx(o,c);else if(c=Cx(i,o,c,h),c!==null){var E=vn();vr(c,i,h,E),Jx(c,o,h)}}function cU(i,o,c){var h=Ui(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(Kx(i))Qx(o,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var v=o.lastRenderedState,B=b(v,c);if(E.hasEagerState=!0,E.eagerState=B,br(B,v)){var $=o.interleaved;$===null?(E.next=E,Om(o)):(E.next=$.next,$.next=E),o.interleaved=E;return}}catch(ne){}c=Cx(i,o,E,h),c!==null&&(E=vn(),vr(c,i,h,E),Jx(c,o,h))}}function Kx(i){var o=i.alternate;return i===Lt||o!==null&&o===Lt}function Qx(i,o){bu=Zc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function Jx(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,qp(i,c)}}var nd={readContext:ir,useCallback:Tn,useContext:Tn,useEffect:Tn,useImperativeHandle:Tn,useInsertionEffect:Tn,useLayoutEffect:Tn,useMemo:Tn,useReducer:Tn,useRef:Tn,useState:Tn,useDebugValue:Tn,useDeferredValue:Tn,useTransition:Tn,useMutableSource:Tn,useSyncExternalStore:Tn,useId:Tn,unstable_isNewReconciler:!1},dU={readContext:ir,useCallback:function(i,o){return $r().memoizedState=[i,o===void 0?null:o],i},useContext:ir,useEffect:jx,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,ed(4194308,4,Vx.bind(null,o,i),c)},useLayoutEffect:function(i,o){return ed(4194308,4,i,o)},useInsertionEffect:function(i,o){return ed(4,2,i,o)},useMemo:function(i,o){var c=$r();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=$r();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=lU.bind(null,Lt,i),[h.memoizedState,i]},useRef:function(i){var o=$r();return i={current:i},o.memoizedState=i},useState:Ux,useDebugValue:$m,useDeferredValue:function(i){return $r().memoizedState=i},useTransition:function(){var i=Ux(!1),o=i[0];return i=uU.bind(null,i[1]),$r().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=Lt,E=$r();if(It){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),nn===null)throw Error(n(349));(Cs&30)!==0||Lx(h,o,c)}E.memoizedState=c;var b={value:c,getSnapshot:o};return E.queue=b,jx(Mx.bind(null,h,b,i),[i]),h.flags|=2048,xu(9,Dx.bind(null,h,b,c,o),void 0,null),c},useId:function(){var i=$r(),o=nn.identifierPrefix;if(It){var c=si,h=ii;c=(h&~(1<<32-Tr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=wu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=aU++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},fU={readContext:ir,useCallback:Yx,useContext:ir,useEffect:zm,useImperativeHandle:qx,useInsertionEffect:zx,useLayoutEffect:$x,useMemo:Wx,useReducer:Hm,useRef:Hx,useState:function(){return Hm(_u)},useDebugValue:$m,useDeferredValue:function(i){var o=sr();return Gx(o,Xt.memoizedState,i)},useTransition:function(){var i=Hm(_u)[0],o=sr().memoizedState;return[i,o]},useMutableSource:Px,useSyncExternalStore:Rx,useId:Xx,unstable_isNewReconciler:!1},hU={readContext:ir,useCallback:Yx,useContext:ir,useEffect:zm,useImperativeHandle:qx,useInsertionEffect:zx,useLayoutEffect:$x,useMemo:Wx,useReducer:jm,useRef:Hx,useState:function(){return jm(_u)},useDebugValue:$m,useDeferredValue:function(i){var o=sr();return Xt===null?o.memoizedState=i:Gx(o,Xt.memoizedState,i)},useTransition:function(){var i=jm(_u)[0],o=sr().memoizedState;return[i,o]},useMutableSource:Px,useSyncExternalStore:Rx,useId:Xx,unstable_isNewReconciler:!1};function _r(i,o){if(i&&i.defaultProps){o=C({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function Vm(i,o,c,h){o=i.memoizedState,c=c(h,o),c=c==null?o:C({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var rd={isMounted:function(i){return(i=i._reactInternals)?bs(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=vn(),E=Ui(i),b=ai(h,E);b.payload=o,c!=null&&(b.callback=c),o=Di(i,b,E),o!==null&&(vr(o,i,E,h),Xc(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=vn(),E=Ui(i),b=ai(h,E);b.tag=1,b.payload=o,c!=null&&(b.callback=c),o=Di(i,b,E),o!==null&&(vr(o,i,E,h),Xc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=vn(),h=Ui(i),E=ai(c,h);E.tag=2,o!=null&&(E.callback=o),o=Di(i,E,h),o!==null&&(vr(o,i,h,c),Xc(o,i,h))}};function Zx(i,o,c,h,E,b,v){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,v):o.prototype&&o.prototype.isPureReactComponent?!lu(c,h)||!lu(E,b):!0}function eS(i,o,c){var h=!1,E=Pi,b=o.contextType;return typeof b=="object"&&b!==null?b=ir(b):(E=Mn(o)?_s:yn.current,h=o.contextTypes,b=(h=h!=null)?Mo(i,E):Pi),o=new o(c,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=rd,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function tS(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&&rd.enqueueReplaceState(o,o.state,null)}function qm(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},Im(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=ir(b):(b=Mn(o)?_s:yn.current,E.context=Mo(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(Vm(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&&rd.enqueueReplaceState(E,E.state,null),Kc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Vo(i,o){try{var c="",h=o;do c+=Re(h),h=h.return;while(h);var E=c}catch(b){E=`
|
|
22
22
|
Error generating stack: `+b.message+`
|
|
23
|
-
`+b.stack}return{value:i,source:o,stack:E,digest:null}}function Ym(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 fU=typeof WeakMap=="function"?WeakMap:Map;function nS(i,o,c){c=ai(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){cd||(cd=!0,u0=h),Wm(i,o)},c}function rS(i,o,c){c=ai(-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"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var v=o.stack;this.componentDidCatch(o.value,{componentStack:v!==null?v:""})}),c}function iS(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new fU;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=AU.bind(null,i,o,c),o.then(i,i))}function sS(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 oS(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=ai(-1,1),o.tag=2,Di(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var hU=j.ReactCurrentOwner,Fn=!1;function Sn(i,o,c,h){o.child=i===null?Ax(o,null,c,h):Ho(o,i.child,c,h)}function aS(i,o,c,h,E){c=c.render;var b=o.ref;return zo(o,E),h=Bm(i,o,c,h,b,E),c=Um(),i!==null&&!Fn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ui(i,o,E)):(It&&c&&wm(o),o.flags|=1,Sn(i,o,h,E),o.child)}function uS(i,o,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!m0(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=b,lS(i,o,b,h,E)):(i=gd(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 v=b.memoizedProps;if(c=c.compare,c=c!==null?c:lu,c(v,h)&&i.ref===o.ref)return ui(i,o,E)}return o.flags|=1,i=ji(b,h),i.ref=o.ref,i.return=o,o.child=i}function lS(i,o,c,h,E){if(i!==null){var b=i.memoizedProps;if(lu(b,h)&&i.ref===o.ref)if(Fn=!1,o.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Fn=!0);else return o.lanes=i.lanes,ui(i,o,E)}return Gm(i,o,c,h,E)}function cS(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},xt(Yo,Kn),Kn|=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,xt(Yo,Kn),Kn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,xt(Yo,Kn),Kn|=h}else b!==null?(h=b.baseLanes|c,o.memoizedState=null):h=c,xt(Yo,Kn),Kn|=h;return Sn(i,o,E,c),o.child}function dS(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function Gm(i,o,c,h,E){var b=Mn(c)?_s:yn.current;return b=Mo(o,b),zo(o,E),c=Bm(i,o,c,h,b,E),h=Um(),i!==null&&!Fn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ui(i,o,E)):(It&&h&&wm(o),o.flags|=1,Sn(i,o,c,E),o.child)}function fS(i,o,c,h,E){if(Mn(c)){var b=!0;jc(o)}else b=!1;if(zo(o,E),o.stateNode===null)sd(i,o),eS(o,c,h),qm(o,c,h,E),h=!0;else if(i===null){var v=o.stateNode,B=o.memoizedProps;v.props=B;var $=v.context,ne=c.contextType;typeof ne=="object"&&ne!==null?ne=ir(ne):(ne=Mn(c)?_s:yn.current,ne=Mo(o,ne));var Ee=c.getDerivedStateFromProps,Te=typeof Ee=="function"||typeof v.getSnapshotBeforeUpdate=="function";Te||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(B!==h||$!==ne)&&tS(o,v,h,ne),Li=!1;var me=o.memoizedState;v.state=me,Kc(o,h,v,E),$=o.memoizedState,B!==h||me!==$||Dn.current||Li?(typeof Ee=="function"&&(Vm(o,c,Ee,h),$=o.memoizedState),(B=Li||Zx(o,c,B,h,me,$,ne))?(Te||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=$),v.props=h,v.state=$,v.context=ne,h=B):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{v=o.stateNode,Nx(i,o),B=o.memoizedProps,ne=o.type===o.elementType?B:_r(o.type,B),v.props=ne,Te=o.pendingProps,me=v.context,$=c.contextType,typeof $=="object"&&$!==null?$=ir($):($=Mn(c)?_s:yn.current,$=Mo(o,$));var Oe=c.getDerivedStateFromProps;(Ee=typeof Oe=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(B!==Te||me!==$)&&tS(o,v,h,$),Li=!1,me=o.memoizedState,v.state=me,Kc(o,h,v,E);var Le=o.memoizedState;B!==Te||me!==Le||Dn.current||Li?(typeof Oe=="function"&&(Vm(o,c,Oe,h),Le=o.memoizedState),(ne=Li||Zx(o,c,ne,h,me,Le,$)||!1)?(Ee||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(h,Le,$),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(h,Le,$)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||B===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Le),v.props=h,v.state=Le,v.context=$,h=ne):(typeof v.componentDidUpdate!="function"||B===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),h=!1)}return Xm(i,o,c,h,b,E)}function Xm(i,o,c,h,E,b){dS(i,o);var v=(o.flags&128)!==0;if(!h&&!v)return E&&Ex(o,c,!1),ui(i,o,b);h=o.stateNode,hU.current=o;var B=v&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&v?(o.child=Ho(o,i.child,null,b),o.child=Ho(o,null,B,b)):Sn(i,o,B,b),o.memoizedState=h.state,E&&Ex(o,c,!0),o.child}function hS(i){var o=i.stateNode;o.pendingContext?mx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&mx(i,o.context,!1),Pm(i,o.containerInfo)}function pS(i,o,c,h,E){return Uo(),vm(E),o.flags|=256,Sn(i,o,c,h),o.child}var Km={dehydrated:null,treeContext:null,retryLane:0};function Qm(i){return{baseLanes:i,cachePool:null,transitions:null}}function mS(i,o,c){var h=o.pendingProps,E=Rt.current,b=!1,v=(o.flags&128)!==0,B;if((B=v)||(B=i!==null&&i.memoizedState===null?!1:(E&2)!==0),B?(b=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),xt(Rt,E&1),i===null)return Sm(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):(v=h.children,i=h.fallback,b?(h=o.mode,b=o.child,v={mode:"hidden",children:v},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=v):b=Ed(v,h,0,null),i=Ps(i,h,c,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=Qm(c),o.memoizedState=Km,i):Jm(o,v));if(E=i.memoizedState,E!==null&&(B=E.dehydrated,B!==null))return pU(i,o,v,h,B,E,c);if(b){b=h.fallback,v=o.mode,E=i.child,B=E.sibling;var $={mode:"hidden",children:h.children};return(v&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=$,o.deletions=null):(h=ji(E,$),h.subtreeFlags=E.subtreeFlags&14680064),B!==null?b=ji(B,b):(b=Ps(b,v,c,null),b.flags|=2),b.return=o,h.return=o,h.sibling=b,o.child=h,h=b,b=o.child,v=i.child.memoizedState,v=v===null?Qm(c):{baseLanes:v.baseLanes|c,cachePool:null,transitions:v.transitions},b.memoizedState=v,b.childLanes=i.childLanes&~c,o.memoizedState=Km,h}return b=i.child,i=b.sibling,h=ji(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 Jm(i,o){return o=Ed({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function id(i,o,c,h){return h!==null&&vm(h),Ho(o,i.child,null,c),i=Jm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function pU(i,o,c,h,E,b,v){if(c)return o.flags&256?(o.flags&=-257,h=Ym(Error(n(422))),id(i,o,v,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=Ps(b,E,v,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&Ho(o,i.child,null,v),o.child.memoizedState=Qm(v),o.memoizedState=Km,b);if((o.mode&1)===0)return id(i,o,v,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var B=h.dgst;return h=B,b=Error(n(419)),h=Ym(b,h,void 0),id(i,o,v,h)}if(B=(v&i.childLanes)!==0,Fn||B){if(h=nn,h!==null){switch(v&-v){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|v))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,oi(i,E),vr(h,i,E,-1))}return p0(),h=Ym(Error(n(421))),id(i,o,v,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=CU.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Xn=Oi(E.nextSibling),Gn=o,It=!0,wr=null,i!==null&&(nr[rr++]=ii,nr[rr++]=si,nr[rr++]=xs,ii=i.id,si=i.overflow,xs=o),o=Jm(o,h.children),o.flags|=4096,o)}function gS(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),km(i.return,o,c)}function Zm(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 ES(i,o,c){var h=o.pendingProps,E=h.revealOrder,b=h.tail;if(Sn(i,o,h.children,c),h=Rt.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&&gS(i,c,o);else if(i.tag===19)gS(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(xt(Rt,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&&Qc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),Zm(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&&Qc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Zm(o,!0,c,null,b);break;case"together":Zm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function sd(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function ui(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),Ns|=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=ji(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=ji(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function mU(i,o,c){switch(o.tag){case 3:hS(o),Uo();break;case 5:Ix(o);break;case 1:Mn(o.type)&&jc(o);break;case 4:Pm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;xt(Wc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(xt(Rt,Rt.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?mS(i,o,c):(xt(Rt,Rt.current&1),i=ui(i,o,c),i!==null?i.sibling:null);xt(Rt,Rt.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return ES(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),xt(Rt,Rt.current),h)break;return null;case 22:case 23:return o.lanes=0,cS(i,o,c)}return ui(i,o,c)}var yS,e0,TS,bS;yS=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}},e0=function(){},TS=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,As(zr.current);var b=null;switch(c){case"input":E=En(i,E),h=En(i,h),b=[];break;case"select":E=C({},E,{value:void 0}),h=C({},h,{value:void 0}),b=[];break;case"textarea":E=ut(i,E),h=ut(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Bc)}be(c,h);var v;c=null;for(ne in E)if(!h.hasOwnProperty(ne)&&E.hasOwnProperty(ne)&&E[ne]!=null)if(ne==="style"){var B=E[ne];for(v in B)B.hasOwnProperty(v)&&(c||(c={}),c[v]="")}else ne!=="dangerouslySetInnerHTML"&&ne!=="children"&&ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&ne!=="autoFocus"&&(s.hasOwnProperty(ne)?b||(b=[]):(b=b||[]).push(ne,null));for(ne in h){var $=h[ne];if(B=E!=null?E[ne]:void 0,h.hasOwnProperty(ne)&&$!==B&&($!=null||B!=null))if(ne==="style")if(B){for(v in B)!B.hasOwnProperty(v)||$&&$.hasOwnProperty(v)||(c||(c={}),c[v]="");for(v in $)$.hasOwnProperty(v)&&B[v]!==$[v]&&(c||(c={}),c[v]=$[v])}else c||(b||(b=[]),b.push(ne,c)),c=$;else ne==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,B=B?B.__html:void 0,$!=null&&B!==$&&(b=b||[]).push(ne,$)):ne==="children"?typeof $!="string"&&typeof $!="number"||(b=b||[]).push(ne,""+$):ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&(s.hasOwnProperty(ne)?($!=null&&ne==="onScroll"&&Ct("scroll",i),b||B===$||(b=[])):(b=b||[]).push(ne,$))}c&&(b=b||[]).push("style",c);var ne=b;(o.updateQueue=ne)&&(o.flags|=4)}},bS=function(i,o,c,h){c!==h&&(o.flags|=4)};function Su(i,o){if(!It)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 bn(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 gU(i,o,c){var h=o.pendingProps;switch(_m(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bn(o),null;case 1:return Mn(o.type)&&Hc(),bn(o),null;case 3:return h=o.stateNode,$o(),Nt(Dn),Nt(yn),Dm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(qc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,wr!==null&&(d0(wr),wr=null))),e0(i,o),bn(o),null;case 5:Rm(o);var E=As(Tu.current);if(c=o.type,i!==null&&o.stateNode!=null)TS(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 bn(o),null}if(i=As(zr.current),qc(o)){h=o.stateNode,c=o.type;var b=o.memoizedProps;switch(h[jr]=o,h[pu]=b,i=(o.mode&1)!==0,c){case"dialog":Ct("cancel",h),Ct("close",h);break;case"iframe":case"object":case"embed":Ct("load",h);break;case"video":case"audio":for(E=0;E<du.length;E++)Ct(du[E],h);break;case"source":Ct("error",h);break;case"img":case"image":case"link":Ct("error",h),Ct("load",h);break;case"details":Ct("toggle",h);break;case"input":Ht(h,b),Ct("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},Ct("invalid",h);break;case"textarea":tr(h,b),Ct("invalid",h)}be(c,b),E=null;for(var v in b)if(b.hasOwnProperty(v)){var B=b[v];v==="children"?typeof B=="string"?h.textContent!==B&&(b.suppressHydrationWarning!==!0&&Fc(h.textContent,B,i),E=["children",B]):typeof B=="number"&&h.textContent!==""+B&&(b.suppressHydrationWarning!==!0&&Fc(h.textContent,B,i),E=["children",""+B]):s.hasOwnProperty(v)&&B!=null&&v==="onScroll"&&Ct("scroll",h)}switch(c){case"input":pt(h),Gt(h,b,!0);break;case"textarea":pt(h),Ts(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=Bc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{v=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ce(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=v.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=v.createElement(c,{is:h.is}):(i=v.createElement(c),c==="select"&&(v=i,h.multiple?v.multiple=!0:h.size&&(v.size=h.size))):i=v.createElementNS(i,c),i[jr]=o,i[pu]=h,yS(i,o,!1,!1),o.stateNode=i;e:{switch(v=pe(c,h),c){case"dialog":Ct("cancel",i),Ct("close",i),E=h;break;case"iframe":case"object":case"embed":Ct("load",i),E=h;break;case"video":case"audio":for(E=0;E<du.length;E++)Ct(du[E],i);E=h;break;case"source":Ct("error",i),E=h;break;case"img":case"image":case"link":Ct("error",i),Ct("load",i),E=h;break;case"details":Ct("toggle",i),E=h;break;case"input":Ht(i,h),E=En(i,h),Ct("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=C({},h,{value:void 0}),Ct("invalid",i);break;case"textarea":tr(i,h),E=ut(i,h),Ct("invalid",i);break;default:E=h}be(c,E),B=E;for(b in B)if(B.hasOwnProperty(b)){var $=B[b];b==="style"?Ae(i,$):b==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&Ze(i,$)):b==="children"?typeof $=="string"?(c!=="textarea"||$!=="")&&nt(i,$):typeof $=="number"&&nt(i,""+$):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?$!=null&&b==="onScroll"&&Ct("scroll",i):$!=null&&O(i,b,$,v))}switch(c){case"input":pt(i),Gt(i,h,!1);break;case"textarea":pt(i),Ts(i);break;case"option":h.value!=null&&i.setAttribute("value",""+$e(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?ot(i,!!h.multiple,b,!1):h.defaultValue!=null&&ot(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Bc)}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 bn(o),null;case 6:if(i&&o.stateNode!=null)bS(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=As(Tu.current),As(zr.current),qc(o)){if(h=o.stateNode,c=o.memoizedProps,h[jr]=o,(b=h.nodeValue!==c)&&(i=Gn,i!==null))switch(i.tag){case 3:Fc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Fc(h.nodeValue,c,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[jr]=o,o.stateNode=h}return bn(o),null;case 13:if(Nt(Rt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(It&&Xn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)xx(),Uo(),o.flags|=98560,b=!1;else if(b=qc(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[jr]=o}else Uo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;bn(o),b=!1}else wr!==null&&(d0(wr),wr=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||(Rt.current&1)!==0?Kt===0&&(Kt=3):p0())),o.updateQueue!==null&&(o.flags|=4),bn(o),null);case 4:return $o(),e0(i,o),i===null&&fu(o.stateNode.containerInfo),bn(o),null;case 10:return Nm(o.type._context),bn(o),null;case 17:return Mn(o.type)&&Hc(),bn(o),null;case 19:if(Nt(Rt),b=o.memoizedState,b===null)return bn(o),null;if(h=(o.flags&128)!==0,v=b.rendering,v===null)if(h)Su(b,!1);else{if(Kt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(v=Qc(i),v!==null){for(o.flags|=128,Su(b,!1),h=v.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,v=b.alternate,v===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=v.childLanes,b.lanes=v.lanes,b.child=v.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=v.memoizedProps,b.memoizedState=v.memoizedState,b.updateQueue=v.updateQueue,b.type=v.type,i=v.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return xt(Rt,Rt.current&1|2),o.child}i=i.sibling}b.tail!==null&&jt()>Wo&&(o.flags|=128,h=!0,Su(b,!1),o.lanes=4194304)}else{if(!h)if(i=Qc(v),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),Su(b,!0),b.tail===null&&b.tailMode==="hidden"&&!v.alternate&&!It)return bn(o),null}else 2*jt()-b.renderingStartTime>Wo&&c!==1073741824&&(o.flags|=128,h=!0,Su(b,!1),o.lanes=4194304);b.isBackwards?(v.sibling=o.child,o.child=v):(c=b.last,c!==null?c.sibling=v:o.child=v,b.last=v)}return b.tail!==null?(o=b.tail,b.rendering=o,b.tail=o.sibling,b.renderingStartTime=jt(),o.sibling=null,c=Rt.current,xt(Rt,h?c&1|2:c&1),o):(bn(o),null);case 22:case 23:return h0(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Kn&1073741824)!==0&&(bn(o),o.subtreeFlags&6&&(o.flags|=8192)):bn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function EU(i,o){switch(_m(o),o.tag){case 1:return Mn(o.type)&&Hc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return $o(),Nt(Dn),Nt(yn),Dm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Rm(o),null;case 13:if(Nt(Rt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Uo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return Nt(Rt),null;case 4:return $o(),null;case 10:return Nm(o.type._context),null;case 22:case 23:return h0(),null;case 24:return null;default:return null}}var od=!1,wn=!1,yU=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function qo(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Ft(i,o,h)}else c.current=null}function t0(i,o,c){try{c()}catch(h){Ft(i,o,h)}}var wS=!1;function TU(i,o){if(hm=Ac,i=Z_(),sm(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(_e){c=null;break e}var v=0,B=-1,$=-1,ne=0,Ee=0,Te=i,me=null;t:for(;;){for(var Oe;Te!==c||E!==0&&Te.nodeType!==3||(B=v+E),Te!==b||h!==0&&Te.nodeType!==3||($=v+h),Te.nodeType===3&&(v+=Te.nodeValue.length),(Oe=Te.firstChild)!==null;)me=Te,Te=Oe;for(;;){if(Te===i)break t;if(me===c&&++ne===E&&(B=v),me===b&&++Ee===h&&($=v),(Oe=Te.nextSibling)!==null)break;Te=me,me=Te.parentNode}Te=Oe}c=B===-1||$===-1?null:{start:B,end:$}}else c=null}c=c||{start:0,end:0}}else c=null;for(pm={focusedElem:i,selectionRange:c},Ac=!1,Pe=o;Pe!==null;)if(o=Pe,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Pe=i;else for(;Pe!==null;){o=Pe;try{var Le=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Le!==null){var Me=Le.memoizedProps,zt=Le.memoizedState,G=o.stateNode,q=G.getSnapshotBeforeUpdate(o.elementType===o.type?Me:_r(o.type,Me),zt);G.__reactInternalSnapshotBeforeUpdate=q}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){Ft(o,o.return,_e)}if(i=o.sibling,i!==null){i.return=o.return,Pe=i;break}Pe=o.return}return Le=wS,wS=!1,Le}function vu(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&&t0(o,c,b)}E=E.next}while(E!==h)}}function ad(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 n0(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 _S(i){var o=i.alternate;o!==null&&(i.alternate=null,_S(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[jr],delete o[pu],delete o[ym],delete o[tU],delete o[nU])),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 xS(i){return i.tag===5||i.tag===3||i.tag===4}function SS(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||xS(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 r0(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=Bc));else if(h!==4&&(i=i.child,i!==null))for(r0(i,o,c),i=i.sibling;i!==null;)r0(i,o,c),i=i.sibling}function i0(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(i0(i,o,c),i=i.sibling;i!==null;)i0(i,o,c),i=i.sibling}var un=null,xr=!1;function Mi(i,o,c){for(c=c.child;c!==null;)vS(i,o,c),c=c.sibling}function vS(i,o,c){if(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(bc,c)}catch(B){}switch(c.tag){case 5:wn||qo(c,o);case 6:var h=un,E=xr;un=null,Mi(i,o,c),un=h,xr=E,un!==null&&(xr?(i=un,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):un.removeChild(c.stateNode));break;case 18:un!==null&&(xr?(i=un,c=c.stateNode,i.nodeType===8?Em(i.parentNode,c):i.nodeType===1&&Em(i,c),ru(i)):Em(un,c.stateNode));break;case 4:h=un,E=xr,un=c.stateNode.containerInfo,xr=!0,Mi(i,o,c),un=h,xr=E;break;case 0:case 11:case 14:case 15:if(!wn&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,v=b.destroy;b=b.tag,v!==void 0&&((b&2)!==0||(b&4)!==0)&&t0(c,o,v),E=E.next}while(E!==h)}Mi(i,o,c);break;case 1:if(!wn&&(qo(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(B){Ft(c,o,B)}Mi(i,o,c);break;case 21:Mi(i,o,c);break;case 22:c.mode&1?(wn=(h=wn)||c.memoizedState!==null,Mi(i,o,c),wn=h):Mi(i,o,c);break;default:Mi(i,o,c)}}function AS(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new yU),o.forEach(function(h){var E=NU.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function Sr(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,v=o,B=v;e:for(;B!==null;){switch(B.tag){case 5:un=B.stateNode,xr=!1;break e;case 3:un=B.stateNode.containerInfo,xr=!0;break e;case 4:un=B.stateNode.containerInfo,xr=!0;break e}B=B.return}if(un===null)throw Error(n(160));vS(b,v,E),un=null,xr=!1;var $=E.alternate;$!==null&&($.return=null),E.return=null}catch(ne){Ft(E,o,ne)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)CS(o,i),o=o.sibling}function CS(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Sr(o,i),Vr(i),h&4){try{vu(3,i,i.return),ad(3,i)}catch(Me){Ft(i,i.return,Me)}try{vu(5,i,i.return)}catch(Me){Ft(i,i.return,Me)}}break;case 1:Sr(o,i),Vr(i),h&512&&c!==null&&qo(c,c.return);break;case 5:if(Sr(o,i),Vr(i),h&512&&c!==null&&qo(c,c.return),i.flags&32){var E=i.stateNode;try{nt(E,"")}catch(Me){Ft(i,i.return,Me)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,v=c!==null?c.memoizedProps:b,B=i.type,$=i.updateQueue;if(i.updateQueue=null,$!==null)try{B==="input"&&b.type==="radio"&&b.name!=null&&je(E,b),pe(B,v);var ne=pe(B,b);for(v=0;v<$.length;v+=2){var Ee=$[v],Te=$[v+1];Ee==="style"?Ae(E,Te):Ee==="dangerouslySetInnerHTML"?Ze(E,Te):Ee==="children"?nt(E,Te):O(E,Ee,Te,ne)}switch(B){case"input":_t(E,b);break;case"textarea":ys(E,b);break;case"select":var me=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var Oe=b.value;Oe!=null?ot(E,!!b.multiple,Oe,!1):me!==!!b.multiple&&(b.defaultValue!=null?ot(E,!!b.multiple,b.defaultValue,!0):ot(E,!!b.multiple,b.multiple?[]:"",!1))}E[pu]=b}catch(Me){Ft(i,i.return,Me)}}break;case 6:if(Sr(o,i),Vr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Me){Ft(i,i.return,Me)}}break;case 3:if(Sr(o,i),Vr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{ru(o.containerInfo)}catch(Me){Ft(i,i.return,Me)}break;case 4:Sr(o,i),Vr(i);break;case 13:Sr(o,i),Vr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(a0=jt())),h&4&&AS(i);break;case 22:if(Ee=c!==null&&c.memoizedState!==null,i.mode&1?(wn=(ne=wn)||Ee,Sr(o,i),wn=ne):Sr(o,i),Vr(i),h&8192){if(ne=i.memoizedState!==null,(i.stateNode.isHidden=ne)&&!Ee&&(i.mode&1)!==0)for(Pe=i,Ee=i.child;Ee!==null;){for(Te=Pe=Ee;Pe!==null;){switch(me=Pe,Oe=me.child,me.tag){case 0:case 11:case 14:case 15:vu(4,me,me.return);break;case 1:qo(me,me.return);var Le=me.stateNode;if(typeof Le.componentWillUnmount=="function"){h=me,c=me.return;try{o=h,Le.props=o.memoizedProps,Le.state=o.memoizedState,Le.componentWillUnmount()}catch(Me){Ft(h,c,Me)}}break;case 5:qo(me,me.return);break;case 22:if(me.memoizedState!==null){OS(Te);continue}}Oe!==null?(Oe.return=me,Pe=Oe):OS(Te)}Ee=Ee.sibling}e:for(Ee=null,Te=i;;){if(Te.tag===5){if(Ee===null){Ee=Te;try{E=Te.stateNode,ne?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(B=Te.stateNode,$=Te.memoizedProps.style,v=$!=null&&$.hasOwnProperty("display")?$.display:null,B.style.display=se("display",v))}catch(Me){Ft(i,i.return,Me)}}}else if(Te.tag===6){if(Ee===null)try{Te.stateNode.nodeValue=ne?"":Te.memoizedProps}catch(Me){Ft(i,i.return,Me)}}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;Ee===Te&&(Ee=null),Te=Te.return}Ee===Te&&(Ee=null),Te.sibling.return=Te.return,Te=Te.sibling}}break;case 19:Sr(o,i),Vr(i),h&4&&AS(i);break;case 21:break;default:Sr(o,i),Vr(i)}}function Vr(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(xS(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=SS(i);i0(i,b,E);break;case 3:case 4:var v=h.stateNode.containerInfo,B=SS(i);r0(i,B,v);break;default:throw Error(n(161))}}catch($){Ft(i,i.return,$)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function bU(i,o,c){Pe=i,NS(i)}function NS(i,o,c){for(var h=(i.mode&1)!==0;Pe!==null;){var E=Pe,b=E.child;if(E.tag===22&&h){var v=E.memoizedState!==null||od;if(!v){var B=E.alternate,$=B!==null&&B.memoizedState!==null||wn;B=od;var ne=wn;if(od=v,(wn=$)&&!ne)for(Pe=E;Pe!==null;)v=Pe,$=v.child,v.tag===22&&v.memoizedState!==null?IS(E):$!==null?($.return=v,Pe=$):IS(E);for(;b!==null;)Pe=b,NS(b),b=b.sibling;Pe=E,od=B,wn=ne}kS(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Pe=b):kS(i)}}function kS(i){for(;Pe!==null;){var o=Pe;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:wn||ad(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!wn)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:_r(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&Ox(o,b,h);break;case 3:var v=o.updateQueue;if(v!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}Ox(o,v,c)}break;case 5:var B=o.stateNode;if(c===null&&o.flags&4){c=B;var $=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&c.focus();break;case"img":$.src&&(c.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var ne=o.alternate;if(ne!==null){var Ee=ne.memoizedState;if(Ee!==null){var Te=Ee.dehydrated;Te!==null&&ru(Te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}wn||o.flags&512&&n0(o)}catch(me){Ft(o,o.return,me)}}if(o===i){Pe=null;break}if(c=o.sibling,c!==null){c.return=o.return,Pe=c;break}Pe=o.return}}function OS(i){for(;Pe!==null;){var o=Pe;if(o===i){Pe=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Pe=c;break}Pe=o.return}}function IS(i){for(;Pe!==null;){var o=Pe;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{ad(4,o)}catch($){Ft(o,c,$)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch($){Ft(o,E,$)}}var b=o.return;try{n0(o)}catch($){Ft(o,b,$)}break;case 5:var v=o.return;try{n0(o)}catch($){Ft(o,v,$)}}}catch($){Ft(o,o.return,$)}if(o===i){Pe=null;break}var B=o.sibling;if(B!==null){B.return=o.return,Pe=B;break}Pe=o.return}}var wU=Math.ceil,ud=j.ReactCurrentDispatcher,s0=j.ReactCurrentOwner,or=j.ReactCurrentBatchConfig,ct=0,nn=null,qt=null,ln=0,Kn=0,Yo=Ii(0),Kt=0,Au=null,Ns=0,ld=0,o0=0,Cu=null,Bn=null,a0=0,Wo=1/0,li=null,cd=!1,u0=null,Fi=null,dd=!1,Bi=null,fd=0,Nu=0,l0=null,hd=-1,pd=0;function vn(){return(ct&6)!==0?jt():hd!==-1?hd:hd=jt()}function Ui(i){return(i.mode&1)===0?1:(ct&2)!==0&&ln!==0?ln&-ln:iU.transition!==null?(pd===0&&(pd=S_()),pd):(i=gt,i!==0||(i=window.event,i=i===void 0?16:R_(i.type)),i)}function vr(i,o,c,h){if(50<Nu)throw Nu=0,l0=null,Error(n(185));Ja(i,c,h),((ct&2)===0||i!==nn)&&(i===nn&&((ct&2)===0&&(ld|=c),Kt===4&&Hi(i,ln)),Un(i,h),c===1&&ct===0&&(o.mode&1)===0&&(Wo=jt()+500,zc&&Ri()))}function Un(i,o){var c=i.callbackNode;i7(i,o);var h=xc(i,i===nn?ln:0);if(h===0)c!==null&&w_(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&w_(c),o===1)i.tag===0?rU(RS.bind(null,i)):yx(RS.bind(null,i)),Z7(function(){(ct&6)===0&&Ri()}),c=null;else{switch(v_(h)){case 1:c=zp;break;case 4:c=__;break;case 16:c=Tc;break;case 536870912:c=x_;break;default:c=Tc}c=jS(c,PS.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function PS(i,o){if(hd=-1,pd=0,(ct&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Go()&&i.callbackNode!==c)return null;var h=xc(i,i===nn?ln:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=md(i,h);else{o=h;var E=ct;ct|=2;var b=DS();(nn!==i||ln!==o)&&(li=null,Wo=jt()+500,Os(i,o));do try{SU();break}catch(B){LS(i,B)}while(!0);Cm(),ud.current=b,ct=E,qt!==null?o=0:(nn=null,ln=0,o=Kt)}if(o!==0){if(o===2&&(E=$p(i),E!==0&&(h=E,o=c0(i,E))),o===1)throw c=Au,Os(i,0),Hi(i,h),Un(i,jt()),c;if(o===6)Hi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!_U(E)&&(o=md(i,h),o===2&&(b=$p(i),b!==0&&(h=b,o=c0(i,b))),o===1))throw c=Au,Os(i,0),Hi(i,h),Un(i,jt()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Is(i,Bn,li);break;case 3:if(Hi(i,h),(h&130023424)===h&&(o=a0+500-jt(),10<o)){if(xc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){vn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=gm(Is.bind(null,i,Bn,li),o);break}Is(i,Bn,li);break;case 4:if(Hi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var v=31-Tr(h);b=1<<v,v=o[v],v>E&&(E=v),h&=~b}if(h=E,h=jt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*wU(h/1960))-h,10<h){i.timeoutHandle=gm(Is.bind(null,i,Bn,li),h);break}Is(i,Bn,li);break;case 5:Is(i,Bn,li);break;default:throw Error(n(329))}}}return Un(i,jt()),i.callbackNode===c?PS.bind(null,i):null}function c0(i,o){var c=Cu;return i.current.memoizedState.isDehydrated&&(Os(i,o).flags|=256),i=md(i,o),i!==2&&(o=Bn,Bn=c,o!==null&&d0(o)),i}function d0(i){Bn===null?Bn=i:Bn.push.apply(Bn,i)}function _U(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(!br(b(),E))return!1}catch(v){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 Hi(i,o){for(o&=~o0,o&=~ld,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-Tr(o),h=1<<c;i[c]=-1,o&=~h}}function RS(i){if((ct&6)!==0)throw Error(n(327));Go();var o=xc(i,0);if((o&1)===0)return Un(i,jt()),null;var c=md(i,o);if(i.tag!==0&&c===2){var h=$p(i);h!==0&&(o=h,c=c0(i,h))}if(c===1)throw c=Au,Os(i,0),Hi(i,o),Un(i,jt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Is(i,Bn,li),Un(i,jt()),null}function f0(i,o){var c=ct;ct|=1;try{return i(o)}finally{ct=c,ct===0&&(Wo=jt()+500,zc&&Ri())}}function ks(i){Bi!==null&&Bi.tag===0&&(ct&6)===0&&Go();var o=ct;ct|=1;var c=or.transition,h=gt;try{if(or.transition=null,gt=1,i)return i()}finally{gt=h,or.transition=c,ct=o,(ct&6)===0&&Ri()}}function h0(){Kn=Yo.current,Nt(Yo)}function Os(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,J7(c)),qt!==null)for(c=qt.return;c!==null;){var h=c;switch(_m(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Hc();break;case 3:$o(),Nt(Dn),Nt(yn),Dm();break;case 5:Rm(h);break;case 4:$o();break;case 13:Nt(Rt);break;case 19:Nt(Rt);break;case 10:Nm(h.type._context);break;case 22:case 23:h0()}c=c.return}if(nn=i,qt=i=ji(i.current,null),ln=Kn=o,Kt=0,Au=null,o0=ld=Ns=0,Bn=Cu=null,vs!==null){for(o=0;o<vs.length;o++)if(c=vs[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var v=b.next;b.next=E,h.next=v}c.pending=h}vs=null}return i}function LS(i,o){do{var c=qt;try{if(Cm(),Jc.current=nd,Zc){for(var h=Lt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Zc=!1}if(Cs=0,tn=Xt=Lt=null,bu=!1,wu=0,s0.current=null,c===null||c.return===null){Kt=1,Au=o,qt=null;break}e:{var b=i,v=c.return,B=c,$=o;if(o=ln,B.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var ne=$,Ee=B,Te=Ee.tag;if((Ee.mode&1)===0&&(Te===0||Te===11||Te===15)){var me=Ee.alternate;me?(Ee.updateQueue=me.updateQueue,Ee.memoizedState=me.memoizedState,Ee.lanes=me.lanes):(Ee.updateQueue=null,Ee.memoizedState=null)}var Oe=sS(v);if(Oe!==null){Oe.flags&=-257,oS(Oe,v,B,b,o),Oe.mode&1&&iS(b,ne,o),o=Oe,$=ne;var Le=o.updateQueue;if(Le===null){var Me=new Set;Me.add($),o.updateQueue=Me}else Le.add($);break e}else{if((o&1)===0){iS(b,ne,o),p0();break e}$=Error(n(426))}}else if(It&&B.mode&1){var zt=sS(v);if(zt!==null){(zt.flags&65536)===0&&(zt.flags|=256),oS(zt,v,B,b,o),vm(Vo($,B));break e}}b=$=Vo($,B),Kt!==4&&(Kt=2),Cu===null?Cu=[b]:Cu.push(b),b=v;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var G=nS(b,$,o);kx(b,G);break e;case 1:B=$;var q=b.type,J=b.stateNode;if((b.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(Fi===null||!Fi.has(J)))){b.flags|=65536,o&=-o,b.lanes|=o;var _e=rS(b,B,o);kx(b,_e);break e}}b=b.return}while(b!==null)}FS(c)}catch(Be){o=Be,qt===c&&c!==null&&(qt=c=c.return);continue}break}while(!0)}function DS(){var i=ud.current;return ud.current=nd,i===null?nd:i}function p0(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),nn===null||(Ns&268435455)===0&&(ld&268435455)===0||Hi(nn,ln)}function md(i,o){var c=ct;ct|=2;var h=DS();(nn!==i||ln!==o)&&(li=null,Os(i,o));do try{xU();break}catch(E){LS(i,E)}while(!0);if(Cm(),ct=c,ud.current=h,qt!==null)throw Error(n(261));return nn=null,ln=0,Kt}function xU(){for(;qt!==null;)MS(qt)}function SU(){for(;qt!==null&&!XB();)MS(qt)}function MS(i){var o=HS(i.alternate,i,Kn);i.memoizedProps=i.pendingProps,o===null?FS(i):qt=o,s0.current=null}function FS(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=gU(c,o,Kn),c!==null){qt=c;return}}else{if(c=EU(c,o),c!==null){c.flags&=32767,qt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Kt=6,qt=null;return}}if(o=o.sibling,o!==null){qt=o;return}qt=o=i}while(o!==null);Kt===0&&(Kt=5)}function Is(i,o,c){var h=gt,E=or.transition;try{or.transition=null,gt=1,vU(i,o,c,h)}finally{or.transition=E,gt=h}return null}function vU(i,o,c,h){do Go();while(Bi!==null);if((ct&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(s7(i,b),i===nn&&(qt=nn=null,ln=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||dd||(dd=!0,jS(Tc,function(){return Go(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=or.transition,or.transition=null;var v=gt;gt=1;var B=ct;ct|=4,s0.current=null,TU(i,c),CS(c,i),q7(pm),Ac=!!hm,pm=hm=null,i.current=c,bU(c),KB(),ct=B,gt=v,or.transition=b}else i.current=c;if(dd&&(dd=!1,Bi=i,fd=E),b=i.pendingLanes,b===0&&(Fi=null),ZB(c.stateNode),Un(i,jt()),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(cd)throw cd=!1,i=u0,u0=null,i;return(fd&1)!==0&&i.tag!==0&&Go(),b=i.pendingLanes,(b&1)!==0?i===l0?Nu++:(Nu=0,l0=i):Nu=0,Ri(),null}function Go(){if(Bi!==null){var i=v_(fd),o=or.transition,c=gt;try{if(or.transition=null,gt=16>i?16:i,Bi===null)var h=!1;else{if(i=Bi,Bi=null,fd=0,(ct&6)!==0)throw Error(n(331));var E=ct;for(ct|=4,Pe=i.current;Pe!==null;){var b=Pe,v=b.child;if((Pe.flags&16)!==0){var B=b.deletions;if(B!==null){for(var $=0;$<B.length;$++){var ne=B[$];for(Pe=ne;Pe!==null;){var Ee=Pe;switch(Ee.tag){case 0:case 11:case 15:vu(8,Ee,b)}var Te=Ee.child;if(Te!==null)Te.return=Ee,Pe=Te;else for(;Pe!==null;){Ee=Pe;var me=Ee.sibling,Oe=Ee.return;if(_S(Ee),Ee===ne){Pe=null;break}if(me!==null){me.return=Oe,Pe=me;break}Pe=Oe}}}var Le=b.alternate;if(Le!==null){var Me=Le.child;if(Me!==null){Le.child=null;do{var zt=Me.sibling;Me.sibling=null,Me=zt}while(Me!==null)}}Pe=b}}if((b.subtreeFlags&2064)!==0&&v!==null)v.return=b,Pe=v;else e:for(;Pe!==null;){if(b=Pe,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:vu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Pe=G;break e}Pe=b.return}}var q=i.current;for(Pe=q;Pe!==null;){v=Pe;var J=v.child;if((v.subtreeFlags&2064)!==0&&J!==null)J.return=v,Pe=J;else e:for(v=q;Pe!==null;){if(B=Pe,(B.flags&2048)!==0)try{switch(B.tag){case 0:case 11:case 15:ad(9,B)}}catch(Be){Ft(B,B.return,Be)}if(B===v){Pe=null;break e}var _e=B.sibling;if(_e!==null){_e.return=B.return,Pe=_e;break e}Pe=B.return}}if(ct=E,Ri(),Hr&&typeof Hr.onPostCommitFiberRoot=="function")try{Hr.onPostCommitFiberRoot(bc,i)}catch(Be){}h=!0}return h}finally{gt=c,or.transition=o}}return!1}function BS(i,o,c){o=Vo(c,o),o=nS(i,o,1),i=Di(i,o,1),o=vn(),i!==null&&(Ja(i,1,o),Un(i,o))}function Ft(i,o,c){if(i.tag===3)BS(i,i,c);else for(;o!==null;){if(o.tag===3){BS(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Fi===null||!Fi.has(h))){i=Vo(c,i),i=rS(o,i,1),o=Di(o,i,1),i=vn(),o!==null&&(Ja(o,1,i),Un(o,i));break}}o=o.return}}function AU(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=vn(),i.pingedLanes|=i.suspendedLanes&c,nn===i&&(ln&c)===c&&(Kt===4||Kt===3&&(ln&130023424)===ln&&500>jt()-a0?Os(i,0):o0|=c),Un(i,o)}function US(i,o){o===0&&((i.mode&1)===0?o=1:(o=_c,_c<<=1,(_c&130023424)===0&&(_c=4194304)));var c=vn();i=oi(i,o),i!==null&&(Ja(i,o,c),Un(i,c))}function CU(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),US(i,c)}function NU(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),US(i,c)}var HS;HS=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||Dn.current)Fn=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return Fn=!1,mU(i,o,c);Fn=(i.flags&131072)!==0}else Fn=!1,It&&(o.flags&1048576)!==0&&Tx(o,Vc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;sd(i,o),i=o.pendingProps;var E=Mo(o,yn.current);zo(o,c),E=Bm(null,o,h,i,E,c);var b=Um();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,Mn(h)?(b=!0,jc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Im(o),E.updater=rd,o.stateNode=E,E._reactInternals=o,qm(o,h,i,c),o=Xm(null,o,h,!0,b,c)):(o.tag=0,It&&b&&wm(o),Sn(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(sd(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=OU(h),i=_r(h,i),E){case 0:o=Gm(null,o,h,i,c);break e;case 1:o=fS(null,o,h,i,c);break e;case 11:o=aS(null,o,h,i,c);break e;case 14:o=uS(null,o,h,_r(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:_r(h,E),Gm(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:_r(h,E),fS(i,o,h,E,c);case 3:e:{if(hS(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,Nx(i,o),Kc(o,h,null,c);var v=o.memoizedState;if(h=v.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){E=Vo(Error(n(423)),o),o=pS(i,o,h,c,E);break e}else if(h!==E){E=Vo(Error(n(424)),o),o=pS(i,o,h,c,E);break e}else for(Xn=Oi(o.stateNode.containerInfo.firstChild),Gn=o,It=!0,wr=null,c=Ax(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Uo(),h===E){o=ui(i,o,c);break e}Sn(i,o,h,c)}o=o.child}return o;case 5:return Ix(o),i===null&&Sm(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,v=E.children,mm(h,E)?v=null:b!==null&&mm(h,b)&&(o.flags|=32),dS(i,o),Sn(i,o,v,c),o.child;case 6:return i===null&&Sm(o),null;case 13:return mS(i,o,c);case 4:return Pm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Ho(o,null,h,c):Sn(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:_r(h,E),aS(i,o,h,E,c);case 7:return Sn(i,o,o.pendingProps,c),o.child;case 8:return Sn(i,o,o.pendingProps.children,c),o.child;case 12:return Sn(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,b=o.memoizedProps,v=E.value,xt(Wc,h._currentValue),h._currentValue=v,b!==null)if(br(b.value,v)){if(b.children===E.children&&!Dn.current){o=ui(i,o,c);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var B=b.dependencies;if(B!==null){v=b.child;for(var $=B.firstContext;$!==null;){if($.context===h){if(b.tag===1){$=ai(-1,c&-c),$.tag=2;var ne=b.updateQueue;if(ne!==null){ne=ne.shared;var Ee=ne.pending;Ee===null?$.next=$:($.next=Ee.next,Ee.next=$),ne.pending=$}}b.lanes|=c,$=b.alternate,$!==null&&($.lanes|=c),km(b.return,c,o),B.lanes|=c;break}$=$.next}}else if(b.tag===10)v=b.type===o.type?null:b.child;else if(b.tag===18){if(v=b.return,v===null)throw Error(n(341));v.lanes|=c,B=v.alternate,B!==null&&(B.lanes|=c),km(v,c,o),v=b.sibling}else v=b.child;if(v!==null)v.return=b;else for(v=b;v!==null;){if(v===o){v=null;break}if(b=v.sibling,b!==null){b.return=v.return,v=b;break}v=v.return}b=v}Sn(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,zo(o,c),E=ir(E),h=h(E),o.flags|=1,Sn(i,o,h,c),o.child;case 14:return h=o.type,E=_r(h,o.pendingProps),E=_r(h.type,E),uS(i,o,h,E,c);case 15:return lS(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:_r(h,E),sd(i,o),o.tag=1,Mn(h)?(i=!0,jc(o)):i=!1,zo(o,c),eS(o,h,E),qm(o,h,E,c),Xm(null,o,h,!0,i,c);case 19:return ES(i,o,c);case 22:return cS(i,o,c)}throw Error(n(156,o.tag))};function jS(i,o){return b_(i,o)}function kU(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 ar(i,o,c,h){return new kU(i,o,c,h)}function m0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function OU(i){if(typeof i=="function")return m0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===oe)return 11;if(i===te)return 14}return 2}function ji(i,o){var c=i.alternate;return c===null?(c=ar(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 gd(i,o,c,h,E,b){var v=2;if(h=i,typeof i=="function")m0(i)&&(v=1);else if(typeof i=="string")v=5;else e:switch(i){case W:return Ps(c.children,E,b,o);case Z:v=8,E|=8;break;case re:return i=ar(12,c,o,E|2),i.elementType=re,i.lanes=b,i;case de:return i=ar(13,c,o,E),i.elementType=de,i.lanes=b,i;case fe:return i=ar(19,c,o,E),i.elementType=fe,i.lanes=b,i;case ue:return Ed(c,E,b,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case z:v=10;break e;case K:v=9;break e;case oe:v=11;break e;case te:v=14;break e;case ve:v=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=ar(v,c,o,E),o.elementType=i,o.type=h,o.lanes=b,o}function Ps(i,o,c,h){return i=ar(7,i,h,o),i.lanes=c,i}function Ed(i,o,c,h){return i=ar(22,i,h,o),i.elementType=ue,i.lanes=c,i.stateNode={isHidden:!1},i}function g0(i,o,c){return i=ar(6,i,null,o),i.lanes=c,i}function E0(i,o,c){return o=ar(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function IU(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=Vp(0),this.expirationTimes=Vp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function y0(i,o,c,h,E,b,v,B,$){return i=new IU(i,o,c,B,$),o===1?(o=1,b===!0&&(o|=8)):o=0,b=ar(3,null,null,o),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Im(b),i}function PU(i,o,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:o,implementation:c}}function zS(i){if(!i)return Pi;i=i._reactInternals;e:{if(bs(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(Mn(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(Mn(c))return gx(i,c,o)}return o}function $S(i,o,c,h,E,b,v,B,$){return i=y0(c,h,!0,i,E,b,v,B,$),i.context=zS(null),c=i.current,h=vn(),E=Ui(c),b=ai(h,E),b.callback=o!=null?o:null,Di(c,b,E),i.current.lanes=E,Ja(i,E,h),Un(i,h),i}function yd(i,o,c,h){var E=o.current,b=vn(),v=Ui(E);return c=zS(c),o.context===null?o.context=c:o.pendingContext=c,o=ai(b,v),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Di(E,o,v),i!==null&&(vr(i,E,v,b),Xc(i,E,v)),v}function Td(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function VS(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function T0(i,o){VS(i,o),(i=i.alternate)&&VS(i,o)}function RU(){return null}var qS=typeof reportError=="function"?reportError:function(i){console.error(i)};function b0(i){this._internalRoot=i}bd.prototype.render=b0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));yd(i,o,null,null)},bd.prototype.unmount=b0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;ks(function(){yd(null,i,null,null)}),o[ni]=null}};function bd(i){this._internalRoot=i}bd.prototype.unstable_scheduleHydration=function(i){if(i){var o=N_();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Ci.length&&o!==0&&o<Ci[c].priority;c++);Ci.splice(c,0,i),c===0&&I_(i)}};function w0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function wd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function YS(){}function LU(i,o,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var ne=Td(v);b.call(ne)}}var v=$S(o,h,i,0,null,!1,!1,"",YS);return i._reactRootContainer=v,i[ni]=v.current,fu(i.nodeType===8?i.parentNode:i),ks(),v}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var B=h;h=function(){var ne=Td($);B.call(ne)}}var $=y0(i,0,!1,null,null,!1,!1,"",YS);return i._reactRootContainer=$,i[ni]=$.current,fu(i.nodeType===8?i.parentNode:i),ks(function(){yd(o,$,c,h)}),$}function _d(i,o,c,h,E){var b=c._reactRootContainer;if(b){var v=b;if(typeof E=="function"){var B=E;E=function(){var $=Td(v);B.call($)}}yd(o,v,i,E)}else v=LU(c,o,i,E,h);return Td(v)}A_=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=Qa(o.pendingLanes);c!==0&&(qp(o,c|1),Un(o,jt()),(ct&6)===0&&(Wo=jt()+500,Ri()))}break;case 13:ks(function(){var h=oi(i,1);if(h!==null){var E=vn();vr(h,i,1,E)}}),T0(i,1)}},Yp=function(i){if(i.tag===13){var o=oi(i,134217728);if(o!==null){var c=vn();vr(o,i,134217728,c)}T0(i,134217728)}},C_=function(i){if(i.tag===13){var o=Ui(i),c=oi(i,o);if(c!==null){var h=vn();vr(c,i,o,h)}T0(i,o)}},N_=function(){return gt},k_=function(i,o){var c=gt;try{return gt=i,o()}finally{gt=c}},qn=function(i,o,c){switch(o){case"input":if(_t(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=Uc(h);if(!E)throw Error(n(90));bt(h),_t(h,E)}}}break;case"textarea":ys(i,c);break;case"select":o=c.value,o!=null&&ot(i,!!c.multiple,o,!1)}},h_=f0,p_=ks;var DU={usingClientEntryPoint:!1,Events:[mu,Lo,Uc,Wa,f_,f0]},ku={findFiberByHostInstance:ws,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},MU={bundleType:ku.bundleType,version:ku.version,rendererPackageName:ku.rendererPackageName,rendererConfig:ku.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=y_(i),i===null?null:i.stateNode},findFiberByHostInstance:ku.findFiberByHostInstance||RU,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 xd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xd.isDisabled&&xd.supportsFiber)try{bc=xd.inject(MU),Hr=xd}catch(i){}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DU,kn.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!w0(o))throw Error(n(200));return PU(i,o,null,c)},kn.createRoot=function(i,o){if(!w0(i))throw Error(n(299));var c=!1,h="",E=qS;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=y0(i,1,!1,null,null,c,!1,h,E),i[ni]=o.current,fu(i.nodeType===8?i.parentNode:i),new b0(o)},kn.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=y_(o),i=i===null?null:i.stateNode,i},kn.flushSync=function(i){return ks(i)},kn.hydrate=function(i,o,c){if(!wd(o))throw Error(n(200));return _d(null,i,o,!0,c)},kn.hydrateRoot=function(i,o,c){if(!w0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",v=qS;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(v=c.onRecoverableError)),o=$S(o,null,i,1,c!=null?c:null,E,!1,b,v),i[ni]=o.current,fu(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 bd(o)},kn.render=function(i,o,c){if(!wd(o))throw Error(n(200));return _d(null,i,o,!1,c)},kn.unmountComponentAtNode=function(i){if(!wd(i))throw Error(n(40));return i._reactRootContainer?(ks(function(){_d(null,null,i,!1,function(){i._reactRootContainer=null,i[ni]=null})}),!0):!1},kn.unstable_batchedUpdates=f0,kn.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!wd(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return _d(i,o,c,!1,h)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var A1;function C1(){if(A1)return Cf.exports;A1=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(),Cf.exports=ON(),Cf.exports}var Ys=C1();function N1(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=N1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function M(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=N1(e))&&(r&&(r+=" "),r+=t);return r}var k1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},O1=Vi.createContext&&Vi.createContext(k1),IN=["attr","size","title"];function PN(e,t){if(e==null)return{};var n=RN(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 RN(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 cl(){return cl=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},cl.apply(this,arguments)}function I1(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 dl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I1(Object(n),!0).forEach(function(r){LN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LN(e,t,n){return t=DN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DN(e){var t=MN(e,"string");return typeof t=="symbol"?t:t+""}function MN(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 P1(e){return e&&e.map((t,n)=>Vi.createElement(t.tag,dl({key:n},t.attr),P1(t.child)))}function mt(e){return t=>Vi.createElement(FN,cl({attr:dl({},e.attr)},t),P1(e.child))}function FN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=PN(e,IN),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Vi.createElement("svg",cl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:dl(dl({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&Vi.createElement("title",null,a),e.children)};return O1!==void 0?Vi.createElement(O1.Consumer,null,n=>t(n)):t(k1)}function BN(e){return mt({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function UN(e){return mt({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function HN(e){return mt({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const fr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:w.jsx("button",{className:M(e,`${k}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?w.jsx("img",{className:M(`${k}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),jN="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",zN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ft(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?w.jsx(HN,{className:M(t,`${k}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||jN,alt:"Copilot",className:M(t,`${k}-minimized-icon-img`)});return w.jsx(fr,{className:M(t,`${k}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},$N=()=>{const{globalClassName:e,themeVariables:t}=ft(),n=()=>{Fs(!1),Yr(!0)};return Ys.createPortal(w.jsx("div",{className:M(e,`${k}-minimized-container`),style:t,children:w.jsx(zN,{onClick:n})}),document.body)};function VN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function fn(){const e=P.useContext(Jg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const qN=e=>({[`${Hn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Hn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Hn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Hn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Hn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Hn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function R1(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function YN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function Of(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function WN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function GN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function XN(e){return mt({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 L1(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function D1(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function KN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function QN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function JN(e){return mt({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 ZN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function M1(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}const If=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>w.jsx("button",{className:M(`${k}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),ek=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:M(`${k}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(Of,{size:"16px"})},tk=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(fr,{className:M(e,n,`cim-${r}-component`,`${k}-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:w.jsx(Of,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(If,{className:M(e,n,`cim-${r}-component`,`${k}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&w.jsx(ek,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function fH(){}function hH(){}function F1(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 B1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const nk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ik={};function U1(e,t){return(ik.jsx?rk:nk).test(e)}const sk=/[ \t\n\f\r]/g;function ok(e){return typeof e=="object"?e.type==="text"?H1(e.value):!1:H1(e)}function H1(e){return e.replace(sk,"")===""}class ca{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ca.prototype.normal={},ca.prototype.property={},ca.prototype.space=void 0;function j1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ca(n,r,t)}function da(e){return e.toLowerCase()}class On{constructor(t,n){this.attribute=n,this.property=t}}On.prototype.attribute="",On.prototype.booleanish=!1,On.prototype.boolean=!1,On.prototype.commaOrSpaceSeparated=!1,On.prototype.commaSeparated=!1,On.prototype.defined=!1,On.prototype.mustUseProperty=!1,On.prototype.number=!1,On.prototype.overloadedBoolean=!1,On.prototype.property="",On.prototype.spaceSeparated=!1,On.prototype.space=void 0;let ak=0;const Je=es(),Vt=es(),Pf=es(),we=es(),yt=es(),Zi=es(),zn=es();function es(){return vd(2,++ak)}const Rf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Je,booleanish:Vt,commaOrSpaceSeparated:zn,commaSeparated:Zi,number:we,overloadedBoolean:Pf,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),Lf=Object.keys(Rf);class Df extends On{constructor(t,n,r,s){let a=-1;if(super(t,n),z1(this,"space",s),typeof r=="number")for(;++a<Lf.length;){const u=Lf[a];z1(this,Lf[a],(r&Rf[u])===Rf[u])}}}Df.prototype.defined=!0;function z1(e,t,n){n&&(e[t]=n)}function Ws(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Df(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[da(r)]=r,n[da(a.attribute)]=r}return new ca(t,n,e.space)}const $1=Ws({properties:{ariaActiveDescendant:null,ariaAtomic:Vt,ariaAutoComplete:null,ariaBusy:Vt,ariaChecked:Vt,ariaColCount:we,ariaColIndex:we,ariaColSpan:we,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:Vt,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:Vt,ariaFlowTo:yt,ariaGrabbed:Vt,ariaHasPopup:null,ariaHidden:Vt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:we,ariaLive:null,ariaModal:Vt,ariaMultiLine:Vt,ariaMultiSelectable:Vt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:we,ariaPressed:Vt,ariaReadOnly:Vt,ariaRelevant:null,ariaRequired:Vt,ariaRoleDescription:yt,ariaRowCount:we,ariaRowIndex:we,ariaRowSpan:we,ariaSelected:Vt,ariaSetSize:we,ariaSort:null,ariaValueMax:we,ariaValueMin:we,ariaValueNow:we,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function V1(e,t){return t in e?e[t]:t}function q1(e,t){return V1(e,t.toLowerCase())}const uk=Ws({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zi,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Je,allowPaymentRequest:Je,allowUserMedia:Je,alpha:Je,alt:null,as:null,async:Je,autoCapitalize:null,autoComplete:yt,autoFocus:Je,autoPlay:Je,blocking:yt,capture:null,charSet:null,checked:Je,cite:null,className:yt,closedBy:null,colorSpace:null,cols:we,colSpan:we,command:null,commandFor:null,content:null,contentEditable:Vt,controls:Je,controlsList:yt,coords:we|Zi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Je,defer:Je,dir:null,dirName:null,disabled:Je,download:Pf,draggable:Vt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Je,formTarget:null,headers:yt,height:we,hidden:Pf,high:we,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Je,inputMode:null,integrity:null,is:null,isMap:Je,itemId:null,itemProp:yt,itemRef:yt,itemScope:Je,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Je,low:we,manifest:null,max:null,maxLength:we,media:null,method:null,min:null,minLength:we,multiple:Je,muted:Je,name:null,nonce:null,noModule:Je,noValidate:Je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Je,optimum:we,pattern:null,ping:yt,placeholder:null,playsInline:Je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Je,referrerPolicy:null,rel:yt,required:Je,reversed:Je,rows:we,rowSpan:we,sandbox:yt,scope:null,scoped:Je,seamless:Je,selected:Je,shadowRootClonable:Je,shadowRootCustomElementRegistry:Je,shadowRootDelegatesFocus:Je,shadowRootMode:null,shadowRootSerializable:Je,shape:null,size:we,sizes:null,slot:null,span:we,spellCheck:Vt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:we,step:null,style:null,tabIndex:we,target:null,title:null,translate:null,type:null,typeMustMatch:Je,useMap:null,value:Vt,width:we,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:we,borderColor:null,bottomMargin:we,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Je,declare:Je,event:null,face:null,frame:null,frameBorder:null,hSpace:we,leftMargin:we,link:null,longDesc:null,lowSrc:null,marginHeight:we,marginWidth:we,noResize:Je,noHref:Je,noShade:Je,noWrap:Je,object:null,profile:null,prompt:null,rev:null,rightMargin:we,rules:null,scheme:null,scrolling:Vt,standby:null,summary:null,text:null,topMargin:we,valueType:null,version:null,vAlign:null,vLink:null,vSpace:we,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Je,disablePictureInPicture:Je,disableRemotePlayback:Je,exportParts:Zi,part:yt,prefix:null,property:null,results:we,security:null,unselectable:null},space:"html",transform:q1}),lk=Ws({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:zn,accentHeight:we,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:we,amplitude:we,arabicForm:null,ascent:we,attributeName:null,attributeType:null,azimuth:we,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:we,by:null,calcMode:null,capHeight:we,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:we,diffuseConstant:we,direction:null,display:null,dur:null,divisor:we,dominantBaseline:null,download:Je,dx:null,dy:null,edgeMode:null,editable:null,elevation:we,enableBackground:null,end:null,event:null,exponent:we,externalResourcesRequired:null,fill:null,fillOpacity:we,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:Zi,g2:Zi,glyphName:Zi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:we,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:we,horizOriginX:we,horizOriginY:we,id:null,ideographic:we,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:we,k:we,k1:we,k2:we,k3:we,k4:we,kernelMatrix:zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:we,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:we,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:we,overlineThickness:we,paintOrder:null,panose1:null,path:null,pathLength:we,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:we,pointsAtY:we,pointsAtZ:we,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zn,rev:zn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zn,requiredFeatures:zn,requiredFonts:zn,requiredFormats:zn,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:we,specularExponent:we,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:we,strikethroughThickness:we,string:null,stroke:null,strokeDashArray:zn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:we,strokeOpacity:we,strokeWidth:null,style:null,surfaceScale:we,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zn,tabIndex:we,tableValues:null,target:null,targetX:we,targetY:we,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:we,underlineThickness:we,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:we,values:null,vAlphabetic:we,vMathematical:we,vectorEffect:null,vHanging:we,vIdeographic:we,version:null,vertAdvY:we,vertOriginX:we,vertOriginY:we,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:we,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:V1}),Y1=Ws({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()}}),W1=Ws({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:q1}),G1=Ws({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ck={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"},dk=/[A-Z]/g,X1=/-[a-z]/g,fk=/^data[-\w.:]+$/i;function fl(e,t){const n=da(t);let r=t,s=On;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&fk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(X1,pk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!X1.test(a)){let u=a.replace(dk,hk);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=Df}return new s(r,t)}function hk(e){return"-"+e.toLowerCase()}function pk(e){return e.charAt(1).toUpperCase()}const fa=j1([$1,uk,Y1,W1,G1],"html"),hi=j1([$1,lk,Y1,W1,G1],"svg");function K1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Q1(e){return e.join(" ").trim()}var Gs={},Mf,J1;function mk(){if(J1)return Mf;J1=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=`
|
|
23
|
+
`+b.stack}return{value:i,source:o,stack:E,digest:null}}function Ym(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 pU=typeof WeakMap=="function"?WeakMap:Map;function nS(i,o,c){c=ai(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){cd||(cd=!0,u0=h),Wm(i,o)},c}function rS(i,o,c){c=ai(-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"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var v=o.stack;this.componentDidCatch(o.value,{componentStack:v!==null?v:""})}),c}function iS(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new pU;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=NU.bind(null,i,o,c),o.then(i,i))}function sS(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 oS(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=ai(-1,1),o.tag=2,Di(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var mU=j.ReactCurrentOwner,Fn=!1;function Sn(i,o,c,h){o.child=i===null?Ax(o,null,c,h):Ho(o,i.child,c,h)}function aS(i,o,c,h,E){c=c.render;var b=o.ref;return zo(o,E),h=Bm(i,o,c,h,b,E),c=Um(),i!==null&&!Fn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ui(i,o,E)):(It&&c&&wm(o),o.flags|=1,Sn(i,o,h,E),o.child)}function uS(i,o,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!m0(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=b,lS(i,o,b,h,E)):(i=gd(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 v=b.memoizedProps;if(c=c.compare,c=c!==null?c:lu,c(v,h)&&i.ref===o.ref)return ui(i,o,E)}return o.flags|=1,i=ji(b,h),i.ref=o.ref,i.return=o,o.child=i}function lS(i,o,c,h,E){if(i!==null){var b=i.memoizedProps;if(lu(b,h)&&i.ref===o.ref)if(Fn=!1,o.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Fn=!0);else return o.lanes=i.lanes,ui(i,o,E)}return Gm(i,o,c,h,E)}function cS(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},xt(Yo,Kn),Kn|=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,xt(Yo,Kn),Kn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,xt(Yo,Kn),Kn|=h}else b!==null?(h=b.baseLanes|c,o.memoizedState=null):h=c,xt(Yo,Kn),Kn|=h;return Sn(i,o,E,c),o.child}function dS(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function Gm(i,o,c,h,E){var b=Mn(c)?_s:yn.current;return b=Mo(o,b),zo(o,E),c=Bm(i,o,c,h,b,E),h=Um(),i!==null&&!Fn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ui(i,o,E)):(It&&h&&wm(o),o.flags|=1,Sn(i,o,c,E),o.child)}function fS(i,o,c,h,E){if(Mn(c)){var b=!0;jc(o)}else b=!1;if(zo(o,E),o.stateNode===null)sd(i,o),eS(o,c,h),qm(o,c,h,E),h=!0;else if(i===null){var v=o.stateNode,B=o.memoizedProps;v.props=B;var $=v.context,ne=c.contextType;typeof ne=="object"&&ne!==null?ne=ir(ne):(ne=Mn(c)?_s:yn.current,ne=Mo(o,ne));var Ee=c.getDerivedStateFromProps,Te=typeof Ee=="function"||typeof v.getSnapshotBeforeUpdate=="function";Te||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(B!==h||$!==ne)&&tS(o,v,h,ne),Li=!1;var me=o.memoizedState;v.state=me,Kc(o,h,v,E),$=o.memoizedState,B!==h||me!==$||Dn.current||Li?(typeof Ee=="function"&&(Vm(o,c,Ee,h),$=o.memoizedState),(B=Li||Zx(o,c,B,h,me,$,ne))?(Te||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=$),v.props=h,v.state=$,v.context=ne,h=B):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{v=o.stateNode,Nx(i,o),B=o.memoizedProps,ne=o.type===o.elementType?B:_r(o.type,B),v.props=ne,Te=o.pendingProps,me=v.context,$=c.contextType,typeof $=="object"&&$!==null?$=ir($):($=Mn(c)?_s:yn.current,$=Mo(o,$));var Oe=c.getDerivedStateFromProps;(Ee=typeof Oe=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(B!==Te||me!==$)&&tS(o,v,h,$),Li=!1,me=o.memoizedState,v.state=me,Kc(o,h,v,E);var Le=o.memoizedState;B!==Te||me!==Le||Dn.current||Li?(typeof Oe=="function"&&(Vm(o,c,Oe,h),Le=o.memoizedState),(ne=Li||Zx(o,c,ne,h,me,Le,$)||!1)?(Ee||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(h,Le,$),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(h,Le,$)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||B===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Le),v.props=h,v.state=Le,v.context=$,h=ne):(typeof v.componentDidUpdate!="function"||B===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),h=!1)}return Xm(i,o,c,h,b,E)}function Xm(i,o,c,h,E,b){dS(i,o);var v=(o.flags&128)!==0;if(!h&&!v)return E&&Ex(o,c,!1),ui(i,o,b);h=o.stateNode,mU.current=o;var B=v&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&v?(o.child=Ho(o,i.child,null,b),o.child=Ho(o,null,B,b)):Sn(i,o,B,b),o.memoizedState=h.state,E&&Ex(o,c,!0),o.child}function hS(i){var o=i.stateNode;o.pendingContext?mx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&mx(i,o.context,!1),Pm(i,o.containerInfo)}function pS(i,o,c,h,E){return Uo(),vm(E),o.flags|=256,Sn(i,o,c,h),o.child}var Km={dehydrated:null,treeContext:null,retryLane:0};function Qm(i){return{baseLanes:i,cachePool:null,transitions:null}}function mS(i,o,c){var h=o.pendingProps,E=Rt.current,b=!1,v=(o.flags&128)!==0,B;if((B=v)||(B=i!==null&&i.memoizedState===null?!1:(E&2)!==0),B?(b=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),xt(Rt,E&1),i===null)return Sm(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):(v=h.children,i=h.fallback,b?(h=o.mode,b=o.child,v={mode:"hidden",children:v},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=v):b=Ed(v,h,0,null),i=Ps(i,h,c,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=Qm(c),o.memoizedState=Km,i):Jm(o,v));if(E=i.memoizedState,E!==null&&(B=E.dehydrated,B!==null))return gU(i,o,v,h,B,E,c);if(b){b=h.fallback,v=o.mode,E=i.child,B=E.sibling;var $={mode:"hidden",children:h.children};return(v&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=$,o.deletions=null):(h=ji(E,$),h.subtreeFlags=E.subtreeFlags&14680064),B!==null?b=ji(B,b):(b=Ps(b,v,c,null),b.flags|=2),b.return=o,h.return=o,h.sibling=b,o.child=h,h=b,b=o.child,v=i.child.memoizedState,v=v===null?Qm(c):{baseLanes:v.baseLanes|c,cachePool:null,transitions:v.transitions},b.memoizedState=v,b.childLanes=i.childLanes&~c,o.memoizedState=Km,h}return b=i.child,i=b.sibling,h=ji(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 Jm(i,o){return o=Ed({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function id(i,o,c,h){return h!==null&&vm(h),Ho(o,i.child,null,c),i=Jm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function gU(i,o,c,h,E,b,v){if(c)return o.flags&256?(o.flags&=-257,h=Ym(Error(n(422))),id(i,o,v,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=Ps(b,E,v,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&Ho(o,i.child,null,v),o.child.memoizedState=Qm(v),o.memoizedState=Km,b);if((o.mode&1)===0)return id(i,o,v,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var B=h.dgst;return h=B,b=Error(n(419)),h=Ym(b,h,void 0),id(i,o,v,h)}if(B=(v&i.childLanes)!==0,Fn||B){if(h=nn,h!==null){switch(v&-v){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|v))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,oi(i,E),vr(h,i,E,-1))}return p0(),h=Ym(Error(n(421))),id(i,o,v,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=kU.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Xn=Oi(E.nextSibling),Gn=o,It=!0,wr=null,i!==null&&(nr[rr++]=ii,nr[rr++]=si,nr[rr++]=xs,ii=i.id,si=i.overflow,xs=o),o=Jm(o,h.children),o.flags|=4096,o)}function gS(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),km(i.return,o,c)}function Zm(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 ES(i,o,c){var h=o.pendingProps,E=h.revealOrder,b=h.tail;if(Sn(i,o,h.children,c),h=Rt.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&&gS(i,c,o);else if(i.tag===19)gS(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(xt(Rt,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&&Qc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),Zm(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&&Qc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Zm(o,!0,c,null,b);break;case"together":Zm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function sd(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function ui(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),Ns|=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=ji(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=ji(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function EU(i,o,c){switch(o.tag){case 3:hS(o),Uo();break;case 5:Ix(o);break;case 1:Mn(o.type)&&jc(o);break;case 4:Pm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;xt(Wc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(xt(Rt,Rt.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?mS(i,o,c):(xt(Rt,Rt.current&1),i=ui(i,o,c),i!==null?i.sibling:null);xt(Rt,Rt.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return ES(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),xt(Rt,Rt.current),h)break;return null;case 22:case 23:return o.lanes=0,cS(i,o,c)}return ui(i,o,c)}var yS,e0,TS,bS;yS=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}},e0=function(){},TS=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,As(zr.current);var b=null;switch(c){case"input":E=En(i,E),h=En(i,h),b=[];break;case"select":E=C({},E,{value:void 0}),h=C({},h,{value:void 0}),b=[];break;case"textarea":E=ut(i,E),h=ut(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Bc)}be(c,h);var v;c=null;for(ne in E)if(!h.hasOwnProperty(ne)&&E.hasOwnProperty(ne)&&E[ne]!=null)if(ne==="style"){var B=E[ne];for(v in B)B.hasOwnProperty(v)&&(c||(c={}),c[v]="")}else ne!=="dangerouslySetInnerHTML"&&ne!=="children"&&ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&ne!=="autoFocus"&&(s.hasOwnProperty(ne)?b||(b=[]):(b=b||[]).push(ne,null));for(ne in h){var $=h[ne];if(B=E!=null?E[ne]:void 0,h.hasOwnProperty(ne)&&$!==B&&($!=null||B!=null))if(ne==="style")if(B){for(v in B)!B.hasOwnProperty(v)||$&&$.hasOwnProperty(v)||(c||(c={}),c[v]="");for(v in $)$.hasOwnProperty(v)&&B[v]!==$[v]&&(c||(c={}),c[v]=$[v])}else c||(b||(b=[]),b.push(ne,c)),c=$;else ne==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,B=B?B.__html:void 0,$!=null&&B!==$&&(b=b||[]).push(ne,$)):ne==="children"?typeof $!="string"&&typeof $!="number"||(b=b||[]).push(ne,""+$):ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&(s.hasOwnProperty(ne)?($!=null&&ne==="onScroll"&&Ct("scroll",i),b||B===$||(b=[])):(b=b||[]).push(ne,$))}c&&(b=b||[]).push("style",c);var ne=b;(o.updateQueue=ne)&&(o.flags|=4)}},bS=function(i,o,c,h){c!==h&&(o.flags|=4)};function Su(i,o){if(!It)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 bn(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 yU(i,o,c){var h=o.pendingProps;switch(_m(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bn(o),null;case 1:return Mn(o.type)&&Hc(),bn(o),null;case 3:return h=o.stateNode,$o(),Nt(Dn),Nt(yn),Dm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(qc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,wr!==null&&(d0(wr),wr=null))),e0(i,o),bn(o),null;case 5:Rm(o);var E=As(Tu.current);if(c=o.type,i!==null&&o.stateNode!=null)TS(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 bn(o),null}if(i=As(zr.current),qc(o)){h=o.stateNode,c=o.type;var b=o.memoizedProps;switch(h[jr]=o,h[pu]=b,i=(o.mode&1)!==0,c){case"dialog":Ct("cancel",h),Ct("close",h);break;case"iframe":case"object":case"embed":Ct("load",h);break;case"video":case"audio":for(E=0;E<du.length;E++)Ct(du[E],h);break;case"source":Ct("error",h);break;case"img":case"image":case"link":Ct("error",h),Ct("load",h);break;case"details":Ct("toggle",h);break;case"input":Ht(h,b),Ct("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},Ct("invalid",h);break;case"textarea":tr(h,b),Ct("invalid",h)}be(c,b),E=null;for(var v in b)if(b.hasOwnProperty(v)){var B=b[v];v==="children"?typeof B=="string"?h.textContent!==B&&(b.suppressHydrationWarning!==!0&&Fc(h.textContent,B,i),E=["children",B]):typeof B=="number"&&h.textContent!==""+B&&(b.suppressHydrationWarning!==!0&&Fc(h.textContent,B,i),E=["children",""+B]):s.hasOwnProperty(v)&&B!=null&&v==="onScroll"&&Ct("scroll",h)}switch(c){case"input":pt(h),Gt(h,b,!0);break;case"textarea":pt(h),Ts(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=Bc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{v=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ce(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=v.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=v.createElement(c,{is:h.is}):(i=v.createElement(c),c==="select"&&(v=i,h.multiple?v.multiple=!0:h.size&&(v.size=h.size))):i=v.createElementNS(i,c),i[jr]=o,i[pu]=h,yS(i,o,!1,!1),o.stateNode=i;e:{switch(v=pe(c,h),c){case"dialog":Ct("cancel",i),Ct("close",i),E=h;break;case"iframe":case"object":case"embed":Ct("load",i),E=h;break;case"video":case"audio":for(E=0;E<du.length;E++)Ct(du[E],i);E=h;break;case"source":Ct("error",i),E=h;break;case"img":case"image":case"link":Ct("error",i),Ct("load",i),E=h;break;case"details":Ct("toggle",i),E=h;break;case"input":Ht(i,h),E=En(i,h),Ct("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=C({},h,{value:void 0}),Ct("invalid",i);break;case"textarea":tr(i,h),E=ut(i,h),Ct("invalid",i);break;default:E=h}be(c,E),B=E;for(b in B)if(B.hasOwnProperty(b)){var $=B[b];b==="style"?Ae(i,$):b==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&Ze(i,$)):b==="children"?typeof $=="string"?(c!=="textarea"||$!=="")&&nt(i,$):typeof $=="number"&&nt(i,""+$):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?$!=null&&b==="onScroll"&&Ct("scroll",i):$!=null&&O(i,b,$,v))}switch(c){case"input":pt(i),Gt(i,h,!1);break;case"textarea":pt(i),Ts(i);break;case"option":h.value!=null&&i.setAttribute("value",""+$e(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?ot(i,!!h.multiple,b,!1):h.defaultValue!=null&&ot(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Bc)}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 bn(o),null;case 6:if(i&&o.stateNode!=null)bS(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=As(Tu.current),As(zr.current),qc(o)){if(h=o.stateNode,c=o.memoizedProps,h[jr]=o,(b=h.nodeValue!==c)&&(i=Gn,i!==null))switch(i.tag){case 3:Fc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Fc(h.nodeValue,c,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[jr]=o,o.stateNode=h}return bn(o),null;case 13:if(Nt(Rt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(It&&Xn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)xx(),Uo(),o.flags|=98560,b=!1;else if(b=qc(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[jr]=o}else Uo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;bn(o),b=!1}else wr!==null&&(d0(wr),wr=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||(Rt.current&1)!==0?Kt===0&&(Kt=3):p0())),o.updateQueue!==null&&(o.flags|=4),bn(o),null);case 4:return $o(),e0(i,o),i===null&&fu(o.stateNode.containerInfo),bn(o),null;case 10:return Nm(o.type._context),bn(o),null;case 17:return Mn(o.type)&&Hc(),bn(o),null;case 19:if(Nt(Rt),b=o.memoizedState,b===null)return bn(o),null;if(h=(o.flags&128)!==0,v=b.rendering,v===null)if(h)Su(b,!1);else{if(Kt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(v=Qc(i),v!==null){for(o.flags|=128,Su(b,!1),h=v.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,v=b.alternate,v===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=v.childLanes,b.lanes=v.lanes,b.child=v.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=v.memoizedProps,b.memoizedState=v.memoizedState,b.updateQueue=v.updateQueue,b.type=v.type,i=v.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return xt(Rt,Rt.current&1|2),o.child}i=i.sibling}b.tail!==null&&jt()>Wo&&(o.flags|=128,h=!0,Su(b,!1),o.lanes=4194304)}else{if(!h)if(i=Qc(v),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),Su(b,!0),b.tail===null&&b.tailMode==="hidden"&&!v.alternate&&!It)return bn(o),null}else 2*jt()-b.renderingStartTime>Wo&&c!==1073741824&&(o.flags|=128,h=!0,Su(b,!1),o.lanes=4194304);b.isBackwards?(v.sibling=o.child,o.child=v):(c=b.last,c!==null?c.sibling=v:o.child=v,b.last=v)}return b.tail!==null?(o=b.tail,b.rendering=o,b.tail=o.sibling,b.renderingStartTime=jt(),o.sibling=null,c=Rt.current,xt(Rt,h?c&1|2:c&1),o):(bn(o),null);case 22:case 23:return h0(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Kn&1073741824)!==0&&(bn(o),o.subtreeFlags&6&&(o.flags|=8192)):bn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function TU(i,o){switch(_m(o),o.tag){case 1:return Mn(o.type)&&Hc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return $o(),Nt(Dn),Nt(yn),Dm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Rm(o),null;case 13:if(Nt(Rt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Uo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return Nt(Rt),null;case 4:return $o(),null;case 10:return Nm(o.type._context),null;case 22:case 23:return h0(),null;case 24:return null;default:return null}}var od=!1,wn=!1,bU=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function qo(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Ft(i,o,h)}else c.current=null}function t0(i,o,c){try{c()}catch(h){Ft(i,o,h)}}var wS=!1;function wU(i,o){if(hm=Ac,i=Z_(),sm(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(_e){c=null;break e}var v=0,B=-1,$=-1,ne=0,Ee=0,Te=i,me=null;t:for(;;){for(var Oe;Te!==c||E!==0&&Te.nodeType!==3||(B=v+E),Te!==b||h!==0&&Te.nodeType!==3||($=v+h),Te.nodeType===3&&(v+=Te.nodeValue.length),(Oe=Te.firstChild)!==null;)me=Te,Te=Oe;for(;;){if(Te===i)break t;if(me===c&&++ne===E&&(B=v),me===b&&++Ee===h&&($=v),(Oe=Te.nextSibling)!==null)break;Te=me,me=Te.parentNode}Te=Oe}c=B===-1||$===-1?null:{start:B,end:$}}else c=null}c=c||{start:0,end:0}}else c=null;for(pm={focusedElem:i,selectionRange:c},Ac=!1,Pe=o;Pe!==null;)if(o=Pe,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Pe=i;else for(;Pe!==null;){o=Pe;try{var Le=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Le!==null){var Me=Le.memoizedProps,zt=Le.memoizedState,G=o.stateNode,q=G.getSnapshotBeforeUpdate(o.elementType===o.type?Me:_r(o.type,Me),zt);G.__reactInternalSnapshotBeforeUpdate=q}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){Ft(o,o.return,_e)}if(i=o.sibling,i!==null){i.return=o.return,Pe=i;break}Pe=o.return}return Le=wS,wS=!1,Le}function vu(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&&t0(o,c,b)}E=E.next}while(E!==h)}}function ad(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 n0(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 _S(i){var o=i.alternate;o!==null&&(i.alternate=null,_S(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[jr],delete o[pu],delete o[ym],delete o[rU],delete o[iU])),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 xS(i){return i.tag===5||i.tag===3||i.tag===4}function SS(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||xS(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 r0(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=Bc));else if(h!==4&&(i=i.child,i!==null))for(r0(i,o,c),i=i.sibling;i!==null;)r0(i,o,c),i=i.sibling}function i0(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(i0(i,o,c),i=i.sibling;i!==null;)i0(i,o,c),i=i.sibling}var un=null,xr=!1;function Mi(i,o,c){for(c=c.child;c!==null;)vS(i,o,c),c=c.sibling}function vS(i,o,c){if(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(bc,c)}catch(B){}switch(c.tag){case 5:wn||qo(c,o);case 6:var h=un,E=xr;un=null,Mi(i,o,c),un=h,xr=E,un!==null&&(xr?(i=un,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):un.removeChild(c.stateNode));break;case 18:un!==null&&(xr?(i=un,c=c.stateNode,i.nodeType===8?Em(i.parentNode,c):i.nodeType===1&&Em(i,c),ru(i)):Em(un,c.stateNode));break;case 4:h=un,E=xr,un=c.stateNode.containerInfo,xr=!0,Mi(i,o,c),un=h,xr=E;break;case 0:case 11:case 14:case 15:if(!wn&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,v=b.destroy;b=b.tag,v!==void 0&&((b&2)!==0||(b&4)!==0)&&t0(c,o,v),E=E.next}while(E!==h)}Mi(i,o,c);break;case 1:if(!wn&&(qo(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(B){Ft(c,o,B)}Mi(i,o,c);break;case 21:Mi(i,o,c);break;case 22:c.mode&1?(wn=(h=wn)||c.memoizedState!==null,Mi(i,o,c),wn=h):Mi(i,o,c);break;default:Mi(i,o,c)}}function AS(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new bU),o.forEach(function(h){var E=OU.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function Sr(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,v=o,B=v;e:for(;B!==null;){switch(B.tag){case 5:un=B.stateNode,xr=!1;break e;case 3:un=B.stateNode.containerInfo,xr=!0;break e;case 4:un=B.stateNode.containerInfo,xr=!0;break e}B=B.return}if(un===null)throw Error(n(160));vS(b,v,E),un=null,xr=!1;var $=E.alternate;$!==null&&($.return=null),E.return=null}catch(ne){Ft(E,o,ne)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)CS(o,i),o=o.sibling}function CS(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Sr(o,i),Vr(i),h&4){try{vu(3,i,i.return),ad(3,i)}catch(Me){Ft(i,i.return,Me)}try{vu(5,i,i.return)}catch(Me){Ft(i,i.return,Me)}}break;case 1:Sr(o,i),Vr(i),h&512&&c!==null&&qo(c,c.return);break;case 5:if(Sr(o,i),Vr(i),h&512&&c!==null&&qo(c,c.return),i.flags&32){var E=i.stateNode;try{nt(E,"")}catch(Me){Ft(i,i.return,Me)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,v=c!==null?c.memoizedProps:b,B=i.type,$=i.updateQueue;if(i.updateQueue=null,$!==null)try{B==="input"&&b.type==="radio"&&b.name!=null&&je(E,b),pe(B,v);var ne=pe(B,b);for(v=0;v<$.length;v+=2){var Ee=$[v],Te=$[v+1];Ee==="style"?Ae(E,Te):Ee==="dangerouslySetInnerHTML"?Ze(E,Te):Ee==="children"?nt(E,Te):O(E,Ee,Te,ne)}switch(B){case"input":_t(E,b);break;case"textarea":ys(E,b);break;case"select":var me=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var Oe=b.value;Oe!=null?ot(E,!!b.multiple,Oe,!1):me!==!!b.multiple&&(b.defaultValue!=null?ot(E,!!b.multiple,b.defaultValue,!0):ot(E,!!b.multiple,b.multiple?[]:"",!1))}E[pu]=b}catch(Me){Ft(i,i.return,Me)}}break;case 6:if(Sr(o,i),Vr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Me){Ft(i,i.return,Me)}}break;case 3:if(Sr(o,i),Vr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{ru(o.containerInfo)}catch(Me){Ft(i,i.return,Me)}break;case 4:Sr(o,i),Vr(i);break;case 13:Sr(o,i),Vr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(a0=jt())),h&4&&AS(i);break;case 22:if(Ee=c!==null&&c.memoizedState!==null,i.mode&1?(wn=(ne=wn)||Ee,Sr(o,i),wn=ne):Sr(o,i),Vr(i),h&8192){if(ne=i.memoizedState!==null,(i.stateNode.isHidden=ne)&&!Ee&&(i.mode&1)!==0)for(Pe=i,Ee=i.child;Ee!==null;){for(Te=Pe=Ee;Pe!==null;){switch(me=Pe,Oe=me.child,me.tag){case 0:case 11:case 14:case 15:vu(4,me,me.return);break;case 1:qo(me,me.return);var Le=me.stateNode;if(typeof Le.componentWillUnmount=="function"){h=me,c=me.return;try{o=h,Le.props=o.memoizedProps,Le.state=o.memoizedState,Le.componentWillUnmount()}catch(Me){Ft(h,c,Me)}}break;case 5:qo(me,me.return);break;case 22:if(me.memoizedState!==null){OS(Te);continue}}Oe!==null?(Oe.return=me,Pe=Oe):OS(Te)}Ee=Ee.sibling}e:for(Ee=null,Te=i;;){if(Te.tag===5){if(Ee===null){Ee=Te;try{E=Te.stateNode,ne?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(B=Te.stateNode,$=Te.memoizedProps.style,v=$!=null&&$.hasOwnProperty("display")?$.display:null,B.style.display=se("display",v))}catch(Me){Ft(i,i.return,Me)}}}else if(Te.tag===6){if(Ee===null)try{Te.stateNode.nodeValue=ne?"":Te.memoizedProps}catch(Me){Ft(i,i.return,Me)}}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;Ee===Te&&(Ee=null),Te=Te.return}Ee===Te&&(Ee=null),Te.sibling.return=Te.return,Te=Te.sibling}}break;case 19:Sr(o,i),Vr(i),h&4&&AS(i);break;case 21:break;default:Sr(o,i),Vr(i)}}function Vr(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(xS(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=SS(i);i0(i,b,E);break;case 3:case 4:var v=h.stateNode.containerInfo,B=SS(i);r0(i,B,v);break;default:throw Error(n(161))}}catch($){Ft(i,i.return,$)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function _U(i,o,c){Pe=i,NS(i)}function NS(i,o,c){for(var h=(i.mode&1)!==0;Pe!==null;){var E=Pe,b=E.child;if(E.tag===22&&h){var v=E.memoizedState!==null||od;if(!v){var B=E.alternate,$=B!==null&&B.memoizedState!==null||wn;B=od;var ne=wn;if(od=v,(wn=$)&&!ne)for(Pe=E;Pe!==null;)v=Pe,$=v.child,v.tag===22&&v.memoizedState!==null?IS(E):$!==null?($.return=v,Pe=$):IS(E);for(;b!==null;)Pe=b,NS(b),b=b.sibling;Pe=E,od=B,wn=ne}kS(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Pe=b):kS(i)}}function kS(i){for(;Pe!==null;){var o=Pe;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:wn||ad(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!wn)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:_r(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&Ox(o,b,h);break;case 3:var v=o.updateQueue;if(v!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}Ox(o,v,c)}break;case 5:var B=o.stateNode;if(c===null&&o.flags&4){c=B;var $=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&c.focus();break;case"img":$.src&&(c.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var ne=o.alternate;if(ne!==null){var Ee=ne.memoizedState;if(Ee!==null){var Te=Ee.dehydrated;Te!==null&&ru(Te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}wn||o.flags&512&&n0(o)}catch(me){Ft(o,o.return,me)}}if(o===i){Pe=null;break}if(c=o.sibling,c!==null){c.return=o.return,Pe=c;break}Pe=o.return}}function OS(i){for(;Pe!==null;){var o=Pe;if(o===i){Pe=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Pe=c;break}Pe=o.return}}function IS(i){for(;Pe!==null;){var o=Pe;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{ad(4,o)}catch($){Ft(o,c,$)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch($){Ft(o,E,$)}}var b=o.return;try{n0(o)}catch($){Ft(o,b,$)}break;case 5:var v=o.return;try{n0(o)}catch($){Ft(o,v,$)}}}catch($){Ft(o,o.return,$)}if(o===i){Pe=null;break}var B=o.sibling;if(B!==null){B.return=o.return,Pe=B;break}Pe=o.return}}var xU=Math.ceil,ud=j.ReactCurrentDispatcher,s0=j.ReactCurrentOwner,or=j.ReactCurrentBatchConfig,ct=0,nn=null,qt=null,ln=0,Kn=0,Yo=Ii(0),Kt=0,Au=null,Ns=0,ld=0,o0=0,Cu=null,Bn=null,a0=0,Wo=1/0,li=null,cd=!1,u0=null,Fi=null,dd=!1,Bi=null,fd=0,Nu=0,l0=null,hd=-1,pd=0;function vn(){return(ct&6)!==0?jt():hd!==-1?hd:hd=jt()}function Ui(i){return(i.mode&1)===0?1:(ct&2)!==0&&ln!==0?ln&-ln:oU.transition!==null?(pd===0&&(pd=S_()),pd):(i=gt,i!==0||(i=window.event,i=i===void 0?16:R_(i.type)),i)}function vr(i,o,c,h){if(50<Nu)throw Nu=0,l0=null,Error(n(185));Ja(i,c,h),((ct&2)===0||i!==nn)&&(i===nn&&((ct&2)===0&&(ld|=c),Kt===4&&Hi(i,ln)),Un(i,h),c===1&&ct===0&&(o.mode&1)===0&&(Wo=jt()+500,zc&&Ri()))}function Un(i,o){var c=i.callbackNode;o7(i,o);var h=xc(i,i===nn?ln:0);if(h===0)c!==null&&w_(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&w_(c),o===1)i.tag===0?sU(RS.bind(null,i)):yx(RS.bind(null,i)),tU(function(){(ct&6)===0&&Ri()}),c=null;else{switch(v_(h)){case 1:c=zp;break;case 4:c=__;break;case 16:c=Tc;break;case 536870912:c=x_;break;default:c=Tc}c=jS(c,PS.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function PS(i,o){if(hd=-1,pd=0,(ct&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Go()&&i.callbackNode!==c)return null;var h=xc(i,i===nn?ln:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=md(i,h);else{o=h;var E=ct;ct|=2;var b=DS();(nn!==i||ln!==o)&&(li=null,Wo=jt()+500,Os(i,o));do try{AU();break}catch(B){LS(i,B)}while(!0);Cm(),ud.current=b,ct=E,qt!==null?o=0:(nn=null,ln=0,o=Kt)}if(o!==0){if(o===2&&(E=$p(i),E!==0&&(h=E,o=c0(i,E))),o===1)throw c=Au,Os(i,0),Hi(i,h),Un(i,jt()),c;if(o===6)Hi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!SU(E)&&(o=md(i,h),o===2&&(b=$p(i),b!==0&&(h=b,o=c0(i,b))),o===1))throw c=Au,Os(i,0),Hi(i,h),Un(i,jt()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Is(i,Bn,li);break;case 3:if(Hi(i,h),(h&130023424)===h&&(o=a0+500-jt(),10<o)){if(xc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){vn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=gm(Is.bind(null,i,Bn,li),o);break}Is(i,Bn,li);break;case 4:if(Hi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var v=31-Tr(h);b=1<<v,v=o[v],v>E&&(E=v),h&=~b}if(h=E,h=jt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*xU(h/1960))-h,10<h){i.timeoutHandle=gm(Is.bind(null,i,Bn,li),h);break}Is(i,Bn,li);break;case 5:Is(i,Bn,li);break;default:throw Error(n(329))}}}return Un(i,jt()),i.callbackNode===c?PS.bind(null,i):null}function c0(i,o){var c=Cu;return i.current.memoizedState.isDehydrated&&(Os(i,o).flags|=256),i=md(i,o),i!==2&&(o=Bn,Bn=c,o!==null&&d0(o)),i}function d0(i){Bn===null?Bn=i:Bn.push.apply(Bn,i)}function SU(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(!br(b(),E))return!1}catch(v){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 Hi(i,o){for(o&=~o0,o&=~ld,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-Tr(o),h=1<<c;i[c]=-1,o&=~h}}function RS(i){if((ct&6)!==0)throw Error(n(327));Go();var o=xc(i,0);if((o&1)===0)return Un(i,jt()),null;var c=md(i,o);if(i.tag!==0&&c===2){var h=$p(i);h!==0&&(o=h,c=c0(i,h))}if(c===1)throw c=Au,Os(i,0),Hi(i,o),Un(i,jt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Is(i,Bn,li),Un(i,jt()),null}function f0(i,o){var c=ct;ct|=1;try{return i(o)}finally{ct=c,ct===0&&(Wo=jt()+500,zc&&Ri())}}function ks(i){Bi!==null&&Bi.tag===0&&(ct&6)===0&&Go();var o=ct;ct|=1;var c=or.transition,h=gt;try{if(or.transition=null,gt=1,i)return i()}finally{gt=h,or.transition=c,ct=o,(ct&6)===0&&Ri()}}function h0(){Kn=Yo.current,Nt(Yo)}function Os(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,eU(c)),qt!==null)for(c=qt.return;c!==null;){var h=c;switch(_m(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Hc();break;case 3:$o(),Nt(Dn),Nt(yn),Dm();break;case 5:Rm(h);break;case 4:$o();break;case 13:Nt(Rt);break;case 19:Nt(Rt);break;case 10:Nm(h.type._context);break;case 22:case 23:h0()}c=c.return}if(nn=i,qt=i=ji(i.current,null),ln=Kn=o,Kt=0,Au=null,o0=ld=Ns=0,Bn=Cu=null,vs!==null){for(o=0;o<vs.length;o++)if(c=vs[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var v=b.next;b.next=E,h.next=v}c.pending=h}vs=null}return i}function LS(i,o){do{var c=qt;try{if(Cm(),Jc.current=nd,Zc){for(var h=Lt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Zc=!1}if(Cs=0,tn=Xt=Lt=null,bu=!1,wu=0,s0.current=null,c===null||c.return===null){Kt=1,Au=o,qt=null;break}e:{var b=i,v=c.return,B=c,$=o;if(o=ln,B.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var ne=$,Ee=B,Te=Ee.tag;if((Ee.mode&1)===0&&(Te===0||Te===11||Te===15)){var me=Ee.alternate;me?(Ee.updateQueue=me.updateQueue,Ee.memoizedState=me.memoizedState,Ee.lanes=me.lanes):(Ee.updateQueue=null,Ee.memoizedState=null)}var Oe=sS(v);if(Oe!==null){Oe.flags&=-257,oS(Oe,v,B,b,o),Oe.mode&1&&iS(b,ne,o),o=Oe,$=ne;var Le=o.updateQueue;if(Le===null){var Me=new Set;Me.add($),o.updateQueue=Me}else Le.add($);break e}else{if((o&1)===0){iS(b,ne,o),p0();break e}$=Error(n(426))}}else if(It&&B.mode&1){var zt=sS(v);if(zt!==null){(zt.flags&65536)===0&&(zt.flags|=256),oS(zt,v,B,b,o),vm(Vo($,B));break e}}b=$=Vo($,B),Kt!==4&&(Kt=2),Cu===null?Cu=[b]:Cu.push(b),b=v;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var G=nS(b,$,o);kx(b,G);break e;case 1:B=$;var q=b.type,J=b.stateNode;if((b.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(Fi===null||!Fi.has(J)))){b.flags|=65536,o&=-o,b.lanes|=o;var _e=rS(b,B,o);kx(b,_e);break e}}b=b.return}while(b!==null)}FS(c)}catch(Be){o=Be,qt===c&&c!==null&&(qt=c=c.return);continue}break}while(!0)}function DS(){var i=ud.current;return ud.current=nd,i===null?nd:i}function p0(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),nn===null||(Ns&268435455)===0&&(ld&268435455)===0||Hi(nn,ln)}function md(i,o){var c=ct;ct|=2;var h=DS();(nn!==i||ln!==o)&&(li=null,Os(i,o));do try{vU();break}catch(E){LS(i,E)}while(!0);if(Cm(),ct=c,ud.current=h,qt!==null)throw Error(n(261));return nn=null,ln=0,Kt}function vU(){for(;qt!==null;)MS(qt)}function AU(){for(;qt!==null&&!QB();)MS(qt)}function MS(i){var o=HS(i.alternate,i,Kn);i.memoizedProps=i.pendingProps,o===null?FS(i):qt=o,s0.current=null}function FS(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=yU(c,o,Kn),c!==null){qt=c;return}}else{if(c=TU(c,o),c!==null){c.flags&=32767,qt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Kt=6,qt=null;return}}if(o=o.sibling,o!==null){qt=o;return}qt=o=i}while(o!==null);Kt===0&&(Kt=5)}function Is(i,o,c){var h=gt,E=or.transition;try{or.transition=null,gt=1,CU(i,o,c,h)}finally{or.transition=E,gt=h}return null}function CU(i,o,c,h){do Go();while(Bi!==null);if((ct&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(a7(i,b),i===nn&&(qt=nn=null,ln=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||dd||(dd=!0,jS(Tc,function(){return Go(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=or.transition,or.transition=null;var v=gt;gt=1;var B=ct;ct|=4,s0.current=null,wU(i,c),CS(c,i),W7(pm),Ac=!!hm,pm=hm=null,i.current=c,_U(c),JB(),ct=B,gt=v,or.transition=b}else i.current=c;if(dd&&(dd=!1,Bi=i,fd=E),b=i.pendingLanes,b===0&&(Fi=null),t7(c.stateNode),Un(i,jt()),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(cd)throw cd=!1,i=u0,u0=null,i;return(fd&1)!==0&&i.tag!==0&&Go(),b=i.pendingLanes,(b&1)!==0?i===l0?Nu++:(Nu=0,l0=i):Nu=0,Ri(),null}function Go(){if(Bi!==null){var i=v_(fd),o=or.transition,c=gt;try{if(or.transition=null,gt=16>i?16:i,Bi===null)var h=!1;else{if(i=Bi,Bi=null,fd=0,(ct&6)!==0)throw Error(n(331));var E=ct;for(ct|=4,Pe=i.current;Pe!==null;){var b=Pe,v=b.child;if((Pe.flags&16)!==0){var B=b.deletions;if(B!==null){for(var $=0;$<B.length;$++){var ne=B[$];for(Pe=ne;Pe!==null;){var Ee=Pe;switch(Ee.tag){case 0:case 11:case 15:vu(8,Ee,b)}var Te=Ee.child;if(Te!==null)Te.return=Ee,Pe=Te;else for(;Pe!==null;){Ee=Pe;var me=Ee.sibling,Oe=Ee.return;if(_S(Ee),Ee===ne){Pe=null;break}if(me!==null){me.return=Oe,Pe=me;break}Pe=Oe}}}var Le=b.alternate;if(Le!==null){var Me=Le.child;if(Me!==null){Le.child=null;do{var zt=Me.sibling;Me.sibling=null,Me=zt}while(Me!==null)}}Pe=b}}if((b.subtreeFlags&2064)!==0&&v!==null)v.return=b,Pe=v;else e:for(;Pe!==null;){if(b=Pe,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:vu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Pe=G;break e}Pe=b.return}}var q=i.current;for(Pe=q;Pe!==null;){v=Pe;var J=v.child;if((v.subtreeFlags&2064)!==0&&J!==null)J.return=v,Pe=J;else e:for(v=q;Pe!==null;){if(B=Pe,(B.flags&2048)!==0)try{switch(B.tag){case 0:case 11:case 15:ad(9,B)}}catch(Be){Ft(B,B.return,Be)}if(B===v){Pe=null;break e}var _e=B.sibling;if(_e!==null){_e.return=B.return,Pe=_e;break e}Pe=B.return}}if(ct=E,Ri(),Hr&&typeof Hr.onPostCommitFiberRoot=="function")try{Hr.onPostCommitFiberRoot(bc,i)}catch(Be){}h=!0}return h}finally{gt=c,or.transition=o}}return!1}function BS(i,o,c){o=Vo(c,o),o=nS(i,o,1),i=Di(i,o,1),o=vn(),i!==null&&(Ja(i,1,o),Un(i,o))}function Ft(i,o,c){if(i.tag===3)BS(i,i,c);else for(;o!==null;){if(o.tag===3){BS(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Fi===null||!Fi.has(h))){i=Vo(c,i),i=rS(o,i,1),o=Di(o,i,1),i=vn(),o!==null&&(Ja(o,1,i),Un(o,i));break}}o=o.return}}function NU(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=vn(),i.pingedLanes|=i.suspendedLanes&c,nn===i&&(ln&c)===c&&(Kt===4||Kt===3&&(ln&130023424)===ln&&500>jt()-a0?Os(i,0):o0|=c),Un(i,o)}function US(i,o){o===0&&((i.mode&1)===0?o=1:(o=_c,_c<<=1,(_c&130023424)===0&&(_c=4194304)));var c=vn();i=oi(i,o),i!==null&&(Ja(i,o,c),Un(i,c))}function kU(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),US(i,c)}function OU(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),US(i,c)}var HS;HS=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||Dn.current)Fn=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return Fn=!1,EU(i,o,c);Fn=(i.flags&131072)!==0}else Fn=!1,It&&(o.flags&1048576)!==0&&Tx(o,Vc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;sd(i,o),i=o.pendingProps;var E=Mo(o,yn.current);zo(o,c),E=Bm(null,o,h,i,E,c);var b=Um();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,Mn(h)?(b=!0,jc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Im(o),E.updater=rd,o.stateNode=E,E._reactInternals=o,qm(o,h,i,c),o=Xm(null,o,h,!0,b,c)):(o.tag=0,It&&b&&wm(o),Sn(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(sd(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=PU(h),i=_r(h,i),E){case 0:o=Gm(null,o,h,i,c);break e;case 1:o=fS(null,o,h,i,c);break e;case 11:o=aS(null,o,h,i,c);break e;case 14:o=uS(null,o,h,_r(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:_r(h,E),Gm(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:_r(h,E),fS(i,o,h,E,c);case 3:e:{if(hS(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,Nx(i,o),Kc(o,h,null,c);var v=o.memoizedState;if(h=v.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){E=Vo(Error(n(423)),o),o=pS(i,o,h,c,E);break e}else if(h!==E){E=Vo(Error(n(424)),o),o=pS(i,o,h,c,E);break e}else for(Xn=Oi(o.stateNode.containerInfo.firstChild),Gn=o,It=!0,wr=null,c=Ax(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Uo(),h===E){o=ui(i,o,c);break e}Sn(i,o,h,c)}o=o.child}return o;case 5:return Ix(o),i===null&&Sm(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,v=E.children,mm(h,E)?v=null:b!==null&&mm(h,b)&&(o.flags|=32),dS(i,o),Sn(i,o,v,c),o.child;case 6:return i===null&&Sm(o),null;case 13:return mS(i,o,c);case 4:return Pm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Ho(o,null,h,c):Sn(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:_r(h,E),aS(i,o,h,E,c);case 7:return Sn(i,o,o.pendingProps,c),o.child;case 8:return Sn(i,o,o.pendingProps.children,c),o.child;case 12:return Sn(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,b=o.memoizedProps,v=E.value,xt(Wc,h._currentValue),h._currentValue=v,b!==null)if(br(b.value,v)){if(b.children===E.children&&!Dn.current){o=ui(i,o,c);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var B=b.dependencies;if(B!==null){v=b.child;for(var $=B.firstContext;$!==null;){if($.context===h){if(b.tag===1){$=ai(-1,c&-c),$.tag=2;var ne=b.updateQueue;if(ne!==null){ne=ne.shared;var Ee=ne.pending;Ee===null?$.next=$:($.next=Ee.next,Ee.next=$),ne.pending=$}}b.lanes|=c,$=b.alternate,$!==null&&($.lanes|=c),km(b.return,c,o),B.lanes|=c;break}$=$.next}}else if(b.tag===10)v=b.type===o.type?null:b.child;else if(b.tag===18){if(v=b.return,v===null)throw Error(n(341));v.lanes|=c,B=v.alternate,B!==null&&(B.lanes|=c),km(v,c,o),v=b.sibling}else v=b.child;if(v!==null)v.return=b;else for(v=b;v!==null;){if(v===o){v=null;break}if(b=v.sibling,b!==null){b.return=v.return,v=b;break}v=v.return}b=v}Sn(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,zo(o,c),E=ir(E),h=h(E),o.flags|=1,Sn(i,o,h,c),o.child;case 14:return h=o.type,E=_r(h,o.pendingProps),E=_r(h.type,E),uS(i,o,h,E,c);case 15:return lS(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:_r(h,E),sd(i,o),o.tag=1,Mn(h)?(i=!0,jc(o)):i=!1,zo(o,c),eS(o,h,E),qm(o,h,E,c),Xm(null,o,h,!0,i,c);case 19:return ES(i,o,c);case 22:return cS(i,o,c)}throw Error(n(156,o.tag))};function jS(i,o){return b_(i,o)}function IU(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 ar(i,o,c,h){return new IU(i,o,c,h)}function m0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function PU(i){if(typeof i=="function")return m0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===oe)return 11;if(i===te)return 14}return 2}function ji(i,o){var c=i.alternate;return c===null?(c=ar(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 gd(i,o,c,h,E,b){var v=2;if(h=i,typeof i=="function")m0(i)&&(v=1);else if(typeof i=="string")v=5;else e:switch(i){case W:return Ps(c.children,E,b,o);case Z:v=8,E|=8;break;case re:return i=ar(12,c,o,E|2),i.elementType=re,i.lanes=b,i;case de:return i=ar(13,c,o,E),i.elementType=de,i.lanes=b,i;case fe:return i=ar(19,c,o,E),i.elementType=fe,i.lanes=b,i;case ue:return Ed(c,E,b,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case z:v=10;break e;case K:v=9;break e;case oe:v=11;break e;case te:v=14;break e;case ve:v=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=ar(v,c,o,E),o.elementType=i,o.type=h,o.lanes=b,o}function Ps(i,o,c,h){return i=ar(7,i,h,o),i.lanes=c,i}function Ed(i,o,c,h){return i=ar(22,i,h,o),i.elementType=ue,i.lanes=c,i.stateNode={isHidden:!1},i}function g0(i,o,c){return i=ar(6,i,null,o),i.lanes=c,i}function E0(i,o,c){return o=ar(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function RU(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=Vp(0),this.expirationTimes=Vp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function y0(i,o,c,h,E,b,v,B,$){return i=new RU(i,o,c,B,$),o===1?(o=1,b===!0&&(o|=8)):o=0,b=ar(3,null,null,o),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Im(b),i}function LU(i,o,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:o,implementation:c}}function zS(i){if(!i)return Pi;i=i._reactInternals;e:{if(bs(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(Mn(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(Mn(c))return gx(i,c,o)}return o}function $S(i,o,c,h,E,b,v,B,$){return i=y0(c,h,!0,i,E,b,v,B,$),i.context=zS(null),c=i.current,h=vn(),E=Ui(c),b=ai(h,E),b.callback=o!=null?o:null,Di(c,b,E),i.current.lanes=E,Ja(i,E,h),Un(i,h),i}function yd(i,o,c,h){var E=o.current,b=vn(),v=Ui(E);return c=zS(c),o.context===null?o.context=c:o.pendingContext=c,o=ai(b,v),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Di(E,o,v),i!==null&&(vr(i,E,v,b),Xc(i,E,v)),v}function Td(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function VS(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function T0(i,o){VS(i,o),(i=i.alternate)&&VS(i,o)}function DU(){return null}var qS=typeof reportError=="function"?reportError:function(i){console.error(i)};function b0(i){this._internalRoot=i}bd.prototype.render=b0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));yd(i,o,null,null)},bd.prototype.unmount=b0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;ks(function(){yd(null,i,null,null)}),o[ni]=null}};function bd(i){this._internalRoot=i}bd.prototype.unstable_scheduleHydration=function(i){if(i){var o=N_();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Ci.length&&o!==0&&o<Ci[c].priority;c++);Ci.splice(c,0,i),c===0&&I_(i)}};function w0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function wd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function YS(){}function MU(i,o,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var ne=Td(v);b.call(ne)}}var v=$S(o,h,i,0,null,!1,!1,"",YS);return i._reactRootContainer=v,i[ni]=v.current,fu(i.nodeType===8?i.parentNode:i),ks(),v}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var B=h;h=function(){var ne=Td($);B.call(ne)}}var $=y0(i,0,!1,null,null,!1,!1,"",YS);return i._reactRootContainer=$,i[ni]=$.current,fu(i.nodeType===8?i.parentNode:i),ks(function(){yd(o,$,c,h)}),$}function _d(i,o,c,h,E){var b=c._reactRootContainer;if(b){var v=b;if(typeof E=="function"){var B=E;E=function(){var $=Td(v);B.call($)}}yd(o,v,i,E)}else v=MU(c,o,i,E,h);return Td(v)}A_=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=Qa(o.pendingLanes);c!==0&&(qp(o,c|1),Un(o,jt()),(ct&6)===0&&(Wo=jt()+500,Ri()))}break;case 13:ks(function(){var h=oi(i,1);if(h!==null){var E=vn();vr(h,i,1,E)}}),T0(i,1)}},Yp=function(i){if(i.tag===13){var o=oi(i,134217728);if(o!==null){var c=vn();vr(o,i,134217728,c)}T0(i,134217728)}},C_=function(i){if(i.tag===13){var o=Ui(i),c=oi(i,o);if(c!==null){var h=vn();vr(c,i,o,h)}T0(i,o)}},N_=function(){return gt},k_=function(i,o){var c=gt;try{return gt=i,o()}finally{gt=c}},qn=function(i,o,c){switch(o){case"input":if(_t(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=Uc(h);if(!E)throw Error(n(90));bt(h),_t(h,E)}}}break;case"textarea":ys(i,c);break;case"select":o=c.value,o!=null&&ot(i,!!c.multiple,o,!1)}},h_=f0,p_=ks;var FU={usingClientEntryPoint:!1,Events:[mu,Lo,Uc,Wa,f_,f0]},ku={findFiberByHostInstance:ws,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},BU={bundleType:ku.bundleType,version:ku.version,rendererPackageName:ku.rendererPackageName,rendererConfig:ku.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=y_(i),i===null?null:i.stateNode},findFiberByHostInstance:ku.findFiberByHostInstance||DU,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 xd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xd.isDisabled&&xd.supportsFiber)try{bc=xd.inject(BU),Hr=xd}catch(i){}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=FU,kn.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!w0(o))throw Error(n(200));return LU(i,o,null,c)},kn.createRoot=function(i,o){if(!w0(i))throw Error(n(299));var c=!1,h="",E=qS;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=y0(i,1,!1,null,null,c,!1,h,E),i[ni]=o.current,fu(i.nodeType===8?i.parentNode:i),new b0(o)},kn.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=y_(o),i=i===null?null:i.stateNode,i},kn.flushSync=function(i){return ks(i)},kn.hydrate=function(i,o,c){if(!wd(o))throw Error(n(200));return _d(null,i,o,!0,c)},kn.hydrateRoot=function(i,o,c){if(!w0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",v=qS;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(v=c.onRecoverableError)),o=$S(o,null,i,1,c!=null?c:null,E,!1,b,v),i[ni]=o.current,fu(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 bd(o)},kn.render=function(i,o,c){if(!wd(o))throw Error(n(200));return _d(null,i,o,!1,c)},kn.unmountComponentAtNode=function(i){if(!wd(i))throw Error(n(40));return i._reactRootContainer?(ks(function(){_d(null,null,i,!1,function(){i._reactRootContainer=null,i[ni]=null})}),!0):!1},kn.unstable_batchedUpdates=f0,kn.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!wd(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return _d(i,o,c,!1,h)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var A1;function C1(){if(A1)return Cf.exports;A1=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(),Cf.exports=ON(),Cf.exports}var Ys=C1();function N1(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=N1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function M(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=N1(e))&&(r&&(r+=" "),r+=t);return r}var k1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},O1=Vi.createContext&&Vi.createContext(k1),IN=["attr","size","title"];function PN(e,t){if(e==null)return{};var n=RN(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 RN(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 cl(){return cl=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},cl.apply(this,arguments)}function I1(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 dl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I1(Object(n),!0).forEach(function(r){LN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LN(e,t,n){return t=DN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DN(e){var t=MN(e,"string");return typeof t=="symbol"?t:t+""}function MN(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 P1(e){return e&&e.map((t,n)=>Vi.createElement(t.tag,dl({key:n},t.attr),P1(t.child)))}function mt(e){return t=>Vi.createElement(FN,cl({attr:dl({},e.attr)},t),P1(e.child))}function FN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=PN(e,IN),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Vi.createElement("svg",cl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:dl(dl({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&Vi.createElement("title",null,a),e.children)};return O1!==void 0?Vi.createElement(O1.Consumer,null,n=>t(n)):t(k1)}function BN(e){return mt({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function UN(e){return mt({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function HN(e){return mt({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const fr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:w.jsx("button",{className:M(e,`${k}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?w.jsx("img",{className:M(`${k}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),jN="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",zN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ft(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?w.jsx(HN,{className:M(t,`${k}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||jN,alt:"Copilot",className:M(t,`${k}-minimized-icon-img`)});return w.jsx(fr,{className:M(t,`${k}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},$N=()=>{const{globalClassName:e,themeVariables:t}=ft(),n=()=>{Fs(!1),Yr(!0)};return Ys.createPortal(w.jsx("div",{className:M(e,`${k}-minimized-container`),style:t,children:w.jsx(zN,{onClick:n})}),document.body)};function VN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function fn(){const e=P.useContext(Jg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const qN=e=>({[`${Hn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Hn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Hn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Hn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Hn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Hn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function R1(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function YN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function Of(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function WN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function GN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function XN(e){return mt({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 L1(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function D1(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function KN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function QN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function JN(e){return mt({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 ZN(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function M1(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}const If=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>w.jsx("button",{className:M(`${k}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),ek=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:M(`${k}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(Of,{size:"16px"})},tk=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(fr,{className:M(e,n,`cim-${r}-component`,`${k}-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:w.jsx(Of,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(If,{className:M(e,n,`cim-${r}-component`,`${k}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&w.jsx(ek,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function pH(){}function mH(){}function F1(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 B1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const nk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ik={};function U1(e,t){return(ik.jsx?rk:nk).test(e)}const sk=/[ \t\n\f\r]/g;function ok(e){return typeof e=="object"?e.type==="text"?H1(e.value):!1:H1(e)}function H1(e){return e.replace(sk,"")===""}class ca{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ca.prototype.normal={},ca.prototype.property={},ca.prototype.space=void 0;function j1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ca(n,r,t)}function da(e){return e.toLowerCase()}class On{constructor(t,n){this.attribute=n,this.property=t}}On.prototype.attribute="",On.prototype.booleanish=!1,On.prototype.boolean=!1,On.prototype.commaOrSpaceSeparated=!1,On.prototype.commaSeparated=!1,On.prototype.defined=!1,On.prototype.mustUseProperty=!1,On.prototype.number=!1,On.prototype.overloadedBoolean=!1,On.prototype.property="",On.prototype.spaceSeparated=!1,On.prototype.space=void 0;let ak=0;const Je=es(),Vt=es(),Pf=es(),we=es(),yt=es(),Zi=es(),zn=es();function es(){return vd(2,++ak)}const Rf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Je,booleanish:Vt,commaOrSpaceSeparated:zn,commaSeparated:Zi,number:we,overloadedBoolean:Pf,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),Lf=Object.keys(Rf);class Df extends On{constructor(t,n,r,s){let a=-1;if(super(t,n),z1(this,"space",s),typeof r=="number")for(;++a<Lf.length;){const u=Lf[a];z1(this,Lf[a],(r&Rf[u])===Rf[u])}}}Df.prototype.defined=!0;function z1(e,t,n){n&&(e[t]=n)}function Ws(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Df(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[da(r)]=r,n[da(a.attribute)]=r}return new ca(t,n,e.space)}const $1=Ws({properties:{ariaActiveDescendant:null,ariaAtomic:Vt,ariaAutoComplete:null,ariaBusy:Vt,ariaChecked:Vt,ariaColCount:we,ariaColIndex:we,ariaColSpan:we,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:Vt,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:Vt,ariaFlowTo:yt,ariaGrabbed:Vt,ariaHasPopup:null,ariaHidden:Vt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:we,ariaLive:null,ariaModal:Vt,ariaMultiLine:Vt,ariaMultiSelectable:Vt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:we,ariaPressed:Vt,ariaReadOnly:Vt,ariaRelevant:null,ariaRequired:Vt,ariaRoleDescription:yt,ariaRowCount:we,ariaRowIndex:we,ariaRowSpan:we,ariaSelected:Vt,ariaSetSize:we,ariaSort:null,ariaValueMax:we,ariaValueMin:we,ariaValueNow:we,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function V1(e,t){return t in e?e[t]:t}function q1(e,t){return V1(e,t.toLowerCase())}const uk=Ws({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zi,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Je,allowPaymentRequest:Je,allowUserMedia:Je,alpha:Je,alt:null,as:null,async:Je,autoCapitalize:null,autoComplete:yt,autoFocus:Je,autoPlay:Je,blocking:yt,capture:null,charSet:null,checked:Je,cite:null,className:yt,closedBy:null,colorSpace:null,cols:we,colSpan:we,command:null,commandFor:null,content:null,contentEditable:Vt,controls:Je,controlsList:yt,coords:we|Zi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Je,defer:Je,dir:null,dirName:null,disabled:Je,download:Pf,draggable:Vt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Je,formTarget:null,headers:yt,height:we,hidden:Pf,high:we,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Je,inputMode:null,integrity:null,is:null,isMap:Je,itemId:null,itemProp:yt,itemRef:yt,itemScope:Je,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Je,low:we,manifest:null,max:null,maxLength:we,media:null,method:null,min:null,minLength:we,multiple:Je,muted:Je,name:null,nonce:null,noModule:Je,noValidate:Je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Je,optimum:we,pattern:null,ping:yt,placeholder:null,playsInline:Je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Je,referrerPolicy:null,rel:yt,required:Je,reversed:Je,rows:we,rowSpan:we,sandbox:yt,scope:null,scoped:Je,seamless:Je,selected:Je,shadowRootClonable:Je,shadowRootCustomElementRegistry:Je,shadowRootDelegatesFocus:Je,shadowRootMode:null,shadowRootSerializable:Je,shape:null,size:we,sizes:null,slot:null,span:we,spellCheck:Vt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:we,step:null,style:null,tabIndex:we,target:null,title:null,translate:null,type:null,typeMustMatch:Je,useMap:null,value:Vt,width:we,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:we,borderColor:null,bottomMargin:we,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Je,declare:Je,event:null,face:null,frame:null,frameBorder:null,hSpace:we,leftMargin:we,link:null,longDesc:null,lowSrc:null,marginHeight:we,marginWidth:we,noResize:Je,noHref:Je,noShade:Je,noWrap:Je,object:null,profile:null,prompt:null,rev:null,rightMargin:we,rules:null,scheme:null,scrolling:Vt,standby:null,summary:null,text:null,topMargin:we,valueType:null,version:null,vAlign:null,vLink:null,vSpace:we,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Je,disablePictureInPicture:Je,disableRemotePlayback:Je,exportParts:Zi,part:yt,prefix:null,property:null,results:we,security:null,unselectable:null},space:"html",transform:q1}),lk=Ws({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:zn,accentHeight:we,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:we,amplitude:we,arabicForm:null,ascent:we,attributeName:null,attributeType:null,azimuth:we,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:we,by:null,calcMode:null,capHeight:we,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:we,diffuseConstant:we,direction:null,display:null,dur:null,divisor:we,dominantBaseline:null,download:Je,dx:null,dy:null,edgeMode:null,editable:null,elevation:we,enableBackground:null,end:null,event:null,exponent:we,externalResourcesRequired:null,fill:null,fillOpacity:we,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:Zi,g2:Zi,glyphName:Zi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:we,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:we,horizOriginX:we,horizOriginY:we,id:null,ideographic:we,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:we,k:we,k1:we,k2:we,k3:we,k4:we,kernelMatrix:zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:we,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:we,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:we,overlineThickness:we,paintOrder:null,panose1:null,path:null,pathLength:we,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:we,pointsAtY:we,pointsAtZ:we,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zn,rev:zn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zn,requiredFeatures:zn,requiredFonts:zn,requiredFormats:zn,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:we,specularExponent:we,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:we,strikethroughThickness:we,string:null,stroke:null,strokeDashArray:zn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:we,strokeOpacity:we,strokeWidth:null,style:null,surfaceScale:we,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zn,tabIndex:we,tableValues:null,target:null,targetX:we,targetY:we,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:we,underlineThickness:we,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:we,values:null,vAlphabetic:we,vMathematical:we,vectorEffect:null,vHanging:we,vIdeographic:we,version:null,vertAdvY:we,vertOriginX:we,vertOriginY:we,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:we,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:V1}),Y1=Ws({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()}}),W1=Ws({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:q1}),G1=Ws({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ck={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"},dk=/[A-Z]/g,X1=/-[a-z]/g,fk=/^data[-\w.:]+$/i;function fl(e,t){const n=da(t);let r=t,s=On;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&fk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(X1,pk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!X1.test(a)){let u=a.replace(dk,hk);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=Df}return new s(r,t)}function hk(e){return"-"+e.toLowerCase()}function pk(e){return e.charAt(1).toUpperCase()}const fa=j1([$1,uk,Y1,W1,G1],"html"),hi=j1([$1,lk,Y1,W1,G1],"svg");function K1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Q1(e){return e.join(" ").trim()}var Gs={},Mf,J1;function mk(){if(J1)return Mf;J1=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
24
|
`,f="/",p="*",m="",y="comment",T="declaration";function _(x,S){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];S=S||{};var N=1,O=1;function j(fe){var te=fe.match(t);te&&(N+=te.length);var ve=fe.lastIndexOf(d);O=~ve?fe.length-ve:O+fe.length}function V(){var fe={line:N,column:O};return function(te){return te.position=new D(fe),re(),te}}function D(fe){this.start=fe,this.end={line:N,column:O},this.source=S.source}D.prototype.content=x;function W(fe){var te=new Error(S.source+":"+N+":"+O+": "+fe);if(te.reason=fe,te.filename=S.source,te.line=N,te.column=O,te.source=x,!S.silent)throw te}function Z(fe){var te=fe.exec(x);if(te){var ve=te[0];return j(ve),x=x.slice(ve.length),te}}function re(){Z(n)}function z(fe){var te;for(fe=fe||[];te=K();)te!==!1&&fe.push(te);return fe}function K(){var fe=V();if(!(f!=x.charAt(0)||p!=x.charAt(1))){for(var te=2;m!=x.charAt(te)&&(p!=x.charAt(te)||f!=x.charAt(te+1));)++te;if(te+=2,m===x.charAt(te-1))return W("End of comment missing");var ve=x.slice(2,te-2);return O+=2,j(ve),x=x.slice(te),O+=2,fe({type:y,comment:ve})}}function oe(){var fe=V(),te=Z(r);if(te){if(K(),!Z(s))return W("property missing ':'");var ve=Z(a),ue=fe({type:T,property:A(te[0].replace(e,m)),value:ve?A(ve[0].replace(e,m)):m});return Z(u),ue}}function de(){var fe=[];z(fe);for(var te;te=oe();)te!==!1&&(fe.push(te),z(fe));return fe}return re(),de()}function A(x){return x?x.replace(l,m):m}return Mf=_,Mf}var Z1;function gk(){if(Z1)return Gs;Z1=1;var e=Gs&&Gs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.default=n;const t=e(mk());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 Gs}var ha={},eE;function Ek(){if(eE)return ha;eE=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.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 ha.camelCase=d,ha}var pa,tE;function yk(){if(tE)return pa;tE=1;var e=pa&&pa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(gk()),n=Ek();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,pa=r,pa}var Tk=yk();const bk=rt(Tk),hl=nE("end"),kr=nE("start");function nE(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 rE(e){const t=kr(e),n=hl(e);if(t&&n)return{start:t,end:n}}function ma(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?iE(e.position):"start"in e||"end"in e?iE(e):"line"in e||"column"in e?Ff(e):""}function Ff(e){return sE(e&&e.line)+":"+sE(e&&e.column)}function iE(e){return Ff(e&&e.start)+"-"+Ff(e&&e.end)}function sE(e){return e&&typeof e=="number"?e:1}class hn 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=ma(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}}hn.prototype.file="",hn.prototype.name="",hn.prototype.reason="",hn.prototype.message="",hn.prototype.stack="",hn.prototype.column=void 0,hn.prototype.line=void 0,hn.prototype.ancestors=void 0,hn.prototype.cause=void 0,hn.prototype.fatal=void 0,hn.prototype.place=void 0,hn.prototype.ruleId=void 0,hn.prototype.source=void 0;const Bf={}.hasOwnProperty,wk=new Map,_k=/[A-Z]/g,xk=new Set(["table","tbody","thead","tfoot","tr"]),Sk=new Set(["td","th"]),oE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vk(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=Rk(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=Pk(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"?hi:fa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=aE(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function aE(e,t,n){if(t.type==="element")return Ak(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ck(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return kk(e,t,n);if(t.type==="mdxjsEsm")return Nk(e,t);if(t.type==="root")return Ok(e,t,n);if(t.type==="text")return Ik(e,t)}function Ak(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=hi,e.schema=s),e.ancestors.push(t);const a=lE(e,t.tagName,!1),u=Lk(e,t);let l=Hf(e,t);return xk.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!ok(d):!0})),uE(e,u,a,t),Uf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Ck(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)}ga(e,t.position)}function Nk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ga(e,t.position)}function kk(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=hi,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:lE(e,t.name,!0),u=Dk(e,t),l=Hf(e,t);return uE(e,u,a,t),Uf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Ok(e,t,n){const r={};return Uf(r,Hf(e,t)),e.create(t,e.Fragment,r,n)}function Ik(e,t){return t.value}function uE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Uf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Pk(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 Rk(e,t){return n;function n(r,s,a,u){const l=Array.isArray(a.children),d=kr(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 Lk(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Bf.call(t.properties,s)){const a=Mk(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 Dk(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 ga(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 ga(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Hf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:wk;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=aE(e,a,u);l!==void 0&&n.push(l)}return n}function Mk(e,t,n){const r=fl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?B1(n):Q1(n)),r.property==="style"){let s=typeof n=="object"?n:Fk(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Bk(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?ck[r.property]||r.property:r.attribute,n]}}function Fk(e,t){try{return bk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new hn("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=oE+"#cannot-parse-style-attribute",s}}function lE(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=U1(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=U1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Bf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);ga(e)}function ga(e,t){const n=new hn("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=oE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Bk(e){const t={};let n;for(n in e)Bf.call(e,n)&&(t[Uk(n)]=e[n]);return t}function Uk(e){let t=e.replace(_k,Hk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Hk(e){return"-"+e.toLowerCase()}const jf={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"]},jk={};function zf(e,t){const n=jk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return cE(e,r,s)}function cE(e,t,n){if(zk(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 dE(e.children,t,n)}return Array.isArray(e)?dE(e,t,n):""}function dE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=cE(e[s],t,n);return r.join("")}function zk(e){return!!(e&&typeof e=="object")}const fE=document.createElement("i");function $f(e){const t="&"+e+";";fE.innerHTML=t;const n=fE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function $n(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?($n(e,e.length,0,t),e):t}const hE={}.hasOwnProperty;function pE(e){const t={};let n=-1;for(;++n<e.length;)$k(t,e[n]);return t}function $k(e,t){let n;for(n in t){const s=(hE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){hE.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]);$n(e,0,0,r)}function mE(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 hr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xn=pi(/[A-Za-z]/),pn=pi(/[\dA-Za-z]/),qk=pi(/[#-'*+\--9=?A-Z^-~]/);function pl(e){return e!==null&&(e<32||e===127)}const Vf=pi(/\d/),Yk=pi(/[\dA-Fa-f]/),Wk=pi(/[!-/:-@[-`{-~]/);function Ve(e){return e!==null&&e<-2}function Tt(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const ml=pi(new RegExp("\\p{P}|\\p{S}","u")),ts=pi(/\s/);function pi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Xs(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&pn(e.charCodeAt(n+1))&&pn(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 at(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return it(d)?(e.enter(n),l(d)):t(d)}function l(d){return it(d)&&a++<s?(e.consume(d),l):(e.exit(n),t(d))}}const Gk={tokenize:Xk};function Xk(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"),at(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 Ve(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const Kk={tokenize:Qk},gE={tokenize:Jk};function Qk(e){const t=this,n=[];let r=0,s,a,u;return l;function l(O){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,d,f)(O)}return f(O)}function d(O){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&N();const j=t.events.length;let V=j,D;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){D=t.events[V][1].end;break}S(r);let W=j;for(;W<t.events.length;)t.events[W][1].end=U({},D),W++;return $n(t.events,V+1,0,t.events.slice(j)),t.events.length=W,f(O)}return l(O)}function f(O){if(r===n.length){if(!s)return y(O);if(s.currentConstruct&&s.currentConstruct.concrete)return _(O);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(gE,p,m)(O)}function p(O){return s&&N(),S(r),y(O)}function m(O){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(O)}function y(O){return t.containerState={},e.attempt(gE,T,_)(O)}function T(O){return r++,n.push([t.currentConstruct,t.containerState]),y(O)}function _(O){if(O===null){s&&N(),S(0),e.consume(O);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),A(O)}function A(O){if(O===null){x(e.exit("chunkFlow"),!0),S(0),e.consume(O);return}return Ve(O)?(e.consume(O),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(O),A)}function x(O,j){const V=t.sliceStream(O);if(j&&V.push(null),O.previous=a,a&&(a.next=O),a=O,s.defineSkip(O.start),s.write(V),t.parser.lazy[O.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<u&&(!s.events[D][1].end||s.events[D][1].end.offset>u))return;const W=t.events.length;let Z=W,re,z;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(re){z=t.events[Z][1].end;break}re=!0}for(S(r),D=W;D<t.events.length;)t.events[D][1].end=U({},z),D++;$n(t.events,Z+1,0,t.events.slice(W)),t.events.length=D}}function S(O){let j=n.length;for(;j-- >O;){const V=n[j];t.containerState=V[1],V[0].exit.call(t,e)}n.length=O}function N(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function Jk(e,t,n){return at(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ks(e){if(e===null||Tt(e)||ts(e))return 1;if(ml(e))return 2}function gl(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 qf={name:"attention",resolveAll:Zk,tokenize:e3};function Zk(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),y=U({},e[n][1].start);EE(m,-d),EE(y,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:y},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,gl(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,$n(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 e3(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Ks(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=Ks(d),m=!p||p===2&&s||n.includes(d),y=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!y)),f._close=!!(a===42?y:y&&(p||!m)),t(d)}}function EE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const t3={name:"autolink",tokenize:n3};function n3(e,t,n){let r=0;return s;function s(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(T){return xn(T)?(e.consume(T),u):T===64?n(T):f(T)}function u(T){return T===43||T===45||T===46||pn(T)?(r=1,l(T)):f(T)}function l(T){return T===58?(e.consume(T),r=0,d):(T===43||T===45||T===46||pn(T))&&r++<32?(e.consume(T),l):(r=0,f(T))}function d(T){return T===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):T===null||T===32||T===60||pl(T)?n(T):(e.consume(T),d)}function f(T){return T===64?(e.consume(T),p):qk(T)?(e.consume(T),f):n(T)}function p(T){return pn(T)?m(T):n(T)}function m(T){return T===46?(e.consume(T),r=0,p):T===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):y(T)}function y(T){if((T===45||pn(T))&&r++<63){const _=T===45?y:m;return e.consume(T),_}return n(T)}}const Ea={partial:!0,tokenize:r3};function r3(e,t,n){return r;function r(a){return it(a)?at(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Ve(a)?t(a):n(a)}}const yE={continuation:{tokenize:s3},exit:o3,name:"blockQuote",tokenize:i3};function i3(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 it(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function s3(e,t,n){const r=this;return s;function s(u){return it(u)?at(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(yE,t,n)(u)}}function o3(e){e.exit("blockQuote")}const TE={name:"characterEscape",tokenize:a3};function a3(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 Wk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const bE={name:"characterReference",tokenize:u3};function u3(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=pn,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=Yk,p):(e.enter("characterReferenceValue"),a=7,u=Vf,p(m))}function p(m){if(m===59&&s){const y=e.exit("characterReferenceValue");return u===pn&&!$f(r.sliceSerialize(y))?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 wE={partial:!0,tokenize:c3},_E={concrete:!0,name:"codeFenced",tokenize:l3};function l3(e,t,n){const r=this,s={partial:!0,tokenize:V};let a=0,u=0,l;return d;function d(D){return f(D)}function f(D){const W=r.events[r.events.length-1];return a=W&&W[1].type==="linePrefix"?W[2].sliceSerialize(W[1],!0).length:0,l=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===l?(u++,e.consume(D),p):u<3?n(D):(e.exit("codeFencedFenceSequence"),it(D)?at(e,m,"whitespace")(D):m(D))}function m(D){return D===null||Ve(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(wE,A,j)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(D))}function y(D){return D===null||Ve(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(D)):it(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,T,"whitespace")(D)):D===96&&D===l?n(D):(e.consume(D),y)}function T(D){return D===null||Ve(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||Ve(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===l?n(D):(e.consume(D),_)}function A(D){return e.attempt(s,j,x)(D)}function x(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),S}function S(D){return a>0&&it(D)?at(e,N,"linePrefix",a+1)(D):N(D)}function N(D){return D===null||Ve(D)?e.check(wE,A,j)(D):(e.enter("codeFlowValue"),O(D))}function O(D){return D===null||Ve(D)?(e.exit("codeFlowValue"),N(D)):(e.consume(D),O)}function j(D){return e.exit("codeFenced"),t(D)}function V(D,W,Z){let re=0;return z;function z(te){return D.enter("lineEnding"),D.consume(te),D.exit("lineEnding"),K}function K(te){return D.enter("codeFencedFence"),it(te)?at(D,oe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):oe(te)}function oe(te){return te===l?(D.enter("codeFencedFenceSequence"),de(te)):Z(te)}function de(te){return te===l?(re++,D.consume(te),de):re>=u?(D.exit("codeFencedFenceSequence"),it(te)?at(D,fe,"whitespace")(te):fe(te)):Z(te)}function fe(te){return te===null||Ve(te)?(D.exit("codeFencedFence"),W(te)):Z(te)}}}function c3(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 Yf={name:"codeIndented",tokenize:f3},d3={partial:!0,tokenize:h3};function f3(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),at(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):Ve(f)?e.attempt(d3,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||Ve(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function h3(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Ve(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):at(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):Ve(u)?s(u):n(u)}}const p3={name:"codeText",previous:g3,resolve:m3,tokenize:E3};function m3(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 g3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function E3(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)):Ve(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||Ve(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 y3{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&&ya(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),ya(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ya(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);ya(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ya(this.left,n.reverse())}}}function ya(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 xE(e){const t={};let n=-1,r,s,a,u,l,d,f;const p=new y3(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,T3(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 $n(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function T3(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,y=-1,T=n,_=0,A=0;const x=[A];for(;T;){for(;e.get(++s)[1]!==T;);a.push(s),T._tokenizer||(p=r.sliceStream(T),T.next||p.push(null),m&&u.defineSkip(T.start),T._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),T._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=T,T=T.next}for(T=n;++y<l.length;)l[y][0]==="exit"&&l[y-1][0]==="enter"&&l[y][1].type===l[y-1][1].type&&l[y][1].start.line!==l[y][1].end.line&&(A=y+1,x.push(A),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(u.events=[],T?(T._tokenizer=void 0,T.previous=void 0):x.pop(),y=x.length;y--;){const S=l.slice(x[y],x[y+1]),N=a.pop();d.push([N,N+S.length-1]),e.splice(N,2,S)}for(d.reverse(),y=-1;++y<d.length;)f[_+d[y][0]]=_+d[y][1],_+=d[y][1]-d[y][0]-1;return f}const b3={resolve:_3,tokenize:x3},w3={partial:!0,tokenize:S3};function _3(e){return xE(e),e}function x3(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):Ve(l)?e.check(w3,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 S3(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),at(e,a,"linePrefix")}function a(u){if(u===null||Ve(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 SE(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),y):S===null||S===32||S===41||pl(S)?n(S):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),A(S))}function y(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"}),T(S))}function T(S){return S===62?(e.exit("chunkString"),e.exit(l),y(S)):S===null||S===60||Ve(S)?n(S):(e.consume(S),S===92?_:T)}function _(S){return S===60||S===62||S===92?(e.consume(S),T):T(S)}function A(S){return!p&&(S===null||S===41||Tt(S))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(S)):p<f&&S===40?(e.consume(S),p++,A):S===41?(e.consume(S),p--,A):S===null||S===32||S===40||pl(S)?n(S):(e.consume(S),S===92?x:A)}function x(S){return S===40||S===41||S===92?(e.consume(S),A):A(S)}}function vE(e,t,n,r,s,a){const u=this;let l=0,d;return f;function f(T){return e.enter(r),e.enter(s),e.consume(T),e.exit(s),e.enter(a),p}function p(T){return l>999||T===null||T===91||T===93&&!d||T===94&&!l&&"_hiddenFootnoteSupport"in u.parser.constructs?n(T):T===93?(e.exit(a),e.enter(s),e.consume(T),e.exit(s),e.exit(r),t):Ve(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(T))}function m(T){return T===null||T===91||T===93||Ve(T)||l++>999?(e.exit("chunkString"),p(T)):(e.consume(T),d||(d=!it(T)),T===92?y:m)}function y(T){return T===91||T===92||T===93?(e.consume(T),l++,m):m(T)}}function AE(e,t,n,r,s,a){let u;return l;function l(y){return y===34||y===39||y===40?(e.enter(r),e.enter(s),e.consume(y),e.exit(s),u=y===40?41:y,d):n(y)}function d(y){return y===u?(e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):(e.enter(a),f(y))}function f(y){return y===u?(e.exit(a),d(u)):y===null?n(y):Ve(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),at(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===u||y===null||Ve(y)?(e.exit("chunkString"),f(y)):(e.consume(y),y===92?m:p)}function m(y){return y===u||y===92?(e.consume(y),p):p(y)}}function Ta(e,t){let n;return r;function r(s){return Ve(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):it(s)?at(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const v3={name:"definition",tokenize:C3},A3={partial:!0,tokenize:N3};function C3(e,t,n){const r=this;let s;return a;function a(T){return e.enter("definition"),u(T)}function u(T){return vE.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function l(T){return s=hr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),d):n(T)}function d(T){return Tt(T)?Ta(e,f)(T):f(T)}function f(T){return SE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function p(T){return e.attempt(A3,m,m)(T)}function m(T){return it(T)?at(e,y,"whitespace")(T):y(T)}function y(T){return T===null||Ve(T)?(e.exit("definition"),r.parser.defined.push(s),t(T)):n(T)}}function N3(e,t,n){return r;function r(l){return Tt(l)?Ta(e,s)(l):n(l)}function s(l){return AE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return it(l)?at(e,u,"whitespace")(l):u(l)}function u(l){return l===null||Ve(l)?t(l):n(l)}}const k3={name:"hardBreakEscape",tokenize:O3};function O3(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Ve(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const I3={name:"headingAtx",resolve:P3,tokenize:R3};function P3(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"},$n(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function R3(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||Tt(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Ve(p)?(e.exit("atxHeading"),t(p)):it(p)?at(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||Tt(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const L3=["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"],CE=["pre","script","style","textarea"],D3={concrete:!0,name:"htmlFlow",resolveTo:B3,tokenize:U3},M3={partial:!0,tokenize:j3},F3={partial:!0,tokenize:H3};function B3(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 U3(e,t,n){const r=this;let s,a,u,l,d;return f;function f(R){return p(R)}function p(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),m}function m(R){return R===33?(e.consume(R),y):R===47?(e.consume(R),a=!0,A):R===63?(e.consume(R),s=3,r.interrupt?t:C):xn(R)?(e.consume(R),u=String.fromCharCode(R),x):n(R)}function y(R){return R===45?(e.consume(R),s=2,T):R===91?(e.consume(R),s=5,l=0,_):xn(R)?(e.consume(R),s=4,r.interrupt?t:C):n(R)}function T(R){return R===45?(e.consume(R),r.interrupt?t:C):n(R)}function _(R){const Ce="CDATA[";return R===Ce.charCodeAt(l++)?(e.consume(R),l===Ce.length?r.interrupt?t:oe:_):n(R)}function A(R){return xn(R)?(e.consume(R),u=String.fromCharCode(R),x):n(R)}function x(R){if(R===null||R===47||R===62||Tt(R)){const Ce=R===47,Re=u.toLowerCase();return!Ce&&!a&&CE.includes(Re)?(s=1,r.interrupt?t(R):oe(R)):L3.includes(u.toLowerCase())?(s=6,Ce?(e.consume(R),S):r.interrupt?t(R):oe(R)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):a?N(R):O(R))}return R===45||pn(R)?(e.consume(R),u+=String.fromCharCode(R),x):n(R)}function S(R){return R===62?(e.consume(R),r.interrupt?t:oe):n(R)}function N(R){return it(R)?(e.consume(R),N):z(R)}function O(R){return R===47?(e.consume(R),z):R===58||R===95||xn(R)?(e.consume(R),j):it(R)?(e.consume(R),O):z(R)}function j(R){return R===45||R===46||R===58||R===95||pn(R)?(e.consume(R),j):V(R)}function V(R){return R===61?(e.consume(R),D):it(R)?(e.consume(R),V):O(R)}function D(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),d=R,W):it(R)?(e.consume(R),D):Z(R)}function W(R){return R===d?(e.consume(R),d=null,re):R===null||Ve(R)?n(R):(e.consume(R),W)}function Z(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Tt(R)?V(R):(e.consume(R),Z)}function re(R){return R===47||R===62||it(R)?O(R):n(R)}function z(R){return R===62?(e.consume(R),K):n(R)}function K(R){return R===null||Ve(R)?oe(R):it(R)?(e.consume(R),K):n(R)}function oe(R){return R===45&&s===2?(e.consume(R),ve):R===60&&s===1?(e.consume(R),ue):R===62&&s===4?(e.consume(R),F):R===63&&s===3?(e.consume(R),C):R===93&&s===5?(e.consume(R),le):Ve(R)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(M3,ee,de)(R)):R===null||Ve(R)?(e.exit("htmlFlowData"),de(R)):(e.consume(R),oe)}function de(R){return e.check(F3,fe,ee)(R)}function fe(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),te}function te(R){return R===null||Ve(R)?de(R):(e.enter("htmlFlowData"),oe(R))}function ve(R){return R===45?(e.consume(R),C):oe(R)}function ue(R){return R===47?(e.consume(R),u="",Q):oe(R)}function Q(R){if(R===62){const Ce=u.toLowerCase();return CE.includes(Ce)?(e.consume(R),F):oe(R)}return xn(R)&&u.length<8?(e.consume(R),u+=String.fromCharCode(R),Q):oe(R)}function le(R){return R===93?(e.consume(R),C):oe(R)}function C(R){return R===62?(e.consume(R),F):R===45&&s===2?(e.consume(R),C):oe(R)}function F(R){return R===null||Ve(R)?(e.exit("htmlFlowData"),ee(R)):(e.consume(R),F)}function ee(R){return e.exit("htmlFlow"),t(R)}}function H3(e,t,n){const r=this;return s;function s(u){return Ve(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 j3(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Ea,t,n)}}const z3={name:"htmlText",tokenize:$3};function $3(e,t,n){const r=this;let s,a,u;return l;function l(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),f):C===47?(e.consume(C),V):C===63?(e.consume(C),O):xn(C)?(e.consume(C),Z):n(C)}function f(C){return C===45?(e.consume(C),p):C===91?(e.consume(C),a=0,_):xn(C)?(e.consume(C),N):n(C)}function p(C){return C===45?(e.consume(C),T):n(C)}function m(C){return C===null?n(C):C===45?(e.consume(C),y):Ve(C)?(u=m,ue(C)):(e.consume(C),m)}function y(C){return C===45?(e.consume(C),T):m(C)}function T(C){return C===62?ve(C):C===45?y(C):m(C)}function _(C){const F="CDATA[";return C===F.charCodeAt(a++)?(e.consume(C),a===F.length?A:_):n(C)}function A(C){return C===null?n(C):C===93?(e.consume(C),x):Ve(C)?(u=A,ue(C)):(e.consume(C),A)}function x(C){return C===93?(e.consume(C),S):A(C)}function S(C){return C===62?ve(C):C===93?(e.consume(C),S):A(C)}function N(C){return C===null||C===62?ve(C):Ve(C)?(u=N,ue(C)):(e.consume(C),N)}function O(C){return C===null?n(C):C===63?(e.consume(C),j):Ve(C)?(u=O,ue(C)):(e.consume(C),O)}function j(C){return C===62?ve(C):O(C)}function V(C){return xn(C)?(e.consume(C),D):n(C)}function D(C){return C===45||pn(C)?(e.consume(C),D):W(C)}function W(C){return Ve(C)?(u=W,ue(C)):it(C)?(e.consume(C),W):ve(C)}function Z(C){return C===45||pn(C)?(e.consume(C),Z):C===47||C===62||Tt(C)?re(C):n(C)}function re(C){return C===47?(e.consume(C),ve):C===58||C===95||xn(C)?(e.consume(C),z):Ve(C)?(u=re,ue(C)):it(C)?(e.consume(C),re):ve(C)}function z(C){return C===45||C===46||C===58||C===95||pn(C)?(e.consume(C),z):K(C)}function K(C){return C===61?(e.consume(C),oe):Ve(C)?(u=K,ue(C)):it(C)?(e.consume(C),K):re(C)}function oe(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,de):Ve(C)?(u=oe,ue(C)):it(C)?(e.consume(C),oe):(e.consume(C),fe)}function de(C){return C===s?(e.consume(C),s=void 0,te):C===null?n(C):Ve(C)?(u=de,ue(C)):(e.consume(C),de)}function fe(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||Tt(C)?re(C):(e.consume(C),fe)}function te(C){return C===47||C===62||Tt(C)?re(C):n(C)}function ve(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function ue(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),Q}function Q(C){return it(C)?at(e,le,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):le(C)}function le(C){return e.enter("htmlTextData"),u(C)}}const Wf={name:"labelEnd",resolveAll:W3,resolveTo:G3,tokenize:X3},V3={tokenize:K3},q3={tokenize:Q3},Y3={tokenize:J3};function W3(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&&$n(e,0,e.length,n),e}function G3(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,gl(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]]),$n(e,a,e.length,l),e}function X3(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(y){return a?a._inactive?m(y):(u=r.parser.defined.includes(hr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),d):n(y)}function d(y){return y===40?e.attempt(V3,p,u?p:m)(y):y===91?e.attempt(q3,p,u?f:m)(y):u?p(y):m(y)}function f(y){return e.attempt(Y3,p,m)(y)}function p(y){return t(y)}function m(y){return a._balanced=!0,n(y)}}function K3(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 Tt(m)?Ta(e,a)(m):a(m)}function a(m){return m===41?p(m):SE(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return Tt(m)?Ta(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?AE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return Tt(m)?Ta(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 Q3(e,t,n){const r=this;return s;function s(l){return vE.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(hr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function J3(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 Z3={name:"labelStartImage",resolveAll:Wf.resolveAll,tokenize:eO};function eO(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 tO={name:"labelStartLink",resolveAll:Wf.resolveAll,tokenize:nO};function nO(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 Gf={name:"lineEnding",tokenize:rO};function rO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),at(e,t,"linePrefix")}}const El={name:"thematicBreak",tokenize:iO};function iO(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||Ve(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),it(f)?at(e,l,"whitespace")(f):l(f))}}const In={continuation:{tokenize:uO},exit:cO,name:"list",tokenize:aO},sO={partial:!0,tokenize:dO},oO={partial:!0,tokenize:lO};function aO(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(T){const _=r.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||T===r.containerState.marker:Vf(T)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(El,n,f)(T):f(T);if(!r.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(T)}return n(T)}function d(T){return Vf(T)&&++u<10?(e.consume(T),d):(!r.interrupt||u<2)&&(r.containerState.marker?T===r.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),f(T)):n(T)}function f(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||T,e.check(Ea,r.interrupt?n:p,e.attempt(sO,y,m))}function p(T){return r.containerState.initialBlankLine=!0,a++,y(T)}function m(T){return it(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),y):n(T)}function y(T){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function uO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ea,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,at(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!it(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(oO,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,at(e,e.attempt(In,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function lO(e,t,n){const r=this;return at(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 cO(e){e.exit(this.containerState.type)}function dO(e,t,n){const r=this;return at(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!it(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const NE={name:"setextUnderline",resolveTo:fO,tokenize:hO};function fO(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 hO(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"),it(f)?at(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Ve(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const pO={tokenize:mO};function mO(e){const t=this,n=e.attempt(Ea,r,e.attempt(this.parser.constructs.flowInitial,s,at(e,e.attempt(this.parser.constructs.flow,s,e.attempt(b3,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 gO={resolveAll:OE()},EO=kE("string"),yO=kE("text");function kE(e){return{resolveAll:OE(e==="text"?TO: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 y=-1;if(m)for(;++y<m.length;){const T=m[y];if(!T.previous||T.previous.call(r,r.previous))return!0}return!1}}}function OE(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 TO(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 bO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:v3},disable:{null:[]},document:{42:In,43:In,45:In,48:In,49:In,50:In,51:In,52:In,53:In,54:In,55:In,56:In,57:In,62:yE},flow:{35:I3,42:El,45:[NE,El],60:D3,61:NE,95:El,96:_E,126:_E},flowInitial:{[-2]:Yf,[-1]:Yf,32:Yf},insideSpan:{null:[qf,gO]},string:{38:bE,92:TE},text:{[-5]:Gf,[-4]:Gf,[-3]:Gf,33:Z3,38:bE,42:qf,60:[t3,z3],91:tO,92:[k3,TE],93:Wf,95:qf,96:p3}},Symbol.toStringTag,{value:"Module"}));function wO(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(V),check:W(D),consume:N,enter:O,exit:j,interrupt:W(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:A,events:[],now:_,parser:e,previous:null,sliceSerialize:y,sliceStream:T,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(K){return u=Jn(u,K),x(),u[u.length-1]!==null?[]:(Z(t,0),f.events=gl(a,f.events,f),f.events)}function y(K,oe){return xO(T(K),oe)}function T(K){return _O(u,K)}function _(){const{_bufferIndex:K,_index:oe,line:de,column:fe,offset:te}=r;return{_bufferIndex:K,_index:oe,line:de,column:fe,offset:te}}function A(K){s[K.line]=K.column,z()}function x(){let K;for(;r._index<u.length;){const oe=u[r._index];if(typeof oe=="string")for(K=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===K&&r._bufferIndex<oe.length;)S(oe.charCodeAt(r._bufferIndex));else S(oe)}}function S(K){p=p(K)}function N(K){Ve(K)?(r.line++,r.column=1,r.offset+=K===-3?2:1,z()):K!==-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=K}function O(K,oe){const de=oe||{};return de.type=K,de.start=_(),f.events.push(["enter",de,f]),l.push(de),de}function j(K){const oe=l.pop();return oe.end=_(),f.events.push(["exit",oe,f]),oe}function V(K,oe){Z(K,oe.from)}function D(K,oe){oe.restore()}function W(K,oe){return de;function de(fe,te,ve){let ue,Q,le,C;return Array.isArray(fe)?ee(fe):"tokenize"in fe?ee([fe]):F(fe);function F(he){return Se;function Se($e){const He=$e!==null&&he[$e],et=$e!==null&&he.null,pt=[...Array.isArray(He)?He:He?[He]:[],...Array.isArray(et)?et:et?[et]:[]];return ee(pt)($e)}}function ee(he){return ue=he,Q=0,he.length===0?ve:R(he[Q])}function R(he){return Se;function Se($e){return C=re(),le=he,he.partial||(f.currentConstruct=he),he.name&&f.parser.constructs.disable.null.includes(he.name)?Re():he.tokenize.call(oe?Object.assign(Object.create(f),oe):f,d,Ce,Re)($e)}}function Ce(he){return K(le,C),te}function Re(he){return C.restore(),++Q<ue.length?R(ue[Q]):ve}}}function Z(K,oe){K.resolveAll&&!a.includes(K)&&a.push(K),K.resolve&&$n(f.events,oe,f.events.length-oe,K.resolve(f.events.slice(oe),f)),K.resolveTo&&(f.events=K.resolveTo(f.events,f))}function re(){const K=_(),oe=f.previous,de=f.currentConstruct,fe=f.events.length,te=Array.from(l);return{from:fe,restore:ve};function ve(){r=K,f.previous=oe,f.currentConstruct=de,f.events.length=fe,l=te,z()}}function z(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function _O(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 xO(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
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 SO(e){const r={constructs:pE([bO,...(e||{}).extensions||[]]),content:s(Gk),defined:[],document:s(Kk),flow:s(pO),lazy:{},string:s(EO),text:s(yO)};return r;function s(a){return u;function u(l){return wO(r,a,l)}}}function vO(e){for(;!xE(e););return e}const IE=/[\0\t\n\r]/g;function AO(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,p,m,y,T;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(IE.lastIndex=m,f=IE.exec(a),y=f&&f.index!==void 0?f.index:a.length,T=a.charCodeAt(y),!f){t=a.slice(m);break}if(T===10&&m===y&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<y&&(d.push(a.slice(m,y)),e+=y-m),T){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=y+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const CO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function NO(e){return e.replace(CO,kO)}function kO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return mE(n.slice(a?2:1),a?16:10)}return $f(n)||e}const PE={}.hasOwnProperty;function OO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),IO(n)(vO(SO(n).document().write(AO()(e,t,!0))))}function IO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ie),autolinkProtocol:re,autolinkEmail:re,atxHeading:a(Ht),blockQuote:a(et),characterEscape:re,characterReference:re,codeFenced:a(pt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(pt,u),codeText:a(bt,u),codeTextData:re,data:re,codeFlowValue:re,definition:a(an),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(En),hardBreakEscape:a(je),hardBreakTrailing:a(je),htmlFlow:a(_t,u),htmlFlowData:re,htmlText:a(_t,u),htmlTextData:re,image:a(Gt),label:u,link:a(Ie),listItem:a(ot),listItemValue:y,listOrdered:a(Qe,m),listUnordered:a(Qe),paragraph:a(ut),reference:R,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Ht),strong:a(tr),thematicBreak:a(Ts)},exit:{atxHeading:d(),atxHeadingSequence:V,autolink:d(),autolinkEmail:He,autolinkProtocol:$e,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:he,characterReference:Se,codeFenced:d(x),codeFencedFence:A,codeFencedFenceInfo:T,codeFencedFenceMeta:_,codeFlowValue:z,codeIndented:d(S),codeText:d(te),codeTextData:z,data:z,definition:d(),definitionDestinationString:j,definitionLabelString:N,definitionTitleString:O,emphasis:d(),hardBreakEscape:d(oe),hardBreakTrailing:d(oe),htmlFlow:d(de),htmlFlowData:z,htmlText:d(fe),htmlTextData:z,image:d(ue),label:le,labelText:Q,lineEnding:K,link:d(ve),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Ce,resourceDestinationString:C,resourceTitleString:F,resource:ee,setextHeading:d(Z),setextHeadingLineSequence:W,setextHeadingText:D,strong:d(),thematicBreak:d()}};RE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ce){let xe={type:"root",children:[]};const We={stack:[xe],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Ze=[];let nt=-1;for(;++nt<ce.length;)if(ce[nt][1].type==="listOrdered"||ce[nt][1].type==="listUnordered")if(ce[nt][0]==="enter")Ze.push(nt);else{const Mt=Ze.pop();nt=s(ce,Mt,nt)}for(nt=-1;++nt<ce.length;){const Mt=t[ce[nt][0]];PE.call(Mt,ce[nt][1].type)&&Mt[ce[nt][1].type].call(Object.assign({sliceSerialize:ce[nt][2].sliceSerialize},We),ce[nt][1])}if(We.tokenStack.length>0){const Mt=We.tokenStack[We.tokenStack.length-1];(Mt[1]||LE).call(We,void 0,Mt[0])}for(xe.position={start:mi(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:mi(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<t.transforms.length;)xe=t.transforms[nt](xe)||xe;return xe}function s(ce,xe,We){let Ze=xe-1,nt=-1,Mt=!1,yr,se,Ae,ke;for(;++Ze<=We;){const be=ce[Ze];switch(be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{be[0]==="enter"?nt++:nt--,ke=void 0;break}case"lineEndingBlank":{be[0]==="enter"&&(yr&&!ke&&!nt&&!Ae&&(Ae=Ze),ke=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ke=void 0}if(!nt&&be[0]==="enter"&&be[1].type==="listItemPrefix"||nt===-1&&be[0]==="exit"&&(be[1].type==="listUnordered"||be[1].type==="listOrdered")){if(yr){let pe=Ze;for(se=void 0;pe--;){const Fe=ce[pe];if(Fe[1].type==="lineEnding"||Fe[1].type==="lineEndingBlank"){if(Fe[0]==="exit")continue;se&&(ce[se][1].type="lineEndingBlank",Mt=!0),Fe[1].type="lineEnding",se=pe}else if(!(Fe[1].type==="linePrefix"||Fe[1].type==="blockQuotePrefix"||Fe[1].type==="blockQuotePrefixWhitespace"||Fe[1].type==="blockQuoteMarker"||Fe[1].type==="listItemIndent"))break}Ae&&(!se||Ae<se)&&(yr._spread=!0),yr.end=Object.assign({},se?ce[se][1].start:be[1].end),ce.splice(se||Ze,0,["exit",yr,be[2]]),Ze++,We++}if(be[1].type==="listItemPrefix"){const pe={type:"listItem",_spread:!1,start:Object.assign({},be[1].start),end:void 0};yr=pe,ce.splice(Ze,0,["enter",pe,be[2]]),Ze++,We++,Ae=void 0,ke=!0}}}return ce[xe][1]._spread=Mt,We}function a(ce,xe){return We;function We(Ze){l.call(this,ce(Ze),Ze),xe&&xe.call(this,Ze)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(ce,xe,We){this.stack[this.stack.length-1].children.push(ce),this.stack.push(ce),this.tokenStack.push([xe,We||void 0]),ce.position={start:mi(xe.start),end:void 0}}function d(ce){return xe;function xe(We){ce&&ce.call(this,We),f.call(this,We)}}function f(ce,xe){const We=this.stack.pop(),Ze=this.tokenStack.pop();if(Ze)Ze[0].type!==ce.type&&(xe?xe.call(this,ce,Ze[0]):(Ze[1]||LE).call(this,ce,Ze[0]));else throw new Error("Cannot close `"+ce.type+"` ("+ma({start:ce.start,end:ce.end})+"): it’s not open");We.position.end=mi(ce.end)}function p(){return zf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function y(ce){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(ce),10),this.data.expectingFirstListItemValue=void 0}}function T(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=ce}function _(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=ce}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ce.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ce.replace(/(\r?\n|\r)$/g,"")}function N(ce){const xe=this.resume(),We=this.stack[this.stack.length-1];We.label=xe,We.identifier=hr(this.sliceSerialize(ce)).toLowerCase()}function O(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ce}function j(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ce}function V(ce){const xe=this.stack[this.stack.length-1];if(!xe.depth){const We=this.sliceSerialize(ce).length;xe.depth=We}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function W(ce){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(ce).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function re(ce){const We=this.stack[this.stack.length-1].children;let Ze=We[We.length-1];(!Ze||Ze.type!=="text")&&(Ze=ys(),Ze.position={start:mi(ce.start),end:void 0},We.push(Ze)),this.stack.push(Ze)}function z(ce){const xe=this.stack.pop();xe.value+=this.sliceSerialize(ce),xe.position.end=mi(ce.end)}function K(ce){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const We=xe.children[xe.children.length-1];We.position.end=mi(ce.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(re.call(this,ce),z.call(this,ce))}function oe(){this.data.atHardBreak=!0}function de(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ce}function fe(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ce}function te(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ce}function ve(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=xe,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function ue(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=xe,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function Q(ce){const xe=this.sliceSerialize(ce),We=this.stack[this.stack.length-2];We.label=NO(xe),We.identifier=hr(xe).toLowerCase()}function le(){const ce=this.stack[this.stack.length-1],xe=this.resume(),We=this.stack[this.stack.length-1];if(this.data.inReference=!0,We.type==="link"){const Ze=ce.children;We.children=Ze}else We.alt=xe}function C(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ce}function F(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ce}function ee(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function Ce(ce){const xe=this.resume(),We=this.stack[this.stack.length-1];We.label=xe,We.identifier=hr(this.sliceSerialize(ce)).toLowerCase(),this.data.referenceType="full"}function Re(ce){this.data.characterReferenceType=ce.type}function he(ce){const xe=this.sliceSerialize(ce),We=this.data.characterReferenceType;let Ze;We?(Ze=mE(xe,We==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ze=$f(xe);const nt=this.stack[this.stack.length-1];nt.value+=Ze}function Se(ce){const xe=this.stack.pop();xe.position.end=mi(ce.end)}function $e(ce){z.call(this,ce);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(ce)}function He(ce){z.call(this,ce);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(ce)}function et(){return{type:"blockquote",children:[]}}function pt(){return{type:"code",lang:null,meta:null,value:""}}function bt(){return{type:"inlineCode",value:""}}function an(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function En(){return{type:"emphasis",children:[]}}function Ht(){return{type:"heading",depth:0,children:[]}}function je(){return{type:"break"}}function _t(){return{type:"html",value:""}}function Gt(){return{type:"image",title:null,url:"",alt:null}}function Ie(){return{type:"link",title:null,url:"",children:[]}}function Qe(ce){return{type:"list",ordered:ce.type==="listOrdered",start:null,spread:ce._spread,children:[]}}function ot(ce){return{type:"listItem",spread:ce._spread,checked:null,children:[]}}function ut(){return{type:"paragraph",children:[]}}function tr(){return{type:"strong",children:[]}}function ys(){return{type:"text",value:""}}function Ts(){return{type:"thematicBreak"}}}function mi(e){return{line:e.line,column:e.column,offset:e.offset}}function RE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?RE(e,r):PO(e,r)}}function PO(e,t){let n;for(n in t)if(PE.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 LE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ma({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ma({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ma({start:t.start,end:t.end})+") is still open")}function RO(e){const t=this;t.parser=n;function n(r){return OO(r,ae(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function LO(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 DO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
27
27
|
`}]}function MO(e,t){const n=t.value?t.value+`
|
|
28
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 FO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Xs(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 HO(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 jO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function DE(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 zO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return DE(e,t);const s={src:Xs(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 $O(e,t){const n={src:Xs(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 VO(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 qO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return DE(e,t);const s={href:Xs(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 YO(e,t){const n={href:Xs(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 WO(e,t,n){const r=e.all(t),s=n?GO(n):ME(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:`
|
|
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 GO(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=ME(n[r])}return t}function ME(e){const t=e.spread;return t==null?e.children.length>1:t}function XO(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 KO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function JO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZO(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=kr(t.children[1]),d=hl(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 eI(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],y={},T=u?u[d]:void 0;T&&(y.align=T);let _={type:"element",tagName:a,properties:y,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function tI(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const FE=9,BE=32;function nI(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(UE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(UE(t.slice(s),s>0,!1)),a.join("")}function UE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===FE||a===BE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===FE||a===BE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function rI(e,t){const n={type:"text",value:nI(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function iI(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const sI={blockquote:LO,break:DO,code:MO,delete:FO,emphasis:BO,footnoteReference:UO,heading:HO,html:jO,imageReference:zO,image:$O,inlineCode:VO,linkReference:qO,link:YO,listItem:WO,list:XO,paragraph:KO,root:QO,strong:JO,table:ZO,tableCell:tI,tableRow:eI,text:rI,thematicBreak:iI,toml:yl,yaml:yl,definition:yl,footnoteDefinition:yl};function yl(){}const HE=-1,Tl=0,ba=1,bl=2,Xf=3,Kf=4,Qf=5,Jf=6,jE=7,zE=8,$E=typeof self=="object"?self:globalThis,VE=(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 $E[e](t)},
|
|
30
|
+
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function GO(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=ME(n[r])}return t}function ME(e){const t=e.spread;return t==null?e.children.length>1:t}function XO(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 KO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function JO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZO(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=kr(t.children[1]),d=hl(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 eI(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],y={},T=u?u[d]:void 0;T&&(y.align=T);let _={type:"element",tagName:a,properties:y,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function tI(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const FE=9,BE=32;function nI(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(UE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(UE(t.slice(s),s>0,!1)),a.join("")}function UE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===FE||a===BE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===FE||a===BE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function rI(e,t){const n={type:"text",value:nI(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function iI(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const sI={blockquote:LO,break:DO,code:MO,delete:FO,emphasis:BO,footnoteReference:UO,heading:HO,html:jO,imageReference:zO,image:$O,inlineCode:VO,linkReference:qO,link:YO,listItem:WO,list:XO,paragraph:KO,root:QO,strong:JO,table:ZO,tableCell:tI,tableRow:eI,text:rI,thematicBreak:iI,toml:yl,yaml:yl,definition:yl,footnoteDefinition:yl};function yl(){}const HE=-1,Tl=0,ba=1,bl=2,Xf=3,Kf=4,Qf=5,Jf=6,jE=7,zE=8,{defineProperty:oI}=Object,$E=typeof self=="object"?self:globalThis,VE=(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 $E[e](t)},aI=(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 Tl:case HE:return n(u,s);case ba:{const l=n([],s);for(const d of u)l.push(r(d));return l}case bl:{const l=n({},s);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?oI(l,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):l[p]=m}return l}case Xf:return n(new Date(u),s);case Kf:{const{source:l,flags:d}=u;return n(new RegExp(l,d),s)}case Qf:{const l=n(new Map,s);for(const[d,f]of u)l.set(r(d),r(f));return l}case Jf:{const l=n(new Set,s);for(const d of u)l.add(r(d));return l}case jE:{const{name:l,message:d}=u;return n(typeof $E[l]=="function"?VE(l,d):new Error(d),s)}case zE: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)}case"-0":return-0}return n(VE(a,u),s)};return r},qE=e=>aI(new Map,e)(0),ns="",{toString:uI}={},{keys:lI,is:cI}=Object,wa=e=>{const t=typeof e;if(t!=="object"||!e)return[Tl,t];const n=uI.call(e).slice(8,-1);switch(n){case"Array":return[ba,ns];case"Object":return[bl,ns];case"Date":return[Xf,ns];case"RegExp":return[Kf,ns];case"Map":return[Qf,ns];case"Set":return[Jf,ns];case"DataView":return[ba,n]}return n.includes("Array")?[ba,n]:e instanceof Error?[jE,e.name||"Error"]:[bl,n]},wl=([e,t])=>e===Tl&&(t==="function"||t==="symbol"),dI=(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]=wa(u);switch(l){case Tl:{let p=u;switch(d){case"bigint":l=zE,p=u.toString();break;case"number":if(!u&&cI(u,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([HE],u)}return s([l,p],u)}case ba:{if(d){let y=u;return d==="DataView"?y=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(y=new Uint8Array(u)),s([d,[...y]],u)}const p=[],m=s([l,p],u);for(const y of u)p.push(a(y));return m}case bl:{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 y of lI(u))(e||!wl(wa(u[y])))&&p.push([a(y),a(u[y])]);return m}case Xf:return s([l,isNaN(u.getTime())?ns:u.toISOString()],u);case Kf:{const{source:p,flags:m}=u;return s([l,{source:p,flags:m}],u)}case Qf:{const p=[],m=s([l,p],u);for(const[y,T]of u)(e||!(wl(wa(y))||wl(wa(T))))&&p.push([a(y),a(T)]);return m}case Jf:{const p=[],m=s([l,p],u);for(const y of u)(e||!wl(wa(y)))&&p.push(a(y));return m}}const{message:f}=u;return s([l,{name:d,message:f}],u)};return a},YE=(e,{json:t,lossy:n}={})=>{const r=[];return dI(!(t||n),!!t,new Map,r)(e),r},rs=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?qE(YE(e,t)):structuredClone(e):(e,t)=>qE(YE(e,t));function fI(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 hI(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function pI(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||fI,r=e.options.footnoteBackLabel||hI,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(),y=Xs(m.toLowerCase());let T=0;const _=[],A=e.footnoteCounts.get(m);for(;A!==void 0&&++T<=A;){_.length>0&&_.push({type:"text",value:" "});let N=typeof n=="string"?n:n(d,T);typeof N=="string"&&(N={type:"text",value:N}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(T>1?"-"+T:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,T),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const x=p[p.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const N=x.children[x.children.length-1];N&&N.type==="text"?N.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(..._)}else p.push(..._);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+y},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:ae(U({},rs(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
|
|
31
31
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
32
|
-
`}]}}const _l=(function(e){if(e==null)return
|
|
32
|
+
`}]}}const _l=(function(e){if(e==null)return yI;if(typeof e=="function")return xl(e);if(typeof e=="object")return Array.isArray(e)?mI(e):gI(e);if(typeof e=="string")return EI(e);throw new Error("Expected function, string, or object as test")});function mI(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=_l(e[n]);return xl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function gI(e){const t=e;return xl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function EI(e){return xl(t);function t(n){return n&&n.type===e}}function xl(e){return t;function t(n,r,s){return!!(TI(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function yI(){return!0}function TI(e){return e!==null&&typeof e=="object"&&"type"in e}function vH(e){return e}const WE=[],bI=!0,Zf=!1,wI="skip";function GE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=_l(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 T=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(d.type+(T?"<"+T+">":""))+")"})}return y;function y(){let T=WE,_,A,x;if((!t||a(d,f,p[p.length-1]||void 0))&&(T=_I(n(d,p)),T[0]===Zf))return T;if("children"in d&&d.children){const S=d;if(S.children&&T[0]!==wI)for(A=(r?S.children.length:-1)+u,x=p.concat(S);A>-1&&A<S.children.length;){const N=S.children[A];if(_=l(N,A,x)(),_[0]===Zf)return _;A=typeof _[1]=="number"?_[1]:A+u}}return T}}}function _I(e){return Array.isArray(e)?e:typeof e=="number"?[bI,e]:e==null?WE:[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),GE(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 eh={}.hasOwnProperty,xI={};function SI(e,t){const n=t||xI,r=new Map,s=new Map,a=new Map,u=U(U({},sI),n.handlers),l={all:f,applyData:AI,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:vI,wrap:NI};return Sl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,y=String(p.identifier).toUpperCase();m.has(y)||m.set(y,p)}}),l;function d(p,m){const y=p.type,T=l.handlers[y];if(eh.call(l.handlers,y)&&T)return T(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(y)){if("children"in p){const A=p,{children:x}=A,S=An(A,["children"]),N=rs(S);return N.children=l.all(p),N}return rs(p)}return(l.options.unknownHandler||CI)(l,p,m)}function f(p){const m=[];if("children"in p){const y=p.children;let T=-1;for(;++T<y.length;){const _=l.one(y[T],p);if(_){if(T&&y[T-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=XE(_.value)),!Array.isArray(_)&&_.type==="element")){const A=_.children[0];A&&A.type==="text"&&(A.value=XE(A.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function vI(e,t){e.position&&(t.position=rE(e))}function AI(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,rs(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function CI(e,t){const n=t.data||{},r="value"in t&&!(eh.call(n,"hProperties")||eh.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 NI(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 XE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function KE(e,t){const n=
|
|
36
|
-
`},s),a}function CI(e,t){return e&&"run"in e?function(n,r){return De(this,null,function*(){const s=KE(n,U({file:r},t));yield e.run(s,r)})}:function(n,r){return KE(n,U({file:r},e||t))}}function QE(e){if(e)throw e}var th,JE;function NI(){if(JE)return th;JE=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 y;for(y in f);return typeof y=="undefined"||e.call(f,y)},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 th=function d(){var f,p,m,y,T,_,A=arguments[0],x=1,S=arguments.length,N=!1;for(typeof A=="boolean"&&(N=A,A=arguments[1]||{},x=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});x<S;++x)if(f=arguments[x],f!=null)for(p in f)m=l(A,p),y=l(f,p),A!==y&&(N&&y&&(a(y)||(T=s(y)))?(T?(T=!1,_=m&&s(m)?m:[]):_=m&&a(m)?m:{},u(A,{name:p,newValue:d(N,_,y)})):typeof y!="undefined"&&u(A,{name:p,newValue:y}));return A},th}var kI=NI();const nh=rt(kI);function rh(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 OI(){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?II(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 II(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 Or={basename:PI,dirname:RI,extname:LI,join:DI,sep:"/"};function PI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');_a(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 RI(e){if(_a(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 LI(e){_a(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 DI(...e){let t=-1,n;for(;++t<e.length;)_a(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":MI(n)}function MI(e){_a(e);const t=e.codePointAt(0)===47;let n=FI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function FI(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 _a(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const BI={cwd:UI};function UI(){return"/"}function ih(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function HI(e){if(typeof e=="string")e=new URL(e);else if(!ih(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 jI(e)}function jI(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 sh=["history","path","basename","stem","extname","dirname"];class ZE{constructor(t){let n;t?ih(t)?n={path:t}:typeof t=="string"||zI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":BI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<sh.length;){const a=sh[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)sh.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Or.basename(this.path):void 0}set basename(t){ah(t,"basename"),oh(t,"basename"),this.path=Or.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Or.dirname(this.path):void 0}set dirname(t){ey(this.basename,"dirname"),this.path=Or.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Or.extname(this.path):void 0}set extname(t){if(oh(t,"extname"),ey(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=Or.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ih(t)&&(t=HI(t)),ah(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Or.basename(this.path,this.extname):void 0}set stem(t){ah(t,"stem"),oh(t,"stem"),this.path=Or.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 hn(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 oh(e,t){if(e&&e.includes(Or.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Or.sep+"`")}function ah(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ey(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function zI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $I=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),VI={}.hasOwnProperty;class uh extends $I{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=OI()}copy(){const t=new uh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(nh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(dh("data",this.frozen),this.namespace[t]=n,this):VI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(dh("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=vl(t),r=this.parser||this.Parser;return lh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),lh("process",this.parser||this.Parser),ch("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const l=vl(t),d=r.parse(l);r.run(d,l,function(p,m,y){if(p||!m||!y)return f(p);const T=m,_=r.stringify(T,y);WI(_)?y.value=_:y.result=_,f(p,y)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),lh("processSync",this.parser||this.Parser),ch("processSync",this.compiler||this.Compiler),this.process(t,s),ny("processSync","process",n),r;function s(a,u){n=!0,QE(a),r=u}}run(t,n,r){ty(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=vl(n);s.run(t,d,f);function f(p,m,y){const T=m||t;p?l(p):u?u(T):r(void 0,T,y)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),ny("runSync","run",r),s;function a(u,l){QE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=vl(n),s=this.compiler||this.Compiler;return ch("stringify",s),ty(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(dh("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=nh(!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,y=-1;for(;++m<r.length;)if(r[m][0]===f){y=m;break}if(y===-1)r.push([f,...p]);else if(p.length>0){let[T,..._]=p;const A=r[y][1];rh(A)&&rh(T)&&(T=nh(!0,A,T)),r[y]=[f,T,..._]}}}}const qI=new uh().freeze();function lh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ch(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dh(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 ty(e){if(!rh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ny(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vl(e){return YI(e)?e:new ZE(e)}function YI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function WI(e){return typeof e=="string"||GI(e)}function GI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ry=[],iy={allowDangerousHtml:!0},KI=/^(https?|ircs?|mailto|xmpp)$/i,QI=[{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 sy(e){const t=JI(e),n=ZI(e);return eP(t.runSync(t.parse(n),n),e)}function JI(e){const t=e.rehypePlugins||ry,n=e.remarkPlugins||ry,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),iy):iy;return qI().use(RO).use(n).use(CI,r).use(t)}function ZI(e){const t=e.children||"",n=new ZE;return typeof t=="string"&&(n.value=t),n}function eP(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||tP;for(const p of QI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+XI+p.id,void 0);return Sl(e,f),vk(e,{Fragment:w.Fragment,components:s,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function f(p,m,y){if(p.type==="raw"&&y&&typeof m=="number")return u?y.children.splice(m,1):y.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let T;for(T in jf)if(Object.hasOwn(jf,T)&&Object.hasOwn(p.properties,T)){const _=p.properties[T],A=jf[T];(A===null||A.includes(p.tagName))&&(p.properties[T]=d(String(_||""),T,p))}}if(p.type==="element"){let T=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!T&&r&&typeof m=="number"&&(T=!r(p,m,y)),T&&y&&typeof m=="number")return l&&p.children?y.children.splice(m,1,...p.children):y.children.splice(m,1),m}}}function tP(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||KI.test(e.slice(0,t))?e:""}const oy=/[#.]/g;function nP(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){oy.lastIndex=s;const l=oy.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 ay(e,t,n){const r=n?oP(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=nP(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,rP(u))l.unshift(u);else for(const[m,y]of Object.entries(u))iP(e,d.properties,m,y)}for(const f of l)fh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function rP(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const 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 iP(e,t,n,r){const s=fl(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=K1(r):s.commaSeparated?a=F1(r):s.commaOrSpaceSeparated?a=K1(F1(r).join(" ")):a=uy(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?sP(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(uy(s,s.property,l));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function fh(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)fh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?fh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function uy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||da(n)===da(t)))return!0}return n}function sP(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function oP(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const aP=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],uP=ay(fa,"div"),lP=ay(hi,"g",aP);function cP(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=ly(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=ly(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 ly(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 is={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/"},cy={}.hasOwnProperty,dP=Object.prototype;function fP(e,t){const n=t||{};return hh({file:n.file||void 0,location:!1,schema:n.space==="svg"?hi:fa,verbose:n.verbose||!1},e)}function hh(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:dy(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=cP(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=hP(e,t),n}}function dy(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=hh(e,t[n]);r.push(s)}return r}function hP(e,t){const n=e.schema;e.schema=t.namespaceURI===is.svg?hi:fa;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;cy.call(dP,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?lP:uP)(t.tagName,s,dy(e,t.childNodes));if(Al(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&Qs(d.startTag),p=d&&d.endTag&&Qs(d.endTag),m=hh(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=pP(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function pP(e,t,n){const r=Qs(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)cy.call(n.attrs,u)&&(a[fl(e.schema,u).property]=Qs(n.attrs[u]));n.startTag;const l=Qs(n.startTag),d=n.endTag?Qs(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Qs(e){const t=fy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=fy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function fy(e){return e.line&&e.column?e:void 0}const hy={}.hasOwnProperty;function py(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&hy.call(s,e)){const d=String(s[e]);u=hy.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 mP={},gP={}.hasOwnProperty,my=py("type",{handlers:{root:yP,element:xP,text:wP,comment:_P,doctype:bP}});function EP(e,t){const r=(t||mP).space;return my(e,r==="svg"?hi:fa)}function yP(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ph(e.children,n,t),Js(e,n),n}function TP(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ph(e.children,n,t),Js(e,n),n}function bP(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Js(e,t),t}function wP(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Js(e,t),t}function _P(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Js(e,t),t}function xP(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=hi);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&gP.call(e.properties,a)){const d=SP(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:is[u],childNodes:[],parentNode:null};return l.childNodes=ph(e.children,l,r),Js(e,l),e.tagName==="template"&&e.content&&(l.content=TP(e.content,r)),l}function SP(e,t,n){const r=fl(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?B1(n):Q1(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=is[r.space]}return s}function ph(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=my(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 vP=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],AP=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]),kt="�";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 Pn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function gy(e){return e>=55296&&e<=57343}function CP(e){return e>=56320&&e<=57343}function NP(e,t){return(e-55296)*1024+9216+t}function Ey(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function yy(e){return e>=64976&&e<=65007||AP.has(e)}var ie;(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"})(ie||(ie={}));const kP=65536;class OP{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=kP,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(CP(n))return this.pos++,this._addGap(),NP(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(ie.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,gy(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){Ey(t)?this._err(ie.controlCharacterInInputStream):yy(t)&&this._err(ie.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var tt;(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"})(tt||(tt={}));function Ty(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 IP=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),PP=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 RP(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=PP.get(e))!==null&&t!==void 0?t:e}var Qt;(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"})(Qt||(Qt={}));const LP=32;var gi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(gi||(gi={}));function mh(e){return e>=Qt.ZERO&&e<=Qt.NINE}function DP(e){return e>=Qt.UPPER_A&&e<=Qt.UPPER_F||e>=Qt.LOWER_A&&e<=Qt.LOWER_F}function MP(e){return e>=Qt.UPPER_A&&e<=Qt.UPPER_Z||e>=Qt.LOWER_A&&e<=Qt.LOWER_Z||mh(e)}function FP(e){return e===Qt.EQUALS||MP(e)}var Jt;(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"})(Jt||(Jt={}));var Xr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Xr||(Xr={}));class BP{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Jt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xr.Strict}startEntity(t){this.decodeMode=t,this.state=Jt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Jt.EntityStart:return t.charCodeAt(n)===Qt.NUM?(this.state=Jt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Jt.NamedEntity,this.stateNamedEntity(t,n));case Jt.NumericStart:return this.stateNumericStart(t,n);case Jt.NumericDecimal:return this.stateNumericDecimal(t,n);case Jt.NumericHex:return this.stateNumericHex(t,n);case Jt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|LP)===Qt.LOWER_X?(this.state=Jt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Jt.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(mh(s)||DP(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(mh(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===Qt.SEMI)this.consumed+=1;else if(this.decodeMode===Xr.Strict)return 0;return this.emitCodePoint(RP(this.result),this.consumed),this.errors&&(t!==Qt.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&gi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=UP(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Xr.Attribute&&(a===0||FP(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&gi.VALUE_LENGTH)>>14,a!==0){if(u===Qt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Xr.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]&gi.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]&~gi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Jt.NamedEntity:return this.result!==0&&(this.decodeMode!==Xr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Jt.NumericDecimal:return this.emitNumericEntity(0,2);case Jt.NumericHex:return this.emitNumericEntity(0,3);case Jt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Jt.EntityStart:return 0}}}function UP(e,t,n,r){const s=(t&gi.BRANCH_LENGTH)>>7,a=t&gi.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 ge;(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/"})(ge||(ge={}));var ss;(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"})(ss||(ss={}));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 HP=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=HP.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const ye=g,jP={[ge.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]),[ge.MATHML]:new Set([ye.MI,ye.MO,ye.MN,ye.MS,ye.MTEXT,ye.ANNOTATION_XML]),[ge.SVG]:new Set([ye.TITLE,ye.FOREIGN_OBJECT,ye.DESC]),[ge.XLINK]:new Set,[ge.XML]:new Set,[ge.XMLNS]:new Set},gh=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 Ut={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function zP(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function xa(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function $P(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function Ei(e){return $P(e)||xa(e)}function by(e){return Ei(e)||zP(e)}function Cl(e){return e+32}function wy(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function _y(e){return wy(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function VP(e){return e===I.NULL?ie.nullCharacterReference:e>1114111?ie.characterReferenceOutsideUnicodeRange:gy(e)?ie.surrogateCharacterReference:yy(e)?ie.noncharacterCharacterReference:Ey(e)||e===I.CARRIAGE_RETURN?ie.controlCharacterReference:null}class qP{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=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 OP(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new BP(IP,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ie.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ie.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=VP(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:tt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:tt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:tt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:tt.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(Ty(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(ie.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===tt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ie.endTagWithAttributes),t.selfClosing&&this._err(ie.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 tt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case tt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case tt.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:tt.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=wy(t)?tt.WHITESPACE_CHARACTER:t===I.NULL?tt.NULL_CHARACTER:tt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(tt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Xr.Attribute:Xr.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 I.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ie.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=L.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ei(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(ie.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(ie.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ie.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ei(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(ie.missingEndTagName),this.state=L.DATA;break}case I.EOF:{this._err(ie.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ie.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.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=L.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.tagName+=kt;break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(xa(t)?Cl(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ei(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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case I.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===I.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ei(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 I.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case I.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){Ei(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===I.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.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 I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(kt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(kt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ei(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){Ei(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(Pn.SCRIPT,!1)&&_y(this.preprocessor.peek(Pn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Pn.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 I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(kt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.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=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(kt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.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(Pn.SCRIPT,!1)&&_y(this.preprocessor.peek(Pn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Pn.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 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=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(ie.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 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=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(ie.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.name+=kt;break}default:this.currentAttr.name+=String.fromCodePoint(xa(t)?Cl(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=L.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.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=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.value+=kt;break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.value+=kt;break}case I.EOF:{this._err(ie.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=L.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.value+=kt;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(ie.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(ie.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=L.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this._err(ie.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this._err(ie.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.data+=kt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Pn.DASH_DASH,!0)?(this._createCommentToken(Pn.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(Pn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Pn.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(Pn.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(ie.cdataInHtmlContent),this._createCommentToken(Pn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ie.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(ie.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 I.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ie.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 I.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.data+=kt;break}case I.EOF:{this._err(ie.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=L.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(ie.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case I.EOF:{this._err(ie.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 I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case I.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{n.data+="-";break}case I.EOF:{this._err(ie.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 I.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(ie.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ie.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(ie.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(xa(t))this._createDoctypeToken(String.fromCharCode(Cl(t))),this.state=L.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(ie.unexpectedNullCharacter),this._createDoctypeToken(kt),this.state=L.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ie.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.name+=kt;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(xa(t)?Cl(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=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Pn.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Pn.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ie.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.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=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(ie.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ie.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.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=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.publicId+=kt;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ie.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=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.publicId+=kt;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ie.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=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.QUOTATION_MARK:{this._err(ie.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ie.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.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=L.DATA;break}case I.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.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=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(ie.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ie.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.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=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.systemId+=kt;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ie.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=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.systemId+=kt;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ie.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=L.DATA;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.NULL:{this._err(ie.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(ie.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=L.DATA;break}case I.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(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&by(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){by(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(ie.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const xy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Sy=new Set([...xy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Nl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),YP=new Set([...Nl,g.OL,g.UL]),WP=new Set([...Nl,g.BUTTON]),vy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Ay=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),GP=new Set([g.TR,g.TEMPLATE,g.HTML]),XP=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),KP=new Set([g.TABLE,g.TEMPLATE,g.HTML]),QP=new Set([g.TD,g.TH]);class JP{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=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)===ge.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])!==ge.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(gh,ge.HTML)}popUntilTableCellPopped(){this.popUntilPopped(QP,ge.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(KP,ge.HTML)}clearBackToTableBodyContext(){this.clearBackTo(XP,ge.HTML)}clearBackToTableRowContext(){this.clearBackTo(GP,ge.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 ge.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case ge.SVG:{if(Ay.has(s))return!1;break}case ge.MATHML:{if(vy.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Nl)}hasInListItemScope(t){return this.hasInDynamicScope(t,YP)}hasInButtonScope(t){return this.hasInDynamicScope(t,WP)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ge.HTML:{if(gh.has(n))return!0;if(Nl.has(n))return!1;break}case ge.SVG:{if(Ay.has(n))return!1;break}case ge.MATHML:{if(vy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ge.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])===ge.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])===ge.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&&xy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Sy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Sy.has(this.currentTagId);)this.pop()}}const Eh=3;var Ir;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ir||(Ir={}));const Cy={type:Ir.Marker};class ZP{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===Ir.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<Eh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Eh)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>=Eh&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(Cy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ir.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ir.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(Cy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ir.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ir.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ir.Element&&n.element===t)}}const yi={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};yi.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(yi.isTextNode(n)){n.value+=t;return}}yi.appendChild(e,yi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&yi.isTextNode(r)?r.value+=t:yi.insertBefore(e,yi.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)}},Ny="html",eR="about:legacy-compat",tR="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ky=["+//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//"],nR=[...ky,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],rR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Oy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],iR=[...Oy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Iy(e,t){return t.some(n=>e.startsWith(n))}function sR(e){return e.name===Ny&&e.publicId===null&&(e.systemId===null||e.systemId===eR)}function oR(e){if(e.name!==Ny)return Zn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===tR)return Zn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),rR.has(n))return Zn.QUIRKS;let r=t===null?nR:ky;if(Iy(n,r))return Zn.QUIRKS;if(r=t===null?Oy:iR,Iy(n,r))return Zn.LIMITED_QUIRKS}return Zn.NO_QUIRKS}const Py={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},aR="definitionurl",uR="definitionURL",lR=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])),cR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ge.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ge.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ge.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ge.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ge.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ge.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ge.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ge.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ge.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ge.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ge.XMLNS}]]),dR=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])),fR=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 hR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ss.COLOR||r===ss.SIZE||r===ss.FACE)||fR.has(t)}function Ry(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===aR){e.attrs[t].name=uR;break}}function Ly(e){for(let t=0;t<e.attrs.length;t++){const n=lR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function yh(e){for(let t=0;t<e.attrs.length;t++){const n=cR.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 pR(e){const t=dR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Zs(e.tagName))}function mR(e,t){return t===ge.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function gR(e,t,n){if(t===ge.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ss.ENCODING){const s=n[r].value.toLowerCase();return s===Py.TEXT_HTML||s===Py.APPLICATION_XML}}return t===ge.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function ER(e,t,n,r){return(!r||r===ge.HTML)&&gR(e,t,n)||(!r||r===ge.MATHML)&&mR(e,t)}const yR="hidden",TR=8,bR=3;var H;(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"})(H||(H={}));const wR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Dy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),My={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:yi,onParseError:null};class Fy{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=H.INITIAL,this.originalInsertionMode=H.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({},My),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 qP(this.options,this),this.activeFormattingElements=new ZP(this.treeAdapter),this.fragmentContextID=r?Zs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new JP(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=U(U({},My),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,ge.HTML,[]));const s=r.treeAdapter.createElement("documentmock",ge.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(H.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:wR,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)===ge.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ge.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=H.TEXT}switchToPlaintextParsing(){this.insertionMode=H.TEXT,this.originalInsertionMode=H.IN_BODY,this.tokenizer.state=Ut.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)!==ge.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Ut.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ut.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ut.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ut.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&&ae(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,ge.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ge.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,ge.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===tt.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)===ge.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ge.HTML)}_processToken(t){switch(t.type){case tt.CHARACTER:{this.onCharacter(t);break}case tt.NULL_CHARACTER:{this.onNullCharacter(t);break}case tt.COMMENT:{this.onComment(t);break}case tt.DOCTYPE:{this.onDoctype(t);break}case tt.START_TAG:{this._processStartTag(t);break}case tt.END_TAG:{this.onEndTag(t);break}case tt.EOF:{this.onEof(t);break}case tt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return ER(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Ir.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=H.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=H.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=H.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=H.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=H.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=H.IN_TABLE;return}case g.BODY:{this.insertionMode=H.IN_BODY;return}case g.FRAMESET:{this.insertionMode=H.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?H.AFTER_HEAD:H.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=H.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=H.IN_HEAD;return}break}}this.insertionMode=H.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=H.IN_SELECT_IN_TABLE;return}}this.insertionMode=H.IN_SELECT}_isElementCausesFosterParenting(t){return Dy.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)===ge.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 jP[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Q6(this,t);return}switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{va(this,t);break}case H.BEFORE_HEAD:{Aa(this,t);break}case H.IN_HEAD:{Ca(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Na(this,t);break}case H.AFTER_HEAD:{ka(this,t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:{Uy(this,t);break}case H.TEXT:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{_h(this,t);break}case H.IN_TABLE_TEXT:{Wy(this,t);break}case H.IN_COLUMN_GROUP:{Il(this,t);break}case H.AFTER_BODY:{Ll(this,t);break}case H.AFTER_AFTER_BODY:{Dl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){K6(this,t);return}switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{va(this,t);break}case H.BEFORE_HEAD:{Aa(this,t);break}case H.IN_HEAD:{Ca(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Na(this,t);break}case H.AFTER_HEAD:{ka(this,t);break}case H.TEXT:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{_h(this,t);break}case H.IN_COLUMN_GROUP:{Il(this,t);break}case H.AFTER_BODY:{Ll(this,t);break}case H.AFTER_AFTER_BODY:{Dl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){bh(this,t);return}switch(this.insertionMode){case H.INITIAL:case H.BEFORE_HTML:case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_TEMPLATE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{bh(this,t);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}case H.AFTER_BODY:{NR(this,t);break}case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{kR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case H.INITIAL:{OR(this,t);break}case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:{this._err(t,ie.misplacedDoctype);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ie.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?J6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{IR(this,t);break}case H.BEFORE_HEAD:{RR(this,t);break}case H.IN_HEAD:{pr(this,t);break}case H.IN_HEAD_NO_SCRIPT:{MR(this,t);break}case H.AFTER_HEAD:{BR(this,t);break}case H.IN_BODY:{mn(this,t);break}case H.IN_TABLE:{eo(this,t);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}case H.IN_CAPTION:{L6(this,t);break}case H.IN_COLUMN_GROUP:{xh(this,t);break}case H.IN_TABLE_BODY:{Pl(this,t);break}case H.IN_ROW:{Rl(this,t);break}case H.IN_CELL:{F6(this,t);break}case H.IN_SELECT:{Ky(this,t);break}case H.IN_SELECT_IN_TABLE:{U6(this,t);break}case H.IN_TEMPLATE:{j6(this,t);break}case H.AFTER_BODY:{$6(this,t);break}case H.IN_FRAMESET:{V6(this,t);break}case H.AFTER_FRAMESET:{Y6(this,t);break}case H.AFTER_AFTER_BODY:{G6(this,t);break}case H.AFTER_AFTER_FRAMESET:{X6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Z6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{PR(this,t);break}case H.BEFORE_HEAD:{LR(this,t);break}case H.IN_HEAD:{DR(this,t);break}case H.IN_HEAD_NO_SCRIPT:{FR(this,t);break}case H.AFTER_HEAD:{UR(this,t);break}case H.IN_BODY:{Ol(this,t);break}case H.TEXT:{S6(this,t);break}case H.IN_TABLE:{Oa(this,t);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}case H.IN_CAPTION:{D6(this,t);break}case H.IN_COLUMN_GROUP:{M6(this,t);break}case H.IN_TABLE_BODY:{Sh(this,t);break}case H.IN_ROW:{Xy(this,t);break}case H.IN_CELL:{B6(this,t);break}case H.IN_SELECT:{Qy(this,t);break}case H.IN_SELECT_IN_TABLE:{H6(this,t);break}case H.IN_TEMPLATE:{z6(this,t);break}case H.AFTER_BODY:{Zy(this,t);break}case H.IN_FRAMESET:{q6(this,t);break}case H.AFTER_FRAMESET:{W6(this,t);break}case H.AFTER_AFTER_BODY:{Dl(this,t);break}}}onEof(t){switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{va(this,t);break}case H.BEFORE_HEAD:{Aa(this,t);break}case H.IN_HEAD:{Ca(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Na(this,t);break}case H.AFTER_HEAD:{ka(this,t);break}case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{qy(this,t);break}case H.TEXT:{v6(this,t);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}case H.IN_TEMPLATE:{Jy(this,t);break}case H.AFTER_BODY:case H.IN_FRAMESET:case H.AFTER_FRAMESET:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{wh(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 H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.TEXT:case H.IN_COLUMN_GROUP:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{this._insertCharacters(t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:case H.AFTER_BODY:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{By(this,t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{_h(this,t);break}case H.IN_TABLE_TEXT:{Yy(this,t);break}}}}function _R(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):Vy(e,t),n}function xR(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 SR(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>=bR;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=vR(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function vR(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 AR(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===ge.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function CR(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 Th(e,t){for(let n=0;n<TR;n++){const r=_R(e,t);if(!r)break;const s=xR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=SR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&AR(e,u,a),CR(e,s,r)}}function bh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function NR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function kR(e,t){e._appendCommentNode(t,e.document)}function wh(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 OR(e,t){e._setDocumentType(t);const n=t.forceQuirks?Zn.QUIRKS:oR(t);sR(t)||e._err(t,ie.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=H.BEFORE_HTML}function Sa(e,t){e._err(t,ie.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Zn.QUIRKS),e.insertionMode=H.BEFORE_HTML,e._processToken(t)}function IR(e,t){t.tagID===g.HTML?(e._insertElement(t,ge.HTML),e.insertionMode=H.BEFORE_HEAD):va(e,t)}function PR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&va(e,t)}function va(e,t){e._insertFakeRootElement(),e.insertionMode=H.BEFORE_HEAD,e._processToken(t)}function RR(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.HEAD:{e._insertElement(t,ge.HTML),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD;break}default:Aa(e,t)}}function LR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Aa(e,t):e._err(t,ie.endTagWithoutMatchingOpenElement)}function Aa(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD,e._processToken(t)}function pr(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Ut.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ut.RAWTEXT):(e._insertElement(t,ge.HTML),e.insertionMode=H.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ut.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ut.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=H.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(H.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ie.misplacedStartTagForHeadElement);break}default:Ca(e,t)}}function DR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=H.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Ca(e,t);break}case g.TEMPLATE:{os(e,t);break}default:e._err(t,ie.endTagWithoutMatchingOpenElement)}}function os(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,ie.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ie.endTagWithoutMatchingOpenElement)}function Ca(e,t){e.openElements.pop(),e.insertionMode=H.AFTER_HEAD,e._processToken(t)}function MR(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{pr(e,t);break}case g.NOSCRIPT:{e._err(t,ie.nestedNoscriptInHead);break}default:Na(e,t)}}function FR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=H.IN_HEAD;break}case g.BR:{Na(e,t);break}default:e._err(t,ie.endTagWithoutMatchingOpenElement)}}function Na(e,t){const n=t.type===tt.EOF?ie.openElementsLeftAfterEof:ie.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=H.IN_HEAD,e._processToken(t)}function BR(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.BODY:{e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=H.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ge.HTML),e.insertionMode=H.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,ie.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),pr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ie.misplacedStartTagForHeadElement);break}default:ka(e,t)}}function UR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{ka(e,t);break}case g.TEMPLATE:{os(e,t);break}default:e._err(t,ie.endTagWithoutMatchingOpenElement)}}function ka(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=H.IN_BODY,kl(e,t)}function kl(e,t){switch(t.type){case tt.CHARACTER:{Uy(e,t);break}case tt.WHITESPACE_CHARACTER:{By(e,t);break}case tt.COMMENT:{bh(e,t);break}case tt.START_TAG:{mn(e,t);break}case tt.END_TAG:{Ol(e,t);break}case tt.EOF:{qy(e,t);break}}}function By(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Uy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function HR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function jR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function zR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ge.HTML),e.insertionMode=H.IN_FRAMESET)}function $R(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML)}function VR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&gh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ge.HTML)}function qR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function YR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML),n||(e.formElement=e.openElements.current))}function WR(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,ge.HTML)}function GR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.tokenizer.state=Ut.PLAINTEXT}function XR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.framesetOk=!1}function KR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Th(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function QR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function JR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Th(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ZR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function e6(e,t){e.treeAdapter.getDocumentMode(e.document)!==Zn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=H.IN_TABLE}function Hy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ge.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function jy(e){const t=Ty(e,ss.TYPE);return t!=null&&t.toLowerCase()===yR}function t6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ge.HTML),jy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function n6(e,t){e._appendElement(t,ge.HTML),t.ackSelfClosing=!0}function r6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ge.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function i6(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Hy(e,t)}function s6(e,t){e._insertElement(t,ge.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ut.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=H.TEXT}function o6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ut.RAWTEXT)}function a6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ut.RAWTEXT)}function zy(e,t){e._switchToTextParsing(t,Ut.RAWTEXT)}function u6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===H.IN_TABLE||e.insertionMode===H.IN_CAPTION||e.insertionMode===H.IN_TABLE_BODY||e.insertionMode===H.IN_ROW||e.insertionMode===H.IN_CELL?H.IN_SELECT_IN_TABLE:H.IN_SELECT}function l6(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML)}function c6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ge.HTML)}function d6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ge.HTML)}function f6(e,t){e._reconstructActiveFormattingElements(),Ry(t),yh(t),t.selfClosing?e._appendElement(t,ge.MATHML):e._insertElement(t,ge.MATHML),t.ackSelfClosing=!0}function h6(e,t){e._reconstructActiveFormattingElements(),Ly(t),yh(t),t.selfClosing?e._appendElement(t,ge.SVG):e._insertElement(t,ge.SVG),t.ackSelfClosing=!0}function $y(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML)}function mn(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:{QR(e,t);break}case g.A:{KR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{VR(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:{$R(e,t);break}case g.LI:case g.DD:case g.DT:{WR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Hy(e,t);break}case g.HR:{r6(e,t);break}case g.RB:case g.RTC:{c6(e,t);break}case g.RT:case g.RP:{d6(e,t);break}case g.PRE:case g.LISTING:{qR(e,t);break}case g.XMP:{o6(e,t);break}case g.SVG:{h6(e,t);break}case g.HTML:{HR(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:{pr(e,t);break}case g.BODY:{jR(e,t);break}case g.FORM:{YR(e,t);break}case g.NOBR:{JR(e,t);break}case g.MATH:{f6(e,t);break}case g.TABLE:{e6(e,t);break}case g.INPUT:{t6(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{n6(e,t);break}case g.IMAGE:{i6(e,t);break}case g.BUTTON:{XR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{ZR(e,t);break}case g.IFRAME:{a6(e,t);break}case g.SELECT:{u6(e,t);break}case g.OPTION:case g.OPTGROUP:{l6(e,t);break}case g.NOEMBED:case g.NOFRAMES:{zy(e,t);break}case g.FRAMESET:{zR(e,t);break}case g.TEXTAREA:{s6(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?zy(e,t):$y(e,t);break}case g.PLAINTEXT:{GR(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:$y(e,t)}}function p6(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=H.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function m6(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=H.AFTER_BODY,Zy(e,t))}function g6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function E6(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 y6(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function T6(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function b6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function w6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function _6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function x6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Vy(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 Ol(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:{Th(e,t);break}case g.P:{y6(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:{g6(e,t);break}case g.LI:{T6(e);break}case g.DD:case g.DT:{b6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{w6(e);break}case g.BR:{x6(e);break}case g.BODY:{p6(e,t);break}case g.HTML:{m6(e,t);break}case g.FORM:{E6(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{_6(e,t);break}case g.TEMPLATE:{os(e,t);break}default:Vy(e,t)}}function qy(e,t){e.tmplInsertionModeStack.length>0?Jy(e,t):wh(e,t)}function S6(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 v6(e,t){e._err(t,ie.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _h(e,t){if(e.openElements.currentTagId!==void 0&&Dy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=H.IN_TABLE_TEXT,t.type){case tt.CHARACTER:{Wy(e,t);break}case tt.WHITESPACE_CHARACTER:{Yy(e,t);break}}else Ia(e,t)}function A6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ge.HTML),e.insertionMode=H.IN_CAPTION}function C6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ge.HTML),e.insertionMode=H.IN_COLUMN_GROUP}function N6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=H.IN_COLUMN_GROUP,xh(e,t)}function k6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ge.HTML),e.insertionMode=H.IN_TABLE_BODY}function O6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=H.IN_TABLE_BODY,Pl(e,t)}function I6(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function P6(e,t){jy(t)?e._appendElement(t,ge.HTML):Ia(e,t),t.ackSelfClosing=!0}function R6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ge.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function eo(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{O6(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{pr(e,t);break}case g.COL:{N6(e,t);break}case g.FORM:{R6(e,t);break}case g.TABLE:{I6(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{k6(e,t);break}case g.INPUT:{P6(e,t);break}case g.CAPTION:{A6(e,t);break}case g.COLGROUP:{C6(e,t);break}default:Ia(e,t)}}function Oa(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{os(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:Ia(e,t)}}function Ia(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,kl(e,t),e.fosterParentingEnabled=n}function Yy(e,t){e.pendingCharacterTokens.push(t)}function Wy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Pa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ia(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Gy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function L6(e,t){const n=t.tagID;Gy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,eo(e,t)):mn(e,t)}function D6(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=H.IN_TABLE,n===g.TABLE&&Oa(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:Ol(e,t)}}function xh(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.COL:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{pr(e,t);break}default:Il(e,t)}}function M6(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case g.TEMPLATE:{os(e,t);break}case g.COL:break;default:Il(e,t)}}function Il(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE,e._processToken(t))}function Pl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ge.HTML),e.insertionMode=H.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=H.IN_ROW,Rl(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=H.IN_TABLE,eo(e,t));break}default:eo(e,t)}}function Sh(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=H.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,Oa(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:Oa(e,t)}}function Rl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ge.HTML),e.insertionMode=H.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=H.IN_TABLE_BODY,Pl(e,t));break}default:eo(e,t)}}function Xy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,Sh(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=H.IN_TABLE_BODY,Sh(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:Oa(e,t)}}function F6(e,t){const n=t.tagID;Gy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Rl(e,t)):mn(e,t)}function B6(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=H.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Xy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ol(e,t)}}function Ky(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,ge.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ge.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ge.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:{pr(e,t);break}}}function Qy(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:{os(e,t);break}}}function U6(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)):Ky(e,t)}function H6(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)):Qy(e,t)}function j6(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:{pr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=H.IN_TABLE,e.insertionMode=H.IN_TABLE,eo(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=H.IN_COLUMN_GROUP,e.insertionMode=H.IN_COLUMN_GROUP,xh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=H.IN_TABLE_BODY,e.insertionMode=H.IN_TABLE_BODY,Pl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=H.IN_ROW,e.insertionMode=H.IN_ROW,Rl(e,t);break}default:e.tmplInsertionModeStack[0]=H.IN_BODY,e.insertionMode=H.IN_BODY,mn(e,t)}}function z6(e,t){t.tagID===g.TEMPLATE&&os(e,t)}function Jy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wh(e,t)}function $6(e,t){t.tagID===g.HTML?mn(e,t):Ll(e,t)}function Zy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=H.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 Ll(e,t)}function Ll(e,t){e.insertionMode=H.IN_BODY,kl(e,t)}function V6(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.FRAMESET:{e._insertElement(t,ge.HTML);break}case g.FRAME:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{pr(e,t);break}}}function q6(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=H.AFTER_FRAMESET))}function Y6(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.NOFRAMES:{pr(e,t);break}}}function W6(e,t){t.tagID===g.HTML&&(e.insertionMode=H.AFTER_AFTER_FRAMESET)}function G6(e,t){t.tagID===g.HTML?mn(e,t):Dl(e,t)}function Dl(e,t){e.insertionMode=H.IN_BODY,kl(e,t)}function X6(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.NOFRAMES:{pr(e,t);break}}}function K6(e,t){t.chars=kt,e._insertCharacters(t)}function Q6(e,t){e._insertCharacters(t),e.framesetOk=!1}function eT(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ge.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function J6(e,t){if(hR(t))eT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ge.MATHML?Ry(t):r===ge.SVG&&(pR(t),Ly(t)),yh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Z6(e,t){if(t.tagID===g.P||t.tagID===g.BR){eT(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)===ge.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 e4=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,t4=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),tT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function nT(e,t){const n=d4(e),r=py("type",{handlers:{root:n4,element:r4,text:i4,comment:iT,doctype:s4,raw:a4},unknown:u4}),s={parser:n?new Fy(tT):Fy.getFragmentParser(void 0,tT),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),to(s,kr());const a=n?s.parser.document:s.parser.getFragment(),u=fP(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 rT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function n4(e,t){rT(e.children,t)}function r4(e,t){l4(e,t),rT(e.children,t),c4(e,t)}function i4(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:tt.CHARACTER,chars:e.value,location:Ra(e)};to(t,kr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function s4(e,t){const n={type:tt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ra(e)};to(t,kr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function o4(e,t){t.stitches=!0;const n=f4(e);if("children"in e&&"children"in n){const r=nT({type:"root",children:e.children},t.options);n.children=r.children}iT({type:"comment",value:{stitch:n}},t)}function iT(e,t){const n=e.value,r={type:tt.COMMENT,data:n,location:Ra(e)};to(t,kr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function a4(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,sT(t,kr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(e4,"<$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 u4(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))o4(n,t);else{let r="";throw t4.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 to(e,t){sT(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=Ut.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 sT(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 l4(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ut.PLAINTEXT)return;to(t,kr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:is.html;s===is.html&&n==="svg"&&(s=is.svg);const a=EP(ae(U({},e),{children:[]}),{space:s===is.svg?"svg":"html"}),u={type:tt.START_TAG,tagName:n,tagID:Zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ra(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function c4(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&vP.includes(n)||t.parser.tokenizer.state===Ut.PLAINTEXT)return;to(t,hl(e));const r={type:tt.END_TAG,tagName:n,tagID:Zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ra(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ut.RCDATA||t.parser.tokenizer.state===Ut.RAWTEXT||t.parser.tokenizer.state===Ut.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ut.DATA)}function d4(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ra(e){const t=kr(e)||{line:void 0,column:void 0,offset:void 0},n=hl(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 f4(e){return"children"in e?rs(ae(U({},e),{children:[]})):rs(e)}function oT(e){return function(t,n){return nT(t,ae(U({},e),{file:n}))}}const as=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],aT={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...as,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...as],h2:[["className","sr-only"]],img:[...as,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...as,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...as],table:[...as],ul:[...as,["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"]},Ti={}.hasOwnProperty;function h4(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},aT),t):aT,stack:[]},s=uT(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function uT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return p4(e,n);case"doctype":return m4(e,n);case"element":return g4(e,n);case"root":return E4(e,n);case"text":return y4(e,n)}}}function p4(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 La(a,t),a}}function m4(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return La(n,t),n}}function g4(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=lT(e,t.children),s=T4(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&&Ti.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 La(u,t),u}function E4(e,t){const r={type:"root",children:lT(e,t.children)};return La(r,t),r}function y4(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return La(r,t),r}function lT(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=uT(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function T4(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&Ti.call(r,n)?r[n]:void 0,u=r&&Ti.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Ti.call(l,f)){const p=l[f];let m=cT(e,fT(a,f),f,p);m==null&&(m=cT(e,fT(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&Ti.call(s,n)){const p=s[n];for(f in p)Ti.call(p,f)&&!Ti.call(d,f)&&(d[f]=p[f])}return d}function cT(e,t,n,r){return t?Array.isArray(r)?b4(e,t,n,r):dT(e,t,n,r):void 0}function b4(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=dT(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function dT(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&w4(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 w4(e,t,n){const r=e.schema.protocols&&Ti.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 La(e,t){const n=rE(t);t.data&&(e.data=rs(t.data)),n&&(e.position=n)}function fT(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 _4(e){return function(t){return h4(t,e)}}const hT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",ae(U(U({className:M(e,`${k}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},x4=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ft();return!e&&!t?null:w.jsx("div",{className:M(n,`${k}-disclaimer`),children:t?w.jsx(sy,{rehypePlugins:[oT,_4],components:{ul:({children:r})=>w.jsx("ul",{className:M(n,`${k}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:M(n,`${k}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:M(n,`${k}-li`),children:r}),a:({href:r,title:s,children:a})=>w.jsx(hT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>w.jsx("img",{className:M(n,`${k}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>w.jsx("p",{className:M(n,`${k}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:M(n,`${k}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:M(n,`${k}-disclaimer-text`),children:e})})},vh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a,canInitialize:u,messages:l}=fn(),{globalClassName:d,searchConfig:f,enableEscalationToAgent:p}=ft(),m=P.useRef(null),y=P.useRef(l);y.current=l;const T=t||!n1(s,a,u),_=P.useRef(t);P.useEffect(()=>{var N;const S=_.current&&!t;_.current=t,S&&!T&&((N=m.current)==null||N.focus({preventScroll:!0}))},[t,T]);const A=S=>De(null,null,function*(){var O,j;S.preventDefault();const N=(((O=m.current)==null?void 0:O.value)||"").trim();if(N){const V=!s&&!a&&u===!0,D=y.current.length;m.current.value="";const W=yield r(N);V&&W.outcome!=="success"&&y.current.length===D&&((j=m.current)==null?void 0:j.value)===""&&(m.current.value=N,m.current.disabled||m.current.focus({preventScroll:!0}))}}),x=()=>{r("Can you connect me to a human?")};return w.jsxs("div",{className:M(d,e,`cim-${n}-component`,`${k}-search-bar-wrapper`),children:[w.jsxs("form",{className:M(d,e,`cim-${n}-component`,`${k}-search-bar`),name:`${k}-search-form`,onSubmit:A,children:[w.jsx("input",{className:M(d,e,`cim-${n}-component`,`${k}-search-input`),type:"text",ref:m,placeholder:(f==null?void 0:f.placeholder)||"Ask us anything",name:`${k}-user-input`,disabled:T}),w.jsx(tk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:T}),p&&w.jsx(fr,{className:M(d,`${k}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:T,onClick:x,icon:w.jsx(VN,{})})]}),w.jsx(x4,{})]})};function S4(e){return mt({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 v4(e){return mt({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const pT=P.createContext({isOpen:!1}),Ah=P.createContext(null),mT=P.createContext(null),us=()=>{var n,r;const e=P.useContext(Ah),t=P.useContext(mT);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},gT=({onClearChat:e,componentType:t})=>{const n=us(),r=()=>{e(),n()};return w.jsxs("button",{className:M(`${k}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(v4,{}),"Clear chat"]})},ET=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=ft(),r=us(),[s,a]=P.useState(!1),u=()=>De(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 w.jsxs("button",{className:M(`${k}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[w.jsx(S4,{}),"Download transcript"]})},yT=({onEndConversation:e,componentType:t})=>{const n=us(),r=()=>{e(),n()};return w.jsxs("button",{className:M(`${k}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[w.jsx(ZN,{}),"End conversation"]})};function A4(e){return e==null?[]:Array.isArray(e)?e:[e]}var C4=(e,...t)=>e.concat(t),N4=(e,...t)=>e.filter(n=>!t.includes(n)),k4=e=>Array.from(new Set(e));function TT(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 O4(e,t,n={}){const{step:r=1,loop:s=!0}=n;return TT(e,t,{step:-r,loop:s})}var I4=e=>Array.isArray(e),bT=e=>e!=null&&typeof e=="object",P4=e=>bT(e)&&!I4(e),Ml=e=>typeof e=="string",no=e=>typeof e=="function",R4=e=>e==null,L4=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),D4=e=>Object.prototype.toString.call(e),wT=Function.prototype.toString,M4=wT.call(Object),F4=e=>{if(!bT(e)||D4(e)!="[object Object]"||H4(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=L4(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&wT.call(n)==M4},B4=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,U4=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,H4=e=>B4(e)||U4(e),j4=e=>e(),z4=()=>{},Ch=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function $4(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:V4,max:q4}=Math,Y4=e=>Number.isNaN(e),W4=e=>Y4(e)?0:e,_T=(e,t,n)=>V4(q4(W4(e),t),n);function Nh(e){if(!F4(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]=Nh(s))}return n}function kh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function G4(e,t){if(e==null)throw new Error(t())}function X4(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 K4=Object.defineProperty,Q4=(e,t,n)=>t in e?K4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oh=(e,t,n)=>Q4(e,typeof t!="symbol"?t+"":t,n),xT=()=>{},Fl=e=>typeof e=="object"&&e!==null,ro=e=>e?"":void 0,ST=e=>e?"true":void 0,J4=1,Z4=9,eL=11,Zt=e=>Fl(e)&&e.nodeType===J4&&typeof e.nodeName=="string",Bl=e=>Fl(e)&&e.nodeType===Z4,tL=e=>Fl(e)&&e===e.window,vT=e=>Zt(e)?e.localName||"":"#document";function nL(e){return["html","body","#document"].includes(vT(e))}var rL=e=>Fl(e)&&e.nodeType!==void 0,ls=e=>rL(e)&&e.nodeType===eL&&"host"in e,iL=e=>Zt(e)&&e.localName==="input",sL=e=>Zt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Da(e){if(!e)return!1;const t=e.getRootNode();return oo(t)===e}var oL=/(textarea|select)/;function aL(e){if(e==null||!Zt(e))return!1;try{return iL(e)&&e.selectionStart!=null||oL.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function io(e,t){var r;if(!e||!t||!Zt(e)||!Zt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ls(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Pr(e){var t;return Bl(e)?e:tL(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function uL(e){return Pr(e).documentElement}function so(e){var t,n,r;return ls(e)?so(e.host):Bl(e)?(t=e.defaultView)!=null?t:window:Zt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function oo(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 lL(e){if(vT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ls(e)&&e.host||uL(e);return ls(t)?t.host:t}function Ih(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Bl(t)||ls(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Ph=new WeakMap;function ao(e){return Ph.has(e)||Ph.set(e,so(e).getComputedStyle(e)),Ph.get(e)}var Rh=new Set(["menu","listbox","dialog","grid","tree","region"]),cL=e=>Rh.has(e),AT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function CT(e,t){const n=new Set,r=Ih(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=AT(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"),y=p.getAttribute("aria-modal")==="true";if(m&&cL(m)&&!y&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function NT(e,t){const n=Ih(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=AT(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"),y=p.getAttribute("aria-modal")==="true";m&&Rh.has(m)&&!y&&(t(p),s(p))}}}};s(e)}function dL(e){const t=new Set;return NT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function fL(e){const t=e.getAttribute("role");return!!(t&&Rh.has(t))}function hL(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function pL(e){var t;return hL(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function mL(e){if(!e.id)return!1;const t=Ih(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&fL(e))}var Lh=()=>typeof document!="undefined";function gL(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Dh=e=>Lh()&&e.test(gL()),EL=e=>Lh()&&e.test(navigator.vendor),kT=()=>Lh()&&!!navigator.maxTouchPoints,yL=()=>Dh(/^iPhone/i),TL=()=>Dh(/^iPad/i)||Mh()&&navigator.maxTouchPoints>1,Ul=()=>yL()||TL(),bL=()=>Mh()||Ul(),Mh=()=>Dh(/^Mac/i),wL=()=>bL()&&EL(/apple/i);function _L(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 mr(e){var n;const t=_L(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var OT=e=>e.button===0,xL=e=>e.button===2||Mh()&&e.ctrlKey&&e.button===0,SL=e=>"touches"in e&&e.touches.length>0,vL={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},IT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function AL(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=vL[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in IT&&(s=IT[s]),s}function PT(e,t="client"){const n=SL(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var en=(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)}},RT=e=>Zt(e)&&e.tagName==="IFRAME",CL=/^(audio|video|details)$/;function LT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var NL=e=>!Number.isNaN(LT(e)),kL=e=>LT(e)<0;function OL(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 DT(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=OL(d,t);if(f){const p=Array.from(f.querySelectorAll(Hl)).filter(n),m=u.get(d);if(m!==void 0){const y=m+1;r.splice(y,0,...p),p.forEach((T,_)=>{u.set(T,y+_)});for(let T=y+p.length;T<r.length;T++)u.set(r[T],T)}else{const y=r.length;r.push(...p),p.forEach((T,_)=>{u.set(T,y+_)})}s.push(...p)}}return r}var Hl="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",MT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Hl));(n==!0||n=="if-empty"&&s.length===0)&&Zt(e)&&Rr(e)&&s.unshift(e);const u=[];for(const l of s)if(Rr(l)){if(RT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...MT(d,{getShadowRoot:r}));continue}u.push(l)}return r?DT(u,r,Rr):u};function Rr(e){return!Zt(e)||e.closest("[inert]")?!1:e.matches(Hl)&&sL(e)}function uo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Hl));n&&cs(e)&&s.unshift(e);const a=[];for(const u of s)if(cs(u)){if(RT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...uo(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=DT(a,r,cs);return!u.length&&n?s:u}return!a.length&&n?s:a}function cs(e){return Zt(e)&&e.tabIndex>0?!0:Rr(e)&&!kL(e)}function IL(e,t={}){const n=uo(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function PL(e,t={}){const{current:n,getShadowRoot:r}=t,s=uo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:oo(a);if(!u)return null;const l=s.indexOf(u);return s[l+1]||null}function Ma(e){return e.tabIndex<0&&(CL.test(e.localName)||aL(e))&&!NL(e)?0:e.tabIndex}function FT(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=uo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var RL=class JS{constructor(){Oh(this,"id",null),Oh(this,"fn_cleanup"),Oh(this,"cleanup",()=>{this.cancel()})}static create(){return new JS}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function Yt(e){const t=RL.create();return t.request(e),t.cleanup}function BT(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 Fh(e){const t=lL(e);return nL(t)?Pr(t).body:Zt(t)&&ML(t)?t:Fh(t)}var LL=/auto|scroll|overlay|hidden|clip/,DL=new Set(["inline","contents"]);function ML(e){const t=so(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return LL.test(n+s+r)&&!DL.has(a)}var lo="default",Bh="",jl=new WeakMap;function FL(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return Ul()?(lo==="default"&&(Bh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),lo="disabled"):t&&(jl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>BL({target:t,doc:r})}function BL(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(Ul()){if(lo!=="disabled")return;lo="restoring",setTimeout(()=>{BT(()=>{lo==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Bh||""),Bh="",lo="default")})},300)}else if(t&&jl.has(t)){const a=jl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),jl.delete(t)}}function UL(e={}){const u=e,{defer:t,target:n}=u,r=An(u,["defer","target"]),s=t?Yt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(FL(ae(U({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function HL(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=PT(l),f=Math.sqrt(vd(d.x,2)+vd(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=PT(l);r({point:d,event:l})},u=[en(e,"pointermove",s,!1),en(e,"pointerup",a,!1),en(e,"pointercancel",a,!1),en(e,"contextmenu",a,!1),UL({doc:e})];return()=>{u.forEach(l=>l())}}function jL(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,y]=IL(e,{includeContainer:!0,getShadowRoot:a}),T=PL(l,{current:n,getShadowRoot:a}),_=!m&&!y;f.shiftKey&&Da(T)?(s==null||s(),p=y):f.shiftKey&&(Da(m)||_)?p=n:!f.shiftKey&&Da(n)?(s==null||s(),p=m):!f.shiftKey&&(Da(y)||_)&&(p=T),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return en(u,"keydown",d,!0)}function zL(e,t){const l=t,{defer:n,triggerElement:r}=l,s=An(l,["defer","triggerElement"]),a=n?Yt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(jL(d,U({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function $L(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function zl(e,t){if(!e)return xT;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 VL(e,t,n){if(!e)return xT;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 qL(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 YL(e,t){const{timeout:n,rootNode:r}=t,s=so(r),a=Pr(r),u=new s.AbortController;return qL(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 WL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),GL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,UT=e=>{const t={};let n;for(;n=GL.exec(e);)t[n[1]]=n[2];return t},XL=(e,t)=>{if(Ml(e)){if(Ml(t))return`${e};${t}`;e=UT(e)}else Ml(t)&&(t=UT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Wt(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=Ch(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=WL(t[s],n[s]);continue}if(s==="style"){t[s]=XL(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 SH(e){return e}var co=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(co||{}),Uh="__init__";function KL(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Pr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>oo(t()),a=u=>t().getElementById(u);return ae(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Da,getById:a})}function QL(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var fo=()=>e=>Array.from(new Set(e)),HT=typeof globalThis.document!="undefined"?P.useLayoutEffect:P.useEffect;function $l(e){var m,y;const t=(m=e().value)!=null?m:e().defaultValue,n=(y=e().isEqual)!=null?y:Object.is,[r]=P.useState(t),[s,a]=P.useState(r),u=e().value!==void 0,l=P.useRef(s);l.current=u?e().value:s;const d=P.useRef(l.current);HT(()=>{d.current=l.current},[s,e().value]);const f=T=>{var x,S;const _=d.current,A=no(T)?T(_):T;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:A,prev:_}),u||a(A),n(A,_)||(S=(x=e()).onChange)==null||S.call(x,A,_)};function p(){return u?e().value:s}return{initial:r,ref:l,get:p,set(T){(e().sync?Ys.flushSync:j4)(()=>f(T))},invoke(T,_){var A,x;(x=(A=e()).onChange)==null||x.call(A,T,_)},hash(T){var _,A,x;return(x=(A=(_=e()).hash)==null?void 0:A.call(_,T))!=null?x:String(T)}}}$l.cleanup=e=>{P.useEffect(()=>e,[])},$l.ref=e=>{const t=P.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function JL(e){const t=P.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var ZL=(e,t)=>{const n=P.useRef(!1),r=P.useRef(!1);P.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),P.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Vl(e,t={}){var K,oe,de,fe,te,ve;const n=P.useMemo(()=>{const{id:ue,ids:Q,getRootNode:le}=t;return KL({id:ue,ids:Q,getRootNode:le})},[t]),r=(...ue)=>{e.debug&&console.log(...ue)},s=(oe=(K=e.props)==null?void 0:K.call(e,{props:Nh(t),scope:n}))!=null?oe:t,a=e5(s),u=(de=e.context)==null?void 0:de.call(e,{prop:a,bindable:$l,scope:n,flush:zT,getContext(){return d},getComputed(){return V},getRefs(){return A},getEvent(){return T()}}),l=jT(u),d={get(ue){var Q;return(Q=l.current)==null?void 0:Q[ue].ref.current},set(ue,Q){var le;(le=l.current)==null||le[ue].set(Q)},initial(ue){var Q;return(Q=l.current)==null?void 0:Q[ue].initial},hash(ue){var le,C;const Q=(le=l.current)==null?void 0:le[ue].get();return(C=l.current)==null?void 0:C[ue].hash(Q)}},f=P.useRef(new Map),p=P.useRef(null),m=P.useRef(null),y=P.useRef({type:""}),T=()=>ae(U({},y.current),{current(){return y.current},previous(){return m.current}}),_=()=>ae(U({},D),{matches(...ue){return ue.includes(D.ref.current)},hasTag(ue){var Q,le;return!!((le=(Q=e.states[D.ref.current])==null?void 0:Q.tags)!=null&&le.includes(ue))}}),A=JL((te=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:d}))!=null?te:{}),x=()=>({state:_(),context:d,event:T(),prop:a,send:z,action:S,guard:N,track:ZL,refs:A,computed:V,flush:zT,scope:n,choose:j}),S=ue=>{const Q=no(ue)?ue(x()):ue;if(!Q)return;const le=Q.map(C=>{var ee,R;const F=(R=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:R[C];return F||kh(`[zag-js] No implementation found for action "${JSON.stringify(C)}"`),F});for(const C of le)C==null||C(x())},N=ue=>{var Q,le;return no(ue)?ue(x()):(le=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:le[ue](x())},O=ue=>{const Q=no(ue)?ue(x()):ue;if(!Q)return;const le=Q.map(F=>{var R,Ce;const ee=(Ce=(R=e.implementations)==null?void 0:R.effects)==null?void 0:Ce[F];return ee||kh(`[zag-js] No implementation found for effect "${JSON.stringify(F)}"`),ee}),C=[];for(const F of le){const ee=F==null?void 0:F(x());ee&&C.push(ee)}return()=>C.forEach(F=>F==null?void 0:F())},j=ue=>A4(ue).find(Q=>{let le=!Q.guard;return Ml(Q.guard)?le=!!N(Q.guard):no(Q.guard)&&(le=Q.guard(x())),le}),V=ue=>{G4(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[ue];return Q({context:d,event:T(),prop:a,refs:A,scope:n,computed:V})},D=$l(()=>({defaultValue:e.initialState({prop:a}),onChange(ue,Q){var C,F,ee,R;if(Q){const Ce=f.current.get(Q);Ce==null||Ce(),f.current.delete(Q)}Q&&S((C=e.states[Q])==null?void 0:C.exit),S((F=p.current)==null?void 0:F.actions);const le=O((ee=e.states[ue])==null?void 0:ee.effects);if(le&&f.current.set(ue,le),Q===Uh){S(e.entry);const Ce=O(e.effects);Ce&&f.current.set(Uh,Ce)}S((R=e.states[ue])==null?void 0:R.entry)}})),W=P.useRef(void 0),Z=P.useRef(co.NotStarted);HT(()=>{queueMicrotask(()=>{var F;const le=Z.current===co.Started;Z.current=co.Started,r(le?"rehydrating...":"initializing...");const C=(F=W.current)!=null?F:D.initial;D.invoke(C,le?D.get():Uh)});const ue=f.current,Q=D.ref.current;return()=>{r("unmounting..."),W.current=Q,Z.current=co.Stopped,ue.forEach(le=>le==null?void 0:le()),f.current=new Map,p.current=null,queueMicrotask(()=>{S(e.exit)})}},[]);const re=()=>"ref"in D?D.ref.current:D.get(),z=ue=>{queueMicrotask(()=>{var R,Ce,Re,he,Se;if(Z.current!==co.Started)return;m.current=y.current,y.current=ue;let Q=re();const le=(Re=(R=e.states[Q].on)==null?void 0:R[ue.type])!=null?Re:(Ce=e.on)==null?void 0:Ce[ue.type],C=j(le);if(!C)return;p.current=C;const F=(he=C.target)!=null?he:Q;r("transition",ue.type,C.target||Q,`(${C.actions})`);const ee=F!==Q;ee?Ys.flushSync(()=>D.set(F)):C.reenter&&!ee?D.invoke(Q,Q):S((Se=C.actions)!=null?Se:[])})};return(ve=e.watch)==null||ve.call(e,x()),{state:_(),send:z,context:d,prop:a,scope:n,refs:A,computed:V,event:T(),getStatus:()=>Z.current}}function jT(e){const t=P.useRef(e);return t.current=e,t}function e5(e){const t=jT(e);return function(r){return t.current[r]}}function zT(e){queueMicrotask(()=>{Ys.flushSync(()=>e())})}var Hh=QL(e=>e);function ql(...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 t5(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 jh=e=>{const t=P.memo(P.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=An(f,["asChild","children"]);if(!s)return P.createElement(e,ae(U({},u),{ref:r}),a);if(!P.isValidElement(a))return null;const l=P.Children.only(a),d=t5(l);return P.cloneElement(l,ae(U({},Wt(u,l.props)),{ref:r?ql(r,d):d}))}));return t.displayName=e.displayName||e.name,t},gn=(()=>{const e=new Map;return new Proxy(jh,{apply(t,n,r){return jh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,jh(r)),e.get(r)}})})();function n5(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ds(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=P.createContext(u);l.displayName=t;function d(){var p;const f=P.useContext(l);if(!f&&n){const m=new Error(a!=null?a:n5(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[r5,zh]=ds({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[$T,Fa]=ds({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),VT=P.forwardRef((e,t)=>{const n=zh(),r=Fa(),s=Wt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(gn.div,ae(U({},s),{ref:ql(r.ref,t)}))});VT.displayName="PopoverContent";const qT=P.forwardRef((e,t)=>{const n=zh(),r=Fa(),s=Wt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(gn.div,ae(U({},s),{ref:t}))});qT.displayName="PopoverPositioner";const Ba=()=>(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)]),YT=e=>Ba()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function i5(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 s5={props({props:e}){return ae(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",ao(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"});Yt(()=>{var l,d;const u=Yl(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})=>{Yt(()=>{e.set("prevAnimationName",Yl(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,y;((y=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?y:d.target)===s&&e.set("prevAnimationName",Yl(t.get("styles")))},u=d=>{const f=Yl(t.get("styles"));mr(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=zl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),BT(()=>l())}}}}};function Yl(e){return(e==null?void 0:e.animationName)||"none"}fo()(["onExitComplete","present","immediate"]);function o5(e,t={}){const{sync:n=!1}=t,r=a5(e);return P.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 a5(e){const t=P.useRef(e);return t.current=e,t}const $h=(e={})=>{const y=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=y,a=An(y,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=P.useRef(!1),l=ae(U({},a),{present:r,onExitComplete:o5(e.onExitComplete)}),d=Vl(s5,l),f=i5(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 fs=(e,t=[])=>({parts:(...n)=>{if(u5(t))return fs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>fs(e,[...t,...n]),omit:(...n)=>fs(e,t.filter(r=>!n.includes(r))),rename:n=>fs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${ho(e)}"][data-part="${ho(r)}"]`,`& [data-scope="${ho(e)}"][data-part="${ho(r)}"]`].join(", "),attrs:{"data-scope":ho(e),"data-part":ho(r)}}}),{})}),ho=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),u5=e=>e.length===0;const l5=["top","right","bottom","left"],bi=Math.min,Kr=Math.max,Wl=Math.round,Gl=Math.floor,Lr=e=>({x:e,y:e}),c5={left:"right",right:"left",bottom:"top",top:"bottom"};function WT(e,t,n){return Kr(e,bi(t,n))}function Qr(e,t){return typeof e=="function"?e(t):e}function wi(e){return e.split("-")[0]}function po(e){return e.split("-")[1]}function Vh(e){return e==="x"?"y":"x"}function qh(e){return e==="y"?"height":"width"}function Dr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Yh(e){return Vh(Dr(e))}function d5(e,t,n){n===void 0&&(n=!1);const r=po(e),s=Yh(e),a=qh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Xl(u)),[u,Xl(u)]}function f5(e){const t=Xl(e);return[Wh(e),t,Wh(t)]}function Wh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const GT=["left","right"],XT=["right","left"],h5=["top","bottom"],p5=["bottom","top"];function m5(e,t,n){switch(e){case"top":case"bottom":return n?t?XT:GT:t?GT:XT;case"left":case"right":return t?h5:p5;default:return[]}}function g5(e,t,n,r){const s=po(e);let a=m5(wi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Wh)))),a}function Xl(e){const t=wi(e);return c5[t]+e.slice(t.length)}function E5(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 KT(e){return typeof e!="number"?E5(e):{top:e,right:e,bottom:e,left:e}}function Kl(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 QT(e,t,n){let{reference:r,floating:s}=e;const a=Dr(t),u=Yh(t),l=qh(u),d=wi(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,y=r[l]/2-s[l]/2;let T;switch(d){case"top":T={x:p,y:r.y-s.height};break;case"bottom":T={x:p,y:r.y+r.height};break;case"right":T={x:r.x+r.width,y:m};break;case"left":T={x:r.x-s.width,y:m};break;default:T={x:r.x,y:r.y}}const _=po(t);return _&&(T[u]+=y*(_==="end"?1:-1)*(n&&f?-1:1)),T}function y5(e,t){return De(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:y=!1,padding:T=0}=Qr(t,e),_=KT(T),x=l[y?m==="floating"?"reference":"floating":m],S=Kl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(x))==null||n?x:x.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),N=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,O=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),j=(yield a.isElement==null?void 0:a.isElement(O))&&(yield a.getScale==null?void 0:a.getScale(O))||{x:1,y:1},V=Kl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:O,strategy:d}):N);return{top:(S.top-V.top+_.top)/j.y,bottom:(V.bottom-S.bottom+_.bottom)/j.y,left:(S.left-V.left+_.left)/j.x,right:(V.right-S.right+_.right)/j.x}})}const T5=50,b5=(e,t,n)=>De(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:ae(U({},u),{detectOverflow:y5}),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}=QT(f,r,d),y=r,T=0;const _={};for(let A=0;A<a.length;A++){const x=a[A];if(!x)continue;const{name:S,fn:N}=x,{x:O,y:j,data:V,reset:D}=yield N({x:p,y:m,initialPlacement:r,placement:y,strategy:s,middlewareData:_,rects:f,platform:l,elements:{reference:e,floating:t}});p=O!=null?O:p,m=j!=null?j:m,_[S]=U(U({},_[S]),V),D&&T<T5&&(T++,typeof D=="object"&&(D.placement&&(y=D.placement),D.rects&&(f=D.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:p,y:m}=QT(f,y,d)),A=-1)}return{x:p,y:m,placement:y,strategy:s,middlewareData:_}}),w5=e=>({name:"arrow",options:e,fn(n){return De(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=Qr(e,n)||{};if(p==null)return{};const y=KT(m),T={x:r,y:s},_=Yh(a),A=qh(_),x=yield l.getDimensions(p),S=_==="y",N=S?"top":"left",O=S?"bottom":"right",j=S?"clientHeight":"clientWidth",V=u.reference[A]+u.reference[_]-T[_]-u.floating[A],D=T[_]-u.reference[_],W=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let Z=W?W[j]:0;(!Z||!(yield l.isElement==null?void 0:l.isElement(W)))&&(Z=d.floating[j]||u.floating[A]);const re=V/2-D/2,z=Z/2-x[A]/2-1,K=bi(y[N],z),oe=bi(y[O],z),de=Z-x[A]-oe,fe=Z/2-x[A]/2+re,te=WT(K,fe,de),ve=!f.arrow&&po(a)!=null&&fe!==te&&u.reference[A]/2-(fe<K?K:oe)-x[A]/2<0,ue=ve?fe<K?fe-K:fe-de:0;return{[_]:T[_]+ue,data:U({[_]:te,centerOffset:fe-te-ue},ve&&{alignmentOffset:ue}),reset:ve}})}}),_5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return De(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,te=Qr(e,n),{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:T,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:x=!0}=te,S=An(te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const N=wi(a),O=Dr(d),j=wi(d)===d,V=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=T||(j||!x?[Xl(d)]:f5(d)),W=A!=="none";!T&&W&&D.push(...g5(d,x,A,V));const Z=[d,...D],re=yield f.detectOverflow(n,S),z=[];let K=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&z.push(re[N]),y){const ve=d5(a,l,V);z.push(re[ve[0]],re[ve[1]])}if(K=[...K,{placement:a,overflows:z}],!z.every(ve=>ve<=0)){var oe,de;const ve=(((oe=u.flip)==null?void 0:oe.index)||0)+1,ue=Z[ve];if(ue&&(!(y==="alignment"?O!==Dr(ue):!1)||K.every(C=>Dr(C.placement)===O?C.overflows[0]>0:!0)))return{data:{index:ve,overflows:K},reset:{placement:ue}};let Q=(de=K.filter(le=>le.overflows[0]<=0).sort((le,C)=>le.overflows[1]-C.overflows[1])[0])==null?void 0:de.placement;if(!Q)switch(_){case"bestFit":{var fe;const le=(fe=K.filter(C=>{if(W){const F=Dr(C.placement);return F===O||F==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(F=>F>0).reduce((F,ee)=>F+ee,0)]).sort((C,F)=>C[1]-F[1])[0])==null?void 0:fe[0];le&&(Q=le);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function JT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ZT(e){return l5.some(t=>e[t]>=0)}const x5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return De(this,null,function*(){const{rects:r,platform:s}=n,l=Qr(e,n),{strategy:a="referenceHidden"}=l,u=An(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,ae(U({},u),{elementContext:"reference"})),f=JT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:ZT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,ae(U({},u),{altBoundary:!0})),f=JT(d,r.floating);return{data:{escapedOffsets:f,escaped:ZT(f)}}}default:return{}}})}}},eb=new Set(["left","top"]);function S5(e,t){return De(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=wi(n),l=po(n),d=Dr(n)==="y",f=eb.has(u)?-1:1,p=a&&d?-1:1,m=Qr(t,e);let{mainAxis:y,crossAxis:T,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof _=="number"&&(T=l==="end"?_*-1:_),d?{x:T*p,y:y*f}:{x:y*f,y:T*p}})}const v5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return De(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield S5(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:ae(U({},f),{placement:l})}})}}},A5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return De(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,O=Qr(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:j=>{let{x:V,y:D}=j;return{x:V,y:D}}}}=O,p=An(O,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},y=yield u.detectOverflow(n,p),T=Dr(a),_=Vh(T);let A=m[_],x=m[T];const S=(j,V)=>WT(V+y[j==="y"?"top":"left"],V,V-y[j==="y"?"bottom":"right"]);l&&(A=S(_,A)),d&&(x=S(T,x));const N=f.fn(ae(U({},n),{[_]:A,[T]:x}));return ae(U({},N),{data:{x:N.x-r,y:N.y-s,enabled:{[_]:l,[T]:d}}})})}}},C5=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}=Qr(e,t),y={x:s,y:a},T=Dr(u),_=Vh(T);let A=y[_],x=y[T];const S=Qr(f,t),N=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:(n=S.mainAxis)!=null?n:0,crossAxis:(r=S.crossAxis)!=null?r:0};if(p){const V=_==="y"?"height":"width",D=l.reference[_]-l.floating[V]+N.mainAxis,W=l.reference[_]+l.reference[V]-N.mainAxis;A<D?A=D:A>W&&(A=W)}if(m){var O,j;const V=_==="y"?"width":"height",D=eb.has(wi(u)),W=l.reference[T]-l.floating[V]+(D&&((O=d.offset)==null?void 0:O[T])||0)+(D?0:N.crossAxis),Z=l.reference[T]+l.reference[V]+(D?0:((j=d.offset)==null?void 0:j[T])||0)-(D?N.crossAxis:0);x<W?x=W:x>Z&&(x=Z)}return{[_]:A,[T]:x}}}},N5=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return De(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,z=Qr(e,n),{apply:l=()=>{}}=z,d=An(z,["apply"]),f=yield a.detectOverflow(n,d),p=wi(r),m=po(r),y=Dr(r)==="y",{width:T,height:_}=s.floating;let A,x;p==="top"||p==="bottom"?(A=p,x=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(x=p,A=m==="end"?"top":"bottom");const S=_-f.top-f.bottom,N=T-f.left-f.right,O=bi(_-f[A],S),j=bi(T-f[x],N),V=n.middlewareData.shift,D=!V;let W=O,Z=j;V!=null&&V.enabled.x&&(Z=N),V!=null&&V.enabled.y&&(W=S),D&&!m&&(y?Z=T-2*Kr(f.left,f.right):W=_-2*Kr(f.top,f.bottom)),yield l(ae(U({},n),{availableWidth:Z,availableHeight:W}));const re=yield a.getDimensions(u.floating);return T!==re.width||_!==re.height?{reset:{rects:!0}}:{}})}}};function Ql(){return typeof window!="undefined"}function mo(e){return tb(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mr(e){var t;return(t=(tb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tb(e){return Ql()?e instanceof Node||e instanceof Vn(e).Node:!1}function gr(e){return Ql()?e instanceof Element||e instanceof Vn(e).Element:!1}function Fr(e){return Ql()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function nb(e){return!Ql()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}function Ua(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Er(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function k5(e){return/^(table|td|th)$/.test(mo(e))}function Jl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const O5=/transform|translate|scale|rotate|perspective|filter/,I5=/paint|layout|strict|content/,hs=e=>!!e&&e!=="none";let Gh;function Xh(e){const t=gr(e)?Er(e):e;return hs(t.transform)||hs(t.translate)||hs(t.scale)||hs(t.rotate)||hs(t.perspective)||!Kh()&&(hs(t.backdropFilter)||hs(t.filter))||O5.test(t.willChange||"")||I5.test(t.contain||"")}function P5(e){let t=_i(e);for(;Fr(t)&&!go(t);){if(Xh(t))return t;if(Jl(t))return null;t=_i(t)}return null}function Kh(){return Gh==null&&(Gh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Gh}function go(e){return/^(html|body|#document)$/.test(mo(e))}function Er(e){return Vn(e).getComputedStyle(e)}function Zl(e){return gr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _i(e){if(mo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nb(e)&&e.host||Mr(e);return nb(t)?t.host:t}function rb(e){const t=_i(e);return go(t)?(e.ownerDocument||e).body:Fr(t)&&Ua(t)?t:rb(t)}function Ha(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=rb(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Vn(s);if(a){const l=Qh(u);return t.concat(u,u.visualViewport||[],Ua(s)?s:[],l&&n?Ha(l):[])}else return t.concat(s,Ha(s,[],n))}function Qh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ib(e){const t=Er(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Fr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=Wl(n)!==a||Wl(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function Jh(e){return gr(e)?e:e.contextElement}function Eo(e){const t=Jh(e);if(!Fr(t))return Lr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=ib(t);let u=(a?Wl(n.width):n.width)/r,l=(a?Wl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const R5=Lr(0);function sb(e){const t=Vn(e);return!Kh()||!t.visualViewport?R5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function L5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function ps(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Jh(e);let u=Lr(1);t&&(r?gr(r)&&(u=Eo(r)):u=Eo(e));const l=L5(a,n,r)?sb(a):Lr(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 y=Vn(a),T=r&&gr(r)?Vn(r):r;let _=y,A=Qh(_);for(;A&&r&&T!==_;){const x=Eo(A),S=A.getBoundingClientRect(),N=Er(A),O=S.left+(A.clientLeft+parseFloat(N.paddingLeft))*x.x,j=S.top+(A.clientTop+parseFloat(N.paddingTop))*x.y;d*=x.x,f*=x.y,p*=x.x,m*=x.y,d+=O,f+=j,_=Vn(A),A=Qh(_)}}return Kl({width:p,height:m,x:d,y:f})}function ec(e,t){const n=Zl(e).scrollLeft;return t?t.left+n:ps(Mr(e)).left+n}function ob(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ec(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function D5(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Mr(r),l=t?Jl(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Lr(1);const p=Lr(0),m=Fr(r);if((m||!m&&!a)&&((mo(r)!=="body"||Ua(u))&&(d=Zl(r)),Fr(r))){const T=ps(r);f=Eo(r),p.x=T.x+r.clientLeft,p.y=T.y+r.clientTop}const y=u&&!m&&!a?ob(u,d):Lr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+y.x,y:n.y*f.y-d.scrollTop*f.y+p.y+y.y}}function M5(e){return Array.from(e.getClientRects())}function F5(e){const t=Mr(e),n=Zl(e),r=e.ownerDocument.body,s=Kr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Kr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+ec(e);const l=-n.scrollTop;return Er(r).direction==="rtl"&&(u+=Kr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const ab=25;function B5(e,t){const n=Vn(e),r=Mr(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=Kh();(!p||p&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=ec(r);if(f<=0){const p=r.ownerDocument,m=p.body,y=getComputedStyle(m),T=p.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-T);_<=ab&&(a-=_)}else f<=ab&&(a+=f);return{width:a,height:u,x:l,y:d}}const U5=new Set(["absolute","fixed"]);function H5(e,t){const n=ps(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Fr(e)?Eo(e):Lr(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 ub(e,t,n){let r;if(t==="viewport")r=B5(e,n);else if(t==="document")r=F5(Mr(e));else if(gr(t))r=H5(t,n);else{const s=sb(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Kl(r)}function lb(e,t){const n=_i(e);return n===t||!gr(n)||go(n)?!1:Er(n).position==="fixed"||lb(n,t)}function j5(e,t){const n=t.get(e);if(n)return n;let r=Ha(e,[],!1).filter(l=>gr(l)&&mo(l)!=="body"),s=null;const a=Er(e).position==="fixed";let u=a?_i(e):e;for(;gr(u)&&!go(u);){const l=Er(u),d=Xh(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&U5.has(s.position)||Ua(u)&&!d&&lb(e,u))?r=r.filter(p=>p!==u):s=l,u=_i(u)}return t.set(e,r),r}function z5(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Jl(t)?[]:j5(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=ub(t,p,s);return f.top=Kr(m.top,f.top),f.right=bi(m.right,f.right),f.bottom=bi(m.bottom,f.bottom),f.left=Kr(m.left,f.left),f},ub(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function $5(e){const{width:t,height:n}=ib(e);return{width:t,height:n}}function V5(e,t,n){const r=Fr(t),s=Mr(t),a=n==="fixed",u=ps(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Lr(0);function f(){d.x=ec(s)}if(r||!r&&!a)if((mo(t)!=="body"||Ua(s))&&(l=Zl(t)),r){const T=ps(t,!0,a,t);d.x=T.x+t.clientLeft,d.y=T.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?ob(s,l):Lr(0),m=u.left+l.scrollLeft-d.x-p.x,y=u.top+l.scrollTop-d.y-p.y;return{x:m,y,width:u.width,height:u.height}}function Zh(e){return Er(e).position==="static"}function cb(e,t){if(!Fr(e)||Er(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mr(e)===n&&(n=n.ownerDocument.body),n}function db(e,t){const n=Vn(e);if(Jl(e))return n;if(!Fr(e)){let s=_i(e);for(;s&&!go(s);){if(gr(s)&&!Zh(s))return s;s=_i(s)}return n}let r=cb(e,t);for(;r&&k5(r)&&Zh(r);)r=cb(r,t);return r&&go(r)&&Zh(r)&&!Xh(r)?n:r||P5(e)||n}const q5=function(e){return De(this,null,function*(){const t=this.getOffsetParent||db,n=this.getDimensions,r=yield n(e.floating);return{reference:V5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function Y5(e){return Er(e).direction==="rtl"}const W5={convertOffsetParentRelativeRectToViewportRelativeRect:D5,getDocumentElement:Mr,getClippingRect:z5,getOffsetParent:db,getElementRects:q5,getClientRects:M5,getDimensions:$5,getScale:Eo,isElement:gr,isRTL:Y5};function fb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function G5(e,t){let n=null,r;const s=Mr(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:y,height:T}=f;if(l||t(),!y||!T)return;const _=Gl(m),A=Gl(s.clientWidth-(p+y)),x=Gl(s.clientHeight-(m+T)),S=Gl(p),O={rootMargin:-_+"px "+-A+"px "+-x+"px "+-S+"px",threshold:Kr(0,bi(1,d))||1};let j=!0;function V(D){const W=D[0].intersectionRatio;if(W!==d){if(!j)return u();W?u(!1,W):r=setTimeout(()=>{u(!1,1e-7)},1e3)}W===1&&!fb(f,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(V,ae(U({},O),{root:s.ownerDocument}))}catch(D){n=new IntersectionObserver(V,O)}n.observe(e)}return u(!0),a}function X5(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=Jh(e),p=s||a?[...f?Ha(f):[],...Ha(t)]:[];p.forEach(S=>{s&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const m=f&&l?G5(f,n):null;let y=-1,T=null;u&&(T=new ResizeObserver(S=>{let[N]=S;N&&N.target===f&&T&&(T.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var O;(O=T)==null||O.observe(t)})),n()}),f&&!d&&T.observe(f),T.observe(t));let _,A=d?ps(e):null;d&&x();function x(){const S=ps(e);A&&!fb(A,S)&&n(),A=S,_=requestAnimationFrame(x)}return n(),()=>{var S;p.forEach(N=>{s&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),m==null||m(),(S=T)==null||S.disconnect(),T=null,d&&cancelAnimationFrame(_)}}const K5=v5,Q5=A5,J5=_5,Z5=N5,eD=x5,tD=w5,nD=C5,rD=(e,t,n)=>{const r=new Map,s=U({platform:W5},n),a=ae(U({},s.platform),{_c:r});return b5(e,t,ae(U({},s),{platform:a}))};function hb(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 ae(U({},s),{toJSON:()=>s})}function iD(e){if(!e)return hb();const{x:t,y:n,width:r,height:s}=e;return hb(t,n,r,s)}function sD(e,t){return{contextElement:Zt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?iD(r):n.getBoundingClientRect()}}}var ja=e=>({variable:e,reference:`var(${e})`}),Jr={arrowSize:ja("--arrow-size"),arrowSizeHalf:ja("--arrow-size-half"),arrowBg:ja("--arrow-background"),transformOrigin:ja("--transform-origin"),arrowOffset:ja("--arrow-offset")},oD=e=>e==="top"||e==="bottom"?"y":"x";function aD(e,t){return{name:"transformOrigin",fn(n){var re,z,K,oe,de;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=oD(d),p=((re=s.arrow)==null?void 0:re.x)||0,m=((z=s.arrow)==null?void 0:z.y)||0,y=(t==null?void 0:t.clientWidth)||0,T=(t==null?void 0:t.clientHeight)||0,_=p+y/2,A=m+T/2,x=Math.abs(((K=s.shift)==null?void 0:K.y)||0),S=u.reference.height/2,N=T/2,O=(de=(oe=e.offset)==null?void 0:oe.mainAxis)!=null?de:e.gutter,j=typeof O=="number"?O+N:O!=null?O:N,V=x>j,D={top:`${_}px calc(100% + ${j}px)`,bottom:`${_}px ${-j}px`,left:`calc(100% + ${j}px) ${A}px`,right:`${-j}px ${A}px`}[d],W=`${_}px ${u.reference.y+S-l}px`,Z=!!e.overlap&&f==="y"&&V;return r.floating.style.setProperty(Jr.transformOrigin.variable,Z?W:D),{data:{transformOrigin:Z?W:D}}}}}var uD={name:"rects",fn({rects:e}){return{data:e}}},lD=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% + ${Jr.arrowOffset.reference})`}),{}}}};function cD(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var dD={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function pb(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function ep(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function fD(e,t,n){const r=e||t.createElement("div");return tD({element:r,padding:n.arrowPadding})}function hD(e,t){var n;if(!R4((n=t.offset)!=null?n:t.gutter))return K5(({placement:r})=>{var p,m,y,T;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}=cD(r),d=l?void 0:t.shift,f=(T=(y=t.offset)==null?void 0:y.crossAxis)!=null?T:d;return Nh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function pD(e){if(!e.flip)return;const t=ep(e.boundary);return J5(ae(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function mD(e){if(!e.slide&&!e.overlap)return;const t=ep(e.boundary);return Q5(ae(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:nD()}))}function gD(e){return Z5({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 ED(e){var t;if(e.hideWhenDetached)return eD({strategy:"referenceHidden",boundary:(t=ep(e.boundary))!=null?t:"clippingAncestors"})}function yD(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function TD(e,t,n={}){const r=sD(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},dD,n),a=t.querySelector("[data-part=arrow]"),u=[hD(a,s),pD(s),mD(s),fD(a,t.ownerDocument,s),lD(a),aD({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),gD(s),ED(s),uD],{placement:l,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>De(null,null,function*(){var j;if(!r||!t)return;const A=yield rD(r,t,{placement:l,middleware:u,strategy:d});f==null||f(A),p==null||p({placed:!0});const x=so(t),S=pb(x,A.x),N=pb(x,A.y);t.style.setProperty("--x",`${S}px`),t.style.setProperty("--y",`${N}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 O=t.firstElementChild;if(O){const V=ao(O);t.style.setProperty("--z-index",V.zIndex)}}),y=()=>De(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),T=yD(s.listeners),_=s.listeners?X5(r,t,y,T):z4;return y(),()=>{_==null||_(),p==null||p({placed:!1})}}function mb(e,t,n={}){const l=n,{defer:r}=l,s=An(l,["defer"]),a=r?Yt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(TD(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var bD={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function wD(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:Jr.arrowSize.reference,height:Jr.arrowSize.reference,[Jr.arrowSizeHalf.variable]:`calc(${Jr.arrowSize.reference} / 2)`,[Jr.arrowOffset.variable]:`calc(${Jr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?bD[t.split("-")[0]]:void 0,background:Jr.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 yo=new WeakMap,tc=new WeakMap,nc={},tp=0,gb=e=>e&&(e.host||gb(e.parentNode)),_D=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=gb(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),xD=new Set(["script","output","status","next-route-announcer"]),SD=e=>xD.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),vD=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=_D(n,Array.isArray(e)?e:[e]);nc[r]||(nc[r]=new WeakMap);const l=nc[r],d=[],f=new Set,p=new Set(u),m=T=>{!T||f.has(T)||(f.add(T),m(T.parentNode))};u.forEach(T=>{m(T),a&&Zt(T)&&NT(T,_=>{m(_)})});const y=T=>{!T||p.has(T)||Array.prototype.forEach.call(T.children,_=>{if(f.has(_))y(_);else try{if(SD(_))return;const x=_.getAttribute(s)==="true",S=(yo.get(_)||0)+1,N=(l.get(_)||0)+1;yo.set(_,S),l.set(_,N),d.push(_),S===1&&x&&tc.set(_,!0),N===1&&_.setAttribute(r,""),x||_.setAttribute(s,"true")}catch(A){console.error("[zag-js > ariaHidden] cannot operate on ",_,A)}})};return y(n),f.clear(),tp++,()=>{d.forEach(T=>{const _=yo.get(T)-1,A=l.get(T)-1;yo.set(T,_),l.set(T,A),_||(tc.has(T)||T.removeAttribute(s),tc.delete(T)),A||T.removeAttribute(r)}),tp--,tp||(yo=new WeakMap,yo=new WeakMap,tc=new WeakMap,nc={})}},AD=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,CD=(e,t=AD(e),n="data-aria-hidden",r=!0)=>{if(t)return vD(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},ND=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Eb(e,t={}){const{defer:n=!0}=t,r=n?ND:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(CD(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function kD(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 OD(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 yb="pointerdown.outside",Tb="focus.outside";function ID(e){for(const t of e)if(Zt(t)&&Rr(t))return!0;return!1}var bb=e=>"clientY"in e;function PD(e,t){if(!bb(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 RD(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function wb(e,t){if(!t||!bb(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 RD(u,l)?r||a:!1}function LD(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Pr(e),f=so(e),p=kD(f),m=OD(f);function y(O,j){if(!Zt(j)||!j.isConnected||io(e,j)||PD(e,O)||l&&CT(e,j))return!1;const V=d.querySelector(`[aria-controls="${e.id}"]`);if(V){const W=Fh(V);if(wb(O,W))return!1}const D=Fh(e);return wb(O,D)?!1:!(n!=null&&n(j))}const T=new Set,_=ls(e==null?void 0:e.getRootNode());function A(O){function j(V){var re,z;const D=u&&!kT()?Yt:K=>K(),W=V!=null?V:O,Z=(z=(re=W==null?void 0:W.composedPath)==null?void 0:re.call(W))!=null?z:[W==null?void 0:W.target];D(()=>{const K=_?Z[0]:mr(O);if(!(!e||!y(O,K))){if(s||a){const oe=Ch(s,a);e.addEventListener(yb,oe,{once:!0})}_b(e,yb,{bubbles:!1,cancelable:!0,detail:{originalEvent:W,contextmenu:xL(W),focusable:ID(Z),target:K}})}})}O.pointerType==="touch"?(T.forEach(V=>V()),T.add(en(d,"click",j,{once:!0})),T.add(m.addEventListener("click",j,{once:!0})),T.add(p.addEventListener("click",j,{once:!0}))):j()}const x=new Set,S=setTimeout(()=>{x.add(en(d,"pointerdown",A,!0)),x.add(m.addEventListener("pointerdown",A,!0)),x.add(p.addEventListener("pointerdown",A,!0))},0);function N(O){(u?Yt:V=>V())(()=>{var W,Z;const V=(Z=(W=O==null?void 0:O.composedPath)==null?void 0:W.call(O))!=null?Z:[O==null?void 0:O.target],D=_?V[0]:mr(O);if(!(!e||!y(O,D))){if(r||a){const re=Ch(r,a);e.addEventListener(Tb,re,{once:!0})}_b(e,Tb,{bubbles:!1,cancelable:!0,detail:{originalEvent:O,contextmenu:!1,focusable:Rr(D),target:D}})}})}return kT()||(x.add(en(d,"focusin",N,!0)),x.add(m.addEventListener("focusin",N,!0)),x.add(p.addEventListener("focusin",N,!0))),()=>{clearTimeout(S),T.forEach(O=>O()),x.forEach(O=>O())}}function DD(e,t){const{defer:n}=t,r=n?Yt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(LD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function _b(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function MD(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return en(Pr(e),"keydown",n,{capture:!0})}var xb="layer:request-dismiss",er={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=>io(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>io(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=>er.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];BD(e,xb,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),FD(e,xb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function FD(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 BD(e,t,n){e.addEventListener(t,n,{once:!0})}var Sb;function vb(){er.layers.forEach(({node:e})=>{e.style.pointerEvents=er.isBelowPointerBlockingLayer(e)?"none":"auto"})}function UD(e){e.style.pointerEvents=""}function HD(e,t){const n=Pr(e),r=[];return er.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Sb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=YL(()=>{const l=s();return Zt(l)?l:null},{timeout:1e3});a.then(l=>r.push(zl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{er.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Sb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function jD(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){kh("[@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};er.add(f),vb();function p(A){var S,N;const x=mr(A.detail.originalEvent);er.isBelowPointerBlockingLayer(e)||er.isInBranch(x)||((S=t.onPointerDownOutside)==null||S.call(t,A),(N=t.onInteractOutside)==null||N.call(t,A),!A.defaultPrevented&&(l&&console.log("onPointerDownOutside:",A.detail.originalEvent),r==null||r()))}function m(A){var S,N;const x=mr(A.detail.originalEvent);er.isInBranch(x)||((S=t.onFocusOutside)==null||S.call(t,A),(N=t.onInteractOutside)==null||N.call(t,A),!A.defaultPrevented&&(l&&console.log("onFocusOutside:",A.detail.originalEvent),r==null||r()))}function y(A){var x;er.isTopMost(e)&&((x=t.onEscapeKeyDown)==null||x.call(t,A),!A.defaultPrevented&&r&&(A.preventDefault(),r()))}function T(A){var O;if(!e)return!1;const x=typeof u=="function"?u():u,S=Array.isArray(x)?x:[x],N=(O=t.persistentElements)==null?void 0:O.map(j=>j()).filter(Zt);return N&&S.push(...N),S.some(j=>io(j,A))||er.isInNestedLayer(e,A)}const _=[a?HD(e,t.persistentElements):void 0,MD(e,y),DD(e,{exclude:T,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{er.remove(e),vb(),UD(e),_.forEach(A=>A==null?void 0:A())}}function Ab(e,t){const{defer:n}=t,r=n?Yt:a=>a(),s=[];return s.push(r(()=>{const a=no(e)?e():e;s.push(jD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var zD=Object.defineProperty,$D=(e,t,n)=>t in e?zD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ot=(e,t,n)=>$D(e,typeof t!="symbol"?t+"":t,n),Cb={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()}},VD=[],qD=class{constructor(e,t){Ot(this,"trapStack"),Ot(this,"config"),Ot(this,"doc"),Ot(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ot(this,"portalContainers",new Set),Ot(this,"listenerCleanups",[]),Ot(this,"handleFocus",r=>{const s=mr(r),a=this.findContainerIndex(s,r)>=0;if(a||Bl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(Ma(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=>Ma(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}),Ot(this,"handlePointerDown",r=>{const s=mr(r);if(!(this.findContainerIndex(s,r)>=0)){if($a(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}$a(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ot(this,"handleClick",r=>{const s=mr(r);this.findContainerIndex(s,r)>=0||$a(this.config.clickOutsideDeactivates,r)||$a(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ot(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;za(r)&&r.preventDefault(),this.tryFocus(a)}}),Ot(this,"handleEscapeKey",r=>{YD(r)&&$a(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ot(this,"_mutationObserver"),Ot(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 pL(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?mL(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ot(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)}))}),Ot(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Rr(r)){const s=oo(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}),Ot(this,"tryFocus",r=>{if(r!==!1&&r!==oo(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,WD(r)&&r.select()}}),Ot(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(),Cb.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=()=>{Nb(()=>{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}),Ot(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}),Ot(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}),Ot(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ot(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),Ot(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),Ot(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}),Ot(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||mr(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||Rr(u)&&!cs(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,y=this.state.tabbableGroups[m];l=Ma(u)>=0?y.lastTabbableNode:y.lastDomTabbableNode}else za(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||Rr(u)&&!cs(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,y=this.state.tabbableGroups[m];l=Ma(u)>=0?y.firstTabbableNode:y.firstDomTabbableNode}else za(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||VD;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return za(r)&&!r.shiftKey},isKeyBackward(r){return za(r)&&r.shiftKey}},t);this.doc=n.document||Pr(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=>{dL(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?CT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=uo(e,{getShadowRoot:this.config.getShadowRoot}),n=MT(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(Ma(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 y=n.indexOf(f);if(!(y<0)){if(p){for(let T=y+1;T<n.length;T++)if(cs(n[T]))return n[T]}else for(let T=y-1;T>=0;T--)if(cs(n[T]))return n[T]}}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 Cb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Nb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(en(this.doc,"focusin",this.handleFocus,!0),en(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),en(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),en(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),en(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),en(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=oo(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)}},za=e=>e.key==="Tab",$a=(e,...t)=>typeof e=="function"?e(...t):e,YD=e=>!e.isComposing&&e.key==="Escape",Nb=e=>setTimeout(e,0),WD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function kb(e,t={}){let n;const r=Yt(()=>{const s=typeof e=="function"?e():e;if(s){n=new qD(s,ae(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Pr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var np="data-scroll-lock";function GD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Ob(e){const t=ao(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Ib(e){var T;const t=e!=null?e:document,n=(T=t.defaultView)!=null?T:window,{documentElement:r,body:s}=t;if(s.hasAttribute(np))return;const u=Ob(r)||Ob(s),l=n.innerWidth-r.clientWidth;s.setAttribute(np,"");const d=()=>VL(r,"--scrollbar-width",`${l}px`),f=GD(r),p=()=>{const _={overflow:"hidden"};return!u&&l>0&&(_[f]=`${l}px`),zl(s,_)},m=()=>{var V,D;const{scrollX:_,scrollY:A,visualViewport:x}=n,S=(V=x==null?void 0:x.offsetLeft)!=null?V:0,N=(D=x==null?void 0:x.offsetTop)!=null?D:0,O={position:"fixed",overflow:"hidden",top:`${-(A-Math.floor(N))}px`,left:`${-(_-Math.floor(S))}px`,right:"0"};!u&&l>0&&(O[f]=`${l}px`);const j=zl(s,O);return()=>{j==null||j(),n.scrollTo({left:_,top:A,behavior:"instant"})}},y=[d(),Ul()?m():p()];return()=>{y.forEach(_=>_==null?void 0:_()),s.removeAttribute(np)}}var XD=fs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Br=XD.build(),Pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Rb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},rp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Lb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},KD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},ip=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},QD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Db=e=>e.getById(Pb(e)),To=e=>e.getById(Rb(e)),bo=e=>e.getById(rp(e)),Mb=e=>e.getById(Lb(e)),JD=e=>e.getById(ip(e)),ZD=e=>e.getById(sp(e));function e8(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"),y=wD(ae(U({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(T){n.matches("open")!==T&&s({type:T?"OPEN":"CLOSE"})},reposition(T={}){s({type:"POSITIONING.SET",options:T})},getArrowProps(){return t.element(ae(U({id:KD(l)},Br.arrow.attrs),{dir:u("dir"),style:y.arrow}))},getArrowTipProps(){return t.element(ae(U({},Br.arrowTip.attrs),{dir:u("dir"),style:y.arrowTip}))},getAnchorProps(){return t.element(ae(U({},Br.anchor.attrs),{dir:u("dir"),id:Pb(l)}))},getTriggerProps(){return t.button(ae(U({},Br.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:Rb(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":rp(l),onPointerDown(T){OT(T)&&wL()&&T.currentTarget.focus()},onClick(T){T.defaultPrevented||s({type:"TOGGLE"})},onBlur(T){s({type:"TRIGGER_BLUR",target:T.relatedTarget})}}))},getIndicatorProps(){return t.element(ae(U({},Br.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ae(U({id:Lb(l)},Br.positioner.attrs),{dir:u("dir"),style:y.floating}))},getContentProps(){return t.element(ae(U({},Br.content.attrs),{dir:u("dir"),id:rp(l),tabIndex:-1,role:"dialog","aria-modal":ST(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ro(d),"aria-labelledby":m.title?ip(l):void 0,"aria-describedby":m.description?sp(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(ae(U({},Br.title.attrs),{id:ip(l),dir:u("dir")}))},getDescriptionProps(){return t.element(ae(U({},Br.description.attrs),{id:sp(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ae(U({},Br.closeTrigger.attrs),{dir:u("dir"),id:QD(l),type:"button","aria-label":"close",onClick(T){T.defaultPrevented||(T.stopPropagation(),s({type:"CLOSE"}))}}))}}}var t8={props({props:e}){return ae(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=Db(n))!=null?a:To(n);return mb(r,()=>Mb(n),ae(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>bo(n);let s=!0;return Ab(r,{type:"popover",pointerBlocking:t("modal"),exclude:To(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:zL(()=>bo(t),{triggerElement:To(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Eb(()=>[bo(t),To(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Ib(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?kb(()=>bo(t),{initialFocus:()=>FT({root:bo(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=Db(n))!=null?u:To(n);mb(s,()=>Mb(n),ae(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Yt(()=>{Object.assign(e.get("renderedElements"),{title:!!JD(t),description:!!ZD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Yt(()=>{const n=FT({root:bo(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||Yt(()=>{const a=To(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};fo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[AH,rc]=ds({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[CH,op]=ds({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),n8=e=>{const t=P.useId(),{getRootNode:n}=rc(),{dir:r}=op(),s=U({id:t,dir:r,getRootNode:n},e),a=Vl(t8,s);return e8(a,Hh)},r8=e=>{const[t,u]=YT(e),l=u,{children:n}=l,r=An(l,["children"]),s=n8(r),a=$h(Wt({present:s.open},t));return w.jsx(r5,{value:s,children:w.jsx($T,{value:a,children:n})})},Fb=P.forwardRef((e,t)=>{const n=zh(),r=Fa(),s=Wt(ae(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(gn.button,ae(U({},s),{ref:t}))});Fb.displayName="PopoverTrigger";function i8(e){return mt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function s8(e){return mt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function Bb(e){return mt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function Ub(e){return mt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function o8(e){return mt({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 a8(e){return mt({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 ap(e){return mt({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 Hb(e){return mt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const u8=({className:e,componentType:t,children:n})=>{const[r,s]=P.useState(!1),{globalClassName:a}=ft(),u=f=>{s(f.open)},l=P.useCallback(()=>{s(!1)},[]),d=P.useMemo(()=>({closeMenu:l}),[l]);return w.jsxs(r8,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(Fb,{"aria-label":`Overflow menu for ${t}`,className:M(`${k}-overflow-menu-button-trigger`,`${k}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(Hb,{})}),w.jsx(qT,{children:w.jsx(VT,{className:M(`${k}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(mT.Provider,{value:d,children:n})})})]})};function jb(e){return mt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function zb(e){return mt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[l8,ms]=ds({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),up=P.forwardRef((e,t)=>{const n=ms(),r=Wt(n.getControlProps(),e);return w.jsx(gn.div,ae(U(U({},r),e),{ref:t}))});up.displayName="CarouselControl";const lp=P.forwardRef((e,t)=>{const[n,r]=Ba()(e,["readOnly","index"]),s=ms(),a=Wt(s.getIndicatorProps(n),r);return w.jsx(gn.button,ae(U({},a),{ref:t}))});lp.displayName="CarouselIndicator";const cp=P.forwardRef((e,t)=>{const n=ms(),r=Wt(n.getIndicatorGroupProps(),e);return w.jsx(gn.div,ae(U({},r),{ref:t}))});cp.displayName="CarouselIndicatorGroup";const dp=P.forwardRef((e,t)=>{const[n,r]=Ba()(e,["index","snapAlign"]),s=ms(),a=Wt(s.getItemProps(n),r);return w.jsx(gn.div,ae(U({},a),{ref:t}))});dp.displayName="CarouselItem";const fp=P.forwardRef((e,t)=>{const n=ms(),r=Wt(n.getItemGroupProps(),e);return w.jsx(gn.div,ae(U({},r),{ref:t}))});fp.displayName="CarouselItemGroup";const hp=P.forwardRef((e,t)=>{const n=ms(),r=Wt(n.getNextTriggerProps(),e);return w.jsx(gn.button,ae(U({},r),{ref:t}))});hp.displayName="CarouselNextTrigger";const pp=P.forwardRef((e,t)=>{const n=ms(),r=Wt(n.getPrevTriggerProps(),e);return w.jsx(gn.button,ae(U({},r),{ref:t}))});pp.displayName="CarouselPrevTrigger";function c8(e){const t=ao(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(y,T){let _=parseFloat(y);return/%/.test(y)&&(_/=100,_*=T),Number.isNaN(_)?0:_}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 d8(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 $b(e){let t=[];for(const n of e.children)t=t.concat(n,$b(n));return t}function Vb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?$b(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(!d8(n,m,u))continue;const y=ao(p);let[T,_]=y.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=T);const A=a==="x"?_:T,x=m[l]-n[l]+e[f];switch(A){case"none":break;case"start":r[a].start.push({node:p,position:x});break;case"center":r[a].center.push({node:p,position:x+m[d]/2});break;case"end":r[a].end.push({node:p,position:x+m[d]});break}}}return r}function qb(e){const t=e.getBoundingClientRect(),n=c8(e),r=Vb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Yb([...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(Wb(0,s.x))),y:Yb([...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(Wb(0,s.y)))}}function f8(e,t,n){const r=Vb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var Yb=e=>[...new Set(e)],Wb=(e,t)=>n=>Math.max(e,Math.min(t,n)),h8=fs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Zr=h8.build(),p8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},m8=(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}`},ic=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},g8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},E8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},y8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Gb=(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}`},Rn=e=>e.getById(ic(e)),Xb=e=>$L(Rn(e),"[data-part=item]"),T8=(e,t)=>e.getById(Gb(e,t)),Kb=e=>{const t=Rn(e);if(!t)return;const n=uo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function b8(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"),y=s("isHorizontal"),T=Array.from(r.get("pageSnapPoints")),_=r.get("page"),A=l("slidesPerPage"),x=l("padding"),S=l("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:T,canScrollNext:p,canScrollPrev:m,getProgress(){return _/T.length},scrollToIndex(N,O){a({type:"INDEX.SET",index:N,instant:O})},scrollTo(N,O){a({type:"PAGE.SET",index:N,instant:O})},scrollNext(N){a({type:"PAGE.NEXT",instant:N})},scrollPrev(N){a({type:"PAGE.PREV",instant:N})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(N){return Array.from(r.get("slidesInView")).includes(N)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(ae(U({},Zr.root.attrs),{id:p8(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":A,"--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(ae(U({},Zr.itemGroup.attrs),{id:ic(u),"data-orientation":l("orientation"),"data-dragging":ro(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(N){io(N.currentTarget,mr(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){io(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!l("allowMouseDrag")||!OT(N))return;const O=mr(N);Rr(O)&&O!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:$4(N=>{const O=l("orientation")==="horizontal"?"deltaX":"deltaY";N[O]<0&&!s("canScrollPrev")||N[O]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[y?"x":"y",l("snapType")].join(" "),gridAutoFlow:y?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[y?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[y?"scrollPaddingInline":"scrollPaddingBlock"]:x,[y?"paddingInline":"paddingBlock"]:x,[y?"overflowX":"overflowY"]:"auto"}}))},getItemProps(N){const O=r.get("slidesInView").includes(N.index);return t.element(ae(U({},Zr.item.attrs),{id:m8(u,N.index),dir:l("dir"),role:"group","data-index":N.index,"data-inview":ro(O),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":S.item(N.index,l("slideCount")),"aria-hidden":ST(!O),style:{scrollSnapAlign:(()=>{var Z;const j=(Z=N.snapAlign)!=null?Z:"start",V=l("slidesPerMove"),D=V==="auto"?Math.floor(l("slidesPerPage")):V;return(N.index+D)%D===0?j:void 0})()}}))},getControlProps(){return t.element(ae(U({},Zr.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(ae(U({},Zr.prevTrigger.attrs),{id:E8(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":S.prevTrigger,"data-orientation":l("orientation"),"aria-controls":ic(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ae(U({},Zr.nextTrigger.attrs),{dir:l("dir"),id:g8(u),type:"button","aria-label":S.nextTrigger,"data-orientation":l("orientation"),"aria-controls":ic(u),disabled:!p,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ae(U({},Zr.indicatorGroup.attrs),{dir:l("dir"),id:y8(u),"data-orientation":l("orientation"),onKeyDown(N){if(N.defaultPrevented)return;const O="indicator",j={ArrowDown(W){y||(a({type:"PAGE.NEXT",src:O}),W.preventDefault())},ArrowUp(W){y||(a({type:"PAGE.PREV",src:O}),W.preventDefault())},ArrowRight(W){y&&(a({type:"PAGE.NEXT",src:O}),W.preventDefault())},ArrowLeft(W){y&&(a({type:"PAGE.PREV",src:O}),W.preventDefault())},Home(W){a({type:"PAGE.SET",index:0,src:O}),W.preventDefault()},End(W){a({type:"PAGE.SET",index:T.length-1,src:O}),W.preventDefault()}},V=AL(N,{dir:l("dir"),orientation:l("orientation")}),D=j[V];D==null||D(N)}}))},getIndicatorProps(N){return t.button(ae(U({},Zr.indicator.attrs),{dir:l("dir"),id:Gb(u,N.index),type:"button","data-orientation":l("orientation"),"data-index":N.index,"data-readonly":ro(N.readOnly),"data-current":ro(N.index===_),"aria-label":S.indicator(N.index),onClick(O){O.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ae(U({},Zr.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":ro(d),"aria-label":d?S.autoplayStop:S.autoplayStart,onClick(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var w8={props({props:e}){return X4(e,["slideCount"],"carousel"),ae(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:_8(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 P4(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(Rn(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=Rn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Kb(e)});return Kb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Rn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Yt(()=>{s(),Yt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return Xb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Rn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var y;const p=f.target,m=Number((y=p.dataset.index)!=null?y:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?C4(d,m):N4(d,m)},n.get("slidesInView"));n.set("slidesInView",k4(l))},{root:r,threshold:t("inViewThreshold")});return Xb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Rn(n);return r?en(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 en(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return HL(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 en(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=_T((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Rn(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=Rn(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=TT(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=O4(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Rn(r);if(!s)return;const a=f8(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=_T(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Rn(n);if(!r)return;const s=qb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Rn(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=Rn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Rn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=qb(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]);Yt(()=>{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=T8(n,e.get("page"));r&&Yt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function _8(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}fo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),fo()(["index","readOnly"]),fo()(["index","snapAlign"]);const x8=e=>{const t=P.useId(),{getRootNode:n}=rc(),{dir:r}=op(),s=U({id:t,dir:r,getRootNode:n},e),a=Vl(w8,s);return b8(a,Hh)},mp=P.forwardRef((e,t)=>{const[n,r]=Ba()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=x8(n),a=Wt(s.getRootProps(),r);return w.jsx(l8,{value:s,children:w.jsx(gn.div,ae(U({},a),{ref:t}))})});mp.displayName="CarouselRoot";const S8=180,v8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},A8=({globalClassName:e,className:t,itemMinWidth:n=S8,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((Z,re)=>({node:Z,key:P.isValidElement(Z)&&Z.key!=null?Z.key:`carousel-item-${re}`})),y=m.length,T=P.useRef(null),[_,A]=P.useState(0),{width:x}=wv();P.useLayoutEffect(()=>{T.current&&A(T.current.getBoundingClientRect().width)},[x,y]);const S=v8(r),N=n+S,O=_>0?(_+S)/N:1,j=Math.max(1,Math.floor(O));if(y===0)return null;const V=y>j,D=Math.ceil(y/j),W=V?Math.max(1,O):j;return w.jsxs(mp,{ref:T,className:M(e,t,`${k}-carousel`),slidesPerPage:W,slidesPerMove:j,spacing:r,loop:s,allowMouseDrag:a,slideCount:y,onPageChange:d,"aria-label":f,children:[w.jsx(fp,{className:M(e,`${k}-carousel__item-group`,{"carousel-row-container":!V}),children:m.map(({node:Z,key:re},z)=>w.jsx(dp,{index:z,className:M(e,`${k}-carousel__item`),children:Z},re))}),l&&V&&w.jsxs(up,{className:M(e,`${k}-carousel__control`),children:[w.jsx(pp,{className:M(e,`${k}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(Bb,{size:"16px"})}),w.jsx(hp,{className:M(e,`${k}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(Ub,{size:"16px"})})]}),u&&V&&w.jsx(cp,{className:M(e,`${k}-carousel__indicator-group`),children:Array.from({length:D},(Z,re)=>w.jsx(lp,{index:re,className:M(e,`${k}-carousel__indicator`),"aria-label":`Go to slide group ${re+1}`},re))})]})},C8=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:M(e,`${k}-close-button`),disabled:r,onClick:n,children:w.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.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"})})}),[N8,k8]=ds({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),O8=e=>Ba()(e,["lazyMount","unmountOnExit"]),[I8,Va]=ds({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Qb=P.forwardRef((e,t)=>{const n=Va(),r=k8(),s=$h(ae(U({},r),{present:n.open})),a=Wt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:w.jsx(gn.div,ae(U({},a),{ref:ql(s.ref,t)}))});Qb.displayName="DialogBackdrop";const gp=P.forwardRef((e,t)=>{const n=Va(),r=Fa(),s=Wt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(gn.div,ae(U({},s),{ref:ql(r.ref,t)}))});gp.displayName="DialogContent";const Ep=P.forwardRef((e,t)=>{const n=Va(),r=Wt(n.getDescriptionProps(),e);return w.jsx(gn.div,ae(U({},r),{ref:t}))});Ep.displayName="DialogDescription";const yp=P.forwardRef((e,t)=>{const n=Va(),r=Wt(n.getPositionerProps(),e);return Fa().unmounted?null:w.jsx(gn.div,ae(U({},r),{ref:t}))});yp.displayName="DialogPositioner";var P8=fs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),gs=P8.build(),Jb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Zb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},ew=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},bp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},wp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},tw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},sc=e=>e.getById(Tp(e)),R8=e=>e.getById(Jb(e)),L8=e=>e.getById(Zb(e)),D8=e=>e.getById(ew(e)),M8=e=>e.getById(bp(e)),F8=e=>e.getById(wp(e)),B8=e=>e.getById(tw(e));function U8(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(ae(U({},gs.trigger.attrs),{dir:a("dir"),id:ew(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Tp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ae(U({},gs.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Zb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ae(U({},gs.positioner.attrs),{dir:a("dir"),id:Jb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(ae(U({},gs.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Tp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:bp(u),"aria-describedby":f.description?wp(u):void 0}))},getTitleProps(){return t.element(ae(U({},gs.title.attrs),{dir:a("dir"),id:bp(u)}))},getDescriptionProps(){return t.element(ae(U({},gs.description.attrs),{dir:a("dir"),id:wp(u)}))},getCloseTriggerProps(){return t.button(ae(U({},gs.closeTrigger.attrs),{dir:a("dir"),id:tw(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var H8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>B8(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 Ab(()=>sc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[D8(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 Ib(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?kb(()=>sc(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")?Eb(()=>[sc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Yt(()=>{e.set("rendered",{title:!!M8(t),description:!!F8(t)})})},syncZIndex({scope:e}){Yt(()=>{const t=sc(e);if(!t)return;const n=ao(t);[R8(e),L8(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})}}}};fo()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const j8=e=>{const t=P.useId(),{getRootNode:n}=rc(),{dir:r}=op(),s=U({id:t,getRootNode:n,dir:r},e),a=Vl(H8,s);return U8(a,Hh)},nw=e=>{const[t,l]=YT(e),d=l,{children:n}=d,r=An(d,["children"]),[s]=O8(t),a=j8(r),u=$h(Wt({present:a.open},t));return w.jsx(I8,{value:a,children:w.jsx(N8,{value:s,children:w.jsx($T,{value:u,children:n})})})},rw=P.forwardRef((e,t)=>{const n=Va(),r=Wt(n.getTitleProps(),e);return w.jsx(gn.h2,ae(U({},r),{ref:t}))});rw.displayName="DialogTitle";const z8=({children:e})=>{const[t,n]=P.useState(!1),r=P.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=P.useMemo(()=>({isOpen:t}),[t]);return w.jsx(Ah.Provider,{value:r,children:w.jsx(pT.Provider,{value:s,children:e})})},iw=()=>P.useContext(pT),sw=()=>{const e=P.useContext(Ah);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},$8=`${k}-overflow-menu-button-trigger`,V8=({componentType:e,children:t})=>{const{isOpen:n}=iw(),{closeMenu:r}=sw(),{globalClassName:s}=ft(),a=P.useRef(null);return P.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${$8}`)||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?w.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:M(`${k}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},q8=({componentType:e,className:t})=>{const{toggleMenu:n}=sw(),{isOpen:r}=iw(),{globalClassName:s}=ft();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:M(`${k}-overflow-menu-button-trigger`,`${k}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:w.jsx(Hb,{})})};class Y8{constructor(){Ke(this,"initialState",rg);Ke(this,"promptsStateProxy");Ke(this,"promptsParamsProxy");Ke(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ke(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return X8(n,r),Reflect.set(t,n,r)});Ke(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Ke(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Ke(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 xi=new Y8,W8=e=>{window.addEventListener(zd,e)},G8=e=>{window.removeEventListener(zd,e)},X8=(e,t)=>{const n=new CustomEvent(zd,{detail:{property:e,value:t}});window.dispatchEvent(n)},ow=e=>{const t=xi.isOpen,n=typeof e=="boolean"?e:!t;xi.promptsStateProxy.isOpen=n},K8=e=>{const t=xi.isInline,n=typeof e=="boolean"?e:!t;xi.promptsStateProxy.isInline=n},Q8=({elementId:e,entryType:t,params:n,isInline:r})=>{xi.promptsStateProxy.elementId=e,t&&(xi.promptsStateProxy.entryType=t),typeof r=="boolean"&&K8(r),n&&xi.updatePromptsParamsProxy(n),xi.isOpen||ow(!0)},J8=()=>{W0("resetConversation",!0,Hu.RESET_CONVERSATION)},Z8=()=>{W0("endConversation",!0,Hu.END_CONVERSATION)},aw=()=>{const e=P.useContext(b1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},eM=()=>{const e=P.useContext(T1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},oc=()=>{const e=P.useContext(y1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},tM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),{previousComponentType:r}=Wr(),s=us(),a=()=>{zu(r||"dialog"),s()};return t?w.jsx(fr,{className:M(n,`${k}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(jb,{})}):w.jsxs("button",{className:M(n,`${k}-overflow-menu-button`,`${k}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(jb,{}),"Show ",r||"dialog"]})},nM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),{isModalFullscreen:r}=Wr(),s=us(),a=()=>{qd(!r),s()},u=r?KN:QN,l="Toggle Fullscreen";return t?w.jsx(fr,{ariaLabel:l,title:l,className:M(n,`${k}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:M(n,`${k}-overflow-menu-button`,`${k}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),l]})},rM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),{dialogPosition:r}=Wr(),s=us(),a=r==="bottom-left",u=()=>{Yd(a?"bottom-right":"bottom-left"),s()},l=a?s8:i8,d=a?"Move right":"Move left";return t?w.jsx(fr,{className:M(n,`${k}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(l,{})}):w.jsxs("button",{className:M(n,`${k}-overflow-menu-button`,`${k}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(l,{}),d]})},uw=({componentType:e,onClearChat:t,onEndConversation:n,onClose:r,onDownloadTranscript:s})=>{const{headerConfig:a,globalClassName:u,mode:l,enableDownloadTranscript:d}=ft(),{mode:f}=Wr(),p=l==="messaging"&&d&&!!s,m=f==="standalone",y=e==="modal",T=y?tM:cw,_=y?nM:rM,A=P.useMemo(()=>a?qN(a):{},[a]);return w.jsx(z8,{children:w.jsxs("div",{className:M(u,`${k}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:M(u,`${k}-${e}-header`,{standalone:m,embedded:!m}),style:A,children:[(a==null?void 0:a.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:M(u,`${k}-${e}-logo`,{standalone:m,embedded:!m}),src:a.logoUrl}),w.jsx(rw,{className:M(u,`${k}-${e}-title`,{standalone:m,embedded:!m}),children:a==null?void 0:a.headerText}),w.jsxs("div",{className:M(u,`${k}-${e}-controls`),children:[w.jsx(T,{componentType:e,isIcon:!0}),w.jsx(q8,{componentType:e}),w.jsx(C8,{className:M(u,`cim-${e}-component`),onClick:r})]})]}),w.jsxs(V8,{componentType:e,children:[w.jsx(_,{componentType:e}),w.jsx(uM,{componentType:e}),w.jsx(gT,{componentType:e,onClearChat:t}),n&&w.jsx(yT,{componentType:e,onEndConversation:n}),p&&w.jsx(ET,{componentType:e,onDownloadTranscript:s})]})]})})},wo="USD",ac=(...e)=>e.flatMap(t=>t!=null?t:[]).reduce((t,n)=>{const r=n.promotionalPrice;return typeof r!="number"||!Number.isFinite(r)?t:t===void 0||r<t?r:t},void 0),ei=(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}`}},iM=({retailPrice:e,discountPrice:t,currencyCode:n=wo})=>{const r=n||wo,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:ei(a,r),comparePrice:ei(u,r),hasDiscount:s}},uc=e=>typeof e=="number"&&Number.isFinite(e),_p=({min:e,max:t,currencyCode:n=wo})=>{if(!uc(e)||!uc(t))return null;const r=n||wo,s=ei(e,r),a=ei(t,r);if(s===null||a===null)return null;const u=e!==t;return{value:u?`${s} – ${a}`:s,low:s,high:a,isRange:u}},sM=({priceBreakdown:e,currencyCode:t=wo})=>{if(!e)return null;const n=t||wo,r=[e.promotional,e.sales,e.original],s=r.map(f=>f==null?void 0:f.min).filter(uc),a=r.map(f=>f==null?void 0:f.max).filter(uc);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=_p({min:u,max:l,currencyCode:n});return d?{range:d.value,low:d.low,high:d.high}:null},xp=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=iM({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return w.jsxs("div",{className:M(s,a,`${k}-price`),style:f,children:[w.jsx("span",{className:`${k}-visually-hidden`,children:"Current price: "}),w.jsx("span",{className:M(s,`${k}-price__amount`),children:u}),d&&l&&w.jsxs("span",{className:M(s,`${k}-price__compare`),children:[w.jsx("span",{className:`${k}-visually-hidden`,children:"Original price: "}),l]})]})},oM={sparkle:ap,plus:o8,"paper-plane":a8},lw=({icon:e,className:t})=>{const n=oM[e];return n?w.jsx(n,{className:t,"aria-hidden":"true"}):null},aM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var T;const{suggestionButtonConfig:u}=ft(),l=u==null?void 0:u.icon,d=(T=u==null?void 0:u.iconPosition)!=null?T:"left",f=s?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},y=_=>w.jsxs(w.Fragment,{children:[l&&w.jsx(lw,{icon:l,className:`${k}-suggestion-button-icon`}),w.jsx("span",{children:_})]});return w.jsx("div",{className:M(t,`${k}-suggestion-container ${f}`,e),children:n.map(_=>s?w.jsx(If,{disabled:r,className:M(t,`${k}-suggestion-button standalone`,m),onClick:p(_),children:y(_)},_):w.jsx("button",{disabled:r,className:M(t,`${k}-suggestion-button embedded`,m),onClick:p(_),children:y(_)},_))})},uM=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ft();if(!r)return null;const s=()=>{Yr(!1),Fs(!0)};return t?w.jsx(fr,{className:M(n,`${k}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:w.jsx(R1,{})}):w.jsxs("button",{className:M(n,`${k}-overflow-menu-button`,`${k}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(R1,{}),"Minimize"]})},cw=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),r=us(),s=()=>{zu("modal"),r()};return t?w.jsx(fr,{className:M(n,`${k}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:w.jsx(zb,{})}):w.jsxs("button",{className:M(n,`${k}-overflow-menu-button`,`${k}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(zb,{}),"Show modal"]})};function lc(){const{sendMessage:e}=fn(),{productId:t}=aw();return P.useCallback((n,r)=>{var u;const{prompt:s,display:a}=i1(n,t);return e(s,ae(U({},r),{displayContent:(u=r==null?void 0:r.displayContent)!=null?u:a}))},[e,t])}const lM=["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"],cM=3e3,dM=400,fM=({globalClassName:e,isWidgetStandalone:t,messages:n=lM})=>{const[r,s]=P.useState(0),[a,u]=P.useState(!0);return P.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},dM)},cM);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),w.jsxs("div",{className:M(e,`${k}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[w.jsxs("div",{className:`${k}-connecting-pulse-wrapper`,children:[w.jsx("div",{className:`${k}-connecting-pulse`}),w.jsx("div",{className:`${k}-connecting-ring`})]}),w.jsx("span",{className:M(`${k}-connecting-text`,a&&`${k}-connecting-text--visible`),children:n[r]})]})},hM=({shouldShow:e,loadingText:t})=>e?w.jsx("span",{className:`${k}-processing-text`,children:t}):null,pM=({shouldShow:e})=>e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${k}-processing-shimmer-bar`}),w.jsx("div",{className:`${k}-processing-shimmer-bar`}),w.jsx("div",{className:`${k}-processing-shimmer-bar`})]}):null,Sp=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>w.jsxs("div",{className:M(e,`${k}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[w.jsx(hM,{shouldShow:!!n,loadingText:n}),w.jsx(pM,{shouldShow:!n})]});function dw(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 mM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function gM(e,t,n){const s=_l((n||{}).ignore||[]),a=EM(t);let u=-1;for(;++u<a.length;)GE(e,"text",l);function l(f,p){let m=-1,y;for(;++m<p.length;){const T=p[m],_=y?y.children:void 0;if(s(T,_?_.indexOf(T):void 0,y))return;y=T}if(y)return d(f,p)}function d(f,p){const m=p[p.length-1],y=a[u][0],T=a[u][1];let _=0;const x=m.children.indexOf(f);let S=!1,N=[];y.lastIndex=0;let O=y.exec(f.value);for(;O;){const j=O.index,V={index:O.index,input:O.input,stack:[...p,f]};let D=T(...O,V);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?y.lastIndex=j+1:(_!==j&&N.push({type:"text",value:f.value.slice(_,j)}),Array.isArray(D)?N.push(...D):D&&N.push(D),_=j+O[0].length,S=!0),!y.global)break;O=y.exec(f.value)}return S?(_<f.value.length&&N.push({type:"text",value:f.value.slice(_)}),m.children.splice(x,1,...N)):N=[f],x+N.length}}function EM(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([yM(s[0]),TM(s[1])])}return t}function yM(e){return typeof e=="string"?new RegExp(mM(e),"g"):e}function TM(e){return typeof e=="function"?e:function(){return e}}const vp="phrasing",Ap=["autolink","link","image","label"];function bM(){return{transforms:[CM],enter:{literalAutolink:_M,literalAutolinkEmail:Cp,literalAutolinkHttp:Cp,literalAutolinkWww:Cp},exit:{literalAutolink:AM,literalAutolinkEmail:vM,literalAutolinkHttp:xM,literalAutolinkWww:SM}}}function wM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vp,notInConstruct:Ap},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vp,notInConstruct:Ap},{character:":",before:"[ps]",after:"\\/",inConstruct:vp,notInConstruct:Ap}]}}function _M(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Cp(e){this.config.enter.autolinkProtocol.call(this,e)}function xM(e){this.config.exit.autolinkProtocol.call(this,e)}function SM(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 vM(e){this.config.exit.autolinkEmail.call(this,e)}function AM(e){this.exit(e)}function CM(e){gM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,NM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),kM]],{ignore:["link","linkReference"]})}function NM(e,t,n,r,s){let a="";if(!fw(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!OM(n)))return!1;const u=IM(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 kM(e,t,n,r){return!fw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function OM(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 IM(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=dw(e,"(");let a=dw(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 fw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ts(n)||ml(n))&&(!t||n!==47)}hw.peek=HM;function PM(){this.buffer()}function RM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function LM(){this.buffer()}function DM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function MM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function FM(e){this.exit(e)}function BM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function UM(e){this.exit(e)}function HM(){return"["}function hw(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 jM(){return{enter:{gfmFootnoteCallString:PM,gfmFootnoteCall:RM,gfmFootnoteDefinitionLabelString:LM,gfmFootnoteDefinition:DM},exit:{gfmFootnoteCallString:MM,gfmFootnoteCall:FM,gfmFootnoteDefinitionLabelString:BM,gfmFootnoteDefinition:UM}}}function zM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:hw},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?pw
|
|
39
|
-
`)}function
|
|
40
|
-
`&&
|
|
41
|
-
`}function
|
|
35
|
+
`}),n}function XE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function KE(e,t){const n=SI(e,t),r=n.one(e,void 0),s=pI(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 kI(e,t){return e&&"run"in e?function(n,r){return De(this,null,function*(){const s=KE(n,U({file:r},t));yield e.run(s,r)})}:function(n,r){return KE(n,U({file:r},e||t))}}function QE(e){if(e)throw e}var th,JE;function OI(){if(JE)return th;JE=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 y;for(y in f);return typeof y=="undefined"||e.call(f,y)},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 th=function d(){var f,p,m,y,T,_,A=arguments[0],x=1,S=arguments.length,N=!1;for(typeof A=="boolean"&&(N=A,A=arguments[1]||{},x=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});x<S;++x)if(f=arguments[x],f!=null)for(p in f)m=l(A,p),y=l(f,p),A!==y&&(N&&y&&(a(y)||(T=s(y)))?(T?(T=!1,_=m&&s(m)?m:[]):_=m&&a(m)?m:{},u(A,{name:p,newValue:d(N,_,y)})):typeof y!="undefined"&&u(A,{name:p,newValue:y}));return A},th}var II=OI();const nh=rt(II);function rh(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 PI(){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?RI(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 RI(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 Or={basename:LI,dirname:DI,extname:MI,join:FI,sep:"/"};function LI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');_a(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 DI(e){if(_a(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 MI(e){_a(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 FI(...e){let t=-1,n;for(;++t<e.length;)_a(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":BI(n)}function BI(e){_a(e);const t=e.codePointAt(0)===47;let n=UI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function UI(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 _a(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const HI={cwd:jI};function jI(){return"/"}function ih(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function zI(e){if(typeof e=="string")e=new URL(e);else if(!ih(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 $I(e)}function $I(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 sh=["history","path","basename","stem","extname","dirname"];class ZE{constructor(t){let n;t?ih(t)?n={path:t}:typeof t=="string"||VI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":HI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<sh.length;){const a=sh[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)sh.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Or.basename(this.path):void 0}set basename(t){ah(t,"basename"),oh(t,"basename"),this.path=Or.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Or.dirname(this.path):void 0}set dirname(t){ey(this.basename,"dirname"),this.path=Or.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Or.extname(this.path):void 0}set extname(t){if(oh(t,"extname"),ey(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=Or.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ih(t)&&(t=zI(t)),ah(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Or.basename(this.path,this.extname):void 0}set stem(t){ah(t,"stem"),oh(t,"stem"),this.path=Or.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 hn(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 oh(e,t){if(e&&e.includes(Or.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Or.sep+"`")}function ah(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ey(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function VI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qI=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),YI={}.hasOwnProperty;class uh extends qI{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=PI()}copy(){const t=new uh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(nh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(dh("data",this.frozen),this.namespace[t]=n,this):YI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(dh("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=vl(t),r=this.parser||this.Parser;return lh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),lh("process",this.parser||this.Parser),ch("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const l=vl(t),d=r.parse(l);r.run(d,l,function(p,m,y){if(p||!m||!y)return f(p);const T=m,_=r.stringify(T,y);XI(_)?y.value=_:y.result=_,f(p,y)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),lh("processSync",this.parser||this.Parser),ch("processSync",this.compiler||this.Compiler),this.process(t,s),ny("processSync","process",n),r;function s(a,u){n=!0,QE(a),r=u}}run(t,n,r){ty(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=vl(n);s.run(t,d,f);function f(p,m,y){const T=m||t;p?l(p):u?u(T):r(void 0,T,y)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),ny("runSync","run",r),s;function a(u,l){QE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=vl(n),s=this.compiler||this.Compiler;return ch("stringify",s),ty(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(dh("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=nh(!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,y=-1;for(;++m<r.length;)if(r[m][0]===f){y=m;break}if(y===-1)r.push([f,...p]);else if(p.length>0){let[T,..._]=p;const A=r[y][1];rh(A)&&rh(T)&&(T=nh(!0,A,T)),r[y]=[f,T,..._]}}}}const WI=new uh().freeze();function lh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ch(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dh(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 ty(e){if(!rh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ny(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vl(e){return GI(e)?e:new ZE(e)}function GI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function XI(e){return typeof e=="string"||KI(e)}function KI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const QI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ry=[],iy={allowDangerousHtml:!0},JI=/^(https?|ircs?|mailto|xmpp)$/i,ZI=[{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 sy(e){const t=eP(e),n=tP(e);return nP(t.runSync(t.parse(n),n),e)}function eP(e){const t=e.rehypePlugins||ry,n=e.remarkPlugins||ry,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),iy):iy;return WI().use(RO).use(n).use(kI,r).use(t)}function tP(e){const t=e.children||"",n=new ZE;return typeof t=="string"&&(n.value=t),n}function nP(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||rP;for(const p of ZI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+QI+p.id,void 0);return Sl(e,f),vk(e,{Fragment:w.Fragment,components:s,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function f(p,m,y){if(p.type==="raw"&&y&&typeof m=="number")return u?y.children.splice(m,1):y.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let T;for(T in jf)if(Object.hasOwn(jf,T)&&Object.hasOwn(p.properties,T)){const _=p.properties[T],A=jf[T];(A===null||A.includes(p.tagName))&&(p.properties[T]=d(String(_||""),T,p))}}if(p.type==="element"){let T=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!T&&r&&typeof m=="number"&&(T=!r(p,m,y)),T&&y&&typeof m=="number")return l&&p.children?y.children.splice(m,1,...p.children):y.children.splice(m,1),m}}}function rP(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||JI.test(e.slice(0,t))?e:""}const oy=/[#.]/g;function iP(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){oy.lastIndex=s;const l=oy.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 ay(e,t,n){const r=n?uP(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=iP(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,sP(u))l.unshift(u);else for(const[m,y]of Object.entries(u))oP(e,d.properties,m,y)}for(const f of l)fh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function sP(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 oP(e,t,n,r){const s=fl(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=K1(r):s.commaSeparated?a=F1(r):s.commaOrSpaceSeparated?a=K1(F1(r).join(" ")):a=uy(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?aP(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(uy(s,s.property,l));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function fh(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)fh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?fh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function uy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||da(n)===da(t)))return!0}return n}function aP(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function uP(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const lP=["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"],cP=ay(fa,"div"),dP=ay(hi,"g",lP);function fP(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=ly(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=ly(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 ly(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 is={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/"},cy={}.hasOwnProperty,hP=Object.prototype;function pP(e,t){const n=t||{};return hh({file:n.file||void 0,location:!1,schema:n.space==="svg"?hi:fa,verbose:n.verbose||!1},e)}function hh(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:dy(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=fP(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=mP(e,t),n}}function dy(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=hh(e,t[n]);r.push(s)}return r}function mP(e,t){const n=e.schema;e.schema=t.namespaceURI===is.svg?hi:fa;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;cy.call(hP,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?dP:cP)(t.tagName,s,dy(e,t.childNodes));if(Al(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&Qs(d.startTag),p=d&&d.endTag&&Qs(d.endTag),m=hh(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=gP(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function gP(e,t,n){const r=Qs(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)cy.call(n.attrs,u)&&(a[fl(e.schema,u).property]=Qs(n.attrs[u]));n.startTag;const l=Qs(n.startTag),d=n.endTag?Qs(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Qs(e){const t=fy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=fy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function fy(e){return e.line&&e.column?e:void 0}const hy={}.hasOwnProperty;function py(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&hy.call(s,e)){const d=String(s[e]);u=hy.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 EP={},yP={}.hasOwnProperty,my=py("type",{handlers:{root:bP,element:vP,text:xP,comment:SP,doctype:_P}});function TP(e,t){const r=(t||EP).space;return my(e,r==="svg"?hi:fa)}function bP(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ph(e.children,n,t),Js(e,n),n}function wP(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ph(e.children,n,t),Js(e,n),n}function _P(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Js(e,t),t}function xP(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Js(e,t),t}function SP(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Js(e,t),t}function vP(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=hi);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&yP.call(e.properties,a)){const d=AP(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:is[u],childNodes:[],parentNode:null};return l.childNodes=ph(e.children,l,r),Js(e,l),e.tagName==="template"&&e.content&&(l.content=wP(e.content,r)),l}function AP(e,t,n){const r=fl(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?B1(n):Q1(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=is[r.space]}return s}function ph(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=my(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 CP=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],NP=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]),kt="�";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 Pn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function gy(e){return e>=55296&&e<=57343}function kP(e){return e>=56320&&e<=57343}function OP(e,t){return(e-55296)*1024+9216+t}function Ey(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function yy(e){return e>=64976&&e<=65007||NP.has(e)}var ie;(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"})(ie||(ie={}));const IP=65536;class PP{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=IP,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(kP(n))return this.pos++,this._addGap(),OP(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(ie.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,gy(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){Ey(t)?this._err(ie.controlCharacterInInputStream):yy(t)&&this._err(ie.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var tt;(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"})(tt||(tt={}));function Ty(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 RP=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),LP=new 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 DP(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=LP.get(e))!==null&&t!==void 0?t:e}var Qt;(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"})(Qt||(Qt={}));const MP=32;var gi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(gi||(gi={}));function mh(e){return e>=Qt.ZERO&&e<=Qt.NINE}function FP(e){return e>=Qt.UPPER_A&&e<=Qt.UPPER_F||e>=Qt.LOWER_A&&e<=Qt.LOWER_F}function BP(e){return e>=Qt.UPPER_A&&e<=Qt.UPPER_Z||e>=Qt.LOWER_A&&e<=Qt.LOWER_Z||mh(e)}function UP(e){return e===Qt.EQUALS||BP(e)}var Jt;(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"})(Jt||(Jt={}));var Xr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Xr||(Xr={}));class HP{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Jt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xr.Strict}startEntity(t){this.decodeMode=t,this.state=Jt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Jt.EntityStart:return t.charCodeAt(n)===Qt.NUM?(this.state=Jt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Jt.NamedEntity,this.stateNamedEntity(t,n));case Jt.NumericStart:return this.stateNumericStart(t,n);case Jt.NumericDecimal:return this.stateNumericDecimal(t,n);case Jt.NumericHex:return this.stateNumericHex(t,n);case Jt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|MP)===Qt.LOWER_X?(this.state=Jt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Jt.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(mh(s)||FP(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(mh(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===Qt.SEMI)this.consumed+=1;else if(this.decodeMode===Xr.Strict)return 0;return this.emitCodePoint(DP(this.result),this.consumed),this.errors&&(t!==Qt.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&gi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=jP(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Xr.Attribute&&(a===0||UP(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&gi.VALUE_LENGTH)>>14,a!==0){if(u===Qt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Xr.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]&gi.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]&~gi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Jt.NamedEntity:return this.result!==0&&(this.decodeMode!==Xr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Jt.NumericDecimal:return this.emitNumericEntity(0,2);case Jt.NumericHex:return this.emitNumericEntity(0,3);case Jt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Jt.EntityStart:return 0}}}function jP(e,t,n,r){const s=(t&gi.BRANCH_LENGTH)>>7,a=t&gi.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 ge;(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/"})(ge||(ge={}));var ss;(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"})(ss||(ss={}));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 zP=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=zP.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const ye=g,$P={[ge.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]),[ge.MATHML]:new Set([ye.MI,ye.MO,ye.MN,ye.MS,ye.MTEXT,ye.ANNOTATION_XML]),[ge.SVG]:new Set([ye.TITLE,ye.FOREIGN_OBJECT,ye.DESC]),[ge.XLINK]:new Set,[ge.XML]:new Set,[ge.XMLNS]:new Set},gh=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 Ut={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function VP(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function xa(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function qP(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function Ei(e){return qP(e)||xa(e)}function by(e){return Ei(e)||VP(e)}function Cl(e){return e+32}function wy(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function _y(e){return wy(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function YP(e){return e===I.NULL?ie.nullCharacterReference:e>1114111?ie.characterReferenceOutsideUnicodeRange:gy(e)?ie.surrogateCharacterReference:yy(e)?ie.noncharacterCharacterReference:Ey(e)||e===I.CARRIAGE_RETURN?ie.controlCharacterReference:null}class WP{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 PP(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new HP(RP,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ie.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ie.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=YP(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:tt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:tt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:tt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:tt.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(Ty(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(ie.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===tt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ie.endTagWithAttributes),t.selfClosing&&this._err(ie.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 tt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case tt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case tt.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:tt.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=wy(t)?tt.WHITESPACE_CHARACTER:t===I.NULL?tt.NULL_CHARACTER:tt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(tt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Xr.Attribute:Xr.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 I.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ie.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=L.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ei(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(ie.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(ie.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ie.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ei(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(ie.missingEndTagName),this.state=L.DATA;break}case I.EOF:{this._err(ie.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ie.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.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=L.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.tagName+=kt;break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(xa(t)?Cl(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ei(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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case I.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===I.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ei(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 I.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case I.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){Ei(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===I.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.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 I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(kt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(kt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ei(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){Ei(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(Pn.SCRIPT,!1)&&_y(this.preprocessor.peek(Pn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Pn.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 I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(kt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.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=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(kt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.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(Pn.SCRIPT,!1)&&_y(this.preprocessor.peek(Pn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Pn.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 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=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(ie.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 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=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(ie.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.name+=kt;break}default:this.currentAttr.name+=String.fromCodePoint(xa(t)?Cl(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=L.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.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=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.value+=kt;break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.value+=kt;break}case I.EOF:{this._err(ie.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=L.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.value+=kt;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(ie.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(ie.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=L.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this._err(ie.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this._err(ie.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.data+=kt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Pn.DASH_DASH,!0)?(this._createCommentToken(Pn.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(Pn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Pn.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(Pn.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(ie.cdataInHtmlContent),this._createCommentToken(Pn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ie.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(ie.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 I.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ie.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 I.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.data+=kt;break}case I.EOF:{this._err(ie.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=L.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(ie.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case I.EOF:{this._err(ie.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 I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case I.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{n.data+="-";break}case I.EOF:{this._err(ie.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 I.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(ie.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ie.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(ie.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(xa(t))this._createDoctypeToken(String.fromCharCode(Cl(t))),this.state=L.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(ie.unexpectedNullCharacter),this._createDoctypeToken(kt),this.state=L.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ie.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.name+=kt;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(xa(t)?Cl(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=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Pn.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Pn.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ie.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.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=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(ie.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ie.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.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=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.publicId+=kt;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ie.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=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.publicId+=kt;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ie.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=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.QUOTATION_MARK:{this._err(ie.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ie.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.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=L.DATA;break}case I.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.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=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(ie.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ie.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.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=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.systemId+=kt;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ie.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=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.systemId+=kt;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ie.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=L.DATA;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.NULL:{this._err(ie.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(ie.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=L.DATA;break}case I.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(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&by(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){by(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(ie.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const xy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Sy=new Set([...xy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Nl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),GP=new Set([...Nl,g.OL,g.UL]),XP=new Set([...Nl,g.BUTTON]),vy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Ay=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),KP=new Set([g.TR,g.TEMPLATE,g.HTML]),QP=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),JP=new Set([g.TABLE,g.TEMPLATE,g.HTML]),ZP=new Set([g.TD,g.TH]);class eR{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)===ge.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])!==ge.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(gh,ge.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ZP,ge.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(JP,ge.HTML)}clearBackToTableBodyContext(){this.clearBackTo(QP,ge.HTML)}clearBackToTableRowContext(){this.clearBackTo(KP,ge.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 ge.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case ge.SVG:{if(Ay.has(s))return!1;break}case ge.MATHML:{if(vy.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Nl)}hasInListItemScope(t){return this.hasInDynamicScope(t,GP)}hasInButtonScope(t){return this.hasInDynamicScope(t,XP)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ge.HTML:{if(gh.has(n))return!0;if(Nl.has(n))return!1;break}case ge.SVG:{if(Ay.has(n))return!1;break}case ge.MATHML:{if(vy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ge.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])===ge.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])===ge.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&&xy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Sy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Sy.has(this.currentTagId);)this.pop()}}const Eh=3;var Ir;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ir||(Ir={}));const Cy={type:Ir.Marker};class tR{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===Ir.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<Eh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Eh)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>=Eh&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(Cy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ir.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ir.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(Cy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ir.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ir.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ir.Element&&n.element===t)}}const yi={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};yi.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(yi.isTextNode(n)){n.value+=t;return}}yi.appendChild(e,yi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&yi.isTextNode(r)?r.value+=t:yi.insertBefore(e,yi.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)}},Ny="html",nR="about:legacy-compat",rR="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ky=["+//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//"],iR=[...ky,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],sR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Oy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],oR=[...Oy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Iy(e,t){return t.some(n=>e.startsWith(n))}function aR(e){return e.name===Ny&&e.publicId===null&&(e.systemId===null||e.systemId===nR)}function uR(e){if(e.name!==Ny)return Zn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===rR)return Zn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),sR.has(n))return Zn.QUIRKS;let r=t===null?iR:ky;if(Iy(n,r))return Zn.QUIRKS;if(r=t===null?Oy:oR,Iy(n,r))return Zn.LIMITED_QUIRKS}return Zn.NO_QUIRKS}const Py={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},lR="definitionurl",cR="definitionURL",dR=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])),fR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ge.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ge.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ge.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ge.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ge.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ge.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ge.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ge.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ge.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ge.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ge.XMLNS}]]),hR=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])),pR=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 mR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ss.COLOR||r===ss.SIZE||r===ss.FACE)||pR.has(t)}function Ry(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===lR){e.attrs[t].name=cR;break}}function Ly(e){for(let t=0;t<e.attrs.length;t++){const n=dR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function yh(e){for(let t=0;t<e.attrs.length;t++){const n=fR.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 gR(e){const t=hR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Zs(e.tagName))}function ER(e,t){return t===ge.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function yR(e,t,n){if(t===ge.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ss.ENCODING){const s=n[r].value.toLowerCase();return s===Py.TEXT_HTML||s===Py.APPLICATION_XML}}return t===ge.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function TR(e,t,n,r){return(!r||r===ge.HTML)&&yR(e,t,n)||(!r||r===ge.MATHML)&&ER(e,t)}const bR="hidden",wR=8,_R=3;var H;(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"})(H||(H={}));const xR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Dy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),My={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:yi,onParseError:null};class Fy{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=H.INITIAL,this.originalInsertionMode=H.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({},My),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 WP(this.options,this),this.activeFormattingElements=new tR(this.treeAdapter),this.fragmentContextID=r?Zs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new eR(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({},My),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,ge.HTML,[]));const s=r.treeAdapter.createElement("documentmock",ge.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(H.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:xR,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)===ge.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ge.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=H.TEXT}switchToPlaintextParsing(){this.insertionMode=H.TEXT,this.originalInsertionMode=H.IN_BODY,this.tokenizer.state=Ut.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)!==ge.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Ut.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ut.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ut.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ut.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&&ae(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,ge.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ge.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,ge.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===tt.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)===ge.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ge.HTML)}_processToken(t){switch(t.type){case tt.CHARACTER:{this.onCharacter(t);break}case tt.NULL_CHARACTER:{this.onNullCharacter(t);break}case tt.COMMENT:{this.onComment(t);break}case tt.DOCTYPE:{this.onDoctype(t);break}case tt.START_TAG:{this._processStartTag(t);break}case tt.END_TAG:{this.onEndTag(t);break}case tt.EOF:{this.onEof(t);break}case tt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return TR(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Ir.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=H.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=H.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=H.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=H.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=H.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=H.IN_TABLE;return}case g.BODY:{this.insertionMode=H.IN_BODY;return}case g.FRAMESET:{this.insertionMode=H.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?H.AFTER_HEAD:H.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=H.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=H.IN_HEAD;return}break}}this.insertionMode=H.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=H.IN_SELECT_IN_TABLE;return}}this.insertionMode=H.IN_SELECT}_isElementCausesFosterParenting(t){return Dy.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)===ge.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 $P[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Z6(this,t);return}switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{va(this,t);break}case H.BEFORE_HEAD:{Aa(this,t);break}case H.IN_HEAD:{Ca(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Na(this,t);break}case H.AFTER_HEAD:{ka(this,t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:{Uy(this,t);break}case H.TEXT:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{_h(this,t);break}case H.IN_TABLE_TEXT:{Wy(this,t);break}case H.IN_COLUMN_GROUP:{Il(this,t);break}case H.AFTER_BODY:{Ll(this,t);break}case H.AFTER_AFTER_BODY:{Dl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){J6(this,t);return}switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{va(this,t);break}case H.BEFORE_HEAD:{Aa(this,t);break}case H.IN_HEAD:{Ca(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Na(this,t);break}case H.AFTER_HEAD:{ka(this,t);break}case H.TEXT:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{_h(this,t);break}case H.IN_COLUMN_GROUP:{Il(this,t);break}case H.AFTER_BODY:{Ll(this,t);break}case H.AFTER_AFTER_BODY:{Dl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){bh(this,t);return}switch(this.insertionMode){case H.INITIAL:case H.BEFORE_HTML:case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_TEMPLATE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{bh(this,t);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}case H.AFTER_BODY:{OR(this,t);break}case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{IR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case H.INITIAL:{PR(this,t);break}case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:{this._err(t,ie.misplacedDoctype);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ie.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?e4(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{RR(this,t);break}case H.BEFORE_HEAD:{DR(this,t);break}case H.IN_HEAD:{pr(this,t);break}case H.IN_HEAD_NO_SCRIPT:{BR(this,t);break}case H.AFTER_HEAD:{HR(this,t);break}case H.IN_BODY:{mn(this,t);break}case H.IN_TABLE:{eo(this,t);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}case H.IN_CAPTION:{M6(this,t);break}case H.IN_COLUMN_GROUP:{xh(this,t);break}case H.IN_TABLE_BODY:{Pl(this,t);break}case H.IN_ROW:{Rl(this,t);break}case H.IN_CELL:{U6(this,t);break}case H.IN_SELECT:{Ky(this,t);break}case H.IN_SELECT_IN_TABLE:{j6(this,t);break}case H.IN_TEMPLATE:{$6(this,t);break}case H.AFTER_BODY:{q6(this,t);break}case H.IN_FRAMESET:{Y6(this,t);break}case H.AFTER_FRAMESET:{G6(this,t);break}case H.AFTER_AFTER_BODY:{K6(this,t);break}case H.AFTER_AFTER_FRAMESET:{Q6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?t4(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{LR(this,t);break}case H.BEFORE_HEAD:{MR(this,t);break}case H.IN_HEAD:{FR(this,t);break}case H.IN_HEAD_NO_SCRIPT:{UR(this,t);break}case H.AFTER_HEAD:{jR(this,t);break}case H.IN_BODY:{Ol(this,t);break}case H.TEXT:{A6(this,t);break}case H.IN_TABLE:{Oa(this,t);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}case H.IN_CAPTION:{F6(this,t);break}case H.IN_COLUMN_GROUP:{B6(this,t);break}case H.IN_TABLE_BODY:{Sh(this,t);break}case H.IN_ROW:{Xy(this,t);break}case H.IN_CELL:{H6(this,t);break}case H.IN_SELECT:{Qy(this,t);break}case H.IN_SELECT_IN_TABLE:{z6(this,t);break}case H.IN_TEMPLATE:{V6(this,t);break}case H.AFTER_BODY:{Zy(this,t);break}case H.IN_FRAMESET:{W6(this,t);break}case H.AFTER_FRAMESET:{X6(this,t);break}case H.AFTER_AFTER_BODY:{Dl(this,t);break}}}onEof(t){switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{va(this,t);break}case H.BEFORE_HEAD:{Aa(this,t);break}case H.IN_HEAD:{Ca(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Na(this,t);break}case H.AFTER_HEAD:{ka(this,t);break}case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{qy(this,t);break}case H.TEXT:{C6(this,t);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}case H.IN_TEMPLATE:{Jy(this,t);break}case H.AFTER_BODY:case H.IN_FRAMESET:case H.AFTER_FRAMESET:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{wh(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 H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.TEXT:case H.IN_COLUMN_GROUP:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{this._insertCharacters(t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:case H.AFTER_BODY:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{By(this,t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{_h(this,t);break}case H.IN_TABLE_TEXT:{Yy(this,t);break}}}}function SR(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):Vy(e,t),n}function vR(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 AR(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>=_R;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=CR(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function CR(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 NR(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===ge.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function kR(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 Th(e,t){for(let n=0;n<wR;n++){const r=SR(e,t);if(!r)break;const s=vR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=AR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&NR(e,u,a),kR(e,s,r)}}function bh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function OR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function IR(e,t){e._appendCommentNode(t,e.document)}function wh(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 PR(e,t){e._setDocumentType(t);const n=t.forceQuirks?Zn.QUIRKS:uR(t);aR(t)||e._err(t,ie.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=H.BEFORE_HTML}function Sa(e,t){e._err(t,ie.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Zn.QUIRKS),e.insertionMode=H.BEFORE_HTML,e._processToken(t)}function RR(e,t){t.tagID===g.HTML?(e._insertElement(t,ge.HTML),e.insertionMode=H.BEFORE_HEAD):va(e,t)}function LR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&va(e,t)}function va(e,t){e._insertFakeRootElement(),e.insertionMode=H.BEFORE_HEAD,e._processToken(t)}function DR(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.HEAD:{e._insertElement(t,ge.HTML),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD;break}default:Aa(e,t)}}function MR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Aa(e,t):e._err(t,ie.endTagWithoutMatchingOpenElement)}function Aa(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD,e._processToken(t)}function pr(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Ut.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ut.RAWTEXT):(e._insertElement(t,ge.HTML),e.insertionMode=H.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ut.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ut.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=H.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(H.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ie.misplacedStartTagForHeadElement);break}default:Ca(e,t)}}function FR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=H.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Ca(e,t);break}case g.TEMPLATE:{os(e,t);break}default:e._err(t,ie.endTagWithoutMatchingOpenElement)}}function os(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,ie.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ie.endTagWithoutMatchingOpenElement)}function Ca(e,t){e.openElements.pop(),e.insertionMode=H.AFTER_HEAD,e._processToken(t)}function BR(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{pr(e,t);break}case g.NOSCRIPT:{e._err(t,ie.nestedNoscriptInHead);break}default:Na(e,t)}}function UR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=H.IN_HEAD;break}case g.BR:{Na(e,t);break}default:e._err(t,ie.endTagWithoutMatchingOpenElement)}}function Na(e,t){const n=t.type===tt.EOF?ie.openElementsLeftAfterEof:ie.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=H.IN_HEAD,e._processToken(t)}function HR(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.BODY:{e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=H.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ge.HTML),e.insertionMode=H.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,ie.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),pr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ie.misplacedStartTagForHeadElement);break}default:ka(e,t)}}function jR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{ka(e,t);break}case g.TEMPLATE:{os(e,t);break}default:e._err(t,ie.endTagWithoutMatchingOpenElement)}}function ka(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=H.IN_BODY,kl(e,t)}function kl(e,t){switch(t.type){case tt.CHARACTER:{Uy(e,t);break}case tt.WHITESPACE_CHARACTER:{By(e,t);break}case tt.COMMENT:{bh(e,t);break}case tt.START_TAG:{mn(e,t);break}case tt.END_TAG:{Ol(e,t);break}case tt.EOF:{qy(e,t);break}}}function By(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Uy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function zR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function $R(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function VR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ge.HTML),e.insertionMode=H.IN_FRAMESET)}function qR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML)}function YR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&gh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ge.HTML)}function WR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function GR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML),n||(e.formElement=e.openElements.current))}function XR(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,ge.HTML)}function KR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.tokenizer.state=Ut.PLAINTEXT}function QR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.framesetOk=!1}function JR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Th(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ZR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function e6(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Th(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function t6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function n6(e,t){e.treeAdapter.getDocumentMode(e.document)!==Zn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=H.IN_TABLE}function Hy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ge.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function jy(e){const t=Ty(e,ss.TYPE);return t!=null&&t.toLowerCase()===bR}function r6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ge.HTML),jy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function i6(e,t){e._appendElement(t,ge.HTML),t.ackSelfClosing=!0}function s6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ge.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function o6(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Hy(e,t)}function a6(e,t){e._insertElement(t,ge.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ut.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=H.TEXT}function u6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ut.RAWTEXT)}function l6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ut.RAWTEXT)}function zy(e,t){e._switchToTextParsing(t,Ut.RAWTEXT)}function c6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===H.IN_TABLE||e.insertionMode===H.IN_CAPTION||e.insertionMode===H.IN_TABLE_BODY||e.insertionMode===H.IN_ROW||e.insertionMode===H.IN_CELL?H.IN_SELECT_IN_TABLE:H.IN_SELECT}function d6(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML)}function f6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ge.HTML)}function h6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ge.HTML)}function p6(e,t){e._reconstructActiveFormattingElements(),Ry(t),yh(t),t.selfClosing?e._appendElement(t,ge.MATHML):e._insertElement(t,ge.MATHML),t.ackSelfClosing=!0}function m6(e,t){e._reconstructActiveFormattingElements(),Ly(t),yh(t),t.selfClosing?e._appendElement(t,ge.SVG):e._insertElement(t,ge.SVG),t.ackSelfClosing=!0}function $y(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML)}function mn(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:{ZR(e,t);break}case g.A:{JR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{YR(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:{qR(e,t);break}case g.LI:case g.DD:case g.DT:{XR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Hy(e,t);break}case g.HR:{s6(e,t);break}case g.RB:case g.RTC:{f6(e,t);break}case g.RT:case g.RP:{h6(e,t);break}case g.PRE:case g.LISTING:{WR(e,t);break}case g.XMP:{u6(e,t);break}case g.SVG:{m6(e,t);break}case g.HTML:{zR(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:{pr(e,t);break}case g.BODY:{$R(e,t);break}case g.FORM:{GR(e,t);break}case g.NOBR:{e6(e,t);break}case g.MATH:{p6(e,t);break}case g.TABLE:{n6(e,t);break}case g.INPUT:{r6(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{i6(e,t);break}case g.IMAGE:{o6(e,t);break}case g.BUTTON:{QR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{t6(e,t);break}case g.IFRAME:{l6(e,t);break}case g.SELECT:{c6(e,t);break}case g.OPTION:case g.OPTGROUP:{d6(e,t);break}case g.NOEMBED:case g.NOFRAMES:{zy(e,t);break}case g.FRAMESET:{VR(e,t);break}case g.TEXTAREA:{a6(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?zy(e,t):$y(e,t);break}case g.PLAINTEXT:{KR(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:$y(e,t)}}function g6(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=H.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function E6(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=H.AFTER_BODY,Zy(e,t))}function y6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function T6(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 b6(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function w6(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function _6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function x6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function S6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function v6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Vy(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 Ol(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:{Th(e,t);break}case g.P:{b6(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:{y6(e,t);break}case g.LI:{w6(e);break}case g.DD:case g.DT:{_6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{x6(e);break}case g.BR:{v6(e);break}case g.BODY:{g6(e,t);break}case g.HTML:{E6(e,t);break}case g.FORM:{T6(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{S6(e,t);break}case g.TEMPLATE:{os(e,t);break}default:Vy(e,t)}}function qy(e,t){e.tmplInsertionModeStack.length>0?Jy(e,t):wh(e,t)}function A6(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 C6(e,t){e._err(t,ie.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _h(e,t){if(e.openElements.currentTagId!==void 0&&Dy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=H.IN_TABLE_TEXT,t.type){case tt.CHARACTER:{Wy(e,t);break}case tt.WHITESPACE_CHARACTER:{Yy(e,t);break}}else Ia(e,t)}function N6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ge.HTML),e.insertionMode=H.IN_CAPTION}function k6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ge.HTML),e.insertionMode=H.IN_COLUMN_GROUP}function O6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=H.IN_COLUMN_GROUP,xh(e,t)}function I6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ge.HTML),e.insertionMode=H.IN_TABLE_BODY}function P6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=H.IN_TABLE_BODY,Pl(e,t)}function R6(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function L6(e,t){jy(t)?e._appendElement(t,ge.HTML):Ia(e,t),t.ackSelfClosing=!0}function D6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ge.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function eo(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{P6(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{pr(e,t);break}case g.COL:{O6(e,t);break}case g.FORM:{D6(e,t);break}case g.TABLE:{R6(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{I6(e,t);break}case g.INPUT:{L6(e,t);break}case g.CAPTION:{N6(e,t);break}case g.COLGROUP:{k6(e,t);break}default:Ia(e,t)}}function Oa(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{os(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:Ia(e,t)}}function Ia(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,kl(e,t),e.fosterParentingEnabled=n}function Yy(e,t){e.pendingCharacterTokens.push(t)}function Wy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Pa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ia(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Gy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function M6(e,t){const n=t.tagID;Gy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,eo(e,t)):mn(e,t)}function F6(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=H.IN_TABLE,n===g.TABLE&&Oa(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:Ol(e,t)}}function xh(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.COL:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{pr(e,t);break}default:Il(e,t)}}function B6(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case g.TEMPLATE:{os(e,t);break}case g.COL:break;default:Il(e,t)}}function Il(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE,e._processToken(t))}function Pl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ge.HTML),e.insertionMode=H.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=H.IN_ROW,Rl(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=H.IN_TABLE,eo(e,t));break}default:eo(e,t)}}function Sh(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=H.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,Oa(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:Oa(e,t)}}function Rl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ge.HTML),e.insertionMode=H.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=H.IN_TABLE_BODY,Pl(e,t));break}default:eo(e,t)}}function Xy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,Sh(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=H.IN_TABLE_BODY,Sh(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:Oa(e,t)}}function U6(e,t){const n=t.tagID;Gy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Rl(e,t)):mn(e,t)}function H6(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=H.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Xy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ol(e,t)}}function Ky(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,ge.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ge.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ge.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:{pr(e,t);break}}}function Qy(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:{os(e,t);break}}}function j6(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)):Ky(e,t)}function z6(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)):Qy(e,t)}function $6(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:{pr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=H.IN_TABLE,e.insertionMode=H.IN_TABLE,eo(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=H.IN_COLUMN_GROUP,e.insertionMode=H.IN_COLUMN_GROUP,xh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=H.IN_TABLE_BODY,e.insertionMode=H.IN_TABLE_BODY,Pl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=H.IN_ROW,e.insertionMode=H.IN_ROW,Rl(e,t);break}default:e.tmplInsertionModeStack[0]=H.IN_BODY,e.insertionMode=H.IN_BODY,mn(e,t)}}function V6(e,t){t.tagID===g.TEMPLATE&&os(e,t)}function Jy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wh(e,t)}function q6(e,t){t.tagID===g.HTML?mn(e,t):Ll(e,t)}function Zy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=H.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 Ll(e,t)}function Ll(e,t){e.insertionMode=H.IN_BODY,kl(e,t)}function Y6(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.FRAMESET:{e._insertElement(t,ge.HTML);break}case g.FRAME:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{pr(e,t);break}}}function W6(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=H.AFTER_FRAMESET))}function G6(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.NOFRAMES:{pr(e,t);break}}}function X6(e,t){t.tagID===g.HTML&&(e.insertionMode=H.AFTER_AFTER_FRAMESET)}function K6(e,t){t.tagID===g.HTML?mn(e,t):Dl(e,t)}function Dl(e,t){e.insertionMode=H.IN_BODY,kl(e,t)}function Q6(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.NOFRAMES:{pr(e,t);break}}}function J6(e,t){t.chars=kt,e._insertCharacters(t)}function Z6(e,t){e._insertCharacters(t),e.framesetOk=!1}function eT(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ge.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function e4(e,t){if(mR(t))eT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ge.MATHML?Ry(t):r===ge.SVG&&(gR(t),Ly(t)),yh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function t4(e,t){if(t.tagID===g.P||t.tagID===g.BR){eT(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)===ge.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 n4=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,r4=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),tT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function nT(e,t){const n=h4(e),r=py("type",{handlers:{root:i4,element:s4,text:o4,comment:iT,doctype:a4,raw:l4},unknown:c4}),s={parser:n?new Fy(tT):Fy.getFragmentParser(void 0,tT),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),to(s,kr());const a=n?s.parser.document:s.parser.getFragment(),u=pP(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 rT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function i4(e,t){rT(e.children,t)}function s4(e,t){d4(e,t),rT(e.children,t),f4(e,t)}function o4(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:tt.CHARACTER,chars:e.value,location:Ra(e)};to(t,kr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function a4(e,t){const n={type:tt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ra(e)};to(t,kr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function u4(e,t){t.stitches=!0;const n=p4(e);if("children"in e&&"children"in n){const r=nT({type:"root",children:e.children},t.options);n.children=r.children}iT({type:"comment",value:{stitch:n}},t)}function iT(e,t){const n=e.value,r={type:tt.COMMENT,data:n,location:Ra(e)};to(t,kr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function l4(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,sT(t,kr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(n4,"<$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 c4(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))u4(n,t);else{let r="";throw r4.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 to(e,t){sT(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=Ut.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 sT(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 d4(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ut.PLAINTEXT)return;to(t,kr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:is.html;s===is.html&&n==="svg"&&(s=is.svg);const a=TP(ae(U({},e),{children:[]}),{space:s===is.svg?"svg":"html"}),u={type:tt.START_TAG,tagName:n,tagID:Zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ra(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function f4(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&CP.includes(n)||t.parser.tokenizer.state===Ut.PLAINTEXT)return;to(t,hl(e));const r={type:tt.END_TAG,tagName:n,tagID:Zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ra(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ut.RCDATA||t.parser.tokenizer.state===Ut.RAWTEXT||t.parser.tokenizer.state===Ut.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ut.DATA)}function h4(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ra(e){const t=kr(e)||{line:void 0,column:void 0,offset:void 0},n=hl(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 p4(e){return"children"in e?rs(ae(U({},e),{children:[]})):rs(e)}function oT(e){return function(t,n){return nT(t,ae(U({},e),{file:n}))}}const as=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],aT={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...as,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...as],h2:[["className","sr-only"]],img:[...as,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...as,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...as],table:[...as],ul:[...as,["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"]},Ti={}.hasOwnProperty;function m4(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},aT),t):aT,stack:[]},s=uT(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function uT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return g4(e,n);case"doctype":return E4(e,n);case"element":return y4(e,n);case"root":return T4(e,n);case"text":return b4(e,n)}}}function g4(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 La(a,t),a}}function E4(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return La(n,t),n}}function y4(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=lT(e,t.children),s=w4(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&&Ti.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 La(u,t),u}function T4(e,t){const r={type:"root",children:lT(e,t.children)};return La(r,t),r}function b4(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return La(r,t),r}function lT(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=uT(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function w4(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&Ti.call(r,n)?r[n]:void 0,u=r&&Ti.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Ti.call(l,f)){const p=l[f];let m=cT(e,fT(a,f),f,p);m==null&&(m=cT(e,fT(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&Ti.call(s,n)){const p=s[n];for(f in p)Ti.call(p,f)&&!Ti.call(d,f)&&(d[f]=p[f])}return d}function cT(e,t,n,r){return t?Array.isArray(r)?_4(e,t,n,r):dT(e,t,n,r):void 0}function _4(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=dT(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function dT(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&x4(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 x4(e,t,n){const r=e.schema.protocols&&Ti.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 La(e,t){const n=rE(t);t.data&&(e.data=rs(t.data)),n&&(e.position=n)}function fT(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 S4(e){return function(t){return m4(t,e)}}const hT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",ae(U(U({className:M(e,`${k}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},v4=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ft();return!e&&!t?null:w.jsx("div",{className:M(n,`${k}-disclaimer`),children:t?w.jsx(sy,{rehypePlugins:[oT,S4],components:{ul:({children:r})=>w.jsx("ul",{className:M(n,`${k}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:M(n,`${k}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:M(n,`${k}-li`),children:r}),a:({href:r,title:s,children:a})=>w.jsx(hT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>w.jsx("img",{className:M(n,`${k}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>w.jsx("p",{className:M(n,`${k}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:M(n,`${k}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:M(n,`${k}-disclaimer-text`),children:e})})},vh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a,canInitialize:u,messages:l}=fn(),{globalClassName:d,searchConfig:f,enableEscalationToAgent:p}=ft(),m=P.useRef(null),y=P.useRef(l);y.current=l;const T=t||!n1(s,a,u),_=P.useRef(t);P.useEffect(()=>{var N;const S=_.current&&!t;_.current=t,S&&!T&&((N=m.current)==null||N.focus({preventScroll:!0}))},[t,T]);const A=S=>De(null,null,function*(){var O,j;S.preventDefault();const N=(((O=m.current)==null?void 0:O.value)||"").trim();if(N){const V=!s&&!a&&u===!0,D=y.current.length;m.current.value="";const W=yield r(N);V&&W.outcome!=="success"&&y.current.length===D&&((j=m.current)==null?void 0:j.value)===""&&(m.current.value=N,m.current.disabled||m.current.focus({preventScroll:!0}))}}),x=()=>{r("Can you connect me to a human?")};return w.jsxs("div",{className:M(d,e,`cim-${n}-component`,`${k}-search-bar-wrapper`),children:[w.jsxs("form",{className:M(d,e,`cim-${n}-component`,`${k}-search-bar`),name:`${k}-search-form`,onSubmit:A,children:[w.jsx("input",{className:M(d,e,`cim-${n}-component`,`${k}-search-input`),type:"text",ref:m,placeholder:(f==null?void 0:f.placeholder)||"Ask us anything",name:`${k}-user-input`,disabled:T}),w.jsx(tk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:T}),p&&w.jsx(fr,{className:M(d,`${k}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:T,onClick:x,icon:w.jsx(VN,{})})]}),w.jsx(v4,{})]})};function A4(e){return mt({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 C4(e){return mt({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const pT=P.createContext({isOpen:!1}),Ah=P.createContext(null),mT=P.createContext(null),us=()=>{var n,r;const e=P.useContext(Ah),t=P.useContext(mT);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},gT=({onClearChat:e,componentType:t})=>{const n=us(),r=()=>{e(),n()};return w.jsxs("button",{className:M(`${k}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(C4,{}),"Clear chat"]})},ET=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=ft(),r=us(),[s,a]=P.useState(!1),u=()=>De(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 w.jsxs("button",{className:M(`${k}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[w.jsx(A4,{}),"Download transcript"]})},yT=({onEndConversation:e,componentType:t})=>{const n=us(),r=()=>{e(),n()};return w.jsxs("button",{className:M(`${k}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[w.jsx(ZN,{}),"End conversation"]})};function N4(e){return e==null?[]:Array.isArray(e)?e:[e]}var k4=(e,...t)=>e.concat(t),O4=(e,...t)=>e.filter(n=>!t.includes(n)),I4=e=>Array.from(new Set(e));function TT(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 P4(e,t,n={}){const{step:r=1,loop:s=!0}=n;return TT(e,t,{step:-r,loop:s})}var R4=e=>Array.isArray(e),bT=e=>e!=null&&typeof e=="object",L4=e=>bT(e)&&!R4(e),Ml=e=>typeof e=="string",no=e=>typeof e=="function",D4=e=>e==null,M4=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),F4=e=>Object.prototype.toString.call(e),wT=Function.prototype.toString,B4=wT.call(Object),U4=e=>{if(!bT(e)||F4(e)!="[object Object]"||z4(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=M4(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&wT.call(n)==B4},H4=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,j4=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,z4=e=>H4(e)||j4(e),$4=e=>e(),V4=()=>{},Ch=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function q4(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:Y4,max:W4}=Math,G4=e=>Number.isNaN(e),X4=e=>G4(e)?0:e,_T=(e,t,n)=>Y4(W4(X4(e),t),n);function Nh(e){if(!U4(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]=Nh(s))}return n}function kh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function K4(e,t){if(e==null)throw new Error(t())}function Q4(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 J4=Object.defineProperty,Z4=(e,t,n)=>t in e?J4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oh=(e,t,n)=>Z4(e,typeof t!="symbol"?t+"":t,n),xT=()=>{},Fl=e=>typeof e=="object"&&e!==null,ro=e=>e?"":void 0,ST=e=>e?"true":void 0,eL=1,tL=9,nL=11,Zt=e=>Fl(e)&&e.nodeType===eL&&typeof e.nodeName=="string",Bl=e=>Fl(e)&&e.nodeType===tL,rL=e=>Fl(e)&&e===e.window,vT=e=>Zt(e)?e.localName||"":"#document";function iL(e){return["html","body","#document"].includes(vT(e))}var sL=e=>Fl(e)&&e.nodeType!==void 0,ls=e=>sL(e)&&e.nodeType===nL&&"host"in e,oL=e=>Zt(e)&&e.localName==="input",aL=e=>Zt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Da(e){if(!e)return!1;const t=e.getRootNode();return oo(t)===e}var uL=/(textarea|select)/;function lL(e){if(e==null||!Zt(e))return!1;try{return oL(e)&&e.selectionStart!=null||uL.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function io(e,t){var r;if(!e||!t||!Zt(e)||!Zt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ls(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Pr(e){var t;return Bl(e)?e:rL(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function cL(e){return Pr(e).documentElement}function so(e){var t,n,r;return ls(e)?so(e.host):Bl(e)?(t=e.defaultView)!=null?t:window:Zt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function oo(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 dL(e){if(vT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ls(e)&&e.host||cL(e);return ls(t)?t.host:t}function Ih(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Bl(t)||ls(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Ph=new WeakMap;function ao(e){return Ph.has(e)||Ph.set(e,so(e).getComputedStyle(e)),Ph.get(e)}var Rh=new Set(["menu","listbox","dialog","grid","tree","region"]),fL=e=>Rh.has(e),AT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function CT(e,t){const n=new Set,r=Ih(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=AT(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"),y=p.getAttribute("aria-modal")==="true";if(m&&fL(m)&&!y&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function NT(e,t){const n=Ih(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=AT(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"),y=p.getAttribute("aria-modal")==="true";m&&Rh.has(m)&&!y&&(t(p),s(p))}}}};s(e)}function hL(e){const t=new Set;return NT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function pL(e){const t=e.getAttribute("role");return!!(t&&Rh.has(t))}function mL(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function gL(e){var t;return mL(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function EL(e){if(!e.id)return!1;const t=Ih(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&pL(e))}var Lh=()=>typeof document!="undefined";function yL(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Dh=e=>Lh()&&e.test(yL()),TL=e=>Lh()&&e.test(navigator.vendor),kT=()=>Lh()&&!!navigator.maxTouchPoints,bL=()=>Dh(/^iPhone/i),wL=()=>Dh(/^iPad/i)||Mh()&&navigator.maxTouchPoints>1,Ul=()=>bL()||wL(),_L=()=>Mh()||Ul(),Mh=()=>Dh(/^Mac/i),xL=()=>_L()&&TL(/apple/i);function SL(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 mr(e){var n;const t=SL(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var OT=e=>e.button===0,vL=e=>e.button===2||Mh()&&e.ctrlKey&&e.button===0,AL=e=>"touches"in e&&e.touches.length>0,CL={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},IT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function NL(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=CL[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in IT&&(s=IT[s]),s}function PT(e,t="client"){const n=AL(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var en=(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)}},RT=e=>Zt(e)&&e.tagName==="IFRAME",kL=/^(audio|video|details)$/;function LT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var OL=e=>!Number.isNaN(LT(e)),IL=e=>LT(e)<0;function PL(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 DT(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=PL(d,t);if(f){const p=Array.from(f.querySelectorAll(Hl)).filter(n),m=u.get(d);if(m!==void 0){const y=m+1;r.splice(y,0,...p),p.forEach((T,_)=>{u.set(T,y+_)});for(let T=y+p.length;T<r.length;T++)u.set(r[T],T)}else{const y=r.length;r.push(...p),p.forEach((T,_)=>{u.set(T,y+_)})}s.push(...p)}}return r}var Hl="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",MT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Hl));(n==!0||n=="if-empty"&&s.length===0)&&Zt(e)&&Rr(e)&&s.unshift(e);const u=[];for(const l of s)if(Rr(l)){if(RT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...MT(d,{getShadowRoot:r}));continue}u.push(l)}return r?DT(u,r,Rr):u};function Rr(e){return!Zt(e)||e.closest("[inert]")?!1:e.matches(Hl)&&aL(e)}function uo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Hl));n&&cs(e)&&s.unshift(e);const a=[];for(const u of s)if(cs(u)){if(RT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...uo(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=DT(a,r,cs);return!u.length&&n?s:u}return!a.length&&n?s:a}function cs(e){return Zt(e)&&e.tabIndex>0?!0:Rr(e)&&!IL(e)}function RL(e,t={}){const n=uo(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function LL(e,t={}){const{current:n,getShadowRoot:r}=t,s=uo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:oo(a);if(!u)return null;const l=s.indexOf(u);return s[l+1]||null}function Ma(e){return e.tabIndex<0&&(kL.test(e.localName)||lL(e))&&!OL(e)?0:e.tabIndex}function FT(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=uo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var DL=class JS{constructor(){Oh(this,"id",null),Oh(this,"fn_cleanup"),Oh(this,"cleanup",()=>{this.cancel()})}static create(){return new JS}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function Yt(e){const t=DL.create();return t.request(e),t.cleanup}function BT(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 Fh(e){const t=dL(e);return iL(t)?Pr(t).body:Zt(t)&&BL(t)?t:Fh(t)}var ML=/auto|scroll|overlay|hidden|clip/,FL=new Set(["inline","contents"]);function BL(e){const t=so(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return ML.test(n+s+r)&&!FL.has(a)}var lo="default",Bh="",jl=new WeakMap;function UL(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return Ul()?(lo==="default"&&(Bh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),lo="disabled"):t&&(jl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>HL({target:t,doc:r})}function HL(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(Ul()){if(lo!=="disabled")return;lo="restoring",setTimeout(()=>{BT(()=>{lo==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Bh||""),Bh="",lo="default")})},300)}else if(t&&jl.has(t)){const a=jl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),jl.delete(t)}}function jL(e={}){const u=e,{defer:t,target:n}=u,r=An(u,["defer","target"]),s=t?Yt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(UL(ae(U({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function zL(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=PT(l),f=Math.sqrt(vd(d.x,2)+vd(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=PT(l);r({point:d,event:l})},u=[en(e,"pointermove",s,!1),en(e,"pointerup",a,!1),en(e,"pointercancel",a,!1),en(e,"contextmenu",a,!1),jL({doc:e})];return()=>{u.forEach(l=>l())}}function $L(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,y]=RL(e,{includeContainer:!0,getShadowRoot:a}),T=LL(l,{current:n,getShadowRoot:a}),_=!m&&!y;f.shiftKey&&Da(T)?(s==null||s(),p=y):f.shiftKey&&(Da(m)||_)?p=n:!f.shiftKey&&Da(n)?(s==null||s(),p=m):!f.shiftKey&&(Da(y)||_)&&(p=T),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return en(u,"keydown",d,!0)}function VL(e,t){const l=t,{defer:n,triggerElement:r}=l,s=An(l,["defer","triggerElement"]),a=n?Yt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push($L(d,U({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function qL(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function zl(e,t){if(!e)return xT;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 YL(e,t,n){if(!e)return xT;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 WL(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 GL(e,t){const{timeout:n,rootNode:r}=t,s=so(r),a=Pr(r),u=new s.AbortController;return WL(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 XL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),KL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,UT=e=>{const t={};let n;for(;n=KL.exec(e);)t[n[1]]=n[2];return t},QL=(e,t)=>{if(Ml(e)){if(Ml(t))return`${e};${t}`;e=UT(e)}else Ml(t)&&(t=UT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Wt(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=Ch(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=XL(t[s],n[s]);continue}if(s==="style"){t[s]=QL(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 AH(e){return e}var co=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(co||{}),Uh="__init__";function JL(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Pr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>oo(t()),a=u=>t().getElementById(u);return ae(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Da,getById:a})}function ZL(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var fo=()=>e=>Array.from(new Set(e)),HT=typeof globalThis.document!="undefined"?P.useLayoutEffect:P.useEffect;function $l(e){var m,y;const t=(m=e().value)!=null?m:e().defaultValue,n=(y=e().isEqual)!=null?y:Object.is,[r]=P.useState(t),[s,a]=P.useState(r),u=e().value!==void 0,l=P.useRef(s);l.current=u?e().value:s;const d=P.useRef(l.current);HT(()=>{d.current=l.current},[s,e().value]);const f=T=>{var x,S;const _=d.current,A=no(T)?T(_):T;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:A,prev:_}),u||a(A),n(A,_)||(S=(x=e()).onChange)==null||S.call(x,A,_)};function p(){return u?e().value:s}return{initial:r,ref:l,get:p,set(T){(e().sync?Ys.flushSync:$4)(()=>f(T))},invoke(T,_){var A,x;(x=(A=e()).onChange)==null||x.call(A,T,_)},hash(T){var _,A,x;return(x=(A=(_=e()).hash)==null?void 0:A.call(_,T))!=null?x:String(T)}}}$l.cleanup=e=>{P.useEffect(()=>e,[])},$l.ref=e=>{const t=P.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function e5(e){const t=P.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var t5=(e,t)=>{const n=P.useRef(!1),r=P.useRef(!1);P.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),P.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Vl(e,t={}){var K,oe,de,fe,te,ve;const n=P.useMemo(()=>{const{id:ue,ids:Q,getRootNode:le}=t;return JL({id:ue,ids:Q,getRootNode:le})},[t]),r=(...ue)=>{e.debug&&console.log(...ue)},s=(oe=(K=e.props)==null?void 0:K.call(e,{props:Nh(t),scope:n}))!=null?oe:t,a=n5(s),u=(de=e.context)==null?void 0:de.call(e,{prop:a,bindable:$l,scope:n,flush:zT,getContext(){return d},getComputed(){return V},getRefs(){return A},getEvent(){return T()}}),l=jT(u),d={get(ue){var Q;return(Q=l.current)==null?void 0:Q[ue].ref.current},set(ue,Q){var le;(le=l.current)==null||le[ue].set(Q)},initial(ue){var Q;return(Q=l.current)==null?void 0:Q[ue].initial},hash(ue){var le,C;const Q=(le=l.current)==null?void 0:le[ue].get();return(C=l.current)==null?void 0:C[ue].hash(Q)}},f=P.useRef(new Map),p=P.useRef(null),m=P.useRef(null),y=P.useRef({type:""}),T=()=>ae(U({},y.current),{current(){return y.current},previous(){return m.current}}),_=()=>ae(U({},D),{matches(...ue){return ue.includes(D.ref.current)},hasTag(ue){var Q,le;return!!((le=(Q=e.states[D.ref.current])==null?void 0:Q.tags)!=null&&le.includes(ue))}}),A=e5((te=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:d}))!=null?te:{}),x=()=>({state:_(),context:d,event:T(),prop:a,send:z,action:S,guard:N,track:t5,refs:A,computed:V,flush:zT,scope:n,choose:j}),S=ue=>{const Q=no(ue)?ue(x()):ue;if(!Q)return;const le=Q.map(C=>{var ee,R;const F=(R=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:R[C];return F||kh(`[zag-js] No implementation found for action "${JSON.stringify(C)}"`),F});for(const C of le)C==null||C(x())},N=ue=>{var Q,le;return no(ue)?ue(x()):(le=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:le[ue](x())},O=ue=>{const Q=no(ue)?ue(x()):ue;if(!Q)return;const le=Q.map(F=>{var R,Ce;const ee=(Ce=(R=e.implementations)==null?void 0:R.effects)==null?void 0:Ce[F];return ee||kh(`[zag-js] No implementation found for effect "${JSON.stringify(F)}"`),ee}),C=[];for(const F of le){const ee=F==null?void 0:F(x());ee&&C.push(ee)}return()=>C.forEach(F=>F==null?void 0:F())},j=ue=>N4(ue).find(Q=>{let le=!Q.guard;return Ml(Q.guard)?le=!!N(Q.guard):no(Q.guard)&&(le=Q.guard(x())),le}),V=ue=>{K4(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[ue];return Q({context:d,event:T(),prop:a,refs:A,scope:n,computed:V})},D=$l(()=>({defaultValue:e.initialState({prop:a}),onChange(ue,Q){var C,F,ee,R;if(Q){const Ce=f.current.get(Q);Ce==null||Ce(),f.current.delete(Q)}Q&&S((C=e.states[Q])==null?void 0:C.exit),S((F=p.current)==null?void 0:F.actions);const le=O((ee=e.states[ue])==null?void 0:ee.effects);if(le&&f.current.set(ue,le),Q===Uh){S(e.entry);const Ce=O(e.effects);Ce&&f.current.set(Uh,Ce)}S((R=e.states[ue])==null?void 0:R.entry)}})),W=P.useRef(void 0),Z=P.useRef(co.NotStarted);HT(()=>{queueMicrotask(()=>{var F;const le=Z.current===co.Started;Z.current=co.Started,r(le?"rehydrating...":"initializing...");const C=(F=W.current)!=null?F:D.initial;D.invoke(C,le?D.get():Uh)});const ue=f.current,Q=D.ref.current;return()=>{r("unmounting..."),W.current=Q,Z.current=co.Stopped,ue.forEach(le=>le==null?void 0:le()),f.current=new Map,p.current=null,queueMicrotask(()=>{S(e.exit)})}},[]);const re=()=>"ref"in D?D.ref.current:D.get(),z=ue=>{queueMicrotask(()=>{var R,Ce,Re,he,Se;if(Z.current!==co.Started)return;m.current=y.current,y.current=ue;let Q=re();const le=(Re=(R=e.states[Q].on)==null?void 0:R[ue.type])!=null?Re:(Ce=e.on)==null?void 0:Ce[ue.type],C=j(le);if(!C)return;p.current=C;const F=(he=C.target)!=null?he:Q;r("transition",ue.type,C.target||Q,`(${C.actions})`);const ee=F!==Q;ee?Ys.flushSync(()=>D.set(F)):C.reenter&&!ee?D.invoke(Q,Q):S((Se=C.actions)!=null?Se:[])})};return(ve=e.watch)==null||ve.call(e,x()),{state:_(),send:z,context:d,prop:a,scope:n,refs:A,computed:V,event:T(),getStatus:()=>Z.current}}function jT(e){const t=P.useRef(e);return t.current=e,t}function n5(e){const t=jT(e);return function(r){return t.current[r]}}function zT(e){queueMicrotask(()=>{Ys.flushSync(()=>e())})}var Hh=ZL(e=>e);function ql(...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 r5(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 jh=e=>{const t=P.memo(P.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=An(f,["asChild","children"]);if(!s)return P.createElement(e,ae(U({},u),{ref:r}),a);if(!P.isValidElement(a))return null;const l=P.Children.only(a),d=r5(l);return P.cloneElement(l,ae(U({},Wt(u,l.props)),{ref:r?ql(r,d):d}))}));return t.displayName=e.displayName||e.name,t},gn=(()=>{const e=new Map;return new Proxy(jh,{apply(t,n,r){return jh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,jh(r)),e.get(r)}})})();function i5(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ds(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=P.createContext(u);l.displayName=t;function d(){var p;const f=P.useContext(l);if(!f&&n){const m=new Error(a!=null?a:i5(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[s5,zh]=ds({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[$T,Fa]=ds({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),VT=P.forwardRef((e,t)=>{const n=zh(),r=Fa(),s=Wt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(gn.div,ae(U({},s),{ref:ql(r.ref,t)}))});VT.displayName="PopoverContent";const qT=P.forwardRef((e,t)=>{const n=zh(),r=Fa(),s=Wt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(gn.div,ae(U({},s),{ref:t}))});qT.displayName="PopoverPositioner";const Ba=()=>(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)]),YT=e=>Ba()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function o5(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 a5={props({props:e}){return ae(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",ao(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"});Yt(()=>{var l,d;const u=Yl(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})=>{Yt(()=>{e.set("prevAnimationName",Yl(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,y;((y=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?y:d.target)===s&&e.set("prevAnimationName",Yl(t.get("styles")))},u=d=>{const f=Yl(t.get("styles"));mr(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=zl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),BT(()=>l())}}}}};function Yl(e){return(e==null?void 0:e.animationName)||"none"}fo()(["onExitComplete","present","immediate"]);function u5(e,t={}){const{sync:n=!1}=t,r=l5(e);return P.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 l5(e){const t=P.useRef(e);return t.current=e,t}const $h=(e={})=>{const y=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=y,a=An(y,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=P.useRef(!1),l=ae(U({},a),{present:r,onExitComplete:u5(e.onExitComplete)}),d=Vl(a5,l),f=o5(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 fs=(e,t=[])=>({parts:(...n)=>{if(c5(t))return fs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>fs(e,[...t,...n]),omit:(...n)=>fs(e,t.filter(r=>!n.includes(r))),rename:n=>fs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${ho(e)}"][data-part="${ho(r)}"]`,`& [data-scope="${ho(e)}"][data-part="${ho(r)}"]`].join(", "),attrs:{"data-scope":ho(e),"data-part":ho(r)}}}),{})}),ho=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),c5=e=>e.length===0;const d5=["top","right","bottom","left"],bi=Math.min,Kr=Math.max,Wl=Math.round,Gl=Math.floor,Lr=e=>({x:e,y:e}),f5={left:"right",right:"left",bottom:"top",top:"bottom"};function WT(e,t,n){return Kr(e,bi(t,n))}function Qr(e,t){return typeof e=="function"?e(t):e}function wi(e){return e.split("-")[0]}function po(e){return e.split("-")[1]}function Vh(e){return e==="x"?"y":"x"}function qh(e){return e==="y"?"height":"width"}function Dr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Yh(e){return Vh(Dr(e))}function h5(e,t,n){n===void 0&&(n=!1);const r=po(e),s=Yh(e),a=qh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Xl(u)),[u,Xl(u)]}function p5(e){const t=Xl(e);return[Wh(e),t,Wh(t)]}function Wh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const GT=["left","right"],XT=["right","left"],m5=["top","bottom"],g5=["bottom","top"];function E5(e,t,n){switch(e){case"top":case"bottom":return n?t?XT:GT:t?GT:XT;case"left":case"right":return t?m5:g5;default:return[]}}function y5(e,t,n,r){const s=po(e);let a=E5(wi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Wh)))),a}function Xl(e){const t=wi(e);return f5[t]+e.slice(t.length)}function T5(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 KT(e){return typeof e!="number"?T5(e):{top:e,right:e,bottom:e,left:e}}function Kl(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 QT(e,t,n){let{reference:r,floating:s}=e;const a=Dr(t),u=Yh(t),l=qh(u),d=wi(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,y=r[l]/2-s[l]/2;let T;switch(d){case"top":T={x:p,y:r.y-s.height};break;case"bottom":T={x:p,y:r.y+r.height};break;case"right":T={x:r.x+r.width,y:m};break;case"left":T={x:r.x-s.width,y:m};break;default:T={x:r.x,y:r.y}}const _=po(t);return _&&(T[u]+=y*(_==="end"?1:-1)*(n&&f?-1:1)),T}function b5(e,t){return De(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:y=!1,padding:T=0}=Qr(t,e),_=KT(T),x=l[y?m==="floating"?"reference":"floating":m],S=Kl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(x))==null||n?x:x.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),N=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,O=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),j=(yield a.isElement==null?void 0:a.isElement(O))&&(yield a.getScale==null?void 0:a.getScale(O))||{x:1,y:1},V=Kl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:O,strategy:d}):N);return{top:(S.top-V.top+_.top)/j.y,bottom:(V.bottom-S.bottom+_.bottom)/j.y,left:(S.left-V.left+_.left)/j.x,right:(V.right-S.right+_.right)/j.x}})}const w5=50,_5=(e,t,n)=>De(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:ae(U({},u),{detectOverflow:b5}),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}=QT(f,r,d),y=r,T=0;const _={};for(let A=0;A<a.length;A++){const x=a[A];if(!x)continue;const{name:S,fn:N}=x,{x:O,y:j,data:V,reset:D}=yield N({x:p,y:m,initialPlacement:r,placement:y,strategy:s,middlewareData:_,rects:f,platform:l,elements:{reference:e,floating:t}});p=O!=null?O:p,m=j!=null?j:m,_[S]=U(U({},_[S]),V),D&&T<w5&&(T++,typeof D=="object"&&(D.placement&&(y=D.placement),D.rects&&(f=D.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:p,y:m}=QT(f,y,d)),A=-1)}return{x:p,y:m,placement:y,strategy:s,middlewareData:_}}),x5=e=>({name:"arrow",options:e,fn(n){return De(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=Qr(e,n)||{};if(p==null)return{};const y=KT(m),T={x:r,y:s},_=Yh(a),A=qh(_),x=yield l.getDimensions(p),S=_==="y",N=S?"top":"left",O=S?"bottom":"right",j=S?"clientHeight":"clientWidth",V=u.reference[A]+u.reference[_]-T[_]-u.floating[A],D=T[_]-u.reference[_],W=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let Z=W?W[j]:0;(!Z||!(yield l.isElement==null?void 0:l.isElement(W)))&&(Z=d.floating[j]||u.floating[A]);const re=V/2-D/2,z=Z/2-x[A]/2-1,K=bi(y[N],z),oe=bi(y[O],z),de=Z-x[A]-oe,fe=Z/2-x[A]/2+re,te=WT(K,fe,de),ve=!f.arrow&&po(a)!=null&&fe!==te&&u.reference[A]/2-(fe<K?K:oe)-x[A]/2<0,ue=ve?fe<K?fe-K:fe-de:0;return{[_]:T[_]+ue,data:U({[_]:te,centerOffset:fe-te-ue},ve&&{alignmentOffset:ue}),reset:ve}})}}),S5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return De(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,te=Qr(e,n),{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:T,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:x=!0}=te,S=An(te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const N=wi(a),O=Dr(d),j=wi(d)===d,V=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=T||(j||!x?[Xl(d)]:p5(d)),W=A!=="none";!T&&W&&D.push(...y5(d,x,A,V));const Z=[d,...D],re=yield f.detectOverflow(n,S),z=[];let K=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&z.push(re[N]),y){const ve=h5(a,l,V);z.push(re[ve[0]],re[ve[1]])}if(K=[...K,{placement:a,overflows:z}],!z.every(ve=>ve<=0)){var oe,de;const ve=(((oe=u.flip)==null?void 0:oe.index)||0)+1,ue=Z[ve];if(ue&&(!(y==="alignment"?O!==Dr(ue):!1)||K.every(C=>Dr(C.placement)===O?C.overflows[0]>0:!0)))return{data:{index:ve,overflows:K},reset:{placement:ue}};let Q=(de=K.filter(le=>le.overflows[0]<=0).sort((le,C)=>le.overflows[1]-C.overflows[1])[0])==null?void 0:de.placement;if(!Q)switch(_){case"bestFit":{var fe;const le=(fe=K.filter(C=>{if(W){const F=Dr(C.placement);return F===O||F==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(F=>F>0).reduce((F,ee)=>F+ee,0)]).sort((C,F)=>C[1]-F[1])[0])==null?void 0:fe[0];le&&(Q=le);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function JT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ZT(e){return d5.some(t=>e[t]>=0)}const v5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return De(this,null,function*(){const{rects:r,platform:s}=n,l=Qr(e,n),{strategy:a="referenceHidden"}=l,u=An(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,ae(U({},u),{elementContext:"reference"})),f=JT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:ZT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,ae(U({},u),{altBoundary:!0})),f=JT(d,r.floating);return{data:{escapedOffsets:f,escaped:ZT(f)}}}default:return{}}})}}},eb=new Set(["left","top"]);function A5(e,t){return De(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=wi(n),l=po(n),d=Dr(n)==="y",f=eb.has(u)?-1:1,p=a&&d?-1:1,m=Qr(t,e);let{mainAxis:y,crossAxis:T,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof _=="number"&&(T=l==="end"?_*-1:_),d?{x:T*p,y:y*f}:{x:y*f,y:T*p}})}const C5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return De(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield A5(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:ae(U({},f),{placement:l})}})}}},N5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return De(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,O=Qr(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:j=>{let{x:V,y:D}=j;return{x:V,y:D}}}}=O,p=An(O,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},y=yield u.detectOverflow(n,p),T=Dr(a),_=Vh(T);let A=m[_],x=m[T];const S=(j,V)=>WT(V+y[j==="y"?"top":"left"],V,V-y[j==="y"?"bottom":"right"]);l&&(A=S(_,A)),d&&(x=S(T,x));const N=f.fn(ae(U({},n),{[_]:A,[T]:x}));return ae(U({},N),{data:{x:N.x-r,y:N.y-s,enabled:{[_]:l,[T]:d}}})})}}},k5=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}=Qr(e,t),y={x:s,y:a},T=Dr(u),_=Vh(T);let A=y[_],x=y[T];const S=Qr(f,t),N=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:(n=S.mainAxis)!=null?n:0,crossAxis:(r=S.crossAxis)!=null?r:0};if(p){const V=_==="y"?"height":"width",D=l.reference[_]-l.floating[V]+N.mainAxis,W=l.reference[_]+l.reference[V]-N.mainAxis;A<D?A=D:A>W&&(A=W)}if(m){var O,j;const V=_==="y"?"width":"height",D=eb.has(wi(u)),W=l.reference[T]-l.floating[V]+(D&&((O=d.offset)==null?void 0:O[T])||0)+(D?0:N.crossAxis),Z=l.reference[T]+l.reference[V]+(D?0:((j=d.offset)==null?void 0:j[T])||0)-(D?N.crossAxis:0);x<W?x=W:x>Z&&(x=Z)}return{[_]:A,[T]:x}}}},O5=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return De(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,z=Qr(e,n),{apply:l=()=>{}}=z,d=An(z,["apply"]),f=yield a.detectOverflow(n,d),p=wi(r),m=po(r),y=Dr(r)==="y",{width:T,height:_}=s.floating;let A,x;p==="top"||p==="bottom"?(A=p,x=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(x=p,A=m==="end"?"top":"bottom");const S=_-f.top-f.bottom,N=T-f.left-f.right,O=bi(_-f[A],S),j=bi(T-f[x],N),V=n.middlewareData.shift,D=!V;let W=O,Z=j;V!=null&&V.enabled.x&&(Z=N),V!=null&&V.enabled.y&&(W=S),D&&!m&&(y?Z=T-2*Kr(f.left,f.right):W=_-2*Kr(f.top,f.bottom)),yield l(ae(U({},n),{availableWidth:Z,availableHeight:W}));const re=yield a.getDimensions(u.floating);return T!==re.width||_!==re.height?{reset:{rects:!0}}:{}})}}};function Ql(){return typeof window!="undefined"}function mo(e){return tb(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mr(e){var t;return(t=(tb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tb(e){return Ql()?e instanceof Node||e instanceof Vn(e).Node:!1}function gr(e){return Ql()?e instanceof Element||e instanceof Vn(e).Element:!1}function Fr(e){return Ql()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function nb(e){return!Ql()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}function Ua(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Er(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function I5(e){return/^(table|td|th)$/.test(mo(e))}function Jl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const P5=/transform|translate|scale|rotate|perspective|filter/,R5=/paint|layout|strict|content/,hs=e=>!!e&&e!=="none";let Gh;function Xh(e){const t=gr(e)?Er(e):e;return hs(t.transform)||hs(t.translate)||hs(t.scale)||hs(t.rotate)||hs(t.perspective)||!Kh()&&(hs(t.backdropFilter)||hs(t.filter))||P5.test(t.willChange||"")||R5.test(t.contain||"")}function L5(e){let t=_i(e);for(;Fr(t)&&!go(t);){if(Xh(t))return t;if(Jl(t))return null;t=_i(t)}return null}function Kh(){return Gh==null&&(Gh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Gh}function go(e){return/^(html|body|#document)$/.test(mo(e))}function Er(e){return Vn(e).getComputedStyle(e)}function Zl(e){return gr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _i(e){if(mo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nb(e)&&e.host||Mr(e);return nb(t)?t.host:t}function rb(e){const t=_i(e);return go(t)?(e.ownerDocument||e).body:Fr(t)&&Ua(t)?t:rb(t)}function Ha(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=rb(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Vn(s);if(a){const l=Qh(u);return t.concat(u,u.visualViewport||[],Ua(s)?s:[],l&&n?Ha(l):[])}else return t.concat(s,Ha(s,[],n))}function Qh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ib(e){const t=Er(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Fr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=Wl(n)!==a||Wl(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function Jh(e){return gr(e)?e:e.contextElement}function Eo(e){const t=Jh(e);if(!Fr(t))return Lr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=ib(t);let u=(a?Wl(n.width):n.width)/r,l=(a?Wl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const D5=Lr(0);function sb(e){const t=Vn(e);return!Kh()||!t.visualViewport?D5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function M5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function ps(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Jh(e);let u=Lr(1);t&&(r?gr(r)&&(u=Eo(r)):u=Eo(e));const l=M5(a,n,r)?sb(a):Lr(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 y=Vn(a),T=r&&gr(r)?Vn(r):r;let _=y,A=Qh(_);for(;A&&r&&T!==_;){const x=Eo(A),S=A.getBoundingClientRect(),N=Er(A),O=S.left+(A.clientLeft+parseFloat(N.paddingLeft))*x.x,j=S.top+(A.clientTop+parseFloat(N.paddingTop))*x.y;d*=x.x,f*=x.y,p*=x.x,m*=x.y,d+=O,f+=j,_=Vn(A),A=Qh(_)}}return Kl({width:p,height:m,x:d,y:f})}function ec(e,t){const n=Zl(e).scrollLeft;return t?t.left+n:ps(Mr(e)).left+n}function ob(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ec(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function F5(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Mr(r),l=t?Jl(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Lr(1);const p=Lr(0),m=Fr(r);if((m||!m&&!a)&&((mo(r)!=="body"||Ua(u))&&(d=Zl(r)),Fr(r))){const T=ps(r);f=Eo(r),p.x=T.x+r.clientLeft,p.y=T.y+r.clientTop}const y=u&&!m&&!a?ob(u,d):Lr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+y.x,y:n.y*f.y-d.scrollTop*f.y+p.y+y.y}}function B5(e){return Array.from(e.getClientRects())}function U5(e){const t=Mr(e),n=Zl(e),r=e.ownerDocument.body,s=Kr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Kr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+ec(e);const l=-n.scrollTop;return Er(r).direction==="rtl"&&(u+=Kr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const ab=25;function H5(e,t){const n=Vn(e),r=Mr(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=Kh();(!p||p&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=ec(r);if(f<=0){const p=r.ownerDocument,m=p.body,y=getComputedStyle(m),T=p.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-T);_<=ab&&(a-=_)}else f<=ab&&(a+=f);return{width:a,height:u,x:l,y:d}}const j5=new Set(["absolute","fixed"]);function z5(e,t){const n=ps(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Fr(e)?Eo(e):Lr(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 ub(e,t,n){let r;if(t==="viewport")r=H5(e,n);else if(t==="document")r=U5(Mr(e));else if(gr(t))r=z5(t,n);else{const s=sb(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Kl(r)}function lb(e,t){const n=_i(e);return n===t||!gr(n)||go(n)?!1:Er(n).position==="fixed"||lb(n,t)}function $5(e,t){const n=t.get(e);if(n)return n;let r=Ha(e,[],!1).filter(l=>gr(l)&&mo(l)!=="body"),s=null;const a=Er(e).position==="fixed";let u=a?_i(e):e;for(;gr(u)&&!go(u);){const l=Er(u),d=Xh(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&j5.has(s.position)||Ua(u)&&!d&&lb(e,u))?r=r.filter(p=>p!==u):s=l,u=_i(u)}return t.set(e,r),r}function V5(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Jl(t)?[]:$5(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=ub(t,p,s);return f.top=Kr(m.top,f.top),f.right=bi(m.right,f.right),f.bottom=bi(m.bottom,f.bottom),f.left=Kr(m.left,f.left),f},ub(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function q5(e){const{width:t,height:n}=ib(e);return{width:t,height:n}}function Y5(e,t,n){const r=Fr(t),s=Mr(t),a=n==="fixed",u=ps(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Lr(0);function f(){d.x=ec(s)}if(r||!r&&!a)if((mo(t)!=="body"||Ua(s))&&(l=Zl(t)),r){const T=ps(t,!0,a,t);d.x=T.x+t.clientLeft,d.y=T.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?ob(s,l):Lr(0),m=u.left+l.scrollLeft-d.x-p.x,y=u.top+l.scrollTop-d.y-p.y;return{x:m,y,width:u.width,height:u.height}}function Zh(e){return Er(e).position==="static"}function cb(e,t){if(!Fr(e)||Er(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mr(e)===n&&(n=n.ownerDocument.body),n}function db(e,t){const n=Vn(e);if(Jl(e))return n;if(!Fr(e)){let s=_i(e);for(;s&&!go(s);){if(gr(s)&&!Zh(s))return s;s=_i(s)}return n}let r=cb(e,t);for(;r&&I5(r)&&Zh(r);)r=cb(r,t);return r&&go(r)&&Zh(r)&&!Xh(r)?n:r||L5(e)||n}const W5=function(e){return De(this,null,function*(){const t=this.getOffsetParent||db,n=this.getDimensions,r=yield n(e.floating);return{reference:Y5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function G5(e){return Er(e).direction==="rtl"}const X5={convertOffsetParentRelativeRectToViewportRelativeRect:F5,getDocumentElement:Mr,getClippingRect:V5,getOffsetParent:db,getElementRects:W5,getClientRects:B5,getDimensions:q5,getScale:Eo,isElement:gr,isRTL:G5};function fb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function K5(e,t){let n=null,r;const s=Mr(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:y,height:T}=f;if(l||t(),!y||!T)return;const _=Gl(m),A=Gl(s.clientWidth-(p+y)),x=Gl(s.clientHeight-(m+T)),S=Gl(p),O={rootMargin:-_+"px "+-A+"px "+-x+"px "+-S+"px",threshold:Kr(0,bi(1,d))||1};let j=!0;function V(D){const W=D[0].intersectionRatio;if(W!==d){if(!j)return u();W?u(!1,W):r=setTimeout(()=>{u(!1,1e-7)},1e3)}W===1&&!fb(f,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(V,ae(U({},O),{root:s.ownerDocument}))}catch(D){n=new IntersectionObserver(V,O)}n.observe(e)}return u(!0),a}function Q5(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=Jh(e),p=s||a?[...f?Ha(f):[],...Ha(t)]:[];p.forEach(S=>{s&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const m=f&&l?K5(f,n):null;let y=-1,T=null;u&&(T=new ResizeObserver(S=>{let[N]=S;N&&N.target===f&&T&&(T.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var O;(O=T)==null||O.observe(t)})),n()}),f&&!d&&T.observe(f),T.observe(t));let _,A=d?ps(e):null;d&&x();function x(){const S=ps(e);A&&!fb(A,S)&&n(),A=S,_=requestAnimationFrame(x)}return n(),()=>{var S;p.forEach(N=>{s&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),m==null||m(),(S=T)==null||S.disconnect(),T=null,d&&cancelAnimationFrame(_)}}const J5=C5,Z5=N5,eD=S5,tD=O5,nD=v5,rD=x5,iD=k5,sD=(e,t,n)=>{const r=new Map,s=U({platform:X5},n),a=ae(U({},s.platform),{_c:r});return _5(e,t,ae(U({},s),{platform:a}))};function hb(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 ae(U({},s),{toJSON:()=>s})}function oD(e){if(!e)return hb();const{x:t,y:n,width:r,height:s}=e;return hb(t,n,r,s)}function aD(e,t){return{contextElement:Zt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?oD(r):n.getBoundingClientRect()}}}var ja=e=>({variable:e,reference:`var(${e})`}),Jr={arrowSize:ja("--arrow-size"),arrowSizeHalf:ja("--arrow-size-half"),arrowBg:ja("--arrow-background"),transformOrigin:ja("--transform-origin"),arrowOffset:ja("--arrow-offset")},uD=e=>e==="top"||e==="bottom"?"y":"x";function lD(e,t){return{name:"transformOrigin",fn(n){var re,z,K,oe,de;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=uD(d),p=((re=s.arrow)==null?void 0:re.x)||0,m=((z=s.arrow)==null?void 0:z.y)||0,y=(t==null?void 0:t.clientWidth)||0,T=(t==null?void 0:t.clientHeight)||0,_=p+y/2,A=m+T/2,x=Math.abs(((K=s.shift)==null?void 0:K.y)||0),S=u.reference.height/2,N=T/2,O=(de=(oe=e.offset)==null?void 0:oe.mainAxis)!=null?de:e.gutter,j=typeof O=="number"?O+N:O!=null?O:N,V=x>j,D={top:`${_}px calc(100% + ${j}px)`,bottom:`${_}px ${-j}px`,left:`calc(100% + ${j}px) ${A}px`,right:`${-j}px ${A}px`}[d],W=`${_}px ${u.reference.y+S-l}px`,Z=!!e.overlap&&f==="y"&&V;return r.floating.style.setProperty(Jr.transformOrigin.variable,Z?W:D),{data:{transformOrigin:Z?W:D}}}}}var cD={name:"rects",fn({rects:e}){return{data:e}}},dD=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% + ${Jr.arrowOffset.reference})`}),{}}}};function fD(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var hD={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function pb(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function ep(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function pD(e,t,n){const r=e||t.createElement("div");return rD({element:r,padding:n.arrowPadding})}function mD(e,t){var n;if(!D4((n=t.offset)!=null?n:t.gutter))return J5(({placement:r})=>{var p,m,y,T;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}=fD(r),d=l?void 0:t.shift,f=(T=(y=t.offset)==null?void 0:y.crossAxis)!=null?T:d;return Nh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function gD(e){if(!e.flip)return;const t=ep(e.boundary);return eD(ae(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function ED(e){if(!e.slide&&!e.overlap)return;const t=ep(e.boundary);return Z5(ae(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:iD()}))}function yD(e){return tD({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 TD(e){var t;if(e.hideWhenDetached)return nD({strategy:"referenceHidden",boundary:(t=ep(e.boundary))!=null?t:"clippingAncestors"})}function bD(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function wD(e,t,n={}){const r=aD(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},hD,n),a=t.querySelector("[data-part=arrow]"),u=[mD(a,s),gD(s),ED(s),pD(a,t.ownerDocument,s),dD(a),lD({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),yD(s),TD(s),cD],{placement:l,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>De(null,null,function*(){var j;if(!r||!t)return;const A=yield sD(r,t,{placement:l,middleware:u,strategy:d});f==null||f(A),p==null||p({placed:!0});const x=so(t),S=pb(x,A.x),N=pb(x,A.y);t.style.setProperty("--x",`${S}px`),t.style.setProperty("--y",`${N}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 O=t.firstElementChild;if(O){const V=ao(O);t.style.setProperty("--z-index",V.zIndex)}}),y=()=>De(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),T=bD(s.listeners),_=s.listeners?Q5(r,t,y,T):V4;return y(),()=>{_==null||_(),p==null||p({placed:!1})}}function mb(e,t,n={}){const l=n,{defer:r}=l,s=An(l,["defer"]),a=r?Yt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(wD(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var _D={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function xD(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:Jr.arrowSize.reference,height:Jr.arrowSize.reference,[Jr.arrowSizeHalf.variable]:`calc(${Jr.arrowSize.reference} / 2)`,[Jr.arrowOffset.variable]:`calc(${Jr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?_D[t.split("-")[0]]:void 0,background:Jr.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 yo=new WeakMap,tc=new WeakMap,nc={},tp=0,gb=e=>e&&(e.host||gb(e.parentNode)),SD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=gb(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),vD=new Set(["script","output","status","next-route-announcer"]),AD=e=>vD.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),CD=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=SD(n,Array.isArray(e)?e:[e]);nc[r]||(nc[r]=new WeakMap);const l=nc[r],d=[],f=new Set,p=new Set(u),m=T=>{!T||f.has(T)||(f.add(T),m(T.parentNode))};u.forEach(T=>{m(T),a&&Zt(T)&&NT(T,_=>{m(_)})});const y=T=>{!T||p.has(T)||Array.prototype.forEach.call(T.children,_=>{if(f.has(_))y(_);else try{if(AD(_))return;const x=_.getAttribute(s)==="true",S=(yo.get(_)||0)+1,N=(l.get(_)||0)+1;yo.set(_,S),l.set(_,N),d.push(_),S===1&&x&&tc.set(_,!0),N===1&&_.setAttribute(r,""),x||_.setAttribute(s,"true")}catch(A){console.error("[zag-js > ariaHidden] cannot operate on ",_,A)}})};return y(n),f.clear(),tp++,()=>{d.forEach(T=>{const _=yo.get(T)-1,A=l.get(T)-1;yo.set(T,_),l.set(T,A),_||(tc.has(T)||T.removeAttribute(s),tc.delete(T)),A||T.removeAttribute(r)}),tp--,tp||(yo=new WeakMap,yo=new WeakMap,tc=new WeakMap,nc={})}},ND=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,kD=(e,t=ND(e),n="data-aria-hidden",r=!0)=>{if(t)return CD(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},OD=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Eb(e,t={}){const{defer:n=!0}=t,r=n?OD:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(kD(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function ID(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 PD(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 yb="pointerdown.outside",Tb="focus.outside";function RD(e){for(const t of e)if(Zt(t)&&Rr(t))return!0;return!1}var bb=e=>"clientY"in e;function LD(e,t){if(!bb(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 DD(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function wb(e,t){if(!t||!bb(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 DD(u,l)?r||a:!1}function MD(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Pr(e),f=so(e),p=ID(f),m=PD(f);function y(O,j){if(!Zt(j)||!j.isConnected||io(e,j)||LD(e,O)||l&&CT(e,j))return!1;const V=d.querySelector(`[aria-controls="${e.id}"]`);if(V){const W=Fh(V);if(wb(O,W))return!1}const D=Fh(e);return wb(O,D)?!1:!(n!=null&&n(j))}const T=new Set,_=ls(e==null?void 0:e.getRootNode());function A(O){function j(V){var re,z;const D=u&&!kT()?Yt:K=>K(),W=V!=null?V:O,Z=(z=(re=W==null?void 0:W.composedPath)==null?void 0:re.call(W))!=null?z:[W==null?void 0:W.target];D(()=>{const K=_?Z[0]:mr(O);if(!(!e||!y(O,K))){if(s||a){const oe=Ch(s,a);e.addEventListener(yb,oe,{once:!0})}_b(e,yb,{bubbles:!1,cancelable:!0,detail:{originalEvent:W,contextmenu:vL(W),focusable:RD(Z),target:K}})}})}O.pointerType==="touch"?(T.forEach(V=>V()),T.add(en(d,"click",j,{once:!0})),T.add(m.addEventListener("click",j,{once:!0})),T.add(p.addEventListener("click",j,{once:!0}))):j()}const x=new Set,S=setTimeout(()=>{x.add(en(d,"pointerdown",A,!0)),x.add(m.addEventListener("pointerdown",A,!0)),x.add(p.addEventListener("pointerdown",A,!0))},0);function N(O){(u?Yt:V=>V())(()=>{var W,Z;const V=(Z=(W=O==null?void 0:O.composedPath)==null?void 0:W.call(O))!=null?Z:[O==null?void 0:O.target],D=_?V[0]:mr(O);if(!(!e||!y(O,D))){if(r||a){const re=Ch(r,a);e.addEventListener(Tb,re,{once:!0})}_b(e,Tb,{bubbles:!1,cancelable:!0,detail:{originalEvent:O,contextmenu:!1,focusable:Rr(D),target:D}})}})}return kT()||(x.add(en(d,"focusin",N,!0)),x.add(m.addEventListener("focusin",N,!0)),x.add(p.addEventListener("focusin",N,!0))),()=>{clearTimeout(S),T.forEach(O=>O()),x.forEach(O=>O())}}function FD(e,t){const{defer:n}=t,r=n?Yt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(MD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function _b(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function BD(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return en(Pr(e),"keydown",n,{capture:!0})}var xb="layer:request-dismiss",er={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=>io(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>io(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=>er.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];HD(e,xb,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),UD(e,xb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function UD(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 HD(e,t,n){e.addEventListener(t,n,{once:!0})}var Sb;function vb(){er.layers.forEach(({node:e})=>{e.style.pointerEvents=er.isBelowPointerBlockingLayer(e)?"none":"auto"})}function jD(e){e.style.pointerEvents=""}function zD(e,t){const n=Pr(e),r=[];return er.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Sb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=GL(()=>{const l=s();return Zt(l)?l:null},{timeout:1e3});a.then(l=>r.push(zl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{er.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Sb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function $D(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){kh("[@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};er.add(f),vb();function p(A){var S,N;const x=mr(A.detail.originalEvent);er.isBelowPointerBlockingLayer(e)||er.isInBranch(x)||((S=t.onPointerDownOutside)==null||S.call(t,A),(N=t.onInteractOutside)==null||N.call(t,A),!A.defaultPrevented&&(l&&console.log("onPointerDownOutside:",A.detail.originalEvent),r==null||r()))}function m(A){var S,N;const x=mr(A.detail.originalEvent);er.isInBranch(x)||((S=t.onFocusOutside)==null||S.call(t,A),(N=t.onInteractOutside)==null||N.call(t,A),!A.defaultPrevented&&(l&&console.log("onFocusOutside:",A.detail.originalEvent),r==null||r()))}function y(A){var x;er.isTopMost(e)&&((x=t.onEscapeKeyDown)==null||x.call(t,A),!A.defaultPrevented&&r&&(A.preventDefault(),r()))}function T(A){var O;if(!e)return!1;const x=typeof u=="function"?u():u,S=Array.isArray(x)?x:[x],N=(O=t.persistentElements)==null?void 0:O.map(j=>j()).filter(Zt);return N&&S.push(...N),S.some(j=>io(j,A))||er.isInNestedLayer(e,A)}const _=[a?zD(e,t.persistentElements):void 0,BD(e,y),FD(e,{exclude:T,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{er.remove(e),vb(),jD(e),_.forEach(A=>A==null?void 0:A())}}function Ab(e,t){const{defer:n}=t,r=n?Yt:a=>a(),s=[];return s.push(r(()=>{const a=no(e)?e():e;s.push($D(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var VD=Object.defineProperty,qD=(e,t,n)=>t in e?VD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ot=(e,t,n)=>qD(e,typeof t!="symbol"?t+"":t,n),Cb={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()}},YD=[],WD=class{constructor(e,t){Ot(this,"trapStack"),Ot(this,"config"),Ot(this,"doc"),Ot(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ot(this,"portalContainers",new Set),Ot(this,"listenerCleanups",[]),Ot(this,"handleFocus",r=>{const s=mr(r),a=this.findContainerIndex(s,r)>=0;if(a||Bl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(Ma(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=>Ma(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}),Ot(this,"handlePointerDown",r=>{const s=mr(r);if(!(this.findContainerIndex(s,r)>=0)){if($a(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}$a(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ot(this,"handleClick",r=>{const s=mr(r);this.findContainerIndex(s,r)>=0||$a(this.config.clickOutsideDeactivates,r)||$a(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ot(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;za(r)&&r.preventDefault(),this.tryFocus(a)}}),Ot(this,"handleEscapeKey",r=>{GD(r)&&$a(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ot(this,"_mutationObserver"),Ot(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 gL(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?EL(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ot(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)}))}),Ot(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Rr(r)){const s=oo(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}),Ot(this,"tryFocus",r=>{if(r!==!1&&r!==oo(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,XD(r)&&r.select()}}),Ot(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(),Cb.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=()=>{Nb(()=>{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}),Ot(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}),Ot(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}),Ot(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ot(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),Ot(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),Ot(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}),Ot(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||mr(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||Rr(u)&&!cs(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,y=this.state.tabbableGroups[m];l=Ma(u)>=0?y.lastTabbableNode:y.lastDomTabbableNode}else za(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||Rr(u)&&!cs(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,y=this.state.tabbableGroups[m];l=Ma(u)>=0?y.firstTabbableNode:y.firstDomTabbableNode}else za(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||YD;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return za(r)&&!r.shiftKey},isKeyBackward(r){return za(r)&&r.shiftKey}},t);this.doc=n.document||Pr(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=>{hL(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?CT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=uo(e,{getShadowRoot:this.config.getShadowRoot}),n=MT(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(Ma(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 y=n.indexOf(f);if(!(y<0)){if(p){for(let T=y+1;T<n.length;T++)if(cs(n[T]))return n[T]}else for(let T=y-1;T>=0;T--)if(cs(n[T]))return n[T]}}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 Cb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Nb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(en(this.doc,"focusin",this.handleFocus,!0),en(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),en(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),en(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),en(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),en(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=oo(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)}},za=e=>e.key==="Tab",$a=(e,...t)=>typeof e=="function"?e(...t):e,GD=e=>!e.isComposing&&e.key==="Escape",Nb=e=>setTimeout(e,0),XD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function kb(e,t={}){let n;const r=Yt(()=>{const s=typeof e=="function"?e():e;if(s){n=new WD(s,ae(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Pr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var np="data-scroll-lock";function KD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Ob(e){const t=ao(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Ib(e){var T;const t=e!=null?e:document,n=(T=t.defaultView)!=null?T:window,{documentElement:r,body:s}=t;if(s.hasAttribute(np))return;const u=Ob(r)||Ob(s),l=n.innerWidth-r.clientWidth;s.setAttribute(np,"");const d=()=>YL(r,"--scrollbar-width",`${l}px`),f=KD(r),p=()=>{const _={overflow:"hidden"};return!u&&l>0&&(_[f]=`${l}px`),zl(s,_)},m=()=>{var V,D;const{scrollX:_,scrollY:A,visualViewport:x}=n,S=(V=x==null?void 0:x.offsetLeft)!=null?V:0,N=(D=x==null?void 0:x.offsetTop)!=null?D:0,O={position:"fixed",overflow:"hidden",top:`${-(A-Math.floor(N))}px`,left:`${-(_-Math.floor(S))}px`,right:"0"};!u&&l>0&&(O[f]=`${l}px`);const j=zl(s,O);return()=>{j==null||j(),n.scrollTo({left:_,top:A,behavior:"instant"})}},y=[d(),Ul()?m():p()];return()=>{y.forEach(_=>_==null?void 0:_()),s.removeAttribute(np)}}var QD=fs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Br=QD.build(),Pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Rb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},rp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Lb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},JD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},ip=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},ZD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Db=e=>e.getById(Pb(e)),To=e=>e.getById(Rb(e)),bo=e=>e.getById(rp(e)),Mb=e=>e.getById(Lb(e)),e8=e=>e.getById(ip(e)),t8=e=>e.getById(sp(e));function n8(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"),y=xD(ae(U({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(T){n.matches("open")!==T&&s({type:T?"OPEN":"CLOSE"})},reposition(T={}){s({type:"POSITIONING.SET",options:T})},getArrowProps(){return t.element(ae(U({id:JD(l)},Br.arrow.attrs),{dir:u("dir"),style:y.arrow}))},getArrowTipProps(){return t.element(ae(U({},Br.arrowTip.attrs),{dir:u("dir"),style:y.arrowTip}))},getAnchorProps(){return t.element(ae(U({},Br.anchor.attrs),{dir:u("dir"),id:Pb(l)}))},getTriggerProps(){return t.button(ae(U({},Br.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:Rb(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":rp(l),onPointerDown(T){OT(T)&&xL()&&T.currentTarget.focus()},onClick(T){T.defaultPrevented||s({type:"TOGGLE"})},onBlur(T){s({type:"TRIGGER_BLUR",target:T.relatedTarget})}}))},getIndicatorProps(){return t.element(ae(U({},Br.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ae(U({id:Lb(l)},Br.positioner.attrs),{dir:u("dir"),style:y.floating}))},getContentProps(){return t.element(ae(U({},Br.content.attrs),{dir:u("dir"),id:rp(l),tabIndex:-1,role:"dialog","aria-modal":ST(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ro(d),"aria-labelledby":m.title?ip(l):void 0,"aria-describedby":m.description?sp(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(ae(U({},Br.title.attrs),{id:ip(l),dir:u("dir")}))},getDescriptionProps(){return t.element(ae(U({},Br.description.attrs),{id:sp(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ae(U({},Br.closeTrigger.attrs),{dir:u("dir"),id:ZD(l),type:"button","aria-label":"close",onClick(T){T.defaultPrevented||(T.stopPropagation(),s({type:"CLOSE"}))}}))}}}var r8={props({props:e}){return ae(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=Db(n))!=null?a:To(n);return mb(r,()=>Mb(n),ae(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>bo(n);let s=!0;return Ab(r,{type:"popover",pointerBlocking:t("modal"),exclude:To(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:VL(()=>bo(t),{triggerElement:To(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Eb(()=>[bo(t),To(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Ib(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?kb(()=>bo(t),{initialFocus:()=>FT({root:bo(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=Db(n))!=null?u:To(n);mb(s,()=>Mb(n),ae(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Yt(()=>{Object.assign(e.get("renderedElements"),{title:!!e8(t),description:!!t8(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Yt(()=>{const n=FT({root:bo(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||Yt(()=>{const a=To(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};fo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[NH,rc]=ds({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[kH,op]=ds({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),i8=e=>{const t=P.useId(),{getRootNode:n}=rc(),{dir:r}=op(),s=U({id:t,dir:r,getRootNode:n},e),a=Vl(r8,s);return n8(a,Hh)},s8=e=>{const[t,u]=YT(e),l=u,{children:n}=l,r=An(l,["children"]),s=i8(r),a=$h(Wt({present:s.open},t));return w.jsx(s5,{value:s,children:w.jsx($T,{value:a,children:n})})},Fb=P.forwardRef((e,t)=>{const n=zh(),r=Fa(),s=Wt(ae(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(gn.button,ae(U({},s),{ref:t}))});Fb.displayName="PopoverTrigger";function o8(e){return mt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function a8(e){return mt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function Bb(e){return mt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function Ub(e){return mt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function u8(e){return mt({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 l8(e){return mt({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 ap(e){return mt({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 Hb(e){return mt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const c8=({className:e,componentType:t,children:n})=>{const[r,s]=P.useState(!1),{globalClassName:a}=ft(),u=f=>{s(f.open)},l=P.useCallback(()=>{s(!1)},[]),d=P.useMemo(()=>({closeMenu:l}),[l]);return w.jsxs(s8,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(Fb,{"aria-label":`Overflow menu for ${t}`,className:M(`${k}-overflow-menu-button-trigger`,`${k}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(Hb,{})}),w.jsx(qT,{children:w.jsx(VT,{className:M(`${k}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(mT.Provider,{value:d,children:n})})})]})};function jb(e){return mt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function zb(e){return mt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[d8,ms]=ds({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),up=P.forwardRef((e,t)=>{const n=ms(),r=Wt(n.getControlProps(),e);return w.jsx(gn.div,ae(U(U({},r),e),{ref:t}))});up.displayName="CarouselControl";const lp=P.forwardRef((e,t)=>{const[n,r]=Ba()(e,["readOnly","index"]),s=ms(),a=Wt(s.getIndicatorProps(n),r);return w.jsx(gn.button,ae(U({},a),{ref:t}))});lp.displayName="CarouselIndicator";const cp=P.forwardRef((e,t)=>{const n=ms(),r=Wt(n.getIndicatorGroupProps(),e);return w.jsx(gn.div,ae(U({},r),{ref:t}))});cp.displayName="CarouselIndicatorGroup";const dp=P.forwardRef((e,t)=>{const[n,r]=Ba()(e,["index","snapAlign"]),s=ms(),a=Wt(s.getItemProps(n),r);return w.jsx(gn.div,ae(U({},a),{ref:t}))});dp.displayName="CarouselItem";const fp=P.forwardRef((e,t)=>{const n=ms(),r=Wt(n.getItemGroupProps(),e);return w.jsx(gn.div,ae(U({},r),{ref:t}))});fp.displayName="CarouselItemGroup";const hp=P.forwardRef((e,t)=>{const n=ms(),r=Wt(n.getNextTriggerProps(),e);return w.jsx(gn.button,ae(U({},r),{ref:t}))});hp.displayName="CarouselNextTrigger";const pp=P.forwardRef((e,t)=>{const n=ms(),r=Wt(n.getPrevTriggerProps(),e);return w.jsx(gn.button,ae(U({},r),{ref:t}))});pp.displayName="CarouselPrevTrigger";function f8(e){const t=ao(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(y,T){let _=parseFloat(y);return/%/.test(y)&&(_/=100,_*=T),Number.isNaN(_)?0:_}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 h8(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 $b(e){let t=[];for(const n of e.children)t=t.concat(n,$b(n));return t}function Vb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?$b(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(!h8(n,m,u))continue;const y=ao(p);let[T,_]=y.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=T);const A=a==="x"?_:T,x=m[l]-n[l]+e[f];switch(A){case"none":break;case"start":r[a].start.push({node:p,position:x});break;case"center":r[a].center.push({node:p,position:x+m[d]/2});break;case"end":r[a].end.push({node:p,position:x+m[d]});break}}}return r}function qb(e){const t=e.getBoundingClientRect(),n=f8(e),r=Vb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Yb([...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(Wb(0,s.x))),y:Yb([...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(Wb(0,s.y)))}}function p8(e,t,n){const r=Vb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var Yb=e=>[...new Set(e)],Wb=(e,t)=>n=>Math.max(e,Math.min(t,n)),m8=fs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Zr=m8.build(),g8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},E8=(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}`},ic=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},y8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},T8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},b8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Gb=(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}`},Rn=e=>e.getById(ic(e)),Xb=e=>qL(Rn(e),"[data-part=item]"),w8=(e,t)=>e.getById(Gb(e,t)),Kb=e=>{const t=Rn(e);if(!t)return;const n=uo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function _8(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"),y=s("isHorizontal"),T=Array.from(r.get("pageSnapPoints")),_=r.get("page"),A=l("slidesPerPage"),x=l("padding"),S=l("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:T,canScrollNext:p,canScrollPrev:m,getProgress(){return _/T.length},scrollToIndex(N,O){a({type:"INDEX.SET",index:N,instant:O})},scrollTo(N,O){a({type:"PAGE.SET",index:N,instant:O})},scrollNext(N){a({type:"PAGE.NEXT",instant:N})},scrollPrev(N){a({type:"PAGE.PREV",instant:N})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(N){return Array.from(r.get("slidesInView")).includes(N)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(ae(U({},Zr.root.attrs),{id:g8(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":A,"--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(ae(U({},Zr.itemGroup.attrs),{id:ic(u),"data-orientation":l("orientation"),"data-dragging":ro(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(N){io(N.currentTarget,mr(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){io(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!l("allowMouseDrag")||!OT(N))return;const O=mr(N);Rr(O)&&O!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:q4(N=>{const O=l("orientation")==="horizontal"?"deltaX":"deltaY";N[O]<0&&!s("canScrollPrev")||N[O]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[y?"x":"y",l("snapType")].join(" "),gridAutoFlow:y?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[y?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[y?"scrollPaddingInline":"scrollPaddingBlock"]:x,[y?"paddingInline":"paddingBlock"]:x,[y?"overflowX":"overflowY"]:"auto"}}))},getItemProps(N){const O=r.get("slidesInView").includes(N.index);return t.element(ae(U({},Zr.item.attrs),{id:E8(u,N.index),dir:l("dir"),role:"group","data-index":N.index,"data-inview":ro(O),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":S.item(N.index,l("slideCount")),"aria-hidden":ST(!O),style:{scrollSnapAlign:(()=>{var Z;const j=(Z=N.snapAlign)!=null?Z:"start",V=l("slidesPerMove"),D=V==="auto"?Math.floor(l("slidesPerPage")):V;return(N.index+D)%D===0?j:void 0})()}}))},getControlProps(){return t.element(ae(U({},Zr.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(ae(U({},Zr.prevTrigger.attrs),{id:T8(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":S.prevTrigger,"data-orientation":l("orientation"),"aria-controls":ic(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ae(U({},Zr.nextTrigger.attrs),{dir:l("dir"),id:y8(u),type:"button","aria-label":S.nextTrigger,"data-orientation":l("orientation"),"aria-controls":ic(u),disabled:!p,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ae(U({},Zr.indicatorGroup.attrs),{dir:l("dir"),id:b8(u),"data-orientation":l("orientation"),onKeyDown(N){if(N.defaultPrevented)return;const O="indicator",j={ArrowDown(W){y||(a({type:"PAGE.NEXT",src:O}),W.preventDefault())},ArrowUp(W){y||(a({type:"PAGE.PREV",src:O}),W.preventDefault())},ArrowRight(W){y&&(a({type:"PAGE.NEXT",src:O}),W.preventDefault())},ArrowLeft(W){y&&(a({type:"PAGE.PREV",src:O}),W.preventDefault())},Home(W){a({type:"PAGE.SET",index:0,src:O}),W.preventDefault()},End(W){a({type:"PAGE.SET",index:T.length-1,src:O}),W.preventDefault()}},V=NL(N,{dir:l("dir"),orientation:l("orientation")}),D=j[V];D==null||D(N)}}))},getIndicatorProps(N){return t.button(ae(U({},Zr.indicator.attrs),{dir:l("dir"),id:Gb(u,N.index),type:"button","data-orientation":l("orientation"),"data-index":N.index,"data-readonly":ro(N.readOnly),"data-current":ro(N.index===_),"aria-label":S.indicator(N.index),onClick(O){O.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ae(U({},Zr.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":ro(d),"aria-label":d?S.autoplayStop:S.autoplayStart,onClick(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var x8={props({props:e}){return Q4(e,["slideCount"],"carousel"),ae(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:S8(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 L4(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(Rn(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=Rn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Kb(e)});return Kb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Rn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Yt(()=>{s(),Yt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return Xb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Rn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var y;const p=f.target,m=Number((y=p.dataset.index)!=null?y:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?k4(d,m):O4(d,m)},n.get("slidesInView"));n.set("slidesInView",I4(l))},{root:r,threshold:t("inViewThreshold")});return Xb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Rn(n);return r?en(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 en(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return zL(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 en(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=_T((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Rn(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=Rn(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=TT(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=P4(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Rn(r);if(!s)return;const a=p8(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=_T(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Rn(n);if(!r)return;const s=qb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Rn(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=Rn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Rn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=qb(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]);Yt(()=>{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=w8(n,e.get("page"));r&&Yt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function S8(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}fo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),fo()(["index","readOnly"]),fo()(["index","snapAlign"]);const v8=e=>{const t=P.useId(),{getRootNode:n}=rc(),{dir:r}=op(),s=U({id:t,dir:r,getRootNode:n},e),a=Vl(x8,s);return _8(a,Hh)},mp=P.forwardRef((e,t)=>{const[n,r]=Ba()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=v8(n),a=Wt(s.getRootProps(),r);return w.jsx(d8,{value:s,children:w.jsx(gn.div,ae(U({},a),{ref:t}))})});mp.displayName="CarouselRoot";const A8=180,C8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},N8=({globalClassName:e,className:t,itemMinWidth:n=A8,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((Z,re)=>({node:Z,key:P.isValidElement(Z)&&Z.key!=null?Z.key:`carousel-item-${re}`})),y=m.length,T=P.useRef(null),[_,A]=P.useState(0),{width:x}=wv();P.useLayoutEffect(()=>{T.current&&A(T.current.getBoundingClientRect().width)},[x,y]);const S=C8(r),N=n+S,O=_>0?(_+S)/N:1,j=Math.max(1,Math.floor(O));if(y===0)return null;const V=y>j,D=Math.ceil(y/j),W=V?Math.max(1,O):j;return w.jsxs(mp,{ref:T,className:M(e,t,`${k}-carousel`),slidesPerPage:W,slidesPerMove:j,spacing:r,loop:s,allowMouseDrag:a,slideCount:y,onPageChange:d,"aria-label":f,children:[w.jsx(fp,{className:M(e,`${k}-carousel__item-group`,{"carousel-row-container":!V}),children:m.map(({node:Z,key:re},z)=>w.jsx(dp,{index:z,className:M(e,`${k}-carousel__item`),children:Z},re))}),l&&V&&w.jsxs(up,{className:M(e,`${k}-carousel__control`),children:[w.jsx(pp,{className:M(e,`${k}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(Bb,{size:"16px"})}),w.jsx(hp,{className:M(e,`${k}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(Ub,{size:"16px"})})]}),u&&V&&w.jsx(cp,{className:M(e,`${k}-carousel__indicator-group`),children:Array.from({length:D},(Z,re)=>w.jsx(lp,{index:re,className:M(e,`${k}-carousel__indicator`),"aria-label":`Go to slide group ${re+1}`},re))})]})},k8=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:M(e,`${k}-close-button`),disabled:r,onClick:n,children:w.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.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"})})}),[O8,I8]=ds({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),P8=e=>Ba()(e,["lazyMount","unmountOnExit"]),[R8,Va]=ds({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Qb=P.forwardRef((e,t)=>{const n=Va(),r=I8(),s=$h(ae(U({},r),{present:n.open})),a=Wt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:w.jsx(gn.div,ae(U({},a),{ref:ql(s.ref,t)}))});Qb.displayName="DialogBackdrop";const gp=P.forwardRef((e,t)=>{const n=Va(),r=Fa(),s=Wt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(gn.div,ae(U({},s),{ref:ql(r.ref,t)}))});gp.displayName="DialogContent";const Ep=P.forwardRef((e,t)=>{const n=Va(),r=Wt(n.getDescriptionProps(),e);return w.jsx(gn.div,ae(U({},r),{ref:t}))});Ep.displayName="DialogDescription";const yp=P.forwardRef((e,t)=>{const n=Va(),r=Wt(n.getPositionerProps(),e);return Fa().unmounted?null:w.jsx(gn.div,ae(U({},r),{ref:t}))});yp.displayName="DialogPositioner";var L8=fs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),gs=L8.build(),Jb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Zb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},ew=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},bp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},wp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},tw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},sc=e=>e.getById(Tp(e)),D8=e=>e.getById(Jb(e)),M8=e=>e.getById(Zb(e)),F8=e=>e.getById(ew(e)),B8=e=>e.getById(bp(e)),U8=e=>e.getById(wp(e)),H8=e=>e.getById(tw(e));function j8(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(ae(U({},gs.trigger.attrs),{dir:a("dir"),id:ew(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Tp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ae(U({},gs.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Zb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ae(U({},gs.positioner.attrs),{dir:a("dir"),id:Jb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(ae(U({},gs.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Tp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:bp(u),"aria-describedby":f.description?wp(u):void 0}))},getTitleProps(){return t.element(ae(U({},gs.title.attrs),{dir:a("dir"),id:bp(u)}))},getDescriptionProps(){return t.element(ae(U({},gs.description.attrs),{dir:a("dir"),id:wp(u)}))},getCloseTriggerProps(){return t.button(ae(U({},gs.closeTrigger.attrs),{dir:a("dir"),id:tw(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var z8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>H8(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 Ab(()=>sc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[F8(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 Ib(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?kb(()=>sc(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")?Eb(()=>[sc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Yt(()=>{e.set("rendered",{title:!!B8(t),description:!!U8(t)})})},syncZIndex({scope:e}){Yt(()=>{const t=sc(e);if(!t)return;const n=ao(t);[D8(e),M8(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})}}}};fo()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const $8=e=>{const t=P.useId(),{getRootNode:n}=rc(),{dir:r}=op(),s=U({id:t,getRootNode:n,dir:r},e),a=Vl(z8,s);return j8(a,Hh)},nw=e=>{const[t,l]=YT(e),d=l,{children:n}=d,r=An(d,["children"]),[s]=P8(t),a=$8(r),u=$h(Wt({present:a.open},t));return w.jsx(R8,{value:a,children:w.jsx(O8,{value:s,children:w.jsx($T,{value:u,children:n})})})},rw=P.forwardRef((e,t)=>{const n=Va(),r=Wt(n.getTitleProps(),e);return w.jsx(gn.h2,ae(U({},r),{ref:t}))});rw.displayName="DialogTitle";const V8=({children:e})=>{const[t,n]=P.useState(!1),r=P.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=P.useMemo(()=>({isOpen:t}),[t]);return w.jsx(Ah.Provider,{value:r,children:w.jsx(pT.Provider,{value:s,children:e})})},iw=()=>P.useContext(pT),sw=()=>{const e=P.useContext(Ah);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},q8=`${k}-overflow-menu-button-trigger`,Y8=({componentType:e,children:t})=>{const{isOpen:n}=iw(),{closeMenu:r}=sw(),{globalClassName:s}=ft(),a=P.useRef(null);return P.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${q8}`)||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?w.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:M(`${k}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},W8=({componentType:e,className:t})=>{const{toggleMenu:n}=sw(),{isOpen:r}=iw(),{globalClassName:s}=ft();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:M(`${k}-overflow-menu-button-trigger`,`${k}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:w.jsx(Hb,{})})};class G8{constructor(){Ke(this,"initialState",rg);Ke(this,"promptsStateProxy");Ke(this,"promptsParamsProxy");Ke(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ke(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return Q8(n,r),Reflect.set(t,n,r)});Ke(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Ke(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Ke(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 xi=new G8,X8=e=>{window.addEventListener(zd,e)},K8=e=>{window.removeEventListener(zd,e)},Q8=(e,t)=>{const n=new CustomEvent(zd,{detail:{property:e,value:t}});window.dispatchEvent(n)},ow=e=>{const t=xi.isOpen,n=typeof e=="boolean"?e:!t;xi.promptsStateProxy.isOpen=n},J8=e=>{const t=xi.isInline,n=typeof e=="boolean"?e:!t;xi.promptsStateProxy.isInline=n},Z8=({elementId:e,entryType:t,params:n,isInline:r})=>{xi.promptsStateProxy.elementId=e,t&&(xi.promptsStateProxy.entryType=t),typeof r=="boolean"&&J8(r),n&&xi.updatePromptsParamsProxy(n),xi.isOpen||ow(!0)},eM=()=>{W0("resetConversation",!0,Hu.RESET_CONVERSATION)},tM=()=>{W0("endConversation",!0,Hu.END_CONVERSATION)},aw=()=>{const e=P.useContext(b1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},nM=()=>{const e=P.useContext(T1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},oc=()=>{const e=P.useContext(y1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},rM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),{previousComponentType:r}=Wr(),s=us(),a=()=>{zu(r||"dialog"),s()};return t?w.jsx(fr,{className:M(n,`${k}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(jb,{})}):w.jsxs("button",{className:M(n,`${k}-overflow-menu-button`,`${k}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(jb,{}),"Show ",r||"dialog"]})},iM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),{isModalFullscreen:r}=Wr(),s=us(),a=()=>{qd(!r),s()},u=r?KN:QN,l="Toggle Fullscreen";return t?w.jsx(fr,{ariaLabel:l,title:l,className:M(n,`${k}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:M(n,`${k}-overflow-menu-button`,`${k}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),l]})},sM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),{dialogPosition:r}=Wr(),s=us(),a=r==="bottom-left",u=()=>{Yd(a?"bottom-right":"bottom-left"),s()},l=a?a8:o8,d=a?"Move right":"Move left";return t?w.jsx(fr,{className:M(n,`${k}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(l,{})}):w.jsxs("button",{className:M(n,`${k}-overflow-menu-button`,`${k}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(l,{}),d]})},uw=({componentType:e,onClearChat:t,onEndConversation:n,onClose:r,onDownloadTranscript:s})=>{const{headerConfig:a,globalClassName:u,mode:l,enableDownloadTranscript:d}=ft(),{mode:f}=Wr(),p=l==="messaging"&&d&&!!s,m=f==="standalone",y=e==="modal",T=y?rM:cw,_=y?iM:sM,A=P.useMemo(()=>a?qN(a):{},[a]);return w.jsx(V8,{children:w.jsxs("div",{className:M(u,`${k}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:M(u,`${k}-${e}-header`,{standalone:m,embedded:!m}),style:A,children:[(a==null?void 0:a.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:M(u,`${k}-${e}-logo`,{standalone:m,embedded:!m}),src:a.logoUrl}),w.jsx(rw,{className:M(u,`${k}-${e}-title`,{standalone:m,embedded:!m}),children:a==null?void 0:a.headerText}),w.jsxs("div",{className:M(u,`${k}-${e}-controls`),children:[w.jsx(T,{componentType:e,isIcon:!0}),w.jsx(W8,{componentType:e}),w.jsx(k8,{className:M(u,`cim-${e}-component`),onClick:r})]})]}),w.jsxs(Y8,{componentType:e,children:[w.jsx(_,{componentType:e}),w.jsx(cM,{componentType:e}),w.jsx(gT,{componentType:e,onClearChat:t}),n&&w.jsx(yT,{componentType:e,onEndConversation:n}),p&&w.jsx(ET,{componentType:e,onDownloadTranscript:s})]})]})})},wo="USD",ac=(...e)=>e.flatMap(t=>t!=null?t:[]).reduce((t,n)=>{const r=n.promotionalPrice;return typeof r!="number"||!Number.isFinite(r)?t:t===void 0||r<t?r:t},void 0),ei=(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}`}},oM=({retailPrice:e,discountPrice:t,currencyCode:n=wo})=>{const r=n||wo,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:ei(a,r),comparePrice:ei(u,r),hasDiscount:s}},uc=e=>typeof e=="number"&&Number.isFinite(e),_p=({min:e,max:t,currencyCode:n=wo})=>{if(!uc(e)||!uc(t))return null;const r=n||wo,s=ei(e,r),a=ei(t,r);if(s===null||a===null)return null;const u=e!==t;return{value:u?`${s} – ${a}`:s,low:s,high:a,isRange:u}},aM=({priceBreakdown:e,currencyCode:t=wo})=>{if(!e)return null;const n=t||wo,r=[e.promotional,e.sales,e.original],s=r.map(f=>f==null?void 0:f.min).filter(uc),a=r.map(f=>f==null?void 0:f.max).filter(uc);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=_p({min:u,max:l,currencyCode:n});return d?{range:d.value,low:d.low,high:d.high}:null},xp=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=oM({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return w.jsxs("div",{className:M(s,a,`${k}-price`),style:f,children:[w.jsx("span",{className:`${k}-visually-hidden`,children:"Current price: "}),w.jsx("span",{className:M(s,`${k}-price__amount`),children:u}),d&&l&&w.jsxs("span",{className:M(s,`${k}-price__compare`),children:[w.jsx("span",{className:`${k}-visually-hidden`,children:"Original price: "}),l]})]})},uM={sparkle:ap,plus:u8,"paper-plane":l8},lw=({icon:e,className:t})=>{const n=uM[e];return n?w.jsx(n,{className:t,"aria-hidden":"true"}):null},lM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var T;const{suggestionButtonConfig:u}=ft(),l=u==null?void 0:u.icon,d=(T=u==null?void 0:u.iconPosition)!=null?T:"left",f=s?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},y=_=>w.jsxs(w.Fragment,{children:[l&&w.jsx(lw,{icon:l,className:`${k}-suggestion-button-icon`}),w.jsx("span",{children:_})]});return w.jsx("div",{className:M(t,`${k}-suggestion-container ${f}`,e),children:n.map(_=>s?w.jsx(If,{disabled:r,className:M(t,`${k}-suggestion-button standalone`,m),onClick:p(_),children:y(_)},_):w.jsx("button",{disabled:r,className:M(t,`${k}-suggestion-button embedded`,m),onClick:p(_),children:y(_)},_))})},cM=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ft();if(!r)return null;const s=()=>{Yr(!1),Fs(!0)};return t?w.jsx(fr,{className:M(n,`${k}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:w.jsx(R1,{})}):w.jsxs("button",{className:M(n,`${k}-overflow-menu-button`,`${k}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(R1,{}),"Minimize"]})},cw=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),r=us(),s=()=>{zu("modal"),r()};return t?w.jsx(fr,{className:M(n,`${k}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:w.jsx(zb,{})}):w.jsxs("button",{className:M(n,`${k}-overflow-menu-button`,`${k}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(zb,{}),"Show modal"]})};function lc(){const{sendMessage:e}=fn(),{productId:t}=aw();return P.useCallback((n,r)=>{var u;const{prompt:s,display:a}=i1(n,t);return e(s,ae(U({},r),{displayContent:(u=r==null?void 0:r.displayContent)!=null?u:a}))},[e,t])}const dM=["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"],fM=3e3,hM=400,pM=({globalClassName:e,isWidgetStandalone:t,messages:n=dM})=>{const[r,s]=P.useState(0),[a,u]=P.useState(!0);return P.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},hM)},fM);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),w.jsxs("div",{className:M(e,`${k}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[w.jsxs("div",{className:`${k}-connecting-pulse-wrapper`,children:[w.jsx("div",{className:`${k}-connecting-pulse`}),w.jsx("div",{className:`${k}-connecting-ring`})]}),w.jsx("span",{className:M(`${k}-connecting-text`,a&&`${k}-connecting-text--visible`),children:n[r]})]})},mM=({shouldShow:e,loadingText:t})=>e?w.jsx("span",{className:`${k}-processing-text`,children:t}):null,gM=({shouldShow:e})=>e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${k}-processing-shimmer-bar`}),w.jsx("div",{className:`${k}-processing-shimmer-bar`}),w.jsx("div",{className:`${k}-processing-shimmer-bar`})]}):null,Sp=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>w.jsxs("div",{className:M(e,`${k}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[w.jsx(mM,{shouldShow:!!n,loadingText:n}),w.jsx(gM,{shouldShow:!n})]});function dw(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 EM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function yM(e,t,n){const s=_l((n||{}).ignore||[]),a=TM(t);let u=-1;for(;++u<a.length;)GE(e,"text",l);function l(f,p){let m=-1,y;for(;++m<p.length;){const T=p[m],_=y?y.children:void 0;if(s(T,_?_.indexOf(T):void 0,y))return;y=T}if(y)return d(f,p)}function d(f,p){const m=p[p.length-1],y=a[u][0],T=a[u][1];let _=0;const x=m.children.indexOf(f);let S=!1,N=[];y.lastIndex=0;let O=y.exec(f.value);for(;O;){const j=O.index,V={index:O.index,input:O.input,stack:[...p,f]};let D=T(...O,V);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?y.lastIndex=j+1:(_!==j&&N.push({type:"text",value:f.value.slice(_,j)}),Array.isArray(D)?N.push(...D):D&&N.push(D),_=j+O[0].length,S=!0),!y.global)break;O=y.exec(f.value)}return S?(_<f.value.length&&N.push({type:"text",value:f.value.slice(_)}),m.children.splice(x,1,...N)):N=[f],x+N.length}}function TM(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([bM(s[0]),wM(s[1])])}return t}function bM(e){return typeof e=="string"?new RegExp(EM(e),"g"):e}function wM(e){return typeof e=="function"?e:function(){return e}}const vp="phrasing",Ap=["autolink","link","image","label"];function _M(){return{transforms:[kM],enter:{literalAutolink:SM,literalAutolinkEmail:Cp,literalAutolinkHttp:Cp,literalAutolinkWww:Cp},exit:{literalAutolink:NM,literalAutolinkEmail:CM,literalAutolinkHttp:vM,literalAutolinkWww:AM}}}function xM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vp,notInConstruct:Ap},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vp,notInConstruct:Ap},{character:":",before:"[ps]",after:"\\/",inConstruct:vp,notInConstruct:Ap}]}}function SM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Cp(e){this.config.enter.autolinkProtocol.call(this,e)}function vM(e){this.config.exit.autolinkProtocol.call(this,e)}function AM(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 CM(e){this.config.exit.autolinkEmail.call(this,e)}function NM(e){this.exit(e)}function kM(e){yM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,OM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),IM]],{ignore:["link","linkReference"]})}function OM(e,t,n,r,s){let a="";if(!fw(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!PM(n)))return!1;const u=RM(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 IM(e,t,n,r){return!fw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function PM(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 RM(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=dw(e,"(");let a=dw(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 fw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ts(n)||ml(n))&&(!t||n!==47)}hw.peek=zM;function LM(){this.buffer()}function DM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function MM(){this.buffer()}function FM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function BM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function UM(e){this.exit(e)}function HM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jM(e){this.exit(e)}function zM(){return"["}function hw(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 $M(){return{enter:{gfmFootnoteCallString:LM,gfmFootnoteCall:DM,gfmFootnoteDefinitionLabelString:MM,gfmFootnoteDefinition:FM},exit:{gfmFootnoteCallString:BM,gfmFootnoteCall:UM,gfmFootnoteDefinitionLabelString:HM,gfmFootnoteDefinition:jM}}}function VM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:hw},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?pw:qM))),f(),d}}function qM(e,t,n){return t===0?e:pw(e,t,n)}function pw(e,t,n){return(n?"":" ")+e}const YM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];mw.peek=QM;function WM(){return{canContainEols:["delete"],enter:{strikethrough:XM},exit:{strikethrough:KM}}}function GM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:YM}],handlers:{delete:mw}}}function XM(e){this.enter({type:"delete",children:[]},e)}function KM(e){this.exit(e)}function mw(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,ae(U({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function QM(){return"~"}function JM(e){return e.length}function ZM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||JM,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const A=[],x=[];let S=-1;for(e[p].length>f&&(f=e[p].length);++S<e[p].length;){const N=e9(e[p][S]);if(n.alignDelimiters!==!1){const O=s(N);x[S]=O,(d[S]===void 0||O>d[S])&&(d[S]=O)}A.push(N)}u[p]=A,l[p]=x}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=gw(r[m]);else{const A=gw(r);for(;++m<f;)a[m]=A}m=-1;const y=[],T=[];for(;++m<f;){const A=a[m];let x="",S="";A===99?(x=":",S=":"):A===108?x=":":A===114&&(S=":");let N=n.alignDelimiters===!1?1:Math.max(1,d[m]-x.length-S.length);const O=x+"-".repeat(N)+S;n.alignDelimiters!==!1&&(N=x.length+N+S.length,N>d[m]&&(d[m]=N),T[m]=N),y[m]=O}u.splice(1,0,y),l.splice(1,0,T),p=-1;const _=[];for(;++p<u.length;){const A=u[p],x=l[p];m=-1;const S=[];for(;++m<f;){const N=A[m]||"";let O="",j="";if(n.alignDelimiters!==!1){const V=d[m]-(x[m]||0),D=a[m];D===114?O=" ".repeat(V):D===99?V%2?(O=" ".repeat(V/2+.5),j=" ".repeat(V/2-.5)):(O=" ".repeat(V/2),j=O):j=" ".repeat(V)}n.delimiterStart!==!1&&!m&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||m)&&S.push(" "),n.alignDelimiters!==!1&&S.push(O),S.push(N),n.alignDelimiters!==!1&&S.push(j),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&S.push("|")}_.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return _.join(`
|
|
39
|
+
`)}function e9(e){return e==null?"":String(e)}function gw(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 t9(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()),n9);return s(),u}function n9(e,t,n){return">"+(n?"":" ")+e}function r9(e,t){return Ew(e,t.inConstruct,!0)&&!Ew(e,t.notInConstruct,!1)}function Ew(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 yw(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
40
|
+
`&&r9(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
41
|
+
`}function i9(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 s9(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 o9(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 a9(e,t,n,r){const s=o9(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(s9(e,n)){const m=n.enter("codeIndented"),y=n.indentLines(a,u9);return m(),y}const l=n.createTracker(r),d=s.repeat(Math.max(i9(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
42
|
`,encode:["`"]},l.current()))),m()}return p+=l.move(`
|
|
43
43
|
`),a&&(p+=l.move(a+`
|
|
44
|
-
`)),p+=l.move(d),f(),p}function
|
|
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
|
|
44
|
+
`)),p+=l.move(d),f(),p}function u9(e,t,n){return(n?"":" ")+e}function Np(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 l9(e,t,n,r){const s=Np(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 c9(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 qa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function cc(e,t,n){const r=Ks(e),s=Ks(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}}Tw.peek=d9;function Tw(e,t,n,r){const s=c9(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=cc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=qa(f)+d.slice(1));const m=d.charCodeAt(d.length-1),y=cc(r.after.charCodeAt(0),m,s);y.inside&&(d=d.slice(0,-1)+qa(m));const T=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},l+d+T}function d9(e,t,n){return n.options.emphasis||"*"}function f9(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,Zf}),!!((!e.depth||e.depth<3)&&zf(e)&&(t.options.setext||n))}function h9(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(f9(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),y=n.containerPhrasing(e,ae(U({},a.current()),{before:`
|
|
46
46
|
`,after:`
|
|
47
47
|
`}));return m(),p(),y+`
|
|
48
48
|
`+(s===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
49
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=qa(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}bw.peek=
|
|
50
|
+
`},a.current()));return/^[\t ]/.test(f)&&(f=qa(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}bw.peek=p9;function bw(e){return e.value||""}function p9(){return"<"}ww.peek=m9;function ww(e,t,n,r){const s=Np(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 m9(){return"!"}_w.peek=g9;function _w(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 g9(){return"!"}xw.peek=E9;function xw(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 E9(){return"`"}function Sw(e,t){const n=zf(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))}vw.peek=y9;function vw(e,t,n,r){const s=Np(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(Sw(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 y9(e,t,n){return Sw(e,n)?"<":"["}Aw.peek=T9;function Aw(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 T9(){return"["}function kp(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 b9(e){const t=kp(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 w9(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 Cw(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 _9(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?w9(n):kp(n);const l=e.ordered?u==="."?")":".":b9(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),Cw(n)===u&&p){let m=-1;for(;++m<e.children.length;){const y=e.children[m];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.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 x9(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 S9(e,t,n,r){const s=x9(n);let a=n.bulletCurrent||kp(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,y,T){return y?(T?"":" ".repeat(u))+m:(T?a:a+" ".repeat(u-a.length))+m}}function v9(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const A9=_l(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function C9(e,t,n,r){return(e.children.some(function(u){return A9(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function N9(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Nw.peek=k9;function Nw(e,t,n,r){const s=N9(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=cc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=qa(f)+d.slice(1));const m=d.charCodeAt(d.length-1),y=cc(r.after.charCodeAt(0),m,s);y.inside&&(d=d.slice(0,-1)+qa(m));const T=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},l+d+T}function k9(e,t,n){return n.options.strong||"*"}function O9(e,t,n,r){return n.safe(e.value,r)}function I9(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 P9(e,t,n){const r=(Cw(n)+(n.options.ruleSpaces?" ":"")).repeat(I9(n));return n.options.ruleSpaces?r.slice(0,-1):r}const kw={blockquote:t9,break:yw,code:a9,definition:l9,emphasis:Tw,hardBreak:yw,heading:h9,html:bw,image:ww,imageReference:_w,inlineCode:xw,link:vw,linkReference:Aw,list:_9,listItem:S9,paragraph:v9,root:C9,strong:Nw,text:O9,thematicBreak:P9};function R9(){return{enter:{table:L9,tableData:Ow,tableHeader:Ow,tableRow:M9},exit:{codeText:F9,table:D9,tableData:Op,tableHeader:Op,tableRow:Op}}}function L9(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 D9(e){this.exit(e),this.data.inTable=void 0}function M9(e){this.enter({type:"tableRow",children:[]},e)}function Op(e){this.exit(e)}function Ow(e){this.enter({type:"tableCell",children:[]},e)}function F9(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,B9));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function B9(e,t){return t==="|"?t:e}function U9(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
51
51
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:u,tableCell:d,tableRow:l}};function u(T,_,A,x){return f(p(T,A,x),T.align)}function l(T,_,A,x){const S=m(T,A,x),N=f([S]);return N.slice(0,N.indexOf(`
|
|
52
|
-
`))}function d(T,_,A,x){const S=A.enter("tableCell"),N=A.enter("phrasing"),O=A.containerPhrasing(T,ae(U({},x),{before:a,after:a}));return N(),S(),O}function f(T,_){return QM(T,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(T,_,A){const x=T.children;let S=-1;const N=[],O=_.enter("table");for(;++S<x.length;)N[S]=m(x[S],_,A);return O(),N}function m(T,_,A){const x=T.children;let S=-1;const N=[],O=_.enter("tableRow");for(;++S<x.length;)N[S]=d(x[S],T,_,A);return O(),N}function y(T,_,A){let x=kw.inlineCode(T,_,A);return A.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function B9(){return{exit:{taskListCheckValueChecked:Iw,taskListCheckValueUnchecked:Iw,paragraph:H9}}}function U9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:j9}}}function Iw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function H9(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 j9(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=kw.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 z9(){return[bM(),jM(),qM(),I9(),B9()]}function $9(e){return{extensions:[wM(),zM(e),YM(),F9(e),U9()]}}const V9={tokenize:K9,partial:!0},Pw={tokenize:Q9,partial:!0},Rw={tokenize:J9,partial:!0},Lw={tokenize:Z9,partial:!0},q9={tokenize:eF,partial:!0},Dw={name:"wwwAutolink",tokenize:G9,previous:Fw},Mw={name:"protocolAutolink",tokenize:X9,previous:Bw},ti={name:"emailAutolink",tokenize:W9,previous:Uw},Ur={};function Y9(){return{text:Ur}}let Es=48;for(;Es<123;)Ur[Es]=ti,Es++,Es===58?Es=65:Es===91&&(Es=97);Ur[43]=ti,Ur[45]=ti,Ur[46]=ti,Ur[95]=ti,Ur[72]=[ti,Mw],Ur[104]=[ti,Mw],Ur[87]=[ti,Dw],Ur[119]=[ti,Dw];function W9(e,t,n){const r=this;let s,a;return u;function u(m){return!Ip(m)||!Uw.call(r,r.previous)||Pp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return Ip(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(q9,p,f)(m):m===45||m===95||pn(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&&xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function G9(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!Fw.call(r,r.previous)||Pp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(V9,e.attempt(Pw,e.attempt(Rw,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function X9(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&Bw.call(r,r.previous)&&!Pp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(xn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const y=s.toLowerCase();if(y==="http"||y==="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||pl(m)||Tt(m)||ts(m)||ml(m)?n(m):e.attempt(Pw,e.attempt(Rw,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function K9(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 Q9(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(Lw,d,l)(f):f===null||Tt(f)||ts(f)||f!==45&&ml(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 J9(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(Lw,t,a)(u):u===null||Tt(u)||ts(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function Z9(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||Tt(l)||ts(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||Tt(l)||ts(l)?t(l):r(l)}function a(l){return xn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):xn(l)?(e.consume(l),u):n(l)}}function eF(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return pn(a)?n(a):t(a)}}function Fw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Tt(e)}function Bw(e){return!xn(e)}function Uw(e){return!(e===47||Ip(e))}function Ip(e){return e===43||e===45||e===46||e===95||pn(e)}function Pp(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 tF={tokenize:lF,partial:!0};function nF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:oF,continuation:{tokenize:aF},exit:uF}},text:{91:{name:"gfmFootnoteCall",tokenize:sF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rF,resolveTo:iF}}}}function rF(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=hr(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 iF(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 sF(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||Tt(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return s.includes(hr(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Tt(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 oF(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!l||_===null||_===91||Tt(_))return n(_);if(_===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=hr(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Tt(_)||(l=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function y(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),s.includes(a)||s.push(a),at(e,T,"gfmFootnoteDefinitionWhitespace")):n(_)}function T(_){return t(_)}}function aF(e,t,n){return e.check(Ea,t,e.attempt(tF,t,n))}function uF(e){e.exit("gfmFootnoteDefinition")}function lF(e,t,n){const r=this;return at(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 cF(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)},y=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],T=l.parser.constructs.insideSpan.null;T&&$n(y,y.length,0,gl(T,u.slice(f+1,d),l)),$n(y,y.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),$n(u,f-1,d-f+3,y),d=f+y.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 y;function y(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),T(_))}function T(_){const A=Ks(f);if(_===126)return m>1?d(_):(u.consume(_),m++,T);if(m<2&&!n)return d(_);const x=u.exit("strikethroughSequenceTemporary"),S=Ks(_);return x._open=!S||S===2&&!!A,x._close=!A||A===2&&!!S,l(_)}}}class dF{constructor(){this.map=[]}add(t,n,r){fF(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 fF(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 hF(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 pF(){return{flow:{null:{name:"table",tokenize:mF,resolveAll:gF}}}}function mF(e,t,n){const r=this;let s=0,a=0,u;return l;function l(z){let K=r.events.length-1;for(;K>-1;){const fe=r.events[K][1].type;if(fe==="lineEnding"||fe==="linePrefix")K--;else break}const oe=K>-1?r.events[K][1].type:null,de=oe==="tableHead"||oe==="tableRow"?D:d;return de===D&&r.parser.lazy[r.now().line]?n(z):de(z)}function d(z){return e.enter("tableHead"),e.enter("tableRow"),f(z)}function f(z){return z===124||(u=!0,a+=1),p(z)}function p(z){return z===null?n(z):Ve(z)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),T):n(z):it(z)?at(e,p,"whitespace")(z):(a+=1,u&&(u=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(z)))}function m(z){return z===null||z===124||Tt(z)?(e.exit("data"),p(z)):(e.consume(z),z===92?y:m)}function y(z){return z===92||z===124?(e.consume(z),m):m(z)}function T(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),u=!1,it(z)?at(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):_(z))}function _(z){return z===45||z===58?x(z):z===124?(u=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),A):V(z)}function A(z){return it(z)?at(e,x,"whitespace")(z):x(z)}function x(z){return z===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),S):z===45?(a+=1,S(z)):z===null||Ve(z)?j(z):V(z)}function S(z){return z===45?(e.enter("tableDelimiterFiller"),N(z)):V(z)}function N(z){return z===45?(e.consume(z),N):z===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),O):(e.exit("tableDelimiterFiller"),O(z))}function O(z){return it(z)?at(e,j,"whitespace")(z):j(z)}function j(z){return z===124?_(z):z===null||Ve(z)?!u||s!==a?V(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):V(z)}function V(z){return n(z)}function D(z){return e.enter("tableRow"),W(z)}function W(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),W):z===null||Ve(z)?(e.exit("tableRow"),t(z)):it(z)?at(e,W,"whitespace")(z):(e.enter("data"),Z(z))}function Z(z){return z===null||z===124||Tt(z)?(e.exit("data"),W(z)):(e.consume(z),z===92?re:Z)}function re(z){return z===92||z===124?(e.consume(z),Z):Z(z)}}function gF(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 y=new dF;for(;++n<e.length;){const T=e[n],_=T[1];T[0]==="enter"?_.type==="tableHead"?(l=!1,d!==0&&(Hw(y,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},y.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.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({},_.start),end:Object.assign({},_.end)},y.add(n,0,[["enter",p,t]])),s=_.type==="tableDelimiterRow"?2:p?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=dc(y,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=dc(y,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(l=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=dc(y,t,a,s,n,m)):u[1]!==0&&(m=dc(y,t,u,s,n,m)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&Hw(y,t,d,f,p),y.consume(t.events),n=-1;++n<t.events.length;){const T=t.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=hF(t.events,n))}return e}function dc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},_o(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=_o(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=_o(t.events,n[2]),p=_o(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 y=t.events[n[2]],T=t.events[n[3]];if(y[1].end=Object.assign({},T[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,A=n[3]-n[2]-1;e.add(_,A,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},_o(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function Hw(e,t,n,r,s){const a=[],u=_o(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 _o(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const EF={name:"tasklistCheck",tokenize:TF};function yF(){return{text:{91:EF}}}function TF(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 Tt(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 Ve(d)?t(d):it(d)?e.check({tokenize:bF},t,n)(d):n(d)}}function bF(e,t,n){return at(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function wF(e){return pE([Y9(),nF(),cF(e),pF(),yF()])}const _F={};function xF(e){const t=this,n=e||_F,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(wF(n)),a.push(z9()),u.push($9(n))}const SF=()=>w.jsx("span",{className:`${k}-blinking-cursor`,children:w.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),xo=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(sy,{remarkPlugins:[xF],rehypePlugins:[oT],components:{h1:({children:s})=>w.jsx("h1",{className:M(e,`${k}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:M(e,`${k}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:M(e,`${k}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:M(e,`${k}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:M(e,`${k}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:M(e,`${k}-li`),children:s}),a:({href:s,children:a})=>w.jsx(hT,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>w.jsx("div",{className:M(e,`${k}-table-container`),children:w.jsx("table",{className:M(e,`${k}-table`),children:s})}),thead:({children:s})=>w.jsx("thead",{className:M(e,`${k}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:M(e,`${k}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:M(e,`${k}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:M(e,`${k}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:M(e,`${k}-td`),children:s}),span:({className:s,children:a})=>s===`${k}-blinking-cursor`?w.jsx(SF,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${k}-blinking-cursor'></span>`:"")});function vF(){const{messages:e}=fn();return P.useMemo(()=>bC(e,"cart"),[e])}const So=()=>P.useContext(w1),vo=()=>{const{sendMessage:e,loading:t,isConnected:n}=fn(),{mode:r,status:s}=Wr();return P.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function AF(e){return e.includes("-")&&e===e.toLowerCase()}function Ao({tagName:e,props:t,label:n}){const r=P.useRef(null),s=P.useRef(null),a=P.useRef(e),u=P.useRef(null);return P.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!AF(e)){u.current!==e&&(u.current=e,At(!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){At(!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){At(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),P.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),w.jsx("div",{ref:r,"data-override":n||"custom"})}class CF extends P.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){At(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function NF(e){return mt({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 kF="(max-width: 576px)";function OF(e){return e?!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey:!0}function fc({event:e,openLinksInNewTab:t,isCartMgmtSupported:n=!1}={}){n||t||OF(e)&&typeof window!="undefined"&&window.matchMedia(kF).matches&&(Fs(!0),av())}const IF=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=fn();return w.jsx("div",{className:M(t,`${k}-msg-product-card__image-wrapper`),children:e?n?w.jsx("button",{type:"button",className:M(t,`${k}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:w.jsx("img",{className:M(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,onClick:f=>fc({event:f,openLinksInNewTab:s,isCartMgmtSupported:n}),children:w.jsx("img",{className:M(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):w.jsx("img",{className:M(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):w.jsx("div",{className:M(t,`${k}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:w.jsx(NF,{"aria-hidden":"true"})})})},PF=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=fn();return n?w.jsx("button",{type:"button",disabled:l,onClick:u,className:M(t,`${k}-msg-product-card__title-link`),"aria-label":a,children:e}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:M(t,`${k}-msg-product-card__title-link`),"aria-label":a,onClick:d=>fc({event:d,openLinksInNewTab:s,isCartMgmtSupported:n}),children:e}):w.jsx("p",{className:M(t,`${k}-msg-product-card__title`),children:e})},RF=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=ft(),{overrides:u,isInitialized:l}=So(),{sendMessage:d,loading:f}=fn(),p=vo(),m=l?u.ProductTile:void 0;if(m){const z={name:"ProductTile",payload:s!=null?s:{},api:p};return w.jsx(Ao,{tagName:m,props:z,label:"ProductTile"})}const{id:y,name:T,imageUrl:_,description:A,productPageUrl:x,price:S,priceBreakdown:N,discountPrice:O,listPrice:j,currencyCode:V}=e,D=O!=null?O:S,W=sM({priceBreakdown:N,currencyCode:V}),Z=()=>{if(f)return;const z=T||"this product",K=y?` [SKU: ${y}]`:"";d(`Show me details for ${z}${K}`)},re=r?`View details for ${T}`:`Go to product page for ${T}`;return w.jsxs("div",{className:M(t,`${k}-msg-product-card`),children:[w.jsx(IF,{imageUrl:_||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:x,openLinksInNewTab:n,ariaLabel:re,name:T,showInWidgetDetails:Z}),w.jsxs("div",{className:M(t,`${k}-msg-product-card__content`),children:[w.jsxs("div",{className:M(t,`${k}-msg-product-card__content-header`),children:[w.jsx(PF,{name:T||y,globalClassName:t,isCartMgmtSupported:r,productPageUrl:x,openLinksInNewTab:n,ariaLabel:re,showInWidgetDetails:Z}),a&&A&&w.jsx("div",{className:M(t,`${k}-msg-product-card__description`),title:A,children:w.jsx(xo,{globalClassName:t,text:A})})]}),w.jsx("div",{className:M(t,`${k}-msg-product-card__price-row`),children:W?w.jsx("span",{className:M(t,`${k}-msg-product-card__price`),"aria-label":`Price from ${W.low} to ${W.high}`,children:W.range}):w.jsx(xp,{globalClassName:t,retailPrice:j,discountPrice:D,currencyCode:V})})]})]})},LF=e=>{var n,r,s;const t=ac(e.data.promotions,(n=e.data.extendedData)==null?void 0:n.productPromotions);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:t!=null?t:e.data.discountPrice,listPrice:(r=e.data.listPrice)!=null?r:t===void 0?void 0:e.data.price,priceBreakdown:(s=e.data.priceBreakdown)!=null?s:void 0,currencyCode:e.data.currencyCode}},DF=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=ft(),{overrides:l,isInitialized:d}=So(),f=vo(),p=d?l.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return w.jsx(Ao,{tagName:p,props:m,label:"ProductCarousel"})}return w.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&w.jsx("p",{className:M(n,`${k}-product-carousel-title`),children:e}),w.jsx(A8,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>w.jsxs("div",{className:M(n,`${k}-product-carousel-item`),children:[w.jsx(RF,{product:LF(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&w.jsx("p",{className:M(n,`${k}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},Rp=44,MF=400,FF=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?Rp:Math.min(Math.max(Math.round(t),Rp),MF)},BF=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},UF="parentOrigin",HF=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(UF,t),n.toString()}catch(n){return e}},jF=(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}},jw=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=P.useRef(null),[s,a]=P.useState(!1),[u,l]=P.useState(Rp),d=typeof window!="undefined"?window.location.origin:"",f=HF(e,d),p=BF(e);return P.useEffect(()=>{const m=y=>{var _,A,x;if(p&&y.origin!==p||r.current&&y.source!==r.current.contentWindow)return;const T=y.data;if(!(!T||typeof T.type!="string"))switch(T.type){case"express.payment.available":a(!0),l(FF((_=T.payload)==null?void 0:_.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((x=(A=T.payload)==null?void 0:A.orderId)!=null?x:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),w.jsx("div",{className:M(t,`${k}-cart-express`,{[`${k}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:w.jsx("iframe",{ref:r,className:M(t,`${k}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},hc=({code:e,globalClassName:t,inactive:n})=>w.jsxs("span",{className:M(t,`${k}-cart-chip`,{inactive:n}),title:n?"Not applied":void 0,children:[w.jsx(M1,{"aria-hidden":"true"}),w.jsx("span",{children:e})]}),Ln=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")f=ei(u?-Math.abs(n):n,r);else if(l)f=l;else return null;return w.jsxs("div",{className:M(s,`${k}-cart-total-row`,{emphasized:a}),children:[w.jsxs("span",{className:M(s,`${k}-cart-total-label`),children:[e,t&&w.jsx("span",{className:M(s,`${k}-cart-total-badge`),children:t})]}),w.jsx("span",{className:M(s,`${k}-cart-total-value`),children:d?w.jsx("span",{className:M(s,`${k}-cart-total-shimmer`)}):f})]})};function zw(e){var a;const n=((a=e.variants)!=null?a:[]).filter(u=>u.value).map(u=>`${u.lbl}: ${u.value}`).join(", "),r=n?` (${n})`:"",s=e.productId?` [SKU: ${e.productId}]`:"";return`${e.name}${r}${s}`}function $w(e){var r;const n=((r=e.variants)!=null?r:[]).filter(s=>s.value).map(s=>s.value).join(", ");return n?`${e.name} (${n})`:e.name}function Lp(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function Dp(e){return(e!=null?e:[]).map(Lp).filter(t=>t!==null)}function Vw(e){return e&&typeof e=="object"&&typeof e.status=="string"?e.status:void 0}function zF(e,t){var s;const n=new Map;for(const a of t!=null?t:[]){const u=Lp(a),l=Vw(a);u!==null&&l!==void 0&&n.set(u.toLowerCase(),l)}const r=[];for(const a of e!=null?e:[]){const u=Lp(a);if(u===null)continue;const l=(s=Vw(a))!=null?s:n.get(u.toLowerCase());r.push({code:u,applied:l==null||l==="applied"})}return r}function qw(e,t,n){const r=new Set((e!=null?e:[]).flatMap(s=>Dp(s.coupons)).map(s=>s.toLowerCase()));return zF(t,n).filter(s=>!r.has(s.code.toLowerCase()))}const $F=({quantity:e,disabled:t,globalClassName:n,onChange:r})=>{const[s,a]=P.useState(e.toString());P.useEffect(()=>{a(e.toString())},[e]);const u=f=>{if(t)return;const p=f.target.value;/^\d*$/.test(p)&&a(p)},l=()=>{const f=parseInt(s,10);!t&&!isNaN(f)&&f>0&&f!==e?r(f):a(e.toString())},d=f=>{f.key==="Enter"&&(f.preventDefault(),l())};return w.jsx("div",{className:M(n,`${k}-cart-qty-input-wrapper`),children:w.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:M(n,`${k}-cart-qty-input`),value:s,disabled:t,onChange:u,onBlur:l,onKeyDown:d,"aria-label":"Quantity"})})},VF=({item:e,currencyCode:t,disabled:n,globalClassName:r,onRemove:s,onQuantityChange:a})=>{var d,f;const u=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,l=Dp(e.coupons);return w.jsxs("li",{className:M(r,`${k}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:M(r,`${k}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:M(r,`${k}-cart-item-details`),children:[w.jsx("p",{className:M(r,`${k}-cart-item-name`),children:e.name}),w.jsxs("div",{className:M(r,`${k}-cart-item-attrs`),children:[((d=e.variants)!=null?d:[]).map(p=>w.jsxs("p",{className:M(r,`${k}-cart-item-attr`),children:[p.lbl,": ",p.value]},`${p.type}-${p.value}`)),((f=e.promotions)!=null?f:[]).map(p=>w.jsxs("p",{className:M(r,`${k}-cart-item-attr`),children:["Promotion: ",p]},p))]}),l.length>0&&w.jsx("div",{className:M(r,`${k}-cart-chips`),children:l.map(p=>w.jsx(hc,{code:p,globalClassName:r},p))}),w.jsxs("span",{className:M(r,`${k}-cart-item-price`),children:[u&&w.jsx("span",{className:M(r,`${k}-cart-item-original-price`),children:ei(e.originalSubtotal,t)}),w.jsx("span",{className:M(r,`${k}-cart-item-final-price`),children:ei(e.itemSubtotal,t)})]}),w.jsxs("div",{className:M(r,`${k}-cart-item-footer`),children:[w.jsx("span",{className:M(r,`${k}-cart-qty-heading`),children:"Quantity"}),w.jsx($F,{quantity:e.quantity,disabled:n,globalClassName:r,onChange:p=>a(e,p)}),w.jsx("button",{type:"button",className:M(r,`${k}-cart-item-remove`),disabled:n,onClick:()=>s(e),children:"Remove"})]})]})]})},qF=({cart:e,readOnly:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s,loading:a}=fn(),[u,l]=P.useState(!1),[d,f]=P.useState(""),p=a||!!t,{items:m=[],currencyCode:y="USD",subtotal:T,total:_,taxes:A,shippingCost:x,shippingDiscount:S,shippingPromotions:N=[],promotionsDiscount:O,promotions:j=[],couponsDiscount:V,bodyMessage:D,footerMessage:W,checkoutButtonUrl:Z,expressPaymentUrl:re}=e,z=qw(m,e.couponsApplied,e.coupons),K=te=>{p||s(`Remove ${zw(te)} from my cart`,{displayContent:`Remove ${$w(te)} from cart`})},oe=te=>{s(te?`I completed express payment. Show my order confirmation for order ${te}.`:"I completed express payment. Show my order confirmation.")},de=(te,ve)=>{p||ve<1||s(`Update ${zw(te)} quantity to ${ve}`,{displayContent:`Update ${$w(te)} to qty ${ve}`})},fe=()=>{const te=d.trim();!te||p||(s(`Apply coupon code ${te}`),f(""))};return w.jsxs("div",{className:M(n,`${k}-cart`,p&&`${k}-cart-busy`),children:[w.jsxs("div",{className:M(n,`${k}-cart-box`),children:[D&&w.jsxs("button",{type:"button",className:M(n,`${k}-cart-summary`),"aria-expanded":u,onClick:()=>l(te=>!te),children:[w.jsx("span",{className:M(n,`${k}-cart-summary-text`),children:w.jsx(xo,{text:D,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1})}),w.jsx("span",{className:M(n,`${k}-cart-summary-toggle`),"aria-hidden":"true",children:u?w.jsx(L1,{}):w.jsx(D1,{})})]}),u&&w.jsxs("div",{className:M(n,`${k}-cart-expanded`),children:[w.jsxs("div",{className:M(n,`${k}-cart-items-section`),children:[w.jsx("ul",{className:M(n,`${k}-cart-items`),children:m.map(te=>w.jsx(VF,{item:te,currencyCode:y,disabled:p,globalClassName:n,onRemove:K,onQuantityChange:de},te.itemId))}),z.length>0&&w.jsx("div",{className:M(n,`${k}-cart-chips`,`${k}-cart-applied-coupons`),children:z.map(te=>w.jsx(hc,{code:te.code,inactive:!te.applied,globalClassName:n},te.code))})]}),w.jsxs("div",{className:M(n,`${k}-cart-totals`),children:[w.jsx(Ln,{label:"Subtotal",value:T,currencyCode:y,globalClassName:n,loading:!1}),w.jsx(Ln,{label:"Coupon",value:V,currencyCode:y,globalClassName:n,isDiscount:!0,loading:!1}),w.jsx(Ln,{label:"Promotions",badge:j[0],value:O,currencyCode:y,globalClassName:n,isDiscount:!0,loading:!1}),w.jsx(Ln,{label:"Shipping",value:x,currencyCode:y,globalClassName:n,fallback:"TBD",loading:!1}),w.jsx(Ln,{label:"Shipping Discount",badge:N[0],value:S,currencyCode:y,globalClassName:n,isDiscount:!0,loading:!1}),w.jsx(Ln,{label:"Tax",value:A,currencyCode:y,globalClassName:n,fallback:"TBD",loading:!1}),w.jsx(Ln,{label:"Total",value:_,currencyCode:y,globalClassName:n,emphasized:!0,loading:!1})]})]})]}),w.jsxs("div",{className:M(n,`${k}-cart-coupon`),children:[w.jsxs("div",{className:M(n,`${k}-cart-coupon-field`),children:[w.jsx("span",{className:M(n,`${k}-cart-coupon-icon`),"aria-hidden":"true",children:w.jsx(M1,{})}),w.jsx("input",{type:"text",className:M(n,`${k}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:d,disabled:p,onChange:te=>f(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),fe())}})]}),w.jsx("button",{type:"button",className:M(n,`${k}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:p||!d.trim(),onClick:fe,children:w.jsx(GN,{"aria-hidden":"true"})})]}),re&&w.jsx(jw,{expressPaymentUrl:re,globalClassName:n,onOrderComplete:oe}),Z&&w.jsxs("a",{className:M(n,`${k}-cart-checkout-button`),href:Z,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[w.jsx(YN,{"aria-hidden":"true"}),w.jsx("span",{children:"Checkout"})]}),w.jsx("p",{className:M(n,`${k}-cart-footer`),children:W||"Shipping and taxes calculated at checkout."})]})},YF=({item:e,currencyCode:t,globalClassName:n})=>{var a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,s=Dp(e.coupons);return w.jsxs("li",{className:M(n,`${k}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:M(n,`${k}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:M(n,`${k}-cart-item-details`),children:[w.jsx("p",{className:M(n,`${k}-cart-item-name`),children:e.name}),w.jsxs("div",{className:M(n,`${k}-cart-item-attrs`),children:[((a=e.variants)!=null?a:[]).map(l=>w.jsxs("p",{className:M(n,`${k}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((u=e.promotions)!=null?u:[]).map(l=>w.jsxs("p",{className:M(n,`${k}-cart-item-attr`),children:["Promotion: ",l]},l))]}),s.length>0&&w.jsx("div",{className:M(n,`${k}-cart-chips`),children:s.map(l=>w.jsx(hc,{code:l,globalClassName:n},l))}),w.jsxs("span",{className:M(n,`${k}-cart-item-price`),children:[r&&w.jsx("span",{className:M(n,`${k}-cart-item-original-price`),children:ei(e.originalSubtotal,t)}),w.jsx("span",{className:M(n,`${k}-cart-item-final-price`),children:ei(e.itemSubtotal,t)})]}),w.jsx("div",{className:M(n,`${k}-cart-item-footer`),children:w.jsxs("span",{className:M(n,`${k}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},WF=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},GF=({order:e,globalClassName:t})=>{const[n,r]=P.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:y,shippingPromotions:T=[],promotionsDiscount:_,promotions:A=[],couponsDiscount:x,bodyMessage:S,footerMessage:N}=e,O=qw(u,e.couponsApplied);return w.jsxs("div",{className:M(t,`${k}-cart`),children:[w.jsxs("div",{className:M(t,`${k}-cart-banner`),children:[w.jsx("span",{className:M(t,`${k}-cart-banner-icon`),"aria-hidden":"true",children:w.jsx(XN,{})}),w.jsx("p",{className:M(t,`${k}-cart-banner-text`),children:"Your order is confirmed!"})]}),w.jsxs("div",{className:M(t,`${k}-order-confirmation-meta`),children:[w.jsxs("span",{children:["Order No: ",s]}),w.jsxs("span",{children:["Ordered On: ",WF(a)]})]}),w.jsxs("div",{className:M(t,`${k}-cart-box`),children:[S&&w.jsxs("button",{type:"button",className:M(t,`${k}-cart-summary`),"aria-expanded":n,onClick:()=>r(j=>!j),children:[w.jsx("span",{className:M(t,`${k}-cart-summary-text`),children:w.jsx(xo,{text:S,globalClassName:t,showIsLoading:!1})}),w.jsx("span",{className:M(t,`${k}-cart-summary-toggle`),"aria-hidden":"true",children:n?w.jsx(L1,{}):w.jsx(D1,{})})]}),n&&w.jsxs("div",{className:M(t,`${k}-cart-expanded`),children:[w.jsx("ul",{className:M(t,`${k}-cart-items`),children:u.map(j=>w.jsx(YF,{item:j,currencyCode:l,globalClassName:t},j.itemId))}),O.length>0&&w.jsx("div",{className:M(t,`${k}-cart-chips`,`${k}-cart-applied-coupons`),children:O.map(j=>w.jsx(hc,{code:j.code,globalClassName:t},j.code))}),w.jsxs("div",{className:M(t,`${k}-cart-totals`),children:[w.jsx(Ln,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),w.jsx(Ln,{label:"Coupon",value:x,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Ln,{label:"Promotions",badge:A[0],value:_,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Ln,{label:"Shipping",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Ln,{label:"Shipping Discount",badge:T[0],value:y,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Ln,{label:"Tax",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Ln,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),w.jsx("p",{className:M(t,`${k}-cart-footer`),children:N||"Shipping and taxes calculated at checkout."})]})},XF=({image:e,alt:t,globalClassName:n})=>{const[r,s]=P.useState(e.src),[a,u]=P.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return w.jsx("img",{className:M(n,`${k}-pdp-gallery__image`,{[`${k}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},KF=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return w.jsxs(mp,{className:M(n,`${k}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[w.jsx(fp,{className:M(n,`${k}-pdp-gallery__item-group`),children:e.map((s,a)=>w.jsx(dp,{index:a,className:M(n,`${k}-pdp-gallery__item`),children:w.jsx(XF,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&w.jsxs(up,{className:M(n,`${k}-pdp-gallery__control`),children:[w.jsx(pp,{className:M(n,`${k}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:w.jsx(Bb,{size:"16px"})}),w.jsx(hp,{className:M(n,`${k}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:w.jsx(Ub,{size:"16px"})})]}),r&&w.jsx(cp,{className:M(n,`${k}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>w.jsx(lp,{index:a,className:M(n,`${k}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},QF="color",pc=e=>(e!=null?e:"").toLowerCase()===QF,JF=e=>e.replace(/(^|\/)large\//,"$1medium/"),Yw=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>pc(n.id)&&n.vals.includes(t)),Ww=(e,t)=>{const n=JF(t),r=Uu(e,n);return n===t?{src:r}:{src:r,fallbackSrc:Uu(e,t)}},ZF=["hi-res","large","medium","small"],Gw=(e,t)=>{var n;return((n=e.viewType)!=null?n:"").toLowerCase()===t},eB=e=>ZF.find(t=>e.some(n=>Gw(n,t))),tB=(e,t,n)=>{var s;const r=[...t?e.filter(a=>Yw(a,t)):[],...e.filter(a=>!a.vattr),...e];for(const a of r){const u=((s=a.imgs)!=null?s:[]).filter(l=>{var d;return((d=l.url)!=null?d:"").trim().length>0}).map(l=>Ww(n,l.url));if(u.length>0)return u}return[]},nB=(e,t)=>{var s;const n=(s=e.imgGroups)!=null?s:[],r=eB(n);if(r){const a=n.filter(l=>Gw(l,r)),u=tB(a,t,e.baseUrl);if(u.length>0)return u}return e.imageUrl?[Ww(e.baseUrl,e.imageUrl)]:[]},rB=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&Yw(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?Uu(e.baseUrl,r):""},iB=e=>{const t=e.vattr,n=e.vmat;if(!t||t.length===0||!n||n.length===0)return e;const r=new Set(t.map(f=>f.id)),s=[...new Set(n.flatMap(f=>Object.keys(f.vars)))];if(s.every(f=>r.has(f)))return e;const a={},u=new Set;for(const f of s){if(r.has(f)){a[f]=f,u.add(f);continue}const p=new Set(n.map(y=>y.vars[f]).filter(Boolean));if(p.size===0)continue;const m=t.filter(y=>!u.has(y.id)&&y.opts.length>0&&[...p].every(T=>y.opts.some(_=>_.val===T)));m.length===1&&(a[f]=m[0].id,u.add(m[0].id))}const l=s.filter(f=>!r.has(f)).length;return Object.keys(a).filter(f=>a[f]!==f).length<l?e:ae(U({},e),{vmat:n.map(f=>ae(U({},f),{vars:Object.fromEntries(Object.entries(f.vars).map(([p,m])=>{var y;return[(y=a[p])!=null?y:p,m]}))}))})},mc=(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})}),sB=(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]}))},oB=(e,t,n,r,s)=>{if(!e||e.length===0)return ae(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):ae(U({},s),{[n]:r})},Xw=(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},aB=(e,t)=>{var a;const n=ac(e.promotions,(a=e.extendedData)==null?void 0:a.productPromotions),r=typeof n=="number"?ae(U({},e.pr),{prom:n}):e.pr;if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return r;const s=e.vmat.find(u=>u.ord!==!1&&Object.entries(t).every(([l,d])=>{var f;return((f=u.vars)==null?void 0:f[l])===d}));return s!=null&&s.pr?s.pr:r},Mp=e=>{const t=e.filter(n=>typeof n=="number"&&Number.isFinite(n));if(t.length!==0)return{min:Math.min(...t),max:Math.max(...t)}},uB=e=>{var T,_,A;if(!((T=e.vmat)!=null&&T.length))return;const t=ac(e.promotions,(_=e.extendedData)==null?void 0:_.productPromotions),n=t===void 0?e.pr:ae(U({},e.pr),{prom:t}),r=e.vmat.filter(x=>x.ord!==!1).map(x=>{var S;return(S=x.pr)!=null?S:n}).filter(x=>x!==void 0);if(r.length===0)return;const s=Mp(r.map(x=>x.prom)),a=Mp(r.map(x=>x.cur)),u=Mp(r.map(x=>x.orig)),l=r.some(x=>typeof x.cur=="number"&&typeof x.orig=="number"&&x.cur<x.orig),d=s!=null?s:a,f=s||l?u:void 0;if(!d)return;const p=d.min!==d.max,m=f&&f.min!==f.max,y=d.min!==((A=n==null?void 0:n.prom)!=null?A:n==null?void 0:n.cur)||f!==void 0&&f.min!==(n==null?void 0:n.orig);if(!(!p&&!m&&!y))return U({active:d},f?{compare:f}:{})},Kw=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>mc(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},lB=300,cB=e=>{const{overrides:t,isInitialized:n}=So(),r=vo(),s=n?t.ProductDetailCard:void 0;if(s){const a={name:"ProductDetailCard",payload:e.product,api:r};return w.jsx(Ao,{tagName:s,props:a,label:"ProductDetailCard"})}return w.jsx(dB,U({},e))},dB=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var pt,bt,an,En,Ht,je,_t,Gt;const{addToCart:s,sendMessage:a,loading:u}=fn(),l=P.useMemo(()=>iB(e.data),[e.data]),d=(pt=l.vattr)!=null?pt:[],[f,p]=P.useState(()=>Kw(l)),[m,y]=P.useState(!1);P.useEffect(()=>{p(Kw(l)),y(!1)},[l,e.id]);const T=sB(l.vmat,f),_=(an=(bt=l.quantity)==null?void 0:bt.minQuantity)!=null?an:1,A=(Ht=(En=l.quantity)==null?void 0:En.maxQuantity)!=null?Ht:Number.POSITIVE_INFINITY,x=(_t=(je=l.quantity)==null?void 0:je.increment)!=null?_t:1,[S,N]=P.useState(_),[O,j]=P.useState(!1),V=P.useRef(!1);P.useEffect(()=>{O&&(u?V.current=!0:V.current&&(V.current=!1,j(!1)))},[O,u]);const D=d.find(Ie=>pc(Ie.id)),W=d.filter(Ie=>!pc(Ie.id)),Z=D?f[D.id]:void 0,re=P.useMemo(()=>nB(l,Z),[l,Z]),z=P.useMemo(()=>aB(l,f),[l,f]),K=P.useMemo(()=>uB(l),[l]),oe=K?_p(ae(U({},K.active),{currencyCode:l.ccy})):null,de=K!=null&&K.compare?_p(ae(U({},K.compare),{currencyCode:l.ccy})):null,fe=Xw(l,f),[te,ve]=P.useState(S),ue=P.useRef(fe),Q=ue.current===fe?te:S;P.useEffect(()=>{if(ue.current!==fe){ue.current=fe,ve(S);return}const Ie=window.setTimeout(()=>ve(S),lB);return()=>window.clearTimeout(Ie)},[S,fe]);const le=S===te,C=P.useMemo(()=>T&&(ue.current!==fe||le)?jF(l.expressPaymentUrl,fe,Q):null,[l.expressPaymentUrl,fe,Q,T,le]),F=P.useCallback(Ie=>{a(Ie?`I completed express payment. Show my order confirmation for order ${Ie}.`:"I completed express payment. Show my order confirmation.")},[a]),ee=(Ie,Qe)=>()=>{y(!0),p(ot=>{const ut=!mc(l.vmat,Ie,Qe,ot);return pc(Ie)||ut?oB(l.vmat,d,Ie,Qe,ot):ae(U({},ot),{[Ie]:Qe})})},R=()=>{if(u)return;const Ie=Xw(l,f);if(!Ie)return;const Qe=d.map(ot=>{const ut=ot.opts.find(tr=>tr.val===f[ot.id]);return ut?{label:ot.lbl||ot.id,value:ut.name||ut.val}:null}).filter(ot=>ot!==null);j(!0),s({productName:l.name,sku:Ie,quantity:S,variants:Qe})},Ce=!T||S-x<_,Re=!T||S+x>A,he=Ie=>{var ot;const Qe=f[Ie.id];return(ot=Ie.opts.find(ut=>ut.val===Qe))==null?void 0:ot.name},Se=()=>N(Ie=>Math.max(_,Ie-x)),$e=()=>N(Ie=>Math.min(A,Ie+x)),He=Ie=>w.jsxs("div",{className:M(t,`${k}-msg-pdp__variant`),children:[w.jsxs("div",{className:M(t,`${k}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Ie.id}`,className:M(t,`${k}-msg-pdp__variant-name`),children:Ie.lbl||Ie.id}),he(Ie)&&w.jsx("span",{className:M(t,`${k}-msg-pdp__variant-value`),children:he(Ie)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ie.id}`,className:M(t,`${k}-msg-pdp__chips`),children:Ie.opts.map(Qe=>{const ot=mc(l.vmat,Ie.id,Qe.val,f),ut=f[Ie.id]===Qe.val;return w.jsxs("label",{className:M(`${k}-msg-pdp__chip`,{selected:ut,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Ie.id}`,value:Qe.val,checked:ut,"aria-description":ot?void 0:"unavailable",onChange:ee(Ie.id,Qe.val),className:`${k}-msg-pdp__radio-input`}),w.jsx("span",{children:Qe.name||Qe.val})]},Qe.val)})})]},Ie.id),et=Ie=>w.jsxs("div",{className:M(t,`${k}-msg-pdp__variant`),children:[w.jsxs("div",{className:M(t,`${k}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Ie.id}`,className:M(t,`${k}-msg-pdp__variant-name`),children:Ie.lbl||"Color"}),he(Ie)&&w.jsx("span",{className:M(t,`${k}-msg-pdp__variant-value`),children:he(Ie)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ie.id}`,className:M(t,`${k}-msg-pdp__swatches`),children:Ie.opts.map(Qe=>{const ot=mc(l.vmat,Ie.id,Qe.val,f),ut=f[Ie.id]===Qe.val,tr=rB(l,Qe.val);return tr?w.jsxs("label",{className:M(`${k}-msg-pdp__swatch`,{selected:ut,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Ie.id}`,value:Qe.val,checked:ut,"aria-label":Qe.name||Qe.val,"aria-description":ot?void 0:"unavailable",onChange:ee(Ie.id,Qe.val),className:`${k}-msg-pdp__radio-input`}),w.jsx("img",{className:M(t,`${k}-msg-pdp__swatch-image`),src:tr,alt:Qe.name||Qe.val,loading:"lazy"})]},Qe.val):w.jsxs("label",{className:M(`${k}-msg-pdp__chip`,{selected:ut,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Ie.id}`,value:Qe.val,checked:ut,"aria-description":ot?void 0:"unavailable",onChange:ee(Ie.id,Qe.val),className:`${k}-msg-pdp__radio-input`}),w.jsx("span",{children:Qe.name||Qe.val})]},Qe.val)})})]});return w.jsx("div",{className:M(t,`${k}-msg-pdp`),children:w.jsxs("div",{className:M(t,`${k}-msg-pdp__card`),children:[w.jsx("div",{className:M(t,`${k}-msg-pdp__gallery`),children:w.jsx(KF,{images:re,altText:l.name,globalClassName:t})}),w.jsxs("div",{className:M(t,`${k}-msg-pdp__content`),children:[l.slugUrl?w.jsx("a",{href:l.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:M(t,`${k}-msg-pdp__title-link`),"aria-label":`Go to product page for ${l.name}`,onClick:Ie=>fc({event:Ie,openLinksInNewTab:n,isCartMgmtSupported:r}),children:l.name}):w.jsx("p",{className:M(t,`${k}-msg-pdp__title`),children:l.name}),w.jsx("div",{"aria-live":"polite","aria-atomic":"true",children:!m&&oe?w.jsxs("div",{className:M(t,`${k}-price`,`${k}-msg-pdp__price`),style:{fontSize:"14px"},children:[w.jsxs("span",{className:`${k}-visually-hidden`,children:["Current price",oe.isRange?" range":"",":"]}),w.jsx("span",{className:M(t,`${k}-price__amount`),children:oe.value}),de&&w.jsxs("span",{className:M(t,`${k}-price__compare`),children:[w.jsxs("span",{className:`${k}-visually-hidden`,children:["Original price",de.isRange?" range":"",":"]}),de.value]})]}):w.jsx(xp,{globalClassName:t,className:`${k}-msg-pdp__price`,retailPrice:z==null?void 0:z.orig,discountPrice:(Gt=z==null?void 0:z.prom)!=null?Gt:z==null?void 0:z.cur,currencyCode:l.ccy,fontSize:"14px"})}),l.dscr&&w.jsx("div",{className:M(t,`${k}-msg-pdp__description`),children:w.jsx(xo,{globalClassName:t,text:l.dscr})}),D&&et(D),W.map(He),r&&w.jsxs("div",{className:M(t,`${k}-msg-pdp__variant`),children:[w.jsxs("div",{className:M(t,`${k}-msg-pdp__variant-label`),children:[w.jsx("span",{className:M(t,`${k}-msg-pdp__variant-name`),children:"Quantity"}),w.jsx("span",{className:M(t,`${k}-msg-pdp__variant-value`),children:S})]}),w.jsxs("div",{className:M(t,`${k}-msg-pdp__stepper`),children:[w.jsx(fr,{className:`${k}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:w.jsx(BN,{}),disabled:Ce,onClick:Se}),w.jsx("span",{className:M(t,`${k}-msg-pdp__quantity`),children:S}),w.jsx(fr,{className:`${k}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:w.jsx(UN,{}),disabled:Re,onClick:$e})]})]}),r&&w.jsxs("div",{className:M(t,`${k}-msg-pdp__actions`),children:[C&&w.jsx(jw,{expressPaymentUrl:C,globalClassName:t,onOrderComplete:F},C),w.jsx(If,{className:`${k}-msg-pdp__add-to-cart`,disabled:!T||u||O,onClick:R,children:O?"Adding...":"Add to cart"})]})]})]})})},fB=({products:e,table:t,globalClassName:n,openLinksInNewTab:r})=>{const{isCartMgmtSupported:s}=ft(),{overrides:a,isInitialized:u}=So(),l=vo(),d=u?a.ProductComparison:void 0;if(d){const m={name:"ProductComparison",payload:{products:e,table:t},api:l};return w.jsx(Ao,{tagName:d,props:m,label:"ProductComparison"})}if(!e.length)return null;const f=`auto repeat(${e.length}, 1fr)`,p=`${90+e.length*140}px`;return w.jsx("div",{className:M(n,`${k}-product-comparison`),children:w.jsxs("div",{className:`${k}-product-comparison__grid`,style:{gridTemplateColumns:f,minWidth:p},children:[w.jsxs("div",{className:`${k}-product-comparison__header`,children:[w.jsx("div",{className:`${k}-product-comparison__header-spacer`}),e.map(m=>{var _,A,x,S,N,O,j;const y=m.imageUrl?Uu(m.baseUrl,m.imageUrl):void 0,T=ac(m.promotions,(_=m.extendedData)==null?void 0:_.productPromotions);return w.jsxs("div",{className:M(n,`${k}-product-comparison__product-col`),children:[y&&w.jsx("img",{className:M(n,`${k}-product-comparison__image`),src:y,alt:m.name||"Product image",loading:"eager"}),m.slugUrl?w.jsx("a",{href:m.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:M(n,`${k}-product-comparison__name`),"aria-label":`Go to product page for ${m.name}`,onClick:V=>fc({event:V,openLinksInNewTab:r,isCartMgmtSupported:s}),children:m.name}):w.jsx("span",{className:M(n,`${k}-product-comparison__name`),children:m.name}),w.jsx(xp,{globalClassName:n,retailPrice:(S=(A=m.pr)==null?void 0:A.orig)!=null?S:(x=m.pr)==null?void 0:x.cur,discountPrice:(j=T!=null?T:(N=m.pr)==null?void 0:N.prom)!=null?j:(O=m.pr)==null?void 0:O.cur,currencyCode:m.ccy,fontSize:"0.875rem"})]},m.id)})]}),w.jsx("div",{className:`${k}-product-comparison__table`,children:t.map(m=>w.jsxs("div",{className:`${k}-product-comparison__row`,children:[w.jsx("div",{className:M(n,`${k}-product-comparison__row-label`),children:m.row_name}),e.map((y,T)=>w.jsx("div",{className:M(n,`${k}-product-comparison__row-value`),children:m.values[T]},`${m.row_name}-${y.id}`))]},m.row_name))})]})})},Qw=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{loading:a}=fn(),u=lc(),l=vF(),{isCartMgmtSupported:d,logger:f}=ft(),{overrides:p,isInitialized:m}=So(),y=vo(),T=P.useMemo(()=>e.response.flatMap(df),[e.response]);return w.jsx(w.Fragment,{children:T.map((_,A)=>{var x,S,N,O,j,V,D,W,Z,re,z,K,oe,de,fe,te,ve,ue,Q,le,C,F,ee,R,Ce,Re;switch(_.type){case"markdown":{const he=(S=(x=_.data)==null?void 0:x.content)!=null?S:"";return _.index===fi&&Xg(he)?null:w.jsx(xo,{text:he,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${_.type}-${(N=_.index)!=null?N:A}`)}case"product_carousel":return w.jsx(DF,{title:(j=(O=_.data)==null?void 0:O.title)!=null?j:"",products:(D=(V=_.data)==null?void 0:V.products)!=null?D:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${_.type}-${(W=_.index)!=null?W:A}`);case"product_tile":return w.jsx(cB,{product:_.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${_.type}-${(Z=_.index)!=null?Z:A}`);case"product_comparison":return w.jsx(fB,{products:(z=(re=_.data)==null?void 0:re.products)!=null?z:[],table:(oe=(K=_.data)==null?void 0:K.table)!=null?oe:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${_.type}-${(de=_.index)!=null?de:A}`);case"cart":{const he=(ve=(te=(fe=_.data)==null?void 0:fe.cart)==null?void 0:te.cartSummary)==null?void 0:ve.cartDetails;return he?w.jsx(qF,{cart:he,productsToHighlight:_.data.products_to_highlight,readOnly:!l||t!==l,globalClassName:n,openLinksInNewTab:r},`${_.type}-${(ue=_.index)!=null?ue:A}`):null}case"order_confirmation":{const he=_.data,Se=(C=(Q=he==null?void 0:he.order)==null?void 0:Q.orderDetails)!=null?C:(le=he==null?void 0:he.data)==null?void 0:le.orderConfirmation;return Se?w.jsx(GF,{order:Se,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${_.type}-${(F=_.index)!=null?F:A}`):null}case"tool_results":{const he=_.data,Se=_.output_name,$e=m&&Se&&Object.prototype.hasOwnProperty.call(p,Se)?p[Se]:void 0,He=typeof $e=="string"?$e:void 0;if(!He||!Se)return f!=null&&f.isDevelopment&&(Se?f.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(p),payload:he}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:he})),null;const et={name:Se,payload:he,api:y};return w.jsx(CF,{overrideName:Se,children:w.jsx(Ao,{tagName:He,props:et,label:`toolResult:${Se}`})},`${_.type}-${Se}-${(ee=_.index)!=null?ee:A}`)}case"suggestions":return w.jsx("div",{style:{marginTop:"0.5rem"},children:w.jsx(aM,{disabled:a,suggestions:(Ce=(R=_.data)==null?void 0:R.display_text)!=null?Ce:[],globalClassName:n,isWidgetStandalone:s,onSuggestionClick:u})},`${_.type}-${(Re=_.index)!=null?Re:A}`);default:return null}})})};class Jw extends P.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){At(!0,"error","Message content threw during render:",t,n.componentStack)}render(){return this.state.hasError?w.jsx("p",{className:M(this.props.globalClassName,`${k}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}const hB=({message:e,globalClassName:t,isWidgetStandalone:n})=>{const{logger:r}=ft();return JC(e.content)?(r==null||r.debug("Omitting structured user message from transcript",e.content),null):w.jsx("div",{className:M(t,`${k}-message`,n?"standalone":"embedded"),children:w.jsx("div",{className:M(t,`${k}-user-message`,n?"standalone":"embedded"),children:w.jsxs("div",{className:M(t,`${k}-user-message-row`,n?"standalone":"embedded"),children:[w.jsx("span",{className:M(t,`${k}-message-icon user-message-icon`,n?"standalone":"embedded"),children:w.jsx(WN,{})}),w.jsx("p",{className:M(t,`${k}-user-message-text`,n?"standalone":"embedded"),children:e.content})]})})})},pB=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=ft(),a=P.useMemo(()=>{if(typeof e.content!="string")return null;const l=el(e.content);if(l)return l;const d=cf(e.content);return d?{response:[d]}:null},[e.content]),u=P.useMemo(()=>{var f;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 p=JSON.parse(d);if(typeof p=="object"&&p!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),(f=Yg(p))!=null?f:l}catch(p){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 w.jsx(hB,{message:e,globalClassName:t,isWidgetStandalone:r});case"agent":return w.jsx("div",{className:M(t,`${k}-message-group`,r?"standalone":"embedded"),children:w.jsx("div",{className:`${k}-message-group-child`,children:a?w.jsx(Jw,{globalClassName:t,children:w.jsx(Qw,{content:a,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):w.jsx(xo,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return w.jsx("div",{className:M(t,`${k}-message`,r?"standalone":"embedded"),children:w.jsx("p",{className:M(t,`${k}-reset-message`),children:e.content})})}},mB=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>w.jsxs("div",{className:M(n,`${k}-send-error`,r?"standalone":"embedded"),role:"alert",children:[w.jsx("span",{className:M(n,`${k}-send-error-text`),children:e}),w.jsxs("button",{type:"button",className:M(n,`${k}-retry-button`),onClick:t,children:[w.jsx(JN,{"aria-hidden":"true"})," Retry"]})]}),gB=({globalClassName:e,onClick:t})=>w.jsx("div",{className:M(e,`${k}-jump-to-latest`),children:w.jsx("button",{type:"button",className:M(e,`${k}-jump-to-latest-button`),"aria-label":"Jump to latest message",title:"Jump to latest message",onClick:t,children:w.jsx("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",children:w.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})})})}),EB=`${k}-message-container`,yB=24,TB=100,Zw=e=>{const t=e==null?void 0:e.closest(`.${EB}`);return t instanceof HTMLElement?t:null},e_=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=yB,bB=({autoScroll:e,messages:t,streamingBlocks:n,sendError:r,error:s,isOpen:a})=>{const u=P.useRef(null),l=P.useRef(null),d=P.useRef(!0),f=P.useRef(!1),p=P.useRef(null),m=P.useRef(e);m.current=e;const[y,T]=P.useState(!1),_=P.useCallback((S="smooth")=>{var O;const N=(O=l.current)!=null?O:Zw(u.current);N&&(d.current=!0,S==="smooth"&&(f.current=!0),N.scrollTo({top:N.scrollHeight,behavior:S}))},[]),A=P.useCallback(()=>{const S=l.current;if(!S){T(!1);return}T(!e_(S))},[]),x=P.useCallback(()=>{const S=l.current;if(!S){d.current=!0,T(!1);return}d.current=e_(S),A()},[A]);return P.useEffect(()=>{const S=Zw(u.current);if(l.current=S,A(),!S)return;const N=()=>{p.current&&(clearTimeout(p.current),p.current=null)},O=()=>{N(),f.current=!1,x()},j=()=>{if(!f.current){x();return}N(),p.current=setTimeout(O,TB)},V=()=>{N(),f.current=!1};S.addEventListener("scroll",j,{passive:!0}),S.addEventListener("scrollend",O),S.addEventListener("wheel",V,{passive:!0}),S.addEventListener("touchstart",V,{passive:!0});const D=new ResizeObserver(()=>{if(!f.current){if(m.current&&d.current){_();return}x()}});return D.observe(S),u.current&&D.observe(u.current),()=>{N(),S.removeEventListener("scroll",j),S.removeEventListener("scrollend",O),S.removeEventListener("wheel",V),S.removeEventListener("touchstart",V),D.disconnect()}},[_,A,x]),P.useEffect(()=>{_()},[_]),P.useEffect(()=>{a&&_("auto")},[a,_]),P.useEffect(()=>{if(e&&d.current){_();return}const S=t[t.length-1];if((S==null?void 0:S.role)==="user"){_();return}x()},[t,e,_,x]),P.useEffect(()=>{if(e&&d.current){_();return}x()},[n,r,s,e,_,x]),{endRef:u,showJumpToLatest:y,scrollToLatest:_}},wB="You are offline or we couldn't reach the assistant. Check connection and try again.",Fp=({isWidgetStandalone:e,isOpen:t})=>{var de,fe;const{globalClassName:n,openLinksInNewTab:r,logger:s,autoScroll:a}=ft(),{messages:u,streamingBlocks:l,isAgentTyping:d,loading:f,progressMessage:p,connectionStatus:m,error:y,sendError:T,retryLastMessage:_,retryConnection:A}=fn(),{endRef:x,showJumpToLatest:S,scrollToLatest:N}=bB({autoScroll:a,messages:u,streamingBlocks:l,sendError:T,error:y,isOpen:t}),O=u.length>0,j=l.some(wC),V=u[u.length-1],D=V?Gg(V.content,"suggestions"):!1,W=O&&(f||d)&&!j&&!D,Z=m==="reconnecting"&&!W,re=m==="error";let z=null;re?z={message:y!=null?y:wB,kind:"connection",onRetry:A}:T&&(z={message:T.message,kind:"send",onRetry:_});const K=(de=z==null?void 0:z.message)!=null?de:null,oe=(fe=z==null?void 0:z.kind)!=null?fe:null;return P.useEffect(()=>{K&&(s==null||s.error("Error message shown to user",{message:K,kind:oe}))},[K,oe,s]),w.jsxs(w.Fragment,{children:[f&&!O&&w.jsx(fM,{globalClassName:n,isWidgetStandalone:e}),u.map(te=>w.jsx(pB,{message:te,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:e},te.id)),z&&w.jsx(mB,{message:z.message,onRetry:z.onRetry,globalClassName:n,isWidgetStandalone:e}),j&&w.jsxs("div",{className:M(n,`${k}-message-group`,e?"standalone":"embedded"),children:[w.jsx(Jw,{globalClassName:n,children:w.jsx(Qw,{content:{response:l},globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:e})}),(f||d)&&w.jsx(Sp,{globalClassName:n,isWidgetStandalone:e})]}),W&&w.jsx(Sp,{globalClassName:n,isWidgetStandalone:e,loadingText:p}),Z&&w.jsx(Sp,{globalClassName:n,isWidgetStandalone:e,loadingText:"Reconnecting..."}),S&&w.jsx(gB,{globalClassName:n,onClick:()=>N()}),w.jsx("div",{ref:x,"aria-hidden":"true"})]})},_B=()=>w.jsxs("svg",{className:`${k}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),w.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),xB=()=>w.jsx("svg",{className:`${k}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.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"})}),SB=(e,t)=>e===0?[]:e<0?t:t.slice(-e),Bp=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=ft(),s=e!=null?e:r,{overrides:a,isInitialized:u}=So(),l=vo();if(t.length===0||s===0)return null;const d=SB(s,t),f=u?a.ProgressSteps:void 0;if(f){const p={name:"ProgressSteps",payload:{steps:d},api:l};return w.jsx(Ao,{tagName:f,props:p,label:"ProgressSteps"})}return w.jsx("div",{className:M(n,`${k}-progress-steps-panel`),children:w.jsx("div",{className:`${k}-progress-steps`,children:w.jsx("ul",{className:`${k}-progress-steps-list`,children:d.map((p,m)=>{const y=m<d.length-1,T=m===d.length-1;return w.jsxs("li",{className:M(`${k}-progress-step`,T&&"active"),children:[T&&w.jsx("span",{className:`${k}-progress-step-arc`}),w.jsx("span",{className:`${k}-progress-step-text`,children:p}),w.jsx("span",{className:M(`${k}-progress-step-icon`,y?"done":"active"),children:y?w.jsx(_B,{}):w.jsx(xB,{})})]},`${m}-${p}`)})})})})},t_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=ft(),{isAgentTyping:s,resetConversation:a,endConversation:u,progressSteps:l,downloadTranscript:d}=fn(),f=lc(),p=s,m=y=>f(y);return w.jsxs("div",{className:M(e,`${k}-container`,`${k}-embedded-chat`),style:t,children:[w.jsx("div",{className:M(e,`${k}-message-container`,`container-${n}`,"embedded"),children:w.jsx(Fp,{isWidgetStandalone:!1})}),w.jsx(Bp,{steps:l,globalClassName:e}),w.jsx(vh,{componentType:"chat",className:"embedded-chat",isLoading:p,onSubmit:m}),w.jsx("div",{className:M(`${k}-embedded-chat-menu`),children:w.jsxs(u8,{componentType:"chat",children:[w.jsx(cw,{componentType:"chat"}),w.jsx(gT,{componentType:"chat",onClearChat:a}),w.jsx(yT,{componentType:"chat",onEndConversation:u}),r&&w.jsx(ET,{componentType:"chat",onDownloadTranscript:d})]})})]})},n_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=P.useState((d=e.container)==null?void 0:d.current),a=P.useSyncExternalStore(AB,()=>!1,()=>!0),{getRootNode:u}=rc();if(P.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return w.jsx(w.Fragment,{children:t});const l=r!=null?r:vB(u);return w.jsx(w.Fragment,{children:P.Children.map(t,f=>Ys.createPortal(f,l))})},vB=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ls(n)?n:Pr(t).body},AB=()=>()=>{},r_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ft(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=Wr(),{loading:d,isAgentTyping:f,resetConversation:p,endConversation:m,progressSteps:y,downloadTranscript:T}=fn(),_=lc(),{isOpen:A}=s||{},x=!!s.isOpen,S=r==="standalone",N=f||d,O=()=>{Yr(!1)},j=V=>_(V);return x?w.jsx(nw,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:x,children:w.jsx(n_,{children:w.jsx(yp,{className:M(e,`${k}-container`,`${k}-dialog`,a,u&&"full-height"),style:U(U({},t),l&&{width:l}),children:w.jsxs(gp,{className:M(e,`${k}-dialog-content`,{standalone:S,embedded:!S}),children:[w.jsx(uw,{componentType:"dialog",onClearChat:p,onEndConversation:m,onClose:O,onDownloadTranscript:T}),w.jsx(Ep,{className:M(e,`${k}-message-container`,`container-${n}`,{standalone:S,embedded:!S}),children:w.jsx(Fp,{isWidgetStandalone:S,isOpen:A})}),w.jsx(Bp,{steps:y,globalClassName:e}),w.jsx(vh,{componentType:"dialog",isLoading:N,onSubmit:j})]})})})}):null},i_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ft(),{mode:r,status:s,isModalFullscreen:a}=Wr(),{loading:u,isAgentTyping:l,resetConversation:d,endConversation:f,progressSteps:p,downloadTranscript:m}=fn(),y=lc(),{isOpen:T}=s||{},_=!!s.isOpen,A=r==="standalone",x=l||u,S=({open:j})=>{Yr(j)},N=()=>{Yr(!1)},O=j=>y(j);return _?w.jsx(nw,{lazyMount:!0,unmountOnExit:!0,open:_,onOpenChange:S,children:w.jsx(n_,{children:w.jsxs("div",{className:M(e,`${k}-modal-container`),style:t,children:[w.jsx(Qb,{className:M(e,`${k}-modal-backdrop`)}),w.jsx(yp,{className:M(e,`${k}-container`,`${k}-modal`,{fullscreen:a,standalone:A,embedded:!A}),children:w.jsxs(gp,{className:M(e,`${k}-modal-content`,{standalone:A,embedded:!A}),children:[w.jsx(uw,{componentType:"modal",onClearChat:d,onEndConversation:f,onClose:N,onDownloadTranscript:m}),w.jsx(Ep,{className:M(e,`${k}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:w.jsx(Fp,{isWidgetStandalone:A,isOpen:T})}),w.jsx(Bp,{steps:p,globalClassName:e}),w.jsx(vh,{componentType:"modal",isLoading:x,onSubmit:O})]})})]})})}):null},CB=()=>{const e=Wr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx($N,{}):t==="dialog"?w.jsx(r_,{}):t==="modal"?w.jsx(i_,{}):w.jsx(t_,{})},NB=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=eM();P.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 W8(a),()=>{G8(a)}},[e,t,n,r,s])},s_=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function kB({isReady:e,hasError:t,transmit:n}){const r=P.useRef([]),s=P.useRef(e);s.current=e;const a=P.useRef(n);a.current=n;const u=P.useCallback((l,d)=>{s.current?s_(a.current,l,d):r.current.push({prompt:l,options:d})},[]);return P.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(({prompt:d,options:f})=>s_(a.current,d,f))}},[e]),P.useEffect(()=>{t&&(r.current=[])},[t]),u}const o_={copilot:"Ask Copilot",messaging:"Ask a question"},OB=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ft(),{placeholder:s,isResponseLoading:a}=oc(),u=s||o_[r],[l,d]=P.useState(""),f=t||a,p=m=>{const y=l.trim();y&&(m.preventDefault(),e(y),d(""))};return w.jsxs("form",{className:M(n,`${k}-prompts-input-container`),name:`${k}-prompts-form`,onSubmit:p,children:[w.jsx("label",{htmlFor:`${k}-prompts-input`,"aria-label":u,children:w.jsx(ap,{className:M(n,`${k}-prompts-input-icon`)})}),w.jsx("input",{id:`${k}-prompts-input`,className:M(n,`${k}-prompts-input`),name:`${k}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),w.jsx(fr,{className:M(n,`${k}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(Of,{}),disabled:f})]})},IB=()=>{const{globalClassName:e,mode:t}=ft(),{placeholder:n}=oc(),r=n||o_[t];return w.jsxs("div",{className:M(e,`${k}-prompts-header`),children:[w.jsx(ap,{className:M(e,`${k}-prompts-input-icon`),"aria-hidden":"true"}),w.jsx("span",{className:M(e,`${k}-prompts-header-text`),children:r})]})},a_=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:s}=ft(),a=s==null?void 0:s.icon,u=(l=s==null?void 0:s.iconPosition)!=null?l:"left";return w.jsxs("button",{className:M(r,`${k}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&w.jsx(lw,{icon:a,className:`${k}-suggestion-button-icon`}),w.jsx("span",{children:e})]})},PB="Ask me something else",RB=({label:e,disabled:t=!1})=>w.jsx(a_,{label:e||PB,disabled:t,onClick:()=>Yr(!0)}),LB=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=ft(),{staticQuestions:r,askElseButtonLabel:s,disableAskElseButton:a}=oc();if(!(r!=null&&r.length))return null;const u=l=>()=>{const d=l.trim();d&&e(d)};return w.jsxs("div",{className:M(n,`${k}-prompts-button-group`),children:[r.map(l=>w.jsx(a_,{label:l,disabled:t,onClick:u(l)},l)),!a&&w.jsx(RB,{label:s,disabled:t})]})},DB=()=>{const{globalClassName:e,themeVariables:t}=ft(),{isOpen:n,elementId:r,promptsDisplay:s}=oc(),{isConnected:a,sessionExpired:u,sendMessage:l,connectionStatus:d}=fn(),{productId:f}=aw(),p=s!=="buttons",m=s!=="input",[y,T]=P.useState(null),_=d==="error",A=d==="connecting",x=n1(a,u),S=kB({isReady:x,hasError:_,transmit:l});P.useEffect(()=>{if(!r||y)return;const O=document.getElementById(r);O&&T(O)},[r,y]);const N=P.useCallback(O=>{Yr(!0);const{prompt:j,display:V}=i1(O,f);if(V&&V.length>0){S(j,{displayContent:V});return}S(j)},[S,f]);return!n||!y?null:Ys.createPortal(w.jsxs("div",{className:M(e,`${k}-prompts-extension-container`),style:t,children:[p&&w.jsx(OB,{onSubmit:N,disabled:_}),!p&&w.jsx(IB,{}),m&&w.jsx(LB,{onPromptClick:N,disabled:_}),!_&&A&&w.jsx("p",{className:M(e,`${k}-prompts-connecting-message`),children:"Connecting to agent..."}),_&&w.jsx("p",{className:M(e,`${k}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),y)},MB=()=>(NB(),w.jsx(DB,{})),u_=e=>w.jsxs(_1,ae(U({},e),{children:[w.jsx(CB,{}),w.jsx(MB,{})]}));var gc={},l_;function FB(){if(l_)return gc;l_=1;var e=C1();return gc.createRoot=e.createRoot,gc.hydrateRoot=e.hydrateRoot,gc}var BB=FB();const c_=new WeakMap,d_=(e,t,n,r)=>{var a;(a=c_.get(e))==null||a.unmount();const s=BB.createRoot(e);c_.set(e,s),s.render(w.jsx(u_,ae(U({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},UB=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=An(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let l;const d=(p,m)=>{for(const y of p)if(y.type==="childList"&&y.addedNodes.length)for(const T of y.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(At(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(l),d_(T,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),At(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},HB=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=An(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){At(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){At(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){At(!0,"warn","Container element not found for id:",t),At(!0,"warn","Beginning observation for element"),UB(U({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}d_(l,s,n,r)};function jB(){return De(this,null,function*(){return oN().getAuthLinkKey()})}class zB extends HTMLElement{constructor(){super(...arguments);Ke(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const $B={components:{setEntryType:tg,toggleWidgetOpen:Yr,toggleWidgetMinimized:Fs,toggleModalFullscreen:qd,setWidgetType:zu,setWidgetDialogPosition:Yd,loadPromptsComponent:Q8,togglePromptsExtensionOpen:ow},session:{resetConversation:J8,endConversation:Z8}};Ue.AgentForceWidget=u_,Ue.AgentforceWidgetProvider=_1,Ue.CIMULATE_WIDGET_READY_EVENT=Z0,Ue.MessagingDialog=r_,Ue.MessagingEmbed=t_,Ue.MessagingModal=i_,Ue.MessagingProvider=o1,Ue.OverrideElement=zB,Ue.eventHandlers=$B,Ue.getAuthLinkKey=jB,Ue.injectMessagingWidget=HB,Ue.useMessaging=fn,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"})}));
|
|
52
|
+
`))}function d(T,_,A,x){const S=A.enter("tableCell"),N=A.enter("phrasing"),O=A.containerPhrasing(T,ae(U({},x),{before:a,after:a}));return N(),S(),O}function f(T,_){return ZM(T,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(T,_,A){const x=T.children;let S=-1;const N=[],O=_.enter("table");for(;++S<x.length;)N[S]=m(x[S],_,A);return O(),N}function m(T,_,A){const x=T.children;let S=-1;const N=[],O=_.enter("tableRow");for(;++S<x.length;)N[S]=d(x[S],T,_,A);return O(),N}function y(T,_,A){let x=kw.inlineCode(T,_,A);return A.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function H9(){return{exit:{taskListCheckValueChecked:Iw,taskListCheckValueUnchecked:Iw,paragraph:z9}}}function j9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:$9}}}function Iw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function z9(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 $9(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=kw.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 V9(){return[_M(),$M(),WM(),R9(),H9()]}function q9(e){return{extensions:[xM(),VM(e),GM(),U9(e),j9()]}}const Y9={tokenize:J9,partial:!0},Pw={tokenize:Z9,partial:!0},Rw={tokenize:eF,partial:!0},Lw={tokenize:tF,partial:!0},W9={tokenize:nF,partial:!0},Dw={name:"wwwAutolink",tokenize:K9,previous:Fw},Mw={name:"protocolAutolink",tokenize:Q9,previous:Bw},ti={name:"emailAutolink",tokenize:X9,previous:Uw},Ur={};function G9(){return{text:Ur}}let Es=48;for(;Es<123;)Ur[Es]=ti,Es++,Es===58?Es=65:Es===91&&(Es=97);Ur[43]=ti,Ur[45]=ti,Ur[46]=ti,Ur[95]=ti,Ur[72]=[ti,Mw],Ur[104]=[ti,Mw],Ur[87]=[ti,Dw],Ur[119]=[ti,Dw];function X9(e,t,n){const r=this;let s,a;return u;function u(m){return!Ip(m)||!Uw.call(r,r.previous)||Pp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return Ip(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(W9,p,f)(m):m===45||m===95||pn(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&&xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function K9(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!Fw.call(r,r.previous)||Pp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Y9,e.attempt(Pw,e.attempt(Rw,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function Q9(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&Bw.call(r,r.previous)&&!Pp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(xn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const y=s.toLowerCase();if(y==="http"||y==="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||pl(m)||Tt(m)||ts(m)||ml(m)?n(m):e.attempt(Pw,e.attempt(Rw,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function J9(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 Z9(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(Lw,d,l)(f):f===null||Tt(f)||ts(f)||f!==45&&ml(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 eF(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(Lw,t,a)(u):u===null||Tt(u)||ts(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function tF(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||Tt(l)||ts(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||Tt(l)||ts(l)?t(l):r(l)}function a(l){return xn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):xn(l)?(e.consume(l),u):n(l)}}function nF(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return pn(a)?n(a):t(a)}}function Fw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Tt(e)}function Bw(e){return!xn(e)}function Uw(e){return!(e===47||Ip(e))}function Ip(e){return e===43||e===45||e===46||e===95||pn(e)}function Pp(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 rF={tokenize:dF,partial:!0};function iF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:uF,continuation:{tokenize:lF},exit:cF}},text:{91:{name:"gfmFootnoteCall",tokenize:aF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sF,resolveTo:oF}}}}function sF(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=hr(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 oF(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 aF(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||Tt(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return s.includes(hr(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Tt(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 uF(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!l||_===null||_===91||Tt(_))return n(_);if(_===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=hr(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Tt(_)||(l=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function y(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),s.includes(a)||s.push(a),at(e,T,"gfmFootnoteDefinitionWhitespace")):n(_)}function T(_){return t(_)}}function lF(e,t,n){return e.check(Ea,t,e.attempt(rF,t,n))}function cF(e){e.exit("gfmFootnoteDefinition")}function dF(e,t,n){const r=this;return at(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 fF(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)},y=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],T=l.parser.constructs.insideSpan.null;T&&$n(y,y.length,0,gl(T,u.slice(f+1,d),l)),$n(y,y.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),$n(u,f-1,d-f+3,y),d=f+y.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 y;function y(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),T(_))}function T(_){const A=Ks(f);if(_===126)return m>1?d(_):(u.consume(_),m++,T);if(m<2&&!n)return d(_);const x=u.exit("strikethroughSequenceTemporary"),S=Ks(_);return x._open=!S||S===2&&!!A,x._close=!A||A===2&&!!S,l(_)}}}class hF{constructor(){this.map=[]}add(t,n,r){pF(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 pF(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 mF(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 gF(){return{flow:{null:{name:"table",tokenize:EF,resolveAll:yF}}}}function EF(e,t,n){const r=this;let s=0,a=0,u;return l;function l(z){let K=r.events.length-1;for(;K>-1;){const fe=r.events[K][1].type;if(fe==="lineEnding"||fe==="linePrefix")K--;else break}const oe=K>-1?r.events[K][1].type:null,de=oe==="tableHead"||oe==="tableRow"?D:d;return de===D&&r.parser.lazy[r.now().line]?n(z):de(z)}function d(z){return e.enter("tableHead"),e.enter("tableRow"),f(z)}function f(z){return z===124||(u=!0,a+=1),p(z)}function p(z){return z===null?n(z):Ve(z)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),T):n(z):it(z)?at(e,p,"whitespace")(z):(a+=1,u&&(u=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(z)))}function m(z){return z===null||z===124||Tt(z)?(e.exit("data"),p(z)):(e.consume(z),z===92?y:m)}function y(z){return z===92||z===124?(e.consume(z),m):m(z)}function T(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),u=!1,it(z)?at(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):_(z))}function _(z){return z===45||z===58?x(z):z===124?(u=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),A):V(z)}function A(z){return it(z)?at(e,x,"whitespace")(z):x(z)}function x(z){return z===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),S):z===45?(a+=1,S(z)):z===null||Ve(z)?j(z):V(z)}function S(z){return z===45?(e.enter("tableDelimiterFiller"),N(z)):V(z)}function N(z){return z===45?(e.consume(z),N):z===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),O):(e.exit("tableDelimiterFiller"),O(z))}function O(z){return it(z)?at(e,j,"whitespace")(z):j(z)}function j(z){return z===124?_(z):z===null||Ve(z)?!u||s!==a?V(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):V(z)}function V(z){return n(z)}function D(z){return e.enter("tableRow"),W(z)}function W(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),W):z===null||Ve(z)?(e.exit("tableRow"),t(z)):it(z)?at(e,W,"whitespace")(z):(e.enter("data"),Z(z))}function Z(z){return z===null||z===124||Tt(z)?(e.exit("data"),W(z)):(e.consume(z),z===92?re:Z)}function re(z){return z===92||z===124?(e.consume(z),Z):Z(z)}}function yF(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 y=new hF;for(;++n<e.length;){const T=e[n],_=T[1];T[0]==="enter"?_.type==="tableHead"?(l=!1,d!==0&&(Hw(y,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},y.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.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({},_.start),end:Object.assign({},_.end)},y.add(n,0,[["enter",p,t]])),s=_.type==="tableDelimiterRow"?2:p?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=dc(y,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=dc(y,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(l=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=dc(y,t,a,s,n,m)):u[1]!==0&&(m=dc(y,t,u,s,n,m)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&Hw(y,t,d,f,p),y.consume(t.events),n=-1;++n<t.events.length;){const T=t.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=mF(t.events,n))}return e}function dc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},_o(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=_o(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=_o(t.events,n[2]),p=_o(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 y=t.events[n[2]],T=t.events[n[3]];if(y[1].end=Object.assign({},T[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,A=n[3]-n[2]-1;e.add(_,A,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},_o(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function Hw(e,t,n,r,s){const a=[],u=_o(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 _o(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const TF={name:"tasklistCheck",tokenize:wF};function bF(){return{text:{91:TF}}}function wF(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 Tt(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 Ve(d)?t(d):it(d)?e.check({tokenize:_F},t,n)(d):n(d)}}function _F(e,t,n){return at(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function xF(e){return pE([G9(),iF(),fF(e),gF(),bF()])}const SF={};function vF(e){const t=this,n=e||SF,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(xF(n)),a.push(V9()),u.push(q9(n))}const AF=()=>w.jsx("span",{className:`${k}-blinking-cursor`,children:w.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),xo=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(sy,{remarkPlugins:[vF],rehypePlugins:[oT],components:{h1:({children:s})=>w.jsx("h1",{className:M(e,`${k}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:M(e,`${k}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:M(e,`${k}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:M(e,`${k}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:M(e,`${k}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:M(e,`${k}-li`),children:s}),a:({href:s,children:a})=>w.jsx(hT,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>w.jsx("div",{className:M(e,`${k}-table-container`),children:w.jsx("table",{className:M(e,`${k}-table`),children:s})}),thead:({children:s})=>w.jsx("thead",{className:M(e,`${k}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:M(e,`${k}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:M(e,`${k}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:M(e,`${k}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:M(e,`${k}-td`),children:s}),span:({className:s,children:a})=>s===`${k}-blinking-cursor`?w.jsx(AF,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${k}-blinking-cursor'></span>`:"")});function CF(){const{messages:e}=fn();return P.useMemo(()=>bC(e,"cart"),[e])}const So=()=>P.useContext(w1),vo=()=>{const{sendMessage:e,loading:t,isConnected:n}=fn(),{mode:r,status:s}=Wr();return P.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function NF(e){return e.includes("-")&&e===e.toLowerCase()}function Ao({tagName:e,props:t,label:n}){const r=P.useRef(null),s=P.useRef(null),a=P.useRef(e),u=P.useRef(null);return P.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!NF(e)){u.current!==e&&(u.current=e,At(!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){At(!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){At(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),P.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),w.jsx("div",{ref:r,"data-override":n||"custom"})}class kF extends P.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){At(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function OF(e){return mt({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 IF="(max-width: 576px)";function PF(e){return e?!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey:!0}function fc({event:e,openLinksInNewTab:t,isCartMgmtSupported:n=!1}={}){n||t||PF(e)&&typeof window!="undefined"&&window.matchMedia(IF).matches&&(Fs(!0),av())}const RF=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=fn();return w.jsx("div",{className:M(t,`${k}-msg-product-card__image-wrapper`),children:e?n?w.jsx("button",{type:"button",className:M(t,`${k}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:w.jsx("img",{className:M(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,onClick:f=>fc({event:f,openLinksInNewTab:s,isCartMgmtSupported:n}),children:w.jsx("img",{className:M(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):w.jsx("img",{className:M(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):w.jsx("div",{className:M(t,`${k}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:w.jsx(OF,{"aria-hidden":"true"})})})},LF=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=fn();return n?w.jsx("button",{type:"button",disabled:l,onClick:u,className:M(t,`${k}-msg-product-card__title-link`),"aria-label":a,children:e}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:M(t,`${k}-msg-product-card__title-link`),"aria-label":a,onClick:d=>fc({event:d,openLinksInNewTab:s,isCartMgmtSupported:n}),children:e}):w.jsx("p",{className:M(t,`${k}-msg-product-card__title`),children:e})},DF=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=ft(),{overrides:u,isInitialized:l}=So(),{sendMessage:d,loading:f}=fn(),p=vo(),m=l?u.ProductTile:void 0;if(m){const z={name:"ProductTile",payload:s!=null?s:{},api:p};return w.jsx(Ao,{tagName:m,props:z,label:"ProductTile"})}const{id:y,name:T,imageUrl:_,description:A,productPageUrl:x,price:S,priceBreakdown:N,discountPrice:O,listPrice:j,currencyCode:V}=e,D=O!=null?O:S,W=aM({priceBreakdown:N,currencyCode:V}),Z=()=>{if(f)return;const z=T||"this product",K=y?` [SKU: ${y}]`:"";d(`Show me details for ${z}${K}`)},re=r?`View details for ${T}`:`Go to product page for ${T}`;return w.jsxs("div",{className:M(t,`${k}-msg-product-card`),children:[w.jsx(RF,{imageUrl:_||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:x,openLinksInNewTab:n,ariaLabel:re,name:T,showInWidgetDetails:Z}),w.jsxs("div",{className:M(t,`${k}-msg-product-card__content`),children:[w.jsxs("div",{className:M(t,`${k}-msg-product-card__content-header`),children:[w.jsx(LF,{name:T||y,globalClassName:t,isCartMgmtSupported:r,productPageUrl:x,openLinksInNewTab:n,ariaLabel:re,showInWidgetDetails:Z}),a&&A&&w.jsx("div",{className:M(t,`${k}-msg-product-card__description`),title:A,children:w.jsx(xo,{globalClassName:t,text:A})})]}),w.jsx("div",{className:M(t,`${k}-msg-product-card__price-row`),children:W?w.jsx("span",{className:M(t,`${k}-msg-product-card__price`),"aria-label":`Price from ${W.low} to ${W.high}`,children:W.range}):w.jsx(xp,{globalClassName:t,retailPrice:j,discountPrice:D,currencyCode:V})})]})]})},MF=e=>{var n,r,s;const t=ac(e.data.promotions,(n=e.data.extendedData)==null?void 0:n.productPromotions);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:t!=null?t:e.data.discountPrice,listPrice:(r=e.data.listPrice)!=null?r:t===void 0?void 0:e.data.price,priceBreakdown:(s=e.data.priceBreakdown)!=null?s:void 0,currencyCode:e.data.currencyCode}},FF=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=ft(),{overrides:l,isInitialized:d}=So(),f=vo(),p=d?l.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return w.jsx(Ao,{tagName:p,props:m,label:"ProductCarousel"})}return w.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&w.jsx("p",{className:M(n,`${k}-product-carousel-title`),children:e}),w.jsx(N8,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>w.jsxs("div",{className:M(n,`${k}-product-carousel-item`),children:[w.jsx(DF,{product:MF(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&w.jsx("p",{className:M(n,`${k}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},Rp=44,BF=400,UF=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?Rp:Math.min(Math.max(Math.round(t),Rp),BF)},HF=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},jF="parentOrigin",zF=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(jF,t),n.toString()}catch(n){return e}},$F=(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}},jw=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=P.useRef(null),[s,a]=P.useState(!1),[u,l]=P.useState(Rp),d=typeof window!="undefined"?window.location.origin:"",f=zF(e,d),p=HF(e);return P.useEffect(()=>{const m=y=>{var _,A,x;if(p&&y.origin!==p||r.current&&y.source!==r.current.contentWindow)return;const T=y.data;if(!(!T||typeof T.type!="string"))switch(T.type){case"express.payment.available":a(!0),l(UF((_=T.payload)==null?void 0:_.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((x=(A=T.payload)==null?void 0:A.orderId)!=null?x:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),w.jsx("div",{className:M(t,`${k}-cart-express`,{[`${k}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:w.jsx("iframe",{ref:r,className:M(t,`${k}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},hc=({code:e,globalClassName:t,inactive:n})=>w.jsxs("span",{className:M(t,`${k}-cart-chip`,{inactive:n}),title:n?"Not applied":void 0,children:[w.jsx(M1,{"aria-hidden":"true"}),w.jsx("span",{children:e})]}),Ln=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")f=ei(u?-Math.abs(n):n,r);else if(l)f=l;else return null;return w.jsxs("div",{className:M(s,`${k}-cart-total-row`,{emphasized:a}),children:[w.jsxs("span",{className:M(s,`${k}-cart-total-label`),children:[e,t&&w.jsx("span",{className:M(s,`${k}-cart-total-badge`),children:t})]}),w.jsx("span",{className:M(s,`${k}-cart-total-value`),children:d?w.jsx("span",{className:M(s,`${k}-cart-total-shimmer`)}):f})]})};function zw(e){var a;const n=((a=e.variants)!=null?a:[]).filter(u=>u.value).map(u=>`${u.lbl}: ${u.value}`).join(", "),r=n?` (${n})`:"",s=e.productId?` [SKU: ${e.productId}]`:"";return`${e.name}${r}${s}`}function $w(e){var r;const n=((r=e.variants)!=null?r:[]).filter(s=>s.value).map(s=>s.value).join(", ");return n?`${e.name} (${n})`:e.name}function Lp(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function Dp(e){return(e!=null?e:[]).map(Lp).filter(t=>t!==null)}function Vw(e){return e&&typeof e=="object"&&typeof e.status=="string"?e.status:void 0}function VF(e,t){var s;const n=new Map;for(const a of t!=null?t:[]){const u=Lp(a),l=Vw(a);u!==null&&l!==void 0&&n.set(u.toLowerCase(),l)}const r=[];for(const a of e!=null?e:[]){const u=Lp(a);if(u===null)continue;const l=(s=Vw(a))!=null?s:n.get(u.toLowerCase());r.push({code:u,applied:l==null||l==="applied"})}return r}function qw(e,t,n){const r=new Set((e!=null?e:[]).flatMap(s=>Dp(s.coupons)).map(s=>s.toLowerCase()));return VF(t,n).filter(s=>!r.has(s.code.toLowerCase()))}const qF=({quantity:e,disabled:t,globalClassName:n,onChange:r})=>{const[s,a]=P.useState(e.toString());P.useEffect(()=>{a(e.toString())},[e]);const u=f=>{if(t)return;const p=f.target.value;/^\d*$/.test(p)&&a(p)},l=()=>{const f=parseInt(s,10);!t&&!isNaN(f)&&f>0&&f!==e?r(f):a(e.toString())},d=f=>{f.key==="Enter"&&(f.preventDefault(),l())};return w.jsx("div",{className:M(n,`${k}-cart-qty-input-wrapper`),children:w.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:M(n,`${k}-cart-qty-input`),value:s,disabled:t,onChange:u,onBlur:l,onKeyDown:d,"aria-label":"Quantity"})})},YF=({item:e,currencyCode:t,disabled:n,globalClassName:r,onRemove:s,onQuantityChange:a})=>{var d,f;const u=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,l=Dp(e.coupons);return w.jsxs("li",{className:M(r,`${k}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:M(r,`${k}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:M(r,`${k}-cart-item-details`),children:[w.jsx("p",{className:M(r,`${k}-cart-item-name`),children:e.name}),w.jsxs("div",{className:M(r,`${k}-cart-item-attrs`),children:[((d=e.variants)!=null?d:[]).map(p=>w.jsxs("p",{className:M(r,`${k}-cart-item-attr`),children:[p.lbl,": ",p.value]},`${p.type}-${p.value}`)),((f=e.promotions)!=null?f:[]).map(p=>w.jsxs("p",{className:M(r,`${k}-cart-item-attr`),children:["Promotion: ",p]},p))]}),l.length>0&&w.jsx("div",{className:M(r,`${k}-cart-chips`),children:l.map(p=>w.jsx(hc,{code:p,globalClassName:r},p))}),w.jsxs("span",{className:M(r,`${k}-cart-item-price`),children:[u&&w.jsx("span",{className:M(r,`${k}-cart-item-original-price`),children:ei(e.originalSubtotal,t)}),w.jsx("span",{className:M(r,`${k}-cart-item-final-price`),children:ei(e.itemSubtotal,t)})]}),w.jsxs("div",{className:M(r,`${k}-cart-item-footer`),children:[w.jsx("span",{className:M(r,`${k}-cart-qty-heading`),children:"Quantity"}),w.jsx(qF,{quantity:e.quantity,disabled:n,globalClassName:r,onChange:p=>a(e,p)}),w.jsx("button",{type:"button",className:M(r,`${k}-cart-item-remove`),disabled:n,onClick:()=>s(e),children:"Remove"})]})]})]})},WF=({cart:e,readOnly:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s,loading:a}=fn(),[u,l]=P.useState(!1),[d,f]=P.useState(""),p=a||!!t,{items:m=[],currencyCode:y="USD",subtotal:T,total:_,taxes:A,shippingCost:x,shippingDiscount:S,shippingPromotions:N=[],promotionsDiscount:O,promotions:j=[],couponsDiscount:V,bodyMessage:D,footerMessage:W,checkoutButtonUrl:Z,expressPaymentUrl:re}=e,z=qw(m,e.couponsApplied,e.coupons),K=te=>{p||s(`Remove ${zw(te)} from my cart`,{displayContent:`Remove ${$w(te)} from cart`})},oe=te=>{s(te?`I completed express payment. Show my order confirmation for order ${te}.`:"I completed express payment. Show my order confirmation.")},de=(te,ve)=>{p||ve<1||s(`Update ${zw(te)} quantity to ${ve}`,{displayContent:`Update ${$w(te)} to qty ${ve}`})},fe=()=>{const te=d.trim();!te||p||(s(`Apply coupon code ${te}`),f(""))};return w.jsxs("div",{className:M(n,`${k}-cart`,p&&`${k}-cart-busy`),children:[w.jsxs("div",{className:M(n,`${k}-cart-box`),children:[D&&w.jsxs("button",{type:"button",className:M(n,`${k}-cart-summary`),"aria-expanded":u,onClick:()=>l(te=>!te),children:[w.jsx("span",{className:M(n,`${k}-cart-summary-text`),children:w.jsx(xo,{text:D,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1})}),w.jsx("span",{className:M(n,`${k}-cart-summary-toggle`),"aria-hidden":"true",children:u?w.jsx(L1,{}):w.jsx(D1,{})})]}),u&&w.jsxs("div",{className:M(n,`${k}-cart-expanded`),children:[w.jsxs("div",{className:M(n,`${k}-cart-items-section`),children:[w.jsx("ul",{className:M(n,`${k}-cart-items`),children:m.map(te=>w.jsx(YF,{item:te,currencyCode:y,disabled:p,globalClassName:n,onRemove:K,onQuantityChange:de},te.itemId))}),z.length>0&&w.jsx("div",{className:M(n,`${k}-cart-chips`,`${k}-cart-applied-coupons`),children:z.map(te=>w.jsx(hc,{code:te.code,inactive:!te.applied,globalClassName:n},te.code))})]}),w.jsxs("div",{className:M(n,`${k}-cart-totals`),children:[w.jsx(Ln,{label:"Subtotal",value:T,currencyCode:y,globalClassName:n,loading:!1}),w.jsx(Ln,{label:"Coupon",value:V,currencyCode:y,globalClassName:n,isDiscount:!0,loading:!1}),w.jsx(Ln,{label:"Promotions",badge:j[0],value:O,currencyCode:y,globalClassName:n,isDiscount:!0,loading:!1}),w.jsx(Ln,{label:"Shipping",value:x,currencyCode:y,globalClassName:n,fallback:"TBD",loading:!1}),w.jsx(Ln,{label:"Shipping Discount",badge:N[0],value:S,currencyCode:y,globalClassName:n,isDiscount:!0,loading:!1}),w.jsx(Ln,{label:"Tax",value:A,currencyCode:y,globalClassName:n,fallback:"TBD",loading:!1}),w.jsx(Ln,{label:"Total",value:_,currencyCode:y,globalClassName:n,emphasized:!0,loading:!1})]})]})]}),w.jsxs("div",{className:M(n,`${k}-cart-coupon`),children:[w.jsxs("div",{className:M(n,`${k}-cart-coupon-field`),children:[w.jsx("span",{className:M(n,`${k}-cart-coupon-icon`),"aria-hidden":"true",children:w.jsx(M1,{})}),w.jsx("input",{type:"text",className:M(n,`${k}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:d,disabled:p,onChange:te=>f(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),fe())}})]}),w.jsx("button",{type:"button",className:M(n,`${k}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:p||!d.trim(),onClick:fe,children:w.jsx(GN,{"aria-hidden":"true"})})]}),re&&w.jsx(jw,{expressPaymentUrl:re,globalClassName:n,onOrderComplete:oe}),Z&&w.jsxs("a",{className:M(n,`${k}-cart-checkout-button`),href:Z,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[w.jsx(YN,{"aria-hidden":"true"}),w.jsx("span",{children:"Checkout"})]}),w.jsx("p",{className:M(n,`${k}-cart-footer`),children:W||"Shipping and taxes calculated at checkout."})]})},GF=({item:e,currencyCode:t,globalClassName:n})=>{var a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,s=Dp(e.coupons);return w.jsxs("li",{className:M(n,`${k}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:M(n,`${k}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:M(n,`${k}-cart-item-details`),children:[w.jsx("p",{className:M(n,`${k}-cart-item-name`),children:e.name}),w.jsxs("div",{className:M(n,`${k}-cart-item-attrs`),children:[((a=e.variants)!=null?a:[]).map(l=>w.jsxs("p",{className:M(n,`${k}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((u=e.promotions)!=null?u:[]).map(l=>w.jsxs("p",{className:M(n,`${k}-cart-item-attr`),children:["Promotion: ",l]},l))]}),s.length>0&&w.jsx("div",{className:M(n,`${k}-cart-chips`),children:s.map(l=>w.jsx(hc,{code:l,globalClassName:n},l))}),w.jsxs("span",{className:M(n,`${k}-cart-item-price`),children:[r&&w.jsx("span",{className:M(n,`${k}-cart-item-original-price`),children:ei(e.originalSubtotal,t)}),w.jsx("span",{className:M(n,`${k}-cart-item-final-price`),children:ei(e.itemSubtotal,t)})]}),w.jsx("div",{className:M(n,`${k}-cart-item-footer`),children:w.jsxs("span",{className:M(n,`${k}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},XF=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},KF=({order:e,globalClassName:t})=>{const[n,r]=P.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:y,shippingPromotions:T=[],promotionsDiscount:_,promotions:A=[],couponsDiscount:x,bodyMessage:S,footerMessage:N}=e,O=qw(u,e.couponsApplied);return w.jsxs("div",{className:M(t,`${k}-cart`),children:[w.jsxs("div",{className:M(t,`${k}-cart-banner`),children:[w.jsx("span",{className:M(t,`${k}-cart-banner-icon`),"aria-hidden":"true",children:w.jsx(XN,{})}),w.jsx("p",{className:M(t,`${k}-cart-banner-text`),children:"Your order is confirmed!"})]}),w.jsxs("div",{className:M(t,`${k}-order-confirmation-meta`),children:[w.jsxs("span",{children:["Order No: ",s]}),w.jsxs("span",{children:["Ordered On: ",XF(a)]})]}),w.jsxs("div",{className:M(t,`${k}-cart-box`),children:[S&&w.jsxs("button",{type:"button",className:M(t,`${k}-cart-summary`),"aria-expanded":n,onClick:()=>r(j=>!j),children:[w.jsx("span",{className:M(t,`${k}-cart-summary-text`),children:w.jsx(xo,{text:S,globalClassName:t,showIsLoading:!1})}),w.jsx("span",{className:M(t,`${k}-cart-summary-toggle`),"aria-hidden":"true",children:n?w.jsx(L1,{}):w.jsx(D1,{})})]}),n&&w.jsxs("div",{className:M(t,`${k}-cart-expanded`),children:[w.jsx("ul",{className:M(t,`${k}-cart-items`),children:u.map(j=>w.jsx(GF,{item:j,currencyCode:l,globalClassName:t},j.itemId))}),O.length>0&&w.jsx("div",{className:M(t,`${k}-cart-chips`,`${k}-cart-applied-coupons`),children:O.map(j=>w.jsx(hc,{code:j.code,globalClassName:t},j.code))}),w.jsxs("div",{className:M(t,`${k}-cart-totals`),children:[w.jsx(Ln,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),w.jsx(Ln,{label:"Coupon",value:x,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Ln,{label:"Promotions",badge:A[0],value:_,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Ln,{label:"Shipping",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Ln,{label:"Shipping Discount",badge:T[0],value:y,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Ln,{label:"Tax",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Ln,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),w.jsx("p",{className:M(t,`${k}-cart-footer`),children:N||"Shipping and taxes calculated at checkout."})]})},QF=({image:e,alt:t,globalClassName:n})=>{const[r,s]=P.useState(e.src),[a,u]=P.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return w.jsx("img",{className:M(n,`${k}-pdp-gallery__image`,{[`${k}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},JF=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return w.jsxs(mp,{className:M(n,`${k}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[w.jsx(fp,{className:M(n,`${k}-pdp-gallery__item-group`),children:e.map((s,a)=>w.jsx(dp,{index:a,className:M(n,`${k}-pdp-gallery__item`),children:w.jsx(QF,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&w.jsxs(up,{className:M(n,`${k}-pdp-gallery__control`),children:[w.jsx(pp,{className:M(n,`${k}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:w.jsx(Bb,{size:"16px"})}),w.jsx(hp,{className:M(n,`${k}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:w.jsx(Ub,{size:"16px"})})]}),r&&w.jsx(cp,{className:M(n,`${k}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>w.jsx(lp,{index:a,className:M(n,`${k}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},ZF="color",pc=e=>(e!=null?e:"").toLowerCase()===ZF,eB=e=>e.replace(/(^|\/)large\//,"$1medium/"),Yw=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>pc(n.id)&&n.vals.includes(t)),Ww=(e,t)=>{const n=eB(t),r=Uu(e,n);return n===t?{src:r}:{src:r,fallbackSrc:Uu(e,t)}},tB=["hi-res","large","medium","small"],Gw=(e,t)=>{var n;return((n=e.viewType)!=null?n:"").toLowerCase()===t},nB=e=>tB.find(t=>e.some(n=>Gw(n,t))),rB=(e,t,n)=>{var s;const r=[...t?e.filter(a=>Yw(a,t)):[],...e.filter(a=>!a.vattr),...e];for(const a of r){const u=((s=a.imgs)!=null?s:[]).filter(l=>{var d;return((d=l.url)!=null?d:"").trim().length>0}).map(l=>Ww(n,l.url));if(u.length>0)return u}return[]},iB=(e,t)=>{var s;const n=(s=e.imgGroups)!=null?s:[],r=nB(n);if(r){const a=n.filter(l=>Gw(l,r)),u=rB(a,t,e.baseUrl);if(u.length>0)return u}return e.imageUrl?[Ww(e.baseUrl,e.imageUrl)]:[]},sB=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&Yw(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?Uu(e.baseUrl,r):""},oB=e=>{const t=e.vattr,n=e.vmat;if(!t||t.length===0||!n||n.length===0)return e;const r=new Set(t.map(f=>f.id)),s=[...new Set(n.flatMap(f=>Object.keys(f.vars)))];if(s.every(f=>r.has(f)))return e;const a={},u=new Set;for(const f of s){if(r.has(f)){a[f]=f,u.add(f);continue}const p=new Set(n.map(y=>y.vars[f]).filter(Boolean));if(p.size===0)continue;const m=t.filter(y=>!u.has(y.id)&&y.opts.length>0&&[...p].every(T=>y.opts.some(_=>_.val===T)));m.length===1&&(a[f]=m[0].id,u.add(m[0].id))}const l=s.filter(f=>!r.has(f)).length;return Object.keys(a).filter(f=>a[f]!==f).length<l?e:ae(U({},e),{vmat:n.map(f=>ae(U({},f),{vars:Object.fromEntries(Object.entries(f.vars).map(([p,m])=>{var y;return[(y=a[p])!=null?y:p,m]}))}))})},mc=(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})}),aB=(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]}))},uB=(e,t,n,r,s)=>{if(!e||e.length===0)return ae(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):ae(U({},s),{[n]:r})},Xw=(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},lB=(e,t)=>{var a;const n=ac(e.promotions,(a=e.extendedData)==null?void 0:a.productPromotions),r=typeof n=="number"?ae(U({},e.pr),{prom:n}):e.pr;if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return r;const s=e.vmat.find(u=>u.ord!==!1&&Object.entries(t).every(([l,d])=>{var f;return((f=u.vars)==null?void 0:f[l])===d}));return s!=null&&s.pr?s.pr:r},Mp=e=>{const t=e.filter(n=>typeof n=="number"&&Number.isFinite(n));if(t.length!==0)return{min:Math.min(...t),max:Math.max(...t)}},cB=e=>{var T,_,A;if(!((T=e.vmat)!=null&&T.length))return;const t=ac(e.promotions,(_=e.extendedData)==null?void 0:_.productPromotions),n=t===void 0?e.pr:ae(U({},e.pr),{prom:t}),r=e.vmat.filter(x=>x.ord!==!1).map(x=>{var S;return(S=x.pr)!=null?S:n}).filter(x=>x!==void 0);if(r.length===0)return;const s=Mp(r.map(x=>x.prom)),a=Mp(r.map(x=>x.cur)),u=Mp(r.map(x=>x.orig)),l=r.some(x=>typeof x.cur=="number"&&typeof x.orig=="number"&&x.cur<x.orig),d=s!=null?s:a,f=s||l?u:void 0;if(!d)return;const p=d.min!==d.max,m=f&&f.min!==f.max,y=d.min!==((A=n==null?void 0:n.prom)!=null?A:n==null?void 0:n.cur)||f!==void 0&&f.min!==(n==null?void 0:n.orig);if(!(!p&&!m&&!y))return U({active:d},f?{compare:f}:{})},Kw=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>mc(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},dB=300,fB=e=>{const{overrides:t,isInitialized:n}=So(),r=vo(),s=n?t.ProductDetailCard:void 0;if(s){const a={name:"ProductDetailCard",payload:e.product,api:r};return w.jsx(Ao,{tagName:s,props:a,label:"ProductDetailCard"})}return w.jsx(hB,U({},e))},hB=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var pt,bt,an,En,Ht,je,_t,Gt;const{addToCart:s,sendMessage:a,loading:u}=fn(),l=P.useMemo(()=>oB(e.data),[e.data]),d=(pt=l.vattr)!=null?pt:[],[f,p]=P.useState(()=>Kw(l)),[m,y]=P.useState(!1);P.useEffect(()=>{p(Kw(l)),y(!1)},[l,e.id]);const T=aB(l.vmat,f),_=(an=(bt=l.quantity)==null?void 0:bt.minQuantity)!=null?an:1,A=(Ht=(En=l.quantity)==null?void 0:En.maxQuantity)!=null?Ht:Number.POSITIVE_INFINITY,x=(_t=(je=l.quantity)==null?void 0:je.increment)!=null?_t:1,[S,N]=P.useState(_),[O,j]=P.useState(!1),V=P.useRef(!1);P.useEffect(()=>{O&&(u?V.current=!0:V.current&&(V.current=!1,j(!1)))},[O,u]);const D=d.find(Ie=>pc(Ie.id)),W=d.filter(Ie=>!pc(Ie.id)),Z=D?f[D.id]:void 0,re=P.useMemo(()=>iB(l,Z),[l,Z]),z=P.useMemo(()=>lB(l,f),[l,f]),K=P.useMemo(()=>cB(l),[l]),oe=K?_p(ae(U({},K.active),{currencyCode:l.ccy})):null,de=K!=null&&K.compare?_p(ae(U({},K.compare),{currencyCode:l.ccy})):null,fe=Xw(l,f),[te,ve]=P.useState(S),ue=P.useRef(fe),Q=ue.current===fe?te:S;P.useEffect(()=>{if(ue.current!==fe){ue.current=fe,ve(S);return}const Ie=window.setTimeout(()=>ve(S),dB);return()=>window.clearTimeout(Ie)},[S,fe]);const le=S===te,C=P.useMemo(()=>T&&(ue.current!==fe||le)?$F(l.expressPaymentUrl,fe,Q):null,[l.expressPaymentUrl,fe,Q,T,le]),F=P.useCallback(Ie=>{a(Ie?`I completed express payment. Show my order confirmation for order ${Ie}.`:"I completed express payment. Show my order confirmation.")},[a]),ee=(Ie,Qe)=>()=>{y(!0),p(ot=>{const ut=!mc(l.vmat,Ie,Qe,ot);return pc(Ie)||ut?uB(l.vmat,d,Ie,Qe,ot):ae(U({},ot),{[Ie]:Qe})})},R=()=>{if(u)return;const Ie=Xw(l,f);if(!Ie)return;const Qe=d.map(ot=>{const ut=ot.opts.find(tr=>tr.val===f[ot.id]);return ut?{label:ot.lbl||ot.id,value:ut.name||ut.val}:null}).filter(ot=>ot!==null);j(!0),s({productName:l.name,sku:Ie,quantity:S,variants:Qe})},Ce=!T||S-x<_,Re=!T||S+x>A,he=Ie=>{var ot;const Qe=f[Ie.id];return(ot=Ie.opts.find(ut=>ut.val===Qe))==null?void 0:ot.name},Se=()=>N(Ie=>Math.max(_,Ie-x)),$e=()=>N(Ie=>Math.min(A,Ie+x)),He=Ie=>w.jsxs("div",{className:M(t,`${k}-msg-pdp__variant`),children:[w.jsxs("div",{className:M(t,`${k}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Ie.id}`,className:M(t,`${k}-msg-pdp__variant-name`),children:Ie.lbl||Ie.id}),he(Ie)&&w.jsx("span",{className:M(t,`${k}-msg-pdp__variant-value`),children:he(Ie)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ie.id}`,className:M(t,`${k}-msg-pdp__chips`),children:Ie.opts.map(Qe=>{const ot=mc(l.vmat,Ie.id,Qe.val,f),ut=f[Ie.id]===Qe.val;return w.jsxs("label",{className:M(`${k}-msg-pdp__chip`,{selected:ut,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Ie.id}`,value:Qe.val,checked:ut,"aria-description":ot?void 0:"unavailable",onChange:ee(Ie.id,Qe.val),className:`${k}-msg-pdp__radio-input`}),w.jsx("span",{children:Qe.name||Qe.val})]},Qe.val)})})]},Ie.id),et=Ie=>w.jsxs("div",{className:M(t,`${k}-msg-pdp__variant`),children:[w.jsxs("div",{className:M(t,`${k}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Ie.id}`,className:M(t,`${k}-msg-pdp__variant-name`),children:Ie.lbl||"Color"}),he(Ie)&&w.jsx("span",{className:M(t,`${k}-msg-pdp__variant-value`),children:he(Ie)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ie.id}`,className:M(t,`${k}-msg-pdp__swatches`),children:Ie.opts.map(Qe=>{const ot=mc(l.vmat,Ie.id,Qe.val,f),ut=f[Ie.id]===Qe.val,tr=sB(l,Qe.val);return tr?w.jsxs("label",{className:M(`${k}-msg-pdp__swatch`,{selected:ut,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Ie.id}`,value:Qe.val,checked:ut,"aria-label":Qe.name||Qe.val,"aria-description":ot?void 0:"unavailable",onChange:ee(Ie.id,Qe.val),className:`${k}-msg-pdp__radio-input`}),w.jsx("img",{className:M(t,`${k}-msg-pdp__swatch-image`),src:tr,alt:Qe.name||Qe.val,loading:"lazy"})]},Qe.val):w.jsxs("label",{className:M(`${k}-msg-pdp__chip`,{selected:ut,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Ie.id}`,value:Qe.val,checked:ut,"aria-description":ot?void 0:"unavailable",onChange:ee(Ie.id,Qe.val),className:`${k}-msg-pdp__radio-input`}),w.jsx("span",{children:Qe.name||Qe.val})]},Qe.val)})})]});return w.jsx("div",{className:M(t,`${k}-msg-pdp`),children:w.jsxs("div",{className:M(t,`${k}-msg-pdp__card`),children:[w.jsx("div",{className:M(t,`${k}-msg-pdp__gallery`),children:w.jsx(JF,{images:re,altText:l.name,globalClassName:t})}),w.jsxs("div",{className:M(t,`${k}-msg-pdp__content`),children:[l.slugUrl?w.jsx("a",{href:l.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:M(t,`${k}-msg-pdp__title-link`),"aria-label":`Go to product page for ${l.name}`,onClick:Ie=>fc({event:Ie,openLinksInNewTab:n,isCartMgmtSupported:r}),children:l.name}):w.jsx("p",{className:M(t,`${k}-msg-pdp__title`),children:l.name}),w.jsx("div",{"aria-live":"polite","aria-atomic":"true",children:!m&&oe?w.jsxs("div",{className:M(t,`${k}-price`,`${k}-msg-pdp__price`),style:{fontSize:"14px"},children:[w.jsxs("span",{className:`${k}-visually-hidden`,children:["Current price",oe.isRange?" range":"",":"]}),w.jsx("span",{className:M(t,`${k}-price__amount`),children:oe.value}),de&&w.jsxs("span",{className:M(t,`${k}-price__compare`),children:[w.jsxs("span",{className:`${k}-visually-hidden`,children:["Original price",de.isRange?" range":"",":"]}),de.value]})]}):w.jsx(xp,{globalClassName:t,className:`${k}-msg-pdp__price`,retailPrice:z==null?void 0:z.orig,discountPrice:(Gt=z==null?void 0:z.prom)!=null?Gt:z==null?void 0:z.cur,currencyCode:l.ccy,fontSize:"14px"})}),l.dscr&&w.jsx("div",{className:M(t,`${k}-msg-pdp__description`),children:w.jsx(xo,{globalClassName:t,text:l.dscr})}),D&&et(D),W.map(He),r&&w.jsxs("div",{className:M(t,`${k}-msg-pdp__variant`),children:[w.jsxs("div",{className:M(t,`${k}-msg-pdp__variant-label`),children:[w.jsx("span",{className:M(t,`${k}-msg-pdp__variant-name`),children:"Quantity"}),w.jsx("span",{className:M(t,`${k}-msg-pdp__variant-value`),children:S})]}),w.jsxs("div",{className:M(t,`${k}-msg-pdp__stepper`),children:[w.jsx(fr,{className:`${k}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:w.jsx(BN,{}),disabled:Ce,onClick:Se}),w.jsx("span",{className:M(t,`${k}-msg-pdp__quantity`),children:S}),w.jsx(fr,{className:`${k}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:w.jsx(UN,{}),disabled:Re,onClick:$e})]})]}),r&&w.jsxs("div",{className:M(t,`${k}-msg-pdp__actions`),children:[C&&w.jsx(jw,{expressPaymentUrl:C,globalClassName:t,onOrderComplete:F},C),w.jsx(If,{className:`${k}-msg-pdp__add-to-cart`,disabled:!T||u||O,onClick:R,children:O?"Adding...":"Add to cart"})]})]})]})})},pB=({products:e,table:t,globalClassName:n,openLinksInNewTab:r})=>{const{isCartMgmtSupported:s}=ft(),{overrides:a,isInitialized:u}=So(),l=vo(),d=u?a.ProductComparison:void 0;if(d){const m={name:"ProductComparison",payload:{products:e,table:t},api:l};return w.jsx(Ao,{tagName:d,props:m,label:"ProductComparison"})}if(!e.length)return null;const f=`auto repeat(${e.length}, 1fr)`,p=`${90+e.length*140}px`;return w.jsx("div",{className:M(n,`${k}-product-comparison`),children:w.jsxs("div",{className:`${k}-product-comparison__grid`,style:{gridTemplateColumns:f,minWidth:p},children:[w.jsxs("div",{className:`${k}-product-comparison__header`,children:[w.jsx("div",{className:`${k}-product-comparison__header-spacer`}),e.map(m=>{var _,A,x,S,N,O,j;const y=m.imageUrl?Uu(m.baseUrl,m.imageUrl):void 0,T=ac(m.promotions,(_=m.extendedData)==null?void 0:_.productPromotions);return w.jsxs("div",{className:M(n,`${k}-product-comparison__product-col`),children:[y&&w.jsx("img",{className:M(n,`${k}-product-comparison__image`),src:y,alt:m.name||"Product image",loading:"eager"}),m.slugUrl?w.jsx("a",{href:m.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:M(n,`${k}-product-comparison__name`),"aria-label":`Go to product page for ${m.name}`,onClick:V=>fc({event:V,openLinksInNewTab:r,isCartMgmtSupported:s}),children:m.name}):w.jsx("span",{className:M(n,`${k}-product-comparison__name`),children:m.name}),w.jsx(xp,{globalClassName:n,retailPrice:(S=(A=m.pr)==null?void 0:A.orig)!=null?S:(x=m.pr)==null?void 0:x.cur,discountPrice:(j=T!=null?T:(N=m.pr)==null?void 0:N.prom)!=null?j:(O=m.pr)==null?void 0:O.cur,currencyCode:m.ccy,fontSize:"0.875rem"})]},m.id)})]}),w.jsx("div",{className:`${k}-product-comparison__table`,children:t.map(m=>w.jsxs("div",{className:`${k}-product-comparison__row`,children:[w.jsx("div",{className:M(n,`${k}-product-comparison__row-label`),children:m.row_name}),e.map((y,T)=>w.jsx("div",{className:M(n,`${k}-product-comparison__row-value`),children:m.values[T]},`${m.row_name}-${y.id}`))]},m.row_name))})]})})},Qw=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{loading:a}=fn(),u=lc(),l=CF(),{isCartMgmtSupported:d,logger:f}=ft(),{overrides:p,isInitialized:m}=So(),y=vo(),T=P.useMemo(()=>e.response.flatMap(df),[e.response]);return w.jsx(w.Fragment,{children:T.map((_,A)=>{var x,S,N,O,j,V,D,W,Z,re,z,K,oe,de,fe,te,ve,ue,Q,le,C,F,ee,R,Ce,Re;switch(_.type){case"markdown":{const he=(S=(x=_.data)==null?void 0:x.content)!=null?S:"";return _.index===fi&&Xg(he)?null:w.jsx(xo,{text:he,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${_.type}-${(N=_.index)!=null?N:A}`)}case"product_carousel":return w.jsx(FF,{title:(j=(O=_.data)==null?void 0:O.title)!=null?j:"",products:(D=(V=_.data)==null?void 0:V.products)!=null?D:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${_.type}-${(W=_.index)!=null?W:A}`);case"product_tile":return w.jsx(fB,{product:_.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${_.type}-${(Z=_.index)!=null?Z:A}`);case"product_comparison":return w.jsx(pB,{products:(z=(re=_.data)==null?void 0:re.products)!=null?z:[],table:(oe=(K=_.data)==null?void 0:K.table)!=null?oe:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${_.type}-${(de=_.index)!=null?de:A}`);case"cart":{const he=(ve=(te=(fe=_.data)==null?void 0:fe.cart)==null?void 0:te.cartSummary)==null?void 0:ve.cartDetails;return he?w.jsx(WF,{cart:he,productsToHighlight:_.data.products_to_highlight,readOnly:!l||t!==l,globalClassName:n,openLinksInNewTab:r},`${_.type}-${(ue=_.index)!=null?ue:A}`):null}case"order_confirmation":{const he=_.data,Se=(C=(Q=he==null?void 0:he.order)==null?void 0:Q.orderDetails)!=null?C:(le=he==null?void 0:he.data)==null?void 0:le.orderConfirmation;return Se?w.jsx(KF,{order:Se,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${_.type}-${(F=_.index)!=null?F:A}`):null}case"tool_results":{const he=_.data,Se=_.output_name,$e=m&&Se&&Object.prototype.hasOwnProperty.call(p,Se)?p[Se]:void 0,He=typeof $e=="string"?$e:void 0;if(!He||!Se)return f!=null&&f.isDevelopment&&(Se?f.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(p),payload:he}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:he})),null;const et={name:Se,payload:he,api:y};return w.jsx(kF,{overrideName:Se,children:w.jsx(Ao,{tagName:He,props:et,label:`toolResult:${Se}`})},`${_.type}-${Se}-${(ee=_.index)!=null?ee:A}`)}case"suggestions":return w.jsx("div",{style:{marginTop:"0.5rem"},children:w.jsx(lM,{disabled:a,suggestions:(Ce=(R=_.data)==null?void 0:R.display_text)!=null?Ce:[],globalClassName:n,isWidgetStandalone:s,onSuggestionClick:u})},`${_.type}-${(Re=_.index)!=null?Re:A}`);default:return null}})})};class Jw extends P.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){At(!0,"error","Message content threw during render:",t,n.componentStack)}render(){return this.state.hasError?w.jsx("p",{className:M(this.props.globalClassName,`${k}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}const mB=({message:e,globalClassName:t,isWidgetStandalone:n})=>{const{logger:r}=ft();return JC(e.content)?(r==null||r.debug("Omitting structured user message from transcript",e.content),null):w.jsx("div",{className:M(t,`${k}-message`,n?"standalone":"embedded"),children:w.jsx("div",{className:M(t,`${k}-user-message`,n?"standalone":"embedded"),children:w.jsxs("div",{className:M(t,`${k}-user-message-row`,n?"standalone":"embedded"),children:[w.jsx("span",{className:M(t,`${k}-message-icon user-message-icon`,n?"standalone":"embedded"),children:w.jsx(WN,{})}),w.jsx("p",{className:M(t,`${k}-user-message-text`,n?"standalone":"embedded"),children:e.content})]})})})},gB=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=ft(),a=P.useMemo(()=>{if(typeof e.content!="string")return null;const l=el(e.content);if(l)return l;const d=cf(e.content);return d?{response:[d]}:null},[e.content]),u=P.useMemo(()=>{var f;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 p=JSON.parse(d);if(typeof p=="object"&&p!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),(f=Yg(p))!=null?f:l}catch(p){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 w.jsx(mB,{message:e,globalClassName:t,isWidgetStandalone:r});case"agent":return w.jsx("div",{className:M(t,`${k}-message-group`,r?"standalone":"embedded"),children:w.jsx("div",{className:`${k}-message-group-child`,children:a?w.jsx(Jw,{globalClassName:t,children:w.jsx(Qw,{content:a,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):w.jsx(xo,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return w.jsx("div",{className:M(t,`${k}-message`,r?"standalone":"embedded"),children:w.jsx("p",{className:M(t,`${k}-reset-message`),children:e.content})})}},EB=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>w.jsxs("div",{className:M(n,`${k}-send-error`,r?"standalone":"embedded"),role:"alert",children:[w.jsx("span",{className:M(n,`${k}-send-error-text`),children:e}),w.jsxs("button",{type:"button",className:M(n,`${k}-retry-button`),onClick:t,children:[w.jsx(JN,{"aria-hidden":"true"})," Retry"]})]}),yB=({globalClassName:e,onClick:t})=>w.jsx("div",{className:M(e,`${k}-jump-to-latest`),children:w.jsx("button",{type:"button",className:M(e,`${k}-jump-to-latest-button`),"aria-label":"Jump to latest message",title:"Jump to latest message",onClick:t,children:w.jsx("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",children:w.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})})})}),TB=`${k}-message-container`,bB=24,wB=100,Zw=e=>{const t=e==null?void 0:e.closest(`.${TB}`);return t instanceof HTMLElement?t:null},e_=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=bB,_B=({autoScroll:e,messages:t,streamingBlocks:n,sendError:r,error:s,isOpen:a})=>{const u=P.useRef(null),l=P.useRef(null),d=P.useRef(!0),f=P.useRef(!1),p=P.useRef(null),m=P.useRef(e);m.current=e;const[y,T]=P.useState(!1),_=P.useCallback((S="smooth")=>{var O;const N=(O=l.current)!=null?O:Zw(u.current);N&&(d.current=!0,S==="smooth"&&(f.current=!0),N.scrollTo({top:N.scrollHeight,behavior:S}))},[]),A=P.useCallback(()=>{const S=l.current;if(!S){T(!1);return}T(!e_(S))},[]),x=P.useCallback(()=>{const S=l.current;if(!S){d.current=!0,T(!1);return}d.current=e_(S),A()},[A]);return P.useEffect(()=>{const S=Zw(u.current);if(l.current=S,A(),!S)return;const N=()=>{p.current&&(clearTimeout(p.current),p.current=null)},O=()=>{N(),f.current=!1,x()},j=()=>{if(!f.current){x();return}N(),p.current=setTimeout(O,wB)},V=()=>{N(),f.current=!1};S.addEventListener("scroll",j,{passive:!0}),S.addEventListener("scrollend",O),S.addEventListener("wheel",V,{passive:!0}),S.addEventListener("touchstart",V,{passive:!0});const D=new ResizeObserver(()=>{if(!f.current){if(m.current&&d.current){_();return}x()}});return D.observe(S),u.current&&D.observe(u.current),()=>{N(),S.removeEventListener("scroll",j),S.removeEventListener("scrollend",O),S.removeEventListener("wheel",V),S.removeEventListener("touchstart",V),D.disconnect()}},[_,A,x]),P.useEffect(()=>{_()},[_]),P.useEffect(()=>{a&&_("auto")},[a,_]),P.useEffect(()=>{if(e&&d.current){_();return}const S=t[t.length-1];if((S==null?void 0:S.role)==="user"){_();return}x()},[t,e,_,x]),P.useEffect(()=>{if(e&&d.current){_();return}x()},[n,r,s,e,_,x]),{endRef:u,showJumpToLatest:y,scrollToLatest:_}},xB="You are offline or we couldn't reach the assistant. Check connection and try again.",Fp=({isWidgetStandalone:e,isOpen:t})=>{var de,fe;const{globalClassName:n,openLinksInNewTab:r,logger:s,autoScroll:a}=ft(),{messages:u,streamingBlocks:l,isAgentTyping:d,loading:f,progressMessage:p,connectionStatus:m,error:y,sendError:T,retryLastMessage:_,retryConnection:A}=fn(),{endRef:x,showJumpToLatest:S,scrollToLatest:N}=_B({autoScroll:a,messages:u,streamingBlocks:l,sendError:T,error:y,isOpen:t}),O=u.length>0,j=l.some(wC),V=u[u.length-1],D=V?Gg(V.content,"suggestions"):!1,W=O&&(f||d)&&!j&&!D,Z=m==="reconnecting"&&!W,re=m==="error";let z=null;re?z={message:y!=null?y:xB,kind:"connection",onRetry:A}:T&&(z={message:T.message,kind:"send",onRetry:_});const K=(de=z==null?void 0:z.message)!=null?de:null,oe=(fe=z==null?void 0:z.kind)!=null?fe:null;return P.useEffect(()=>{K&&(s==null||s.error("Error message shown to user",{message:K,kind:oe}))},[K,oe,s]),w.jsxs(w.Fragment,{children:[f&&!O&&w.jsx(pM,{globalClassName:n,isWidgetStandalone:e}),u.map(te=>w.jsx(gB,{message:te,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:e},te.id)),z&&w.jsx(EB,{message:z.message,onRetry:z.onRetry,globalClassName:n,isWidgetStandalone:e}),j&&w.jsxs("div",{className:M(n,`${k}-message-group`,e?"standalone":"embedded"),children:[w.jsx(Jw,{globalClassName:n,children:w.jsx(Qw,{content:{response:l},globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:e})}),(f||d)&&w.jsx(Sp,{globalClassName:n,isWidgetStandalone:e})]}),W&&w.jsx(Sp,{globalClassName:n,isWidgetStandalone:e,loadingText:p}),Z&&w.jsx(Sp,{globalClassName:n,isWidgetStandalone:e,loadingText:"Reconnecting..."}),S&&w.jsx(yB,{globalClassName:n,onClick:()=>N()}),w.jsx("div",{ref:x,"aria-hidden":"true"})]})},SB=()=>w.jsxs("svg",{className:`${k}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),w.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),vB=()=>w.jsx("svg",{className:`${k}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.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"})}),AB=(e,t)=>e===0?[]:e<0?t:t.slice(-e),Bp=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=ft(),s=e!=null?e:r,{overrides:a,isInitialized:u}=So(),l=vo();if(t.length===0||s===0)return null;const d=AB(s,t),f=u?a.ProgressSteps:void 0;if(f){const p={name:"ProgressSteps",payload:{steps:d},api:l};return w.jsx(Ao,{tagName:f,props:p,label:"ProgressSteps"})}return w.jsx("div",{className:M(n,`${k}-progress-steps-panel`),children:w.jsx("div",{className:`${k}-progress-steps`,children:w.jsx("ul",{className:`${k}-progress-steps-list`,children:d.map((p,m)=>{const y=m<d.length-1,T=m===d.length-1;return w.jsxs("li",{className:M(`${k}-progress-step`,T&&"active"),children:[T&&w.jsx("span",{className:`${k}-progress-step-arc`}),w.jsx("span",{className:`${k}-progress-step-text`,children:p}),w.jsx("span",{className:M(`${k}-progress-step-icon`,y?"done":"active"),children:y?w.jsx(SB,{}):w.jsx(vB,{})})]},`${m}-${p}`)})})})})},t_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=ft(),{isAgentTyping:s,resetConversation:a,endConversation:u,progressSteps:l,downloadTranscript:d}=fn(),f=lc(),p=s,m=y=>f(y);return w.jsxs("div",{className:M(e,`${k}-container`,`${k}-embedded-chat`),style:t,children:[w.jsx("div",{className:M(e,`${k}-message-container`,`container-${n}`,"embedded"),children:w.jsx(Fp,{isWidgetStandalone:!1})}),w.jsx(Bp,{steps:l,globalClassName:e}),w.jsx(vh,{componentType:"chat",className:"embedded-chat",isLoading:p,onSubmit:m}),w.jsx("div",{className:M(`${k}-embedded-chat-menu`),children:w.jsxs(c8,{componentType:"chat",children:[w.jsx(cw,{componentType:"chat"}),w.jsx(gT,{componentType:"chat",onClearChat:a}),w.jsx(yT,{componentType:"chat",onEndConversation:u}),r&&w.jsx(ET,{componentType:"chat",onDownloadTranscript:d})]})})]})},n_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=P.useState((d=e.container)==null?void 0:d.current),a=P.useSyncExternalStore(NB,()=>!1,()=>!0),{getRootNode:u}=rc();if(P.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return w.jsx(w.Fragment,{children:t});const l=r!=null?r:CB(u);return w.jsx(w.Fragment,{children:P.Children.map(t,f=>Ys.createPortal(f,l))})},CB=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ls(n)?n:Pr(t).body},NB=()=>()=>{},r_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ft(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=Wr(),{loading:d,isAgentTyping:f,resetConversation:p,endConversation:m,progressSteps:y,downloadTranscript:T}=fn(),_=lc(),{isOpen:A}=s||{},x=!!s.isOpen,S=r==="standalone",N=f||d,O=()=>{Yr(!1)},j=V=>_(V);return x?w.jsx(nw,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:x,children:w.jsx(n_,{children:w.jsx(yp,{className:M(e,`${k}-container`,`${k}-dialog`,a,u&&"full-height"),style:U(U({},t),l&&{width:l}),children:w.jsxs(gp,{className:M(e,`${k}-dialog-content`,{standalone:S,embedded:!S}),children:[w.jsx(uw,{componentType:"dialog",onClearChat:p,onEndConversation:m,onClose:O,onDownloadTranscript:T}),w.jsx(Ep,{className:M(e,`${k}-message-container`,`container-${n}`,{standalone:S,embedded:!S}),children:w.jsx(Fp,{isWidgetStandalone:S,isOpen:A})}),w.jsx(Bp,{steps:y,globalClassName:e}),w.jsx(vh,{componentType:"dialog",isLoading:N,onSubmit:j})]})})})}):null},i_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ft(),{mode:r,status:s,isModalFullscreen:a}=Wr(),{loading:u,isAgentTyping:l,resetConversation:d,endConversation:f,progressSteps:p,downloadTranscript:m}=fn(),y=lc(),{isOpen:T}=s||{},_=!!s.isOpen,A=r==="standalone",x=l||u,S=({open:j})=>{Yr(j)},N=()=>{Yr(!1)},O=j=>y(j);return _?w.jsx(nw,{lazyMount:!0,unmountOnExit:!0,open:_,onOpenChange:S,children:w.jsx(n_,{children:w.jsxs("div",{className:M(e,`${k}-modal-container`),style:t,children:[w.jsx(Qb,{className:M(e,`${k}-modal-backdrop`)}),w.jsx(yp,{className:M(e,`${k}-container`,`${k}-modal`,{fullscreen:a,standalone:A,embedded:!A}),children:w.jsxs(gp,{className:M(e,`${k}-modal-content`,{standalone:A,embedded:!A}),children:[w.jsx(uw,{componentType:"modal",onClearChat:d,onEndConversation:f,onClose:N,onDownloadTranscript:m}),w.jsx(Ep,{className:M(e,`${k}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:w.jsx(Fp,{isWidgetStandalone:A,isOpen:T})}),w.jsx(Bp,{steps:p,globalClassName:e}),w.jsx(vh,{componentType:"modal",isLoading:x,onSubmit:O})]})})]})})}):null},kB=()=>{const e=Wr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx($N,{}):t==="dialog"?w.jsx(r_,{}):t==="modal"?w.jsx(i_,{}):w.jsx(t_,{})},OB=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=nM();P.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 X8(a),()=>{K8(a)}},[e,t,n,r,s])},s_=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function IB({isReady:e,hasError:t,transmit:n}){const r=P.useRef([]),s=P.useRef(e);s.current=e;const a=P.useRef(n);a.current=n;const u=P.useCallback((l,d)=>{s.current?s_(a.current,l,d):r.current.push({prompt:l,options:d})},[]);return P.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(({prompt:d,options:f})=>s_(a.current,d,f))}},[e]),P.useEffect(()=>{t&&(r.current=[])},[t]),u}const o_={copilot:"Ask Copilot",messaging:"Ask a question"},PB=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ft(),{placeholder:s,isResponseLoading:a}=oc(),u=s||o_[r],[l,d]=P.useState(""),f=t||a,p=m=>{const y=l.trim();y&&(m.preventDefault(),e(y),d(""))};return w.jsxs("form",{className:M(n,`${k}-prompts-input-container`),name:`${k}-prompts-form`,onSubmit:p,children:[w.jsx("label",{htmlFor:`${k}-prompts-input`,"aria-label":u,children:w.jsx(ap,{className:M(n,`${k}-prompts-input-icon`)})}),w.jsx("input",{id:`${k}-prompts-input`,className:M(n,`${k}-prompts-input`),name:`${k}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),w.jsx(fr,{className:M(n,`${k}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(Of,{}),disabled:f})]})},RB=()=>{const{globalClassName:e,mode:t}=ft(),{placeholder:n}=oc(),r=n||o_[t];return w.jsxs("div",{className:M(e,`${k}-prompts-header`),children:[w.jsx(ap,{className:M(e,`${k}-prompts-input-icon`),"aria-hidden":"true"}),w.jsx("span",{className:M(e,`${k}-prompts-header-text`),children:r})]})},a_=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:s}=ft(),a=s==null?void 0:s.icon,u=(l=s==null?void 0:s.iconPosition)!=null?l:"left";return w.jsxs("button",{className:M(r,`${k}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&w.jsx(lw,{icon:a,className:`${k}-suggestion-button-icon`}),w.jsx("span",{children:e})]})},LB="Ask me something else",DB=({label:e,disabled:t=!1})=>w.jsx(a_,{label:e||LB,disabled:t,onClick:()=>Yr(!0)}),MB=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=ft(),{staticQuestions:r,askElseButtonLabel:s,disableAskElseButton:a}=oc();if(!(r!=null&&r.length))return null;const u=l=>()=>{const d=l.trim();d&&e(d)};return w.jsxs("div",{className:M(n,`${k}-prompts-button-group`),children:[r.map(l=>w.jsx(a_,{label:l,disabled:t,onClick:u(l)},l)),!a&&w.jsx(DB,{label:s,disabled:t})]})},FB=()=>{const{globalClassName:e,themeVariables:t}=ft(),{isOpen:n,elementId:r,promptsDisplay:s}=oc(),{isConnected:a,sessionExpired:u,sendMessage:l,connectionStatus:d}=fn(),{productId:f}=aw(),p=s!=="buttons",m=s!=="input",[y,T]=P.useState(null),_=d==="error",A=d==="connecting",x=n1(a,u),S=IB({isReady:x,hasError:_,transmit:l});P.useEffect(()=>{if(!r||y)return;const O=document.getElementById(r);O&&T(O)},[r,y]);const N=P.useCallback(O=>{Yr(!0);const{prompt:j,display:V}=i1(O,f);if(V&&V.length>0){S(j,{displayContent:V});return}S(j)},[S,f]);return!n||!y?null:Ys.createPortal(w.jsxs("div",{className:M(e,`${k}-prompts-extension-container`),style:t,children:[p&&w.jsx(PB,{onSubmit:N,disabled:_}),!p&&w.jsx(RB,{}),m&&w.jsx(MB,{onPromptClick:N,disabled:_}),!_&&A&&w.jsx("p",{className:M(e,`${k}-prompts-connecting-message`),children:"Connecting to agent..."}),_&&w.jsx("p",{className:M(e,`${k}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),y)},BB=()=>(OB(),w.jsx(FB,{})),u_=e=>w.jsxs(_1,ae(U({},e),{children:[w.jsx(kB,{}),w.jsx(BB,{})]}));var gc={},l_;function UB(){if(l_)return gc;l_=1;var e=C1();return gc.createRoot=e.createRoot,gc.hydrateRoot=e.hydrateRoot,gc}var HB=UB();const c_=new WeakMap,d_=(e,t,n,r)=>{var a;(a=c_.get(e))==null||a.unmount();const s=HB.createRoot(e);c_.set(e,s),s.render(w.jsx(u_,ae(U({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},jB=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=An(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let l;const d=(p,m)=>{for(const y of p)if(y.type==="childList"&&y.addedNodes.length)for(const T of y.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(At(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(l),d_(T,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),At(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},zB=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=An(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){At(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){At(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){At(!0,"warn","Container element not found for id:",t),At(!0,"warn","Beginning observation for element"),jB(U({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}d_(l,s,n,r)};function $B(){return De(this,null,function*(){return oN().getAuthLinkKey()})}class VB extends HTMLElement{constructor(){super(...arguments);Ke(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const qB={components:{setEntryType:tg,toggleWidgetOpen:Yr,toggleWidgetMinimized:Fs,toggleModalFullscreen:qd,setWidgetType:zu,setWidgetDialogPosition:Yd,loadPromptsComponent:Z8,togglePromptsExtensionOpen:ow},session:{resetConversation:eM,endConversation:tM}};Ue.AgentForceWidget=u_,Ue.AgentforceWidgetProvider=_1,Ue.CIMULATE_WIDGET_READY_EVENT=Z0,Ue.MessagingDialog=r_,Ue.MessagingEmbed=t_,Ue.MessagingModal=i_,Ue.MessagingProvider=o1,Ue.OverrideElement=VB,Ue.eventHandlers=qB,Ue.getAuthLinkKey=$B,Ue.injectMessagingWidget=zB,Ue.useMessaging=fn,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"})}));
|