@cimulate/copilot-widget 1.24.3 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/dist/messaging.css +1 -1
- package/dist/messaging.d.ts +16 -1
- package/dist/messaging.es.js +9892 -9582
- package/dist/messaging.umd.js +38 -38
- package/package.json +4 -2
package/dist/messaging.umd.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
(function(ke,Me){typeof exports=="object"&&typeof module!="undefined"?Me(exports):typeof define=="function"&&define.amd?define(["exports"],Me):(ke=typeof globalThis!="undefined"?globalThis:ke||self,Me(ke.CimulateMessaging={}))})(this,(function(ke){"use strict";var MB=Object.defineProperty,FB=Object.defineProperties;var BB=Object.getOwnPropertyDescriptors;var ad=Object.getOwnPropertySymbols;var Kw=Object.prototype.hasOwnProperty,Qw=Object.prototype.propertyIsEnumerable;var Mo=(ke,Me)=>(Me=Symbol[ke])?Me:Symbol.for("Symbol."+ke),UB=ke=>{throw TypeError(ke)},ud=Math.pow,Jm=(ke,Me,Ye)=>Me in ke?MB(ke,Me,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):ke[Me]=Ye,U=(ke,Me)=>{for(var Ye in Me||(Me={}))Kw.call(Me,Ye)&&Jm(ke,Ye,Me[Ye]);if(ad)for(var Ye of ad(Me))Qw.call(Me,Ye)&&Jm(ke,Ye,Me[Ye]);return ke},oe=(ke,Me)=>FB(ke,BB(Me));var cn=(ke,Me)=>{var Ye={};for(var rt in ke)Kw.call(ke,rt)&&Me.indexOf(rt)<0&&(Ye[rt]=ke[rt]);if(ke!=null&&ad)for(var rt of ad(ke))Me.indexOf(rt)<0&&Qw.call(ke,rt)&&(Ye[rt]=ke[rt]);return Ye};var $e=(ke,Me,Ye)=>Jm(ke,typeof Me!="symbol"?Me+"":Me,Ye);var je=(ke,Me,Ye)=>new Promise((rt,yt)=>{var lt=ct=>{try{jt(Ye.next(ct))}catch(rn){yt(rn)}},Ie=ct=>{try{jt(Ye.throw(ct))}catch(rn){yt(rn)}},jt=ct=>ct.done?rt(ct.value):Promise.resolve(ct.value).then(lt,Ie);jt((Ye=Ye.apply(ke,Me)).next())}),ws=function(ke,Me){this[0]=ke,this[1]=Me},Zm=(ke,Me,Ye)=>{var rt=(jt,ct,rn,Xn)=>{try{var Di=Ye[jt](ct),Ss=(ct=Di.value)instanceof ws,vs=Di.done;Promise.resolve(Ss?ct[0]:ct).then(dn=>Ss?rt(jt==="return"?jt:"next",ct[1]?{done:dn.done,value:dn.value}:dn,rn,Xn):rn({value:dn,done:vs})).catch(dn=>rt("throw",dn,rn,Xn))}catch(dn){Xn(dn)}},yt=(jt,ct,rn,Xn)=>Ie[jt]=Di=>(ct=new Promise((Ss,vs,dn)=>(dn=()=>rt(jt,Di,Ss,vs),lt?lt.then(dn):dn())),Xn=()=>lt===rn&&(lt=0),lt=rn=ct.then(Xn,Xn),ct),lt,Ie={};return Ye=Ye.apply(ke,Me),Ie[Mo("asyncIterator")]=()=>Ie,yt("next"),yt("throw"),yt("return"),Ie},e0=ke=>{var Me=ke[Mo("asyncIterator")],Ye=!1,rt,yt={};return Me==null?(Me=ke[Mo("iterator")](),rt=lt=>yt[lt]=Ie=>Me[lt](Ie)):(Me=Me.call(ke),rt=lt=>yt[lt]=Ie=>{if(Ye){if(Ye=!1,lt==="throw")throw Ie;return Ie}return Ye=!0,{done:!1,value:new ws(new Promise(jt=>{var ct=Me[lt](Ie);ct instanceof Object||UB("Object expected"),jt(ct)}),1)}}),yt[Mo("iterator")]=()=>yt,rt("next"),"throw"in Me?rt("throw"):yt.throw=lt=>{throw lt},"return"in Me&&rt("return"),yt},Jw=(ke,Me,Ye)=>(Me=ke[Mo("asyncIterator")])?Me.call(ke):(ke=ke[Mo("iterator")](),Me={},Ye=(rt,yt)=>(yt=ke[rt])&&(Me[rt]=lt=>new Promise((Ie,jt,ct)=>(lt=yt.call(ke,lt),ct=lt.done,Promise.resolve(lt.value).then(rn=>Ie({value:rn,done:ct}),jt)))),Ye("next"),Ye("return"),Me);var Me=document.createElement("style");Me.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;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease}.cim-widget-msg-product-card:hover{box-shadow:0 2px 8px #0000001f}.cim-widget-msg-product-card__image-wrapper{position:relative;width:100%;height:100%;aspect-ratio:1 / 1;overflow:hidden}.cim-widget-msg-product-card__image{width:100%;height:100%;object-fit:contain;display:block}.cim-widget-msg-product-card__image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-border-color, #d1d5db)}.cim-widget-msg-product-card__image-placeholder svg{width:40%;height:40%}button.cim-widget-msg-product-card__image-button{width:100%;height:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;display:block}button.cim-widget-msg-product-card__image-button:disabled{cursor:default}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:50%}.cim-widget-msg-product-card__content-header{display:grid;gap:8px}.cim-widget-msg-product-card__title,.cim-widget-msg-product-card__title-link{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cim-widget-msg-product-card__title-link{text-decoration:none;cursor:pointer}button.cim-widget-msg-product-card__title-link{padding:0;border:none;background:none;text-align:left;width:100%}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}button.cim-widget-msg-product-card__title-link:disabled{cursor:default;text-decoration:none}.cim-widget-msg-product-card__description{font-size:12px}@media(min-width:576px){.cim-widget-msg-product-card__description{display:-webkit-box;line-clamp:4;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-msg-product-card__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-product-carousel-item{display:flex;flex-direction:column;p.cim-widget-product-carousel-caption{font-size:11px;line-height:1.3;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);margin:.25rem .5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-ready{margin-bottom:8px}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:.8125rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:.875rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.75rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;align-items:baseline;gap:8px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:.875rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:.875rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-cart-item-qty{font-size:.75rem;font-weight:500;opacity:.85}.cim-widget-cart-item-remove{padding:0;border:none;background:none;font-family:inherit;font-size:.75rem;font-weight:500;color:var(--cim-widget-font-color, #3f3f46);text-decoration:underline;cursor:pointer}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.8125rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-font-color, #141415);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-font-color, #141415);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-font-color, #141415) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-product-comparison__footer{display:contents}.cim-widget-product-comparison__footer-cell{padding:12px 8px;border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__add-to-cart{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;white-space:nowrap;background-color:transparent;color:var(--cim-widget-primary-color, #3182ce)}.cim-widget-product-comparison__add-to-cart:hover{background-color:transparent}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Me);function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},yt={},lt={exports:{}},Ie={};var jt;function ct(){if(jt)return Ie;jt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(k){return k===null||typeof k!="object"?null:(k=m&&k[m]||k["@@iterator"],typeof k=="function"?k:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,N={};function A(k,q,O){this.props=k,this.context=q,this.refs=N,this.updater=O||y}A.prototype.isReactComponent={},A.prototype.setState=function(k,q){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,q,"setState")},A.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function v(){}v.prototype=A.prototype;function C(k,q,O){this.props=k,this.context=q,this.refs=N,this.updater=O||y}var R=C.prototype=new v;R.constructor=C,x(R,A.prototype),R.isPureReactComponent=!0;var $=Array.isArray,G=Object.prototype.hasOwnProperty,D={current:null},J={key:!0,ref:!0,__self:!0,__source:!0};function se(k,q,O){var pe,Oe={},ye=null,Re=null;if(q!=null)for(pe in q.ref!==void 0&&(Re=q.ref),q.key!==void 0&&(ye=""+q.key),q)G.call(q,pe)&&!J.hasOwnProperty(pe)&&(Oe[pe]=q[pe]);var Be=arguments.length-2;if(Be===1)Oe.children=O;else if(1<Be){for(var Ke=Array(Be),Tt=0;Tt<Be;Tt++)Ke[Tt]=arguments[Tt+2];Oe.children=Ke}if(k&&k.defaultProps)for(pe in Be=k.defaultProps,Be)Oe[pe]===void 0&&(Oe[pe]=Be[pe]);return{$$typeof:e,type:k,key:ye,ref:Re,props:Oe,_owner:D.current}}function he(k,q){return{$$typeof:e,type:k.type,key:q,ref:k.ref,props:k.props,_owner:k._owner}}function V(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function ie(k){var q={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(O){return q[O]})}var ee=/\/+/g;function we(k,q){return typeof k=="object"&&k!==null&&k.key!=null?ie(""+k.key):q.toString(36)}function de(k,q,O,pe,Oe){var ye=typeof k;(ye==="undefined"||ye==="boolean")&&(k=null);var Re=!1;if(k===null)Re=!0;else switch(ye){case"string":case"number":Re=!0;break;case"object":switch(k.$$typeof){case e:case t:Re=!0}}if(Re)return Re=k,Oe=Oe(Re),k=pe===""?"."+we(Re,0):pe,$(Oe)?(O="",k!=null&&(O=k.replace(ee,"$&/")+"/"),de(Oe,q,O,"",function(Tt){return Tt})):Oe!=null&&(V(Oe)&&(Oe=he(Oe,O+(!Oe.key||Re&&Re.key===Oe.key?"":(""+Oe.key).replace(ee,"$&/")+"/")+k)),q.push(Oe)),1;if(Re=0,pe=pe===""?".":pe+":",$(k))for(var Be=0;Be<k.length;Be++){ye=k[Be];var Ke=pe+we(ye,Be);Re+=de(ye,q,O,Ke,Oe)}else if(Ke=T(k),typeof Ke=="function")for(k=Ke.call(k),Be=0;!(ye=k.next()).done;)ye=ye.value,Ke=pe+we(ye,Be++),Re+=de(ye,q,O,Ke,Oe);else if(ye==="object")throw q=String(k),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return Re}function ae(k,q,O){if(k==null)return k;var pe=[],Oe=0;return de(k,pe,"","",function(ye){return q.call(O,ye,Oe++)}),pe}function _e(k){if(k._status===-1){var q=k._result;q=q(),q.then(function(O){(k._status===0||k._status===-1)&&(k._status=1,k._result=O)},function(O){(k._status===0||k._status===-1)&&(k._status=2,k._result=O)}),k._status===-1&&(k._status=0,k._result=q)}if(k._status===1)return k._result.default;throw k._result}var ue={current:null},z={transition:null},Z={ReactCurrentDispatcher:ue,ReactCurrentBatchConfig:z,ReactCurrentOwner:D};function w(){throw Error("act(...) is not supported in production builds of React.")}return Ie.Children={map:ae,forEach:function(k,q,O){ae(k,function(){q.apply(this,arguments)},O)},count:function(k){var q=0;return ae(k,function(){q++}),q},toArray:function(k){return ae(k,function(q){return q})||[]},only:function(k){if(!V(k))throw Error("React.Children.only expected to receive a single React element child.");return k}},Ie.Component=A,Ie.Fragment=n,Ie.Profiler=s,Ie.PureComponent=C,Ie.StrictMode=r,Ie.Suspense=d,Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,Ie.act=w,Ie.cloneElement=function(k,q,O){if(k==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+k+".");var pe=x({},k.props),Oe=k.key,ye=k.ref,Re=k._owner;if(q!=null){if(q.ref!==void 0&&(ye=q.ref,Re=D.current),q.key!==void 0&&(Oe=""+q.key),k.type&&k.type.defaultProps)var Be=k.type.defaultProps;for(Ke in q)G.call(q,Ke)&&!J.hasOwnProperty(Ke)&&(pe[Ke]=q[Ke]===void 0&&Be!==void 0?Be[Ke]:q[Ke])}var Ke=arguments.length-2;if(Ke===1)pe.children=O;else if(1<Ke){Be=Array(Ke);for(var Tt=0;Tt<Ke;Tt++)Be[Tt]=arguments[Tt+2];pe.children=Be}return{$$typeof:e,type:k.type,key:Oe,ref:ye,props:pe,_owner:Re}},Ie.createContext=function(k){return k={$$typeof:u,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},k.Provider={$$typeof:a,_context:k},k.Consumer=k},Ie.createElement=se,Ie.createFactory=function(k){var q=se.bind(null,k);return q.type=k,q},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(k){return{$$typeof:c,render:k}},Ie.isValidElement=V,Ie.lazy=function(k){return{$$typeof:p,_payload:{_status:-1,_result:k},_init:_e}},Ie.memo=function(k,q){return{$$typeof:f,type:k,compare:q===void 0?null:q}},Ie.startTransition=function(k){var q=z.transition;z.transition={};try{k()}finally{z.transition=q}},Ie.unstable_act=w,Ie.useCallback=function(k,q){return ue.current.useCallback(k,q)},Ie.useContext=function(k){return ue.current.useContext(k)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(k){return ue.current.useDeferredValue(k)},Ie.useEffect=function(k,q){return ue.current.useEffect(k,q)},Ie.useId=function(){return ue.current.useId()},Ie.useImperativeHandle=function(k,q,O){return ue.current.useImperativeHandle(k,q,O)},Ie.useInsertionEffect=function(k,q){return ue.current.useInsertionEffect(k,q)},Ie.useLayoutEffect=function(k,q){return ue.current.useLayoutEffect(k,q)},Ie.useMemo=function(k,q){return ue.current.useMemo(k,q)},Ie.useReducer=function(k,q,O){return ue.current.useReducer(k,q,O)},Ie.useRef=function(k){return ue.current.useRef(k)},Ie.useState=function(k){return ue.current.useState(k)},Ie.useSyncExternalStore=function(k,q,O){return ue.current.useSyncExternalStore(k,q,O)},Ie.useTransition=function(){return ue.current.useTransition()},Ie.version="18.3.1",Ie}var rn;function Xn(){return rn||(rn=1,lt.exports=ct()),lt.exports}var Di;function Ss(){if(Di)return yt;Di=1;var e=Xn(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var p,m={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:c,key:T,ref:y,props:m,_owner:s.current}}return yt.Fragment=n,yt.jsx=u,yt.jsxs=u,yt}var vs;function dn(){return vs||(vs=1,rt.exports=Ss()),rt.exports}var _=dn();const pr=Object.create(null);pr.open="0",pr.close="1",pr.ping="2",pr.pong="3",pr.message="4",pr.upgrade="5",pr.noop="6";const gu=Object.create(null);Object.keys(pr).forEach(e=>{gu[pr[e]]=e});const ld={type:"error",data:"parser error"},t0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n0=typeof ArrayBuffer=="function",r0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cd=({type:e,data:t},n,r)=>t0&&t instanceof Blob?n?r(t):i0(t,r):n0&&(t instanceof ArrayBuffer||r0(t))?n?r(t):i0(new Blob([t]),r):r(pr[e]+(t||"")),i0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function s0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let dd;function n2(e,t){if(t0&&e.data instanceof Blob)return e.data.arrayBuffer().then(s0).then(t);if(n0&&(e.data instanceof ArrayBuffer||r0(e.data)))return t(s0(e.data));cd(e,!1,n=>{dd||(dd=new TextEncoder),t(dd.encode(n))})}const o0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<o0.length;e++)Fo[o0.charCodeAt(e)]=e;const r2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Fo[e.charCodeAt(r)],u=Fo[e.charCodeAt(r+1)],c=Fo[e.charCodeAt(r+2)],d=Fo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|c>>2,p[s++]=(c&3)<<6|d&63;return f},i2=typeof ArrayBuffer=="function",fd=(e,t)=>{if(typeof e!="string")return{type:"message",data:a0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:s2(e.substring(1),t)}:gu[n]?e.length>1?{type:gu[n],data:e.substring(1)}:{type:gu[n]}:ld},s2=(e,t)=>{if(i2){const n=r2(e);return a0(n,t)}else return{base64:!0,data:e}},a0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,u0="",o2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{cd(a,!1,c=>{r[u]=c,++s===n&&t(r.join(u0))})})},a2=(e,t)=>{const n=e.split(u0),r=[];for(let s=0;s<n.length;s++){const a=fd(n[s],t);if(r.push(a),a.type==="error")break}return r};function u2(){return new TransformStream({transform(e,t){n2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let hd;function Eu(e){return e.reduce((t,n)=>t+n.length,0)}function yu(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 l2(e,t){hd||(hd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(Eu(n)<1)break;const d=yu(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(Eu(n)<2)break;const d=yu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Eu(n)<8)break;const d=yu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(ld);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Eu(n)<s)break;const d=yu(n,s);c.enqueue(fd(a?d:hd.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(ld);break}}}})}const l0=4;function vt(e){if(e)return c2(e)}function c2(e){for(var t in vt.prototype)e[t]=vt.prototype[t];return e}vt.prototype.on=vt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},vt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},vt.prototype.off=vt.prototype.removeListener=vt.prototype.removeAllListeners=vt.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},vt.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},vt.prototype.emitReserved=vt.prototype.emit,vt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},vt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Tu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Fn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),d2="arraybuffer";function HB(){}function c0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const f2=Fn.setTimeout,h2=Fn.clearTimeout;function bu(e,t){t.useNativeTimers?(e.setTimeoutFn=f2.bind(Fn),e.clearTimeoutFn=h2.bind(Fn)):(e.setTimeoutFn=Fn.setTimeout.bind(Fn),e.clearTimeoutFn=Fn.clearTimeout.bind(Fn))}const p2=1.33;function m2(e){return typeof e=="string"?g2(e):Math.ceil((e.byteLength||e.size)*p2)}function g2(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 E2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function y2(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 T2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class pd extends vt{constructor(t){super(),this.writable=!1,bu(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 T2(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=E2(t);return n.length?"?"+n:""}}class b2 extends pd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};a2(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,o2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=d0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let f0=!1;try{f0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const _2=f0;function x2(){}class w2 extends b2{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 mr extends vt{constructor(t,n,r){super(),this.createRequest=t,bu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=c0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=mr.requestsCount++,mr.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=x2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete mr.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(mr.requestsCount=0,mr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",h0);else if(typeof addEventListener=="function"){const e="onpagehide"in Fn?"pagehide":"unload";addEventListener(e,h0,!1)}}function h0(){for(let e in mr.requests)mr.requests.hasOwnProperty(e)&&mr.requests[e].abort()}const S2=(function(){const e=p0({xdomain:!1});return e&&e.responseType!==null})();class v2 extends w2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=S2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new mr(p0,this.uri(),t)}}function p0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||_2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Fn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const m0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class A2 extends pd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=m0?{}:c0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;cd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Tu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=d0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const md=Fn.WebSocket||Fn.MozWebSocket;class N2 extends A2{createSocket(t,n,r){return m0?new md(t,n,r):n?new md(t,n):new md(t)}doWrite(t,n){this.ws.send(n)}}class C2 extends pd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=l2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=u2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Tu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const k2={websocket:N2,webtransport:C2,polling:v2},O2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,I2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=O2.exec(e||""),a={},u=14;for(;u--;)a[I2[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=P2(a,a.path),a.queryKey=R2(a,a.query),a}function P2(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 R2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Ed=typeof addEventListener=="function"&&typeof removeEventListener=="function",_u=[];Ed&&addEventListener("offline",()=>{_u.forEach(e=>e())},!1);class ei extends vt{constructor(t,n){if(super(),this.binaryType=d2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=gd(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=gd(n.host).host);bu(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=y2(this.opts.query)),Ed&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},_u.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=l0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&ei.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",ei.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+=m2(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,Tu(()=>{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(ei.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ed&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=_u.indexOf(this._offlineEventListener);r!==-1&&_u.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ei.protocol=l0;class L2 extends ei{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;ei.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;ei.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function c(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let D2=class extends L2{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=>k2[a]).filter(a=>!!a)),super(r?s:t,s)}};function M2(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=gd(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const F2=typeof ArrayBuffer=="function",B2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,g0=Object.prototype.toString,U2=typeof Blob=="function"||typeof Blob!="undefined"&&g0.call(Blob)==="[object BlobConstructor]",H2=typeof File=="function"||typeof File!="undefined"&&g0.call(File)==="[object FileConstructor]";function yd(e){return F2&&(e instanceof ArrayBuffer||B2(e))||U2&&e instanceof Blob||H2&&e instanceof File}function xu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(xu(e[n]))return!0;return!1}if(yd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return xu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&xu(e[n]))return!0;return!1}function j2(e){const t=[],n=e.data,r=e;return r.data=wu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function wu(e,t,n){if(!e)return e;if(yd(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=wu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return wu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=wu(e[s],t));return r}return e}function z2(e,t){return e.data=Td(e.data,t),delete e.attachments,e}function Td(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Td(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Td(e[n],t));return e}const $2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ge;(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"})(Ge||(Ge={}));class V2{constructor(t){this.replacer=t}encode(t){return(t.type===Ge.EVENT||t.type===Ge.ACK)&&xu(t)?this.encodeAsBinary({type:t.type===Ge.EVENT?Ge.BINARY_EVENT:Ge.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ge.BINARY_EVENT||t.type===Ge.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=j2(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class bd extends vt{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===Ge.BINARY_EVENT;r||n.type===Ge.BINARY_ACK?(n.type=r?Ge.EVENT:Ge.ACK,this.reconstructor=new q2(n)):super.emitReserved("decoded",n)}else if(yd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ge[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ge.BINARY_EVENT||r.type===Ge.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Y2(c)||c<1)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(bd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ge.CONNECT:return E0(n);case Ge.DISCONNECT:return n===void 0;case Ge.CONNECT_ERROR:return typeof n=="string"||E0(n);case Ge.EVENT:case Ge.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&$2.indexOf(n[0])===-1);case Ge.ACK:case Ge.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class q2{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=z2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Y2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function E0(e){return Object.prototype.toString.call(e)==="[object Object]"}const W2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:bd,Encoder:V2,get PacketType(){return Ge}},Symbol.toStringTag,{value:"Module"}));function Kn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const G2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class y0 extends vt{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=[Kn(t,"open",this.onopen.bind(this)),Kn(t,"packet",this.onpacket.bind(this)),Kn(t,"error",this.onerror.bind(this)),Kn(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(G2.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:Ge.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},s),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,c)=>u?s(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ge.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 Ge.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 Ge.EVENT:case Ge.BINARY_EVENT:this.onevent(t);break;case Ge.ACK:case Ge.BINARY_ACK:this.onack(t);break;case Ge.DISCONNECT:this.ondisconnect();break;case Ge.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:Ge.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:Ge.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function As(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}As.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},As.prototype.reset=function(){this.attempts=0},As.prototype.setMin=function(e){this.ms=e},As.prototype.setMax=function(e){this.max=e},As.prototype.setJitter=function(e){this.jitter=e};class _d extends vt{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,bu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new As({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||W2;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 D2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=Kn(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Kn(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Kn(t,"ping",this.onping.bind(this)),Kn(t,"data",this.ondata.bind(this)),Kn(t,"error",this.onerror.bind(this)),Kn(t,"close",this.onclose.bind(this)),Kn(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){Tu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new y0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Bo={};function xd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=M2(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Bo[s]&&a in Bo[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new _d(r,t):(Bo[s]||(Bo[s]=new _d(r,t)),d=Bo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(xd,{Manager:_d,Socket:y0,io:xd,connect:xd});const T0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&T0.call(Blob),typeof File=="function"||typeof File!="undefined"&&T0.call(File);var b0;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(b0||(b0={}));var H=Xn();const Mi=Ye(H);let X2=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 K2{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 je(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:oe(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 je(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let s="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let c;for(s+=r.decode(a,{stream:!0}),s=s.replace(/\r\n/g,`
|
|
1
|
+
(function(Le,Ue){typeof exports=="object"&&typeof module!="undefined"?Ue(exports):typeof define=="function"&&define.amd?define(["exports"],Ue):(Le=typeof globalThis!="undefined"?globalThis:Le||self,Ue(Le.CimulateMessaging={}))})(this,(function(Le){"use strict";var G7=Object.defineProperty,X7=Object.defineProperties;var K7=Object.getOwnPropertyDescriptors;var od=Object.getOwnPropertySymbols;var Jw=Object.prototype.hasOwnProperty,Zw=Object.prototype.propertyIsEnumerable;var Mo=(Le,Ue)=>(Ue=Symbol[Le])?Ue:Symbol.for("Symbol."+Le),Q7=Le=>{throw TypeError(Le)},ad=Math.pow,Jm=(Le,Ue,Xe)=>Ue in Le?G7(Le,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):Le[Ue]=Xe,U=(Le,Ue)=>{for(var Xe in Ue||(Ue={}))Jw.call(Ue,Xe)&&Jm(Le,Xe,Ue[Xe]);if(od)for(var Xe of od(Ue))Zw.call(Ue,Xe)&&Jm(Le,Xe,Ue[Xe]);return Le},ae=(Le,Ue)=>X7(Le,K7(Ue));var hn=(Le,Ue)=>{var Xe={};for(var st in Le)Jw.call(Le,st)&&Ue.indexOf(st)<0&&(Xe[st]=Le[st]);if(Le!=null&&od)for(var st of od(Le))Ue.indexOf(st)<0&&Zw.call(Le,st)&&(Xe[st]=Le[st]);return Xe};var Ye=(Le,Ue,Xe)=>Jm(Le,typeof Ue!="symbol"?Ue+"":Ue,Xe);var He=(Le,Ue,Xe)=>new Promise((st,bt)=>{var dt=ft=>{try{$t(Xe.next(ft))}catch(an){bt(an)}},De=ft=>{try{$t(Xe.throw(ft))}catch(an){bt(an)}},$t=ft=>ft.done?st(ft.value):Promise.resolve(ft.value).then(dt,De);$t((Xe=Xe.apply(Le,Ue)).next())}),ws=function(Le,Ue){this[0]=Le,this[1]=Ue},Zm=(Le,Ue,Xe)=>{var st=($t,ft,an,Kn)=>{try{var Di=Xe[$t](ft),Ss=(ft=Di.value)instanceof ws,vs=Di.done;Promise.resolve(Ss?ft[0]:ft).then(pn=>Ss?st($t==="return"?$t:"next",ft[1]?{done:pn.done,value:pn.value}:pn,an,Kn):an({value:pn,done:vs})).catch(pn=>st("throw",pn,an,Kn))}catch(pn){Kn(pn)}},bt=($t,ft,an,Kn)=>De[$t]=Di=>(ft=new Promise((Ss,vs,pn)=>(pn=()=>st($t,Di,Ss,vs),dt?dt.then(pn):pn())),Kn=()=>dt===an&&(dt=0),dt=an=ft.then(Kn,Kn),ft),dt,De={};return Xe=Xe.apply(Le,Ue),De[Mo("asyncIterator")]=()=>De,bt("next"),bt("throw"),bt("return"),De},e0=Le=>{var Ue=Le[Mo("asyncIterator")],Xe=!1,st,bt={};return Ue==null?(Ue=Le[Mo("iterator")](),st=dt=>bt[dt]=De=>Ue[dt](De)):(Ue=Ue.call(Le),st=dt=>bt[dt]=De=>{if(Xe){if(Xe=!1,dt==="throw")throw De;return De}return Xe=!0,{done:!1,value:new ws(new Promise($t=>{var ft=Ue[dt](De);ft instanceof Object||Q7("Object expected"),$t(ft)}),1)}}),bt[Mo("iterator")]=()=>bt,st("next"),"throw"in Ue?st("throw"):bt.throw=dt=>{throw dt},"return"in Ue&&st("return"),bt},e2=(Le,Ue,Xe)=>(Ue=Le[Mo("asyncIterator")])?Ue.call(Le):(Le=Le[Mo("iterator")](),Ue={},Xe=(st,bt)=>(bt=Le[st])&&(Ue[st]=dt=>new Promise((De,$t,ft)=>(dt=bt.call(Le,dt),ft=dt.done,Promise.resolve(dt.value).then(an=>De({value:an,done:ft}),$t)))),Xe("next"),Xe("return"),Ue);var Ue=document.createElement("style");Ue.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;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease}.cim-widget-msg-product-card:hover{box-shadow:0 2px 8px #0000001f}.cim-widget-msg-product-card__image-wrapper{position:relative;width:100%;height:100%;aspect-ratio:1 / 1;overflow:hidden}.cim-widget-msg-product-card__image{width:100%;height:100%;object-fit:contain;display:block}.cim-widget-msg-product-card__image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-border-color, #d1d5db)}.cim-widget-msg-product-card__image-placeholder svg{width:40%;height:40%}button.cim-widget-msg-product-card__image-button{width:100%;height:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;display:block}button.cim-widget-msg-product-card__image-button:disabled{cursor:default}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:50%}.cim-widget-msg-product-card__content-header{display:grid;gap:8px}.cim-widget-msg-product-card__title,.cim-widget-msg-product-card__title-link{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cim-widget-msg-product-card__title-link{text-decoration:none;cursor:pointer}button.cim-widget-msg-product-card__title-link{padding:0;border:none;background:none;text-align:left;width:100%}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}button.cim-widget-msg-product-card__title-link:disabled{cursor:default;text-decoration:none}.cim-widget-msg-product-card__description{font-size:12px}@media(min-width:576px){.cim-widget-msg-product-card__description{display:-webkit-box;line-clamp:4;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-msg-product-card__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-product-carousel-item{display:flex;flex-direction:column;p.cim-widget-product-carousel-caption{font-size:11px;line-height:1.3;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);margin:.25rem .5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:1rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}@media(min-width:768px){.cim-widget-cart-expanded-standalone{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-cart-expanded-standalone .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-cart-expanded-standalone .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px}.cim-widget-cart-expanded-standalone .cim-widget-cart-total-row{gap:12px}}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:1rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.875rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:1rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:1rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.cim-widget-cart-qty-heading{font-size:.9375rem;font-weight:400;margin-bottom:0}.cim-widget-cart-qty-input-wrapper{display:flex;align-items:center;justify-content:flex-start}.cim-widget-cart-qty-input{width:45px;height:36px;padding:6px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:var(--cim-widget-bg-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);font-family:inherit;font-size:.9375rem;font-weight:400;text-align:center;transition:border-color .15s ease;box-sizing:border-box}.cim-widget-cart-qty-input:hover:not(:disabled){border-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 40%,var(--cim-widget-border-color, #d1d5db))}.cim-widget-cart-qty-input:focus{outline:none;border-color:var(--cim-widget-primary-color, #2563eb);box-shadow:0 0 0 2px color-mix(in srgb,var(--cim-widget-primary-color, #2563eb) 20%,transparent)}.cim-widget-cart-qty-input:disabled{opacity:.5;cursor:not-allowed}.cim-widget-cart-qty-spinner{width:18px;height:18px;animation:cim-widget-spin 1s linear infinite}@keyframes cim-widget-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cim-widget-cart-item-remove{padding:0;border:none;background:transparent;font-family:inherit;font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap;cursor:pointer;transition:opacity .15s ease;text-decoration:underline}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:4px;animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1.125rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-font-color, #141415);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-font-color, #141415);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-font-color, #141415) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-product-comparison__footer{display:contents}.cim-widget-product-comparison__footer-cell{padding:12px 8px;border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__add-to-cart{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;white-space:nowrap;background-color:transparent;color:var(--cim-widget-primary-color, #3182ce)}.cim-widget-product-comparison__add-to-cart:hover{background-color:transparent}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(Ue);function Xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st={exports:{}},bt={},dt={exports:{}},De={};var $t;function ft(){if($t)return De;$t=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(R){return R===null||typeof R!="object"?null:(R=m&&R[m]||R["@@iterator"],typeof R=="function"?R:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function A(R,Y,O){this.props=R,this.context=Y,this.refs=v,this.updater=O||y}A.prototype.isReactComponent={},A.prototype.setState=function(R,Y){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,Y,"setState")},A.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function S(){}S.prototype=A.prototype;function C(R,Y,O){this.props=R,this.context=Y,this.refs=v,this.updater=O||y}var P=C.prototype=new S;P.constructor=C,x(P,A.prototype),P.isPureReactComponent=!0;var j=Array.isArray,W=Object.prototype.hasOwnProperty,D={current:null},K={key:!0,ref:!0,__self:!0,__source:!0};function ne(R,Y,O){var ge,Re={},we=null,re=null;if(Y!=null)for(ge in Y.ref!==void 0&&(re=Y.ref),Y.key!==void 0&&(we=""+Y.key),Y)W.call(Y,ge)&&!K.hasOwnProperty(ge)&&(Re[ge]=Y[ge]);var ye=arguments.length-2;if(ye===1)Re.children=O;else if(1<ye){for(var ie=Array(ye),ve=0;ve<ye;ve++)ie[ve]=arguments[ve+2];Re.children=ie}if(R&&R.defaultProps)for(ge in ye=R.defaultProps,ye)Re[ge]===void 0&&(Re[ge]=ye[ge]);return{$$typeof:e,type:R,key:we,ref:re,props:Re,_owner:D.current}}function de(R,Y){return{$$typeof:e,type:R.type,key:Y,ref:R.ref,props:R.props,_owner:R._owner}}function $(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function se(R){var Y={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(O){return Y[O]})}var te=/\/+/g;function xe(R,Y){return typeof R=="object"&&R!==null&&R.key!=null?se(""+R.key):Y.toString(36)}function fe(R,Y,O,ge,Re){var we=typeof R;(we==="undefined"||we==="boolean")&&(R=null);var re=!1;if(R===null)re=!0;else switch(we){case"string":case"number":re=!0;break;case"object":switch(R.$$typeof){case e:case t:re=!0}}if(re)return re=R,Re=Re(re),R=ge===""?"."+xe(re,0):ge,j(Re)?(O="",R!=null&&(O=R.replace(te,"$&/")+"/"),fe(Re,Y,O,"",function(ve){return ve})):Re!=null&&($(Re)&&(Re=de(Re,O+(!Re.key||re&&re.key===Re.key?"":(""+Re.key).replace(te,"$&/")+"/")+R)),Y.push(Re)),1;if(re=0,ge=ge===""?".":ge+":",j(R))for(var ye=0;ye<R.length;ye++){we=R[ye];var ie=ge+xe(we,ye);re+=fe(we,Y,O,ie,Re)}else if(ie=T(R),typeof ie=="function")for(R=ie.call(R),ye=0;!(we=R.next()).done;)we=we.value,ie=ge+xe(we,ye++),re+=fe(we,Y,O,ie,Re);else if(we==="object")throw Y=String(R),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return re}function ce(R,Y,O){if(R==null)return R;var ge=[],Re=0;return fe(R,ge,"","",function(we){return Y.call(O,we,Re++)}),ge}function he(R){if(R._status===-1){var Y=R._result;Y=Y(),Y.then(function(O){(R._status===0||R._status===-1)&&(R._status=1,R._result=O)},function(O){(R._status===0||R._status===-1)&&(R._status=2,R._result=O)}),R._status===-1&&(R._status=0,R._result=Y)}if(R._status===1)return R._result.default;throw R._result}var le={current:null},Q={transition:null},ue={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:Q,ReactCurrentOwner:D};function N(){throw Error("act(...) is not supported in production builds of React.")}return De.Children={map:ce,forEach:function(R,Y,O){ce(R,function(){Y.apply(this,arguments)},O)},count:function(R){var Y=0;return ce(R,function(){Y++}),Y},toArray:function(R){return ce(R,function(Y){return Y})||[]},only:function(R){if(!$(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},De.Component=A,De.Fragment=n,De.Profiler=s,De.PureComponent=C,De.StrictMode=r,De.Suspense=d,De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ue,De.act=N,De.cloneElement=function(R,Y,O){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var ge=x({},R.props),Re=R.key,we=R.ref,re=R._owner;if(Y!=null){if(Y.ref!==void 0&&(we=Y.ref,re=D.current),Y.key!==void 0&&(Re=""+Y.key),R.type&&R.type.defaultProps)var ye=R.type.defaultProps;for(ie in Y)W.call(Y,ie)&&!K.hasOwnProperty(ie)&&(ge[ie]=Y[ie]===void 0&&ye!==void 0?ye[ie]:Y[ie])}var ie=arguments.length-2;if(ie===1)ge.children=O;else if(1<ie){ye=Array(ie);for(var ve=0;ve<ie;ve++)ye[ve]=arguments[ve+2];ge.children=ye}return{$$typeof:e,type:R.type,key:Re,ref:we,props:ge,_owner:re}},De.createContext=function(R){return R={$$typeof:u,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:a,_context:R},R.Consumer=R},De.createElement=ne,De.createFactory=function(R){var Y=ne.bind(null,R);return Y.type=R,Y},De.createRef=function(){return{current:null}},De.forwardRef=function(R){return{$$typeof:l,render:R}},De.isValidElement=$,De.lazy=function(R){return{$$typeof:p,_payload:{_status:-1,_result:R},_init:he}},De.memo=function(R,Y){return{$$typeof:f,type:R,compare:Y===void 0?null:Y}},De.startTransition=function(R){var Y=Q.transition;Q.transition={};try{R()}finally{Q.transition=Y}},De.unstable_act=N,De.useCallback=function(R,Y){return le.current.useCallback(R,Y)},De.useContext=function(R){return le.current.useContext(R)},De.useDebugValue=function(){},De.useDeferredValue=function(R){return le.current.useDeferredValue(R)},De.useEffect=function(R,Y){return le.current.useEffect(R,Y)},De.useId=function(){return le.current.useId()},De.useImperativeHandle=function(R,Y,O){return le.current.useImperativeHandle(R,Y,O)},De.useInsertionEffect=function(R,Y){return le.current.useInsertionEffect(R,Y)},De.useLayoutEffect=function(R,Y){return le.current.useLayoutEffect(R,Y)},De.useMemo=function(R,Y){return le.current.useMemo(R,Y)},De.useReducer=function(R,Y,O){return le.current.useReducer(R,Y,O)},De.useRef=function(R){return le.current.useRef(R)},De.useState=function(R){return le.current.useState(R)},De.useSyncExternalStore=function(R,Y,O){return le.current.useSyncExternalStore(R,Y,O)},De.useTransition=function(){return le.current.useTransition()},De.version="18.3.1",De}var an;function Kn(){return an||(an=1,dt.exports=ft()),dt.exports}var Di;function Ss(){if(Di)return bt;Di=1;var e=Kn(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(l,d,f){var p,m={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(l&&l.defaultProps)for(p in d=l.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:l,key:T,ref:y,props:m,_owner:s.current}}return bt.Fragment=n,bt.jsx=u,bt.jsxs=u,bt}var vs;function pn(){return vs||(vs=1,st.exports=Ss()),st.exports}var _=pn();const gr=Object.create(null);gr.open="0",gr.close="1",gr.ping="2",gr.pong="3",gr.message="4",gr.upgrade="5",gr.noop="6";const pu=Object.create(null);Object.keys(gr).forEach(e=>{pu[gr[e]]=e});const ud={type:"error",data:"parser error"},t0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n0=typeof ArrayBuffer=="function",r0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ld=({type:e,data:t},n,r)=>t0&&t instanceof Blob?n?r(t):i0(t,r):n0&&(t instanceof ArrayBuffer||r0(t))?n?r(t):i0(new Blob([t]),r):r(gr[e]+(t||"")),i0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function s0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let cd;function i2(e,t){if(t0&&e.data instanceof Blob)return e.data.arrayBuffer().then(s0).then(t);if(n0&&(e.data instanceof ArrayBuffer||r0(e.data)))return t(s0(e.data));ld(e,!1,n=>{cd||(cd=new TextEncoder),t(cd.encode(n))})}const o0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<o0.length;e++)Fo[o0.charCodeAt(e)]=e;const s2=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=Fo[e.charCodeAt(r)],u=Fo[e.charCodeAt(r+1)],l=Fo[e.charCodeAt(r+2)],d=Fo[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},o2=typeof ArrayBuffer=="function",dd=(e,t)=>{if(typeof e!="string")return{type:"message",data:a0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:a2(e.substring(1),t)}:pu[n]?e.length>1?{type:pu[n],data:e.substring(1)}:{type:pu[n]}:ud},a2=(e,t)=>{if(o2){const n=s2(e);return a0(n,t)}else return{base64:!0,data:e}},a0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,u0="",u2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{ld(a,!1,l=>{r[u]=l,++s===n&&t(r.join(u0))})})},l2=(e,t)=>{const n=e.split(u0),r=[];for(let s=0;s<n.length;s++){const a=dd(n[s],t);if(r.push(a),a.type==="error")break}return r};function c2(){return new TransformStream({transform(e,t){i2(e,n=>{const r=n.length;let 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 fd;function mu(e){return e.reduce((t,n)=>t+n.length,0)}function gu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function d2(e,t){fd||(fd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,l){for(n.push(u);;){if(r===0){if(mu(n)<1)break;const d=gu(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(mu(n)<2)break;const d=gu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(mu(n)<8)break;const d=gu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(ud);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(mu(n)<s)break;const d=gu(n,s);l.enqueue(dd(a?d:fd.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(ud);break}}}})}const l0=4;function Nt(e){if(e)return f2(e)}function f2(e){for(var t in Nt.prototype)e[t]=Nt.prototype[t];return e}Nt.prototype.on=Nt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Nt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Nt.prototype.off=Nt.prototype.removeListener=Nt.prototype.removeAllListeners=Nt.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},Nt.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},Nt.prototype.emitReserved=Nt.prototype.emit,Nt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Nt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Eu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Un=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),h2="arraybuffer";function J7(){}function c0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const p2=Un.setTimeout,m2=Un.clearTimeout;function yu(e,t){t.useNativeTimers?(e.setTimeoutFn=p2.bind(Un),e.clearTimeoutFn=m2.bind(Un)):(e.setTimeoutFn=Un.setTimeout.bind(Un),e.clearTimeoutFn=Un.clearTimeout.bind(Un))}const g2=1.33;function E2(e){return typeof e=="string"?y2(e):Math.ceil((e.byteLength||e.size)*g2)}function y2(e){let t=0,n=0;for(let r=0,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 T2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function b2(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 _2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class hd extends Nt{constructor(t){super(),this.writable=!1,yu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new _2(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=dd(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=T2(t);return n.length?"?"+n:""}}class x2 extends hd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};l2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,u2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=d0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let f0=!1;try{f0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const w2=f0;function S2(){}class v2 extends x2{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Er extends Nt{constructor(t,n,r){super(),this.createRequest=t,yu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=c0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=Er.requestsCount++,Er.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=S2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Er.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Er.requestsCount=0,Er.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",h0);else if(typeof addEventListener=="function"){const e="onpagehide"in Un?"pagehide":"unload";addEventListener(e,h0,!1)}}function h0(){for(let e in Er.requests)Er.requests.hasOwnProperty(e)&&Er.requests[e].abort()}const A2=(function(){const e=p0({xdomain:!1});return e&&e.responseType!==null})();class N2 extends v2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=A2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Er(p0,this.uri(),t)}}function p0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||w2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Un[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const m0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class C2 extends hd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=m0?{}:c0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;ld(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Eu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=d0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const pd=Un.WebSocket||Un.MozWebSocket;class k2 extends C2{createSocket(t,n,r){return m0?new pd(t,n,r):n?new pd(t,n):new pd(t)}doWrite(t,n){this.ws.send(n)}}class O2 extends hd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=d2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=c2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:l,value:d})=>{l||(this.onPacket(d),a())}).catch(l=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Eu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const I2={websocket:k2,webtransport:O2,polling:N2},P2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,R2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function md(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=P2.exec(e||""),a={},u=14;for(;u--;)a[R2[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=L2(a,a.path),a.queryKey=D2(a,a.query),a}function L2(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function D2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const gd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Tu=[];gd&&addEventListener("offline",()=>{Tu.forEach(e=>e())},!1);class ei extends Nt{constructor(t,n){if(super(),this.binaryType=h2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=md(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=md(n.host).host);yu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=b2(this.opts.query)),gd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Tu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=l0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&ei.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",ei.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+=E2(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Eu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(ei.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(),gd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Tu.indexOf(this._offlineEventListener);r!==-1&&Tu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ei.protocol=l0;class M2 extends ei{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;ei.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;ei.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function l(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",l),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",l),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let F2=class extends M2{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=>I2[a]).filter(a=>!!a)),super(r?s:t,s)}};function B2(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=md(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const U2=typeof ArrayBuffer=="function",H2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,g0=Object.prototype.toString,j2=typeof Blob=="function"||typeof Blob!="undefined"&&g0.call(Blob)==="[object BlobConstructor]",z2=typeof File=="function"||typeof File!="undefined"&&g0.call(File)==="[object FileConstructor]";function Ed(e){return U2&&(e instanceof ArrayBuffer||H2(e))||j2&&e instanceof Blob||z2&&e instanceof File}function bu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(bu(e[n]))return!0;return!1}if(Ed(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return bu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&bu(e[n]))return!0;return!1}function $2(e){const t=[],n=e.data,r=e;return r.data=_u(n,t),r.attachments=t.length,{packet:r,buffers:t}}function _u(e,t,n){if(!e)return e;if(Ed(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=_u(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return _u(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=_u(e[s],t));return r}return e}function V2(e,t){return e.data=yd(e.data,t),delete e.attachments,e}function yd(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]=yd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=yd(e[n],t));return e}const q2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Qe;(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"})(Qe||(Qe={}));class Y2{constructor(t){this.replacer=t}encode(t){return(t.type===Qe.EVENT||t.type===Qe.ACK)&&bu(t)?this.encodeAsBinary({type:t.type===Qe.EVENT?Qe.BINARY_EVENT:Qe.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Qe.BINARY_EVENT||t.type===Qe.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=$2(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Td extends Nt{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===Qe.BINARY_EVENT;r||n.type===Qe.BINARY_ACK?(n.type=r?Qe.EVENT:Qe.ACK,this.reconstructor=new W2(n)):super.emitReserved("decoded",n)}else if(Ed(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(Qe[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Qe.BINARY_EVENT||r.type===Qe.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(!G2(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(Td.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 Qe.CONNECT:return E0(n);case Qe.DISCONNECT:return n===void 0;case Qe.CONNECT_ERROR:return typeof n=="string"||E0(n);case Qe.EVENT:case Qe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&q2.indexOf(n[0])===-1);case Qe.ACK:case Qe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class W2{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=V2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const G2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function E0(e){return Object.prototype.toString.call(e)==="[object Object]"}const X2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Td,Encoder:Y2,get PacketType(){return Qe}},Symbol.toStringTag,{value:"Module"}));function Qn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const K2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class y0 extends Nt{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=[Qn(t,"open",this.onopen.bind(this)),Qn(t,"packet",this.onpacket.bind(this)),Qn(t,"error",this.onerror.bind(this)),Qn(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(K2.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:Qe.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:Qe.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 Qe.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 Qe.EVENT:case Qe.BINARY_EVENT:this.onevent(t);break;case Qe.ACK:case Qe.BINARY_ACK:this.onack(t);break;case Qe.DISCONNECT:this.ondisconnect();break;case Qe.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:Qe.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:Qe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function As(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}As.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},As.prototype.reset=function(){this.attempts=0},As.prototype.setMin=function(e){this.ms=e},As.prototype.setMax=function(e){this.max=e},As.prototype.setJitter=function(e){this.jitter=e};class bd extends Nt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,yu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new As({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||X2;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 F2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=Qn(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=Qn(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(Qn(t,"ping",this.onping.bind(this)),Qn(t,"data",this.ondata.bind(this)),Qn(t,"error",this.onerror.bind(this)),Qn(t,"close",this.onclose.bind(this)),Qn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Eu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new y0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Bo={};function _d(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=B2(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Bo[s]&&a in Bo[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new bd(r,t):(Bo[s]||(Bo[s]=new bd(r,t)),d=Bo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(_d,{Manager:bd,Socket:y0,io:_d,connect:_d});const T0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&T0.call(Blob),typeof File=="function"||typeof File!="undefined"&&T0.call(File);var b0;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(b0||(b0={}));var H=Kn();const Mi=Xe(H);let Q2=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 J2{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 He(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 He(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
|
|
|
6
|
-
`))>=0;){const d=s.slice(0,
|
|
6
|
+
`))>=0;){const d=s.slice(0,l);s=s.slice(l+2),this.parseFrame(d)}}}catch(a){return a instanceof DOMException&&a.name==="AbortError"?void this.logger.debug("SSE stream aborted (intentional disconnect)"):(this.logger.error("SSE stream error:",a),this.reading=!1,void this.onClose(a instanceof Error?a.message:"Unknown stream error"))}finally{n.releaseLock()}this.reading=!1,this.logger.info("SSE stream ended"),this.onClose("stream_ended")})}parseFrame(t){let n="message";const r=[];for(const a of t.split(`
|
|
7
7
|
`))if(a.startsWith("event:"))n=a.slice(6).trim();else if(a.startsWith("data:")){const u=a.slice(5);r.push(u.startsWith(" ")?u.slice(1):u)}else a.startsWith(":");if(r.length===0)return;const s=r.join(`
|
|
8
|
-
`);this.logger.debug(`SSE event: ${n}`,s.slice(0,200)),this.onEvent(n,s)}}class Dr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let Q2=class extends Dr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class _0 extends Dr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let wd=class extends Dr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class J2{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}class Z2 extends X2{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,c,d,f,p,m,T;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=s.maxRetries)!=null?u:3,timeout:(c=s.timeout)!=null?c:15e3,maxReconnectAttempts:(d=s.maxReconnectAttempts)!=null?d:5,reconnectDelay:(f=s.reconnectDelay)!=null?f:2e3,enableLogging:(p=s.enableLogging)!=null?p:!1,platform:(m=s.platform)!=null?m:"Web",capabilitiesVersion:(T=s.capabilitiesVersion)!=null?T:"1"};this.maxRetries=a.maxRetries,this.timeout=a.timeout,this.maxReconnectAttempts=a.maxReconnectAttempts,this.reconnectDelay=a.reconnectDelay,this.platform=a.platform,this.capabilitiesVersion=a.capabilitiesVersion,this.logger=new J2(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return je(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return je(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return je(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Dr("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return je(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return je(this,null,function*(){var u,c,d;this.assertConnected();const n=new URLSearchParams;(t==null?void 0:t.inclClosedConvs)!=null&&n.set("inclClosedConvs",String(t.inclClosedConvs)),(t==null?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),t!=null&&t.conversationId&&n.set("conversationId",t.conversationId),(t==null?void 0:t.startTimestamp)!=null&&n.set("startTimestamp",String(t.startTimestamp)),(t==null?void 0:t.endTimestamp)!=null&&n.set("endTimestamp",String(t.endTimestamp));const r=n.toString(),s="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",s);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(c=a.openConversationsFound)!=null?c:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return je(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const s=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${s?`?${s}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}retrieveConversationTranscript(t){return je(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new Dr("No active conversation. Call createConversation() first or pass a conversationId.","unknown");const r=`/iamessage/api/v2/conversation/${n}/transcript?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`;return this.executeRequest("GET",r,void 0,{responseType:"blob"})})}resumeConversation(t){if(this.assertConnected(),!t)throw new Dr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return je(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}openSSE(t){return je(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new K2(n,r,(s,a)=>this.handleSSEEvent(s,a),s=>this.handleSSEClose(s),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>je(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const s=r instanceof Error?r.message:String(r);if(s.includes("(401)"))return this.logger.error("SSE rejected token (401) — session expired"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);this.logger.error(`Reconnect attempt ${this.reconnectAttempts} failed: ${s}`),this.attemptReconnect()}}),n)}clearReconnectTimer(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null)}handleSSEEvent(t,n){if(t==="ping")return;let r;try{r=JSON.parse(n)}catch(s){return void this.logger.debug(`Non-JSON SSE event (${t}): ${n.slice(0,100)}`)}switch(t){case"CONVERSATION_ROUTING_RESULT":this.handleRoutingResult(r);break;case"CONVERSATION_MESSAGE":this.handleConversationMessage(r);break;case"CONVERSATION_STREAMING_TOKEN":this.handleStreamingToken(r);break;case"CONVERSATION_TYPING_STARTED_INDICATOR":this.handleTypingStarted(r);break;case"CONVERSATION_TYPING_STOPPED_INDICATOR":this.handleTypingStopped(r);break;case"CONVERSATION_PROGRESS_INDICATOR":this.handleProgressIndicator(r);break;case"CONVERSATION_PARTICIPANT_CHANGED":this.handleParticipantChanged(r);break;case"CONVERSATION_CLOSE_CONVERSATION":this.handleConversationClosed(r);break;default:this.logger.debug(`Unhandled SSE event type: ${t}`)}}handleRoutingResult(t){let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.failureType||n.routingFailureType||"",s=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:s,failureType:s?void 0:r,raw:n}),s||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var c;const n=t.conversationEntry;if(!n)return;const r=((c=n.sender)==null?void 0:c.role)||"";if(r==="EndUser"||r==="Customer")return;const s=this.parseEntryPayload(n),a=this.getNestedValue(s,"abstractMessage"),u=this.getNestedString(a,"staticContent","text")||this.getNestedString(a,"content","text")||"";u&&this.emit("message",{conversationId:this._conversationId||"",messageId:n.identifier||"",content:u,sender:{role:r,name:n.senderDisplayName},timestamp:n.transcriptedTimestamp||new Date().toISOString(),raw:s})}handleStreamingToken(t){let n,r,s,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),c=this.getNestedValue(u,"streamingToken");a=this.getNestedString(c,"token","text")||this.getNestedString(c,"token","content")||"";const d=this.getNestedValue(c,"sequenceNumber");typeof d=="number"&&(n=d);const f=this.getNestedString(c,"targetMessageIdentifier");f&&(r=f);const p=this.getNestedString(c,"tokenType");p&&(s=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",U(U(U({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),s?{tokenType:s}:{})):this.logger.warn("STREAMING_TOKEN received but no token text could be extracted — payload shape may have changed")}handleTypingStarted(t){var n;this.emit("typing_started",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleTypingStopped(t){var n;this.emit("typing_stopped",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleProgressIndicator(t){const n=t.conversationEntry;if(!n)return;const r=this.parseEntryPayload(n),s=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(s,"progressMessage","text")||this.getNestedString(s,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(s,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var s,a,u,c,d,f,p;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries;if(r&&r.length>0)for(const m of r){const T=m.participant,y=m.displayName||(T==null?void 0:T.displayName)||((s=t.conversationEntry)==null?void 0:s.senderDisplayName)||"Agent",x=(T==null?void 0:T.role)||((u=(a=t.conversationEntry)==null?void 0:a.sender)==null?void 0:u.role)||"",N=m.operation||m.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(N)})}else{const m=((c=t.conversationEntry)==null?void 0:c.senderDisplayName)||n.participantName||((d=n.participant)==null?void 0:d.displayName)||"Agent",T=n.operation||n.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:((p=(f=t.conversationEntry)==null?void 0:f.sender)==null?void 0:p.role)||"",name:m},action:this.normalizeParticipantAction(T)})}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return je(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new wd("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,s){return je(this,null,function*(){const a=(s==null?void 0:s.useAuth)!==!1;let u=0;for(;;){let c;try{const d=new AbortController;c=setTimeout(()=>d.abort(),(s==null?void 0:s.timeout)||this.timeout);const f=U({"Content-Type":"application/json"},s==null?void 0:s.headers);a&&this._accessToken&&(f.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const m=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(c),!m.ok){const T=yield m.text().catch(()=>m.statusText);if(m.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new wd(`Request ${t} ${n} failed (401): continuation token expired or invalid. Reconnect without a continuation token to create a new session.`);if(this._conversationId)throw this.logger.warn("Got 401 with active conversation — cannot auto-refresh (would orphan conversation)"),new wd(`Request ${t} ${n} failed (401): session expired. Call connect() to start a new session.`);this.logger.info("Got 401 — refreshing token and retrying..."),this._accessToken=yield this.fetchAccessToken(),u++;continue}throw new Q2(`Request ${t} ${n} failed (${m.status}): ${T}`,m.status,T)}return m.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield m.blob():m.text().then(T=>T?JSON.parse(T):null)}catch(d){if(clearTimeout(c),d instanceof Dr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new _0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),p=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(m=>setTimeout(m,p));continue}throw new _0(`Network error: ${d.message}`,u,{cause:d})}throw new Dr(`Unexpected error: ${d instanceof Error?d.message:String(d)}`,"unknown",{cause:d instanceof Error?d:void 0})}}})}assertConnected(){if(!this._isConnected||!this._accessToken)throw new Dr("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const s of n){if(r==null||typeof r!="object")return;r=r[s]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}}const P="cim-widget",An=`--${P}`,ti={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},eS=(e=ti)=>({[`${An}-primary-color`]:e.primaryColor||ti.primaryColor,[`${An}-secondary-color`]:e.secondaryColor||ti.secondaryColor,[`${An}-font-color`]:e.fontColor||ti.fontColor,[`${An}-font-family`]:e.fontFamily||ti.fontFamily,[`${An}-background-color`]:e.backgroundColor||ti.backgroundColor,[`${An}-border-color`]:e.borderColor||ti.borderColor,[`${An}-border-radius`]:e.borderRadius||ti.borderRadius});function x0(e,t){return function(){return e.apply(t,arguments)}}const{toString:tS}=Object.prototype,{getPrototypeOf:Ns}=Object,{iterator:Uo,toStringTag:w0}=Symbol,Su=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ho=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Su(n,t))return!0;n=Ns(n)}return!1},nS=(e,t)=>e!=null&&Ho(e,t)?e[t]:void 0,Sd=(e=>t=>{const n=tS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Qn=e=>(e=e.toLowerCase(),t=>Sd(t)===e),vu=e=>t=>typeof t===e,{isArray:Fi}=Array,Cs=vu("undefined");function ks(e){return e!==null&&!Cs(e)&&e.constructor!==null&&!Cs(e.constructor)&&fn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const S0=Qn("ArrayBuffer");function rS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&S0(e.buffer),t}const iS=vu("string"),fn=vu("function"),v0=vu("number"),Os=e=>e!==null&&typeof e=="object",sS=e=>e===!0||e===!1,Au=e=>{if(!Os(e))return!1;const t=Ns(e);return(t===null||t===Object.prototype||Ns(t)===null)&&!Ho(e,w0)&&!Ho(e,Uo)},oS=e=>{if(!Os(e)||ks(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},aS=Qn("Date"),uS=Qn("File"),lS=e=>!!(e&&typeof e.uri!="undefined"),cS=e=>e&&typeof e.getParts!="undefined",dS=Qn("Blob"),fS=Qn("FileList"),hS=e=>Os(e)&&fn(e.pipe);function pS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const A0=pS(),N0=typeof A0.FormData!="undefined"?A0.FormData:void 0,mS=e=>{if(!e)return!1;if(N0&&e instanceof N0)return!0;const t=Ns(e);if(!t||t===Object.prototype||!fn(e.append))return!1;const n=Sd(e);return n==="formdata"||n==="object"&&fn(e.toString)&&e.toString()==="[object FormData]"},gS=Qn("URLSearchParams"),[ES,yS,TS,bS]=["ReadableStream","Request","Response","Headers"].map(Qn),_S=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Fi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(ks(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function C0(e,t){if(ks(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Bi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,k0=e=>!Cs(e)&&e!==Bi;function vd(...e){const{caseless:t,skipUndefined:n}=k0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&C0(r,u)||u,d=Su(r,c)?r[c]:void 0;Au(d)&&Au(a)?r[c]=vd(d,a):Au(a)?r[c]=vd({},a):Fi(a)?r[c]=a.slice():(!n||!Cs(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||ks(c)||(jo(c,s),typeof c!="object"||Fi(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let f=0;f<d.length;f++){const p=d[f];RS.call(c,p)&&s(c[p],p)}}return r}const xS=(e,t,n,{allOwnKeys:r}={})=>(jo(t,(s,a)=>{n&&fn(s)?Object.defineProperty(e,a,{__proto__:null,value:x0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),wS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),SS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},vS=(e,t,n,r)=>{let s,a,u;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&Ns(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},AS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},NS=e=>{if(!e)return null;if(Fi(e))return e;let t=e.length;if(!v0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},CS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ns(Uint8Array)),kS=(e,t)=>{const r=(e&&e[Uo]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},OS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},IS=Qn("HTMLFormElement"),PS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:RS}=Object.prototype,LS=Qn("RegExp"),O0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};jo(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},DS=e=>{O0(e,(t,n)=>{if(fn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(fn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},MS=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Fi(e)?r(e):r(String(e).split(t)),n},FS=()=>{},BS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function US(e){return!!(e&&fn(e.append)&&e[w0]==="FormData"&&e[Uo])}const HS=e=>{const t=new WeakSet,n=r=>{if(Os(r)){if(t.has(r))return;if(ks(r))return r;if(!("toJSON"in r)){t.add(r);const s=Fi(r)?[]:{};return jo(r,(a,u)=>{const c=n(a);!Cs(c)&&(s[u]=c)}),t.delete(r),s}}return r};return n(e)},jS=Qn("AsyncFunction"),zS=e=>e&&(Os(e)||fn(e))&&fn(e.then)&&fn(e.catch),I0=((e,t)=>e?setImmediate:t?((n,r)=>(Bi.addEventListener("message",({source:s,data:a})=>{s===Bi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Bi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",fn(Bi.postMessage)),$S=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Bi):typeof process!="undefined"&&process.nextTick||I0,P0=e=>e!=null&&fn(e[Uo]),W={isArray:Fi,isArrayBuffer:S0,isBuffer:ks,isFormData:mS,isArrayBufferView:rS,isString:iS,isNumber:v0,isBoolean:sS,isObject:Os,isPlainObject:Au,isEmptyObject:oS,isReadableStream:ES,isRequest:yS,isResponse:TS,isHeaders:bS,isUndefined:Cs,isDate:aS,isFile:uS,isReactNativeBlob:lS,isReactNative:cS,isBlob:dS,isRegExp:LS,isFunction:fn,isStream:hS,isURLSearchParams:gS,isTypedArray:CS,isFileList:fS,forEach:jo,merge:vd,extend:xS,trim:_S,stripBOM:wS,inherits:SS,toFlatObject:vS,kindOf:Sd,kindOfTest:Qn,endsWith:AS,toArray:NS,forEachEntry:kS,matchAll:OS,isHTMLForm:IS,hasOwnProperty:Su,hasOwnProp:Su,hasOwnInPrototypeChain:Ho,getSafeProp:nS,reduceDescriptors:O0,freezeMethods:DS,toObjectSet:MS,toCamelCase:PS,noop:FS,toFiniteNumber:BS,findKey:C0,global:Bi,isContextDefined:k0,isSpecCompliantForm:US,toJSONObject:HS,isAsyncFn:jS,isThenable:zS,setImmediate:I0,asap:$S,isIterable:P0,isSafeIterable:e=>e!=null&&Ho(e,Uo)&&P0(e)},VS=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),qS=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
9
|
-
`).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&
|
|
10
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[L0]=this[L0]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=zo(u);r[c]||(ev(s,u),r[c]=!0)}return W.isArray(t)?t.forEach(a):a(t),this}};Wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(Wt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),W.freezeMethods(Wt);const tv="[REDACTED ****]";function nv(e){if(W.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(W.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function rv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||W.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof Wt&&(a=a.toJSON()),r.push(a);let u;if(W.isArray(a))u=[],a.forEach((c,d)=>{const f=s(c);W.isUndefined(f)||(u[d]=f)});else{if(!W.isPlainObject(a)&&nv(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?tv:s(d);W.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}let xe=class Zw extends Error{static from(t,n,r,s,a,u){const c=new Zw(t.message,n||t.code,r,s,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,s,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&W.hasOwnProp(t,"redact")?t.redact:void 0,r=W.isArray(n)&&n.length>0?rv(t,n):W.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};xe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",xe.ERR_BAD_OPTION="ERR_BAD_OPTION",xe.ECONNABORTED="ECONNABORTED",xe.ETIMEDOUT="ETIMEDOUT",xe.ECONNREFUSED="ECONNREFUSED",xe.ERR_NETWORK="ERR_NETWORK",xe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",xe.ERR_DEPRECATED="ERR_DEPRECATED",xe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",xe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",xe.ERR_CANCELED="ERR_CANCELED",xe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",xe.ERR_INVALID_URL="ERR_INVALID_URL",xe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const iv=null,D0=100;function Cd(e){return W.isPlainObject(e)||W.isArray(e)}function M0(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function kd(e,t,n){return e?e.concat(t).map(function(s,a){return s=M0(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function sv(e){return W.isArray(e)&&!e.some(Cd)}const ov=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function Cu(e,t,n){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,R){return!W.isUndefined(R[C])});const r=n.metaTokens,s=n.visitor||x,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?D0:n.maxDepth,f=c&&W.isSpecCompliantForm(t),p=[];if(!W.isFunction(s))throw new TypeError("visitor must be a function");function m(v){if(v===null)return"";if(W.isDate(v))return v.toISOString();if(W.isBoolean(v))return v.toString();if(!f&&W.isBlob(v))throw new xe("Blob is not supported. Use a Buffer instead.");if(W.isArrayBuffer(v)||W.isTypedArray(v)){if(f&&typeof c=="function")return new c([v]);if(typeof Buffer!="undefined")return Buffer.from(v);throw new xe("Blob is not supported. Use a Buffer instead.",xe.ERR_NOT_SUPPORT)}return v}function T(v){if(v>d)throw new xe("Object is too deeply nested ("+v+" levels). Max depth: "+d,xe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(v,C){if(d===1/0)return JSON.stringify(v);const R=[];return JSON.stringify(v,function(G,D){if(!W.isObject(D))return D;for(;R.length&&R[R.length-1]!==this;)R.pop();return R.push(D),T(C+R.length-1),D})}function x(v,C,R){let $=v;if(W.isReactNative(t)&&W.isReactNativeBlob(v))return t.append(kd(R,C,a),m(v)),!1;if(v&&!R&&typeof v=="object"){if(W.endsWith(C,"{}"))C=r?C:C.slice(0,-2),v=y(v,1);else if(W.isArray(v)&&sv(v)||(W.isFileList(v)||W.endsWith(C,"[]"))&&($=W.toArray(v)))return C=M0(C),$.forEach(function(D,J){!(W.isUndefined(D)||D===null)&&t.append(u===!0?kd([C],J,a):u===null?C:C+"[]",m(D))}),!1}return Cd(v)?!0:(t.append(kd(R,C,a),m(v)),!1)}const N=Object.assign(ov,{defaultVisitor:x,convertValue:m,isVisitable:Cd});function A(v,C,R=0){if(!W.isUndefined(v)){if(T(R),p.indexOf(v)!==-1)throw new Error("Circular reference detected in "+C.join("."));p.push(v),W.forEach(v,function(G,D){(!(W.isUndefined(G)||G===null)&&s.call(t,G,W.isString(D)?D.trim():D,C,N))===!0&&A(G,C?C.concat(D):[D],R+1)}),p.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return A(e),t}function F0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Od(e,t){this._pairs=[],e&&Cu(e,this,t)}const B0=Od.prototype;B0.append=function(t,n){this._pairs.push([t,n])},B0.toString=function(t){const n=t?r=>t.call(this,r,F0):F0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function av(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function U0(e,t,n){if(!t)return e;e=e||"";const r=W.isFunction(n)?{serialize:n}:n,s=W.getSafeProp(r,"encode")||av,a=W.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=W.isURLSearchParams(t)?t.toString():new Od(t,r).toString(s),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class H0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Id={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},uv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Od,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Pd=typeof window!="undefined"&&typeof document!="undefined",Rd=typeof navigator=="object"&&navigator||void 0,lv=Pd&&(!Rd||["ReactNative","NativeScript","NS"].indexOf(Rd.product)<0),cv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dv=Pd&&window.location.href||"http://localhost",zt=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pd,hasStandardBrowserEnv:lv,hasStandardBrowserWebWorkerEnv:cv,navigator:Rd,origin:dv},Symbol.toStringTag,{value:"Module"}))),uv);function fv(e,t){return Cu(e,new zt.classes.URLSearchParams,U({visitor:function(n,r,s,a){return zt.isNode&&W.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const j0=D0;function z0(e){if(e>j0)throw new xe("FormData field is too deeply nested ("+e+" levels). Max depth: "+j0,xe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function hv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)z0(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function pv(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function $0(e){function t(n,r,s,a){z0(a);let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&W.isArray(s)?s.length:u,d?(W.hasOwnProp(s,u)?s[u]=W.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!W.hasOwnProp(s,u)||!W.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&W.isArray(s[u])&&(s[u]=pv(s[u])),!c)}if(W.isFormData(e)&&W.isFunction(e.entries)){const n={};return W.forEachEntry(e,(r,s)=>{t(hv(r),s,n,0)}),n}return null}const Is=(e,t)=>e!=null&&W.hasOwnProp(e,t)?e[t]:void 0;function mv(e,t,n){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const $o={transitional:Id,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=W.isObject(t);if(a&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return s?JSON.stringify($0(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=Is(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return fv(t,d).toString();if((c=W.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Is(this,"env"),p=f&&f.FormData;return Cu(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),mv(t)):t}],transformResponse:[function(t){const n=Is(this,"transitional")||$o.transitional,r=n&&n.forcedJSONParsing,s=Is(this,"responseType"),a=s==="json";if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Is(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?xe.from(d,xe.ERR_BAD_RESPONSE,this,null,Is(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zt.classes.FormData,Blob:zt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch","query"],e=>{$o.headers[e]={}});function Ld(e,t){const n=this||$o,r=t||n,s=Wt.from(r.headers);let a=r.data;return W.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function V0(e){return!!(e&&e.__CANCEL__)}let Vo=class extends xe{constructor(t,n,r){super(t==null?"canceled":t,xe.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function q0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new xe("Request failed with status code "+n.status,n.status>=400&&n.status<500?xe.ERR_BAD_REQUEST:xe.ERR_BAD_RESPONSE,n.config,n.request,n))}function gv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Ev(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,T=0;for(;m!==s;)T+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(T*1e3/y):void 0}}function yv(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const ku=(e,t,n=3)=>{let r=0;const s=Ev(50,250);return yv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},Y0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},W0=e=>(...t)=>W.asap(()=>e(...t)),Tv=zt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,zt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(zt.origin),zt.navigator&&/(msie|trident)/i.test(zt.navigator.userAgent)):()=>!0,bv=zt.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];W.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),W.isString(r)&&c.push(`path=${r}`),W.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),W.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _v(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function xv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const wv=/^https?:(?!\/\/)/i,Sv=/[\t\n\r]/g;function vv(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Av(e){return vv(e).replace(Sv,"")}function G0(e,t){if(typeof e=="string"&&wv.test(Av(e)))throw new xe('Invalid URL: missing "//" after protocol',xe.ERR_INVALID_URL,t)}function X0(e,t,n,r){G0(t,r);let s=!_v(t);return e&&(s||n===!1)?(G0(e,r),xv(e,t)):t}const K0=e=>e instanceof Wt?U({},e):e;function Ui(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,T,y){return W.isPlainObject(p)&&W.isPlainObject(m)?W.merge.call({caseless:y},p,m):W.isPlainObject(m)?W.merge({},m):W.isArray(m)?m.slice():m}function s(p,m,T,y){if(W.isUndefined(m)){if(!W.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!W.isUndefined(m))return r(void 0,m)}function u(p,m){if(W.isUndefined(m)){if(!W.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p){const m=W.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!W.isUndefined(m))if(W.isPlainObject(m)){if(W.hasOwnProp(m,p))return m[p]}else return;const T=W.hasOwnProp(e,"transitional")?e.transitional:void 0;if(W.isPlainObject(T)&&W.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(W.hasOwnProp(t,T))return r(p,m);if(W.hasOwnProp(e,T))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,T)=>s(K0(p),K0(m),T,!0)};return W.forEach(Object.keys(U(U({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=W.hasOwnProp(f,m)?f[m]:s,y=W.hasOwnProp(e,m)?e[m]:void 0,x=W.hasOwnProp(t,m)?t[m]:void 0,N=T(y,x,m);W.isUndefined(N)&&T!==d||(n[m]=N)}),W.hasOwnProp(t,"validateStatus")&&W.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(W.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const Nv=["content-type","content-length"];function Cv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{Nv.includes(r.toLowerCase())&&e.set(r,s)})}const kv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Q0(e){const t=Ui({},e),n=T=>W.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=Wt.from(c),t.url=U0(X0(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=W.getSafeProp(d,"username")||"",y=W.getSafeProp(d,"password")||"";try{c.set("Authorization","Basic "+btoa(T+":"+(y?kv(y):"")))}catch(x){throw xe.from(x,xe.ERR_BAD_OPTION_VALUE,e)}}if(W.isFormData(r)&&(zt.hasStandardBrowserEnv||zt.hasStandardBrowserWebWorkerEnv||W.isReactNative(r)?c.setContentType(void 0):W.isFunction(r.getHeaders)&&Cv(c,r.getHeaders(),n("formDataHeaderPolicy"))),zt.hasStandardBrowserEnv&&(W.isFunction(s)&&(s=s(t)),s===!0||s==null&&Tv(t.url))){const y=a&&u&&bv.read(u);y&&c.set(a,y)}return t}const Ov=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=Q0(e);let a=s.data;const u=Wt.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,m,T,y,x;function N(){y&&y(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function v(){if(!A)return;const R=Wt.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),G={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:R,config:e,request:A};q0(function(J){n(J),N()},function(J){r(J),N()},G),A=null}"onloadend"in A?A.onloadend=v:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(v)},A.onabort=function(){A&&(r(new xe("Request aborted",xe.ECONNABORTED,e,A)),N(),A=null)},A.onerror=function($){const G=$&&$.message?$.message:"Network Error",D=new xe(G,xe.ERR_NETWORK,e,A);D.event=$||null,r(D),N(),A=null},A.ontimeout=function(){let $=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const G=s.transitional||Id;s.timeoutErrorMessage&&($=s.timeoutErrorMessage),r(new xe($,G.clarifyTimeoutError?xe.ETIMEDOUT:xe.ECONNABORTED,e,A)),N(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&W.forEach(R0(u),function($,G){A.setRequestHeader(G,$)}),W.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),c&&c!=="json"&&(A.responseType=s.responseType),f&&([T,x]=ku(f,!0),A.addEventListener("progress",T)),d&&A.upload&&([m,y]=ku(d),A.upload.addEventListener("progress",m),A.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=R=>{A&&(r(!R||R.type?new Vo(null,e,A):R),A.abort(),N(),A=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const C=gv(s.url);if(C&&!zt.protocols.includes(C)){r(new xe("Unsupported protocol "+C+":",xe.ERR_BAD_REQUEST,e)),N();return}A.send(a||null)})},Iv=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof xe?f:new Vo(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new xe(`timeout of ${t}ms exceeded`,xe.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>W.asap(u),c},Pv=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Rv=function(e,t){return Zm(this,null,function*(){try{for(var n=Jw(Lv(e)),r,s,a;r=!(s=yield new ws(n.next())).done;r=!1){const u=s.value;yield*e0(Pv(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new ws(s.call(n)))}finally{if(a)throw a[0]}}})},Lv=function(e){return Zm(this,null,function*(){if(e[Symbol.asyncIterator]){yield*e0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new ws(t.read());if(n)break;yield r}}finally{yield new ws(t.cancel())}})},J0=(e,t,n,r)=>{const s=Rv(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return je(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){c(),f.close();return}let T=m.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}})},cancel(f){return c(f),s.return()}},{highWaterMark:2})},Ou=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Dv=(e,t,n)=>t+2<n&&Ou(e.charCodeAt(t+1))&&Ou(e.charCodeAt(t+2));function Mv(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const x=r.charCodeAt(y+1),N=r.charCodeAt(y+2);Ou(x)&&Ou(N)&&(u-=2,y+=2)}let d=0,f=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const T=Math.floor(u/4)*3-(d||0);return T>0?T:0}let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d===37&&Dv(r,u,c))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Dd="1.18.1",Z0=64*1024,{isFunction:Iu}=W,Fv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),eg=e=>{if(!W.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},tg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Bv=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Uv=e=>{const t=W.global!==void 0&&W.global!==null?W.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=W.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,c=s?Iu(s):typeof fetch=="function",d=Iu(a),f=Iu(u);if(!c)return!1;const p=c&&Iu(n),m=c&&(typeof r=="function"?(v=>C=>v.encode(C))(new r):v=>je(null,null,function*(){return new Uint8Array(yield new a(v).arrayBuffer())})),T=d&&p&&tg(()=>{let v=!1;const C=new a(zt.origin,{body:new n,method:"POST",get duplex(){return v=!0,"half"}}),R=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),v&&!R}),y=f&&p&&tg(()=>W.isReadableStream(new u("").body)),x={stream:y&&(v=>v.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!x[v]&&(x[v]=(C,R)=>{let $=C&&C[v];if($)return $.call(C);throw new xe(`Response type '${v}' is not supported`,xe.ERR_NOT_SUPPORT,R)})});const N=v=>je(null,null,function*(){if(v==null)return 0;if(W.isBlob(v))return v.size;if(W.isSpecCompliantForm(v))return(yield new a(zt.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(W.isArrayBufferView(v)||W.isArrayBuffer(v))return v.byteLength;if(W.isURLSearchParams(v)&&(v=v+""),W.isString(v))return(yield m(v)).byteLength}),A=(v,C)=>je(null,null,function*(){const R=W.toFiniteNumber(v.getContentLength());return R==null?N(C):R});return v=>je(null,null,function*(){let{url:C,method:R,data:$,signal:G,cancelToken:D,timeout:J,onDownloadProgress:se,onUploadProgress:he,responseType:V,headers:ie,withCredentials:ee="same-origin",fetchOptions:we,maxContentLength:de,maxBodyLength:ae}=Q0(v);const _e=W.isNumber(de)&&de>-1,ue=W.isNumber(ae)&&ae>-1,z=ye=>W.hasOwnProp(v,ye)?v[ye]:void 0;let Z=s||fetch;V=V?(V+"").toLowerCase():"text";let w=Iv([G,D&&D.toAbortSignal()],J),k=null;const q=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let O,pe=null;const Oe=()=>new xe("Request body larger than maxBodyLength limit",xe.ERR_BAD_REQUEST,v,k);try{let ye;const Re=z("auth");if(Re){const Ue=W.getSafeProp(Re,"username")||"",Ct=W.getSafeProp(Re,"password")||"";ye={username:Ue,password:Ct}}if(Bv(C)){const Ue=new URL(C,zt.origin);if(!ye&&(Ue.username||Ue.password)){const Ct=eg(Ue.username),In=eg(Ue.password);ye={username:Ct,password:In}}(Ue.username||Ue.password)&&(Ue.username="",Ue.password="",C=Ue.href)}if(ye&&(ie.delete("authorization"),ie.set("Authorization","Basic "+btoa(Fv((ye.username||"")+":"+(ye.password||""))))),_e&&typeof C=="string"&&C.startsWith("data:")&&Mv(C)>de)throw new xe("maxContentLength size of "+de+" exceeded",xe.ERR_BAD_RESPONSE,v,k);if(ue&&R!=="get"&&R!=="head"){const Ue=yield N($);if(typeof Ue=="number"&&isFinite(Ue)&&(O=Ue,Ue>ae))throw Oe()}const Be=ue&&(W.isReadableStream($)||W.isStream($)),Ke=(Ue,Ct,In)=>J0(Ue,Z0,bn=>{if(ue&&bn>ae)throw pe=Oe();Ct&&Ct(bn)},In);if(T&&R!=="get"&&R!=="head"&&(he||Be)){if(O=O==null?yield A(ie,$):O,O!==0||Be){let Ue=new a(C,{method:"POST",body:$,duplex:"half"}),Ct;if(W.isFormData($)&&(Ct=Ue.headers.get("content-type"))&&ie.setContentType(Ct),Ue.body){const[In,bn]=he&&Y0(O,ku(W0(he)))||[];$=Ke(Ue.body,In,bn)}}}else if(Be&&!d&&p&&R!=="get"&&R!=="head")$=Ke($);else if(Be&&d&&!T&&R!=="get"&&R!=="head")throw new xe("Stream request bodies are not supported by the current fetch implementation",xe.ERR_NOT_SUPPORT,v,k);W.isString(ee)||(ee=ee?"include":"omit");const Tt=d&&"credentials"in a.prototype;if(W.isFormData($)){const Ue=ie.getContentType();Ue&&/^multipart\/form-data/i.test(Ue)&&!/boundary=/i.test(Ue)&&ie.delete("content-type")}ie.set("User-Agent","axios/"+Dd,!1);const jn=oe(U({},we),{signal:w,method:R.toUpperCase(),headers:R0(ie.normalize()),body:$,duplex:"half",credentials:Tt?ee:void 0});k=d&&new a(C,jn);let Tn=yield d?Z(k,we):Z(C,jn);const $r=Wt.from(Tn.headers);if(_e){const Ue=W.toFiniteNumber($r.getContentLength());if(Ue!=null&&Ue>de)throw new xe("maxContentLength size of "+de+" exceeded",xe.ERR_BAD_RESPONSE,v,k)}const Vr=y&&(V==="stream"||V==="response");if(y&&Tn.body&&(se||_e||Vr&&q)){const Ue={};["status","statusText","headers"].forEach(or=>{Ue[or]=Tn[or]});const Ct=W.toFiniteNumber($r.getContentLength()),[In,bn]=se&&Y0(Ct,ku(W0(se),!0))||[];let sr=0;const Cr=or=>{if(_e&&(sr=or,sr>de))throw new xe("maxContentLength size of "+de+" exceeded",xe.ERR_BAD_RESPONSE,v,k);In&&In(or)};Tn=new u(J0(Tn.body,Z0,Cr,()=>{bn&&bn(),q&&q()}),Ue)}V=V||"text";let an=yield x[W.findKey(x,V)||"text"](Tn,v);if(_e&&!y&&!Vr){let Ue;if(an!=null&&(typeof an.byteLength=="number"?Ue=an.byteLength:typeof an.size=="number"?Ue=an.size:typeof an=="string"&&(Ue=typeof r=="function"?new r().encode(an).byteLength:an.length)),typeof Ue=="number"&&Ue>de)throw new xe("maxContentLength size of "+de+" exceeded",xe.ERR_BAD_RESPONSE,v,k)}return!Vr&&q&&q(),yield new Promise((Ue,Ct)=>{q0(Ue,Ct,{data:an,headers:Wt.from(Tn.headers),status:Tn.status,statusText:Tn.statusText,config:v,request:k})})}catch(ye){if(q&&q(),w&&w.aborted&&w.reason instanceof xe){const Re=w.reason;throw Re.config=v,k&&(Re.request=k),ye!==Re&&Object.defineProperty(Re,"cause",{__proto__:null,value:ye,writable:!0,enumerable:!1,configurable:!0}),Re}if(pe)throw k&&!pe.request&&(pe.request=k),pe;if(ye instanceof xe)throw k&&!ye.request&&(ye.request=k),ye;if(ye&&ye.name==="TypeError"&&/Load failed|fetch/i.test(ye.message)){const Re=new xe("Network Error",xe.ERR_NETWORK,v,k,ye&&ye.response);throw Object.defineProperty(Re,"cause",{__proto__:null,value:ye.cause||ye,writable:!0,enumerable:!1,configurable:!0}),Re}throw xe.from(ye,ye&&ye.code,v,k,ye&&ye.response)}})},Hv=new Map,ng=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,c=u,d,f,p=Hv;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:Uv(t)),p=f;return f};ng();const Md={http:iv,xhr:Ov,fetch:{get:ng}};W.forEach(Md,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const rg=e=>`- ${e}`,jv=e=>W.isFunction(e)||e===null||e===!1;function zv(e,t){e=W.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(s=r,!jv(r)&&(s=Md[(c=String(r)).toLowerCase()],s===void 0))throw new xe(`Unknown adapter '${c}'`);if(s&&(W.isFunction(s)||(s=s.get(t))))break;a[c||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
|
|
8
|
+
`);this.logger.debug(`SSE event: ${n}`,s.slice(0,200)),this.onEvent(n,s)}}class Fr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let Z2=class extends Fr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class _0 extends Fr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let xd=class extends Fr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class eS{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}class tS extends Q2{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,l,d,f,p,m,T;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=s.maxRetries)!=null?u:3,timeout:(l=s.timeout)!=null?l:15e3,maxReconnectAttempts:(d=s.maxReconnectAttempts)!=null?d:5,reconnectDelay:(f=s.reconnectDelay)!=null?f:2e3,enableLogging:(p=s.enableLogging)!=null?p:!1,platform:(m=s.platform)!=null?m:"Web",capabilitiesVersion:(T=s.capabilitiesVersion)!=null?T:"1"};this.maxRetries=a.maxRetries,this.timeout=a.timeout,this.maxReconnectAttempts=a.maxReconnectAttempts,this.reconnectDelay=a.reconnectDelay,this.platform=a.platform,this.capabilitiesVersion=a.capabilitiesVersion,this.logger=new eS(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return He(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return He(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return He(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Fr("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return He(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return He(this,null,function*(){var u,l,d;this.assertConnected();const n=new URLSearchParams;(t==null?void 0:t.inclClosedConvs)!=null&&n.set("inclClosedConvs",String(t.inclClosedConvs)),(t==null?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),t!=null&&t.conversationId&&n.set("conversationId",t.conversationId),(t==null?void 0:t.startTimestamp)!=null&&n.set("startTimestamp",String(t.startTimestamp)),(t==null?void 0:t.endTimestamp)!=null&&n.set("endTimestamp",String(t.endTimestamp));const r=n.toString(),s="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",s);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(l=a.openConversationsFound)!=null?l:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return He(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const s=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${s?`?${s}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}retrieveConversationTranscript(t){return He(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new Fr("No active conversation. Call createConversation() first or pass a conversationId.","unknown");const r=`/iamessage/api/v2/conversation/${n}/transcript?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`;return this.executeRequest("GET",r,void 0,{responseType:"blob"})})}resumeConversation(t){if(this.assertConnected(),!t)throw new Fr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return He(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}openSSE(t){return He(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new J2(n,r,(s,a)=>this.handleSSEEvent(s,a),s=>this.handleSSEClose(s),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>He(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const s=r instanceof Error?r.message:String(r);if(s.includes("(401)"))return this.logger.error("SSE rejected token (401) — session expired"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);this.logger.error(`Reconnect attempt ${this.reconnectAttempts} failed: ${s}`),this.attemptReconnect()}}),n)}clearReconnectTimer(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null)}handleSSEEvent(t,n){if(t==="ping")return;let r;try{r=JSON.parse(n)}catch(s){return void this.logger.debug(`Non-JSON SSE event (${t}): ${n.slice(0,100)}`)}switch(t){case"CONVERSATION_ROUTING_RESULT":this.handleRoutingResult(r);break;case"CONVERSATION_MESSAGE":this.handleConversationMessage(r);break;case"CONVERSATION_STREAMING_TOKEN":this.handleStreamingToken(r);break;case"CONVERSATION_TYPING_STARTED_INDICATOR":this.handleTypingStarted(r);break;case"CONVERSATION_TYPING_STOPPED_INDICATOR":this.handleTypingStopped(r);break;case"CONVERSATION_PROGRESS_INDICATOR":this.handleProgressIndicator(r);break;case"CONVERSATION_PARTICIPANT_CHANGED":this.handleParticipantChanged(r);break;case"CONVERSATION_CLOSE_CONVERSATION":this.handleConversationClosed(r);break;default:this.logger.debug(`Unhandled SSE event type: ${t}`)}}handleRoutingResult(t){let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.failureType||n.routingFailureType||"",s=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:s,failureType:s?void 0:r,raw:n}),s||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var l;const n=t.conversationEntry;if(!n)return;const r=((l=n.sender)==null?void 0:l.role)||"";if(r==="EndUser"||r==="Customer")return;const s=this.parseEntryPayload(n),a=this.getNestedValue(s,"abstractMessage"),u=this.getNestedString(a,"staticContent","text")||this.getNestedString(a,"content","text")||"";u&&this.emit("message",{conversationId:this._conversationId||"",messageId:n.identifier||"",content:u,sender:{role:r,name:n.senderDisplayName},timestamp:n.transcriptedTimestamp||new Date().toISOString(),raw:s})}handleStreamingToken(t){let n,r,s,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),l=this.getNestedValue(u,"streamingToken");a=this.getNestedString(l,"token","text")||this.getNestedString(l,"token","content")||"";const d=this.getNestedValue(l,"sequenceNumber");typeof d=="number"&&(n=d);const f=this.getNestedString(l,"targetMessageIdentifier");f&&(r=f);const p=this.getNestedString(l,"tokenType");p&&(s=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",U(U(U({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),s?{tokenType:s}:{})):this.logger.warn("STREAMING_TOKEN received but no token text could be extracted — payload shape may have changed")}handleTypingStarted(t){var n;this.emit("typing_started",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleTypingStopped(t){var n;this.emit("typing_stopped",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleProgressIndicator(t){const n=t.conversationEntry;if(!n)return;const r=this.parseEntryPayload(n),s=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(s,"progressMessage","text")||this.getNestedString(s,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(s,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var a,u,l,d,f;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries,s=(a=t.conversationEntry)==null?void 0:a.identifier;if(r&&r.length>0)r.forEach((p,m)=>{var A,S,C;const T=p.participant,y=p.displayName||(T==null?void 0:T.displayName)||((A=t.conversationEntry)==null?void 0:A.senderDisplayName)||"Agent",x=(T==null?void 0:T.role)||((C=(S=t.conversationEntry)==null?void 0:S.sender)==null?void 0:C.role)||"",v=p.operation||p.event||"";this.emit("participant_changed",U({conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(v)},s?{entryId:r.length>1?`${s}:${m}`:s}:{}))});else{const p=((u=t.conversationEntry)==null?void 0:u.senderDisplayName)||n.participantName||((l=n.participant)==null?void 0:l.displayName)||"Agent",m=n.operation||n.event||"";this.emit("participant_changed",U({conversationId:this._conversationId||"",participant:{role:((f=(d=t.conversationEntry)==null?void 0:d.sender)==null?void 0:f.role)||"",name:p},action:this.normalizeParticipantAction(m)},s?{entryId:s}:{}))}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return He(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new xd("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,s){return He(this,null,function*(){const a=(s==null?void 0:s.useAuth)!==!1;let u=0;for(;;){let l;try{const d=new AbortController;l=setTimeout(()=>d.abort(),(s==null?void 0:s.timeout)||this.timeout);const f=U({"Content-Type":"application/json"},s==null?void 0:s.headers);a&&this._accessToken&&(f.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const m=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(l),!m.ok){const T=yield m.text().catch(()=>m.statusText);if(m.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new xd(`Request ${t} ${n} failed (401): continuation token expired or invalid. Reconnect without a continuation token to create a new session.`);if(this._conversationId)throw this.logger.warn("Got 401 with active conversation — cannot auto-refresh (would orphan conversation)"),new xd(`Request ${t} ${n} failed (401): session expired. Call connect() to start a new session.`);this.logger.info("Got 401 — refreshing token and retrying..."),this._accessToken=yield this.fetchAccessToken(),u++;continue}throw new Z2(`Request ${t} ${n} failed (${m.status}): ${T}`,m.status,T)}return m.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield m.blob():m.text().then(T=>T?JSON.parse(T):null)}catch(d){if(clearTimeout(l),d instanceof Fr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new _0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),p=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(m=>setTimeout(m,p));continue}throw new _0(`Network error: ${d.message}`,u,{cause:d})}throw new Fr(`Unexpected error: ${d instanceof Error?d.message:String(d)}`,"unknown",{cause:d instanceof Error?d:void 0})}}})}assertConnected(){if(!this._isConnected||!this._accessToken)throw new Fr("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const s of n){if(r==null||typeof r!="object")return;r=r[s]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}}const k="cim-widget",Cn=`--${k}`,ti={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},nS=(e=ti)=>({[`${Cn}-primary-color`]:e.primaryColor||ti.primaryColor,[`${Cn}-secondary-color`]:e.secondaryColor||ti.secondaryColor,[`${Cn}-font-color`]:e.fontColor||ti.fontColor,[`${Cn}-font-family`]:e.fontFamily||ti.fontFamily,[`${Cn}-background-color`]:e.backgroundColor||ti.backgroundColor,[`${Cn}-border-color`]:e.borderColor||ti.borderColor,[`${Cn}-border-radius`]:e.borderRadius||ti.borderRadius});function x0(e,t){return function(){return e.apply(t,arguments)}}const{toString:rS}=Object.prototype,{getPrototypeOf:Ns}=Object,{iterator:Uo,toStringTag:w0}=Symbol,xu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ho=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),xu(n,t))return!0;n=Ns(n)}return!1},iS=(e,t)=>e!=null&&Ho(e,t)?e[t]:void 0,wd=(e=>t=>{const n=rS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Jn=e=>(e=e.toLowerCase(),t=>wd(t)===e),wu=e=>t=>typeof t===e,{isArray:Fi}=Array,Cs=wu("undefined");function ks(e){return e!==null&&!Cs(e)&&e.constructor!==null&&!Cs(e.constructor)&&mn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const S0=Jn("ArrayBuffer");function sS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&S0(e.buffer),t}const oS=wu("string"),mn=wu("function"),v0=wu("number"),Os=e=>e!==null&&typeof e=="object",aS=e=>e===!0||e===!1,Su=e=>{if(!Os(e))return!1;const t=Ns(e);return(t===null||t===Object.prototype||Ns(t)===null)&&!Ho(e,w0)&&!Ho(e,Uo)},uS=e=>{if(!Os(e)||ks(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},lS=Jn("Date"),cS=Jn("File"),dS=e=>!!(e&&typeof e.uri!="undefined"),fS=e=>e&&typeof e.getParts!="undefined",hS=Jn("Blob"),pS=Jn("FileList"),mS=e=>Os(e)&&mn(e.pipe);function gS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const A0=gS(),N0=typeof A0.FormData!="undefined"?A0.FormData:void 0,ES=e=>{if(!e)return!1;if(N0&&e instanceof N0)return!0;const t=Ns(e);if(!t||t===Object.prototype||!mn(e.append))return!1;const n=wd(e);return n==="formdata"||n==="object"&&mn(e.toString)&&e.toString()==="[object FormData]"},yS=Jn("URLSearchParams"),[TS,bS,_S,xS]=["ReadableStream","Request","Response","Headers"].map(Jn),wS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Fi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(ks(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let l;for(r=0;r<u;r++)l=a[r],t.call(null,e[l],l,e)}}function C0(e,t){if(ks(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Bi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,k0=e=>!Cs(e)&&e!==Bi;function Sd(...e){const{caseless:t,skipUndefined:n}=k0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&C0(r,u)||u,d=xu(r,l)?r[l]:void 0;Su(d)&&Su(a)?r[l]=Sd(d,a):Su(a)?r[l]=Sd({},a):Fi(a)?r[l]=a.slice():(!n||!Cs(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||ks(l)||(jo(l,s),typeof l!="object"||Fi(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];DS.call(l,p)&&s(l[p],p)}}return r}const SS=(e,t,n,{allOwnKeys:r}={})=>(jo(t,(s,a)=>{n&&mn(s)?Object.defineProperty(e,a,{__proto__:null,value:x0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),vS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),AS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},NS=(e,t,n,r)=>{let s,a,u;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=n!==!1&&Ns(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},CS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},kS=e=>{if(!e)return null;if(Fi(e))return e;let t=e.length;if(!v0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},OS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ns(Uint8Array)),IS=(e,t)=>{const r=(e&&e[Uo]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},PS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},RS=Jn("HTMLFormElement"),LS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:DS}=Object.prototype,MS=Jn("RegExp"),O0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};jo(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},FS=e=>{O0(e,(t,n)=>{if(mn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(mn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},BS=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Fi(e)?r(e):r(String(e).split(t)),n},US=()=>{},HS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function jS(e){return!!(e&&mn(e.append)&&e[w0]==="FormData"&&e[Uo])}const zS=e=>{const t=new WeakSet,n=r=>{if(Os(r)){if(t.has(r))return;if(ks(r))return r;if(!("toJSON"in r)){t.add(r);const s=Fi(r)?[]:{};return jo(r,(a,u)=>{const l=n(a);!Cs(l)&&(s[u]=l)}),t.delete(r),s}}return r};return n(e)},$S=Jn("AsyncFunction"),VS=e=>e&&(Os(e)||mn(e))&&mn(e.then)&&mn(e.catch),I0=((e,t)=>e?setImmediate:t?((n,r)=>(Bi.addEventListener("message",({source:s,data:a})=>{s===Bi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Bi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",mn(Bi.postMessage)),qS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Bi):typeof process!="undefined"&&process.nextTick||I0,P0=e=>e!=null&&mn(e[Uo]),q={isArray:Fi,isArrayBuffer:S0,isBuffer:ks,isFormData:ES,isArrayBufferView:sS,isString:oS,isNumber:v0,isBoolean:aS,isObject:Os,isPlainObject:Su,isEmptyObject:uS,isReadableStream:TS,isRequest:bS,isResponse:_S,isHeaders:xS,isUndefined:Cs,isDate:lS,isFile:cS,isReactNativeBlob:dS,isReactNative:fS,isBlob:hS,isRegExp:MS,isFunction:mn,isStream:mS,isURLSearchParams:yS,isTypedArray:OS,isFileList:pS,forEach:jo,merge:Sd,extend:SS,trim:wS,stripBOM:vS,inherits:AS,toFlatObject:NS,kindOf:wd,kindOfTest:Jn,endsWith:CS,toArray:kS,forEachEntry:IS,matchAll:PS,isHTMLForm:RS,hasOwnProperty:xu,hasOwnProp:xu,hasOwnInPrototypeChain:Ho,getSafeProp:iS,reduceDescriptors:O0,freezeMethods:FS,toObjectSet:BS,toCamelCase:LS,noop:US,toFiniteNumber:HS,findKey:C0,global:Bi,isContextDefined:k0,isSpecCompliantForm:jS,toJSONObject:zS,isAsyncFn:$S,isThenable:VS,setImmediate:I0,asap:qS,isIterable:P0,isSafeIterable:e=>e!=null&&Ho(e,Uo)&&P0(e)},YS=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),WS=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
9
|
+
`).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&YS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function GS(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const XS=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),KS=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function vd(e,t){return q.isArray(e)?e.map(n=>vd(n,t)):GS(String(e).replace(t,""))}const QS=e=>vd(e,XS),JS=e=>vd(e,KS);function R0(e){const t=Object.create(null);return q.forEach(e.toJSON(),(n,r)=>{t[r]=JS(n)}),t}const L0=Symbol("internals");function zo(e){return e&&String(e).trim().toLowerCase()}function vu(e){return e===!1||e==null?e:q.isArray(e)?e.map(vu):QS(String(e))}function ZS(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const ev=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ad(e,t,n,r,s){if(q.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function tv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function nv(e,t){const n=q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,a,u){return this[r].call(this,t,s,a,u)},configurable:!0})})}let Kt=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(l,d,f){const p=zo(d);if(!p)return;const m=q.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=vu(l))}const u=(l,d)=>q.forEach(l,(f,p)=>a(f,p,d));if(q.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(q.isString(t)&&(t=t.trim())&&!ev(t))u(WS(t),n);else if(q.isObject(t)&&q.isSafeIterable(t)){let l=Object.create(null),d,f;for(const p of t){if(!q.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],q.hasOwnProp(l,f)?(d=l[f],l[f]=q.isArray(d)?[...d,p[1]]:[d,p[1]]):l[f]=p[1]}u(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=zo(t),t){const r=q.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return ZS(s);if(q.isFunction(n))return n.call(this,s,r);if(q.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=zo(t),t){const r=q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ad(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=zo(u),u){const l=q.findKey(r,u);l&&(!n||Ad(r,r[l],l,n))&&(delete r[l],s=!0)}}return q.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||Ad(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return q.forEach(this,(s,a)=>{const u=q.findKey(r,a);if(u){n[u]=vu(s),delete n[a];return}const l=t?tv(a):String(a).trim();l!==a&&delete n[a],n[l]=vu(s),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return q.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
10
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[L0]=this[L0]={accessors:{}}).accessors,s=this.prototype;function a(u){const l=zo(u);r[l]||(nv(s,u),r[l]=!0)}return q.isArray(t)?t.forEach(a):a(t),this}};Kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(Kt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),q.freezeMethods(Kt);const rv="[REDACTED ****]";function iv(e){if(q.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(q.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function sv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||q.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof Kt&&(a=a.toJSON()),r.push(a);let u;if(q.isArray(a))u=[],a.forEach((l,d)=>{const f=s(l);q.isUndefined(f)||(u[d]=f)});else{if(!q.isPlainObject(a)&&iv(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?rv:s(d);q.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return s(e)}let Ne=class t2 extends Error{static from(t,n,r,s,a,u){const l=new t2(t.message,n||t.code,r,s,a);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),u&&Object.assign(l,u),l}constructor(t,n,r,s,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&q.hasOwnProp(t,"redact")?t.redact:void 0,r=q.isArray(n)&&n.length>0?sv(t,n):q.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ne.ERR_BAD_OPTION="ERR_BAD_OPTION",Ne.ECONNABORTED="ECONNABORTED",Ne.ETIMEDOUT="ETIMEDOUT",Ne.ECONNREFUSED="ECONNREFUSED",Ne.ERR_NETWORK="ERR_NETWORK",Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ne.ERR_DEPRECATED="ERR_DEPRECATED",Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ne.ERR_CANCELED="ERR_CANCELED",Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ne.ERR_INVALID_URL="ERR_INVALID_URL",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const ov=null,D0=100;function Nd(e){return q.isPlainObject(e)||q.isArray(e)}function M0(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function Cd(e,t,n){return e?e.concat(t).map(function(s,a){return s=M0(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function av(e){return q.isArray(e)&&!e.some(Nd)}const uv=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Au(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,P){return!q.isUndefined(P[C])});const r=n.metaTokens,s=n.visitor||x,a=n.dots,u=n.indexes,l=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?D0:n.maxDepth,f=l&&q.isSpecCompliantForm(t),p=[];if(!q.isFunction(s))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(q.isDate(S))return S.toISOString();if(q.isBoolean(S))return S.toString();if(!f&&q.isBlob(S))throw new Ne("Blob is not supported. Use a Buffer instead.");if(q.isArrayBuffer(S)||q.isTypedArray(S)){if(f&&typeof l=="function")return new l([S]);if(typeof Buffer!="undefined")return Buffer.from(S);throw new Ne("Blob is not supported. Use a Buffer instead.",Ne.ERR_NOT_SUPPORT)}return S}function T(S){if(S>d)throw new Ne("Object is too deeply nested ("+S+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(S,C){if(d===1/0)return JSON.stringify(S);const P=[];return JSON.stringify(S,function(W,D){if(!q.isObject(D))return D;for(;P.length&&P[P.length-1]!==this;)P.pop();return P.push(D),T(C+P.length-1),D})}function x(S,C,P){let j=S;if(q.isReactNative(t)&&q.isReactNativeBlob(S))return t.append(Cd(P,C,a),m(S)),!1;if(S&&!P&&typeof S=="object"){if(q.endsWith(C,"{}"))C=r?C:C.slice(0,-2),S=y(S,1);else if(q.isArray(S)&&av(S)||(q.isFileList(S)||q.endsWith(C,"[]"))&&(j=q.toArray(S)))return C=M0(C),j.forEach(function(D,K){!(q.isUndefined(D)||D===null)&&t.append(u===!0?Cd([C],K,a):u===null?C:C+"[]",m(D))}),!1}return Nd(S)?!0:(t.append(Cd(P,C,a),m(S)),!1)}const v=Object.assign(uv,{defaultVisitor:x,convertValue:m,isVisitable:Nd});function A(S,C,P=0){if(!q.isUndefined(S)){if(T(P),p.indexOf(S)!==-1)throw new Error("Circular reference detected in "+C.join("."));p.push(S),q.forEach(S,function(W,D){(!(q.isUndefined(W)||W===null)&&s.call(t,W,q.isString(D)?D.trim():D,C,v))===!0&&A(W,C?C.concat(D):[D],P+1)}),p.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return A(e),t}function F0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function kd(e,t){this._pairs=[],e&&Au(e,this,t)}const B0=kd.prototype;B0.append=function(t,n){this._pairs.push([t,n])},B0.toString=function(t){const n=t?r=>t.call(this,r,F0):F0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function lv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function U0(e,t,n){if(!t)return e;e=e||"";const r=q.isFunction(n)?{serialize:n}:n,s=q.getSafeProp(r,"encode")||lv,a=q.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=q.isURLSearchParams(t)?t.toString():new kd(t,r).toString(s),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class H0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Od={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},cv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:kd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Id=typeof window!="undefined"&&typeof document!="undefined",Pd=typeof navigator=="object"&&navigator||void 0,dv=Id&&(!Pd||["ReactNative","NativeScript","NS"].indexOf(Pd.product)<0),fv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hv=Id&&window.location.href||"http://localhost",Vt=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Id,hasStandardBrowserEnv:dv,hasStandardBrowserWebWorkerEnv:fv,navigator:Pd,origin:hv},Symbol.toStringTag,{value:"Module"}))),cv);function pv(e,t){return Au(e,new Vt.classes.URLSearchParams,U({visitor:function(n,r,s,a){return Vt.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const j0=D0;function z0(e){if(e>j0)throw new Ne("FormData field is too deeply nested ("+e+" levels). Max depth: "+j0,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function mv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)z0(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function gv(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function $0(e){function t(n,r,s,a){z0(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&q.isArray(s)?s.length:u,d?(q.hasOwnProp(s,u)?s[u]=q.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!l):((!q.hasOwnProp(s,u)||!q.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&q.isArray(s[u])&&(s[u]=gv(s[u])),!l)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,s)=>{t(mv(r),s,n,0)}),n}return null}const Is=(e,t)=>e!=null&&q.hasOwnProp(e,t)?e[t]:void 0;function Ev(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const $o={transitional:Od,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=q.isObject(t);if(a&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return s?JSON.stringify($0(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Is(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return pv(t,d).toString();if((l=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Is(this,"env"),p=f&&f.FormData;return Au(l?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),Ev(t)):t}],transformResponse:[function(t){const n=Is(this,"transitional")||$o.transitional,r=n&&n.forcedJSONParsing,s=Is(this,"responseType"),a=s==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!s||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Is(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,Is(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vt.classes.FormData,Blob:Vt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch","query"],e=>{$o.headers[e]={}});function Rd(e,t){const n=this||$o,r=t||n,s=Kt.from(r.headers);let a=r.data;return q.forEach(e,function(l){a=l.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function V0(e){return!!(e&&e.__CANCEL__)}let Vo=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function q0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function yv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Tv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,T=0;for(;m!==s;)T+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(T*1e3/y):void 0}}function bv(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const Nu=(e,t,n=3)=>{let r=0;const s=Tv(50,250);return bv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,l=a.lengthComputable?a.total:void 0,d=l!=null?Math.min(u,l):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-d)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},Y0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},W0=e=>(...t)=>q.asap(()=>e(...t)),_v=Vt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Vt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Vt.origin),Vt.navigator&&/(msie|trident)/i.test(Vt.navigator.userAgent)):()=>!0,xv=Vt.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];q.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),q.isString(r)&&l.push(`path=${r}`),q.isString(s)&&l.push(`domain=${s}`),a===!0&&l.push("secure"),q.isString(u)&&l.push(`SameSite=${u}`),document.cookie=l.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function wv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Sv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const vv=/^https?:(?!\/\/)/i,Av=/[\t\n\r]/g;function Nv(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Cv(e){return Nv(e).replace(Av,"")}function G0(e,t){if(typeof e=="string"&&vv.test(Cv(e)))throw new Ne('Invalid URL: missing "//" after protocol',Ne.ERR_INVALID_URL,t)}function X0(e,t,n,r){G0(t,r);let s=!wv(t);return e&&(s||n===!1)?(G0(e,r),Sv(e,t)):t}const K0=e=>e instanceof Kt?U({},e):e;function Ui(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,T,y){return q.isPlainObject(p)&&q.isPlainObject(m)?q.merge.call({caseless:y},p,m):q.isPlainObject(m)?q.merge({},m):q.isArray(m)?m.slice():m}function s(p,m,T,y){if(q.isUndefined(m)){if(!q.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!q.isUndefined(m))return r(void 0,m)}function u(p,m){if(q.isUndefined(m)){if(!q.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=q.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!q.isUndefined(m))if(q.isPlainObject(m)){if(q.hasOwnProp(m,p))return m[p]}else return;const T=q.hasOwnProp(e,"transitional")?e.transitional:void 0;if(q.isPlainObject(T)&&q.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(q.hasOwnProp(t,T))return r(p,m);if(q.hasOwnProp(e,T))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,T)=>s(K0(p),K0(m),T,!0)};return q.forEach(Object.keys(U(U({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=q.hasOwnProp(f,m)?f[m]:s,y=q.hasOwnProp(e,m)?e[m]:void 0,x=q.hasOwnProp(t,m)?t[m]:void 0,v=T(y,x,m);q.isUndefined(v)&&T!==d||(n[m]=v)}),q.hasOwnProp(t,"validateStatus")&&q.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(q.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const kv=["content-type","content-length"];function Ov(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{kv.includes(r.toLowerCase())&&e.set(r,s)})}const Iv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Q0(e){const t=Ui({},e),n=T=>q.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=Kt.from(l),t.url=U0(X0(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=q.getSafeProp(d,"username")||"",y=q.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(T+":"+(y?Iv(y):"")))}catch(x){throw Ne.from(x,Ne.ERR_BAD_OPTION_VALUE,e)}}if(q.isFormData(r)&&(Vt.hasStandardBrowserEnv||Vt.hasStandardBrowserWebWorkerEnv||q.isReactNative(r)?l.setContentType(void 0):q.isFunction(r.getHeaders)&&Ov(l,r.getHeaders(),n("formDataHeaderPolicy"))),Vt.hasStandardBrowserEnv&&(q.isFunction(s)&&(s=s(t)),s===!0||s==null&&_v(t.url))){const y=a&&u&&xv.read(u);y&&l.set(a,y)}return t}const Pv=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=Q0(e);let a=s.data;const u=Kt.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=s,p,m,T,y,x;function v(){y&&y(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function S(){if(!A)return;const P=Kt.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),W={data:!l||l==="text"||l==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:P,config:e,request:A};q0(function(K){n(K),v()},function(K){r(K),v()},W),A=null}"onloadend"in A?A.onloadend=S:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(S)},A.onabort=function(){A&&(r(new Ne("Request aborted",Ne.ECONNABORTED,e,A)),v(),A=null)},A.onerror=function(j){const W=j&&j.message?j.message:"Network Error",D=new Ne(W,Ne.ERR_NETWORK,e,A);D.event=j||null,r(D),v(),A=null},A.ontimeout=function(){let j=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const W=s.transitional||Od;s.timeoutErrorMessage&&(j=s.timeoutErrorMessage),r(new Ne(j,W.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,A)),v(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&q.forEach(R0(u),function(j,W){A.setRequestHeader(W,j)}),q.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),l&&l!=="json"&&(A.responseType=s.responseType),f&&([T,x]=Nu(f,!0),A.addEventListener("progress",T)),d&&A.upload&&([m,y]=Nu(d),A.upload.addEventListener("progress",m),A.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=P=>{A&&(r(!P||P.type?new Vo(null,e,A):P),A.abort(),v(),A=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const C=yv(s.url);if(C&&!Vt.protocols.includes(C)){r(new Ne("Unsupported protocol "+C+":",Ne.ERR_BAD_REQUEST,e)),v();return}A.send(a||null)})},Rv=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Ne?f:new Vo(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ne(`timeout of ${t}ms exceeded`,Ne.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:l}=n;return l.unsubscribe=()=>q.asap(u),l},Lv=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Dv=function(e,t){return Zm(this,null,function*(){try{for(var n=e2(Mv(e)),r,s,a;r=!(s=yield new ws(n.next())).done;r=!1){const u=s.value;yield*e0(Lv(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new ws(s.call(n)))}finally{if(a)throw a[0]}}})},Mv=function(e){return Zm(this,null,function*(){if(e[Symbol.asyncIterator]){yield*e0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new ws(t.read());if(n)break;yield r}}finally{yield new ws(t.cancel())}})},J0=(e,t,n,r)=>{const s=Dv(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return He(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){l(),f.close();return}let T=m.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw l(p),p}})},cancel(f){return l(f),s.return()}},{highWaterMark:2})},Cu=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Fv=(e,t,n)=>t+2<n&&Cu(e.charCodeAt(t+1))&&Cu(e.charCodeAt(t+2));function Bv(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const l=r.length;for(let y=0;y<l;y++)if(r.charCodeAt(y)===37&&y+2<l){const x=r.charCodeAt(y+1),v=r.charCodeAt(y+2);Cu(x)&&Cu(v)&&(u-=2,y+=2)}let d=0,f=l-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const T=Math.floor(u/4)*3-(d||0);return T>0?T:0}let a=0;for(let u=0,l=r.length;u<l;u++){const d=r.charCodeAt(u);if(d===37&&Fv(r,u,l))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<l){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Ld="1.18.1",Z0=64*1024,{isFunction:ku}=q,Uv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),eg=e=>{if(!q.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},tg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Hv=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},jv=e=>{const t=q.global!==void 0&&q.global!==null?q.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=q.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,l=s?ku(s):typeof fetch=="function",d=ku(a),f=ku(u);if(!l)return!1;const p=l&&ku(n),m=l&&(typeof r=="function"?(S=>C=>S.encode(C))(new r):S=>He(null,null,function*(){return new Uint8Array(yield new a(S).arrayBuffer())})),T=d&&p&&tg(()=>{let S=!1;const C=new a(Vt.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),P=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),S&&!P}),y=f&&p&&tg(()=>q.isReadableStream(new u("").body)),x={stream:y&&(S=>S.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!x[S]&&(x[S]=(C,P)=>{let j=C&&C[S];if(j)return j.call(C);throw new Ne(`Response type '${S}' is not supported`,Ne.ERR_NOT_SUPPORT,P)})});const v=S=>He(null,null,function*(){if(S==null)return 0;if(q.isBlob(S))return S.size;if(q.isSpecCompliantForm(S))return(yield new a(Vt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(q.isArrayBufferView(S)||q.isArrayBuffer(S))return S.byteLength;if(q.isURLSearchParams(S)&&(S=S+""),q.isString(S))return(yield m(S)).byteLength}),A=(S,C)=>He(null,null,function*(){const P=q.toFiniteNumber(S.getContentLength());return P==null?v(C):P});return S=>He(null,null,function*(){let{url:C,method:P,data:j,signal:W,cancelToken:D,timeout:K,onDownloadProgress:ne,onUploadProgress:de,responseType:$,headers:se,withCredentials:te="same-origin",fetchOptions:xe,maxContentLength:fe,maxBodyLength:ce}=Q0(S);const he=q.isNumber(fe)&&fe>-1,le=q.isNumber(ce)&&ce>-1,Q=we=>q.hasOwnProp(S,we)?S[we]:void 0;let ue=s||fetch;$=$?($+"").toLowerCase():"text";let N=Rv([W,D&&D.toAbortSignal()],K),R=null;const Y=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let O,ge=null;const Re=()=>new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,S,R);try{let we;const re=Q("auth");if(re){const ze=q.getSafeProp(re,"username")||"",Ot=q.getSafeProp(re,"password")||"";we={username:ze,password:Ot}}if(Hv(C)){const ze=new URL(C,Vt.origin);if(!we&&(ze.username||ze.password)){const Ot=eg(ze.username),Rn=eg(ze.password);we={username:Ot,password:Rn}}(ze.username||ze.password)&&(ze.username="",ze.password="",C=ze.href)}if(we&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa(Uv((we.username||"")+":"+(we.password||""))))),he&&typeof C=="string"&&C.startsWith("data:")&&Bv(C)>fe)throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,R);if(le&&P!=="get"&&P!=="head"){const ze=yield v(j);if(typeof ze=="number"&&isFinite(ze)&&(O=ze,ze>ce))throw Re()}const ye=le&&(q.isReadableStream(j)||q.isStream(j)),ie=(ze,Ot,Rn)=>J0(ze,Z0,xn=>{if(le&&xn>ce)throw ge=Re();Ot&&Ot(xn)},Rn);if(T&&P!=="get"&&P!=="head"&&(de||ye)){if(O=O==null?yield A(se,j):O,O!==0||ye){let ze=new a(C,{method:"POST",body:j,duplex:"half"}),Ot;if(q.isFormData(j)&&(Ot=ze.headers.get("content-type"))&&se.setContentType(Ot),ze.body){const[Rn,xn]=de&&Y0(O,Nu(W0(de)))||[];j=ie(ze.body,Rn,xn)}}}else if(ye&&!d&&p&&P!=="get"&&P!=="head")j=ie(j);else if(ye&&d&&!T&&P!=="get"&&P!=="head")throw new Ne("Stream request bodies are not supported by the current fetch implementation",Ne.ERR_NOT_SUPPORT,S,R);q.isString(te)||(te=te?"include":"omit");const ve=d&&"credentials"in a.prototype;if(q.isFormData(j)){const ze=se.getContentType();ze&&/^multipart\/form-data/i.test(ze)&&!/boundary=/i.test(ze)&&se.delete("content-type")}se.set("User-Agent","axios/"+Ld,!1);const Ve=ae(U({},xe),{signal:N,method:P.toUpperCase(),headers:R0(se.normalize()),body:j,duplex:"half",credentials:ve?te:void 0});R=d&&new a(C,Ve);let _t=yield d?ue(R,xe):ue(C,Ve);const qt=Kt.from(_t.headers);if(he){const ze=q.toFiniteNumber(qt.getContentLength());if(ze!=null&&ze>fe)throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,R)}const or=y&&($==="stream"||$==="response");if(y&&_t.body&&(ne||he||or&&Y)){const ze={};["status","statusText","headers"].forEach(ur=>{ze[ur]=_t[ur]});const Ot=q.toFiniteNumber(qt.getContentLength()),[Rn,xn]=ne&&Y0(Ot,Nu(W0(ne),!0))||[];let ar=0;const Or=ur=>{if(he&&(ar=ur,ar>fe))throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,R);Rn&&Rn(ur)};_t=new u(J0(_t.body,Z0,Or,()=>{xn&&xn(),Y&&Y()}),ze)}$=$||"text";let cn=yield x[q.findKey(x,$)||"text"](_t,S);if(he&&!y&&!or){let ze;if(cn!=null&&(typeof cn.byteLength=="number"?ze=cn.byteLength:typeof cn.size=="number"?ze=cn.size:typeof cn=="string"&&(ze=typeof r=="function"?new r().encode(cn).byteLength:cn.length)),typeof ze=="number"&&ze>fe)throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,R)}return!or&&Y&&Y(),yield new Promise((ze,Ot)=>{q0(ze,Ot,{data:cn,headers:Kt.from(_t.headers),status:_t.status,statusText:_t.statusText,config:S,request:R})})}catch(we){if(Y&&Y(),N&&N.aborted&&N.reason instanceof Ne){const re=N.reason;throw re.config=S,R&&(re.request=R),we!==re&&Object.defineProperty(re,"cause",{__proto__:null,value:we,writable:!0,enumerable:!1,configurable:!0}),re}if(ge)throw R&&!ge.request&&(ge.request=R),ge;if(we instanceof Ne)throw R&&!we.request&&(we.request=R),we;if(we&&we.name==="TypeError"&&/Load failed|fetch/i.test(we.message)){const re=new Ne("Network Error",Ne.ERR_NETWORK,S,R,we&&we.response);throw Object.defineProperty(re,"cause",{__proto__:null,value:we.cause||we,writable:!0,enumerable:!1,configurable:!0}),re}throw Ne.from(we,we&&we.code,S,R,we&&we.response)}})},zv=new Map,ng=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,l=u,d,f,p=zv;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:jv(t)),p=f;return f};ng();const Dd={http:ov,xhr:Pv,fetch:{get:ng}};q.forEach(Dd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const rg=e=>`- ${e}`,$v=e=>q.isFunction(e)||e===null||e===!1;function Vv(e,t){e=q.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(s=r,!$v(r)&&(s=Dd[(l=String(r)).toLowerCase()],s===void 0))throw new Ne(`Unknown adapter '${l}'`);if(s&&(q.isFunction(s)||(s=s.get(t))))break;a[l||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=n?u.length>1?`since :
|
|
11
11
|
`+u.map(rg).join(`
|
|
12
|
-
`):" "+rg(u[0]):"as no adapter specified";throw new
|
|
12
|
+
`):" "+rg(u[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+l,Ne.ERR_NOT_SUPPORT)}return s}const ig={getAdapter:Vv,adapters:Dd};function Md(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vo(null,e)}function sg(e){return Md(e),e.headers=Kt.from(e.headers),e.data=Rd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ig.getAdapter(e.adapter||$o.adapter,e)(e).then(function(r){Md(e),e.response=r;try{r.data=Rd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Kt.from(r.headers),r},function(r){if(!V0(r)&&(Md(e),r&&r.response)){e.response=r.response;try{r.response.data=Rd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Kt.from(r.response.headers)}return Promise.reject(r)})}const Ou={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ou[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const og={};Ou.transitional=function(t,n,r){function s(a,u){return"[Axios v"+Ld+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new Ne(s(u," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!og[u]&&(og[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,l):!0}},Ou.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function qv(e,t,n){if(typeof e!="object"||e===null)throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const l=e[a],d=l===void 0||u(l,a,e);if(d!==!0)throw new Ne("option "+a+" must be "+d,Ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const Iu={assertOptions:qv,validators:Ou},Qt=Iu.validators;let Hi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new H0,response:new H0}}request(t,n){return He(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
|
|
13
13
|
`);return u===-1?"":s.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
|
|
14
|
-
`),
|
|
15
|
-
`,u+1),d=
|
|
16
|
-
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ui(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Ru.assertOptions(r,{silentJSONParsing:Gt.transitional(Gt.boolean),forcedJSONParsing:Gt.transitional(Gt.boolean),clarifyTimeoutError:Gt.transitional(Gt.boolean),legacyInterceptorReqResOrdering:Gt.transitional(Gt.boolean),advertiseZstdAcceptEncoding:Gt.transitional(Gt.boolean),validateStatusUndefinedResolves:Gt.transitional(Gt.boolean)},!1),s!=null&&(W.isFunction(s)?n.paramsSerializer={serialize:s}:Ru.assertOptions(s,{encode:Gt.function,serialize:Gt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ru.assertOptions(n,{baseUrl:Gt.spelling("baseURL"),withXsrfToken:Gt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&W.merge(a.common,a[n.method]);a&&W.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=Wt.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(N){if(typeof N.runWhen=="function"&&N.runWhen(n)===!1)return;d=d&&N.synchronous;const A=n.transitional||Id;A&&A.legacyInterceptorReqResOrdering?c.unshift(N.fulfilled,N.rejected):c.push(N.fulfilled,N.rejected)});const f=[];this.interceptors.response.forEach(function(N){f.push(N.fulfilled,N.rejected)});let p,m=0,T;if(!d){const x=[sg.bind(this),void 0];for(x.unshift(...c),x.push(...f),T=x.length,p=Promise.resolve(n);m<T;)p=p.then(x[m++],x[m++]);return p}T=c.length;let y=n;for(;m<T;){const x=c[m++],N=c[m++];try{y=x(y)}catch(A){N.call(this,A);break}}try{p=sg.call(this,y)}catch(x){return Promise.reject(x)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=Ui(this.defaults,t);const n=X0(t.baseURL,t.url,t.allowAbsoluteUrls,t);return U0(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(n,r){return this.request(Ui(r||{},{method:t,url:n,data:r&&W.hasOwnProp(r,"data")?r.data:void 0}))}}),W.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(Ui(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Hi.prototype[t]=n(),t!=="query"&&(Hi.prototype[t+"Form"]=n(!0))});let Vv=class e2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new Vo(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new e2(function(s){t=s}),cancel:t}}};function qv(e){return function(n){return e.apply(null,n)}}function Yv(e){return W.isObject(e)&&e.isAxiosError===!0}const Bd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Bd).forEach(([e,t])=>{Bd[t]=e});function ag(e){const t=new Hi(e),n=x0(Hi.prototype.request,t);return W.extend(n,Hi.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ag(Ui(e,s))},n}const _t=ag($o);_t.Axios=Hi,_t.CanceledError=Vo,_t.CancelToken=Vv,_t.isCancel=V0,_t.VERSION=Dd,_t.toFormData=Cu,_t.AxiosError=xe,_t.Cancel=_t.CanceledError,_t.all=function(t){return Promise.all(t)},_t.spread=qv,_t.isAxiosError=Yv,_t.mergeConfig=Ui,_t.AxiosHeaders=Wt,_t.formToJSON=e=>$0(W.isHTMLForm(e)?new FormData(e):e),_t.getAdapter=ig.getAdapter,_t.HttpStatusCode=Bd,_t.default=_t;const{Axios:WB,AxiosError:GB,CanceledError:XB,isCancel:KB,CancelToken:QB,VERSION:JB,all:ZB,Cancel:e7,isAxiosError:t7,spread:n7,toFormData:r7,AxiosHeaders:i7,HttpStatusCode:s7,formToJSON:o7,getAdapter:a7,mergeConfig:u7,create:l7}=_t;class Wv{constructor(t,n,r,s=!1,a,u){$e(this,"CIMULATE_API_HEADER","x-cimulate-api-key");$e(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");$e(this,"CIMULATE_SEARCH_API_PATH","api/v1");$e(this,"baseApiUrl");$e(this,"headers",{});$e(this,"fetchConfig",()=>je(this,null,function*(){try{const t=yield _t.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}}));$e(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 Gv{constructor(t,n,r,s=!1,a,u){$e(this,"apiService");$e(this,"config",null);$e(this,"getConfig",()=>je(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}}));$e(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));$e(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));$e(this,"getDescription",t=>this.getProductFieldValue(t,"description"));$e(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));$e(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));$e(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));$e(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));$e(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));$e(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});$e(this,"getProductField",t=>this.config?this.config[t]:"");$e(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Wv(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 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 Xv{constructor(t=!1){$e(this,"isDevelopment");$e(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 Kv={copilot:"Your Search Assistant",messaging:"Commerce Client"},ug=H.createContext(null),Qv=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:T,searchConfig:y,suggestionButtonConfig:x,messageAlignment:N="start",autoScroll:A=!0,showProductDescription:v=!1,componentConfig:C,conversationHistory:R,resetConversationMessage:$="",apiKey:G,apiToken:D,baseUrl:J,customerId:se,tenantId:he,theme:V,isDevelopment:ie,__features:ee,routingAttributes:we,enableDownloadTranscript:de=!0,enableEscalationToAgent:ae=!1,showProductCaptions:_e=!1,children:ue})=>{const z=e==="messaging",Z=H.useMemo(()=>{const ye=we==null?void 0:we.isCartMgmtSupported;return ye===!0||ye==="true"},[we]),w=H.useMemo(()=>z?{config:null}:new Gv(J,G,D,ie,se,he),[z,J,G,D,ie,se,he]),k=H.useMemo(()=>new Xv(ie),[ie]);H.useEffect(()=>{z||!w||w.config||w.getConfig()},[w,z]);const q=H.useMemo(()=>eS(V),[V]),O=H.useMemo(()=>{const ye=(y==null?void 0:y.placeholder)||m,Re=(y==null?void 0:y.buttonLabel)||T;let Be="icon";return y!=null&&y.buttonType?Be=y.buttonType:T&&(Be="text"),oe(U({},y||{}),{placeholder:ye,buttonLabel:Re,buttonType:Be})},[y,m,T]),pe=H.useMemo(()=>oe(U({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||Kv[e!=null?e:"copilot"]}),[r,t,n,e]),Oe=H.useMemo(()=>({configModule:w,mode:e!=null?e:"copilot",headerConfig:pe,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:q,logger:k,searchConfig:O,suggestionButtonConfig:x,messageAlignment:N,autoScroll:A,showProductDescription:!!v,enableMinimize:!!(C!=null&&C.enableMinimize),enableDownloadTranscript:de,enableEscalationToAgent:ae,showProductCaptions:!!_e,resetConversationMessage:$,conversationHistory:{sinceHours:typeof(R==null?void 0:R.sinceHours)=="number"?R.sinceHours:1,limit:R==null?void 0:R.limit},features:ee,isCartMgmtSupported:Z}),[w,e,pe,a,s,f,p,c,d,u,O,x,N,A,v,C,de,ae,_e,$,k,q,R,ee,Z]);return _.jsx(ug.Provider,{value:Oe,children:ue})},it=()=>{const e=H.useContext(ug);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},lg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],ji=-1;function cg(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.type=="string"&&typeof t.index=="number")return lg.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:ji,data:{content:e}}}function dg(e){let t;try{t=JSON.parse(e)}catch(s){return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.type!="string"||!lg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return oe(U({},n),{type:n.type,index:r})}function fg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function Jv(e){return e.type==="markdown"&&e.index===ji?!fg(e.data.content):!0}function Zv(e,t){if(t.index===ji){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===ji&&t.type==="markdown"){const a={type:"markdown",index:ji,data:{content:s.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(s=>s.index===t.index);return[...n>=0?e.map((s,a)=>a===n?t:s):[...e,t]].sort((s,a)=>s.index-a.index)}const hg={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function eA(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return U(oe(U({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return oe(U({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return oe(U({},e),{conversationId:t.id});case"ADD_MESSAGE":return oe(U({},e),{messages:[...e.messages,oe(U({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=cg(t.token);return n?oe(U({},e),{streamingBlocks:Zv(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":return oe(U({},e),{messages:[...e.messages,oe(U({},t.message),{type:"FLUSH_STREAMING"})],streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null});case"SET_AGENT_TYPING":return oe(U({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return U(oe(U({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:oe(U({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return oe(U({},e),{routingResult:t.result});case"SET_ERROR":return oe(U({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return oe(U({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return oe(U({},e),{sendError:null});case"LOAD_HISTORY":return oe(U({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return oe(U({},e),{sessionExpired:t.expired});case"RESET":return oe(U({},hg),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const pg=H.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,sendMessage:()=>{},addToCart:()=>{},resetConversation:()=>{},retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>je(null,null,function*(){})});function Ud(e,t){return`cim_af_conv_${e}_${t}`}function Hd(e,t){return Date.now()-e>t}function tA(e,t,n){try{const r=Ud(e,t),s=sessionStorage.getItem(r);if(!s)return null;const a=JSON.parse(s);if(!a||typeof a!="object"||!("conversationId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.conversationId!="string"||!u.conversationId?null:typeof u.storedAt!="number"||Hd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function qo(e,t,n){try{const r=Ud(e,t),s={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(s))}catch(r){}}function Lu(e,t){try{const n=Ud(e,t);sessionStorage.removeItem(n)}catch(n){}}function jd(e,t){return`cim_af_ct_${e}_${t}`}function mg(e,t,n){try{const r=jd(e,t),s=sessionStorage.getItem(r);if(!s)return null;const a=JSON.parse(s);if(!a||typeof a!="object"||!("accessToken"in a)||!("lastEventId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.accessToken!="string"||!u.accessToken||typeof u.lastEventId!="string"||!u.lastEventId?null:typeof u.storedAt!="number"||Date.now()-u.storedAt>n?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function nA(e,t,n,r){try{const s=jd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(s,JSON.stringify(a))}catch(s){}}function rA(e,t){try{const n=jd(e,t);sessionStorage.removeItem(n)}catch(n){}}function iA(e,t){return`cim_af_conv_${e}_${t}`}function sA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=iA(e,t);return new BroadcastChannel(n)}catch(n){return null}}function oA(e,t=500){return e?new Promise(n=>{let r=!1;const s=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var c;r||((c=u.data)==null?void 0:c.type)==="conversation_response"&&(r=!0,clearTimeout(s),e.removeEventListener("message",a),n({conversationId:u.data.conversationId,storedAt:u.data.storedAt,continuationToken:u.data.continuationToken,lastEventId:u.data.lastEventId}))}e.addEventListener("message",a);try{e.postMessage({type:"request_conversation"})}catch(u){r||(r=!0,clearTimeout(s),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function aA(e,t,n){if(!e)return()=>{};function r(s){var a;if((a=s.data)!=null&&a.type)switch(s.data.type){case"request_conversation":{const u=t();if(u!=null&&u.conversationId)try{e.postMessage({type:"conversation_response",conversationId:u.conversationId,storedAt:Date.now(),continuationToken:u.continuationToken,lastEventId:u.lastEventId})}catch(c){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function uA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function lA(e){if(e)try{e.close()}catch(t){}}function cA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function dA(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function gg(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 fA(e){if(e.entryType!=="Message")return null;const n=dA(e.entryPayload).abstractMessage;if(!n)return null;const r=gg(n,"staticContent","text")||gg(n,"content","text")||"";if(!r)return null;const s=cA(e.sender.role);return{id:e.identifier,role:s,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function hA(e){const t=[];for(const n of e){const r=fA(n);r&&t.push(r)}return t}const Eg="onCimulateWidgetReady",pA=5e3;function Yo(e={}){const{routingAttributes:t,timeoutMs:n=pA}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=U({},t!=null?t:{});return new Promise(s=>{const a={settled:!1},u=()=>{if(a.settled)return;a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer);const p=Object.keys(r).length>0;s(p?r:t)},c={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(Eg,{detail:c,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function mA(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=H.useRef(null),u=H.useRef(null),c=H.useRef(null),d=s.sinceHours*60*60*1e3,f=H.useCallback(()=>(c.current||(c.current=oA(a.current)),c.current),[]);H.useEffect(()=>{const A=sA(t,n);a.current=A,c.current=null;const v=aA(A,()=>{const C=u.current;if(!C)return null;const R=mg(t,n,d);return{conversationId:C,continuationToken:R==null?void 0:R.accessToken,lastEventId:R==null?void 0:R.lastEventId}},()=>{Lu(t,n),u.current=null});return()=>{v(),lA(A),a.current=null}},[t,n,d]);const p=H.useCallback(A=>je(null,null,function*(){let v=tA(t,n,d);if(!v){const C=yield f();C&&!Hd(C.storedAt,d)&&(v=C)}if(!v){const C=yield A.createConversation(yield Yo({routingAttributes:r}));return qo(t,n,C),u.current=C,{conversationId:C,restoredMessages:[],resumed:!1}}try{const C=Date.now()-d,$=(yield A.listConversations({conversationId:v.conversationId,startTimestamp:C})).conversations.find(D=>D.conversationId===v.conversationId&&!D.isConversationClosed);if(!$){Lu(t,n);const D=yield A.createConversation(yield Yo({routingAttributes:r}));return qo(t,n,D),u.current=D,{conversationId:D,restoredMessages:[],resumed:!1}}A.resumeConversation($.conversationId),u.current=$.conversationId,qo(t,n,$.conversationId);let G=[];try{const D=yield A.listConversationEntries($.conversationId,{limit:s.limit,startTimestamp:C,direction:"FromStart"});G=hA(D.conversationEntries)}catch(D){}return{conversationId:$.conversationId,restoredMessages:G,resumed:!0}}catch(C){Lu(t,n);const R=yield A.createConversation(yield Yo({routingAttributes:r}));return qo(t,n,R),u.current=R,{conversationId:R,restoredMessages:[],resumed:!1}}}),[t,n,r,s,d,f]),m=H.useCallback(A=>{qo(t,n,A),u.current=A},[t,n]),T=H.useCallback(()=>{Lu(t,n),rA(t,n),uA(a.current),u.current=null},[t,n]),y=H.useCallback(()=>{const A=mg(t,n,d);return A?{continuationToken:A.accessToken,lastEventId:A.lastEventId}:null},[t,n,d]),x=H.useCallback(()=>je(null,null,function*(){const A=yield f();return!(A!=null&&A.continuationToken)||Hd(A.storedAt,d)?null:{continuationToken:A.continuationToken,lastEventId:A.lastEventId}}),[d,f]),N=H.useCallback(A=>je(null,null,function*(){try{const{accessToken:v,lastEventId:C}=yield A.generateContinuationToken();nA(t,n,v,C)}catch(v){}}),[t,n]);return{initializeConversation:p,persistConversationId:m,clearPersistedConversation:T,getStoredConnectOptions:y,getPeerConnectOptions:x,persistContinuationToken:N}}const gr={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 gA(e){if(!e||typeof e!="object")return{};const t=e;return{type:typeof t.type=="string"?t.type:void 0,statusCode:typeof t.statusCode=="number"?t.statusCode:void 0}}function Ps(e){const{type:t,statusCode:n}=gA(e);if(t==="api"&&typeof n=="number")return n===429?gr.rateLimit:n>=500?gr.server:gr.default;switch(t){case"network":return gr.network;case"sse":return gr.interrupted;case"auth":return gr.connect;default:return gr.default}}function yg(e){switch(e.code){case"MAX_RECONNECT":return gr.lost;case"ROUTING_FAILED":return gr.routing;default:return gr.connect}}const EA="Your session ended due to inactivity. Starting a new session…";function Tg(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="auth"?!0:t.type==="api"&&(t.statusCode===401||t.statusCode===403)}function yA(e){var T;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((T=e.variants)!=null?T:[]).filter(y=>y.value),s=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=s?` (${s})`:"",c=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",f=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${c}`;return{prompt:p,display:m}}const bg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:c,onError:d,children:f})=>{const{logger:p,conversationHistory:m}=it(),[T,y]=H.useReducer(eA,hg),x=H.useRef(T);x.current=T;const N=mA({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:m}),A=H.useRef(null),v=H.useRef(c),C=H.useRef(d),R=H.useRef(u),$=H.useRef(!1),G=H.useRef(!1),D=H.useRef(0),J=H.useRef(null);v.current=c,C.current=d,R.current=u,H.useEffect(()=>{const z=new Z2({baseURL:e,orgId:t,esDeveloperName:n,options:U({enableLogging:a},s?{capabilitiesVersion:s}:{})});A.current=z,z.on("connected",()=>{var w;y({type:"SET_CONNECTION_STATUS",status:"connected"}),(w=R.current)==null||w.call(R)}),z.on("disconnected",()=>{y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),z.on("reconnecting",()=>{y({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),z.on("message",w=>{var q;const k={id:w.messageId||crypto.randomUUID(),role:"agent",content:w.content,timestamp:w.timestamp,sender:w.sender,raw:w};p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:k.id,tokensBeforeFlush:D.current,streamedFinalOnly:D.current===0}),D.current=0,y({type:"FLUSH_STREAMING",message:k}),(q=v.current)==null||q.call(v,k)}),z.on("streaming_token",w=>{if(D.current+=1,p!=null&&p.isDevelopment){const k=cg(w.token);k?k.index===ji?p.debug("🦜 streaming_token fragment (reassembled downstream)",{token:w.token}):p.debug("🦜 streaming_token parsed",{type:k.type,index:k.index,outputName:k.type==="tool_results"?k.output_name:void 0}):p.debug("🦜 streaming_token empty",{token:w.token})}y({type:"APPEND_STREAMING_TOKEN",token:w.token})}),z.on("typing_started",()=>{y({type:"SET_AGENT_TYPING",isTyping:!0})}),z.on("typing_stopped",()=>{y({type:"SET_AGENT_TYPING",isTyping:!1})}),z.on("progress_indicator",w=>{y({type:"ADD_PROGRESS_STEP",message:w.message})}),z.on("routing_result",w=>{var k;if(y({type:"SET_ROUTING_RESULT",result:w}),!w.isSuccessful){const q=`Routing failed: ${w.failureType||"unknown"}`;y({type:"SET_ERROR",error:yg({code:"ROUTING_FAILED"})}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(k=C.current)==null||k.call(C,q)}}),z.on("participant_changed",w=>{if(w.participant.name==="Automated Process")return;const k={id:crypto.randomUUID(),role:"system",content:w.action==="add"?`${w.participant.name||"Agent"} joined the conversation`:`${w.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()};p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:w}),y({type:"ADD_MESSAGE",message:k})}),z.on("conversation_closed",()=>{const w={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};y({type:"ADD_MESSAGE",message:w}),y({type:"SET_CONVERSATION_ID",id:null}),N.clearPersistedConversation()}),z.on("error",w=>{var k;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:w}),w.code==="SESSION_EXPIRED"){G.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}),y({type:"SET_LOADING",isLoading:!1});return}y({type:"SET_ERROR",error:yg(w)}),w.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(k=C.current)==null||k.call(C,w.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"});const Z=()=>je(null,null,function*(){let w=N.getStoredConnectOptions(),k=!1;w||(w=yield N.getPeerConnectOptions(),k=!!w);try{yield z.connect(w!=null?w:void 0)}catch(O){if(w)p==null||p.log("Continuation token failed, falling back to fresh connect"),k||N.clearPersistedConversation(),yield z.connect();else throw O}yield N.persistContinuationToken(z);const q=yield N.initializeConversation(z);y({type:"SET_CONVERSATION_ID",id:q.conversationId}),q.resumed&&q.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:q.restoredMessages})});return J.current=Z,Z().catch(w=>{var k;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:Ps(w)}),(k=C.current)==null||k.call(C,w.message)}),()=>{z.disconnect(),z.off(),A.current=null,J.current=null}},[e,t,n,s]),H.useEffect(()=>{const z=()=>{document.visibilityState==="visible"&&A.current&&!G.current&&A.current.reconnect()};return document.addEventListener("visibilitychange",z),()=>{document.removeEventListener("visibilitychange",z)}},[]);const se=H.useCallback(z=>je(null,null,function*(){var w;const Z=A.current;if(!(!Z||$.current)){$.current=!0,G.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:EA,timestamp:new Date().toISOString()}}),N.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"});try{Z.disconnect(),yield Z.connect(),yield N.persistContinuationToken(Z);const k=yield Z.createConversation(yield Yo({routingAttributes:r}));y({type:"SET_CONVERSATION_ID",id:k}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),N.persistConversationId(k),z&&(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),yield Z.sendMessage(z))}catch(k){const q=k instanceof Error?k.message:String(k);y({type:"SET_ERROR",error:Ps(k)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(w=C.current)==null||w.call(C,q)}finally{$.current=!1}}}),[r,N]),he=H.useRef(se);he.current=se;const V=H.useCallback((z,Z)=>{const w=A.current;if(!w)return;const k={id:crypto.randomUUID(),role:"user",content:Z!=null?Z:z,timestamp:new Date().toISOString()};if(y({type:"CLEAR_SEND_ERROR"}),y({type:"ADD_MESSAGE",message:k}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),G.current){he.current(z);return}w.sendMessage(z).catch(q=>{var O;if(Tg(q)){he.current(z);return}y({type:"SET_SEND_ERROR",error:{text:z,displayContent:Z,message:Ps(q)}}),(O=C.current)==null||O.call(C,q.message)})},[]),ie=H.useCallback(z=>{z.trim()&&V(z)},[V]),ee=H.useCallback(z=>{if(!A.current)return;const{prompt:Z,display:w}=yA(z);V(Z,w)},[V]),we=H.useCallback(()=>{const z=A.current,Z=x.current.sendError;if(!(!z||!Z)){if(y({type:"CLEAR_SEND_ERROR"}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),G.current){he.current(Z.text);return}z.sendMessage(Z.text).catch(w=>{var k;if(Tg(w)){he.current(Z.text);return}y({type:"SET_SEND_ERROR",error:oe(U({},Z),{message:Ps(w)})}),(k=C.current)==null||k.call(C,w.message)})}},[]),de=H.useCallback(()=>{const z=A.current,Z=J.current;!z||!Z||(G.current=!1,z.disconnect(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),Z().catch(w=>{var k;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:Ps(w)}),(k=C.current)==null||k.call(C,w.message)}))},[]),ae=H.useCallback(()=>{const z=A.current;z&&(G.current=!1,N.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),z.endConversation().then(()=>(z.disconnect(),z.connect())).then(()=>je(null,null,function*(){return yield N.persistContinuationToken(z),z.createConversation(yield Yo({routingAttributes:r}))})).then(Z=>{y({type:"SET_CONVERSATION_ID",id:Z}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),N.persistConversationId(Z)}).catch(Z=>{var w;y({type:"SET_ERROR",error:Ps(Z)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(w=C.current)==null||w.call(C,Z.message)}))},[r,N]),_e=H.useCallback(()=>je(null,null,function*(){var k;const z=A.current;if(!z)return;const Z=yield z.retrieveConversationTranscript(),w=URL.createObjectURL(Z);try{const q=document.createElement("a");q.href=w,q.download=`transcript-${(k=z.conversationId)!=null?k:"conversation"}.pdf`,document.body.appendChild(q),q.click(),q.remove()}finally{URL.revokeObjectURL(w)}}),[]),ue=H.useMemo(()=>({connectionStatus:T.connectionStatus,isConnected:T.connectionStatus==="connected"&&T.conversationId!==null,isAgentTyping:T.isAgentTyping,conversationId:T.conversationId,messages:T.messages,streamingBlocks:T.streamingBlocks,progressMessage:T.progressMessage,progressSteps:T.progressSteps,error:T.error,sendError:T.sendError,loading:T.loading,sessionExpired:T.sessionExpired,sendMessage:ie,addToCart:ee,resetConversation:ae,retryLastMessage:we,retryConnection:de,downloadTranscript:_e}),[T,ie,ee,ae,we,de,_e]);return _.jsx(pg.Provider,{value:ue,children:f})};var _g=Symbol.for("immer-nothing"),xg=Symbol.for("immer-draftable"),Nn=Symbol.for("immer-state");function Jn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Rs=Object.getPrototypeOf;function Ls(e){return!!e&&!!e[Nn]}function zi(e){var t;return e?wg(e)||Array.isArray(e)||!!e[xg]||!!((t=e.constructor)!=null&&t[xg])||Wo(e)||Fu(e):!1}var TA=Object.prototype.constructor.toString();function wg(e){if(!e||typeof e!="object")return!1;const t=Rs(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===TA}function Du(e,t){Mu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Mu(e){const t=e[Nn];return t?t.type_:Array.isArray(e)?1:Wo(e)?2:Fu(e)?3:0}function zd(e,t){return Mu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Sg(e,t,n){const r=Mu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function bA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Wo(e){return e instanceof Map}function Fu(e){return e instanceof Set}function $i(e){return e.copy_||e.base_}function $d(e,t){if(Wo(e))return new Map(e);if(Fu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=wg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Nn];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(Rs(e),r)}else{const r=Rs(e);if(r!==null&&n)return U({},e);const s=Object.create(r);return Object.assign(s,e)}}function Vd(e,t=!1){return Uu(e)||Ls(e)||!zi(e)||(Mu(e)>1&&Object.defineProperties(e,{set:{value:Bu},add:{value:Bu},clear:{value:Bu},delete:{value:Bu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>Vd(n,!0))),e}function Bu(){Jn(2)}function Uu(e){return Object.isFrozen(e)}var _A={};function Vi(e){const t=_A[e];return t||Jn(0,e),t}var Go;function vg(){return Go}function xA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ag(e,t){t&&(Vi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qd(e){Yd(e),e.drafts_.forEach(wA),e.drafts_=null}function Yd(e){e===Go&&(Go=e.parent_)}function Ng(e){return Go=xA(Go,e)}function wA(e){const t=e[Nn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Cg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Nn].modified_&&(qd(t),Jn(4)),zi(e)&&(e=Hu(t,e),t.parent_||ju(t,e)),t.patches_&&Vi("Patches").generateReplacementPatches_(n[Nn].base_,e,t.patches_,t.inversePatches_)):e=Hu(t,n,[]),qd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==_g?e:void 0}function Hu(e,t,n){if(Uu(t))return t;const r=t[Nn];if(!r)return Du(t,(s,a)=>kg(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ju(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),Du(a,(c,d)=>kg(e,r,s,c,d,n,u)),ju(e,s,!1),n&&e.patches_&&Vi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function kg(e,t,n,r,s,a,u){if(Ls(s)){const c=a&&t&&t.type_!==3&&!zd(t.assigned_,r)?a.concat(r):void 0,d=Hu(e,s,c);if(Sg(n,r,d),Ls(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(zi(s)&&!Uu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Hu(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Wo(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&ju(e,s)}}function ju(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Vd(t,n)}function SA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:vg(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Wd;n&&(s=[r],a=Xo);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Wd={get(e,t){if(t===Nn)return e;const n=$i(e);if(!zd(n,t))return vA(e,n,t);const r=n[t];return e.finalized_||!zi(r)?r:r===Gd(e.base_,t)?(Kd(e),e.copy_[t]=Qd(r,e)):r},has(e,t){return t in $i(e)},ownKeys(e){return Reflect.ownKeys($i(e))},set(e,t,n){const r=Og($i(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Gd($i(e),t),a=s==null?void 0:s[Nn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(bA(n,s)&&(n!==void 0||zd(e.base_,t)))return!0;Kd(e),Xd(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 Gd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Kd(e),Xd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=$i(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Jn(11)},getPrototypeOf(e){return Rs(e.base_)},setPrototypeOf(){Jn(12)}},Xo={};Du(Wd,(e,t)=>{Xo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Xo.deleteProperty=function(e,t){return Xo.set.call(this,e,t,void 0)},Xo.set=function(e,t,n){return Wd.set.call(this,e[0],t,n,e[0])};function Gd(e,t){const n=e[Nn];return(n?$i(n):e)[t]}function vA(e,t,n){var s;const r=Og(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Og(e,t){if(!(t in e))return;let n=Rs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Rs(n)}}function Xd(e){e.modified_||(e.modified_=!0,e.parent_&&Xd(e.parent_))}function Kd(e){e.copy_||(e.copy_=$d(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var AA=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"&&Jn(6),r!==void 0&&typeof r!="function"&&Jn(7);let s;if(zi(t)){const a=Ng(this),u=Qd(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?qd(a):Yd(a)}return Ag(a,r),Cg(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===_g&&(s=void 0),this.autoFreeze_&&Vd(s,!0),r){const a=[],u=[];Vi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else Jn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,s;return[this.produce(t,n,(u,c)=>{r=u,s=c}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){zi(e)||Jn(8),Ls(e)&&(e=NA(e));const t=Ng(this),n=Qd(e,void 0);return n[Nn].isManual_=!0,Yd(t),n}finishDraft(e,t){const n=e&&e[Nn];(!n||!n.isManual_)&&Jn(9);const{scope_:r}=n;return Ag(r,t),Cg(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Vi("Patches").applyPatches_;return Ls(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Qd(e,t){const n=Wo(e)?Vi("MapSet").proxyMap_(e,t):Fu(e)?Vi("MapSet").proxySet_(e,t):SA(e,t);return(t?t.scope_:vg()).drafts_.push(n),n}function NA(e){return Ls(e)||Jn(10,e),Ig(e)}function Ig(e){if(!zi(e)||Uu(e))return e;const t=e[Nn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=$d(e,t.scope_.immer_.useStrictShallowCopy_)}else n=$d(e,!0);return Du(n,(r,s)=>{Sg(n,r,Ig(s))}),t&&(t.finalized_=!1),n}var CA=new AA,kA=CA.produce;function OA(e,t,n){var r=H.useMemo(function(){return kA(e)},[e]);return H.useReducer(r,t,n)}const at={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},Pg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",disableAskElseButton:!1},Rg=H.createContext(null),Lg=H.createContext(null),IA=({children:e,dispatch:t})=>{const n=H.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=H.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),s=H.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=H.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=H.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),c=H.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=H.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),f=H.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),p=H.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),m=H.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),T=H.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=H.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,s,a,u,c,d,f,p,m,T]);return _.jsx(Lg.Provider,{value:y,children:e})},PA=(e,t)=>{const{type:n,payload:r}=t;switch(n){case at.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case at.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case at.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case at.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case at.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case at.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case at.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case at.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case at.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case at.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case at.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case at.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case at.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case at.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case at.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},RA=({promptsConfig:e,children:t})=>{const[n,r]=OA(PA,U(U({},Pg),e||{}));return _.jsx(Rg.Provider,{value:n,children:_.jsx(IA,{dispatch:r,children:t})})};function LA(){var e=H.useRef(!0);return e.current?(e.current=!1,!0):e.current}function DA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function MA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Jd=typeof window!="undefined",zu=function(e){H.useEffect(e,[])},FA=function(e){var t=H.useRef(e);t.current=e,zu(function(){return function(){return t.current()}})},BA=function(e){var t=H.useRef(0),n=H.useState(e),r=n[0],s=n[1],a=H.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return FA(function(){cancelAnimationFrame(t.current)}),[r,a]},UA=function(e,t){return e===t};function HA(e,t){t===void 0&&(t=UA);var n=H.useRef(),r=H.useRef(e),s=LA();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var jA=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,c=BA({width:Jd?window.innerWidth:r,height:Jd?window.innerHeight:a}),d=c[0],f=c[1];return H.useEffect(function(){if(Jd){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return DA(window,"resize",p),function(){MA(window,"resize",p)}}},[]),d};const Dg="cimulate",Zd=`${Dg}:ui-state-update`,ef=`${Dg}:prompts-state-update`,zA=e=>{window.addEventListener(Zd,e)},$A=e=>{window.removeEventListener(Zd,e)},VA=(e,t)=>{const n=new CustomEvent(Zd,{detail:{property:e,value:t}});window.dispatchEvent(n)},Mg=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);et.entryTypeProxy.entryType=e},ni=e=>{const t=et.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;et.statusProxy.isOpen=n,n&&(et.statusProxy.isMinimized=!1)},$u=e=>{const t=et.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;et.statusProxy.isMinimized=n,n&&(et.statusProxy.isOpen=!1)},tf=e=>{et.modalProxy.isFullscreen=e},Vu=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);et.statusProxy.type=e,e==="dialog"||e==="chat"?et.modeProxy.mode="embedded":et.modeProxy.mode="standalone"},nf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);et.dialogProxy.position=e},qA=e=>{const t=et.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;et.dialogProxy.isFullHeight=n};class YA{constructor(){$e(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});$e(this,"connectedProxy");$e(this,"modeProxy");$e(this,"entryTypeProxy");$e(this,"statusProxy");$e(this,"dialogProxy");$e(this,"modalProxy",{isFullscreen:!1});$e(this,"_fullGet",(t,n)=>Reflect.get(t,n));$e(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return VA(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const et=new YA,Fg=H.createContext({mode:et.modeProxy.mode,entryType:et.entryType,status:et.statusProxy,dialogPosition:et.dialogProxy.position,isDialogFullHeight:et.dialogProxy.isFullHeight,dialogWidth:et.dialogProxy.width,isModalFullscreen:et.modalProxy.isFullscreen,previousComponentType:et.statusProxy.type}),WA=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=H.useState(e!=null?e:et.entryTypeProxy.entryType),[u,c]=H.useState(et.modeProxy.mode),[d,f]=H.useState({type:n||et.statusProxy.type,isOpen:et.statusProxy.isOpen,isMinimized:et.statusProxy.isMinimized}),[p,m]=H.useState(et.dialogProxy.position),[T,y]=H.useState(et.dialogProxy.isFullHeight),[x,N]=H.useState(et.dialogProxy.width),[A,v]=H.useState(et.modalProxy.isFullscreen),C=HA(d.type);H.useEffect(()=>{const $=G=>{const{property:D,value:J}=G.detail||{};if(!(!D||J===void 0)){if(D==="mode"){c(J);return}if(D==="entryType"){a(J);return}if(D==="isMinimized"){f(se=>oe(U({},se),{isMinimized:J}));return}if(D==="isOpen"){f(se=>oe(U({},se),{isOpen:J}));return}if(D==="type"){f(se=>oe(U({},se),{type:J}));return}if(D==="position"){m(J);return}if(D==="isFullHeight"){y(J);return}if(D==="width"){N(J);return}if(D==="isFullscreen"){v(J);return}}};return zA($),()=>{$A($)}},[]),zu(()=>{e&&Mg(e)}),zu(()=>{const $=n||(t==null?void 0:t.type);$&&Vu($),t&&"isOpen"in t&&ni(!!t.isOpen),t&&"isMinimized"in t&&$u(!!t.isMinimized)}),zu(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:$}=t.options;$&&nf($),"dialogFullHeight"in t.options&&qA(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&N(t.options.dialogWidth),"isModalFullscreen"in t.options&&tf(!!t.options.isModalFullscreen)});const R=H.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:C||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:x,isModalFullscreen:A}),[u,s,d,C,p,T,x,A]);return _.jsx(Fg.Provider,{value:R,children:r})},GA=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(c)};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 c=setTimeout(()=>{a||(a=!0,At(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),Bg=H.createContext({overrides:{},isInitialized:!1}),XA=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=H.useState({}),[a,u]=H.useState(!1);H.useEffect(()=>{je(null,null,function*(){let f={};e?(At(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield GA(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 c=H.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return _.jsx(Bg.Provider,{value:c,children:n})},Ug=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:c,openLinksInNewTab:d,globalClassName:f,isDevelopment:p=!1,componentType:m,componentConfig:T,entryType:y,entryMessage:x,disclaimerText:N,disclaimerMarkdown:A,clientContext:v,searchPlaceholder:C,searchButtonLabel:R,searchConfig:$,suggestionButtonConfig:G,messageAlignment:D,autoScroll:J,promptsConfig:se,showProductDescription:he,resetConversationMessage:V,conversationHistory:ie,messagingConfig:ee,overrides:we,overridesUrl:de,inlineOverrides:ae,__features:_e,children:ue})=>_.jsx(Qv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:x,theme:c,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:C,searchButtonLabel:R,searchConfig:$,suggestionButtonConfig:G,messageAlignment:D,autoScroll:J,showProductDescription:he,componentConfig:T,clientContext:v,disclaimerMarkdown:A,disclaimerText:N,resetConversationMessage:V,conversationHistory:ie,isDevelopment:p,__features:_e,routingAttributes:ee==null?void 0:ee.routingAttributes,enableDownloadTranscript:ee==null?void 0:ee.enableDownloadTranscript,enableEscalationToAgent:ee==null?void 0:ee.enableEscalationToAgent,showProductCaptions:ee==null?void 0:ee.showProductCaptions,children:_.jsx(WA,{entryType:y,componentConfig:T,componentType:m,children:_.jsx(RA,{promptsConfig:se,children:_.jsx(XA,{overridesUrl:de,inlineOverrides:ae||we,children:_.jsx(bg,{scrt2Url:(ee==null?void 0:ee.scrt2Url)||"",orgId:(ee==null?void 0:ee.orgId)||"",esDeveloperName:(ee==null?void 0:ee.esDeveloperName)||"",routingAttributes:(ee==null?void 0:ee.routingAttributes)||{},capabilitiesVersion:ee==null?void 0:ee.capabilitiesVersion,enableLogging:p,children:ue})})})})}),ri=()=>{const e=H.useContext(Fg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var rf={exports:{}},hn={},sf={exports:{}},of={};var Hg;function KA(){return Hg||(Hg=1,(function(e){function t(z,Z){var w=z.length;z.push(Z);e:for(;0<w;){var k=w-1>>>1,q=z[k];if(0<s(q,Z))z[k]=Z,z[w]=q,w=k;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var Z=z[0],w=z.pop();if(w!==Z){z[0]=w;e:for(var k=0,q=z.length,O=q>>>1;k<O;){var pe=2*(k+1)-1,Oe=z[pe],ye=pe+1,Re=z[ye];if(0>s(Oe,w))ye<q&&0>s(Re,Oe)?(z[k]=Re,z[ye]=w,k=ye):(z[k]=Oe,z[pe]=w,k=pe);else if(ye<q&&0>s(Re,w))z[k]=Re,z[ye]=w,k=ye;else break e}}return Z}function s(z,Z){var w=z.sortIndex-Z.sortIndex;return w!==0?w:z.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],p=1,m=null,T=3,y=!1,x=!1,N=!1,A=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(z){for(var Z=n(f);Z!==null;){if(Z.callback===null)r(f);else if(Z.startTime<=z)r(f),Z.sortIndex=Z.expirationTime,t(d,Z);else break;Z=n(f)}}function $(z){if(N=!1,R(z),!x)if(n(d)!==null)x=!0,_e(G);else{var Z=n(f);Z!==null&&ue($,Z.startTime-z)}}function G(z,Z){x=!1,N&&(N=!1,v(se),se=-1),y=!0;var w=T;try{for(R(Z),m=n(d);m!==null&&(!(m.expirationTime>Z)||z&&!ie());){var k=m.callback;if(typeof k=="function"){m.callback=null,T=m.priorityLevel;var q=k(m.expirationTime<=Z);Z=e.unstable_now(),typeof q=="function"?m.callback=q:m===n(d)&&r(d),R(Z)}else r(d);m=n(d)}if(m!==null)var O=!0;else{var pe=n(f);pe!==null&&ue($,pe.startTime-Z),O=!1}return O}finally{m=null,T=w,y=!1}}var D=!1,J=null,se=-1,he=5,V=-1;function ie(){return!(e.unstable_now()-V<he)}function ee(){if(J!==null){var z=e.unstable_now();V=z;var Z=!0;try{Z=J(!0,z)}finally{Z?we():(D=!1,J=null)}}else D=!1}var we;if(typeof C=="function")we=function(){C(ee)};else if(typeof MessageChannel!="undefined"){var de=new MessageChannel,ae=de.port2;de.port1.onmessage=ee,we=function(){ae.postMessage(null)}}else we=function(){A(ee,0)};function _e(z){J=z,D||(D=!0,we())}function ue(z,Z){se=A(function(){z(e.unstable_now())},Z)}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(z){z.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,_e(G))},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):he=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(z){switch(T){case 1:case 2:case 3:var Z=3;break;default:Z=T}var w=T;T=Z;try{return z()}finally{T=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(z,Z){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var w=T;T=z;try{return Z()}finally{T=w}},e.unstable_scheduleCallback=function(z,Z,w){var k=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?k+w:k):w=k,z){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=w+q,z={id:p++,callback:Z,priorityLevel:z,startTime:w,expirationTime:q,sortIndex:-1},w>k?(z.sortIndex=w,t(f,z),n(d)===null&&z===n(f)&&(N?(v(se),se=-1):N=!0,ue($,w-k))):(z.sortIndex=q,t(d,z),x||y||(x=!0,_e(G))),z},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(z){var Z=T;return function(){var w=T;T=Z;try{return z.apply(this,arguments)}finally{T=w}}}})(of)),of}var jg;function QA(){return jg||(jg=1,sf.exports=KA()),sf.exports}var zg;function JA(){if(zg)return hn;zg=1;var e=Xn(),t=QA();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function T(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,l,h){if(l!==null&&l.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,o,l,h){if(o===null||typeof o=="undefined"||y(i,o,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function N(i,o,l,h,E,b,S){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=o,this.sanitizeURL=b,this.removeEmptyString=S}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new N(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];A[o]=new N(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new N(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new N(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new N(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new N(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new N(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new N(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new N(i,5,!1,i.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function C(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(v,C);A[o]=new N(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(v,C);A[o]=new N(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(v,C);A[o]=new N(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new N(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new N("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new N(i,1,!1,i.toLowerCase(),null,!0,!0)});function R(i,o,l,h){var E=A.hasOwnProperty(o)?A[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(x(o,l,E,h)&&(l=null),h||E===null?T(o)&&(l===null?i.removeAttribute(o):i.setAttribute(o,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(o=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(o):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,o,l):i.setAttribute(o,l))))}var $=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=Symbol.for("react.element"),D=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),se=Symbol.for("react.strict_mode"),he=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),ie=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),we=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),_e=Symbol.for("react.lazy"),ue=Symbol.for("react.offscreen"),z=Symbol.iterator;function Z(i){return i===null||typeof i!="object"?null:(i=z&&i[z]||i["@@iterator"],typeof i=="function"?i:null)}var w=Object.assign,k;function q(i){if(k===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);k=o&&o[1]||""}return`
|
|
17
|
-
`+
|
|
14
|
+
`),l=u===-1?-1:a.indexOf(`
|
|
15
|
+
`,u+1),d=l===-1?"":a.slice(l+1);String(r.stack).endsWith(d)||(r.stack+=`
|
|
16
|
+
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ui(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Iu.assertOptions(r,{silentJSONParsing:Qt.transitional(Qt.boolean),forcedJSONParsing:Qt.transitional(Qt.boolean),clarifyTimeoutError:Qt.transitional(Qt.boolean),legacyInterceptorReqResOrdering:Qt.transitional(Qt.boolean),advertiseZstdAcceptEncoding:Qt.transitional(Qt.boolean),validateStatusUndefinedResolves:Qt.transitional(Qt.boolean)},!1),s!=null&&(q.isFunction(s)?n.paramsSerializer={serialize:s}:Iu.assertOptions(s,{encode:Qt.function,serialize:Qt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Iu.assertOptions(n,{baseUrl:Qt.spelling("baseURL"),withXsrfToken:Qt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&q.merge(a.common,a[n.method]);a&&q.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=Kt.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;d=d&&v.synchronous;const A=n.transitional||Od;A&&A.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const f=[];this.interceptors.response.forEach(function(v){f.push(v.fulfilled,v.rejected)});let p,m=0,T;if(!d){const x=[sg.bind(this),void 0];for(x.unshift(...l),x.push(...f),T=x.length,p=Promise.resolve(n);m<T;)p=p.then(x[m++],x[m++]);return p}T=l.length;let y=n;for(;m<T;){const x=l[m++],v=l[m++];try{y=x(y)}catch(A){v.call(this,A);break}}try{p=sg.call(this,y)}catch(x){return Promise.reject(x)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=Ui(this.defaults,t);const n=X0(t.baseURL,t.url,t.allowAbsoluteUrls,t);return U0(n,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(n,r){return this.request(Ui(r||{},{method:t,url:n,data:r&&q.hasOwnProp(r,"data")?r.data:void 0}))}}),q.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(Ui(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Hi.prototype[t]=n(),t!=="query"&&(Hi.prototype[t+"Form"]=n(!0))});let Yv=class n2{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 Vo(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 n2(function(s){t=s}),cancel:t}}};function Wv(e){return function(n){return e.apply(null,n)}}function Gv(e){return q.isObject(e)&&e.isAxiosError===!0}const Fd={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(Fd).forEach(([e,t])=>{Fd[t]=e});function ag(e){const t=new Hi(e),n=x0(Hi.prototype.request,t);return q.extend(n,Hi.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ag(Ui(e,s))},n}const wt=ag($o);wt.Axios=Hi,wt.CanceledError=Vo,wt.CancelToken=Yv,wt.isCancel=V0,wt.VERSION=Ld,wt.toFormData=Au,wt.AxiosError=Ne,wt.Cancel=wt.CanceledError,wt.all=function(t){return Promise.all(t)},wt.spread=Wv,wt.isAxiosError=Gv,wt.mergeConfig=Ui,wt.AxiosHeaders=Kt,wt.formToJSON=e=>$0(q.isHTMLForm(e)?new FormData(e):e),wt.getAdapter=ig.getAdapter,wt.HttpStatusCode=Fd,wt.default=wt;const{Axios:sB,AxiosError:oB,CanceledError:aB,isCancel:uB,CancelToken:lB,VERSION:cB,all:dB,Cancel:fB,isAxiosError:hB,spread:pB,toFormData:mB,AxiosHeaders:gB,HttpStatusCode:EB,formToJSON:yB,getAdapter:TB,mergeConfig:bB,create:_B}=wt;class Xv{constructor(t,n,r,s=!1,a,u){Ye(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ye(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ye(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ye(this,"baseApiUrl");Ye(this,"headers",{});Ye(this,"fetchConfig",()=>He(this,null,function*(){try{const t=yield wt.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}}));Ye(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 Kv{constructor(t,n,r,s=!1,a,u){Ye(this,"apiService");Ye(this,"config",null);Ye(this,"getConfig",()=>He(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}}));Ye(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ye(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ye(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ye(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ye(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ye(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ye(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ye(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ye(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ye(this,"getProductField",t=>this.config?this.config[t]:"");Ye(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Xv(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 Ct=(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 Qv{constructor(t=!1){Ye(this,"isDevelopment");Ye(this,"_log",(t,n,...r)=>{Ct(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 Jv={copilot:"Your Search Assistant",messaging:"Commerce Client"},ug=H.createContext(null),Zv=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:T,searchConfig:y,suggestionButtonConfig:x,messageAlignment:v="start",autoScroll:A=!0,showProductDescription:S=!1,componentConfig:C,conversationHistory:P,resetConversationMessage:j="",apiKey:W,apiToken:D,baseUrl:K,customerId:ne,tenantId:de,theme:$,isDevelopment:se,__features:te,routingAttributes:xe,enableDownloadTranscript:fe=!0,enableEscalationToAgent:ce=!1,showProductCaptions:he=!1,children:le})=>{const Q=e==="messaging",ue=H.useMemo(()=>{const we=xe==null?void 0:xe.isCartMgmtSupported;return we===!0||we==="true"},[xe]),N=H.useMemo(()=>Q?{config:null}:new Kv(K,W,D,se,ne,de),[Q,K,W,D,se,ne,de]),R=H.useMemo(()=>new Qv(se),[se]);H.useEffect(()=>{Q||!N||N.config||N.getConfig()},[N,Q]);const Y=H.useMemo(()=>nS($),[$]),O=H.useMemo(()=>{const we=(y==null?void 0:y.placeholder)||m,re=(y==null?void 0:y.buttonLabel)||T;let ye="icon";return y!=null&&y.buttonType?ye=y.buttonType:T&&(ye="text"),ae(U({},y||{}),{placeholder:we,buttonLabel:re,buttonType:ye})},[y,m,T]),ge=H.useMemo(()=>ae(U({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||Jv[e!=null?e:"copilot"]}),[r,t,n,e]),Re=H.useMemo(()=>({configModule:N,mode:e!=null?e:"copilot",headerConfig:ge,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:Y,logger:R,searchConfig:O,suggestionButtonConfig:x,messageAlignment:v,autoScroll:A,showProductDescription:!!S,enableMinimize:!!(C!=null&&C.enableMinimize),enableDownloadTranscript:fe,enableEscalationToAgent:ce,showProductCaptions:!!he,resetConversationMessage:j,conversationHistory:{sinceHours:typeof(P==null?void 0:P.sinceHours)=="number"?P.sinceHours:1,limit:P==null?void 0:P.limit},features:te,isCartMgmtSupported:ue}),[N,e,ge,a,s,f,p,l,d,u,O,x,v,A,S,C,fe,ce,he,j,R,Y,P,te,ue]);return _.jsx(ug.Provider,{value:Re,children:le})},ot=()=>{const e=H.useContext(ug);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},lg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],ji=-1;function cg(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.type=="string"&&typeof t.index=="number")return lg.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:ji,data:{content:e}}}function dg(e){let t;try{t=JSON.parse(e)}catch(s){return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.type!="string"||!lg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return ae(U({},n),{type:n.type,index:r})}function fg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function eA(e){return e.type==="markdown"&&e.index===ji?!fg(e.data.content):!0}function tA(e,t){if(t.index===ji){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===ji&&t.type==="markdown"){const a={type:"markdown",index:ji,data:{content:s.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(s=>s.index===t.index);return[...n>=0?e.map((s,a)=>a===n?t:s):[...e,t]].sort((s,a)=>s.index-a.index)}function hg(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const pg={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1,isSilentRequest:!1};function nA(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 hg(e.messages,t.message)?e:ae(U({},e),{messages:[...e.messages,ae(U({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{if(e.isSilentRequest)return e;const n=cg(t.token);return n?ae(U({},e),{streamingBlocks:tA(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null,isSilentRequest:!1};if(hg(e.messages,t.message))return U(U({},e),n);const r=ae(U({},t.message),{type:"FLUSH_STREAMING"}),s=[...e.messages].reverse().find(l=>l.role==="user"),a=(s==null?void 0:s.silent)===!0;let u=!1;try{const l=JSON.parse(r.content);if(typeof l=="object"&&l!==null&&"response"in l){const{response:d}=l;u=Array.isArray(d)&&d.some(f=>typeof f=="object"&&f!==null&&"type"in f&&f.type==="cart")}}catch(l){}if(u&&a){let l=-1;for(let d=e.messages.length-1;d>=0;d--)try{const f=JSON.parse(e.messages[d].content);if(typeof f!="object"||f===null||!("response"in f))continue;const{response:p}=f;if(Array.isArray(p)&&p.some(m=>typeof m=="object"&&m!==null&&"type"in m&&m.type==="cart")){l=d;break}}catch(f){}if(l!==-1){const d=[...e.messages];return d[l]=ae(U({},r),{id:e.messages[l].id}),U(ae(U({},e),{messages:d}),n)}}return U(ae(U({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return ae(U({},e),{isAgentTyping:e.isSilentRequest?!1:t.isTyping,loading:e.isSilentRequest?e.loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return U(ae(U({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.isSilentRequest||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"SET_SILENT_REQUEST":return ae(U({},e),{isSilentRequest:t.isSilent});case"RESET":return ae(U({},pg),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const mg=H.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,sendMessage:()=>{},addToCart:()=>{},resetConversation:()=>{},retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>He(null,null,function*(){})}),rA=4320*60*1e3;function Bd(e,t){return`cim_af_conv_${e}_${t}`}function Ud(e,t){return Date.now()-e>t}function iA(e,t,n){try{const r=Bd(e,t),s=sessionStorage.getItem(r);if(!s)return null;const a=JSON.parse(s);if(!a||typeof a!="object"||!("conversationId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.conversationId!="string"||!u.conversationId?null:typeof u.storedAt!="number"||Ud(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Pu(e,t,n){try{const r=Bd(e,t),s={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(s))}catch(r){}}function Hd(e,t){try{const n=Bd(e,t);sessionStorage.removeItem(n)}catch(n){}}function jd(e,t){return`cim_af_ct_${e}_${t}`}function sA(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(aA(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function oA(e){const t=sA(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function aA(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function gg(e,t){try{const n=jd(e,t),r=sessionStorage.getItem(n);if(!r)return null;const s=JSON.parse(r);if(!s||typeof s!="object"||!("accessToken"in s)||!("lastEventId"in s)||!("storedAt"in s))return null;const a=s;return typeof a.accessToken!="string"||!a.accessToken||typeof a.lastEventId!="string"||!a.lastEventId||typeof a.storedAt!="number"?null:oA(a.accessToken)==="expired"?(sessionStorage.removeItem(n),null):a}catch(n){return null}}function uA(e,t,n,r){try{const s=jd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(s,JSON.stringify(a))}catch(s){}}function lA(e,t){try{const n=jd(e,t);sessionStorage.removeItem(n)}catch(n){}}function cA(e,t){return`cim_af_conv_${e}_${t}`}function dA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=cA(e,t);return new BroadcastChannel(n)}catch(n){return null}}function fA(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 hA(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 pA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function mA(e){if(e)try{e.close()}catch(t){}}function gA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function EA(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Eg(e,...t){let n=e;for(const r of t){if(n==null||typeof n!="object")return"";n=n[r]}return typeof n=="string"?n:""}function yA(e){if(e.entryType!=="Message")return null;const n=EA(e.entryPayload).abstractMessage;if(!n)return null;const r=Eg(n,"staticContent","text")||Eg(n,"content","text")||"";if(!r)return null;const s=gA(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 TA(e){const t=[];for(const n of e){const r=yA(n);r&&t.push(r)}return t}const yg="onCimulateWidgetReady",bA=5e3;function Ru(e={}){const{routingAttributes:t,timeoutMs:n=bA}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=U({},t!=null?t:{});return new Promise(s=>{const a={settled:!1},u=()=>{if(a.settled)return;a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer);const p=Object.keys(r).length>0;s(p?r:t)},l={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(yg,{detail:l,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function _A(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=H.useRef(null),u=H.useRef(null),l=H.useRef(null),d=s.sinceHours*60*60*1e3,f=rA,p=H.useCallback(()=>(l.current||(l.current=fA(a.current)),l.current),[]);H.useEffect(()=>{const S=dA(t,n);a.current=S,l.current=null;const C=hA(S,()=>{const P=u.current;if(!P)return null;const j=gg(t,n);return{conversationId:P,continuationToken:j==null?void 0:j.accessToken,lastEventId:j==null?void 0:j.lastEventId}},()=>{Hd(t,n),u.current=null});return()=>{C(),mA(S),a.current=null}},[t,n]);const m=H.useCallback((S,C)=>He(null,null,function*(){var W;const P=(W=C==null?void 0:C.createIfMissing)!=null?W:!0;let j=iA(t,n,f);if(!j){const D=yield p();D&&!Ud(D.storedAt,f)&&(j=D)}if(!j){if(!P)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const D=yield S.createConversation(yield Ru({routingAttributes:r}));return Pu(t,n,D),u.current=D,{conversationId:D,restoredMessages:[],resumed:!1,outcome:"created"}}try{const K=(yield S.listConversations({conversationId:j.conversationId,startTimestamp:Date.now()-f})).conversations.find(de=>de.conversationId===j.conversationId&&!de.isConversationClosed);if(!K){if(Hd(t,n),!P)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const de=yield S.createConversation(yield Ru({routingAttributes:r}));return Pu(t,n,de),u.current=de,{conversationId:de,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}}S.resumeConversation(K.conversationId),u.current=K.conversationId,Pu(t,n,K.conversationId);let ne=[];try{const de=yield S.listConversationEntries(K.conversationId,{limit:s.limit,startTimestamp:Date.now()-d,direction:"FromStart"});ne=TA(de.conversationEntries)}catch(de){}return{conversationId:K.conversationId,restoredMessages:ne,resumed:!0,outcome:"resumed"}}catch(D){return{conversationId:j.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:D}}}),[t,n,r,s,d,f,p]),T=H.useCallback(S=>{Pu(t,n,S),u.current=S},[t,n]),y=H.useCallback(()=>{Hd(t,n),lA(t,n),pA(a.current),u.current=null},[t,n]),x=H.useCallback(()=>{const S=gg(t,n);return S?{continuationToken:S.accessToken,lastEventId:S.lastEventId}:null},[t,n]),v=H.useCallback(()=>He(null,null,function*(){const S=yield p();return!(S!=null&&S.continuationToken)||Ud(S.storedAt,f)?null:{continuationToken:S.continuationToken,lastEventId:S.lastEventId}}),[f,p]),A=H.useCallback(S=>He(null,null,function*(){try{const{accessToken:C,lastEventId:P}=yield S.generateContinuationToken();uA(t,n,C,P)}catch(C){}}),[t,n]);return{initializeConversation:m,persistConversationId:T,clearPersistedConversation:y,getStoredConnectOptions:x,getPeerConnectOptions:v,persistContinuationToken:A}}const yr={default:"Something went wrong. Please try again.",server:"Something went wrong. Please try again.",rateLimit:"We are getting a lot of requests right now. Please try again in a moment.",network:"You are offline or we couldn't reach the assistant. Check connection and try again.",interrupted:"Something went wrong. Please try again.",connect:"You are offline or we couldn't reach the assistant. Check connection and try again.",lost:"You are offline or we couldn't reach the assistant. Check connection and try again.",routing:"Something went wrong. Please try again."};function xA(e){if(!e||typeof e!="object")return{};const t=e;return{type:typeof t.type=="string"?t.type:void 0,statusCode:typeof t.statusCode=="number"?t.statusCode:void 0}}function Ps(e){const{type:t,statusCode:n}=xA(e);if(t==="api"&&typeof n=="number")return n===429?yr.rateLimit:n>=500?yr.server:yr.default;switch(t){case"network":return yr.network;case"sse":return yr.interrupted;case"auth":return yr.connect;default:return yr.default}}function Tg(e){switch(e.code){case"MAX_RECONNECT":return yr.lost;case"ROUTING_FAILED":return yr.routing;default:return yr.connect}}const wA="Your session ended due to inactivity. Starting a new session…",SA=300*1e3,vA=2e3;function bg(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="auth"?!0:t.type==="api"&&(t.statusCode===401||t.statusCode===403)}function _g(e){if(bg(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function AA(e){var T;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((T=e.variants)!=null?T:[]).filter(y=>y.value),s=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=s?` (${s})`:"",l=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",f=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${l}`;return{prompt:p,display:m}}const xg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,children:f})=>{const{logger:p,conversationHistory:m}=ot(),[T,y]=H.useReducer(nA,pg),x=H.useRef(T);x.current=T;const v=_A({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:m}),A=H.useRef(null),S=H.useRef(l),C=H.useRef(d),P=H.useRef(u),j=H.useRef(!1),W=H.useRef(!1),D=H.useRef(0),K=H.useRef(0),ne=H.useRef(0),de=H.useRef(null),$=H.useRef(null);S.current=l,C.current=d,P.current=u,H.useEffect(()=>{const re=new tS({baseURL:e,orgId:t,esDeveloperName:n,options:U({enableLogging:a},s?{capabilitiesVersion:s}:{})});A.current=re,re.on("connected",()=>{var ie;y({type:"SET_CONNECTION_STATUS",status:"connected"}),(ie=P.current)==null||ie.call(P)}),re.on("disconnected",()=>{y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),re.on("reconnecting",()=>{y({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),re.on("message",ie=>{var Ve;const ve=ae(U({id:ie.messageId||crypto.randomUUID()},ie.messageId?{serverId:ie.messageId}:{}),{role:"agent",content:ie.content,timestamp:ie.timestamp,sender:ie.sender,raw:ie});p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:ve.id,tokensBeforeFlush:D.current,streamedFinalOnly:D.current===0}),D.current=0,y({type:"FLUSH_STREAMING",message:ve}),(Ve=S.current)==null||Ve.call(S,ve)}),re.on("streaming_token",ie=>{if(D.current+=1,p!=null&&p.isDevelopment){const ve=cg(ie.token);ve?ve.index===ji?p.debug("🦜 streaming_token fragment (reassembled downstream)",{token:ie.token}):p.debug("🦜 streaming_token parsed",{type:ve.type,index:ve.index,outputName:ve.type==="tool_results"?ve.output_name:void 0}):p.debug("🦜 streaming_token empty",{token:ie.token})}y({type:"APPEND_STREAMING_TOKEN",token:ie.token})}),re.on("typing_started",()=>{y({type:"SET_AGENT_TYPING",isTyping:!0})}),re.on("typing_stopped",()=>{y({type:"SET_AGENT_TYPING",isTyping:!1})}),re.on("progress_indicator",ie=>{y({type:"ADD_PROGRESS_STEP",message:ie.message})}),re.on("routing_result",ie=>{var ve;if(y({type:"SET_ROUTING_RESULT",result:ie}),!ie.isSuccessful){const Ve=`Routing failed: ${ie.failureType||"unknown"}`;y({type:"SET_ERROR",error:Tg({code:"ROUTING_FAILED"})}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(ve=C.current)==null||ve.call(C,Ve)}}),re.on("participant_changed",ie=>{if(ie.participant.name==="Automated Process")return;const ve=ae(U({id:crypto.randomUUID()},ie.entryId?{serverId:ie.entryId}:{}),{role:"system",content:ie.action==="add"?`${ie.participant.name||"Agent"} joined the conversation`:`${ie.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:ie}),y({type:"ADD_MESSAGE",message:ve})}),re.on("conversation_closed",()=>{const ie={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};y({type:"ADD_MESSAGE",message:ie}),y({type:"SET_CONVERSATION_ID",id:null}),v.clearPersistedConversation()}),re.on("error",ie=>{var ve;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:ie}),ie.code==="SESSION_EXPIRED"){W.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}),y({type:"SET_LOADING",isLoading:!1});return}y({type:"SET_ERROR",error:Tg(ie)}),ie.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(ve=C.current)==null||ve.call(C,ie.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"});const ye=()=>He(null,null,function*(){let ie=v.getStoredConnectOptions(),ve=!1;ie||(ie=yield v.getPeerConnectOptions(),ve=!!ie);try{yield re.connect(ie!=null?ie:void 0)}catch(_t){if(ie&&_g(_t))p==null||p.log("Stored token expired on connect — falling back to fresh connect"),ve||v.clearPersistedConversation(),yield re.connect();else throw _t}yield v.persistContinuationToken(re);const Ve=yield v.initializeConversation(re);if(p==null||p.log("🦜 initial connect complete",{conversationId:Ve.conversationId,resumed:Ve.resumed,outcome:Ve.outcome,restoredMessages:Ve.restoredMessages.length}),Ve.outcome==="unverified-error"){Ve.conversationId&&(re.resumeConversation(Ve.conversationId),y({type:"SET_CONVERSATION_ID",id:Ve.conversationId}));return}y({type:"SET_CONVERSATION_ID",id:Ve.conversationId}),Ve.resumed&&Ve.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:Ve.restoredMessages})});return $.current=ye,ye().catch(ie=>{var ve;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:Ps(ie)}),(ve=C.current)==null||ve.call(C,ie.message)}),()=>{re.disconnect(),re.off(),A.current=null,$.current=null}},[e,t,n,s]);const se=H.useCallback(()=>He(null,null,function*(){const re=A.current;if(!re)return!1;const ye=v.getStoredConnectOptions();if(!ye)return p==null||p.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;p==null||p.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{re.disconnect(),yield re.connect(ye)}catch(ve){if(_g(ve))return p==null||p.log("🦜 attemptResume: token expired (401) — will start fresh",{error:ve instanceof Error?ve.message:String(ve)}),!1;throw p==null||p.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:ve instanceof Error?ve.message:String(ve)}),ve}yield v.persistContinuationToken(re);const ie=yield v.initializeConversation(re,{createIfMissing:!1});return ie.outcome==="not-found-or-closed"||!ie.conversationId?(p==null||p.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(ie.outcome==="unverified-error"&&(p==null||p.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:ie.conversationId}),re.resumeConversation(ie.conversationId)),p==null||p.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:ie.conversationId}),y({type:"SET_CONVERSATION_ID",id:ie.conversationId}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(ie.conversationId),W.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[v,p]),te=H.useCallback(re=>He(null,null,function*(){var ie;const ye=A.current;if(ye){y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""});try{yield ye.sendMessage(re)}catch(ve){y({type:"SET_SEND_ERROR",error:{text:re,message:Ps(ve)}}),(ie=C.current)==null||ie.call(C,ve instanceof Error?ve.message:String(ve))}}}),[]),xe=H.useCallback(re=>He(null,null,function*(){var ie;const ye=A.current;if(!(!ye||j.current)){j.current=!0;try{if(yield se()){re&&(yield te(re));return}p==null||p.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),W.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:wA,timestamp:new Date().toISOString()}}),v.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),ye.disconnect(),yield ye.connect(),yield v.persistContinuationToken(ye);const ve=yield ye.createConversation(yield Ru({routingAttributes:r}));p==null||p.log("🦜 recoverExpiredSession: new conversation created",{conversationId:ve}),y({type:"SET_CONVERSATION_ID",id:ve}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(ve),re&&(yield te(re))}catch(ve){const Ve=ve instanceof Error?ve.message:String(ve);y({type:"SET_ERROR",error:Ps(ve)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(ie=C.current)==null||ie.call(C,Ve)}finally{j.current=!1}}}),[r,v,se,te,p]),fe=H.useRef(xe);fe.current=xe;const ce=H.useCallback(()=>He(null,null,function*(){const re=A.current;if(!re||j.current)return;if(!x.current.conversationId&&!W.current){re.reconnect();return}j.current=!0;const ye=He(null,null,function*(){try{(yield se())||(W.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(ie){W.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{j.current=!1,de.current=null}});de.current=ye,yield ye}),[se]),he=H.useRef(ce);he.current=ce,H.useEffect(()=>{const re=()=>{const qt=Date.now();qt-ne.current<vA||(ne.current=qt,he.current())},ye=()=>{if(document.visibilityState==="hidden"){K.current=Date.now();return}const qt=A.current;if(!qt)return;const or=K.current?Date.now()-K.current:0;K.current=0,(W.current||!qt.isConnected||or>SA)&&re()},ie=qt=>{qt.persisted&&re()},ve=()=>{K.current=Date.now()},Ve=()=>re(),_t=()=>re();return document.addEventListener("visibilitychange",ye),window.addEventListener("pageshow",ie),window.addEventListener("pagehide",ve),document.addEventListener("resume",Ve),window.addEventListener("online",_t),()=>{document.removeEventListener("visibilitychange",ye),window.removeEventListener("pageshow",ie),window.removeEventListener("pagehide",ve),document.removeEventListener("resume",Ve),window.removeEventListener("online",_t)}},[]);const le=H.useCallback((re,ye)=>{const ie=A.current;if(ie){if(W.current){fe.current(re);return}ie.sendMessage(re).catch(ve=>{var Ve;if(bg(ve)){fe.current(re);return}y({type:"SET_SEND_ERROR",error:ye(Ps(ve))}),(Ve=C.current)==null||Ve.call(C,ve.message)})}},[]),Q=H.useCallback(re=>{const ye=de.current;if(ye){ye.then(re);return}re()},[]),ue=H.useCallback((re,ye,ie)=>{if(!A.current)return;const Ve={id:crypto.randomUUID(),role:"user",content:ye!=null?ye:re,timestamp:new Date().toISOString(),silent:ie==null?void 0:ie.silent};y({type:"CLEAR_SEND_ERROR"}),y({type:"ADD_MESSAGE",message:Ve}),ie!=null&&ie.silent?y({type:"SET_SILENT_REQUEST",isSilent:!0}):(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""})),Q(()=>le(re,_t=>({text:re,displayContent:ye,message:_t})))},[le,Q]),N=H.useCallback((re,ye)=>{re.trim()&&ue(re,void 0,ye)},[ue]),R=H.useCallback(re=>{if(!A.current)return;const{prompt:ye,display:ie}=AA(re);ue(ye,ie)},[ue]),Y=H.useCallback(()=>{const re=A.current,ye=x.current.sendError;!re||!ye||Q(()=>{j.current||(y({type:"CLEAR_SEND_ERROR"}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),le(ye.text,ie=>ae(U({},ye),{message:ie})))})},[le,Q]),O=H.useCallback(()=>{const re=A.current,ye=$.current;!re||!ye||(W.current=!1,re.disconnect(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),ye().catch(ie=>{var ve;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:Ps(ie)}),(ve=C.current)==null||ve.call(C,ie.message)}))},[]),ge=H.useCallback(()=>{const re=A.current;re&&(W.current=!1,v.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),re.endConversation().then(()=>(re.disconnect(),re.connect())).then(()=>He(null,null,function*(){return yield v.persistContinuationToken(re),re.createConversation(yield Ru({routingAttributes:r}))})).then(ye=>{y({type:"SET_CONVERSATION_ID",id:ye}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(ye)}).catch(ye=>{var ie;y({type:"SET_ERROR",error:Ps(ye)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(ie=C.current)==null||ie.call(C,ye.message)}))},[r,v]),Re=H.useCallback(()=>He(null,null,function*(){var ve;const re=A.current;if(!re)return;const ye=yield re.retrieveConversationTranscript(),ie=URL.createObjectURL(ye);try{const Ve=document.createElement("a");Ve.href=ie,Ve.download=`transcript-${(ve=re.conversationId)!=null?ve:"conversation"}.pdf`,document.body.appendChild(Ve),Ve.click(),Ve.remove()}finally{URL.revokeObjectURL(ie)}}),[]),we=H.useMemo(()=>({connectionStatus:T.connectionStatus,isConnected:T.connectionStatus==="connected"&&T.conversationId!==null,isAgentTyping:T.isAgentTyping,conversationId:T.conversationId,messages:T.messages,streamingBlocks:T.streamingBlocks,progressMessage:T.progressMessage,progressSteps:T.progressSteps,error:T.error,sendError:T.sendError,loading:T.loading,sessionExpired:T.sessionExpired,sendMessage:N,addToCart:R,resetConversation:ge,retryLastMessage:Y,retryConnection:O,downloadTranscript:Re}),[T,N,R,ge,Y,O,Re]);return _.jsx(mg.Provider,{value:we,children:f})};var wg=Symbol.for("immer-nothing"),Sg=Symbol.for("immer-draftable"),kn=Symbol.for("immer-state");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Rs=Object.getPrototypeOf;function Ls(e){return!!e&&!!e[kn]}function zi(e){var t;return e?vg(e)||Array.isArray(e)||!!e[Sg]||!!((t=e.constructor)!=null&&t[Sg])||qo(e)||Mu(e):!1}var NA=Object.prototype.constructor.toString();function vg(e){if(!e||typeof e!="object")return!1;const t=Rs(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===NA}function Lu(e,t){Du(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Du(e){const t=e[kn];return t?t.type_:Array.isArray(e)?1:qo(e)?2:Mu(e)?3:0}function zd(e,t){return Du(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ag(e,t,n){const r=Du(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function CA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function qo(e){return e instanceof Map}function Mu(e){return e instanceof Set}function $i(e){return e.copy_||e.base_}function $d(e,t){if(qo(e))return new Map(e);if(Mu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=vg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[kn];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],l=r[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(Rs(e),r)}else{const r=Rs(e);if(r!==null&&n)return U({},e);const s=Object.create(r);return Object.assign(s,e)}}function Vd(e,t=!1){return Bu(e)||Ls(e)||!zi(e)||(Du(e)>1&&Object.defineProperties(e,{set:{value:Fu},add:{value:Fu},clear:{value:Fu},delete:{value:Fu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>Vd(n,!0))),e}function Fu(){Zn(2)}function Bu(e){return Object.isFrozen(e)}var kA={};function Vi(e){const t=kA[e];return t||Zn(0,e),t}var Yo;function Ng(){return Yo}function OA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Cg(e,t){t&&(Vi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qd(e){Yd(e),e.drafts_.forEach(IA),e.drafts_=null}function Yd(e){e===Yo&&(Yo=e.parent_)}function kg(e){return Yo=OA(Yo,e)}function IA(e){const t=e[kn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Og(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[kn].modified_&&(qd(t),Zn(4)),zi(e)&&(e=Uu(t,e),t.parent_||Hu(t,e)),t.patches_&&Vi("Patches").generateReplacementPatches_(n[kn].base_,e,t.patches_,t.inversePatches_)):e=Uu(t,n,[]),qd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wg?e:void 0}function Uu(e,t,n){if(Bu(t))return t;const r=t[kn];if(!r)return Lu(t,(s,a)=>Ig(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Hu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),Lu(a,(l,d)=>Ig(e,r,s,l,d,n,u)),Hu(e,s,!1),n&&e.patches_&&Vi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Ig(e,t,n,r,s,a,u){if(Ls(s)){const l=a&&t&&t.type_!==3&&!zd(t.assigned_,r)?a.concat(r):void 0,d=Uu(e,s,l);if(Ag(n,r,d),Ls(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(zi(s)&&!Bu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Uu(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(qo(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Hu(e,s)}}function Hu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Vd(t,n)}function PA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Ng(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Wd;n&&(s=[r],a=Wo);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var Wd={get(e,t){if(t===kn)return e;const n=$i(e);if(!zd(n,t))return RA(e,n,t);const r=n[t];return e.finalized_||!zi(r)?r:r===Gd(e.base_,t)?(Kd(e),e.copy_[t]=Qd(r,e)):r},has(e,t){return t in $i(e)},ownKeys(e){return Reflect.ownKeys($i(e))},set(e,t,n){const r=Pg($i(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Gd($i(e),t),a=s==null?void 0:s[kn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(CA(n,s)&&(n!==void 0||zd(e.base_,t)))return!0;Kd(e),Xd(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 Gd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Kd(e),Xd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=$i(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return Rs(e.base_)},setPrototypeOf(){Zn(12)}},Wo={};Lu(Wd,(e,t)=>{Wo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Wo.deleteProperty=function(e,t){return Wo.set.call(this,e,t,void 0)},Wo.set=function(e,t,n){return Wd.set.call(this,e[0],t,n,e[0])};function Gd(e,t){const n=e[kn];return(n?$i(n):e)[t]}function RA(e,t,n){var s;const r=Pg(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Pg(e,t){if(!(t in e))return;let n=Rs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Rs(n)}}function Xd(e){e.modified_||(e.modified_=!0,e.parent_&&Xd(e.parent_))}function Kd(e){e.copy_||(e.copy_=$d(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var LA=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"&&Zn(6),r!==void 0&&typeof r!="function"&&Zn(7);let s;if(zi(t)){const a=kg(this),u=Qd(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?qd(a):Yd(a)}return Cg(a,r),Og(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===wg&&(s=void 0),this.autoFreeze_&&Vd(s,!0),r){const a=[],u=[];Vi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,d=>t(d,...l));let r,s;return[this.produce(t,n,(u,l)=>{r=u,s=l}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){zi(e)||Zn(8),Ls(e)&&(e=DA(e));const t=kg(this),n=Qd(e,void 0);return n[kn].isManual_=!0,Yd(t),n}finishDraft(e,t){const n=e&&e[kn];(!n||!n.isManual_)&&Zn(9);const{scope_:r}=n;return Cg(r,t),Og(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Vi("Patches").applyPatches_;return Ls(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Qd(e,t){const n=qo(e)?Vi("MapSet").proxyMap_(e,t):Mu(e)?Vi("MapSet").proxySet_(e,t):PA(e,t);return(t?t.scope_:Ng()).drafts_.push(n),n}function DA(e){return Ls(e)||Zn(10,e),Rg(e)}function Rg(e){if(!zi(e)||Bu(e))return e;const t=e[kn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=$d(e,t.scope_.immer_.useStrictShallowCopy_)}else n=$d(e,!0);return Lu(n,(r,s)=>{Ag(n,r,Rg(s))}),t&&(t.finalized_=!1),n}var MA=new LA,FA=MA.produce;function BA(e,t,n){var r=H.useMemo(function(){return FA(e)},[e]);return H.useReducer(r,t,n)}const lt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},Lg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",disableAskElseButton:!1},Dg=H.createContext(null),Mg=H.createContext(null),UA=({children:e,dispatch:t})=>{const n=H.useCallback(x=>{t({type:lt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=H.useCallback(x=>{t({type:lt.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),s=H.useCallback(x=>{t({type:lt.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=H.useCallback(x=>{t({type:lt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=H.useCallback(x=>{t({type:lt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),l=H.useCallback(x=>{t({type:lt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=H.useCallback(x=>{t({type:lt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),f=H.useCallback(x=>{t({type:lt.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),p=H.useCallback(x=>{t({type:lt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),m=H.useCallback(x=>{t({type:lt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),T=H.useCallback(x=>{t({type:lt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=H.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,s,a,u,l,d,f,p,m,T]);return _.jsx(Mg.Provider,{value:y,children:e})},HA=(e,t)=>{const{type:n,payload:r}=t;switch(n){case lt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case lt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case lt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case lt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case lt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case lt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case lt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case lt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case lt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case lt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case lt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case lt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case lt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case lt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case lt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},jA=({promptsConfig:e,children:t})=>{const[n,r]=BA(HA,U(U({},Lg),e||{}));return _.jsx(Dg.Provider,{value:n,children:_.jsx(UA,{dispatch:r,children:t})})};function zA(){var e=H.useRef(!0);return e.current?(e.current=!1,!0):e.current}function $A(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function VA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Jd=typeof window!="undefined",ju=function(e){H.useEffect(e,[])},qA=function(e){var t=H.useRef(e);t.current=e,ju(function(){return function(){return t.current()}})},YA=function(e){var t=H.useRef(0),n=H.useState(e),r=n[0],s=n[1],a=H.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return qA(function(){cancelAnimationFrame(t.current)}),[r,a]},WA=function(e,t){return e===t};function GA(e,t){t===void 0&&(t=WA);var n=H.useRef(),r=H.useRef(e),s=zA();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var XA=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,l=YA({width:Jd?window.innerWidth:r,height:Jd?window.innerHeight:a}),d=l[0],f=l[1];return H.useEffect(function(){if(Jd){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return $A(window,"resize",p),function(){VA(window,"resize",p)}}},[]),d};const Fg="cimulate",Zd=`${Fg}:ui-state-update`,ef=`${Fg}:prompts-state-update`,KA=e=>{window.addEventListener(Zd,e)},QA=e=>{window.removeEventListener(Zd,e)},JA=(e,t)=>{const n=new CustomEvent(Zd,{detail:{property:e,value:t}});window.dispatchEvent(n)},Bg=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);nt.entryTypeProxy.entryType=e},ni=e=>{const t=nt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;nt.statusProxy.isOpen=n,n&&(nt.statusProxy.isMinimized=!1)},zu=e=>{const t=nt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;nt.statusProxy.isMinimized=n,n&&(nt.statusProxy.isOpen=!1)},tf=e=>{nt.modalProxy.isFullscreen=e},$u=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);nt.statusProxy.type=e,e==="dialog"||e==="chat"?nt.modeProxy.mode="embedded":nt.modeProxy.mode="standalone"},nf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);nt.dialogProxy.position=e},ZA=e=>{const t=nt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;nt.dialogProxy.isFullHeight=n};class eN{constructor(){Ye(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Ye(this,"connectedProxy");Ye(this,"modeProxy");Ye(this,"entryTypeProxy");Ye(this,"statusProxy");Ye(this,"dialogProxy");Ye(this,"modalProxy",{isFullscreen:!1});Ye(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ye(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return JA(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const nt=new eN,Ug=H.createContext({mode:nt.modeProxy.mode,entryType:nt.entryType,status:nt.statusProxy,dialogPosition:nt.dialogProxy.position,isDialogFullHeight:nt.dialogProxy.isFullHeight,dialogWidth:nt.dialogProxy.width,isModalFullscreen:nt.modalProxy.isFullscreen,previousComponentType:nt.statusProxy.type}),tN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=H.useState(e!=null?e:nt.entryTypeProxy.entryType),[u,l]=H.useState(nt.modeProxy.mode),[d,f]=H.useState({type:n||nt.statusProxy.type,isOpen:nt.statusProxy.isOpen,isMinimized:nt.statusProxy.isMinimized}),[p,m]=H.useState(nt.dialogProxy.position),[T,y]=H.useState(nt.dialogProxy.isFullHeight),[x,v]=H.useState(nt.dialogProxy.width),[A,S]=H.useState(nt.modalProxy.isFullscreen),C=GA(d.type);H.useEffect(()=>{const j=W=>{const{property:D,value:K}=W.detail||{};if(!(!D||K===void 0)){if(D==="mode"){l(K);return}if(D==="entryType"){a(K);return}if(D==="isMinimized"){f(ne=>ae(U({},ne),{isMinimized:K}));return}if(D==="isOpen"){f(ne=>ae(U({},ne),{isOpen:K}));return}if(D==="type"){f(ne=>ae(U({},ne),{type:K}));return}if(D==="position"){m(K);return}if(D==="isFullHeight"){y(K);return}if(D==="width"){v(K);return}if(D==="isFullscreen"){S(K);return}}};return KA(j),()=>{QA(j)}},[]),ju(()=>{e&&Bg(e)}),ju(()=>{const j=n||(t==null?void 0:t.type);j&&$u(j),t&&"isOpen"in t&&ni(!!t.isOpen),t&&"isMinimized"in t&&zu(!!t.isMinimized)}),ju(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:j}=t.options;j&&nf(j),"dialogFullHeight"in t.options&&ZA(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&tf(!!t.options.isModalFullscreen)});const P=H.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:C||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:x,isModalFullscreen:A}),[u,s,d,C,p,T,x,A]);return _.jsx(Ug.Provider,{value:P,children:r})},nN=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){Ct(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){Ct(!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"?(Ct(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(Ct(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),Ct(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,Ct(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),Hg=H.createContext({overrides:{},isInitialized:!1}),rN=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=H.useState({}),[a,u]=H.useState(!1);H.useEffect(()=>{He(null,null,function*(){let f={};e?(Ct(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield nN(e)):t&&typeof t=="object"?(Ct(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(Ct(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=H.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return _.jsx(Hg.Provider,{value:l,children:n})},jg=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:l,openLinksInNewTab:d,globalClassName:f,isDevelopment:p=!1,componentType:m,componentConfig:T,entryType:y,entryMessage:x,disclaimerText:v,disclaimerMarkdown:A,clientContext:S,searchPlaceholder:C,searchButtonLabel:P,searchConfig:j,suggestionButtonConfig:W,messageAlignment:D,autoScroll:K,promptsConfig:ne,showProductDescription:de,resetConversationMessage:$,conversationHistory:se,messagingConfig:te,overrides:xe,overridesUrl:fe,inlineOverrides:ce,__features:he,children:le})=>_.jsx(Zv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:x,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:C,searchButtonLabel:P,searchConfig:j,suggestionButtonConfig:W,messageAlignment:D,autoScroll:K,showProductDescription:de,componentConfig:T,clientContext:S,disclaimerMarkdown:A,disclaimerText:v,resetConversationMessage:$,conversationHistory:se,isDevelopment:p,__features:he,routingAttributes:te==null?void 0:te.routingAttributes,enableDownloadTranscript:te==null?void 0:te.enableDownloadTranscript,enableEscalationToAgent:te==null?void 0:te.enableEscalationToAgent,showProductCaptions:te==null?void 0:te.showProductCaptions,children:_.jsx(tN,{entryType:y,componentConfig:T,componentType:m,children:_.jsx(jA,{promptsConfig:ne,children:_.jsx(rN,{overridesUrl:fe,inlineOverrides:ce||xe,children:_.jsx(xg,{scrt2Url:(te==null?void 0:te.scrt2Url)||"",orgId:(te==null?void 0:te.orgId)||"",esDeveloperName:(te==null?void 0:te.esDeveloperName)||"",routingAttributes:(te==null?void 0:te.routingAttributes)||{},capabilitiesVersion:te==null?void 0:te.capabilitiesVersion,enableLogging:p,children:le})})})})}),ri=()=>{const e=H.useContext(Ug);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var rf={exports:{}},gn={},sf={exports:{}},of={};var zg;function iN(){return zg||(zg=1,(function(e){function t(Q,ue){var N=Q.length;Q.push(ue);e:for(;0<N;){var R=N-1>>>1,Y=Q[R];if(0<s(Y,ue))Q[R]=ue,Q[N]=Y,N=R;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var ue=Q[0],N=Q.pop();if(N!==ue){Q[0]=N;e:for(var R=0,Y=Q.length,O=Y>>>1;R<O;){var ge=2*(R+1)-1,Re=Q[ge],we=ge+1,re=Q[we];if(0>s(Re,N))we<Y&&0>s(re,Re)?(Q[R]=re,Q[we]=N,R=we):(Q[R]=Re,Q[ge]=N,R=ge);else if(we<Y&&0>s(re,N))Q[R]=re,Q[we]=N,R=we;else break e}}return ue}function s(Q,ue){var N=Q.sortIndex-ue.sortIndex;return N!==0?N:Q.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var d=[],f=[],p=1,m=null,T=3,y=!1,x=!1,v=!1,A=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(Q){for(var ue=n(f);ue!==null;){if(ue.callback===null)r(f);else if(ue.startTime<=Q)r(f),ue.sortIndex=ue.expirationTime,t(d,ue);else break;ue=n(f)}}function j(Q){if(v=!1,P(Q),!x)if(n(d)!==null)x=!0,he(W);else{var ue=n(f);ue!==null&&le(j,ue.startTime-Q)}}function W(Q,ue){x=!1,v&&(v=!1,S(ne),ne=-1),y=!0;var N=T;try{for(P(ue),m=n(d);m!==null&&(!(m.expirationTime>ue)||Q&&!se());){var R=m.callback;if(typeof R=="function"){m.callback=null,T=m.priorityLevel;var Y=R(m.expirationTime<=ue);ue=e.unstable_now(),typeof Y=="function"?m.callback=Y:m===n(d)&&r(d),P(ue)}else r(d);m=n(d)}if(m!==null)var O=!0;else{var ge=n(f);ge!==null&&le(j,ge.startTime-ue),O=!1}return O}finally{m=null,T=N,y=!1}}var D=!1,K=null,ne=-1,de=5,$=-1;function se(){return!(e.unstable_now()-$<de)}function te(){if(K!==null){var Q=e.unstable_now();$=Q;var ue=!0;try{ue=K(!0,Q)}finally{ue?xe():(D=!1,K=null)}}else D=!1}var xe;if(typeof C=="function")xe=function(){C(te)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,ce=fe.port2;fe.port1.onmessage=te,xe=function(){ce.postMessage(null)}}else xe=function(){A(te,0)};function he(Q){K=Q,D||(D=!0,xe())}function le(Q,ue){ne=A(function(){Q(e.unstable_now())},ue)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,he(W))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Q){switch(T){case 1:case 2:case 3:var ue=3;break;default:ue=T}var N=T;T=ue;try{return Q()}finally{T=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,ue){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var N=T;T=Q;try{return ue()}finally{T=N}},e.unstable_scheduleCallback=function(Q,ue,N){var R=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?R+N:R):N=R,Q){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=N+Y,Q={id:p++,callback:ue,priorityLevel:Q,startTime:N,expirationTime:Y,sortIndex:-1},N>R?(Q.sortIndex=N,t(f,Q),n(d)===null&&Q===n(f)&&(v?(S(ne),ne=-1):v=!0,le(j,N-R))):(Q.sortIndex=Y,t(d,Q),x||y||(x=!0,he(W))),Q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(Q){var ue=T;return function(){var N=T;T=ue;try{return Q.apply(this,arguments)}finally{T=N}}}})(of)),of}var $g;function sN(){return $g||($g=1,sf.exports=iN()),sf.exports}var Vg;function oN(){if(Vg)return gn;Vg=1;var e=Kn(),t=sN();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var l=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function T(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,c,h){if(c!==null&&c.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,o,c,h){if(o===null||typeof o=="undefined"||y(i,o,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function v(i,o,c,h,E,b,w){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=c,this.propertyName=i,this.type=o,this.sanitizeURL=b,this.removeEmptyString=w}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];A[o]=new v(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new v(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function C(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,C);A[o]=new v(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(S,C);A[o]=new v(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(S,C);A[o]=new v(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function P(i,o,c,h){var E=A.hasOwnProperty(o)?A[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(x(o,c,E,h)&&(c=null),h||E===null?T(o)&&(c===null?i.removeAttribute(o):i.setAttribute(o,""+c)):E.mustUseProperty?i[E.propertyName]=c===null?E.type===3?!1:"":c:(o=E.attributeName,h=E.attributeNamespace,c===null?i.removeAttribute(o):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,h?i.setAttributeNS(h,o,c):i.setAttribute(o,c))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),D=Symbol.for("react.portal"),K=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),se=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),xe=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),he=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),Q=Symbol.iterator;function ue(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var N=Object.assign,R;function Y(i){if(R===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);R=o&&o[1]||""}return`
|
|
17
|
+
`+R+i}var O=!1;function ge(i,o){if(!i||O)return"";O=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Z){var h=Z}Reflect.construct(i,[],o)}else{try{o.call()}catch(Z){h=Z}i.call(o.prototype)}else{try{throw Error()}catch(Z){h=Z}i()}}catch(Z){if(Z&&h&&typeof Z.stack=="string"){for(var E=Z.stack.split(`
|
|
18
18
|
`),b=h.stack.split(`
|
|
19
|
-
`),
|
|
20
|
-
`+E[S].replace(" at new "," at ");return i.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",i.displayName)),j}while(1<=S&&0<=M);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?q(i):""}function Oe(i){switch(i.tag){case 5:return q(i.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return i=pe(i.type,!1),i;case 11:return i=pe(i.type.render,!1),i;case 1:return i=pe(i.type,!0),i;default:return""}}function ye(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 J:return"Fragment";case D:return"Portal";case he:return"Profiler";case se:return"StrictMode";case we:return"Suspense";case de:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ie:return(i.displayName||"Context")+".Consumer";case V:return(i._context.displayName||"Context")+".Provider";case ee:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ae:return o=i.displayName||null,o!==null?o:ye(i.type)||"Memo";case _e:o=i._payload,i=i._init;try{return ye(i(o))}catch(l){}}return null}function Re(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 ye(o);case 8:return o===se?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Be(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ke(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Tt(i){var o=Ke(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,b=l.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,b.call(this,S)}}),Object.defineProperty(i,o,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function jn(i){i._valueTracker||(i._valueTracker=Tt(i))}function Tn(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return i&&(h=Ke(i)?i.checked?"true":"false":i.value),i=h,i!==l?(o.setValue(i),!0):!1}function $r(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 Vr(i,o){var l=o.checked;return w({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function an(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=Be(o.value!=null?o.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ue(i,o){o=o.checked,o!=null&&R(i,"checked",o,!1)}function Ct(i,o){Ue(i,o);var l=Be(o.value),h=o.type;if(l!=null)h==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?bn(i,o.type,l):o.hasOwnProperty("defaultValue")&&bn(i,o.type,Be(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function In(i,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,l||o===i.value||(i.value=o),i.defaultValue=o}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function bn(i,o,l){(o!=="number"||$r(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var sr=Array.isArray;function Cr(i,o,l,h){if(i=i.options,o){o={};for(var E=0;E<l.length;E++)o["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=o.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Be(l),o=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function or(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return w({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Ql(i,o){var l=o.value;if(l==null){if(l=o.children,o=o.defaultValue,l!=null){if(o!=null)throw Error(n(92));if(sr(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:Be(l)}}function Jl(i,o){var l=Be(o.value),h=Be(o.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),o.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function Zl(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function re(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 be(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?re(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Fe,qe=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,l,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(Fe=Fe||document.createElement("div"),Fe.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Fe.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function Qe(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var $t={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},qr=["Webkit","ms","Moz","O"];Object.keys($t).forEach(function(i){qr.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),$t[o]=$t[i]})});function zn(i,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||$t.hasOwnProperty(i)&&$t[i]?(""+o).trim():o+"px"}function mi(i,o){i=i.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=zn(l,o[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var ls=w({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 Vt(i,o){if(o){if(ls[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function kr(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 Pn=null;function hp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var pp=null,fo=null,ho=null;function h_(i){if(i=tu(i)){if(typeof pp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=xc(o),pp(i.stateNode,i.type,o))}}function p_(i){fo?ho?ho.push(i):ho=[i]:fo=i}function m_(){if(fo){var i=fo,o=ho;if(ho=fo=null,h_(i),o)for(i=0;i<o.length;i++)h_(o[i])}}function g_(i,o){return i(o)}function E_(){}var mp=!1;function y_(i,o,l){if(mp)return i(o,l);mp=!0;try{return g_(i,o,l)}finally{mp=!1,(fo!==null||ho!==null)&&(E_(),m_())}}function La(i,o){var l=i.stateNode;if(l===null)return null;var h=xc(l);if(h===null)return null;l=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,o,typeof l));return l}var gp=!1;if(c)try{var Da={};Object.defineProperty(Da,"passive",{get:function(){gp=!0}}),window.addEventListener("test",Da,Da),window.removeEventListener("test",Da,Da)}catch(i){gp=!1}function z9(i,o,l,h,E,b,S,M,j){var te=Array.prototype.slice.call(arguments,3);try{o.apply(l,te)}catch(fe){this.onError(fe)}}var Ma=!1,ec=null,tc=!1,Ep=null,$9={onError:function(i){Ma=!0,ec=i}};function V9(i,o,l,h,E,b,S,M,j){Ma=!1,ec=null,z9.apply($9,arguments)}function q9(i,o,l,h,E,b,S,M,j){if(V9.apply(this,arguments),Ma){if(Ma){var te=ec;Ma=!1,ec=null}else throw Error(n(198));tc||(tc=!0,Ep=te)}}function cs(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function T_(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 b_(i){if(cs(i)!==i)throw Error(n(188))}function Y9(i){var o=i.alternate;if(!o){if(o=cs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var l=i,h=o;;){var E=l.return;if(E===null)break;var b=E.alternate;if(b===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===l)return b_(E),i;if(b===h)return b_(E),o;b=b.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=b;else{for(var S=!1,M=E.child;M;){if(M===l){S=!0,l=E,h=b;break}if(M===h){S=!0,h=E,l=b;break}M=M.sibling}if(!S){for(M=b.child;M;){if(M===l){S=!0,l=b,h=E;break}if(M===h){S=!0,h=b,l=E;break}M=M.sibling}if(!S)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:o}function __(i){return i=Y9(i),i!==null?x_(i):null}function x_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=x_(i);if(o!==null)return o;i=i.sibling}return null}var w_=t.unstable_scheduleCallback,S_=t.unstable_cancelCallback,W9=t.unstable_shouldYield,G9=t.unstable_requestPaint,wt=t.unstable_now,X9=t.unstable_getCurrentPriorityLevel,yp=t.unstable_ImmediatePriority,v_=t.unstable_UserBlockingPriority,nc=t.unstable_NormalPriority,K9=t.unstable_LowPriority,A_=t.unstable_IdlePriority,rc=null,Or=null;function Q9(i){if(Or&&typeof Or.onCommitFiberRoot=="function")try{Or.onCommitFiberRoot(rc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var ar=Math.clz32?Math.clz32:eF,J9=Math.log,Z9=Math.LN2;function eF(i){return i>>>=0,i===0?32:31-(J9(i)/Z9|0)|0}var ic=64,sc=4194304;function Fa(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function oc(i,o){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,S=l&268435455;if(S!==0){var M=S&~E;M!==0?h=Fa(M):(b&=S,b!==0&&(h=Fa(b)))}else S=l&~E,S!==0?h=Fa(S):b!==0&&(h=Fa(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|=l&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)l=31-ar(o),E=1<<l,h|=i[l],o&=~E;return h}function tF(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 nF(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var S=31-ar(b),M=1<<S,j=E[S];j===-1?((M&l)===0||(M&h)!==0)&&(E[S]=tF(M,o)):j<=o&&(i.expiredLanes|=M),b&=~M}}function Tp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function N_(){var i=ic;return ic<<=1,(ic&4194240)===0&&(ic=64),i}function bp(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function Ba(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-ar(o),i[o]=l}function rF(i,o){var l=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-ar(l),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~b}}function _p(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-ar(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var nt=0;function C_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var k_,xp,O_,I_,P_,wp=!1,ac=[],gi=null,Ei=null,yi=null,Ua=new Map,Ha=new Map,Ti=[],iF="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function R_(i,o){switch(i){case"focusin":case"focusout":gi=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":yi=null;break;case"pointerover":case"pointerout":Ua.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ha.delete(o.pointerId)}}function ja(i,o,l,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:o,domEventName:l,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},o!==null&&(o=tu(o),o!==null&&xp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function sF(i,o,l,h,E){switch(o){case"focusin":return gi=ja(gi,i,o,l,h,E),!0;case"dragenter":return Ei=ja(Ei,i,o,l,h,E),!0;case"mouseover":return yi=ja(yi,i,o,l,h,E),!0;case"pointerover":var b=E.pointerId;return Ua.set(b,ja(Ua.get(b)||null,i,o,l,h,E)),!0;case"gotpointercapture":return b=E.pointerId,Ha.set(b,ja(Ha.get(b)||null,i,o,l,h,E)),!0}return!1}function L_(i){var o=ds(i.target);if(o!==null){var l=cs(o);if(l!==null){if(o=l.tag,o===13){if(o=T_(l),o!==null){i.blockedOn=o,P_(i.priority,function(){O_(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function uc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=vp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Pn=h,l.target.dispatchEvent(h),Pn=null}else return o=tu(l),o!==null&&xp(o),i.blockedOn=l,!1;o.shift()}return!0}function D_(i,o,l){uc(i)&&l.delete(o)}function oF(){wp=!1,gi!==null&&uc(gi)&&(gi=null),Ei!==null&&uc(Ei)&&(Ei=null),yi!==null&&uc(yi)&&(yi=null),Ua.forEach(D_),Ha.forEach(D_)}function za(i,o){i.blockedOn===o&&(i.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,oF)))}function $a(i){function o(E){return za(E,i)}if(0<ac.length){za(ac[0],i);for(var l=1;l<ac.length;l++){var h=ac[l];h.blockedOn===i&&(h.blockedOn=null)}}for(gi!==null&&za(gi,i),Ei!==null&&za(Ei,i),yi!==null&&za(yi,i),Ua.forEach(o),Ha.forEach(o),l=0;l<Ti.length;l++)h=Ti[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ti.length&&(l=Ti[0],l.blockedOn===null);)L_(l),l.blockedOn===null&&Ti.shift()}var po=$.ReactCurrentBatchConfig,lc=!0;function aF(i,o,l,h){var E=nt,b=po.transition;po.transition=null;try{nt=1,Sp(i,o,l,h)}finally{nt=E,po.transition=b}}function uF(i,o,l,h){var E=nt,b=po.transition;po.transition=null;try{nt=4,Sp(i,o,l,h)}finally{nt=E,po.transition=b}}function Sp(i,o,l,h){if(lc){var E=vp(i,o,l,h);if(E===null)zp(i,o,h,cc,l),R_(i,h);else if(sF(E,i,o,l,h))h.stopPropagation();else if(R_(i,h),o&4&&-1<iF.indexOf(i)){for(;E!==null;){var b=tu(E);if(b!==null&&k_(b),b=vp(i,o,l,h),b===null&&zp(i,o,h,cc,l),b===E)break;E=b}E!==null&&h.stopPropagation()}else zp(i,o,h,null,l)}}var cc=null;function vp(i,o,l,h){if(cc=null,i=hp(h),i=ds(i),i!==null)if(o=cs(i),o===null)i=null;else if(l=o.tag,l===13){if(i=T_(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return cc=i,null}function M_(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(X9()){case yp:return 1;case v_:return 4;case nc:case K9:return 16;case A_:return 536870912;default:return 16}default:return 16}}var bi=null,Ap=null,dc=null;function F_(){if(dc)return dc;var i,o=Ap,l=o.length,h,E="value"in bi?bi.value:bi.textContent,b=E.length;for(i=0;i<l&&o[i]===E[i];i++);var S=l-i;for(h=1;h<=S&&o[l-h]===E[b-h];h++);return dc=E.slice(i,1<h?1-h:void 0)}function fc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function hc(){return!0}function B_(){return!1}function Rn(i){function o(l,h,E,b,S){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=S,this.currentTarget=null;for(var M in i)i.hasOwnProperty(M)&&(l=i[M],this[M]=l?l(b):b[M]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?hc:B_,this.isPropagationStopped=B_,this}return w(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=hc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=hc)},persist:function(){},isPersistent:hc}),o}var mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Np=Rn(mo),Va=w({},mo,{view:0,detail:0}),lF=Rn(Va),Cp,kp,qa,pc=w({},Va,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ip,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==qa&&(qa&&i.type==="mousemove"?(Cp=i.screenX-qa.screenX,kp=i.screenY-qa.screenY):kp=Cp=0,qa=i),Cp)},movementY:function(i){return"movementY"in i?i.movementY:kp}}),U_=Rn(pc),cF=w({},pc,{dataTransfer:0}),dF=Rn(cF),fF=w({},Va,{relatedTarget:0}),Op=Rn(fF),hF=w({},mo,{animationName:0,elapsedTime:0,pseudoElement:0}),pF=Rn(hF),mF=w({},mo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),gF=Rn(mF),EF=w({},mo,{data:0}),H_=Rn(EF),yF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TF={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"},bF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _F(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=bF[i])?!!o[i]:!1}function Ip(){return _F}var xF=w({},Va,{key:function(i){if(i.key){var o=yF[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=fc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?TF[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ip,charCode:function(i){return i.type==="keypress"?fc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?fc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),wF=Rn(xF),SF=w({},pc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),j_=Rn(SF),vF=w({},Va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ip}),AF=Rn(vF),NF=w({},mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),CF=Rn(NF),kF=w({},pc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),OF=Rn(kF),IF=[9,13,27,32],Pp=c&&"CompositionEvent"in window,Ya=null;c&&"documentMode"in document&&(Ya=document.documentMode);var PF=c&&"TextEvent"in window&&!Ya,z_=c&&(!Pp||Ya&&8<Ya&&11>=Ya),$_=" ",V_=!1;function q_(i,o){switch(i){case"keyup":return IF.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Y_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var go=!1;function RF(i,o){switch(i){case"compositionend":return Y_(o);case"keypress":return o.which!==32?null:(V_=!0,$_);case"textInput":return i=o.data,i===$_&&V_?null:i;default:return null}}function LF(i,o){if(go)return i==="compositionend"||!Pp&&q_(i,o)?(i=F_(),dc=Ap=bi=null,go=!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 z_&&o.locale!=="ko"?null:o.data;default:return null}}var DF={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 W_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!DF[i.type]:o==="textarea"}function G_(i,o,l,h){p_(h),o=Tc(o,"onChange"),0<o.length&&(l=new Np("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var Wa=null,Ga=null;function MF(i){fx(i,0)}function mc(i){var o=_o(i);if(Tn(o))return i}function FF(i,o){if(i==="change")return o}var X_=!1;if(c){var Rp;if(c){var Lp="oninput"in document;if(!Lp){var K_=document.createElement("div");K_.setAttribute("oninput","return;"),Lp=typeof K_.oninput=="function"}Rp=Lp}else Rp=!1;X_=Rp&&(!document.documentMode||9<document.documentMode)}function Q_(){Wa&&(Wa.detachEvent("onpropertychange",J_),Ga=Wa=null)}function J_(i){if(i.propertyName==="value"&&mc(Ga)){var o=[];G_(o,Ga,i,hp(i)),y_(MF,o)}}function BF(i,o,l){i==="focusin"?(Q_(),Wa=o,Ga=l,Wa.attachEvent("onpropertychange",J_)):i==="focusout"&&Q_()}function UF(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return mc(Ga)}function HF(i,o){if(i==="click")return mc(o)}function jF(i,o){if(i==="input"||i==="change")return mc(o)}function zF(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var ur=typeof Object.is=="function"?Object.is:zF;function Xa(i,o){if(ur(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),h=Object.keys(o);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(o,E)||!ur(i[E],o[E]))return!1}return!0}function Z_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ex(i,o){var l=Z_(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=o&&h>=o)return{node:l,offset:o-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Z_(l)}}function tx(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?tx(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function nx(){for(var i=window,o=$r();o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=o.contentWindow;else break;o=$r(i.document)}return o}function Dp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function $F(i){var o=nx(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&tx(l.ownerDocument.documentElement,l)){if(h!==null&&Dp(l)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(i,l.value.length);else if(i=(o=l.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,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=ex(l,b);var S=ex(l,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(o),i.extend(S.node,S.offset)):(o.setEnd(S.node,S.offset),i.addRange(o)))}}for(o=[],i=l;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<o.length;l++)i=o[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var VF=c&&"documentMode"in document&&11>=document.documentMode,Eo=null,Mp=null,Ka=null,Fp=!1;function rx(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Fp||Eo==null||Eo!==$r(h)||(h=Eo,"selectionStart"in h&&Dp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Ka&&Xa(Ka,h)||(Ka=h,h=Tc(Mp,"onSelect"),0<h.length&&(o=new Np("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=Eo)))}function gc(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var yo={animationend:gc("Animation","AnimationEnd"),animationiteration:gc("Animation","AnimationIteration"),animationstart:gc("Animation","AnimationStart"),transitionend:gc("Transition","TransitionEnd")},Bp={},ix={};c&&(ix=document.createElement("div").style,"AnimationEvent"in window||(delete yo.animationend.animation,delete yo.animationiteration.animation,delete yo.animationstart.animation),"TransitionEvent"in window||delete yo.transitionend.transition);function Ec(i){if(Bp[i])return Bp[i];if(!yo[i])return i;var o=yo[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in ix)return Bp[i]=o[l];return i}var sx=Ec("animationend"),ox=Ec("animationiteration"),ax=Ec("animationstart"),ux=Ec("transitionend"),lx=new Map,cx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function _i(i,o){lx.set(i,o),a(o,[i])}for(var Up=0;Up<cx.length;Up++){var Hp=cx[Up],qF=Hp.toLowerCase(),YF=Hp[0].toUpperCase()+Hp.slice(1);_i(qF,"on"+YF)}_i(sx,"onAnimationEnd"),_i(ox,"onAnimationIteration"),_i(ax,"onAnimationStart"),_i("dblclick","onDoubleClick"),_i("focusin","onFocus"),_i("focusout","onBlur"),_i(ux,"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 Qa="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(" "),WF=new Set("cancel close invalid load scroll toggle".split(" ").concat(Qa));function dx(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,q9(h,o,void 0,i),i.currentTarget=null}function fx(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],E=h.event;h=h.listeners;e:{var b=void 0;if(o)for(var S=h.length-1;0<=S;S--){var M=h[S],j=M.instance,te=M.currentTarget;if(M=M.listener,j!==b&&E.isPropagationStopped())break e;dx(E,M,te),b=j}else for(S=0;S<h.length;S++){if(M=h[S],j=M.instance,te=M.currentTarget,M=M.listener,j!==b&&E.isPropagationStopped())break e;dx(E,M,te),b=j}}}if(tc)throw i=Ep,tc=!1,Ep=null,i}function dt(i,o){var l=o[Gp];l===void 0&&(l=o[Gp]=new Set);var h=i+"__bubble";l.has(h)||(hx(o,i,2,!1),l.add(h))}function jp(i,o,l){var h=0;o&&(h|=4),hx(l,i,h,o)}var yc="_reactListening"+Math.random().toString(36).slice(2);function Ja(i){if(!i[yc]){i[yc]=!0,r.forEach(function(l){l!=="selectionchange"&&(WF.has(l)||jp(l,!1,i),jp(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[yc]||(o[yc]=!0,jp("selectionchange",!1,o))}}function hx(i,o,l,h){switch(M_(o)){case 1:var E=aF;break;case 4:E=uF;break;default:E=Sp}l=E.bind(null,o,l,i),E=void 0,!gp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,l,{capture:!0,passive:E}):i.addEventListener(o,l,!0):E!==void 0?i.addEventListener(o,l,{passive:E}):i.addEventListener(o,l,!1)}function zp(i,o,l,h,E){var b=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var M=h.stateNode.containerInfo;if(M===E||M.nodeType===8&&M.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var j=S.tag;if((j===3||j===4)&&(j=S.stateNode.containerInfo,j===E||j.nodeType===8&&j.parentNode===E))return;S=S.return}for(;M!==null;){if(S=ds(M),S===null)return;if(j=S.tag,j===5||j===6){h=b=S;continue e}M=M.parentNode}}h=h.return}y_(function(){var te=b,fe=hp(l),ge=[];e:{var le=lx.get(i);if(le!==void 0){var Se=Np,Ae=i;switch(i){case"keypress":if(fc(l)===0)break e;case"keydown":case"keyup":Se=wF;break;case"focusin":Ae="focus",Se=Op;break;case"focusout":Ae="blur",Se=Op;break;case"beforeblur":case"afterblur":Se=Op;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Se=U_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Se=dF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Se=AF;break;case sx:case ox:case ax:Se=pF;break;case ux:Se=CF;break;case"scroll":Se=lF;break;case"wheel":Se=OF;break;case"copy":case"cut":case"paste":Se=gF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Se=j_}var Ne=(o&4)!==0,St=!Ne&&i==="scroll",X=Ne?le!==null?le+"Capture":null:le;Ne=[];for(var Y=te,Q;Y!==null;){Q=Y;var Te=Q.stateNode;if(Q.tag===5&&Te!==null&&(Q=Te,X!==null&&(Te=La(Y,X),Te!=null&&Ne.push(Za(Y,Te,Q)))),St)break;Y=Y.return}0<Ne.length&&(le=new Se(le,Ae,null,l,fe),ge.push({event:le,listeners:Ne}))}}if((o&7)===0){e:{if(le=i==="mouseover"||i==="pointerover",Se=i==="mouseout"||i==="pointerout",le&&l!==Pn&&(Ae=l.relatedTarget||l.fromElement)&&(ds(Ae)||Ae[Yr]))break e;if((Se||le)&&(le=fe.window===fe?fe:(le=fe.ownerDocument)?le.defaultView||le.parentWindow:window,Se?(Ae=l.relatedTarget||l.toElement,Se=te,Ae=Ae?ds(Ae):null,Ae!==null&&(St=cs(Ae),Ae!==St||Ae.tag!==5&&Ae.tag!==6)&&(Ae=null)):(Se=null,Ae=te),Se!==Ae)){if(Ne=U_,Te="onMouseLeave",X="onMouseEnter",Y="mouse",(i==="pointerout"||i==="pointerover")&&(Ne=j_,Te="onPointerLeave",X="onPointerEnter",Y="pointer"),St=Se==null?le:_o(Se),Q=Ae==null?le:_o(Ae),le=new Ne(Te,Y+"leave",Se,l,fe),le.target=St,le.relatedTarget=Q,Te=null,ds(fe)===te&&(Ne=new Ne(X,Y+"enter",Ae,l,fe),Ne.target=Q,Ne.relatedTarget=St,Te=Ne),St=Te,Se&&Ae)t:{for(Ne=Se,X=Ae,Y=0,Q=Ne;Q;Q=To(Q))Y++;for(Q=0,Te=X;Te;Te=To(Te))Q++;for(;0<Y-Q;)Ne=To(Ne),Y--;for(;0<Q-Y;)X=To(X),Q--;for(;Y--;){if(Ne===X||X!==null&&Ne===X.alternate)break t;Ne=To(Ne),X=To(X)}Ne=null}else Ne=null;Se!==null&&px(ge,le,Se,Ne,!1),Ae!==null&&St!==null&&px(ge,St,Ae,Ne,!0)}}e:{if(le=te?_o(te):window,Se=le.nodeName&&le.nodeName.toLowerCase(),Se==="select"||Se==="input"&&le.type==="file")var Ce=FF;else if(W_(le))if(X_)Ce=jF;else{Ce=UF;var Le=BF}else(Se=le.nodeName)&&Se.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(Ce=HF);if(Ce&&(Ce=Ce(i,te))){G_(ge,Ce,l,fe);break e}Le&&Le(i,le,te),i==="focusout"&&(Le=le._wrapperState)&&Le.controlled&&le.type==="number"&&bn(le,"number",le.value)}switch(Le=te?_o(te):window,i){case"focusin":(W_(Le)||Le.contentEditable==="true")&&(Eo=Le,Mp=te,Ka=null);break;case"focusout":Ka=Mp=Eo=null;break;case"mousedown":Fp=!0;break;case"contextmenu":case"mouseup":case"dragend":Fp=!1,rx(ge,l,fe);break;case"selectionchange":if(VF)break;case"keydown":case"keyup":rx(ge,l,fe)}var De;if(Pp)e:{switch(i){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else go?q_(i,l)&&(He="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(He="onCompositionStart");He&&(z_&&l.locale!=="ko"&&(go||He!=="onCompositionStart"?He==="onCompositionEnd"&&go&&(De=F_()):(bi=fe,Ap="value"in bi?bi.value:bi.textContent,go=!0)),Le=Tc(te,He),0<Le.length&&(He=new H_(He,i,null,l,fe),ge.push({event:He,listeners:Le}),De?He.data=De:(De=Y_(l),De!==null&&(He.data=De)))),(De=PF?RF(i,l):LF(i,l))&&(te=Tc(te,"onBeforeInput"),0<te.length&&(fe=new H_("onBeforeInput","beforeinput",null,l,fe),ge.push({event:fe,listeners:te}),fe.data=De))}fx(ge,o)})}function Za(i,o,l){return{instance:i,listener:o,currentTarget:l}}function Tc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=La(i,l),b!=null&&h.unshift(Za(i,b,E)),b=La(i,o),b!=null&&h.push(Za(i,b,E))),i=i.return}return h}function To(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function px(i,o,l,h,E){for(var b=o._reactName,S=[];l!==null&&l!==h;){var M=l,j=M.alternate,te=M.stateNode;if(j!==null&&j===h)break;M.tag===5&&te!==null&&(M=te,E?(j=La(l,b),j!=null&&S.unshift(Za(l,j,M))):E||(j=La(l,b),j!=null&&S.push(Za(l,j,M)))),l=l.return}S.length!==0&&i.push({event:o,listeners:S})}var GF=/\r\n?/g,XF=/\u0000|\uFFFD/g;function mx(i){return(typeof i=="string"?i:""+i).replace(GF,`
|
|
21
|
-
`).replace(XF,"")}function bc(i,o,l){if(o=mx(o),mx(i)!==o&&l)throw Error(n(425))}function _c(){}var $p=null,Vp=null;function qp(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Yp=typeof setTimeout=="function"?setTimeout:void 0,KF=typeof clearTimeout=="function"?clearTimeout:void 0,gx=typeof Promise=="function"?Promise:void 0,QF=typeof queueMicrotask=="function"?queueMicrotask:typeof gx!="undefined"?function(i){return gx.resolve(null).then(i).catch(JF)}:Yp;function JF(i){setTimeout(function(){throw i})}function Wp(i,o){var l=o,h=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(h===0){i.removeChild(E),$a(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);$a(o)}function xi(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function Ex(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return i;o--}else l==="/$"&&o++}i=i.previousSibling}return null}var bo=Math.random().toString(36).slice(2),Ir="__reactFiber$"+bo,eu="__reactProps$"+bo,Yr="__reactContainer$"+bo,Gp="__reactEvents$"+bo,ZF="__reactListeners$"+bo,eB="__reactHandles$"+bo;function ds(i){var o=i[Ir];if(o)return o;for(var l=i.parentNode;l;){if(o=l[Yr]||l[Ir]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=Ex(i);i!==null;){if(l=i[Ir])return l;i=Ex(i)}return o}i=l,l=i.parentNode}return null}function tu(i){return i=i[Ir]||i[Yr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function _o(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function xc(i){return i[eu]||null}var Xp=[],xo=-1;function wi(i){return{current:i}}function ft(i){0>xo||(i.current=Xp[xo],Xp[xo]=null,xo--)}function ut(i,o){xo++,Xp[xo]=i.current,i.current=o}var Si={},Zt=wi(Si),_n=wi(!1),fs=Si;function wo(i,o){var l=i.type.contextTypes;if(!l)return Si;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in l)E[b]=o[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function xn(i){return i=i.childContextTypes,i!=null}function wc(){ft(_n),ft(Zt)}function yx(i,o,l){if(Zt.current!==Si)throw Error(n(168));ut(Zt,o),ut(_n,l)}function Tx(i,o,l){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Re(i)||"Unknown",E));return w({},l,h)}function Sc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Si,fs=Zt.current,ut(Zt,i),ut(_n,_n.current),!0}function bx(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=Tx(i,o,fs),h.__reactInternalMemoizedMergedChildContext=i,ft(_n),ft(Zt),ut(Zt,i)):ft(_n),ut(_n,l)}var Wr=null,vc=!1,Kp=!1;function _x(i){Wr===null?Wr=[i]:Wr.push(i)}function tB(i){vc=!0,_x(i)}function vi(){if(!Kp&&Wr!==null){Kp=!0;var i=0,o=nt;try{var l=Wr;for(nt=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}Wr=null,vc=!1}catch(E){throw Wr!==null&&(Wr=Wr.slice(i+1)),w_(yp,vi),E}finally{nt=o,Kp=!1}}return null}var So=[],vo=0,Ac=null,Nc=0,$n=[],Vn=0,hs=null,Gr=1,Xr="";function ps(i,o){So[vo++]=Nc,So[vo++]=Ac,Ac=i,Nc=o}function xx(i,o,l){$n[Vn++]=Gr,$n[Vn++]=Xr,$n[Vn++]=hs,hs=i;var h=Gr;i=Xr;var E=32-ar(h)-1;h&=~(1<<E),l+=1;var b=32-ar(o)+E;if(30<b){var S=E-E%5;b=(h&(1<<S)-1).toString(32),h>>=S,E-=S,Gr=1<<32-ar(o)+E|l<<E|h,Xr=b+i}else Gr=1<<b|l<<E|h,Xr=i}function Qp(i){i.return!==null&&(ps(i,1),xx(i,1,0))}function Jp(i){for(;i===Ac;)Ac=So[--vo],So[vo]=null,Nc=So[--vo],So[vo]=null;for(;i===hs;)hs=$n[--Vn],$n[Vn]=null,Xr=$n[--Vn],$n[Vn]=null,Gr=$n[--Vn],$n[Vn]=null}var Ln=null,Dn=null,mt=!1,lr=null;function wx(i,o){var l=Gn(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=i,o=i.deletions,o===null?(i.deletions=[l],i.flags|=16):o.push(l)}function Sx(i,o){switch(i.tag){case 5:var l=i.type;return o=o.nodeType!==1||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Ln=i,Dn=xi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Ln=i,Dn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=hs!==null?{id:Gr,overflow:Xr}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=Gn(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,Ln=i,Dn=null,!0):!1;default:return!1}}function Zp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function em(i){if(mt){var o=Dn;if(o){var l=o;if(!Sx(i,o)){if(Zp(i))throw Error(n(418));o=xi(l.nextSibling);var h=Ln;o&&Sx(i,o)?wx(h,l):(i.flags=i.flags&-4097|2,mt=!1,Ln=i)}}else{if(Zp(i))throw Error(n(418));i.flags=i.flags&-4097|2,mt=!1,Ln=i}}}function vx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Ln=i}function Cc(i){if(i!==Ln)return!1;if(!mt)return vx(i),mt=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!qp(i.type,i.memoizedProps)),o&&(o=Dn)){if(Zp(i))throw Ax(),Error(n(418));for(;o;)wx(i,o),o=xi(o.nextSibling)}if(vx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(o===0){Dn=xi(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}Dn=null}}else Dn=Ln?xi(i.stateNode.nextSibling):null;return!0}function Ax(){for(var i=Dn;i;)i=xi(i.nextSibling)}function Ao(){Dn=Ln=null,mt=!1}function tm(i){lr===null?lr=[i]:lr.push(i)}var nB=$.ReactCurrentBatchConfig;function nu(i,o,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===b?o.ref:(o=function(S){var M=E.refs;S===null?delete M[b]:M[b]=S},o._stringRef=b,o)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function kc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function Nx(i){var o=i._init;return o(i._payload)}function Cx(i){function o(X,Y){if(i){var Q=X.deletions;Q===null?(X.deletions=[Y],X.flags|=16):Q.push(Y)}}function l(X,Y){if(!i)return null;for(;Y!==null;)o(X,Y),Y=Y.sibling;return null}function h(X,Y){for(X=new Map;Y!==null;)Y.key!==null?X.set(Y.key,Y):X.set(Y.index,Y),Y=Y.sibling;return X}function E(X,Y){return X=Ri(X,Y),X.index=0,X.sibling=null,X}function b(X,Y,Q){return X.index=Q,i?(Q=X.alternate,Q!==null?(Q=Q.index,Q<Y?(X.flags|=2,Y):Q):(X.flags|=2,Y)):(X.flags|=1048576,Y)}function S(X){return i&&X.alternate===null&&(X.flags|=2),X}function M(X,Y,Q,Te){return Y===null||Y.tag!==6?(Y=Ym(Q,X.mode,Te),Y.return=X,Y):(Y=E(Y,Q),Y.return=X,Y)}function j(X,Y,Q,Te){var Ce=Q.type;return Ce===J?fe(X,Y,Q.props.children,Te,Q.key):Y!==null&&(Y.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===_e&&Nx(Ce)===Y.type)?(Te=E(Y,Q.props),Te.ref=nu(X,Y,Q),Te.return=X,Te):(Te=Zc(Q.type,Q.key,Q.props,null,X.mode,Te),Te.ref=nu(X,Y,Q),Te.return=X,Te)}function te(X,Y,Q,Te){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==Q.containerInfo||Y.stateNode.implementation!==Q.implementation?(Y=Wm(Q,X.mode,Te),Y.return=X,Y):(Y=E(Y,Q.children||[]),Y.return=X,Y)}function fe(X,Y,Q,Te,Ce){return Y===null||Y.tag!==7?(Y=xs(Q,X.mode,Te,Ce),Y.return=X,Y):(Y=E(Y,Q),Y.return=X,Y)}function ge(X,Y,Q){if(typeof Y=="string"&&Y!==""||typeof Y=="number")return Y=Ym(""+Y,X.mode,Q),Y.return=X,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case G:return Q=Zc(Y.type,Y.key,Y.props,null,X.mode,Q),Q.ref=nu(X,null,Y),Q.return=X,Q;case D:return Y=Wm(Y,X.mode,Q),Y.return=X,Y;case _e:var Te=Y._init;return ge(X,Te(Y._payload),Q)}if(sr(Y)||Z(Y))return Y=xs(Y,X.mode,Q,null),Y.return=X,Y;kc(X,Y)}return null}function le(X,Y,Q,Te){var Ce=Y!==null?Y.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Ce!==null?null:M(X,Y,""+Q,Te);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case G:return Q.key===Ce?j(X,Y,Q,Te):null;case D:return Q.key===Ce?te(X,Y,Q,Te):null;case _e:return Ce=Q._init,le(X,Y,Ce(Q._payload),Te)}if(sr(Q)||Z(Q))return Ce!==null?null:fe(X,Y,Q,Te,null);kc(X,Q)}return null}function Se(X,Y,Q,Te,Ce){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return X=X.get(Q)||null,M(Y,X,""+Te,Ce);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case G:return X=X.get(Te.key===null?Q:Te.key)||null,j(Y,X,Te,Ce);case D:return X=X.get(Te.key===null?Q:Te.key)||null,te(Y,X,Te,Ce);case _e:var Le=Te._init;return Se(X,Y,Q,Le(Te._payload),Ce)}if(sr(Te)||Z(Te))return X=X.get(Q)||null,fe(Y,X,Te,Ce,null);kc(Y,Te)}return null}function Ae(X,Y,Q,Te){for(var Ce=null,Le=null,De=Y,He=Y=0,Ht=null;De!==null&&He<Q.length;He++){De.index>He?(Ht=De,De=null):Ht=De.sibling;var Ze=le(X,De,Q[He],Te);if(Ze===null){De===null&&(De=Ht);break}i&&De&&Ze.alternate===null&&o(X,De),Y=b(Ze,Y,He),Le===null?Ce=Ze:Le.sibling=Ze,Le=Ze,De=Ht}if(He===Q.length)return l(X,De),mt&&ps(X,He),Ce;if(De===null){for(;He<Q.length;He++)De=ge(X,Q[He],Te),De!==null&&(Y=b(De,Y,He),Le===null?Ce=De:Le.sibling=De,Le=De);return mt&&ps(X,He),Ce}for(De=h(X,De);He<Q.length;He++)Ht=Se(De,X,He,Q[He],Te),Ht!==null&&(i&&Ht.alternate!==null&&De.delete(Ht.key===null?He:Ht.key),Y=b(Ht,Y,He),Le===null?Ce=Ht:Le.sibling=Ht,Le=Ht);return i&&De.forEach(function(Li){return o(X,Li)}),mt&&ps(X,He),Ce}function Ne(X,Y,Q,Te){var Ce=Z(Q);if(typeof Ce!="function")throw Error(n(150));if(Q=Ce.call(Q),Q==null)throw Error(n(151));for(var Le=Ce=null,De=Y,He=Y=0,Ht=null,Ze=Q.next();De!==null&&!Ze.done;He++,Ze=Q.next()){De.index>He?(Ht=De,De=null):Ht=De.sibling;var Li=le(X,De,Ze.value,Te);if(Li===null){De===null&&(De=Ht);break}i&&De&&Li.alternate===null&&o(X,De),Y=b(Li,Y,He),Le===null?Ce=Li:Le.sibling=Li,Le=Li,De=Ht}if(Ze.done)return l(X,De),mt&&ps(X,He),Ce;if(De===null){for(;!Ze.done;He++,Ze=Q.next())Ze=ge(X,Ze.value,Te),Ze!==null&&(Y=b(Ze,Y,He),Le===null?Ce=Ze:Le.sibling=Ze,Le=Ze);return mt&&ps(X,He),Ce}for(De=h(X,De);!Ze.done;He++,Ze=Q.next())Ze=Se(De,X,He,Ze.value,Te),Ze!==null&&(i&&Ze.alternate!==null&&De.delete(Ze.key===null?He:Ze.key),Y=b(Ze,Y,He),Le===null?Ce=Ze:Le.sibling=Ze,Le=Ze);return i&&De.forEach(function(DB){return o(X,DB)}),mt&&ps(X,He),Ce}function St(X,Y,Q,Te){if(typeof Q=="object"&&Q!==null&&Q.type===J&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case G:e:{for(var Ce=Q.key,Le=Y;Le!==null;){if(Le.key===Ce){if(Ce=Q.type,Ce===J){if(Le.tag===7){l(X,Le.sibling),Y=E(Le,Q.props.children),Y.return=X,X=Y;break e}}else if(Le.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===_e&&Nx(Ce)===Le.type){l(X,Le.sibling),Y=E(Le,Q.props),Y.ref=nu(X,Le,Q),Y.return=X,X=Y;break e}l(X,Le);break}else o(X,Le);Le=Le.sibling}Q.type===J?(Y=xs(Q.props.children,X.mode,Te,Q.key),Y.return=X,X=Y):(Te=Zc(Q.type,Q.key,Q.props,null,X.mode,Te),Te.ref=nu(X,Y,Q),Te.return=X,X=Te)}return S(X);case D:e:{for(Le=Q.key;Y!==null;){if(Y.key===Le)if(Y.tag===4&&Y.stateNode.containerInfo===Q.containerInfo&&Y.stateNode.implementation===Q.implementation){l(X,Y.sibling),Y=E(Y,Q.children||[]),Y.return=X,X=Y;break e}else{l(X,Y);break}else o(X,Y);Y=Y.sibling}Y=Wm(Q,X.mode,Te),Y.return=X,X=Y}return S(X);case _e:return Le=Q._init,St(X,Y,Le(Q._payload),Te)}if(sr(Q))return Ae(X,Y,Q,Te);if(Z(Q))return Ne(X,Y,Q,Te);kc(X,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,Y!==null&&Y.tag===6?(l(X,Y.sibling),Y=E(Y,Q),Y.return=X,X=Y):(l(X,Y),Y=Ym(Q,X.mode,Te),Y.return=X,X=Y),S(X)):l(X,Y)}return St}var No=Cx(!0),kx=Cx(!1),Oc=wi(null),Ic=null,Co=null,nm=null;function rm(){nm=Co=Ic=null}function im(i){var o=Oc.current;ft(Oc),i._currentValue=o}function sm(i,o,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===l)break;i=i.return}}function ko(i,o){Ic=i,nm=Co=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(wn=!0),i.firstContext=null)}function qn(i){var o=i._currentValue;if(nm!==i)if(i={context:i,memoizedValue:o,next:null},Co===null){if(Ic===null)throw Error(n(308));Co=i,Ic.dependencies={lanes:0,firstContext:i}}else Co=Co.next=i;return o}var ms=null;function om(i){ms===null?ms=[i]:ms.push(i)}function Ox(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,om(o)):(l.next=E.next,E.next=l),o.interleaved=l,Kr(i,h)}function Kr(i,o){i.lanes|=o;var l=i.alternate;for(l!==null&&(l.lanes|=o),l=i,i=i.return;i!==null;)i.childLanes|=o,l=i.alternate,l!==null&&(l.childLanes|=o),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Ai=!1;function am(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ix(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 Qr(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Ni(i,o,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(Je&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,Kr(i,l)}return E=h.interleaved,E===null?(o.next=o,om(h)):(o.next=E.next,E.next=o),h.interleaved=o,Kr(i,l)}function Pc(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,_p(i,l)}}function Px(i,o){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,b=null;if(l=l.firstBaseUpdate,l!==null){do{var S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};b===null?E=b=S:b=b.next=S,l=l.next}while(l!==null);b===null?E=b=o:b=b.next=o}else E=b=o;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}function Rc(i,o,l,h){var E=i.updateQueue;Ai=!1;var b=E.firstBaseUpdate,S=E.lastBaseUpdate,M=E.shared.pending;if(M!==null){E.shared.pending=null;var j=M,te=j.next;j.next=null,S===null?b=te:S.next=te,S=j;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,M=fe.lastBaseUpdate,M!==S&&(M===null?fe.firstBaseUpdate=te:M.next=te,fe.lastBaseUpdate=j))}if(b!==null){var ge=E.baseState;S=0,fe=te=j=null,M=b;do{var le=M.lane,Se=M.eventTime;if((h&le)===le){fe!==null&&(fe=fe.next={eventTime:Se,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var Ae=i,Ne=M;switch(le=o,Se=l,Ne.tag){case 1:if(Ae=Ne.payload,typeof Ae=="function"){ge=Ae.call(Se,ge,le);break e}ge=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Ne.payload,le=typeof Ae=="function"?Ae.call(Se,ge,le):Ae,le==null)break e;ge=w({},ge,le);break e;case 2:Ai=!0}}M.callback!==null&&M.lane!==0&&(i.flags|=64,le=E.effects,le===null?E.effects=[M]:le.push(M))}else Se={eventTime:Se,lane:le,tag:M.tag,payload:M.payload,callback:M.callback,next:null},fe===null?(te=fe=Se,j=ge):fe=fe.next=Se,S|=le;if(M=M.next,M===null){if(M=E.shared.pending,M===null)break;le=M,M=le.next,le.next=null,E.lastBaseUpdate=le,E.shared.pending=null}}while(!0);if(fe===null&&(j=ge),E.baseState=j,E.firstBaseUpdate=te,E.lastBaseUpdate=fe,o=E.shared.interleaved,o!==null){E=o;do S|=E.lane,E=E.next;while(E!==o)}else b===null&&(E.shared.lanes=0);ys|=S,i.lanes=S,i.memoizedState=ge}}function Rx(i,o,l){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var ru={},Pr=wi(ru),iu=wi(ru),su=wi(ru);function gs(i){if(i===ru)throw Error(n(174));return i}function um(i,o){switch(ut(su,o),ut(iu,i),ut(Pr,ru),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:be(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=be(o,i)}ft(Pr),ut(Pr,o)}function Oo(){ft(Pr),ft(iu),ft(su)}function Lx(i){gs(su.current);var o=gs(Pr.current),l=be(o,i.type);o!==l&&(ut(iu,i),ut(Pr,l))}function lm(i){iu.current===i&&(ft(Pr),ft(iu))}var gt=wi(0);function Lc(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var cm=[];function dm(){for(var i=0;i<cm.length;i++)cm[i]._workInProgressVersionPrimary=null;cm.length=0}var Dc=$.ReactCurrentDispatcher,fm=$.ReactCurrentBatchConfig,Es=0,Et=null,Pt=null,Bt=null,Mc=!1,ou=!1,au=0,rB=0;function en(){throw Error(n(321))}function hm(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!ur(i[l],o[l]))return!1;return!0}function pm(i,o,l,h,E,b){if(Es=b,Et=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Dc.current=i===null||i.memoizedState===null?aB:uB,i=l(h,E),ou){b=0;do{if(ou=!1,au=0,25<=b)throw Error(n(301));b+=1,Bt=Pt=null,o.updateQueue=null,Dc.current=lB,i=l(h,E)}while(ou)}if(Dc.current=Uc,o=Pt!==null&&Pt.next!==null,Es=0,Bt=Pt=Et=null,Mc=!1,o)throw Error(n(300));return i}function mm(){var i=au!==0;return au=0,i}function Rr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?Et.memoizedState=Bt=i:Bt=Bt.next=i,Bt}function Yn(){if(Pt===null){var i=Et.alternate;i=i!==null?i.memoizedState:null}else i=Pt.next;var o=Bt===null?Et.memoizedState:Bt.next;if(o!==null)Bt=o,Pt=i;else{if(i===null)throw Error(n(310));Pt=i,i={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},Bt===null?Et.memoizedState=Bt=i:Bt=Bt.next=i}return Bt}function uu(i,o){return typeof o=="function"?o(i):o}function gm(i){var o=Yn(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Pt,E=h.baseQueue,b=l.pending;if(b!==null){if(E!==null){var S=E.next;E.next=b.next,b.next=S}h.baseQueue=E=b,l.pending=null}if(E!==null){b=E.next,h=h.baseState;var M=S=null,j=null,te=b;do{var fe=te.lane;if((Es&fe)===fe)j!==null&&(j=j.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),h=te.hasEagerState?te.eagerState:i(h,te.action);else{var ge={lane:fe,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};j===null?(M=j=ge,S=h):j=j.next=ge,Et.lanes|=fe,ys|=fe}te=te.next}while(te!==null&&te!==b);j===null?S=h:j.next=M,ur(h,o.memoizedState)||(wn=!0),o.memoizedState=h,o.baseState=S,o.baseQueue=j,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do b=E.lane,Et.lanes|=b,ys|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function Em(i){var o=Yn(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,b=o.memoizedState;if(E!==null){l.pending=null;var S=E=E.next;do b=i(b,S.action),S=S.next;while(S!==E);ur(b,o.memoizedState)||(wn=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),l.lastRenderedState=b}return[b,h]}function Dx(){}function Mx(i,o){var l=Et,h=Yn(),E=o(),b=!ur(h.memoizedState,E);if(b&&(h.memoizedState=E,wn=!0),h=h.queue,ym(Ux.bind(null,l,h,i),[i]),h.getSnapshot!==o||b||Bt!==null&&Bt.memoizedState.tag&1){if(l.flags|=2048,lu(9,Bx.bind(null,l,h,E,o),void 0,null),Ut===null)throw Error(n(349));(Es&30)!==0||Fx(l,o,E)}return E}function Fx(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Et.updateQueue,o===null?(o={lastEffect:null,stores:null},Et.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function Bx(i,o,l,h){o.value=l,o.getSnapshot=h,Hx(o)&&jx(i)}function Ux(i,o,l){return l(function(){Hx(o)&&jx(i)})}function Hx(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!ur(i,l)}catch(h){return!0}}function jx(i){var o=Kr(i,1);o!==null&&hr(o,i,1,-1)}function zx(i){var o=Rr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:uu,lastRenderedState:i},o.queue=i,i=i.dispatch=oB.bind(null,Et,i),[o.memoizedState,i]}function lu(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=Et.updateQueue,o===null?(o={lastEffect:null,stores:null},Et.updateQueue=o,o.lastEffect=i.next=i):(l=o.lastEffect,l===null?o.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,o.lastEffect=i)),i}function $x(){return Yn().memoizedState}function Fc(i,o,l,h){var E=Rr();Et.flags|=i,E.memoizedState=lu(1|o,l,void 0,h===void 0?null:h)}function Bc(i,o,l,h){var E=Yn();h=h===void 0?null:h;var b=void 0;if(Pt!==null){var S=Pt.memoizedState;if(b=S.destroy,h!==null&&hm(h,S.deps)){E.memoizedState=lu(o,l,b,h);return}}Et.flags|=i,E.memoizedState=lu(1|o,l,b,h)}function Vx(i,o){return Fc(8390656,8,i,o)}function ym(i,o){return Bc(2048,8,i,o)}function qx(i,o){return Bc(4,2,i,o)}function Yx(i,o){return Bc(4,4,i,o)}function Wx(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 Gx(i,o,l){return l=l!=null?l.concat([i]):null,Bc(4,4,Wx.bind(null,o,i),l)}function Tm(){}function Xx(i,o){var l=Yn();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&hm(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function Kx(i,o){var l=Yn();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&hm(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function Qx(i,o,l){return(Es&21)===0?(i.baseState&&(i.baseState=!1,wn=!0),i.memoizedState=l):(ur(l,o)||(l=N_(),Et.lanes|=l,ys|=l,i.baseState=!0),o)}function iB(i,o){var l=nt;nt=l!==0&&4>l?l:4,i(!0);var h=fm.transition;fm.transition={};try{i(!1),o()}finally{nt=l,fm.transition=h}}function Jx(){return Yn().memoizedState}function sB(i,o,l){var h=Ii(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Zx(i))ew(o,l);else if(l=Ox(i,o,l,h),l!==null){var E=ln();hr(l,i,h,E),tw(l,o,h)}}function oB(i,o,l){var h=Ii(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Zx(i))ew(o,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var S=o.lastRenderedState,M=b(S,l);if(E.hasEagerState=!0,E.eagerState=M,ur(M,S)){var j=o.interleaved;j===null?(E.next=E,om(o)):(E.next=j.next,j.next=E),o.interleaved=E;return}}catch(te){}l=Ox(i,o,E,h),l!==null&&(E=ln(),hr(l,i,h,E),tw(l,o,h))}}function Zx(i){var o=i.alternate;return i===Et||o!==null&&o===Et}function ew(i,o){ou=Mc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function tw(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,_p(i,l)}}var Uc={readContext:qn,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useInsertionEffect:en,useLayoutEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useDeferredValue:en,useTransition:en,useMutableSource:en,useSyncExternalStore:en,useId:en,unstable_isNewReconciler:!1},aB={readContext:qn,useCallback:function(i,o){return Rr().memoizedState=[i,o===void 0?null:o],i},useContext:qn,useEffect:Vx,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,Fc(4194308,4,Wx.bind(null,o,i),l)},useLayoutEffect:function(i,o){return Fc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Fc(4,2,i,o)},useMemo:function(i,o){var l=Rr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Rr();return o=l!==void 0?l(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=sB.bind(null,Et,i),[h.memoizedState,i]},useRef:function(i){var o=Rr();return i={current:i},o.memoizedState=i},useState:zx,useDebugValue:Tm,useDeferredValue:function(i){return Rr().memoizedState=i},useTransition:function(){var i=zx(!1),o=i[0];return i=iB.bind(null,i[1]),Rr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=Et,E=Rr();if(mt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),Ut===null)throw Error(n(349));(Es&30)!==0||Fx(h,o,l)}E.memoizedState=l;var b={value:l,getSnapshot:o};return E.queue=b,Vx(Ux.bind(null,h,b,i),[i]),h.flags|=2048,lu(9,Bx.bind(null,h,b,l,o),void 0,null),l},useId:function(){var i=Rr(),o=Ut.identifierPrefix;if(mt){var l=Xr,h=Gr;l=(h&~(1<<32-ar(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=au++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=rB++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},uB={readContext:qn,useCallback:Xx,useContext:qn,useEffect:ym,useImperativeHandle:Gx,useInsertionEffect:qx,useLayoutEffect:Yx,useMemo:Kx,useReducer:gm,useRef:$x,useState:function(){return gm(uu)},useDebugValue:Tm,useDeferredValue:function(i){var o=Yn();return Qx(o,Pt.memoizedState,i)},useTransition:function(){var i=gm(uu)[0],o=Yn().memoizedState;return[i,o]},useMutableSource:Dx,useSyncExternalStore:Mx,useId:Jx,unstable_isNewReconciler:!1},lB={readContext:qn,useCallback:Xx,useContext:qn,useEffect:ym,useImperativeHandle:Gx,useInsertionEffect:qx,useLayoutEffect:Yx,useMemo:Kx,useReducer:Em,useRef:$x,useState:function(){return Em(uu)},useDebugValue:Tm,useDeferredValue:function(i){var o=Yn();return Pt===null?o.memoizedState=i:Qx(o,Pt.memoizedState,i)},useTransition:function(){var i=Em(uu)[0],o=Yn().memoizedState;return[i,o]},useMutableSource:Dx,useSyncExternalStore:Mx,useId:Jx,unstable_isNewReconciler:!1};function cr(i,o){if(i&&i.defaultProps){o=w({},o),i=i.defaultProps;for(var l in i)o[l]===void 0&&(o[l]=i[l]);return o}return o}function bm(i,o,l,h){o=i.memoizedState,l=l(h,o),l=l==null?o:w({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Hc={isMounted:function(i){return(i=i._reactInternals)?cs(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=ln(),E=Ii(i),b=Qr(h,E);b.payload=o,l!=null&&(b.callback=l),o=Ni(i,b,E),o!==null&&(hr(o,i,E,h),Pc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=ln(),E=Ii(i),b=Qr(h,E);b.tag=1,b.payload=o,l!=null&&(b.callback=l),o=Ni(i,b,E),o!==null&&(hr(o,i,E,h),Pc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=ln(),h=Ii(i),E=Qr(l,h);E.tag=2,o!=null&&(E.callback=o),o=Ni(i,E,h),o!==null&&(hr(o,i,h,l),Pc(o,i,h))}};function nw(i,o,l,h,E,b,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,S):o.prototype&&o.prototype.isPureReactComponent?!Xa(l,h)||!Xa(E,b):!0}function rw(i,o,l){var h=!1,E=Si,b=o.contextType;return typeof b=="object"&&b!==null?b=qn(b):(E=xn(o)?fs:Zt.current,h=o.contextTypes,b=(h=h!=null)?wo(i,E):Si),o=new o(l,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Hc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function iw(i,o,l,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,h),o.state!==i&&Hc.enqueueReplaceState(o,o.state,null)}function _m(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},am(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=qn(b):(b=xn(o)?fs:Zt.current,E.context=wo(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(bm(i,o,b,l),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&Hc.enqueueReplaceState(E,E.state,null),Rc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Io(i,o){try{var l="",h=o;do l+=Oe(h),h=h.return;while(h);var E=l}catch(b){E=`
|
|
19
|
+
`),w=E.length-1,M=b.length-1;1<=w&&0<=M&&E[w]!==b[M];)M--;for(;1<=w&&0<=M;w--,M--)if(E[w]!==b[M]){if(w!==1||M!==1)do if(w--,M--,0>M||E[w]!==b[M]){var z=`
|
|
20
|
+
`+E[w].replace(" at new "," at ");return i.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",i.displayName)),z}while(1<=w&&0<=M);break}}}finally{O=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?Y(i):""}function Re(i){switch(i.tag){case 5:return Y(i.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return i=ge(i.type,!1),i;case 11:return i=ge(i.type.render,!1),i;case 1:return i=ge(i.type,!0),i;default:return""}}function we(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case K:return"Fragment";case D:return"Portal";case de:return"Profiler";case ne:return"StrictMode";case xe:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case te:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ce:return o=i.displayName||null,o!==null?o:we(i.type)||"Memo";case he:o=i._payload,i=i._init;try{return we(i(o))}catch(c){}}return null}function re(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 we(o);case 8:return o===ne?"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 ye(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function ie(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ve(i){var o=ie(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof c!="undefined"&&typeof c.get=="function"&&typeof c.set=="function"){var E=c.get,b=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(w){h=""+w,b.call(this,w)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(w){h=""+w},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Ve(i){i._valueTracker||(i._valueTracker=ve(i))}function _t(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=ie(i)?i.checked?"true":"false":i.value),i=h,i!==c?(o.setValue(i),!0):!1}function qt(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 or(i,o){var c=o.checked;return N({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function cn(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=ye(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 ze(i,o){o=o.checked,o!=null&&P(i,"checked",o,!1)}function Ot(i,o){ze(i,o);var c=ye(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")?xn(i,o.type,c):o.hasOwnProperty("defaultValue")&&xn(i,o.type,ye(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function Rn(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 xn(i,o,c){(o!=="number"||qt(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var ar=Array.isArray;function Or(i,o,c,h){if(i=i.options,o){o={};for(var E=0;E<c.length;E++)o["$"+c[E]]=!0;for(c=0;c<i.length;c++)E=o.hasOwnProperty("$"+i[c].value),i[c].selected!==E&&(i[c].selected=E),E&&h&&(i[c].defaultSelected=!0)}else{for(c=""+ye(c),o=null,E=0;E<i.length;E++){if(i[E].value===c){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function ur(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Kl(i,o){var c=o.value;if(c==null){if(c=o.children,o=o.defaultValue,c!=null){if(o!=null)throw Error(n(92));if(ar(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:ye(c)}}function Ql(i,o){var c=ye(o.value),h=ye(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 Jl(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function oe(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ae(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?oe(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var je,Ge=(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(je=je||document.createElement("div"),je.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=je.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function Ze(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var Yt={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},qr=["Webkit","ms","Moz","O"];Object.keys(Yt).forEach(function(i){qr.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Yt[o]=Yt[i]})});function $n(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||Yt.hasOwnProperty(i)&&Yt[i]?(""+o).trim():o+"px"}function mi(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=$n(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var ls=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Wt(i,o){if(o){if(ls[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Ir(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ln=null;function hp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var pp=null,fo=null,ho=null;function m_(i){if(i=Za(i)){if(typeof pp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=_c(o),pp(i.stateNode,i.type,o))}}function g_(i){fo?ho?ho.push(i):ho=[i]:fo=i}function E_(){if(fo){var i=fo,o=ho;if(ho=fo=null,m_(i),o)for(i=0;i<o.length;i++)m_(o[i])}}function y_(i,o){return i(o)}function T_(){}var mp=!1;function b_(i,o,c){if(mp)return i(o,c);mp=!0;try{return y_(i,o,c)}finally{mp=!1,(fo!==null||ho!==null)&&(T_(),E_())}}function Pa(i,o){var c=i.stateNode;if(c===null)return null;var h=_c(c);if(h===null)return null;c=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var gp=!1;if(l)try{var Ra={};Object.defineProperty(Ra,"passive",{get:function(){gp=!0}}),window.addEventListener("test",Ra,Ra),window.removeEventListener("test",Ra,Ra)}catch(i){gp=!1}function eF(i,o,c,h,E,b,w,M,z){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(c,Z)}catch(Ee){this.onError(Ee)}}var La=!1,Zl=null,ec=!1,Ep=null,tF={onError:function(i){La=!0,Zl=i}};function nF(i,o,c,h,E,b,w,M,z){La=!1,Zl=null,eF.apply(tF,arguments)}function rF(i,o,c,h,E,b,w,M,z){if(nF.apply(this,arguments),La){if(La){var Z=Zl;La=!1,Zl=null}else throw Error(n(198));ec||(ec=!0,Ep=Z)}}function cs(i){var o=i,c=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(c=o.return),i=o.return;while(i)}return o.tag===3?c:null}function __(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 x_(i){if(cs(i)!==i)throw Error(n(188))}function iF(i){var o=i.alternate;if(!o){if(o=cs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var c=i,h=o;;){var E=c.return;if(E===null)break;var b=E.alternate;if(b===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===c)return x_(E),i;if(b===h)return x_(E),o;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var w=!1,M=E.child;M;){if(M===c){w=!0,c=E,h=b;break}if(M===h){w=!0,h=E,c=b;break}M=M.sibling}if(!w){for(M=b.child;M;){if(M===c){w=!0,c=b,h=E;break}if(M===h){w=!0,h=b,c=E;break}M=M.sibling}if(!w)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:o}function w_(i){return i=iF(i),i!==null?S_(i):null}function S_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=S_(i);if(o!==null)return o;i=i.sibling}return null}var v_=t.unstable_scheduleCallback,A_=t.unstable_cancelCallback,sF=t.unstable_shouldYield,oF=t.unstable_requestPaint,vt=t.unstable_now,aF=t.unstable_getCurrentPriorityLevel,yp=t.unstable_ImmediatePriority,N_=t.unstable_UserBlockingPriority,tc=t.unstable_NormalPriority,uF=t.unstable_LowPriority,C_=t.unstable_IdlePriority,nc=null,Pr=null;function lF(i){if(Pr&&typeof Pr.onCommitFiberRoot=="function")try{Pr.onCommitFiberRoot(nc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var lr=Math.clz32?Math.clz32:fF,cF=Math.log,dF=Math.LN2;function fF(i){return i>>>=0,i===0?32:31-(cF(i)/dF|0)|0}var rc=64,ic=4194304;function Da(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function sc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,w=c&268435455;if(w!==0){var M=w&~E;M!==0?h=Da(M):(b&=w,b!==0&&(h=Da(b)))}else w=c&~E,w!==0?h=Da(w):b!==0&&(h=Da(b));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,b=o&-o,E>=b||E===16&&(b&4194240)!==0))return o;if((h&4)!==0&&(h|=c&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)c=31-lr(o),E=1<<c,h|=i[c],o&=~E;return h}function hF(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 pF(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var w=31-lr(b),M=1<<w,z=E[w];z===-1?((M&c)===0||(M&h)!==0)&&(E[w]=hF(M,o)):z<=o&&(i.expiredLanes|=M),b&=~M}}function Tp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function k_(){var i=rc;return rc<<=1,(rc&4194240)===0&&(rc=64),i}function bp(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function Ma(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-lr(o),i[o]=c}function mF(i,o){var c=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<c;){var E=31-lr(c),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function _p(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-lr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var it=0;function O_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var I_,xp,P_,R_,L_,wp=!1,oc=[],gi=null,Ei=null,yi=null,Fa=new Map,Ba=new Map,Ti=[],gF="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 D_(i,o){switch(i){case"focusin":case"focusout":gi=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":yi=null;break;case"pointerover":case"pointerout":Fa.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ba.delete(o.pointerId)}}function Ua(i,o,c,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},o!==null&&(o=Za(o),o!==null&&xp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function EF(i,o,c,h,E){switch(o){case"focusin":return gi=Ua(gi,i,o,c,h,E),!0;case"dragenter":return Ei=Ua(Ei,i,o,c,h,E),!0;case"mouseover":return yi=Ua(yi,i,o,c,h,E),!0;case"pointerover":var b=E.pointerId;return Fa.set(b,Ua(Fa.get(b)||null,i,o,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,Ba.set(b,Ua(Ba.get(b)||null,i,o,c,h,E)),!0}return!1}function M_(i){var o=ds(i.target);if(o!==null){var c=cs(o);if(c!==null){if(o=c.tag,o===13){if(o=__(c),o!==null){i.blockedOn=o,L_(i.priority,function(){P_(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 ac(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=vp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Ln=h,c.target.dispatchEvent(h),Ln=null}else return o=Za(c),o!==null&&xp(o),i.blockedOn=c,!1;o.shift()}return!0}function F_(i,o,c){ac(i)&&c.delete(o)}function yF(){wp=!1,gi!==null&&ac(gi)&&(gi=null),Ei!==null&&ac(Ei)&&(Ei=null),yi!==null&&ac(yi)&&(yi=null),Fa.forEach(F_),Ba.forEach(F_)}function Ha(i,o){i.blockedOn===o&&(i.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,yF)))}function ja(i){function o(E){return Ha(E,i)}if(0<oc.length){Ha(oc[0],i);for(var c=1;c<oc.length;c++){var h=oc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(gi!==null&&Ha(gi,i),Ei!==null&&Ha(Ei,i),yi!==null&&Ha(yi,i),Fa.forEach(o),Ba.forEach(o),c=0;c<Ti.length;c++)h=Ti[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ti.length&&(c=Ti[0],c.blockedOn===null);)M_(c),c.blockedOn===null&&Ti.shift()}var po=j.ReactCurrentBatchConfig,uc=!0;function TF(i,o,c,h){var E=it,b=po.transition;po.transition=null;try{it=1,Sp(i,o,c,h)}finally{it=E,po.transition=b}}function bF(i,o,c,h){var E=it,b=po.transition;po.transition=null;try{it=4,Sp(i,o,c,h)}finally{it=E,po.transition=b}}function Sp(i,o,c,h){if(uc){var E=vp(i,o,c,h);if(E===null)zp(i,o,h,lc,c),D_(i,h);else if(EF(E,i,o,c,h))h.stopPropagation();else if(D_(i,h),o&4&&-1<gF.indexOf(i)){for(;E!==null;){var b=Za(E);if(b!==null&&I_(b),b=vp(i,o,c,h),b===null&&zp(i,o,h,lc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else zp(i,o,h,null,c)}}var lc=null;function vp(i,o,c,h){if(lc=null,i=hp(h),i=ds(i),i!==null)if(o=cs(i),o===null)i=null;else if(c=o.tag,c===13){if(i=__(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 lc=i,null}function B_(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(aF()){case yp:return 1;case N_:return 4;case tc:case uF:return 16;case C_:return 536870912;default:return 16}default:return 16}}var bi=null,Ap=null,cc=null;function U_(){if(cc)return cc;var i,o=Ap,c=o.length,h,E="value"in bi?bi.value:bi.textContent,b=E.length;for(i=0;i<c&&o[i]===E[i];i++);var w=c-i;for(h=1;h<=w&&o[c-h]===E[b-h];h++);return cc=E.slice(i,1<h?1-h:void 0)}function dc(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 fc(){return!0}function H_(){return!1}function Dn(i){function o(c,h,E,b,w){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var M in i)i.hasOwnProperty(M)&&(c=i[M],this[M]=c?c(b):b[M]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?fc:H_,this.isPropagationStopped=H_,this}return N(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=fc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=fc)},persist:function(){},isPersistent:fc}),o}var mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Np=Dn(mo),za=N({},mo,{view:0,detail:0}),_F=Dn(za),Cp,kp,$a,hc=N({},za,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ip,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==$a&&($a&&i.type==="mousemove"?(Cp=i.screenX-$a.screenX,kp=i.screenY-$a.screenY):kp=Cp=0,$a=i),Cp)},movementY:function(i){return"movementY"in i?i.movementY:kp}}),j_=Dn(hc),xF=N({},hc,{dataTransfer:0}),wF=Dn(xF),SF=N({},za,{relatedTarget:0}),Op=Dn(SF),vF=N({},mo,{animationName:0,elapsedTime:0,pseudoElement:0}),AF=Dn(vF),NF=N({},mo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),CF=Dn(NF),kF=N({},mo,{data:0}),z_=Dn(kF),OF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},IF={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"},PF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function RF(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=PF[i])?!!o[i]:!1}function Ip(){return RF}var LF=N({},za,{key:function(i){if(i.key){var o=OF[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=dc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?IF[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ip,charCode:function(i){return i.type==="keypress"?dc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?dc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),DF=Dn(LF),MF=N({},hc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$_=Dn(MF),FF=N({},za,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ip}),BF=Dn(FF),UF=N({},mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),HF=Dn(UF),jF=N({},hc,{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}),zF=Dn(jF),$F=[9,13,27,32],Pp=l&&"CompositionEvent"in window,Va=null;l&&"documentMode"in document&&(Va=document.documentMode);var VF=l&&"TextEvent"in window&&!Va,V_=l&&(!Pp||Va&&8<Va&&11>=Va),q_=" ",Y_=!1;function W_(i,o){switch(i){case"keyup":return $F.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function G_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var go=!1;function qF(i,o){switch(i){case"compositionend":return G_(o);case"keypress":return o.which!==32?null:(Y_=!0,q_);case"textInput":return i=o.data,i===q_&&Y_?null:i;default:return null}}function YF(i,o){if(go)return i==="compositionend"||!Pp&&W_(i,o)?(i=U_(),cc=Ap=bi=null,go=!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 V_&&o.locale!=="ko"?null:o.data;default:return null}}var WF={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 X_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!WF[i.type]:o==="textarea"}function K_(i,o,c,h){g_(h),o=yc(o,"onChange"),0<o.length&&(c=new Np("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var qa=null,Ya=null;function GF(i){px(i,0)}function pc(i){var o=_o(i);if(_t(o))return i}function XF(i,o){if(i==="change")return o}var Q_=!1;if(l){var Rp;if(l){var Lp="oninput"in document;if(!Lp){var J_=document.createElement("div");J_.setAttribute("oninput","return;"),Lp=typeof J_.oninput=="function"}Rp=Lp}else Rp=!1;Q_=Rp&&(!document.documentMode||9<document.documentMode)}function Z_(){qa&&(qa.detachEvent("onpropertychange",ex),Ya=qa=null)}function ex(i){if(i.propertyName==="value"&&pc(Ya)){var o=[];K_(o,Ya,i,hp(i)),b_(GF,o)}}function KF(i,o,c){i==="focusin"?(Z_(),qa=o,Ya=c,qa.attachEvent("onpropertychange",ex)):i==="focusout"&&Z_()}function QF(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return pc(Ya)}function JF(i,o){if(i==="click")return pc(o)}function ZF(i,o){if(i==="input"||i==="change")return pc(o)}function e7(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var cr=typeof Object.is=="function"?Object.is:e7;function Wa(i,o){if(cr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),h=Object.keys(o);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var E=c[h];if(!d.call(o,E)||!cr(i[E],o[E]))return!1}return!0}function tx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function nx(i,o){var c=tx(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=tx(c)}}function rx(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?rx(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function ix(){for(var i=window,o=qt();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=qt(i.document)}return o}function Dp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function t7(i){var o=ix(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&rx(c.ownerDocument.documentElement,c)){if(h!==null&&Dp(c)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in c)c.selectionStart=o,c.selectionEnd=Math.min(i,c.value.length);else if(i=(o=c.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=c.textContent.length,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=nx(c,b);var w=nx(c,h);E&&w&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==w.node||i.focusOffset!==w.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(o),i.extend(w.node,w.offset)):(o.setEnd(w.node,w.offset),i.addRange(o)))}}for(o=[],i=c;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<o.length;c++)i=o[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var n7=l&&"documentMode"in document&&11>=document.documentMode,Eo=null,Mp=null,Ga=null,Fp=!1;function sx(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Fp||Eo==null||Eo!==qt(h)||(h=Eo,"selectionStart"in h&&Dp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Ga&&Wa(Ga,h)||(Ga=h,h=yc(Mp,"onSelect"),0<h.length&&(o=new Np("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=Eo)))}function mc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var yo={animationend:mc("Animation","AnimationEnd"),animationiteration:mc("Animation","AnimationIteration"),animationstart:mc("Animation","AnimationStart"),transitionend:mc("Transition","TransitionEnd")},Bp={},ox={};l&&(ox=document.createElement("div").style,"AnimationEvent"in window||(delete yo.animationend.animation,delete yo.animationiteration.animation,delete yo.animationstart.animation),"TransitionEvent"in window||delete yo.transitionend.transition);function gc(i){if(Bp[i])return Bp[i];if(!yo[i])return i;var o=yo[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in ox)return Bp[i]=o[c];return i}var ax=gc("animationend"),ux=gc("animationiteration"),lx=gc("animationstart"),cx=gc("transitionend"),dx=new Map,fx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function _i(i,o){dx.set(i,o),a(o,[i])}for(var Up=0;Up<fx.length;Up++){var Hp=fx[Up],r7=Hp.toLowerCase(),i7=Hp[0].toUpperCase()+Hp.slice(1);_i(r7,"on"+i7)}_i(ax,"onAnimationEnd"),_i(ux,"onAnimationIteration"),_i(lx,"onAnimationStart"),_i("dblclick","onDoubleClick"),_i("focusin","onFocus"),_i("focusout","onBlur"),_i(cx,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xa="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),s7=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xa));function hx(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,rF(h,o,void 0,i),i.currentTarget=null}function px(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],E=h.event;h=h.listeners;e:{var b=void 0;if(o)for(var w=h.length-1;0<=w;w--){var M=h[w],z=M.instance,Z=M.currentTarget;if(M=M.listener,z!==b&&E.isPropagationStopped())break e;hx(E,M,Z),b=z}else for(w=0;w<h.length;w++){if(M=h[w],z=M.instance,Z=M.currentTarget,M=M.listener,z!==b&&E.isPropagationStopped())break e;hx(E,M,Z),b=z}}}if(ec)throw i=Ep,ec=!1,Ep=null,i}function ht(i,o){var c=o[Gp];c===void 0&&(c=o[Gp]=new Set);var h=i+"__bubble";c.has(h)||(mx(o,i,2,!1),c.add(h))}function jp(i,o,c){var h=0;o&&(h|=4),mx(c,i,h,o)}var Ec="_reactListening"+Math.random().toString(36).slice(2);function Ka(i){if(!i[Ec]){i[Ec]=!0,r.forEach(function(c){c!=="selectionchange"&&(s7.has(c)||jp(c,!1,i),jp(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Ec]||(o[Ec]=!0,jp("selectionchange",!1,o))}}function mx(i,o,c,h){switch(B_(o)){case 1:var E=TF;break;case 4:E=bF;break;default:E=Sp}c=E.bind(null,o,c,i),E=void 0,!gp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,c,{capture:!0,passive:E}):i.addEventListener(o,c,!0):E!==void 0?i.addEventListener(o,c,{passive:E}):i.addEventListener(o,c,!1)}function zp(i,o,c,h,E){var b=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var w=h.tag;if(w===3||w===4){var M=h.stateNode.containerInfo;if(M===E||M.nodeType===8&&M.parentNode===E)break;if(w===4)for(w=h.return;w!==null;){var z=w.tag;if((z===3||z===4)&&(z=w.stateNode.containerInfo,z===E||z.nodeType===8&&z.parentNode===E))return;w=w.return}for(;M!==null;){if(w=ds(M),w===null)return;if(z=w.tag,z===5||z===6){h=b=w;continue e}M=M.parentNode}}h=h.return}b_(function(){var Z=b,Ee=hp(c),be=[];e:{var pe=dx.get(i);if(pe!==void 0){var Ce=Np,Oe=i;switch(i){case"keypress":if(dc(c)===0)break e;case"keydown":case"keyup":Ce=DF;break;case"focusin":Oe="focus",Ce=Op;break;case"focusout":Oe="blur",Ce=Op;break;case"beforeblur":case"afterblur":Ce=Op;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ce=j_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ce=wF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ce=BF;break;case ax:case ux:case lx:Ce=AF;break;case cx:Ce=HF;break;case"scroll":Ce=_F;break;case"wheel":Ce=zF;break;case"copy":case"cut":case"paste":Ce=CF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ce=$_}var Ie=(o&4)!==0,At=!Ie&&i==="scroll",G=Ie?pe!==null?pe+"Capture":null:pe;Ie=[];for(var V=Z,J;V!==null;){J=V;var Se=J.stateNode;if(J.tag===5&&Se!==null&&(J=Se,G!==null&&(Se=Pa(V,G),Se!=null&&Ie.push(Qa(V,Se,J)))),At)break;V=V.return}0<Ie.length&&(pe=new Ce(pe,Oe,null,c,Ee),be.push({event:pe,listeners:Ie}))}}if((o&7)===0){e:{if(pe=i==="mouseover"||i==="pointerover",Ce=i==="mouseout"||i==="pointerout",pe&&c!==Ln&&(Oe=c.relatedTarget||c.fromElement)&&(ds(Oe)||Oe[Yr]))break e;if((Ce||pe)&&(pe=Ee.window===Ee?Ee:(pe=Ee.ownerDocument)?pe.defaultView||pe.parentWindow:window,Ce?(Oe=c.relatedTarget||c.toElement,Ce=Z,Oe=Oe?ds(Oe):null,Oe!==null&&(At=cs(Oe),Oe!==At||Oe.tag!==5&&Oe.tag!==6)&&(Oe=null)):(Ce=null,Oe=Z),Ce!==Oe)){if(Ie=j_,Se="onMouseLeave",G="onMouseEnter",V="mouse",(i==="pointerout"||i==="pointerover")&&(Ie=$_,Se="onPointerLeave",G="onPointerEnter",V="pointer"),At=Ce==null?pe:_o(Ce),J=Oe==null?pe:_o(Oe),pe=new Ie(Se,V+"leave",Ce,c,Ee),pe.target=At,pe.relatedTarget=J,Se=null,ds(Ee)===Z&&(Ie=new Ie(G,V+"enter",Oe,c,Ee),Ie.target=J,Ie.relatedTarget=At,Se=Ie),At=Se,Ce&&Oe)t:{for(Ie=Ce,G=Oe,V=0,J=Ie;J;J=To(J))V++;for(J=0,Se=G;Se;Se=To(Se))J++;for(;0<V-J;)Ie=To(Ie),V--;for(;0<J-V;)G=To(G),J--;for(;V--;){if(Ie===G||G!==null&&Ie===G.alternate)break t;Ie=To(Ie),G=To(G)}Ie=null}else Ie=null;Ce!==null&&gx(be,pe,Ce,Ie,!1),Oe!==null&&At!==null&&gx(be,At,Oe,Ie,!0)}}e:{if(pe=Z?_o(Z):window,Ce=pe.nodeName&&pe.nodeName.toLowerCase(),Ce==="select"||Ce==="input"&&pe.type==="file")var Pe=XF;else if(X_(pe))if(Q_)Pe=ZF;else{Pe=QF;var Fe=KF}else(Ce=pe.nodeName)&&Ce.toLowerCase()==="input"&&(pe.type==="checkbox"||pe.type==="radio")&&(Pe=JF);if(Pe&&(Pe=Pe(i,Z))){K_(be,Pe,c,Ee);break e}Fe&&Fe(i,pe,Z),i==="focusout"&&(Fe=pe._wrapperState)&&Fe.controlled&&pe.type==="number"&&xn(pe,"number",pe.value)}switch(Fe=Z?_o(Z):window,i){case"focusin":(X_(Fe)||Fe.contentEditable==="true")&&(Eo=Fe,Mp=Z,Ga=null);break;case"focusout":Ga=Mp=Eo=null;break;case"mousedown":Fp=!0;break;case"contextmenu":case"mouseup":case"dragend":Fp=!1,sx(be,c,Ee);break;case"selectionchange":if(n7)break;case"keydown":case"keyup":sx(be,c,Ee)}var Be;if(Pp)e:{switch(i){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else go?W_(i,c)&&($e="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&($e="onCompositionStart");$e&&(V_&&c.locale!=="ko"&&(go||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&go&&(Be=U_()):(bi=Ee,Ap="value"in bi?bi.value:bi.textContent,go=!0)),Fe=yc(Z,$e),0<Fe.length&&($e=new z_($e,i,null,c,Ee),be.push({event:$e,listeners:Fe}),Be?$e.data=Be:(Be=G_(c),Be!==null&&($e.data=Be)))),(Be=VF?qF(i,c):YF(i,c))&&(Z=yc(Z,"onBeforeInput"),0<Z.length&&(Ee=new z_("onBeforeInput","beforeinput",null,c,Ee),be.push({event:Ee,listeners:Z}),Ee.data=Be))}px(be,o)})}function Qa(i,o,c){return{instance:i,listener:o,currentTarget:c}}function yc(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=Pa(i,c),b!=null&&h.unshift(Qa(i,b,E)),b=Pa(i,o),b!=null&&h.push(Qa(i,b,E))),i=i.return}return h}function To(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function gx(i,o,c,h,E){for(var b=o._reactName,w=[];c!==null&&c!==h;){var M=c,z=M.alternate,Z=M.stateNode;if(z!==null&&z===h)break;M.tag===5&&Z!==null&&(M=Z,E?(z=Pa(c,b),z!=null&&w.unshift(Qa(c,z,M))):E||(z=Pa(c,b),z!=null&&w.push(Qa(c,z,M)))),c=c.return}w.length!==0&&i.push({event:o,listeners:w})}var o7=/\r\n?/g,a7=/\u0000|\uFFFD/g;function Ex(i){return(typeof i=="string"?i:""+i).replace(o7,`
|
|
21
|
+
`).replace(a7,"")}function Tc(i,o,c){if(o=Ex(o),Ex(i)!==o&&c)throw Error(n(425))}function bc(){}var $p=null,Vp=null;function qp(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Yp=typeof setTimeout=="function"?setTimeout:void 0,u7=typeof clearTimeout=="function"?clearTimeout:void 0,yx=typeof Promise=="function"?Promise:void 0,l7=typeof queueMicrotask=="function"?queueMicrotask:typeof yx!="undefined"?function(i){return yx.resolve(null).then(i).catch(c7)}:Yp;function c7(i){setTimeout(function(){throw i})}function Wp(i,o){var c=o,h=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(h===0){i.removeChild(E),ja(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);ja(o)}function xi(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function Tx(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 bo=Math.random().toString(36).slice(2),Rr="__reactFiber$"+bo,Ja="__reactProps$"+bo,Yr="__reactContainer$"+bo,Gp="__reactEvents$"+bo,d7="__reactListeners$"+bo,f7="__reactHandles$"+bo;function ds(i){var o=i[Rr];if(o)return o;for(var c=i.parentNode;c;){if(o=c[Yr]||c[Rr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=Tx(i);i!==null;){if(c=i[Rr])return c;i=Tx(i)}return o}i=c,c=i.parentNode}return null}function Za(i){return i=i[Rr]||i[Yr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function _o(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function _c(i){return i[Ja]||null}var Xp=[],xo=-1;function wi(i){return{current:i}}function pt(i){0>xo||(i.current=Xp[xo],Xp[xo]=null,xo--)}function ct(i,o){xo++,Xp[xo]=i.current,i.current=o}var Si={},nn=wi(Si),wn=wi(!1),fs=Si;function wo(i,o){var c=i.type.contextTypes;if(!c)return Si;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in c)E[b]=o[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Sn(i){return i=i.childContextTypes,i!=null}function xc(){pt(wn),pt(nn)}function bx(i,o,c){if(nn.current!==Si)throw Error(n(168));ct(nn,o),ct(wn,c)}function _x(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,re(i)||"Unknown",E));return N({},c,h)}function wc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Si,fs=nn.current,ct(nn,i),ct(wn,wn.current),!0}function xx(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=_x(i,o,fs),h.__reactInternalMemoizedMergedChildContext=i,pt(wn),pt(nn),ct(nn,i)):pt(wn),ct(wn,c)}var Wr=null,Sc=!1,Kp=!1;function wx(i){Wr===null?Wr=[i]:Wr.push(i)}function h7(i){Sc=!0,wx(i)}function vi(){if(!Kp&&Wr!==null){Kp=!0;var i=0,o=it;try{var c=Wr;for(it=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}Wr=null,Sc=!1}catch(E){throw Wr!==null&&(Wr=Wr.slice(i+1)),v_(yp,vi),E}finally{it=o,Kp=!1}}return null}var So=[],vo=0,vc=null,Ac=0,Vn=[],qn=0,hs=null,Gr=1,Xr="";function ps(i,o){So[vo++]=Ac,So[vo++]=vc,vc=i,Ac=o}function Sx(i,o,c){Vn[qn++]=Gr,Vn[qn++]=Xr,Vn[qn++]=hs,hs=i;var h=Gr;i=Xr;var E=32-lr(h)-1;h&=~(1<<E),c+=1;var b=32-lr(o)+E;if(30<b){var w=E-E%5;b=(h&(1<<w)-1).toString(32),h>>=w,E-=w,Gr=1<<32-lr(o)+E|c<<E|h,Xr=b+i}else Gr=1<<b|c<<E|h,Xr=i}function Qp(i){i.return!==null&&(ps(i,1),Sx(i,1,0))}function Jp(i){for(;i===vc;)vc=So[--vo],So[vo]=null,Ac=So[--vo],So[vo]=null;for(;i===hs;)hs=Vn[--qn],Vn[qn]=null,Xr=Vn[--qn],Vn[qn]=null,Gr=Vn[--qn],Vn[qn]=null}var Mn=null,Fn=null,Et=!1,dr=null;function vx(i,o){var c=Xn(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 Ax(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,Mn=i,Fn=xi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Mn=i,Fn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=hs!==null?{id:Gr,overflow:Xr}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=Xn(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,Mn=i,Fn=null,!0):!1;default:return!1}}function Zp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function em(i){if(Et){var o=Fn;if(o){var c=o;if(!Ax(i,o)){if(Zp(i))throw Error(n(418));o=xi(c.nextSibling);var h=Mn;o&&Ax(i,o)?vx(h,c):(i.flags=i.flags&-4097|2,Et=!1,Mn=i)}}else{if(Zp(i))throw Error(n(418));i.flags=i.flags&-4097|2,Et=!1,Mn=i}}}function Nx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Mn=i}function Nc(i){if(i!==Mn)return!1;if(!Et)return Nx(i),Et=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!qp(i.type,i.memoizedProps)),o&&(o=Fn)){if(Zp(i))throw Cx(),Error(n(418));for(;o;)vx(i,o),o=xi(o.nextSibling)}if(Nx(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){Fn=xi(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Fn=null}}else Fn=Mn?xi(i.stateNode.nextSibling):null;return!0}function Cx(){for(var i=Fn;i;)i=xi(i.nextSibling)}function Ao(){Fn=Mn=null,Et=!1}function tm(i){dr===null?dr=[i]:dr.push(i)}var p7=j.ReactCurrentBatchConfig;function eu(i,o,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===b?o.ref:(o=function(w){var M=E.refs;w===null?delete M[b]:M[b]=w},o._stringRef=b,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Cc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function kx(i){var o=i._init;return o(i._payload)}function Ox(i){function o(G,V){if(i){var J=G.deletions;J===null?(G.deletions=[V],G.flags|=16):J.push(V)}}function c(G,V){if(!i)return null;for(;V!==null;)o(G,V),V=V.sibling;return null}function h(G,V){for(G=new Map;V!==null;)V.key!==null?G.set(V.key,V):G.set(V.index,V),V=V.sibling;return G}function E(G,V){return G=Ri(G,V),G.index=0,G.sibling=null,G}function b(G,V,J){return G.index=J,i?(J=G.alternate,J!==null?(J=J.index,J<V?(G.flags|=2,V):J):(G.flags|=2,V)):(G.flags|=1048576,V)}function w(G){return i&&G.alternate===null&&(G.flags|=2),G}function M(G,V,J,Se){return V===null||V.tag!==6?(V=Ym(J,G.mode,Se),V.return=G,V):(V=E(V,J),V.return=G,V)}function z(G,V,J,Se){var Pe=J.type;return Pe===K?Ee(G,V,J.props.children,Se,J.key):V!==null&&(V.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===he&&kx(Pe)===V.type)?(Se=E(V,J.props),Se.ref=eu(G,V,J),Se.return=G,Se):(Se=Jc(J.type,J.key,J.props,null,G.mode,Se),Se.ref=eu(G,V,J),Se.return=G,Se)}function Z(G,V,J,Se){return V===null||V.tag!==4||V.stateNode.containerInfo!==J.containerInfo||V.stateNode.implementation!==J.implementation?(V=Wm(J,G.mode,Se),V.return=G,V):(V=E(V,J.children||[]),V.return=G,V)}function Ee(G,V,J,Se,Pe){return V===null||V.tag!==7?(V=xs(J,G.mode,Se,Pe),V.return=G,V):(V=E(V,J),V.return=G,V)}function be(G,V,J){if(typeof V=="string"&&V!==""||typeof V=="number")return V=Ym(""+V,G.mode,J),V.return=G,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case W:return J=Jc(V.type,V.key,V.props,null,G.mode,J),J.ref=eu(G,null,V),J.return=G,J;case D:return V=Wm(V,G.mode,J),V.return=G,V;case he:var Se=V._init;return be(G,Se(V._payload),J)}if(ar(V)||ue(V))return V=xs(V,G.mode,J,null),V.return=G,V;Cc(G,V)}return null}function pe(G,V,J,Se){var Pe=V!==null?V.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return Pe!==null?null:M(G,V,""+J,Se);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case W:return J.key===Pe?z(G,V,J,Se):null;case D:return J.key===Pe?Z(G,V,J,Se):null;case he:return Pe=J._init,pe(G,V,Pe(J._payload),Se)}if(ar(J)||ue(J))return Pe!==null?null:Ee(G,V,J,Se,null);Cc(G,J)}return null}function Ce(G,V,J,Se,Pe){if(typeof Se=="string"&&Se!==""||typeof Se=="number")return G=G.get(J)||null,M(V,G,""+Se,Pe);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case W:return G=G.get(Se.key===null?J:Se.key)||null,z(V,G,Se,Pe);case D:return G=G.get(Se.key===null?J:Se.key)||null,Z(V,G,Se,Pe);case he:var Fe=Se._init;return Ce(G,V,J,Fe(Se._payload),Pe)}if(ar(Se)||ue(Se))return G=G.get(J)||null,Ee(V,G,Se,Pe,null);Cc(V,Se)}return null}function Oe(G,V,J,Se){for(var Pe=null,Fe=null,Be=V,$e=V=0,zt=null;Be!==null&&$e<J.length;$e++){Be.index>$e?(zt=Be,Be=null):zt=Be.sibling;var tt=pe(G,Be,J[$e],Se);if(tt===null){Be===null&&(Be=zt);break}i&&Be&&tt.alternate===null&&o(G,Be),V=b(tt,V,$e),Fe===null?Pe=tt:Fe.sibling=tt,Fe=tt,Be=zt}if($e===J.length)return c(G,Be),Et&&ps(G,$e),Pe;if(Be===null){for(;$e<J.length;$e++)Be=be(G,J[$e],Se),Be!==null&&(V=b(Be,V,$e),Fe===null?Pe=Be:Fe.sibling=Be,Fe=Be);return Et&&ps(G,$e),Pe}for(Be=h(G,Be);$e<J.length;$e++)zt=Ce(Be,G,$e,J[$e],Se),zt!==null&&(i&&zt.alternate!==null&&Be.delete(zt.key===null?$e:zt.key),V=b(zt,V,$e),Fe===null?Pe=zt:Fe.sibling=zt,Fe=zt);return i&&Be.forEach(function(Li){return o(G,Li)}),Et&&ps(G,$e),Pe}function Ie(G,V,J,Se){var Pe=ue(J);if(typeof Pe!="function")throw Error(n(150));if(J=Pe.call(J),J==null)throw Error(n(151));for(var Fe=Pe=null,Be=V,$e=V=0,zt=null,tt=J.next();Be!==null&&!tt.done;$e++,tt=J.next()){Be.index>$e?(zt=Be,Be=null):zt=Be.sibling;var Li=pe(G,Be,tt.value,Se);if(Li===null){Be===null&&(Be=zt);break}i&&Be&&Li.alternate===null&&o(G,Be),V=b(Li,V,$e),Fe===null?Pe=Li:Fe.sibling=Li,Fe=Li,Be=zt}if(tt.done)return c(G,Be),Et&&ps(G,$e),Pe;if(Be===null){for(;!tt.done;$e++,tt=J.next())tt=be(G,tt.value,Se),tt!==null&&(V=b(tt,V,$e),Fe===null?Pe=tt:Fe.sibling=tt,Fe=tt);return Et&&ps(G,$e),Pe}for(Be=h(G,Be);!tt.done;$e++,tt=J.next())tt=Ce(Be,G,$e,tt.value,Se),tt!==null&&(i&&tt.alternate!==null&&Be.delete(tt.key===null?$e:tt.key),V=b(tt,V,$e),Fe===null?Pe=tt:Fe.sibling=tt,Fe=tt);return i&&Be.forEach(function(W7){return o(G,W7)}),Et&&ps(G,$e),Pe}function At(G,V,J,Se){if(typeof J=="object"&&J!==null&&J.type===K&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case W:e:{for(var Pe=J.key,Fe=V;Fe!==null;){if(Fe.key===Pe){if(Pe=J.type,Pe===K){if(Fe.tag===7){c(G,Fe.sibling),V=E(Fe,J.props.children),V.return=G,G=V;break e}}else if(Fe.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===he&&kx(Pe)===Fe.type){c(G,Fe.sibling),V=E(Fe,J.props),V.ref=eu(G,Fe,J),V.return=G,G=V;break e}c(G,Fe);break}else o(G,Fe);Fe=Fe.sibling}J.type===K?(V=xs(J.props.children,G.mode,Se,J.key),V.return=G,G=V):(Se=Jc(J.type,J.key,J.props,null,G.mode,Se),Se.ref=eu(G,V,J),Se.return=G,G=Se)}return w(G);case D:e:{for(Fe=J.key;V!==null;){if(V.key===Fe)if(V.tag===4&&V.stateNode.containerInfo===J.containerInfo&&V.stateNode.implementation===J.implementation){c(G,V.sibling),V=E(V,J.children||[]),V.return=G,G=V;break e}else{c(G,V);break}else o(G,V);V=V.sibling}V=Wm(J,G.mode,Se),V.return=G,G=V}return w(G);case he:return Fe=J._init,At(G,V,Fe(J._payload),Se)}if(ar(J))return Oe(G,V,J,Se);if(ue(J))return Ie(G,V,J,Se);Cc(G,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,V!==null&&V.tag===6?(c(G,V.sibling),V=E(V,J),V.return=G,G=V):(c(G,V),V=Ym(J,G.mode,Se),V.return=G,G=V),w(G)):c(G,V)}return At}var No=Ox(!0),Ix=Ox(!1),kc=wi(null),Oc=null,Co=null,nm=null;function rm(){nm=Co=Oc=null}function im(i){var o=kc.current;pt(kc),i._currentValue=o}function sm(i,o,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===c)break;i=i.return}}function ko(i,o){Oc=i,nm=Co=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(vn=!0),i.firstContext=null)}function Yn(i){var o=i._currentValue;if(nm!==i)if(i={context:i,memoizedValue:o,next:null},Co===null){if(Oc===null)throw Error(n(308));Co=i,Oc.dependencies={lanes:0,firstContext:i}}else Co=Co.next=i;return o}var ms=null;function om(i){ms===null?ms=[i]:ms.push(i)}function Px(i,o,c,h){var E=o.interleaved;return E===null?(c.next=c,om(o)):(c.next=E.next,E.next=c),o.interleaved=c,Kr(i,h)}function Kr(i,o){i.lanes|=o;var c=i.alternate;for(c!==null&&(c.lanes|=o),c=i,i=i.return;i!==null;)i.childLanes|=o,c=i.alternate,c!==null&&(c.childLanes|=o),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Ai=!1;function am(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rx(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 Qr(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Ni(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(et&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,Kr(i,c)}return E=h.interleaved,E===null?(o.next=o,om(h)):(o.next=E.next,E.next=o),h.interleaved=o,Kr(i,c)}function Ic(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,_p(i,c)}}function Lx(i,o){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var w={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=w:b=b.next=w,c=c.next}while(c!==null);b===null?E=b=o:b=b.next=o}else E=b=o;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:h.shared,effects:h.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}function Pc(i,o,c,h){var E=i.updateQueue;Ai=!1;var b=E.firstBaseUpdate,w=E.lastBaseUpdate,M=E.shared.pending;if(M!==null){E.shared.pending=null;var z=M,Z=z.next;z.next=null,w===null?b=Z:w.next=Z,w=z;var Ee=i.alternate;Ee!==null&&(Ee=Ee.updateQueue,M=Ee.lastBaseUpdate,M!==w&&(M===null?Ee.firstBaseUpdate=Z:M.next=Z,Ee.lastBaseUpdate=z))}if(b!==null){var be=E.baseState;w=0,Ee=Z=z=null,M=b;do{var pe=M.lane,Ce=M.eventTime;if((h&pe)===pe){Ee!==null&&(Ee=Ee.next={eventTime:Ce,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var Oe=i,Ie=M;switch(pe=o,Ce=c,Ie.tag){case 1:if(Oe=Ie.payload,typeof Oe=="function"){be=Oe.call(Ce,be,pe);break e}be=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Ie.payload,pe=typeof Oe=="function"?Oe.call(Ce,be,pe):Oe,pe==null)break e;be=N({},be,pe);break e;case 2:Ai=!0}}M.callback!==null&&M.lane!==0&&(i.flags|=64,pe=E.effects,pe===null?E.effects=[M]:pe.push(M))}else Ce={eventTime:Ce,lane:pe,tag:M.tag,payload:M.payload,callback:M.callback,next:null},Ee===null?(Z=Ee=Ce,z=be):Ee=Ee.next=Ce,w|=pe;if(M=M.next,M===null){if(M=E.shared.pending,M===null)break;pe=M,M=pe.next,pe.next=null,E.lastBaseUpdate=pe,E.shared.pending=null}}while(!0);if(Ee===null&&(z=be),E.baseState=z,E.firstBaseUpdate=Z,E.lastBaseUpdate=Ee,o=E.shared.interleaved,o!==null){E=o;do w|=E.lane,E=E.next;while(E!==o)}else b===null&&(E.shared.lanes=0);ys|=w,i.lanes=w,i.memoizedState=be}}function Dx(i,o,c){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=c,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var tu={},Lr=wi(tu),nu=wi(tu),ru=wi(tu);function gs(i){if(i===tu)throw Error(n(174));return i}function um(i,o){switch(ct(ru,o),ct(nu,i),ct(Lr,tu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:Ae(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=Ae(o,i)}pt(Lr),ct(Lr,o)}function Oo(){pt(Lr),pt(nu),pt(ru)}function Mx(i){gs(ru.current);var o=gs(Lr.current),c=Ae(o,i.type);o!==c&&(ct(nu,i),ct(Lr,c))}function lm(i){nu.current===i&&(pt(Lr),pt(nu))}var yt=wi(0);function Rc(i){for(var o=i;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var cm=[];function dm(){for(var i=0;i<cm.length;i++)cm[i]._workInProgressVersionPrimary=null;cm.length=0}var Lc=j.ReactCurrentDispatcher,fm=j.ReactCurrentBatchConfig,Es=0,Tt=null,Lt=null,Ht=null,Dc=!1,iu=!1,su=0,m7=0;function rn(){throw Error(n(321))}function hm(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!cr(i[c],o[c]))return!1;return!0}function pm(i,o,c,h,E,b){if(Es=b,Tt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Lc.current=i===null||i.memoizedState===null?T7:b7,i=c(h,E),iu){b=0;do{if(iu=!1,su=0,25<=b)throw Error(n(301));b+=1,Ht=Lt=null,o.updateQueue=null,Lc.current=_7,i=c(h,E)}while(iu)}if(Lc.current=Bc,o=Lt!==null&&Lt.next!==null,Es=0,Ht=Lt=Tt=null,Dc=!1,o)throw Error(n(300));return i}function mm(){var i=su!==0;return su=0,i}function Dr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?Tt.memoizedState=Ht=i:Ht=Ht.next=i,Ht}function Wn(){if(Lt===null){var i=Tt.alternate;i=i!==null?i.memoizedState:null}else i=Lt.next;var o=Ht===null?Tt.memoizedState:Ht.next;if(o!==null)Ht=o,Lt=i;else{if(i===null)throw Error(n(310));Lt=i,i={memoizedState:Lt.memoizedState,baseState:Lt.baseState,baseQueue:Lt.baseQueue,queue:Lt.queue,next:null},Ht===null?Tt.memoizedState=Ht=i:Ht=Ht.next=i}return Ht}function ou(i,o){return typeof o=="function"?o(i):o}function gm(i){var o=Wn(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Lt,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var w=E.next;E.next=b.next,b.next=w}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var M=w=null,z=null,Z=b;do{var Ee=Z.lane;if((Es&Ee)===Ee)z!==null&&(z=z.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),h=Z.hasEagerState?Z.eagerState:i(h,Z.action);else{var be={lane:Ee,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};z===null?(M=z=be,w=h):z=z.next=be,Tt.lanes|=Ee,ys|=Ee}Z=Z.next}while(Z!==null&&Z!==b);z===null?w=h:z.next=M,cr(h,o.memoizedState)||(vn=!0),o.memoizedState=h,o.baseState=w,o.baseQueue=z,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,Tt.lanes|=b,ys|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function Em(i){var o=Wn(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,b=o.memoizedState;if(E!==null){c.pending=null;var w=E=E.next;do b=i(b,w.action),w=w.next;while(w!==E);cr(b,o.memoizedState)||(vn=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),c.lastRenderedState=b}return[b,h]}function Fx(){}function Bx(i,o){var c=Tt,h=Wn(),E=o(),b=!cr(h.memoizedState,E);if(b&&(h.memoizedState=E,vn=!0),h=h.queue,ym(jx.bind(null,c,h,i),[i]),h.getSnapshot!==o||b||Ht!==null&&Ht.memoizedState.tag&1){if(c.flags|=2048,au(9,Hx.bind(null,c,h,E,o),void 0,null),jt===null)throw Error(n(349));(Es&30)!==0||Ux(c,o,E)}return E}function Ux(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Tt.updateQueue,o===null?(o={lastEffect:null,stores:null},Tt.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function Hx(i,o,c,h){o.value=c,o.getSnapshot=h,zx(o)&&$x(i)}function jx(i,o,c){return c(function(){zx(o)&&$x(i)})}function zx(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!cr(i,c)}catch(h){return!0}}function $x(i){var o=Kr(i,1);o!==null&&mr(o,i,1,-1)}function Vx(i){var o=Dr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ou,lastRenderedState:i},o.queue=i,i=i.dispatch=y7.bind(null,Tt,i),[o.memoizedState,i]}function au(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=Tt.updateQueue,o===null?(o={lastEffect:null,stores:null},Tt.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 qx(){return Wn().memoizedState}function Mc(i,o,c,h){var E=Dr();Tt.flags|=i,E.memoizedState=au(1|o,c,void 0,h===void 0?null:h)}function Fc(i,o,c,h){var E=Wn();h=h===void 0?null:h;var b=void 0;if(Lt!==null){var w=Lt.memoizedState;if(b=w.destroy,h!==null&&hm(h,w.deps)){E.memoizedState=au(o,c,b,h);return}}Tt.flags|=i,E.memoizedState=au(1|o,c,b,h)}function Yx(i,o){return Mc(8390656,8,i,o)}function ym(i,o){return Fc(2048,8,i,o)}function Wx(i,o){return Fc(4,2,i,o)}function Gx(i,o){return Fc(4,4,i,o)}function Xx(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 Kx(i,o,c){return c=c!=null?c.concat([i]):null,Fc(4,4,Xx.bind(null,o,i),c)}function Tm(){}function Qx(i,o){var c=Wn();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&hm(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function Jx(i,o){var c=Wn();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&hm(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function Zx(i,o,c){return(Es&21)===0?(i.baseState&&(i.baseState=!1,vn=!0),i.memoizedState=c):(cr(c,o)||(c=k_(),Tt.lanes|=c,ys|=c,i.baseState=!0),o)}function g7(i,o){var c=it;it=c!==0&&4>c?c:4,i(!0);var h=fm.transition;fm.transition={};try{i(!1),o()}finally{it=c,fm.transition=h}}function ew(){return Wn().memoizedState}function E7(i,o,c){var h=Ii(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},tw(i))nw(o,c);else if(c=Px(i,o,c,h),c!==null){var E=fn();mr(c,i,h,E),rw(c,o,h)}}function y7(i,o,c){var h=Ii(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(tw(i))nw(o,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var w=o.lastRenderedState,M=b(w,c);if(E.hasEagerState=!0,E.eagerState=M,cr(M,w)){var z=o.interleaved;z===null?(E.next=E,om(o)):(E.next=z.next,z.next=E),o.interleaved=E;return}}catch(Z){}c=Px(i,o,E,h),c!==null&&(E=fn(),mr(c,i,h,E),rw(c,o,h))}}function tw(i){var o=i.alternate;return i===Tt||o!==null&&o===Tt}function nw(i,o){iu=Dc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function rw(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,_p(i,c)}}var Bc={readContext:Yn,useCallback:rn,useContext:rn,useEffect:rn,useImperativeHandle:rn,useInsertionEffect:rn,useLayoutEffect:rn,useMemo:rn,useReducer:rn,useRef:rn,useState:rn,useDebugValue:rn,useDeferredValue:rn,useTransition:rn,useMutableSource:rn,useSyncExternalStore:rn,useId:rn,unstable_isNewReconciler:!1},T7={readContext:Yn,useCallback:function(i,o){return Dr().memoizedState=[i,o===void 0?null:o],i},useContext:Yn,useEffect:Yx,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,Mc(4194308,4,Xx.bind(null,o,i),c)},useLayoutEffect:function(i,o){return Mc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Mc(4,2,i,o)},useMemo:function(i,o){var c=Dr();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=Dr();return o=c!==void 0?c(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=E7.bind(null,Tt,i),[h.memoizedState,i]},useRef:function(i){var o=Dr();return i={current:i},o.memoizedState=i},useState:Vx,useDebugValue:Tm,useDeferredValue:function(i){return Dr().memoizedState=i},useTransition:function(){var i=Vx(!1),o=i[0];return i=g7.bind(null,i[1]),Dr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=Tt,E=Dr();if(Et){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),jt===null)throw Error(n(349));(Es&30)!==0||Ux(h,o,c)}E.memoizedState=c;var b={value:c,getSnapshot:o};return E.queue=b,Yx(jx.bind(null,h,b,i),[i]),h.flags|=2048,au(9,Hx.bind(null,h,b,c,o),void 0,null),c},useId:function(){var i=Dr(),o=jt.identifierPrefix;if(Et){var c=Xr,h=Gr;c=(h&~(1<<32-lr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=su++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=m7++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},b7={readContext:Yn,useCallback:Qx,useContext:Yn,useEffect:ym,useImperativeHandle:Kx,useInsertionEffect:Wx,useLayoutEffect:Gx,useMemo:Jx,useReducer:gm,useRef:qx,useState:function(){return gm(ou)},useDebugValue:Tm,useDeferredValue:function(i){var o=Wn();return Zx(o,Lt.memoizedState,i)},useTransition:function(){var i=gm(ou)[0],o=Wn().memoizedState;return[i,o]},useMutableSource:Fx,useSyncExternalStore:Bx,useId:ew,unstable_isNewReconciler:!1},_7={readContext:Yn,useCallback:Qx,useContext:Yn,useEffect:ym,useImperativeHandle:Kx,useInsertionEffect:Wx,useLayoutEffect:Gx,useMemo:Jx,useReducer:Em,useRef:qx,useState:function(){return Em(ou)},useDebugValue:Tm,useDeferredValue:function(i){var o=Wn();return Lt===null?o.memoizedState=i:Zx(o,Lt.memoizedState,i)},useTransition:function(){var i=Em(ou)[0],o=Wn().memoizedState;return[i,o]},useMutableSource:Fx,useSyncExternalStore:Bx,useId:ew,unstable_isNewReconciler:!1};function fr(i,o){if(i&&i.defaultProps){o=N({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function bm(i,o,c,h){o=i.memoizedState,c=c(h,o),c=c==null?o:N({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Uc={isMounted:function(i){return(i=i._reactInternals)?cs(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=fn(),E=Ii(i),b=Qr(h,E);b.payload=o,c!=null&&(b.callback=c),o=Ni(i,b,E),o!==null&&(mr(o,i,E,h),Ic(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=fn(),E=Ii(i),b=Qr(h,E);b.tag=1,b.payload=o,c!=null&&(b.callback=c),o=Ni(i,b,E),o!==null&&(mr(o,i,E,h),Ic(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=fn(),h=Ii(i),E=Qr(c,h);E.tag=2,o!=null&&(E.callback=o),o=Ni(i,E,h),o!==null&&(mr(o,i,h,c),Ic(o,i,h))}};function iw(i,o,c,h,E,b,w){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,w):o.prototype&&o.prototype.isPureReactComponent?!Wa(c,h)||!Wa(E,b):!0}function sw(i,o,c){var h=!1,E=Si,b=o.contextType;return typeof b=="object"&&b!==null?b=Yn(b):(E=Sn(o)?fs:nn.current,h=o.contextTypes,b=(h=h!=null)?wo(i,E):Si),o=new o(c,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Uc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function ow(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&&Uc.enqueueReplaceState(o,o.state,null)}function _m(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},am(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=Yn(b):(b=Sn(o)?fs:nn.current,E.context=wo(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(bm(i,o,b,c),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&Uc.enqueueReplaceState(E,E.state,null),Pc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Io(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 xm(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function wm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var cB=typeof WeakMap=="function"?WeakMap:Map;function sw(i,o,l){l=Qr(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){Wc||(Wc=!0,Bm=h),wm(i,o)},l}function ow(i,o,l){l=Qr(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;l.payload=function(){return h(E)},l.callback=function(){wm(i,o)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){wm(i,o),typeof h!="function"&&(ki===null?ki=new Set([this]):ki.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})}),l}function aw(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new cB;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(l)||(E.add(l),i=SB.bind(null,i,o,l),o.then(i,i))}function uw(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 lw(i,o,l,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=Qr(-1,1),o.tag=2,Ni(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var dB=$.ReactCurrentOwner,wn=!1;function un(i,o,l,h){o.child=i===null?kx(o,null,l,h):No(o,i.child,l,h)}function cw(i,o,l,h,E){l=l.render;var b=o.ref;return ko(o,E),h=pm(i,o,l,h,b,E),l=mm(),i!==null&&!wn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Jr(i,o,E)):(mt&&l&&Qp(o),o.flags|=1,un(i,o,h,E),o.child)}function dw(i,o,l,h,E){if(i===null){var b=l.type;return typeof b=="function"&&!qm(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=b,fw(i,o,b,h,E)):(i=Zc(l.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 S=b.memoizedProps;if(l=l.compare,l=l!==null?l:Xa,l(S,h)&&i.ref===o.ref)return Jr(i,o,E)}return o.flags|=1,i=Ri(b,h),i.ref=o.ref,i.return=o,o.child=i}function fw(i,o,l,h,E){if(i!==null){var b=i.memoizedProps;if(Xa(b,h)&&i.ref===o.ref)if(wn=!1,o.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(wn=!0);else return o.lanes=i.lanes,Jr(i,o,E)}return Sm(i,o,l,h,E)}function hw(i,o,l){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},ut(Ro,Mn),Mn|=l;else{if((l&1073741824)===0)return i=b!==null?b.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,ut(Ro,Mn),Mn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:l,ut(Ro,Mn),Mn|=h}else b!==null?(h=b.baseLanes|l,o.memoizedState=null):h=l,ut(Ro,Mn),Mn|=h;return un(i,o,E,l),o.child}function pw(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Sm(i,o,l,h,E){var b=xn(l)?fs:Zt.current;return b=wo(o,b),ko(o,E),l=pm(i,o,l,h,b,E),h=mm(),i!==null&&!wn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Jr(i,o,E)):(mt&&h&&Qp(o),o.flags|=1,un(i,o,l,E),o.child)}function mw(i,o,l,h,E){if(xn(l)){var b=!0;Sc(o)}else b=!1;if(ko(o,E),o.stateNode===null)zc(i,o),rw(o,l,h),_m(o,l,h,E),h=!0;else if(i===null){var S=o.stateNode,M=o.memoizedProps;S.props=M;var j=S.context,te=l.contextType;typeof te=="object"&&te!==null?te=qn(te):(te=xn(l)?fs:Zt.current,te=wo(o,te));var fe=l.getDerivedStateFromProps,ge=typeof fe=="function"||typeof S.getSnapshotBeforeUpdate=="function";ge||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(M!==h||j!==te)&&iw(o,S,h,te),Ai=!1;var le=o.memoizedState;S.state=le,Rc(o,h,S,E),j=o.memoizedState,M!==h||le!==j||_n.current||Ai?(typeof fe=="function"&&(bm(o,l,fe,h),j=o.memoizedState),(M=Ai||nw(o,l,M,h,le,j,te))?(ge||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=j),S.props=h,S.state=j,S.context=te,h=M):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{S=o.stateNode,Ix(i,o),M=o.memoizedProps,te=o.type===o.elementType?M:cr(o.type,M),S.props=te,ge=o.pendingProps,le=S.context,j=l.contextType,typeof j=="object"&&j!==null?j=qn(j):(j=xn(l)?fs:Zt.current,j=wo(o,j));var Se=l.getDerivedStateFromProps;(fe=typeof Se=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(M!==ge||le!==j)&&iw(o,S,h,j),Ai=!1,le=o.memoizedState,S.state=le,Rc(o,h,S,E);var Ae=o.memoizedState;M!==ge||le!==Ae||_n.current||Ai?(typeof Se=="function"&&(bm(o,l,Se,h),Ae=o.memoizedState),(te=Ai||nw(o,l,te,h,le,Ae,j)||!1)?(fe||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Ae,j),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Ae,j)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||M===i.memoizedProps&&le===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&le===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Ae),S.props=h,S.state=Ae,S.context=j,h=te):(typeof S.componentDidUpdate!="function"||M===i.memoizedProps&&le===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&le===i.memoizedState||(o.flags|=1024),h=!1)}return vm(i,o,l,h,b,E)}function vm(i,o,l,h,E,b){pw(i,o);var S=(o.flags&128)!==0;if(!h&&!S)return E&&bx(o,l,!1),Jr(i,o,b);h=o.stateNode,dB.current=o;var M=S&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&S?(o.child=No(o,i.child,null,b),o.child=No(o,null,M,b)):un(i,o,M,b),o.memoizedState=h.state,E&&bx(o,l,!0),o.child}function gw(i){var o=i.stateNode;o.pendingContext?yx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&yx(i,o.context,!1),um(i,o.containerInfo)}function Ew(i,o,l,h,E){return Ao(),tm(E),o.flags|=256,un(i,o,l,h),o.child}var Am={dehydrated:null,treeContext:null,retryLane:0};function Nm(i){return{baseLanes:i,cachePool:null,transitions:null}}function yw(i,o,l){var h=o.pendingProps,E=gt.current,b=!1,S=(o.flags&128)!==0,M;if((M=S)||(M=i!==null&&i.memoizedState===null?!1:(E&2)!==0),M?(b=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),ut(gt,E&1),i===null)return em(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(S=h.children,i=h.fallback,b?(h=o.mode,b=o.child,S={mode:"hidden",children:S},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=S):b=ed(S,h,0,null),i=xs(i,h,l,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=Nm(l),o.memoizedState=Am,i):Cm(o,S));if(E=i.memoizedState,E!==null&&(M=E.dehydrated,M!==null))return fB(i,o,S,h,M,E,l);if(b){b=h.fallback,S=o.mode,E=i.child,M=E.sibling;var j={mode:"hidden",children:h.children};return(S&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=j,o.deletions=null):(h=Ri(E,j),h.subtreeFlags=E.subtreeFlags&14680064),M!==null?b=Ri(M,b):(b=xs(b,S,l,null),b.flags|=2),b.return=o,h.return=o,h.sibling=b,o.child=h,h=b,b=o.child,S=i.child.memoizedState,S=S===null?Nm(l):{baseLanes:S.baseLanes|l,cachePool:null,transitions:S.transitions},b.memoizedState=S,b.childLanes=i.childLanes&~l,o.memoizedState=Am,h}return b=i.child,i=b.sibling,h=Ri(b,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=l),h.return=o,h.sibling=null,i!==null&&(l=o.deletions,l===null?(o.deletions=[i],o.flags|=16):l.push(i)),o.child=h,o.memoizedState=null,h}function Cm(i,o){return o=ed({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function jc(i,o,l,h){return h!==null&&tm(h),No(o,i.child,null,l),i=Cm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function fB(i,o,l,h,E,b,S){if(l)return o.flags&256?(o.flags&=-257,h=xm(Error(n(422))),jc(i,o,S,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(b=h.fallback,E=o.mode,h=ed({mode:"visible",children:h.children},E,0,null),b=xs(b,E,S,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&No(o,i.child,null,S),o.child.memoizedState=Nm(S),o.memoizedState=Am,b);if((o.mode&1)===0)return jc(i,o,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var M=h.dgst;return h=M,b=Error(n(419)),h=xm(b,h,void 0),jc(i,o,S,h)}if(M=(S&i.childLanes)!==0,wn||M){if(h=Ut,h!==null){switch(S&-S){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|S))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,Kr(i,E),hr(h,i,E,-1))}return Vm(),h=xm(Error(n(421))),jc(i,o,S,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=vB.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Dn=xi(E.nextSibling),Ln=o,mt=!0,lr=null,i!==null&&($n[Vn++]=Gr,$n[Vn++]=Xr,$n[Vn++]=hs,Gr=i.id,Xr=i.overflow,hs=o),o=Cm(o,h.children),o.flags|=4096,o)}function Tw(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),sm(i.return,o,l)}function km(i,o,l,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(b.isBackwards=o,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=l,b.tailMode=E)}function bw(i,o,l){var h=o.pendingProps,E=h.revealOrder,b=h.tail;if(un(i,o,h.children,l),h=gt.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&&Tw(i,l,o);else if(i.tag===19)Tw(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(ut(gt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(l=o.child,E=null;l!==null;)i=l.alternate,i!==null&&Lc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),km(o,!1,E,l,b);break;case"backwards":for(l=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Lc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}km(o,!0,l,null,b);break;case"together":km(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function zc(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function Jr(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),ys|=o.lanes,(l&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,l=Ri(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=Ri(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function hB(i,o,l){switch(o.tag){case 3:gw(o),Ao();break;case 5:Lx(o);break;case 1:xn(o.type)&&Sc(o);break;case 4:um(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;ut(Oc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(ut(gt,gt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?yw(i,o,l):(ut(gt,gt.current&1),i=Jr(i,o,l),i!==null?i.sibling:null);ut(gt,gt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return bw(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ut(gt,gt.current),h)break;return null;case 22:case 23:return o.lanes=0,hw(i,o,l)}return Jr(i,o,l)}var _w,Om,xw,ww;_w=function(i,o){for(var l=o.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Om=function(){},xw=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,gs(Pr.current);var b=null;switch(l){case"input":E=Vr(i,E),h=Vr(i,h),b=[];break;case"select":E=w({},E,{value:void 0}),h=w({},h,{value:void 0}),b=[];break;case"textarea":E=or(i,E),h=or(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=_c)}Vt(l,h);var S;l=null;for(te in E)if(!h.hasOwnProperty(te)&&E.hasOwnProperty(te)&&E[te]!=null)if(te==="style"){var M=E[te];for(S in M)M.hasOwnProperty(S)&&(l||(l={}),l[S]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(s.hasOwnProperty(te)?b||(b=[]):(b=b||[]).push(te,null));for(te in h){var j=h[te];if(M=E!=null?E[te]:void 0,h.hasOwnProperty(te)&&j!==M&&(j!=null||M!=null))if(te==="style")if(M){for(S in M)!M.hasOwnProperty(S)||j&&j.hasOwnProperty(S)||(l||(l={}),l[S]="");for(S in j)j.hasOwnProperty(S)&&M[S]!==j[S]&&(l||(l={}),l[S]=j[S])}else l||(b||(b=[]),b.push(te,l)),l=j;else te==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,M=M?M.__html:void 0,j!=null&&M!==j&&(b=b||[]).push(te,j)):te==="children"?typeof j!="string"&&typeof j!="number"||(b=b||[]).push(te,""+j):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(s.hasOwnProperty(te)?(j!=null&&te==="onScroll"&&dt("scroll",i),b||M===j||(b=[])):(b=b||[]).push(te,j))}l&&(b=b||[]).push("style",l);var te=b;(o.updateQueue=te)&&(o.flags|=4)}},ww=function(i,o,l,h){l!==h&&(o.flags|=4)};function cu(i,o){if(!mt)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function tn(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(o)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=l,o}function pB(i,o,l){var h=o.pendingProps;switch(Jp(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tn(o),null;case 1:return xn(o.type)&&wc(),tn(o),null;case 3:return h=o.stateNode,Oo(),ft(_n),ft(Zt),dm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Cc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,lr!==null&&(jm(lr),lr=null))),Om(i,o),tn(o),null;case 5:lm(o);var E=gs(su.current);if(l=o.type,i!==null&&o.stateNode!=null)xw(i,o,l,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return tn(o),null}if(i=gs(Pr.current),Cc(o)){h=o.stateNode,l=o.type;var b=o.memoizedProps;switch(h[Ir]=o,h[eu]=b,i=(o.mode&1)!==0,l){case"dialog":dt("cancel",h),dt("close",h);break;case"iframe":case"object":case"embed":dt("load",h);break;case"video":case"audio":for(E=0;E<Qa.length;E++)dt(Qa[E],h);break;case"source":dt("error",h);break;case"img":case"image":case"link":dt("error",h),dt("load",h);break;case"details":dt("toggle",h);break;case"input":an(h,b),dt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},dt("invalid",h);break;case"textarea":Ql(h,b),dt("invalid",h)}Vt(l,b),E=null;for(var S in b)if(b.hasOwnProperty(S)){var M=b[S];S==="children"?typeof M=="string"?h.textContent!==M&&(b.suppressHydrationWarning!==!0&&bc(h.textContent,M,i),E=["children",M]):typeof M=="number"&&h.textContent!==""+M&&(b.suppressHydrationWarning!==!0&&bc(h.textContent,M,i),E=["children",""+M]):s.hasOwnProperty(S)&&M!=null&&S==="onScroll"&&dt("scroll",h)}switch(l){case"input":jn(h),In(h,b,!0);break;case"textarea":jn(h),Zl(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=_c)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=re(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(l,{is:h.is}):(i=S.createElement(l),l==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,l),i[Ir]=o,i[eu]=h,_w(i,o,!1,!1),o.stateNode=i;e:{switch(S=kr(l,h),l){case"dialog":dt("cancel",i),dt("close",i),E=h;break;case"iframe":case"object":case"embed":dt("load",i),E=h;break;case"video":case"audio":for(E=0;E<Qa.length;E++)dt(Qa[E],i);E=h;break;case"source":dt("error",i),E=h;break;case"img":case"image":case"link":dt("error",i),dt("load",i),E=h;break;case"details":dt("toggle",i),E=h;break;case"input":an(i,h),E=Vr(i,h),dt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=w({},h,{value:void 0}),dt("invalid",i);break;case"textarea":Ql(i,h),E=or(i,h),dt("invalid",i);break;default:E=h}Vt(l,E),M=E;for(b in M)if(M.hasOwnProperty(b)){var j=M[b];b==="style"?mi(i,j):b==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,j!=null&&qe(i,j)):b==="children"?typeof j=="string"?(l!=="textarea"||j!=="")&&Qe(i,j):typeof j=="number"&&Qe(i,""+j):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?j!=null&&b==="onScroll"&&dt("scroll",i):j!=null&&R(i,b,j,S))}switch(l){case"input":jn(i),In(i,h,!1);break;case"textarea":jn(i),Zl(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Be(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?Cr(i,!!h.multiple,b,!1):h.defaultValue!=null&&Cr(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=_c)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return tn(o),null;case 6:if(i&&o.stateNode!=null)ww(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=gs(su.current),gs(Pr.current),Cc(o)){if(h=o.stateNode,l=o.memoizedProps,h[Ir]=o,(b=h.nodeValue!==l)&&(i=Ln,i!==null))switch(i.tag){case 3:bc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&bc(h.nodeValue,l,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Ir]=o,o.stateNode=h}return tn(o),null;case 13:if(ft(gt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(mt&&Dn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)Ax(),Ao(),o.flags|=98560,b=!1;else if(b=Cc(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[Ir]=o}else Ao(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;tn(o),b=!1}else lr!==null&&(jm(lr),lr=null),b=!0;if(!b)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=l,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(gt.current&1)!==0?Rt===0&&(Rt=3):Vm())),o.updateQueue!==null&&(o.flags|=4),tn(o),null);case 4:return Oo(),Om(i,o),i===null&&Ja(o.stateNode.containerInfo),tn(o),null;case 10:return im(o.type._context),tn(o),null;case 17:return xn(o.type)&&wc(),tn(o),null;case 19:if(ft(gt),b=o.memoizedState,b===null)return tn(o),null;if(h=(o.flags&128)!==0,S=b.rendering,S===null)if(h)cu(b,!1);else{if(Rt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(S=Lc(i),S!==null){for(o.flags|=128,cu(b,!1),h=S.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=l,l=o.child;l!==null;)b=l,i=h,b.flags&=14680066,S=b.alternate,S===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=S.childLanes,b.lanes=S.lanes,b.child=S.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=S.memoizedProps,b.memoizedState=S.memoizedState,b.updateQueue=S.updateQueue,b.type=S.type,i=S.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return ut(gt,gt.current&1|2),o.child}i=i.sibling}b.tail!==null&&wt()>Lo&&(o.flags|=128,h=!0,cu(b,!1),o.lanes=4194304)}else{if(!h)if(i=Lc(S),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),cu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!mt)return tn(o),null}else 2*wt()-b.renderingStartTime>Lo&&l!==1073741824&&(o.flags|=128,h=!0,cu(b,!1),o.lanes=4194304);b.isBackwards?(S.sibling=o.child,o.child=S):(l=b.last,l!==null?l.sibling=S:o.child=S,b.last=S)}return b.tail!==null?(o=b.tail,b.rendering=o,b.tail=o.sibling,b.renderingStartTime=wt(),o.sibling=null,l=gt.current,ut(gt,h?l&1|2:l&1),o):(tn(o),null);case 22:case 23:return $m(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Mn&1073741824)!==0&&(tn(o),o.subtreeFlags&6&&(o.flags|=8192)):tn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function mB(i,o){switch(Jp(o),o.tag){case 1:return xn(o.type)&&wc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Oo(),ft(_n),ft(Zt),dm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return lm(o),null;case 13:if(ft(gt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ao()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return ft(gt),null;case 4:return Oo(),null;case 10:return im(o.type._context),null;case 22:case 23:return $m(),null;case 24:return null;default:return null}}var $c=!1,nn=!1,gB=typeof WeakSet=="function"?WeakSet:Set,ve=null;function Po(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){bt(i,o,h)}else l.current=null}function Im(i,o,l){try{l()}catch(h){bt(i,o,h)}}var Sw=!1;function EB(i,o){if($p=lc,i=nx(),Dp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var E=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{l.nodeType,b.nodeType}catch(Te){l=null;break e}var S=0,M=-1,j=-1,te=0,fe=0,ge=i,le=null;t:for(;;){for(var Se;ge!==l||E!==0&&ge.nodeType!==3||(M=S+E),ge!==b||h!==0&&ge.nodeType!==3||(j=S+h),ge.nodeType===3&&(S+=ge.nodeValue.length),(Se=ge.firstChild)!==null;)le=ge,ge=Se;for(;;){if(ge===i)break t;if(le===l&&++te===E&&(M=S),le===b&&++fe===h&&(j=S),(Se=ge.nextSibling)!==null)break;ge=le,le=ge.parentNode}ge=Se}l=M===-1||j===-1?null:{start:M,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for(Vp={focusedElem:i,selectionRange:l},lc=!1,ve=o;ve!==null;)if(o=ve,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,ve=i;else for(;ve!==null;){o=ve;try{var Ae=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var Ne=Ae.memoizedProps,St=Ae.memoizedState,X=o.stateNode,Y=X.getSnapshotBeforeUpdate(o.elementType===o.type?Ne:cr(o.type,Ne),St);X.__reactInternalSnapshotBeforeUpdate=Y}break;case 3:var Q=o.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Te){bt(o,o.return,Te)}if(i=o.sibling,i!==null){i.return=o.return,ve=i;break}ve=o.return}return Ae=Sw,Sw=!1,Ae}function du(i,o,l){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var b=E.destroy;E.destroy=void 0,b!==void 0&&Im(o,l,b)}E=E.next}while(E!==h)}}function Vc(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==o)}}function Pm(i){var o=i.ref;if(o!==null){var l=i.stateNode;i.tag,i=l,typeof o=="function"?o(i):o.current=i}}function vw(i){var o=i.alternate;o!==null&&(i.alternate=null,vw(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Ir],delete o[eu],delete o[Gp],delete o[ZF],delete o[eB])),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 Aw(i){return i.tag===5||i.tag===3||i.tag===4}function Nw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Aw(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Rm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.nodeType===8?l.parentNode.insertBefore(i,o):l.insertBefore(i,o):(l.nodeType===8?(o=l.parentNode,o.insertBefore(i,l)):(o=l,o.appendChild(i)),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=_c));else if(h!==4&&(i=i.child,i!==null))for(Rm(i,o,l),i=i.sibling;i!==null;)Rm(i,o,l),i=i.sibling}function Lm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Lm(i,o,l),i=i.sibling;i!==null;)Lm(i,o,l),i=i.sibling}var qt=null,dr=!1;function Ci(i,o,l){for(l=l.child;l!==null;)Cw(i,o,l),l=l.sibling}function Cw(i,o,l){if(Or&&typeof Or.onCommitFiberUnmount=="function")try{Or.onCommitFiberUnmount(rc,l)}catch(M){}switch(l.tag){case 5:nn||Po(l,o);case 6:var h=qt,E=dr;qt=null,Ci(i,o,l),qt=h,dr=E,qt!==null&&(dr?(i=qt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):qt.removeChild(l.stateNode));break;case 18:qt!==null&&(dr?(i=qt,l=l.stateNode,i.nodeType===8?Wp(i.parentNode,l):i.nodeType===1&&Wp(i,l),$a(i)):Wp(qt,l.stateNode));break;case 4:h=qt,E=dr,qt=l.stateNode.containerInfo,dr=!0,Ci(i,o,l),qt=h,dr=E;break;case 0:case 11:case 14:case 15:if(!nn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,S=b.destroy;b=b.tag,S!==void 0&&((b&2)!==0||(b&4)!==0)&&Im(l,o,S),E=E.next}while(E!==h)}Ci(i,o,l);break;case 1:if(!nn&&(Po(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(M){bt(l,o,M)}Ci(i,o,l);break;case 21:Ci(i,o,l);break;case 22:l.mode&1?(nn=(h=nn)||l.memoizedState!==null,Ci(i,o,l),nn=h):Ci(i,o,l);break;default:Ci(i,o,l)}}function kw(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new gB),o.forEach(function(h){var E=AB.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function fr(i,o){var l=o.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var b=i,S=o,M=S;e:for(;M!==null;){switch(M.tag){case 5:qt=M.stateNode,dr=!1;break e;case 3:qt=M.stateNode.containerInfo,dr=!0;break e;case 4:qt=M.stateNode.containerInfo,dr=!0;break e}M=M.return}if(qt===null)throw Error(n(160));Cw(b,S,E),qt=null,dr=!1;var j=E.alternate;j!==null&&(j.return=null),E.return=null}catch(te){bt(E,o,te)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Ow(o,i),o=o.sibling}function Ow(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(fr(o,i),Lr(i),h&4){try{du(3,i,i.return),Vc(3,i)}catch(Ne){bt(i,i.return,Ne)}try{du(5,i,i.return)}catch(Ne){bt(i,i.return,Ne)}}break;case 1:fr(o,i),Lr(i),h&512&&l!==null&&Po(l,l.return);break;case 5:if(fr(o,i),Lr(i),h&512&&l!==null&&Po(l,l.return),i.flags&32){var E=i.stateNode;try{Qe(E,"")}catch(Ne){bt(i,i.return,Ne)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,S=l!==null?l.memoizedProps:b,M=i.type,j=i.updateQueue;if(i.updateQueue=null,j!==null)try{M==="input"&&b.type==="radio"&&b.name!=null&&Ue(E,b),kr(M,S);var te=kr(M,b);for(S=0;S<j.length;S+=2){var fe=j[S],ge=j[S+1];fe==="style"?mi(E,ge):fe==="dangerouslySetInnerHTML"?qe(E,ge):fe==="children"?Qe(E,ge):R(E,fe,ge,te)}switch(M){case"input":Ct(E,b);break;case"textarea":Jl(E,b);break;case"select":var le=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var Se=b.value;Se!=null?Cr(E,!!b.multiple,Se,!1):le!==!!b.multiple&&(b.defaultValue!=null?Cr(E,!!b.multiple,b.defaultValue,!0):Cr(E,!!b.multiple,b.multiple?[]:"",!1))}E[eu]=b}catch(Ne){bt(i,i.return,Ne)}}break;case 6:if(fr(o,i),Lr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Ne){bt(i,i.return,Ne)}}break;case 3:if(fr(o,i),Lr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{$a(o.containerInfo)}catch(Ne){bt(i,i.return,Ne)}break;case 4:fr(o,i),Lr(i);break;case 13:fr(o,i),Lr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(Fm=wt())),h&4&&kw(i);break;case 22:if(fe=l!==null&&l.memoizedState!==null,i.mode&1?(nn=(te=nn)||fe,fr(o,i),nn=te):fr(o,i),Lr(i),h&8192){if(te=i.memoizedState!==null,(i.stateNode.isHidden=te)&&!fe&&(i.mode&1)!==0)for(ve=i,fe=i.child;fe!==null;){for(ge=ve=fe;ve!==null;){switch(le=ve,Se=le.child,le.tag){case 0:case 11:case 14:case 15:du(4,le,le.return);break;case 1:Po(le,le.return);var Ae=le.stateNode;if(typeof Ae.componentWillUnmount=="function"){h=le,l=le.return;try{o=h,Ae.props=o.memoizedProps,Ae.state=o.memoizedState,Ae.componentWillUnmount()}catch(Ne){bt(h,l,Ne)}}break;case 5:Po(le,le.return);break;case 22:if(le.memoizedState!==null){Rw(ge);continue}}Se!==null?(Se.return=le,ve=Se):Rw(ge)}fe=fe.sibling}e:for(fe=null,ge=i;;){if(ge.tag===5){if(fe===null){fe=ge;try{E=ge.stateNode,te?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(M=ge.stateNode,j=ge.memoizedProps.style,S=j!=null&&j.hasOwnProperty("display")?j.display:null,M.style.display=zn("display",S))}catch(Ne){bt(i,i.return,Ne)}}}else if(ge.tag===6){if(fe===null)try{ge.stateNode.nodeValue=te?"":ge.memoizedProps}catch(Ne){bt(i,i.return,Ne)}}else if((ge.tag!==22&&ge.tag!==23||ge.memoizedState===null||ge===i)&&ge.child!==null){ge.child.return=ge,ge=ge.child;continue}if(ge===i)break e;for(;ge.sibling===null;){if(ge.return===null||ge.return===i)break e;fe===ge&&(fe=null),ge=ge.return}fe===ge&&(fe=null),ge.sibling.return=ge.return,ge=ge.sibling}}break;case 19:fr(o,i),Lr(i),h&4&&kw(i);break;case 21:break;default:fr(o,i),Lr(i)}}function Lr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(Aw(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Qe(E,""),h.flags&=-33);var b=Nw(i);Lm(i,b,E);break;case 3:case 4:var S=h.stateNode.containerInfo,M=Nw(i);Rm(i,M,S);break;default:throw Error(n(161))}}catch(j){bt(i,i.return,j)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function yB(i,o,l){ve=i,Iw(i)}function Iw(i,o,l){for(var h=(i.mode&1)!==0;ve!==null;){var E=ve,b=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||$c;if(!S){var M=E.alternate,j=M!==null&&M.memoizedState!==null||nn;M=$c;var te=nn;if($c=S,(nn=j)&&!te)for(ve=E;ve!==null;)S=ve,j=S.child,S.tag===22&&S.memoizedState!==null?Lw(E):j!==null?(j.return=S,ve=j):Lw(E);for(;b!==null;)ve=b,Iw(b),b=b.sibling;ve=E,$c=M,nn=te}Pw(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,ve=b):Pw(i)}}function Pw(i){for(;ve!==null;){var o=ve;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:nn||Vc(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!nn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:cr(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&Rx(o,b,h);break;case 3:var S=o.updateQueue;if(S!==null){if(l=null,o.child!==null)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}Rx(o,S,l)}break;case 5:var M=o.stateNode;if(l===null&&o.flags&4){l=M;var j=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":j.autoFocus&&l.focus();break;case"img":j.src&&(l.src=j.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var te=o.alternate;if(te!==null){var fe=te.memoizedState;if(fe!==null){var ge=fe.dehydrated;ge!==null&&$a(ge)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}nn||o.flags&512&&Pm(o)}catch(le){bt(o,o.return,le)}}if(o===i){ve=null;break}if(l=o.sibling,l!==null){l.return=o.return,ve=l;break}ve=o.return}}function Rw(i){for(;ve!==null;){var o=ve;if(o===i){ve=null;break}var l=o.sibling;if(l!==null){l.return=o.return,ve=l;break}ve=o.return}}function Lw(i){for(;ve!==null;){var o=ve;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{Vc(4,o)}catch(j){bt(o,l,j)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(j){bt(o,E,j)}}var b=o.return;try{Pm(o)}catch(j){bt(o,b,j)}break;case 5:var S=o.return;try{Pm(o)}catch(j){bt(o,S,j)}}}catch(j){bt(o,o.return,j)}if(o===i){ve=null;break}var M=o.sibling;if(M!==null){M.return=o.return,ve=M;break}ve=o.return}}var TB=Math.ceil,qc=$.ReactCurrentDispatcher,Dm=$.ReactCurrentOwner,Wn=$.ReactCurrentBatchConfig,Je=0,Ut=null,kt=null,Yt=0,Mn=0,Ro=wi(0),Rt=0,fu=null,ys=0,Yc=0,Mm=0,hu=null,Sn=null,Fm=0,Lo=1/0,Zr=null,Wc=!1,Bm=null,ki=null,Gc=!1,Oi=null,Xc=0,pu=0,Um=null,Kc=-1,Qc=0;function ln(){return(Je&6)!==0?wt():Kc!==-1?Kc:Kc=wt()}function Ii(i){return(i.mode&1)===0?1:(Je&2)!==0&&Yt!==0?Yt&-Yt:nB.transition!==null?(Qc===0&&(Qc=N_()),Qc):(i=nt,i!==0||(i=window.event,i=i===void 0?16:M_(i.type)),i)}function hr(i,o,l,h){if(50<pu)throw pu=0,Um=null,Error(n(185));Ba(i,l,h),((Je&2)===0||i!==Ut)&&(i===Ut&&((Je&2)===0&&(Yc|=l),Rt===4&&Pi(i,Yt)),vn(i,h),l===1&&Je===0&&(o.mode&1)===0&&(Lo=wt()+500,vc&&vi()))}function vn(i,o){var l=i.callbackNode;nF(i,o);var h=oc(i,i===Ut?Yt:0);if(h===0)l!==null&&S_(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&S_(l),o===1)i.tag===0?tB(Mw.bind(null,i)):_x(Mw.bind(null,i)),QF(function(){(Je&6)===0&&vi()}),l=null;else{switch(C_(h)){case 1:l=yp;break;case 4:l=v_;break;case 16:l=nc;break;case 536870912:l=A_;break;default:l=nc}l=Vw(l,Dw.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function Dw(i,o){if(Kc=-1,Qc=0,(Je&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Do()&&i.callbackNode!==l)return null;var h=oc(i,i===Ut?Yt:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=Jc(i,h);else{o=h;var E=Je;Je|=2;var b=Bw();(Ut!==i||Yt!==o)&&(Zr=null,Lo=wt()+500,bs(i,o));do try{xB();break}catch(M){Fw(i,M)}while(!0);rm(),qc.current=b,Je=E,kt!==null?o=0:(Ut=null,Yt=0,o=Rt)}if(o!==0){if(o===2&&(E=Tp(i),E!==0&&(h=E,o=Hm(i,E))),o===1)throw l=fu,bs(i,0),Pi(i,h),vn(i,wt()),l;if(o===6)Pi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!bB(E)&&(o=Jc(i,h),o===2&&(b=Tp(i),b!==0&&(h=b,o=Hm(i,b))),o===1))throw l=fu,bs(i,0),Pi(i,h),vn(i,wt()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:_s(i,Sn,Zr);break;case 3:if(Pi(i,h),(h&130023424)===h&&(o=Fm+500-wt(),10<o)){if(oc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){ln(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Yp(_s.bind(null,i,Sn,Zr),o);break}_s(i,Sn,Zr);break;case 4:if(Pi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var S=31-ar(h);b=1<<S,S=o[S],S>E&&(E=S),h&=~b}if(h=E,h=wt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*TB(h/1960))-h,10<h){i.timeoutHandle=Yp(_s.bind(null,i,Sn,Zr),h);break}_s(i,Sn,Zr);break;case 5:_s(i,Sn,Zr);break;default:throw Error(n(329))}}}return vn(i,wt()),i.callbackNode===l?Dw.bind(null,i):null}function Hm(i,o){var l=hu;return i.current.memoizedState.isDehydrated&&(bs(i,o).flags|=256),i=Jc(i,o),i!==2&&(o=Sn,Sn=l,o!==null&&jm(o)),i}function jm(i){Sn===null?Sn=i:Sn.push.apply(Sn,i)}function bB(i){for(var o=i;;){if(o.flags&16384){var l=o.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var E=l[h],b=E.getSnapshot;E=E.value;try{if(!ur(b(),E))return!1}catch(S){return!1}}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Pi(i,o){for(o&=~Mm,o&=~Yc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-ar(o),h=1<<l;i[l]=-1,o&=~h}}function Mw(i){if((Je&6)!==0)throw Error(n(327));Do();var o=oc(i,0);if((o&1)===0)return vn(i,wt()),null;var l=Jc(i,o);if(i.tag!==0&&l===2){var h=Tp(i);h!==0&&(o=h,l=Hm(i,h))}if(l===1)throw l=fu,bs(i,0),Pi(i,o),vn(i,wt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,_s(i,Sn,Zr),vn(i,wt()),null}function zm(i,o){var l=Je;Je|=1;try{return i(o)}finally{Je=l,Je===0&&(Lo=wt()+500,vc&&vi())}}function Ts(i){Oi!==null&&Oi.tag===0&&(Je&6)===0&&Do();var o=Je;Je|=1;var l=Wn.transition,h=nt;try{if(Wn.transition=null,nt=1,i)return i()}finally{nt=h,Wn.transition=l,Je=o,(Je&6)===0&&vi()}}function $m(){Mn=Ro.current,ft(Ro)}function bs(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,KF(l)),kt!==null)for(l=kt.return;l!==null;){var h=l;switch(Jp(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&wc();break;case 3:Oo(),ft(_n),ft(Zt),dm();break;case 5:lm(h);break;case 4:Oo();break;case 13:ft(gt);break;case 19:ft(gt);break;case 10:im(h.type._context);break;case 22:case 23:$m()}l=l.return}if(Ut=i,kt=i=Ri(i.current,null),Yt=Mn=o,Rt=0,fu=null,Mm=Yc=ys=0,Sn=hu=null,ms!==null){for(o=0;o<ms.length;o++)if(l=ms[o],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,b=l.pending;if(b!==null){var S=b.next;b.next=E,h.next=S}l.pending=h}ms=null}return i}function Fw(i,o){do{var l=kt;try{if(rm(),Dc.current=Uc,Mc){for(var h=Et.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Mc=!1}if(Es=0,Bt=Pt=Et=null,ou=!1,au=0,Dm.current=null,l===null||l.return===null){Rt=1,fu=o,kt=null;break}e:{var b=i,S=l.return,M=l,j=o;if(o=Yt,M.flags|=32768,j!==null&&typeof j=="object"&&typeof j.then=="function"){var te=j,fe=M,ge=fe.tag;if((fe.mode&1)===0&&(ge===0||ge===11||ge===15)){var le=fe.alternate;le?(fe.updateQueue=le.updateQueue,fe.memoizedState=le.memoizedState,fe.lanes=le.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var Se=uw(S);if(Se!==null){Se.flags&=-257,lw(Se,S,M,b,o),Se.mode&1&&aw(b,te,o),o=Se,j=te;var Ae=o.updateQueue;if(Ae===null){var Ne=new Set;Ne.add(j),o.updateQueue=Ne}else Ae.add(j);break e}else{if((o&1)===0){aw(b,te,o),Vm();break e}j=Error(n(426))}}else if(mt&&M.mode&1){var St=uw(S);if(St!==null){(St.flags&65536)===0&&(St.flags|=256),lw(St,S,M,b,o),tm(Io(j,M));break e}}b=j=Io(j,M),Rt!==4&&(Rt=2),hu===null?hu=[b]:hu.push(b),b=S;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var X=sw(b,j,o);Px(b,X);break e;case 1:M=j;var Y=b.type,Q=b.stateNode;if((b.flags&128)===0&&(typeof Y.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(ki===null||!ki.has(Q)))){b.flags|=65536,o&=-o,b.lanes|=o;var Te=ow(b,M,o);Px(b,Te);break e}}b=b.return}while(b!==null)}Hw(l)}catch(Ce){o=Ce,kt===l&&l!==null&&(kt=l=l.return);continue}break}while(!0)}function Bw(){var i=qc.current;return qc.current=Uc,i===null?Uc:i}function Vm(){(Rt===0||Rt===3||Rt===2)&&(Rt=4),Ut===null||(ys&268435455)===0&&(Yc&268435455)===0||Pi(Ut,Yt)}function Jc(i,o){var l=Je;Je|=2;var h=Bw();(Ut!==i||Yt!==o)&&(Zr=null,bs(i,o));do try{_B();break}catch(E){Fw(i,E)}while(!0);if(rm(),Je=l,qc.current=h,kt!==null)throw Error(n(261));return Ut=null,Yt=0,Rt}function _B(){for(;kt!==null;)Uw(kt)}function xB(){for(;kt!==null&&!W9();)Uw(kt)}function Uw(i){var o=$w(i.alternate,i,Mn);i.memoizedProps=i.pendingProps,o===null?Hw(i):kt=o,Dm.current=null}function Hw(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=pB(l,o,Mn),l!==null){kt=l;return}}else{if(l=mB(l,o),l!==null){l.flags&=32767,kt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Rt=6,kt=null;return}}if(o=o.sibling,o!==null){kt=o;return}kt=o=i}while(o!==null);Rt===0&&(Rt=5)}function _s(i,o,l){var h=nt,E=Wn.transition;try{Wn.transition=null,nt=1,wB(i,o,l,h)}finally{Wn.transition=E,nt=h}return null}function wB(i,o,l,h){do Do();while(Oi!==null);if((Je&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=l.lanes|l.childLanes;if(rF(i,b),i===Ut&&(kt=Ut=null,Yt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Gc||(Gc=!0,Vw(nc,function(){return Do(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=Wn.transition,Wn.transition=null;var S=nt;nt=1;var M=Je;Je|=4,Dm.current=null,EB(i,l),Ow(l,i),$F(Vp),lc=!!$p,Vp=$p=null,i.current=l,yB(l),G9(),Je=M,nt=S,Wn.transition=b}else i.current=l;if(Gc&&(Gc=!1,Oi=i,Xc=E),b=i.pendingLanes,b===0&&(ki=null),Q9(l.stateNode),vn(i,wt()),o!==null)for(h=i.onRecoverableError,l=0;l<o.length;l++)E=o[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(Wc)throw Wc=!1,i=Bm,Bm=null,i;return(Xc&1)!==0&&i.tag!==0&&Do(),b=i.pendingLanes,(b&1)!==0?i===Um?pu++:(pu=0,Um=i):pu=0,vi(),null}function Do(){if(Oi!==null){var i=C_(Xc),o=Wn.transition,l=nt;try{if(Wn.transition=null,nt=16>i?16:i,Oi===null)var h=!1;else{if(i=Oi,Oi=null,Xc=0,(Je&6)!==0)throw Error(n(331));var E=Je;for(Je|=4,ve=i.current;ve!==null;){var b=ve,S=b.child;if((ve.flags&16)!==0){var M=b.deletions;if(M!==null){for(var j=0;j<M.length;j++){var te=M[j];for(ve=te;ve!==null;){var fe=ve;switch(fe.tag){case 0:case 11:case 15:du(8,fe,b)}var ge=fe.child;if(ge!==null)ge.return=fe,ve=ge;else for(;ve!==null;){fe=ve;var le=fe.sibling,Se=fe.return;if(vw(fe),fe===te){ve=null;break}if(le!==null){le.return=Se,ve=le;break}ve=Se}}}var Ae=b.alternate;if(Ae!==null){var Ne=Ae.child;if(Ne!==null){Ae.child=null;do{var St=Ne.sibling;Ne.sibling=null,Ne=St}while(Ne!==null)}}ve=b}}if((b.subtreeFlags&2064)!==0&&S!==null)S.return=b,ve=S;else e:for(;ve!==null;){if(b=ve,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:du(9,b,b.return)}var X=b.sibling;if(X!==null){X.return=b.return,ve=X;break e}ve=b.return}}var Y=i.current;for(ve=Y;ve!==null;){S=ve;var Q=S.child;if((S.subtreeFlags&2064)!==0&&Q!==null)Q.return=S,ve=Q;else e:for(S=Y;ve!==null;){if(M=ve,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:Vc(9,M)}}catch(Ce){bt(M,M.return,Ce)}if(M===S){ve=null;break e}var Te=M.sibling;if(Te!==null){Te.return=M.return,ve=Te;break e}ve=M.return}}if(Je=E,vi(),Or&&typeof Or.onPostCommitFiberRoot=="function")try{Or.onPostCommitFiberRoot(rc,i)}catch(Ce){}h=!0}return h}finally{nt=l,Wn.transition=o}}return!1}function jw(i,o,l){o=Io(l,o),o=sw(i,o,1),i=Ni(i,o,1),o=ln(),i!==null&&(Ba(i,1,o),vn(i,o))}function bt(i,o,l){if(i.tag===3)jw(i,i,l);else for(;o!==null;){if(o.tag===3){jw(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ki===null||!ki.has(h))){i=Io(l,i),i=ow(o,i,1),o=Ni(o,i,1),i=ln(),o!==null&&(Ba(o,1,i),vn(o,i));break}}o=o.return}}function SB(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=ln(),i.pingedLanes|=i.suspendedLanes&l,Ut===i&&(Yt&l)===l&&(Rt===4||Rt===3&&(Yt&130023424)===Yt&&500>wt()-Fm?bs(i,0):Mm|=l),vn(i,o)}function zw(i,o){o===0&&((i.mode&1)===0?o=1:(o=sc,sc<<=1,(sc&130023424)===0&&(sc=4194304)));var l=ln();i=Kr(i,o),i!==null&&(Ba(i,o,l),vn(i,l))}function vB(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),zw(i,l)}function AB(i,o){var l=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),zw(i,l)}var $w;$w=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||_n.current)wn=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return wn=!1,hB(i,o,l);wn=(i.flags&131072)!==0}else wn=!1,mt&&(o.flags&1048576)!==0&&xx(o,Nc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;zc(i,o),i=o.pendingProps;var E=wo(o,Zt.current);ko(o,l),E=pm(null,o,h,i,E,l);var b=mm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,xn(h)?(b=!0,Sc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,am(o),E.updater=Hc,o.stateNode=E,E._reactInternals=o,_m(o,h,i,l),o=vm(null,o,h,!0,b,l)):(o.tag=0,mt&&b&&Qp(o),un(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(zc(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=CB(h),i=cr(h,i),E){case 0:o=Sm(null,o,h,i,l);break e;case 1:o=mw(null,o,h,i,l);break e;case 11:o=cw(null,o,h,i,l);break e;case 14:o=dw(null,o,h,cr(h.type,i),l);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:cr(h,E),Sm(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:cr(h,E),mw(i,o,h,E,l);case 3:e:{if(gw(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,Ix(i,o),Rc(o,h,null,l);var S=o.memoizedState;if(h=S.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){E=Io(Error(n(423)),o),o=Ew(i,o,h,l,E);break e}else if(h!==E){E=Io(Error(n(424)),o),o=Ew(i,o,h,l,E);break e}else for(Dn=xi(o.stateNode.containerInfo.firstChild),Ln=o,mt=!0,lr=null,l=kx(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ao(),h===E){o=Jr(i,o,l);break e}un(i,o,h,l)}o=o.child}return o;case 5:return Lx(o),i===null&&em(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,S=E.children,qp(h,E)?S=null:b!==null&&qp(h,b)&&(o.flags|=32),pw(i,o),un(i,o,S,l),o.child;case 6:return i===null&&em(o),null;case 13:return yw(i,o,l);case 4:return um(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=No(o,null,h,l):un(i,o,h,l),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:cr(h,E),cw(i,o,h,E,l);case 7:return un(i,o,o.pendingProps,l),o.child;case 8:return un(i,o,o.pendingProps.children,l),o.child;case 12:return un(i,o,o.pendingProps.children,l),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,b=o.memoizedProps,S=E.value,ut(Oc,h._currentValue),h._currentValue=S,b!==null)if(ur(b.value,S)){if(b.children===E.children&&!_n.current){o=Jr(i,o,l);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var M=b.dependencies;if(M!==null){S=b.child;for(var j=M.firstContext;j!==null;){if(j.context===h){if(b.tag===1){j=Qr(-1,l&-l),j.tag=2;var te=b.updateQueue;if(te!==null){te=te.shared;var fe=te.pending;fe===null?j.next=j:(j.next=fe.next,fe.next=j),te.pending=j}}b.lanes|=l,j=b.alternate,j!==null&&(j.lanes|=l),sm(b.return,l,o),M.lanes|=l;break}j=j.next}}else if(b.tag===10)S=b.type===o.type?null:b.child;else if(b.tag===18){if(S=b.return,S===null)throw Error(n(341));S.lanes|=l,M=S.alternate,M!==null&&(M.lanes|=l),sm(S,l,o),S=b.sibling}else S=b.child;if(S!==null)S.return=b;else for(S=b;S!==null;){if(S===o){S=null;break}if(b=S.sibling,b!==null){b.return=S.return,S=b;break}S=S.return}b=S}un(i,o,E.children,l),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,ko(o,l),E=qn(E),h=h(E),o.flags|=1,un(i,o,h,l),o.child;case 14:return h=o.type,E=cr(h,o.pendingProps),E=cr(h.type,E),dw(i,o,h,E,l);case 15:return fw(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:cr(h,E),zc(i,o),o.tag=1,xn(h)?(i=!0,Sc(o)):i=!1,ko(o,l),rw(o,h,E),_m(o,h,E,l),vm(null,o,h,!0,i,l);case 19:return bw(i,o,l);case 22:return hw(i,o,l)}throw Error(n(156,o.tag))};function Vw(i,o){return w_(i,o)}function NB(i,o,l,h){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gn(i,o,l,h){return new NB(i,o,l,h)}function qm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function CB(i){if(typeof i=="function")return qm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ee)return 11;if(i===ae)return 14}return 2}function Ri(i,o){var l=i.alternate;return l===null?(l=Gn(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Zc(i,o,l,h,E,b){var S=2;if(h=i,typeof i=="function")qm(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case J:return xs(l.children,E,b,o);case se:S=8,E|=8;break;case he:return i=Gn(12,l,o,E|2),i.elementType=he,i.lanes=b,i;case we:return i=Gn(13,l,o,E),i.elementType=we,i.lanes=b,i;case de:return i=Gn(19,l,o,E),i.elementType=de,i.lanes=b,i;case ue:return ed(l,E,b,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case V:S=10;break e;case ie:S=9;break e;case ee:S=11;break e;case ae:S=14;break e;case _e:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=Gn(S,l,o,E),o.elementType=i,o.type=h,o.lanes=b,o}function xs(i,o,l,h){return i=Gn(7,i,h,o),i.lanes=l,i}function ed(i,o,l,h){return i=Gn(22,i,h,o),i.elementType=ue,i.lanes=l,i.stateNode={isHidden:!1},i}function Ym(i,o,l){return i=Gn(6,i,null,o),i.lanes=l,i}function Wm(i,o,l){return o=Gn(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function kB(i,o,l,h,E){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bp(0),this.expirationTimes=bp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function Gm(i,o,l,h,E,b,S,M,j){return i=new kB(i,o,l,M,j),o===1?(o=1,b===!0&&(o|=8)):o=0,b=Gn(3,null,null,o),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},am(b),i}function OB(i,o,l){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:l}}function qw(i){if(!i)return Si;i=i._reactInternals;e:{if(cs(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(xn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(xn(l))return Tx(i,l,o)}return o}function Yw(i,o,l,h,E,b,S,M,j){return i=Gm(l,h,!0,i,E,b,S,M,j),i.context=qw(null),l=i.current,h=ln(),E=Ii(l),b=Qr(h,E),b.callback=o!=null?o:null,Ni(l,b,E),i.current.lanes=E,Ba(i,E,h),vn(i,h),i}function td(i,o,l,h){var E=o.current,b=ln(),S=Ii(E);return l=qw(l),o.context===null?o.context=l:o.pendingContext=l,o=Qr(b,S),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Ni(E,o,S),i!==null&&(hr(i,E,S,b),Pc(i,E,S)),S}function nd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Ww(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function Xm(i,o){Ww(i,o),(i=i.alternate)&&Ww(i,o)}function IB(){return null}var Gw=typeof reportError=="function"?reportError:function(i){console.error(i)};function Km(i){this._internalRoot=i}rd.prototype.render=Km.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));td(i,o,null,null)},rd.prototype.unmount=Km.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Ts(function(){td(null,i,null,null)}),o[Yr]=null}};function rd(i){this._internalRoot=i}rd.prototype.unstable_scheduleHydration=function(i){if(i){var o=I_();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Ti.length&&o!==0&&o<Ti[l].priority;l++);Ti.splice(l,0,i),l===0&&L_(i)}};function Qm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function id(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Xw(){}function PB(i,o,l,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var te=nd(S);b.call(te)}}var S=Yw(o,h,i,0,null,!1,!1,"",Xw);return i._reactRootContainer=S,i[Yr]=S.current,Ja(i.nodeType===8?i.parentNode:i),Ts(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var M=h;h=function(){var te=nd(j);M.call(te)}}var j=Gm(i,0,!1,null,null,!1,!1,"",Xw);return i._reactRootContainer=j,i[Yr]=j.current,Ja(i.nodeType===8?i.parentNode:i),Ts(function(){td(o,j,l,h)}),j}function sd(i,o,l,h,E){var b=l._reactRootContainer;if(b){var S=b;if(typeof E=="function"){var M=E;E=function(){var j=nd(S);M.call(j)}}td(o,S,i,E)}else S=PB(l,o,i,E,h);return nd(S)}k_=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=Fa(o.pendingLanes);l!==0&&(_p(o,l|1),vn(o,wt()),(Je&6)===0&&(Lo=wt()+500,vi()))}break;case 13:Ts(function(){var h=Kr(i,1);if(h!==null){var E=ln();hr(h,i,1,E)}}),Xm(i,1)}},xp=function(i){if(i.tag===13){var o=Kr(i,134217728);if(o!==null){var l=ln();hr(o,i,134217728,l)}Xm(i,134217728)}},O_=function(i){if(i.tag===13){var o=Ii(i),l=Kr(i,o);if(l!==null){var h=ln();hr(l,i,o,h)}Xm(i,o)}},I_=function(){return nt},P_=function(i,o){var l=nt;try{return nt=i,o()}finally{nt=l}},pp=function(i,o,l){switch(o){case"input":if(Ct(i,l),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var h=l[o];if(h!==i&&h.form===i.form){var E=xc(h);if(!E)throw Error(n(90));Tn(h),Ct(h,E)}}}break;case"textarea":Jl(i,l);break;case"select":o=l.value,o!=null&&Cr(i,!!l.multiple,o,!1)}},g_=zm,E_=Ts;var RB={usingClientEntryPoint:!1,Events:[tu,_o,xc,p_,m_,zm]},mu={findFiberByHostInstance:ds,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},LB={bundleType:mu.bundleType,version:mu.version,rendererPackageName:mu.rendererPackageName,rendererConfig:mu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=__(i),i===null?null:i.stateNode},findFiberByHostInstance:mu.findFiberByHostInstance||IB,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var od=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!od.isDisabled&&od.supportsFiber)try{rc=od.inject(LB),Or=od}catch(i){}}return hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RB,hn.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qm(o))throw Error(n(200));return OB(i,o,null,l)},hn.createRoot=function(i,o){if(!Qm(i))throw Error(n(299));var l=!1,h="",E=Gw;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=Gm(i,1,!1,null,null,l,!1,h,E),i[Yr]=o.current,Ja(i.nodeType===8?i.parentNode:i),new Km(o)},hn.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=__(o),i=i===null?null:i.stateNode,i},hn.flushSync=function(i){return Ts(i)},hn.hydrate=function(i,o,l){if(!id(o))throw Error(n(200));return sd(null,i,o,!0,l)},hn.hydrateRoot=function(i,o,l){if(!Qm(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,b="",S=Gw;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),o=Yw(o,null,i,1,l!=null?l:null,E,!1,b,S),i[Yr]=o.current,Ja(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,E]:o.mutableSourceEagerHydrationData.push(l,E);return new rd(o)},hn.render=function(i,o,l){if(!id(o))throw Error(n(200));return sd(null,i,o,!1,l)},hn.unmountComponentAtNode=function(i){if(!id(i))throw Error(n(40));return i._reactRootContainer?(Ts(function(){sd(null,null,i,!1,function(){i._reactRootContainer=null,i[Yr]=null})}),!0):!1},hn.unstable_batchedUpdates=zm,hn.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!id(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return sd(i,o,l,!1,h)},hn.version="18.3.1-next-f1338f8080-20240426",hn}var $g;function Vg(){if($g)return rf.exports;$g=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(),rf.exports=JA(),rf.exports}var Ds=Vg();function qg(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=qg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function F(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=qg(e))&&(r&&(r+=" "),r+=t);return r}var Yg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Wg=Mi.createContext&&Mi.createContext(Yg),ZA=["attr","size","title"];function eN(e,t){if(e==null)return{};var n=tN(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 tN(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 qu(){return qu=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},qu.apply(this,arguments)}function Gg(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 Yu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gg(Object(n),!0).forEach(function(r){nN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nN(e,t,n){return t=rN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rN(e){var t=iN(e,"string");return typeof t=="symbol"?t:t+""}function iN(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 Xg(e){return e&&e.map((t,n)=>Mi.createElement(t.tag,Yu({key:n},t.attr),Xg(t.child)))}function tt(e){return t=>Mi.createElement(sN,qu({attr:Yu({},e.attr)},t),Xg(e.child))}function sN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=eN(e,ZA),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Mi.createElement("svg",qu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Yu(Yu({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Mi.createElement("title",null,a),e.children)};return Wg!==void 0?Mi.createElement(Wg.Consumer,null,n=>t(n)):t(Yg)}function oN(e){return tt({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function aN(e){return tt({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 uN(e){return tt({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 Zn=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:_.jsx("button",{className:F(e,`${P}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?_.jsx("img",{className:F(`${P}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),lN="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",cN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=it(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?_.jsx(uN,{className:F(t,`${P}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||lN,alt:"Copilot",className:F(t,`${P}-minimized-icon-img`)});return _.jsx(Zn,{className:F(t,`${P}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},dN=()=>{const{globalClassName:e,themeVariables:t}=it(),n=()=>{$u(!1),ni(!0)};return Ds.createPortal(_.jsx("div",{className:F(e,`${P}-minimized-container`),style:t,children:_.jsx(cN,{onClick:n})}),document.body)};function fN(e){return tt({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 sn(){const e=H.useContext(pg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const hN=e=>({[`${An}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${An}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${An}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${An}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${An}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${An}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function pN(e){return tt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm18.31 6-2.76 5z"},child:[]},{tag:"path",attr:{d:"M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"},child:[]}]})(e)}function Kg(e){return tt({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 mN(e){return tt({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 af(e){return tt({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 gN(e){return tt({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 EN(e){return tt({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 yN(e){return tt({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 Qg(e){return tt({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 Jg(e){return tt({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 TN(e){return tt({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 bN(e){return tt({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 _N(e){return tt({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 Zg(e){return tt({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 Wu=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>_.jsx("button",{className:F(`${P}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),xN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?_.jsx("img",{className:F(`${P}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(af,{size:"16px"})},wN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return _.jsx(Zn,{className:F(e,n,`cim-${r}-component`,`${P}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:_.jsx(af,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(Wu,{className:F(e,n,`cim-${r}-component`,`${P}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&_.jsx(xN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function c7(){}function d7(){}function e1(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 t1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const SN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,AN={};function n1(e,t){return(AN.jsx?vN:SN).test(e)}const NN=/[ \t\n\f\r]/g;function CN(e){return typeof e=="object"?e.type==="text"?r1(e.value):!1:r1(e)}function r1(e){return e.replace(NN,"")===""}class Ko{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ko.prototype.normal={},Ko.prototype.property={},Ko.prototype.space=void 0;function i1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Ko(n,r,t)}function Qo(e){return e.toLowerCase()}class pn{constructor(t,n){this.attribute=n,this.property=t}}pn.prototype.attribute="",pn.prototype.booleanish=!1,pn.prototype.boolean=!1,pn.prototype.commaOrSpaceSeparated=!1,pn.prototype.commaSeparated=!1,pn.prototype.defined=!1,pn.prototype.mustUseProperty=!1,pn.prototype.number=!1,pn.prototype.overloadedBoolean=!1,pn.prototype.property="",pn.prototype.spaceSeparated=!1,pn.prototype.space=void 0;let kN=0;const ze=Yi(),Nt=Yi(),uf=Yi(),Ee=Yi(),st=Yi(),qi=Yi(),Cn=Yi();function Yi(){return ud(2,++kN)}const lf=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Nt,commaOrSpaceSeparated:Cn,commaSeparated:qi,number:Ee,overloadedBoolean:uf,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),cf=Object.keys(lf);class df extends pn{constructor(t,n,r,s){let a=-1;if(super(t,n),s1(this,"space",s),typeof r=="number")for(;++a<cf.length;){const u=cf[a];s1(this,cf[a],(r&lf[u])===lf[u])}}}df.prototype.defined=!0;function s1(e,t,n){n&&(e[t]=n)}function Ms(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new df(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Qo(r)]=r,n[Qo(a.attribute)]=r}return new Ko(t,n,e.space)}const o1=Ms({properties:{ariaActiveDescendant:null,ariaAtomic:Nt,ariaAutoComplete:null,ariaBusy:Nt,ariaChecked:Nt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:Nt,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:Nt,ariaFlowTo:st,ariaGrabbed:Nt,ariaHasPopup:null,ariaHidden:Nt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:Ee,ariaLive:null,ariaModal:Nt,ariaMultiLine:Nt,ariaMultiSelectable:Nt,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Nt,ariaReadOnly:Nt,ariaRelevant:null,ariaRequired:Nt,ariaRoleDescription:st,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Nt,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function a1(e,t){return t in e?e[t]:t}function u1(e,t){return a1(e,t.toLowerCase())}const ON=Ms({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qi,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alpha:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:st,autoFocus:ze,autoPlay:ze,blocking:st,capture:null,charSet:null,checked:ze,cite:null,className:st,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:Nt,controls:ze,controlsList:st,coords:Ee|qi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:uf,draggable:Nt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:st,height:Ee,hidden:uf,high:Ee,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:st,itemRef:st,itemScope:ze,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ze,optimum:Ee,pattern:null,ping:st,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:st,required:ze,reversed:ze,rows:Ee,rowSpan:Ee,sandbox:st,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootCustomElementRegistry:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shadowRootSerializable:ze,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Nt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:Nt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Nt,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ze,disablePictureInPicture:ze,disableRemotePlayback:ze,exportParts:qi,part:st,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:u1}),IN=Ms({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Cn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:st,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:qi,g2:qi,glyphName:qi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:Cn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Cn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Cn,rev:Cn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Cn,requiredFeatures:Cn,requiredFonts:Cn,requiredFormats:Cn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:Cn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Cn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Cn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:a1}),l1=Ms({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),c1=Ms({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:u1}),d1=Ms({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),PN={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"},RN=/[A-Z]/g,f1=/-[a-z]/g,LN=/^data[-\w.:]+$/i;function Gu(e,t){const n=Qo(t);let r=t,s=pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&LN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(f1,MN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!f1.test(a)){let u=a.replace(RN,DN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=df}return new s(r,t)}function DN(e){return"-"+e.toLowerCase()}function MN(e){return e.charAt(1).toUpperCase()}const Jo=i1([o1,ON,l1,c1,d1],"html"),ii=i1([o1,IN,l1,c1,d1],"svg");function h1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function p1(e){return e.join(" ").trim()}var Fs={},ff,m1;function FN(){if(m1)return ff;m1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
24
|
-
`,f="/",p="*",m="",T="comment",y="declaration";function x(A,v){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];v=v||{};var C=1,R=1;function $(de){var ae=de.match(t);ae&&(C+=ae.length);var _e=de.lastIndexOf(d);R=~_e?de.length-_e:R+de.length}function G(){var de={line:C,column:R};return function(ae){return ae.position=new D(de),he(),ae}}function D(de){this.start=de,this.end={line:C,column:R},this.source=v.source}D.prototype.content=A;function J(de){var ae=new Error(v.source+":"+C+":"+R+": "+de);if(ae.reason=de,ae.filename=v.source,ae.line=C,ae.column=R,ae.source=A,!v.silent)throw ae}function se(de){var ae=de.exec(A);if(ae){var _e=ae[0];return $(_e),A=A.slice(_e.length),ae}}function he(){se(n)}function V(de){var ae;for(de=de||[];ae=ie();)ae!==!1&&de.push(ae);return de}function ie(){var de=G();if(!(f!=A.charAt(0)||p!=A.charAt(1))){for(var ae=2;m!=A.charAt(ae)&&(p!=A.charAt(ae)||f!=A.charAt(ae+1));)++ae;if(ae+=2,m===A.charAt(ae-1))return J("End of comment missing");var _e=A.slice(2,ae-2);return R+=2,$(_e),A=A.slice(ae),R+=2,de({type:T,comment:_e})}}function ee(){var de=G(),ae=se(r);if(ae){if(ie(),!se(s))return J("property missing ':'");var _e=se(a),ue=de({type:y,property:N(ae[0].replace(e,m)),value:_e?N(_e[0].replace(e,m)):m});return se(u),ue}}function we(){var de=[];V(de);for(var ae;ae=ee();)ae!==!1&&(de.push(ae),V(de));return de}return he(),we()}function N(A){return A?A.replace(c,m):m}return ff=x,ff}var g1;function BN(){if(g1)return Fs;g1=1;var e=Fs&&Fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.default=n;const t=e(FN());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),c=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Fs}var Zo={},E1;function UN(){if(E1)return Zo;E1=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,c):f=f.replace(r,c),f.replace(t,u))};return Zo.camelCase=d,Zo}var ea,y1;function HN(){if(y1)return ea;y1=1;var e=ea&&ea.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(BN()),n=UN();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,ea=r,ea}var jN=HN();const zN=Ye(jN),Xu=T1("end"),Er=T1("start");function T1(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 b1(e){const t=Er(e),n=Xu(e);if(t&&n)return{start:t,end:n}}function ta(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_1(e.position):"start"in e||"end"in e?_1(e):"line"in e||"column"in e?hf(e):""}function hf(e){return x1(e&&e.line)+":"+x1(e&&e.column)}function _1(e){return hf(e&&e.start)+"-"+hf(e&&e.end)}function x1(e){return e&&typeof e=="number"?e:1}class Xt 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 c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=ta(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}}Xt.prototype.file="",Xt.prototype.name="",Xt.prototype.reason="",Xt.prototype.message="",Xt.prototype.stack="",Xt.prototype.column=void 0,Xt.prototype.line=void 0,Xt.prototype.ancestors=void 0,Xt.prototype.cause=void 0,Xt.prototype.fatal=void 0,Xt.prototype.place=void 0,Xt.prototype.ruleId=void 0,Xt.prototype.source=void 0;const pf={}.hasOwnProperty,$N=new Map,VN=/[A-Z]/g,qN=new Set(["table","tbody","thead","tfoot","tr"]),YN=new Set(["td","th"]),w1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function WN(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=tC(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=eC(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ii:Jo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=S1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function S1(e,t,n){if(t.type==="element")return GN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return XN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return QN(e,t,n);if(t.type==="mdxjsEsm")return KN(e,t);if(t.type==="root")return JN(e,t,n);if(t.type==="text")return ZN(e,t)}function GN(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=A1(e,t.tagName,!1),u=nC(e,t);let c=gf(e,t);return qN.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!CN(d):!0})),v1(e,u,a,t),mf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function XN(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)}na(e,t.position)}function KN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);na(e,t.position)}function QN(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:A1(e,t.name,!0),u=rC(e,t),c=gf(e,t);return v1(e,u,a,t),mf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function JN(e,t,n){const r={};return mf(r,gf(e,t)),e.create(t,e.Fragment,r,n)}function ZN(e,t){return t.value}function v1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function mf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function eC(e,t,n){return r;function r(s,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function tC(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=Er(r);return t(s,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function nC(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&pf.call(t.properties,s)){const a=iC(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&YN.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function rC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else na(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else na(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function gf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:$N;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const c=S1(e,a,u);c!==void 0&&n.push(c)}return n}function iC(e,t,n){const r=Gu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?t1(n):p1(n)),r.property==="style"){let s=typeof n=="object"?n:sC(e,String(n));return e.stylePropertyNameCase==="css"&&(s=oC(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?PN[r.property]||r.property:r.attribute,n]}}function sC(e,t){try{return zN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new Xt("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=w1+"#cannot-parse-style-attribute",s}}function A1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const c=n1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=n1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return pf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);na(e)}function na(e,t){const n=new Xt("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=w1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function oC(e){const t={};let n;for(n in e)pf.call(e,n)&&(t[aC(n)]=e[n]);return t}function aC(e){let t=e.replace(VN,uC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function uC(e){return"-"+e.toLowerCase()}const Ef={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"]},lC={};function yf(e,t){const n=lC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return N1(e,r,s)}function N1(e,t,n){if(cC(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 C1(e.children,t,n)}return Array.isArray(e)?C1(e,t,n):""}function C1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=N1(e[s],t,n);return r.join("")}function cC(e){return!!(e&&typeof e=="object")}const k1=document.createElement("i");function Tf(e){const t="&"+e+";";k1.innerHTML=t;const n=k1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function kn(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 Bn(e,t){return e.length>0?(kn(e,e.length,0,t),e):t}const O1={}.hasOwnProperty;function I1(e){const t={};let n=-1;for(;++n<e.length;)dC(t,e[n]);return t}function dC(e,t){let n;for(n in t){const s=(O1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){O1.call(s,u)||(s[u]=[]);const c=a[u];fC(s[u],Array.isArray(c)?c:c?[c]:[])}}}function fC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);kn(e,0,0,r)}function P1(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 er(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const on=si(/[A-Za-z]/),Kt=si(/[\dA-Za-z]/),hC=si(/[#-'*+\--9=?A-Z^-~]/);function Ku(e){return e!==null&&(e<32||e===127)}const bf=si(/\d/),pC=si(/[\dA-Fa-f]/),mC=si(/[!-/:-@[-`{-~]/);function Pe(e){return e!==null&&e<-2}function ot(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}const Qu=si(new RegExp("\\p{P}|\\p{S}","u")),Wi=si(/\s/);function si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bs(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Kt(e.charCodeAt(n+1))&&Kt(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return We(d)?(e.enter(n),c(d)):t(d)}function c(d){return We(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const gC={tokenize:EC};function EC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Xe(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Pe(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const yC={tokenize:TC},R1={tokenize:bC};function TC(e){const t=this,n=[];let r=0,s,a,u;return c;function c(R){if(r<n.length){const $=n[r];return t.containerState=$[1],e.attempt($[0].continuation,d,f)(R)}return f(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&C();const $=t.events.length;let G=$,D;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){D=t.events[G][1].end;break}v(r);let J=$;for(;J<t.events.length;)t.events[J][1].end=U({},D),J++;return kn(t.events,G+1,0,t.events.slice($)),t.events.length=J,f(R)}return c(R)}function f(R){if(r===n.length){if(!s)return T(R);if(s.currentConstruct&&s.currentConstruct.concrete)return x(R);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(R1,p,m)(R)}function p(R){return s&&C(),v(r),T(R)}function m(R){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(R)}function T(R){return t.containerState={},e.attempt(R1,y,x)(R)}function y(R){return r++,n.push([t.currentConstruct,t.containerState]),T(R)}function x(R){if(R===null){s&&C(),v(0),e.consume(R);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),N(R)}function N(R){if(R===null){A(e.exit("chunkFlow"),!0),v(0),e.consume(R);return}return Pe(R)?(e.consume(R),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),N)}function A(R,$){const G=t.sliceStream(R);if($&&G.push(null),R.previous=a,a&&(a.next=R),a=R,s.defineSkip(R.start),s.write(G),t.parser.lazy[R.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 J=t.events.length;let se=J,he,V;for(;se--;)if(t.events[se][0]==="exit"&&t.events[se][1].type==="chunkFlow"){if(he){V=t.events[se][1].end;break}he=!0}for(v(r),D=J;D<t.events.length;)t.events[D][1].end=U({},V),D++;kn(t.events,se+1,0,t.events.slice(J)),t.events.length=D}}function v(R){let $=n.length;for(;$-- >R;){const G=n[$];t.containerState=G[1],G[0].exit.call(t,e)}n.length=R}function C(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function bC(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Us(e){if(e===null||ot(e)||Wi(e))return 1;if(Qu(e))return 2}function Ju(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 _f={name:"attention",resolveAll:_C,tokenize:xC};function _C(e,t){let n=-1,r,s,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=U({},e[r][1].end),T=U({},e[n][1].start);L1(m,-d),L1(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:U({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:U({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:U({},e[r][1].end),end:U({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:U({},u.start),end:U({},c.end)},e[r][1].end=U({},u.start),e[n][1].start=U({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Bn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Bn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Bn(f,Ju(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Bn(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=Bn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,kn(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 xC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Us(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),p=Us(d),m=!p||p===2&&s||n.includes(d),T=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function L1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wC={name:"autolink",tokenize:SC};function SC(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return on(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||Kt(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Kt(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Ku(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):hC(y)?(e.consume(y),f):n(y)}function p(y){return Kt(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):T(y)}function T(y){if((y===45||Kt(y))&&r++<63){const x=y===45?T:m;return e.consume(y),x}return n(y)}}const ra={partial:!0,tokenize:vC};function vC(e,t,n){return r;function r(a){return We(a)?Xe(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Pe(a)?t(a):n(a)}}const D1={continuation:{tokenize:NC},exit:CC,name:"blockQuote",tokenize:AC};function AC(e,t,n){const r=this;return s;function s(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return We(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function NC(e,t,n){const r=this;return s;function s(u){return We(u)?Xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(D1,t,n)(u)}}function CC(e){e.exit("blockQuote")}const M1={name:"characterEscape",tokenize:kC};function kC(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 mC(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const F1={name:"characterReference",tokenize:OC};function OC(e,t,n){const r=this;let s=0,a,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=Kt,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=pC,p):(e.enter("characterReferenceValue"),a=7,u=bf,p(m))}function p(m){if(m===59&&s){const T=e.exit("characterReferenceValue");return u===Kt&&!Tf(r.sliceSerialize(T))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const B1={partial:!0,tokenize:PC},U1={concrete:!0,name:"codeFenced",tokenize:IC};function IC(e,t,n){const r=this,s={partial:!0,tokenize:G};let a=0,u=0,c;return d;function d(D){return f(D)}function f(D){const J=r.events[r.events.length-1];return a=J&&J[1].type==="linePrefix"?J[2].sliceSerialize(J[1],!0).length:0,c=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===c?(u++,e.consume(D),p):u<3?n(D):(e.exit("codeFencedFenceSequence"),We(D)?Xe(e,m,"whitespace")(D):m(D))}function m(D){return D===null||Pe(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(B1,N,$)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(D))}function T(D){return D===null||Pe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(D)):We(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,y,"whitespace")(D)):D===96&&D===c?n(D):(e.consume(D),T)}function y(D){return D===null||Pe(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===null||Pe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===c?n(D):(e.consume(D),x)}function N(D){return e.attempt(s,$,A)(D)}function A(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),v}function v(D){return a>0&&We(D)?Xe(e,C,"linePrefix",a+1)(D):C(D)}function C(D){return D===null||Pe(D)?e.check(B1,N,$)(D):(e.enter("codeFlowValue"),R(D))}function R(D){return D===null||Pe(D)?(e.exit("codeFlowValue"),C(D)):(e.consume(D),R)}function $(D){return e.exit("codeFenced"),t(D)}function G(D,J,se){let he=0;return V;function V(ae){return D.enter("lineEnding"),D.consume(ae),D.exit("lineEnding"),ie}function ie(ae){return D.enter("codeFencedFence"),We(ae)?Xe(D,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):ee(ae)}function ee(ae){return ae===c?(D.enter("codeFencedFenceSequence"),we(ae)):se(ae)}function we(ae){return ae===c?(he++,D.consume(ae),we):he>=u?(D.exit("codeFencedFenceSequence"),We(ae)?Xe(D,de,"whitespace")(ae):de(ae)):se(ae)}function de(ae){return ae===null||Pe(ae)?(D.exit("codeFencedFence"),J(ae)):se(ae)}}}function PC(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 xf={name:"codeIndented",tokenize:LC},RC={partial:!0,tokenize:DC};function LC(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),Xe(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):Pe(f)?e.attempt(RC,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Pe(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function DC(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Pe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):Xe(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Pe(u)?s(u):n(u)}}const MC={name:"codeText",previous:BC,resolve:FC,tokenize:UC};function FC(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 BC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UC(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):Pe(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||Pe(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 HC{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&&ia(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),ia(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ia(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);ia(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ia(this.left,n.reverse())}}}function ia(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 H1(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new HC(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,jC(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),c=p.slice(s,n),c.unshift(r),p.splice(s,n-s+1,c))}}return kn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function jC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,m,T=-1,y=n,x=0,N=0;const A=[N];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++T<c.length;)c[T][0]==="exit"&&c[T-1][0]==="enter"&&c[T][1].type===c[T-1][1].type&&c[T][1].start.line!==c[T][1].end.line&&(N=T+1,A.push(N),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),T=A.length;T--;){const v=c.slice(A[T],A[T+1]),C=a.pop();d.push([C,C+v.length-1]),e.splice(C,2,v)}for(d.reverse(),T=-1;++T<d.length;)f[x+d[T][0]]=x+d[T][1],x+=d[T][1]-d[T][0]-1;return f}const zC={resolve:VC,tokenize:qC},$C={partial:!0,tokenize:YC};function VC(e){return H1(e),e}function qC(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):Pe(c)?e.check($C,u,a)(c):(e.consume(c),s)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function YC(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Xe(e,a,"linePrefix")}function a(u){if(u===null||Pe(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function j1(e,t,n,r,s,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(v){return v===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(v),e.exit(a),T):v===null||v===32||v===41||Ku(v)?n(v):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),N(v))}function T(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===62?(e.exit("chunkString"),e.exit(c),T(v)):v===null||v===60||Pe(v)?n(v):(e.consume(v),v===92?x:y)}function x(v){return v===60||v===62||v===92?(e.consume(v),y):y(v)}function N(v){return!p&&(v===null||v===41||ot(v))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(v)):p<f&&v===40?(e.consume(v),p++,N):v===41?(e.consume(v),p--,N):v===null||v===32||v===40||Ku(v)?n(v):(e.consume(v),v===92?A:N)}function A(v){return v===40||v===41||v===92?(e.consume(v),N):N(v)}}function z1(e,t,n,r,s,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):Pe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Pe(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!We(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function $1(e,t,n,r,s,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(s),e.consume(T),e.exit(s),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(s),e.consume(T),e.exit(s),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Pe(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Xe(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Pe(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function sa(e,t){let n;return r;function r(s){return Pe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):We(s)?Xe(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const WC={name:"definition",tokenize:XC},GC={partial:!0,tokenize:KC};function XC(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return z1.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=er(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return ot(y)?sa(e,f)(y):f(y)}function f(y){return j1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(GC,m,m)(y)}function m(y){return We(y)?Xe(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Pe(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function KC(e,t,n){return r;function r(c){return ot(c)?sa(e,s)(c):n(c)}function s(c){return $1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return We(c)?Xe(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Pe(c)?t(c):n(c)}}const QC={name:"hardBreakEscape",tokenize:JC};function JC(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Pe(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const ZC={name:"headingAtx",resolve:ek,tokenize:tk};function ek(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"},kn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function tk(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||ot(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Pe(p)?(e.exit("atxHeading"),t(p)):We(p)?Xe(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ot(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const nk=["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"],V1=["pre","script","style","textarea"],rk={concrete:!0,name:"htmlFlow",resolveTo:ok,tokenize:ak},ik={partial:!0,tokenize:lk},sk={partial:!0,tokenize:uk};function ok(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 ak(e,t,n){const r=this;let s,a,u,c,d;return f;function f(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),T):O===47?(e.consume(O),a=!0,N):O===63?(e.consume(O),s=3,r.interrupt?t:w):on(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function T(O){return O===45?(e.consume(O),s=2,y):O===91?(e.consume(O),s=5,c=0,x):on(O)?(e.consume(O),s=4,r.interrupt?t:w):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:w):n(O)}function x(O){const pe="CDATA[";return O===pe.charCodeAt(c++)?(e.consume(O),c===pe.length?r.interrupt?t:ee:x):n(O)}function N(O){return on(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function A(O){if(O===null||O===47||O===62||ot(O)){const pe=O===47,Oe=u.toLowerCase();return!pe&&!a&&V1.includes(Oe)?(s=1,r.interrupt?t(O):ee(O)):nk.includes(u.toLowerCase())?(s=6,pe?(e.consume(O),v):r.interrupt?t(O):ee(O)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?C(O):R(O))}return O===45||Kt(O)?(e.consume(O),u+=String.fromCharCode(O),A):n(O)}function v(O){return O===62?(e.consume(O),r.interrupt?t:ee):n(O)}function C(O){return We(O)?(e.consume(O),C):V(O)}function R(O){return O===47?(e.consume(O),V):O===58||O===95||on(O)?(e.consume(O),$):We(O)?(e.consume(O),R):V(O)}function $(O){return O===45||O===46||O===58||O===95||Kt(O)?(e.consume(O),$):G(O)}function G(O){return O===61?(e.consume(O),D):We(O)?(e.consume(O),G):R(O)}function D(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,J):We(O)?(e.consume(O),D):se(O)}function J(O){return O===d?(e.consume(O),d=null,he):O===null||Pe(O)?n(O):(e.consume(O),J)}function se(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ot(O)?G(O):(e.consume(O),se)}function he(O){return O===47||O===62||We(O)?R(O):n(O)}function V(O){return O===62?(e.consume(O),ie):n(O)}function ie(O){return O===null||Pe(O)?ee(O):We(O)?(e.consume(O),ie):n(O)}function ee(O){return O===45&&s===2?(e.consume(O),_e):O===60&&s===1?(e.consume(O),ue):O===62&&s===4?(e.consume(O),k):O===63&&s===3?(e.consume(O),w):O===93&&s===5?(e.consume(O),Z):Pe(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(ik,q,we)(O)):O===null||Pe(O)?(e.exit("htmlFlowData"),we(O)):(e.consume(O),ee)}function we(O){return e.check(sk,de,q)(O)}function de(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ae}function ae(O){return O===null||Pe(O)?we(O):(e.enter("htmlFlowData"),ee(O))}function _e(O){return O===45?(e.consume(O),w):ee(O)}function ue(O){return O===47?(e.consume(O),u="",z):ee(O)}function z(O){if(O===62){const pe=u.toLowerCase();return V1.includes(pe)?(e.consume(O),k):ee(O)}return on(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),z):ee(O)}function Z(O){return O===93?(e.consume(O),w):ee(O)}function w(O){return O===62?(e.consume(O),k):O===45&&s===2?(e.consume(O),w):ee(O)}function k(O){return O===null||Pe(O)?(e.exit("htmlFlowData"),q(O)):(e.consume(O),k)}function q(O){return e.exit("htmlFlow"),t(O)}}function uk(e,t,n){const r=this;return s;function s(u){return Pe(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 lk(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ra,t,n)}}const ck={name:"htmlText",tokenize:dk};function dk(e,t,n){const r=this;let s,a,u;return c;function c(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),d}function d(w){return w===33?(e.consume(w),f):w===47?(e.consume(w),G):w===63?(e.consume(w),R):on(w)?(e.consume(w),se):n(w)}function f(w){return w===45?(e.consume(w),p):w===91?(e.consume(w),a=0,x):on(w)?(e.consume(w),C):n(w)}function p(w){return w===45?(e.consume(w),y):n(w)}function m(w){return w===null?n(w):w===45?(e.consume(w),T):Pe(w)?(u=m,ue(w)):(e.consume(w),m)}function T(w){return w===45?(e.consume(w),y):m(w)}function y(w){return w===62?_e(w):w===45?T(w):m(w)}function x(w){const k="CDATA[";return w===k.charCodeAt(a++)?(e.consume(w),a===k.length?N:x):n(w)}function N(w){return w===null?n(w):w===93?(e.consume(w),A):Pe(w)?(u=N,ue(w)):(e.consume(w),N)}function A(w){return w===93?(e.consume(w),v):N(w)}function v(w){return w===62?_e(w):w===93?(e.consume(w),v):N(w)}function C(w){return w===null||w===62?_e(w):Pe(w)?(u=C,ue(w)):(e.consume(w),C)}function R(w){return w===null?n(w):w===63?(e.consume(w),$):Pe(w)?(u=R,ue(w)):(e.consume(w),R)}function $(w){return w===62?_e(w):R(w)}function G(w){return on(w)?(e.consume(w),D):n(w)}function D(w){return w===45||Kt(w)?(e.consume(w),D):J(w)}function J(w){return Pe(w)?(u=J,ue(w)):We(w)?(e.consume(w),J):_e(w)}function se(w){return w===45||Kt(w)?(e.consume(w),se):w===47||w===62||ot(w)?he(w):n(w)}function he(w){return w===47?(e.consume(w),_e):w===58||w===95||on(w)?(e.consume(w),V):Pe(w)?(u=he,ue(w)):We(w)?(e.consume(w),he):_e(w)}function V(w){return w===45||w===46||w===58||w===95||Kt(w)?(e.consume(w),V):ie(w)}function ie(w){return w===61?(e.consume(w),ee):Pe(w)?(u=ie,ue(w)):We(w)?(e.consume(w),ie):he(w)}function ee(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),s=w,we):Pe(w)?(u=ee,ue(w)):We(w)?(e.consume(w),ee):(e.consume(w),de)}function we(w){return w===s?(e.consume(w),s=void 0,ae):w===null?n(w):Pe(w)?(u=we,ue(w)):(e.consume(w),we)}function de(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||ot(w)?he(w):(e.consume(w),de)}function ae(w){return w===47||w===62||ot(w)?he(w):n(w)}function _e(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function ue(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),z}function z(w){return We(w)?Xe(e,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):Z(w)}function Z(w){return e.enter("htmlTextData"),u(w)}}const wf={name:"labelEnd",resolveAll:mk,resolveTo:gk,tokenize:Ek},fk={tokenize:yk},hk={tokenize:Tk},pk={tokenize:bk};function mk(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&&kn(e,0,e.length,n),e}function gk(e,t){let n=e.length,r=0,s,a,u,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start: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 c=[["enter",d,t],["enter",f,t]],c=Bn(c,e.slice(a+1,a+r+3)),c=Bn(c,[["enter",p,t]]),c=Bn(c,Ju(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Bn(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=Bn(c,e.slice(u+1)),c=Bn(c,[["exit",d,t]]),kn(e,a,e.length,c),e}function Ek(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(er(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(fk,p,u?p:m)(T):T===91?e.attempt(hk,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(pk,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function yk(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 ot(m)?sa(e,a)(m):a(m)}function a(m){return m===41?p(m):j1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ot(m)?sa(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?$1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ot(m)?sa(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 Tk(e,t,n){const r=this;return s;function s(c){return z1.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(er(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function bk(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 _k={name:"labelStartImage",resolveAll:wf.resolveAll,tokenize:xk};function xk(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const wk={name:"labelStartLink",resolveAll:wf.resolveAll,tokenize:Sk};function Sk(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 Sf={name:"lineEnding",tokenize:vk};function vk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const Zu={name:"thematicBreak",tokenize:Ak};function Ak(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Pe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),We(f)?Xe(e,c,"whitespace")(f):c(f))}}const mn={continuation:{tokenize:Ok},exit:Pk,name:"list",tokenize:kk},Nk={partial:!0,tokenize:Rk},Ck={partial:!0,tokenize:Ik};function kk(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return c;function c(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:bf(y)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Zu,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return bf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(ra,r.interrupt?n:p,e.attempt(Nk,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return We(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),T):n(y)}function T(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function Ok(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ra,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!We(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ck,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(mn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function Ik(e,t,n){const r=this;return Xe(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 Pk(e){e.exit(this.containerState.type)}function Rk(e,t,n){const r=this;return Xe(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!We(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const q1={name:"setextUnderline",resolveTo:Lk,tokenize:Dk};function Lk(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 Dk(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),We(f)?Xe(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Pe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const Mk={tokenize:Fk};function Fk(e){const t=this,n=e.attempt(ra,r,e.attempt(this.parser.constructs.flowInitial,s,Xe(e,e.attempt(this.parser.constructs.flow,s,e.attempt(zC,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 Bk={resolveAll:W1()},Uk=Y1("string"),Hk=Y1("text");function Y1(e){return{resolveAll:W1(e==="text"?jk:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,c);return u;function u(p){return f(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let T=-1;if(m)for(;++T<m.length;){const y=m[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function W1(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 jk(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,u=-1,c=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end: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 zk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:WC},disable:{null:[]},document:{42:mn,43:mn,45:mn,48:mn,49:mn,50:mn,51:mn,52:mn,53:mn,54:mn,55:mn,56:mn,57:mn,62:D1},flow:{35:ZC,42:Zu,45:[q1,Zu],60:rk,61:q1,95:Zu,96:U1,126:U1},flowInitial:{[-2]:xf,[-1]:xf,32:xf},insideSpan:{null:[_f,Bk]},string:{38:F1,92:M1},text:{[-5]:Sf,[-4]:Sf,[-3]:Sf,33:_k,38:F1,42:_f,60:[wC,ck],91:wk,92:[QC,M1],93:wf,95:_f,96:MC}},Symbol.toStringTag,{value:"Module"}));function $k(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let u=[],c=[];const d={attempt:J(G),check:J(D),consume:C,enter:R,exit:$,interrupt:J(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:N,events:[],now:x,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(ie){return u=Bn(u,ie),A(),u[u.length-1]!==null?[]:(se(t,0),f.events=Ju(a,f.events,f),f.events)}function T(ie,ee){return qk(y(ie),ee)}function y(ie){return Vk(u,ie)}function x(){const{_bufferIndex:ie,_index:ee,line:we,column:de,offset:ae}=r;return{_bufferIndex:ie,_index:ee,line:we,column:de,offset:ae}}function N(ie){s[ie.line]=ie.column,V()}function A(){let ie;for(;r._index<u.length;){const ee=u[r._index];if(typeof ee=="string")for(ie=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ie&&r._bufferIndex<ee.length;)v(ee.charCodeAt(r._bufferIndex));else v(ee)}}function v(ie){p=p(ie)}function C(ie){Pe(ie)?(r.line++,r.column=1,r.offset+=ie===-3?2:1,V()):ie!==-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=ie}function R(ie,ee){const we=ee||{};return we.type=ie,we.start=x(),f.events.push(["enter",we,f]),c.push(we),we}function $(ie){const ee=c.pop();return ee.end=x(),f.events.push(["exit",ee,f]),ee}function G(ie,ee){se(ie,ee.from)}function D(ie,ee){ee.restore()}function J(ie,ee){return we;function we(de,ae,_e){let ue,z,Z,w;return Array.isArray(de)?q(de):"tokenize"in de?q([de]):k(de);function k(ye){return Re;function Re(Be){const Ke=Be!==null&&ye[Be],Tt=Be!==null&&ye.null,jn=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(Tt)?Tt:Tt?[Tt]:[]];return q(jn)(Be)}}function q(ye){return ue=ye,z=0,ye.length===0?_e:O(ye[z])}function O(ye){return Re;function Re(Be){return w=he(),Z=ye,ye.partial||(f.currentConstruct=ye),ye.name&&f.parser.constructs.disable.null.includes(ye.name)?Oe():ye.tokenize.call(ee?Object.assign(Object.create(f),ee):f,d,pe,Oe)(Be)}}function pe(ye){return ie(Z,w),ae}function Oe(ye){return w.restore(),++z<ue.length?O(ue[z]):_e}}}function se(ie,ee){ie.resolveAll&&!a.includes(ie)&&a.push(ie),ie.resolve&&kn(f.events,ee,f.events.length-ee,ie.resolve(f.events.slice(ee),f)),ie.resolveTo&&(f.events=ie.resolveTo(f.events,f))}function he(){const ie=x(),ee=f.previous,we=f.currentConstruct,de=f.events.length,ae=Array.from(c);return{from:de,restore:_e};function _e(){r=ie,f.previous=ee,f.currentConstruct=we,f.events.length=de,c=ae,V()}}function V(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function Vk(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function qk(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=`
|
|
23
|
+
`+b.stack}return{value:i,source:o,stack:E,digest:null}}function xm(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function wm(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var x7=typeof WeakMap=="function"?WeakMap:Map;function aw(i,o,c){c=Qr(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){Yc||(Yc=!0,Bm=h),wm(i,o)},c}function uw(i,o,c){c=Qr(-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"&&(ki===null?ki=new Set([this]):ki.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})}),c}function lw(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new x7;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=M7.bind(null,i,o,c),o.then(i,i))}function cw(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 dw(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=Qr(-1,1),o.tag=2,Ni(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var w7=j.ReactCurrentOwner,vn=!1;function dn(i,o,c,h){o.child=i===null?Ix(o,null,c,h):No(o,i.child,c,h)}function fw(i,o,c,h,E){c=c.render;var b=o.ref;return ko(o,E),h=pm(i,o,c,h,b,E),c=mm(),i!==null&&!vn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Jr(i,o,E)):(Et&&c&&Qp(o),o.flags|=1,dn(i,o,h,E),o.child)}function hw(i,o,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!qm(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=b,pw(i,o,b,h,E)):(i=Jc(c.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(b=i.child,(i.lanes&E)===0){var w=b.memoizedProps;if(c=c.compare,c=c!==null?c:Wa,c(w,h)&&i.ref===o.ref)return Jr(i,o,E)}return o.flags|=1,i=Ri(b,h),i.ref=o.ref,i.return=o,o.child=i}function pw(i,o,c,h,E){if(i!==null){var b=i.memoizedProps;if(Wa(b,h)&&i.ref===o.ref)if(vn=!1,o.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(vn=!0);else return o.lanes=i.lanes,Jr(i,o,E)}return Sm(i,o,c,h,E)}function mw(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},ct(Ro,Bn),Bn|=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,ct(Ro,Bn),Bn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,ct(Ro,Bn),Bn|=h}else b!==null?(h=b.baseLanes|c,o.memoizedState=null):h=c,ct(Ro,Bn),Bn|=h;return dn(i,o,E,c),o.child}function gw(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function Sm(i,o,c,h,E){var b=Sn(c)?fs:nn.current;return b=wo(o,b),ko(o,E),c=pm(i,o,c,h,b,E),h=mm(),i!==null&&!vn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Jr(i,o,E)):(Et&&h&&Qp(o),o.flags|=1,dn(i,o,c,E),o.child)}function Ew(i,o,c,h,E){if(Sn(c)){var b=!0;wc(o)}else b=!1;if(ko(o,E),o.stateNode===null)jc(i,o),sw(o,c,h),_m(o,c,h,E),h=!0;else if(i===null){var w=o.stateNode,M=o.memoizedProps;w.props=M;var z=w.context,Z=c.contextType;typeof Z=="object"&&Z!==null?Z=Yn(Z):(Z=Sn(c)?fs:nn.current,Z=wo(o,Z));var Ee=c.getDerivedStateFromProps,be=typeof Ee=="function"||typeof w.getSnapshotBeforeUpdate=="function";be||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==h||z!==Z)&&ow(o,w,h,Z),Ai=!1;var pe=o.memoizedState;w.state=pe,Pc(o,h,w,E),z=o.memoizedState,M!==h||pe!==z||wn.current||Ai?(typeof Ee=="function"&&(bm(o,c,Ee,h),z=o.memoizedState),(M=Ai||iw(o,c,M,h,pe,z,Z))?(be||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(o.flags|=4194308)):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=z),w.props=h,w.state=z,w.context=Z,h=M):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{w=o.stateNode,Rx(i,o),M=o.memoizedProps,Z=o.type===o.elementType?M:fr(o.type,M),w.props=Z,be=o.pendingProps,pe=w.context,z=c.contextType,typeof z=="object"&&z!==null?z=Yn(z):(z=Sn(c)?fs:nn.current,z=wo(o,z));var Ce=c.getDerivedStateFromProps;(Ee=typeof Ce=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==be||pe!==z)&&ow(o,w,h,z),Ai=!1,pe=o.memoizedState,w.state=pe,Pc(o,h,w,E);var Oe=o.memoizedState;M!==be||pe!==Oe||wn.current||Ai?(typeof Ce=="function"&&(bm(o,c,Ce,h),Oe=o.memoizedState),(Z=Ai||iw(o,c,Z,h,pe,Oe,z)||!1)?(Ee||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(h,Oe,z),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(h,Oe,z)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Oe),w.props=h,w.state=Oe,w.context=z,h=Z):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),h=!1)}return vm(i,o,c,h,b,E)}function vm(i,o,c,h,E,b){gw(i,o);var w=(o.flags&128)!==0;if(!h&&!w)return E&&xx(o,c,!1),Jr(i,o,b);h=o.stateNode,w7.current=o;var M=w&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&w?(o.child=No(o,i.child,null,b),o.child=No(o,null,M,b)):dn(i,o,M,b),o.memoizedState=h.state,E&&xx(o,c,!0),o.child}function yw(i){var o=i.stateNode;o.pendingContext?bx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&bx(i,o.context,!1),um(i,o.containerInfo)}function Tw(i,o,c,h,E){return Ao(),tm(E),o.flags|=256,dn(i,o,c,h),o.child}var Am={dehydrated:null,treeContext:null,retryLane:0};function Nm(i){return{baseLanes:i,cachePool:null,transitions:null}}function bw(i,o,c){var h=o.pendingProps,E=yt.current,b=!1,w=(o.flags&128)!==0,M;if((M=w)||(M=i!==null&&i.memoizedState===null?!1:(E&2)!==0),M?(b=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),ct(yt,E&1),i===null)return em(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(w=h.children,i=h.fallback,b?(h=o.mode,b=o.child,w={mode:"hidden",children:w},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=w):b=Zc(w,h,0,null),i=xs(i,h,c,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=Nm(c),o.memoizedState=Am,i):Cm(o,w));if(E=i.memoizedState,E!==null&&(M=E.dehydrated,M!==null))return S7(i,o,w,h,M,E,c);if(b){b=h.fallback,w=o.mode,E=i.child,M=E.sibling;var z={mode:"hidden",children:h.children};return(w&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=z,o.deletions=null):(h=Ri(E,z),h.subtreeFlags=E.subtreeFlags&14680064),M!==null?b=Ri(M,b):(b=xs(b,w,c,null),b.flags|=2),b.return=o,h.return=o,h.sibling=b,o.child=h,h=b,b=o.child,w=i.child.memoizedState,w=w===null?Nm(c):{baseLanes:w.baseLanes|c,cachePool:null,transitions:w.transitions},b.memoizedState=w,b.childLanes=i.childLanes&~c,o.memoizedState=Am,h}return b=i.child,i=b.sibling,h=Ri(b,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=c),h.return=o,h.sibling=null,i!==null&&(c=o.deletions,c===null?(o.deletions=[i],o.flags|=16):c.push(i)),o.child=h,o.memoizedState=null,h}function Cm(i,o){return o=Zc({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function Hc(i,o,c,h){return h!==null&&tm(h),No(o,i.child,null,c),i=Cm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function S7(i,o,c,h,E,b,w){if(c)return o.flags&256?(o.flags&=-257,h=xm(Error(n(422))),Hc(i,o,w,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(b=h.fallback,E=o.mode,h=Zc({mode:"visible",children:h.children},E,0,null),b=xs(b,E,w,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&No(o,i.child,null,w),o.child.memoizedState=Nm(w),o.memoizedState=Am,b);if((o.mode&1)===0)return Hc(i,o,w,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var M=h.dgst;return h=M,b=Error(n(419)),h=xm(b,h,void 0),Hc(i,o,w,h)}if(M=(w&i.childLanes)!==0,vn||M){if(h=jt,h!==null){switch(w&-w){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|w))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,Kr(i,E),mr(h,i,E,-1))}return Vm(),h=xm(Error(n(421))),Hc(i,o,w,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=F7.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Fn=xi(E.nextSibling),Mn=o,Et=!0,dr=null,i!==null&&(Vn[qn++]=Gr,Vn[qn++]=Xr,Vn[qn++]=hs,Gr=i.id,Xr=i.overflow,hs=o),o=Cm(o,h.children),o.flags|=4096,o)}function _w(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),sm(i.return,o,c)}function km(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 xw(i,o,c){var h=o.pendingProps,E=h.revealOrder,b=h.tail;if(dn(i,o,h.children,c),h=yt.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&&_w(i,c,o);else if(i.tag===19)_w(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(ct(yt,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&&Rc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),km(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&&Rc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}km(o,!0,c,null,b);break;case"together":km(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function jc(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function Jr(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),ys|=o.lanes,(c&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,c=Ri(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=Ri(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function v7(i,o,c){switch(o.tag){case 3:yw(o),Ao();break;case 5:Mx(o);break;case 1:Sn(o.type)&&wc(o);break;case 4:um(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;ct(kc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(ct(yt,yt.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?bw(i,o,c):(ct(yt,yt.current&1),i=Jr(i,o,c),i!==null?i.sibling:null);ct(yt,yt.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return xw(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ct(yt,yt.current),h)break;return null;case 22:case 23:return o.lanes=0,mw(i,o,c)}return Jr(i,o,c)}var ww,Om,Sw,vw;ww=function(i,o){for(var c=o.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Om=function(){},Sw=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,gs(Lr.current);var b=null;switch(c){case"input":E=or(i,E),h=or(i,h),b=[];break;case"select":E=N({},E,{value:void 0}),h=N({},h,{value:void 0}),b=[];break;case"textarea":E=ur(i,E),h=ur(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=bc)}Wt(c,h);var w;c=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var M=E[Z];for(w in M)M.hasOwnProperty(w)&&(c||(c={}),c[w]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(s.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in h){var z=h[Z];if(M=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&z!==M&&(z!=null||M!=null))if(Z==="style")if(M){for(w in M)!M.hasOwnProperty(w)||z&&z.hasOwnProperty(w)||(c||(c={}),c[w]="");for(w in z)z.hasOwnProperty(w)&&M[w]!==z[w]&&(c||(c={}),c[w]=z[w])}else c||(b||(b=[]),b.push(Z,c)),c=z;else Z==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,M=M?M.__html:void 0,z!=null&&M!==z&&(b=b||[]).push(Z,z)):Z==="children"?typeof z!="string"&&typeof z!="number"||(b=b||[]).push(Z,""+z):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?(z!=null&&Z==="onScroll"&&ht("scroll",i),b||M===z||(b=[])):(b=b||[]).push(Z,z))}c&&(b=b||[]).push("style",c);var Z=b;(o.updateQueue=Z)&&(o.flags|=4)}},vw=function(i,o,c,h){c!==h&&(o.flags|=4)};function uu(i,o){if(!Et)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 sn(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 A7(i,o,c){var h=o.pendingProps;switch(Jp(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return sn(o),null;case 1:return Sn(o.type)&&xc(),sn(o),null;case 3:return h=o.stateNode,Oo(),pt(wn),pt(nn),dm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Nc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,dr!==null&&(jm(dr),dr=null))),Om(i,o),sn(o),null;case 5:lm(o);var E=gs(ru.current);if(c=o.type,i!==null&&o.stateNode!=null)Sw(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 sn(o),null}if(i=gs(Lr.current),Nc(o)){h=o.stateNode,c=o.type;var b=o.memoizedProps;switch(h[Rr]=o,h[Ja]=b,i=(o.mode&1)!==0,c){case"dialog":ht("cancel",h),ht("close",h);break;case"iframe":case"object":case"embed":ht("load",h);break;case"video":case"audio":for(E=0;E<Xa.length;E++)ht(Xa[E],h);break;case"source":ht("error",h);break;case"img":case"image":case"link":ht("error",h),ht("load",h);break;case"details":ht("toggle",h);break;case"input":cn(h,b),ht("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},ht("invalid",h);break;case"textarea":Kl(h,b),ht("invalid",h)}Wt(c,b),E=null;for(var w in b)if(b.hasOwnProperty(w)){var M=b[w];w==="children"?typeof M=="string"?h.textContent!==M&&(b.suppressHydrationWarning!==!0&&Tc(h.textContent,M,i),E=["children",M]):typeof M=="number"&&h.textContent!==""+M&&(b.suppressHydrationWarning!==!0&&Tc(h.textContent,M,i),E=["children",""+M]):s.hasOwnProperty(w)&&M!=null&&w==="onScroll"&&ht("scroll",h)}switch(c){case"input":Ve(h),Rn(h,b,!0);break;case"textarea":Ve(h),Jl(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{w=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=oe(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=w.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=w.createElement(c,{is:h.is}):(i=w.createElement(c),c==="select"&&(w=i,h.multiple?w.multiple=!0:h.size&&(w.size=h.size))):i=w.createElementNS(i,c),i[Rr]=o,i[Ja]=h,ww(i,o,!1,!1),o.stateNode=i;e:{switch(w=Ir(c,h),c){case"dialog":ht("cancel",i),ht("close",i),E=h;break;case"iframe":case"object":case"embed":ht("load",i),E=h;break;case"video":case"audio":for(E=0;E<Xa.length;E++)ht(Xa[E],i);E=h;break;case"source":ht("error",i),E=h;break;case"img":case"image":case"link":ht("error",i),ht("load",i),E=h;break;case"details":ht("toggle",i),E=h;break;case"input":cn(i,h),E=or(i,h),ht("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=N({},h,{value:void 0}),ht("invalid",i);break;case"textarea":Kl(i,h),E=ur(i,h),ht("invalid",i);break;default:E=h}Wt(c,E),M=E;for(b in M)if(M.hasOwnProperty(b)){var z=M[b];b==="style"?mi(i,z):b==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&Ge(i,z)):b==="children"?typeof z=="string"?(c!=="textarea"||z!=="")&&Ze(i,z):typeof z=="number"&&Ze(i,""+z):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?z!=null&&b==="onScroll"&&ht("scroll",i):z!=null&&P(i,b,z,w))}switch(c){case"input":Ve(i),Rn(i,h,!1);break;case"textarea":Ve(i),Jl(i);break;case"option":h.value!=null&&i.setAttribute("value",""+ye(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?Or(i,!!h.multiple,b,!1):h.defaultValue!=null&&Or(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=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 sn(o),null;case 6:if(i&&o.stateNode!=null)vw(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=gs(ru.current),gs(Lr.current),Nc(o)){if(h=o.stateNode,c=o.memoizedProps,h[Rr]=o,(b=h.nodeValue!==c)&&(i=Mn,i!==null))switch(i.tag){case 3:Tc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Tc(h.nodeValue,c,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Rr]=o,o.stateNode=h}return sn(o),null;case 13:if(pt(yt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Et&&Fn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)Cx(),Ao(),o.flags|=98560,b=!1;else if(b=Nc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Rr]=o}else Ao(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;sn(o),b=!1}else dr!==null&&(jm(dr),dr=null),b=!0;if(!b)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=c,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(yt.current&1)!==0?Dt===0&&(Dt=3):Vm())),o.updateQueue!==null&&(o.flags|=4),sn(o),null);case 4:return Oo(),Om(i,o),i===null&&Ka(o.stateNode.containerInfo),sn(o),null;case 10:return im(o.type._context),sn(o),null;case 17:return Sn(o.type)&&xc(),sn(o),null;case 19:if(pt(yt),b=o.memoizedState,b===null)return sn(o),null;if(h=(o.flags&128)!==0,w=b.rendering,w===null)if(h)uu(b,!1);else{if(Dt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(w=Rc(i),w!==null){for(o.flags|=128,uu(b,!1),h=w.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)b=c,i=h,b.flags&=14680066,w=b.alternate,w===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=w.childLanes,b.lanes=w.lanes,b.child=w.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=w.memoizedProps,b.memoizedState=w.memoizedState,b.updateQueue=w.updateQueue,b.type=w.type,i=w.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return ct(yt,yt.current&1|2),o.child}i=i.sibling}b.tail!==null&&vt()>Lo&&(o.flags|=128,h=!0,uu(b,!1),o.lanes=4194304)}else{if(!h)if(i=Rc(w),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),uu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!w.alternate&&!Et)return sn(o),null}else 2*vt()-b.renderingStartTime>Lo&&c!==1073741824&&(o.flags|=128,h=!0,uu(b,!1),o.lanes=4194304);b.isBackwards?(w.sibling=o.child,o.child=w):(c=b.last,c!==null?c.sibling=w:o.child=w,b.last=w)}return b.tail!==null?(o=b.tail,b.rendering=o,b.tail=o.sibling,b.renderingStartTime=vt(),o.sibling=null,c=yt.current,ct(yt,h?c&1|2:c&1),o):(sn(o),null);case 22:case 23:return $m(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Bn&1073741824)!==0&&(sn(o),o.subtreeFlags&6&&(o.flags|=8192)):sn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function N7(i,o){switch(Jp(o),o.tag){case 1:return Sn(o.type)&&xc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Oo(),pt(wn),pt(nn),dm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return lm(o),null;case 13:if(pt(yt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ao()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return pt(yt),null;case 4:return Oo(),null;case 10:return im(o.type._context),null;case 22:case 23:return $m(),null;case 24:return null;default:return null}}var zc=!1,on=!1,C7=typeof WeakSet=="function"?WeakSet:Set,ke=null;function Po(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){xt(i,o,h)}else c.current=null}function Im(i,o,c){try{c()}catch(h){xt(i,o,h)}}var Aw=!1;function k7(i,o){if($p=uc,i=ix(),Dp(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var E=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{c.nodeType,b.nodeType}catch(Se){c=null;break e}var w=0,M=-1,z=-1,Z=0,Ee=0,be=i,pe=null;t:for(;;){for(var Ce;be!==c||E!==0&&be.nodeType!==3||(M=w+E),be!==b||h!==0&&be.nodeType!==3||(z=w+h),be.nodeType===3&&(w+=be.nodeValue.length),(Ce=be.firstChild)!==null;)pe=be,be=Ce;for(;;){if(be===i)break t;if(pe===c&&++Z===E&&(M=w),pe===b&&++Ee===h&&(z=w),(Ce=be.nextSibling)!==null)break;be=pe,pe=be.parentNode}be=Ce}c=M===-1||z===-1?null:{start:M,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for(Vp={focusedElem:i,selectionRange:c},uc=!1,ke=o;ke!==null;)if(o=ke,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,ke=i;else for(;ke!==null;){o=ke;try{var Oe=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Oe!==null){var Ie=Oe.memoizedProps,At=Oe.memoizedState,G=o.stateNode,V=G.getSnapshotBeforeUpdate(o.elementType===o.type?Ie:fr(o.type,Ie),At);G.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var J=o.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Se){xt(o,o.return,Se)}if(i=o.sibling,i!==null){i.return=o.return,ke=i;break}ke=o.return}return Oe=Aw,Aw=!1,Oe}function lu(i,o,c){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var b=E.destroy;E.destroy=void 0,b!==void 0&&Im(o,c,b)}E=E.next}while(E!==h)}}function $c(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&i)===i){var h=c.create;c.destroy=h()}c=c.next}while(c!==o)}}function Pm(i){var o=i.ref;if(o!==null){var c=i.stateNode;i.tag,i=c,typeof o=="function"?o(i):o.current=i}}function Nw(i){var o=i.alternate;o!==null&&(i.alternate=null,Nw(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Rr],delete o[Ja],delete o[Gp],delete o[d7],delete o[f7])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function Cw(i){return i.tag===5||i.tag===3||i.tag===4}function kw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Cw(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Rm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.nodeType===8?c.parentNode.insertBefore(i,o):c.insertBefore(i,o):(c.nodeType===8?(o=c.parentNode,o.insertBefore(i,c)):(o=c,o.appendChild(i)),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=bc));else if(h!==4&&(i=i.child,i!==null))for(Rm(i,o,c),i=i.sibling;i!==null;)Rm(i,o,c),i=i.sibling}function Lm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Lm(i,o,c),i=i.sibling;i!==null;)Lm(i,o,c),i=i.sibling}var Gt=null,hr=!1;function Ci(i,o,c){for(c=c.child;c!==null;)Ow(i,o,c),c=c.sibling}function Ow(i,o,c){if(Pr&&typeof Pr.onCommitFiberUnmount=="function")try{Pr.onCommitFiberUnmount(nc,c)}catch(M){}switch(c.tag){case 5:on||Po(c,o);case 6:var h=Gt,E=hr;Gt=null,Ci(i,o,c),Gt=h,hr=E,Gt!==null&&(hr?(i=Gt,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):Gt.removeChild(c.stateNode));break;case 18:Gt!==null&&(hr?(i=Gt,c=c.stateNode,i.nodeType===8?Wp(i.parentNode,c):i.nodeType===1&&Wp(i,c),ja(i)):Wp(Gt,c.stateNode));break;case 4:h=Gt,E=hr,Gt=c.stateNode.containerInfo,hr=!0,Ci(i,o,c),Gt=h,hr=E;break;case 0:case 11:case 14:case 15:if(!on&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,w=b.destroy;b=b.tag,w!==void 0&&((b&2)!==0||(b&4)!==0)&&Im(c,o,w),E=E.next}while(E!==h)}Ci(i,o,c);break;case 1:if(!on&&(Po(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(M){xt(c,o,M)}Ci(i,o,c);break;case 21:Ci(i,o,c);break;case 22:c.mode&1?(on=(h=on)||c.memoizedState!==null,Ci(i,o,c),on=h):Ci(i,o,c);break;default:Ci(i,o,c)}}function Iw(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new C7),o.forEach(function(h){var E=B7.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function pr(i,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var b=i,w=o,M=w;e:for(;M!==null;){switch(M.tag){case 5:Gt=M.stateNode,hr=!1;break e;case 3:Gt=M.stateNode.containerInfo,hr=!0;break e;case 4:Gt=M.stateNode.containerInfo,hr=!0;break e}M=M.return}if(Gt===null)throw Error(n(160));Ow(b,w,E),Gt=null,hr=!1;var z=E.alternate;z!==null&&(z.return=null),E.return=null}catch(Z){xt(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Pw(o,i),o=o.sibling}function Pw(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(pr(o,i),Mr(i),h&4){try{lu(3,i,i.return),$c(3,i)}catch(Ie){xt(i,i.return,Ie)}try{lu(5,i,i.return)}catch(Ie){xt(i,i.return,Ie)}}break;case 1:pr(o,i),Mr(i),h&512&&c!==null&&Po(c,c.return);break;case 5:if(pr(o,i),Mr(i),h&512&&c!==null&&Po(c,c.return),i.flags&32){var E=i.stateNode;try{Ze(E,"")}catch(Ie){xt(i,i.return,Ie)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,w=c!==null?c.memoizedProps:b,M=i.type,z=i.updateQueue;if(i.updateQueue=null,z!==null)try{M==="input"&&b.type==="radio"&&b.name!=null&&ze(E,b),Ir(M,w);var Z=Ir(M,b);for(w=0;w<z.length;w+=2){var Ee=z[w],be=z[w+1];Ee==="style"?mi(E,be):Ee==="dangerouslySetInnerHTML"?Ge(E,be):Ee==="children"?Ze(E,be):P(E,Ee,be,Z)}switch(M){case"input":Ot(E,b);break;case"textarea":Ql(E,b);break;case"select":var pe=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var Ce=b.value;Ce!=null?Or(E,!!b.multiple,Ce,!1):pe!==!!b.multiple&&(b.defaultValue!=null?Or(E,!!b.multiple,b.defaultValue,!0):Or(E,!!b.multiple,b.multiple?[]:"",!1))}E[Ja]=b}catch(Ie){xt(i,i.return,Ie)}}break;case 6:if(pr(o,i),Mr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Ie){xt(i,i.return,Ie)}}break;case 3:if(pr(o,i),Mr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{ja(o.containerInfo)}catch(Ie){xt(i,i.return,Ie)}break;case 4:pr(o,i),Mr(i);break;case 13:pr(o,i),Mr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(Fm=vt())),h&4&&Iw(i);break;case 22:if(Ee=c!==null&&c.memoizedState!==null,i.mode&1?(on=(Z=on)||Ee,pr(o,i),on=Z):pr(o,i),Mr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!Ee&&(i.mode&1)!==0)for(ke=i,Ee=i.child;Ee!==null;){for(be=ke=Ee;ke!==null;){switch(pe=ke,Ce=pe.child,pe.tag){case 0:case 11:case 14:case 15:lu(4,pe,pe.return);break;case 1:Po(pe,pe.return);var Oe=pe.stateNode;if(typeof Oe.componentWillUnmount=="function"){h=pe,c=pe.return;try{o=h,Oe.props=o.memoizedProps,Oe.state=o.memoizedState,Oe.componentWillUnmount()}catch(Ie){xt(h,c,Ie)}}break;case 5:Po(pe,pe.return);break;case 22:if(pe.memoizedState!==null){Dw(be);continue}}Ce!==null?(Ce.return=pe,ke=Ce):Dw(be)}Ee=Ee.sibling}e:for(Ee=null,be=i;;){if(be.tag===5){if(Ee===null){Ee=be;try{E=be.stateNode,Z?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(M=be.stateNode,z=be.memoizedProps.style,w=z!=null&&z.hasOwnProperty("display")?z.display:null,M.style.display=$n("display",w))}catch(Ie){xt(i,i.return,Ie)}}}else if(be.tag===6){if(Ee===null)try{be.stateNode.nodeValue=Z?"":be.memoizedProps}catch(Ie){xt(i,i.return,Ie)}}else if((be.tag!==22&&be.tag!==23||be.memoizedState===null||be===i)&&be.child!==null){be.child.return=be,be=be.child;continue}if(be===i)break e;for(;be.sibling===null;){if(be.return===null||be.return===i)break e;Ee===be&&(Ee=null),be=be.return}Ee===be&&(Ee=null),be.sibling.return=be.return,be=be.sibling}}break;case 19:pr(o,i),Mr(i),h&4&&Iw(i);break;case 21:break;default:pr(o,i),Mr(i)}}function Mr(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(Cw(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&&(Ze(E,""),h.flags&=-33);var b=kw(i);Lm(i,b,E);break;case 3:case 4:var w=h.stateNode.containerInfo,M=kw(i);Rm(i,M,w);break;default:throw Error(n(161))}}catch(z){xt(i,i.return,z)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function O7(i,o,c){ke=i,Rw(i)}function Rw(i,o,c){for(var h=(i.mode&1)!==0;ke!==null;){var E=ke,b=E.child;if(E.tag===22&&h){var w=E.memoizedState!==null||zc;if(!w){var M=E.alternate,z=M!==null&&M.memoizedState!==null||on;M=zc;var Z=on;if(zc=w,(on=z)&&!Z)for(ke=E;ke!==null;)w=ke,z=w.child,w.tag===22&&w.memoizedState!==null?Mw(E):z!==null?(z.return=w,ke=z):Mw(E);for(;b!==null;)ke=b,Rw(b),b=b.sibling;ke=E,zc=M,on=Z}Lw(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,ke=b):Lw(i)}}function Lw(i){for(;ke!==null;){var o=ke;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:on||$c(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!on)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:fr(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&Dx(o,b,h);break;case 3:var w=o.updateQueue;if(w!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}Dx(o,w,c)}break;case 5:var M=o.stateNode;if(c===null&&o.flags&4){c=M;var z=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&c.focus();break;case"img":z.src&&(c.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Z=o.alternate;if(Z!==null){var Ee=Z.memoizedState;if(Ee!==null){var be=Ee.dehydrated;be!==null&&ja(be)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}on||o.flags&512&&Pm(o)}catch(pe){xt(o,o.return,pe)}}if(o===i){ke=null;break}if(c=o.sibling,c!==null){c.return=o.return,ke=c;break}ke=o.return}}function Dw(i){for(;ke!==null;){var o=ke;if(o===i){ke=null;break}var c=o.sibling;if(c!==null){c.return=o.return,ke=c;break}ke=o.return}}function Mw(i){for(;ke!==null;){var o=ke;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{$c(4,o)}catch(z){xt(o,c,z)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(z){xt(o,E,z)}}var b=o.return;try{Pm(o)}catch(z){xt(o,b,z)}break;case 5:var w=o.return;try{Pm(o)}catch(z){xt(o,w,z)}}}catch(z){xt(o,o.return,z)}if(o===i){ke=null;break}var M=o.sibling;if(M!==null){M.return=o.return,ke=M;break}ke=o.return}}var I7=Math.ceil,Vc=j.ReactCurrentDispatcher,Dm=j.ReactCurrentOwner,Gn=j.ReactCurrentBatchConfig,et=0,jt=null,It=null,Xt=0,Bn=0,Ro=wi(0),Dt=0,cu=null,ys=0,qc=0,Mm=0,du=null,An=null,Fm=0,Lo=1/0,Zr=null,Yc=!1,Bm=null,ki=null,Wc=!1,Oi=null,Gc=0,fu=0,Um=null,Xc=-1,Kc=0;function fn(){return(et&6)!==0?vt():Xc!==-1?Xc:Xc=vt()}function Ii(i){return(i.mode&1)===0?1:(et&2)!==0&&Xt!==0?Xt&-Xt:p7.transition!==null?(Kc===0&&(Kc=k_()),Kc):(i=it,i!==0||(i=window.event,i=i===void 0?16:B_(i.type)),i)}function mr(i,o,c,h){if(50<fu)throw fu=0,Um=null,Error(n(185));Ma(i,c,h),((et&2)===0||i!==jt)&&(i===jt&&((et&2)===0&&(qc|=c),Dt===4&&Pi(i,Xt)),Nn(i,h),c===1&&et===0&&(o.mode&1)===0&&(Lo=vt()+500,Sc&&vi()))}function Nn(i,o){var c=i.callbackNode;pF(i,o);var h=sc(i,i===jt?Xt:0);if(h===0)c!==null&&A_(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&A_(c),o===1)i.tag===0?h7(Bw.bind(null,i)):wx(Bw.bind(null,i)),l7(function(){(et&6)===0&&vi()}),c=null;else{switch(O_(h)){case 1:c=yp;break;case 4:c=N_;break;case 16:c=tc;break;case 536870912:c=C_;break;default:c=tc}c=Yw(c,Fw.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function Fw(i,o){if(Xc=-1,Kc=0,(et&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Do()&&i.callbackNode!==c)return null;var h=sc(i,i===jt?Xt:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=Qc(i,h);else{o=h;var E=et;et|=2;var b=Hw();(jt!==i||Xt!==o)&&(Zr=null,Lo=vt()+500,bs(i,o));do try{L7();break}catch(M){Uw(i,M)}while(!0);rm(),Vc.current=b,et=E,It!==null?o=0:(jt=null,Xt=0,o=Dt)}if(o!==0){if(o===2&&(E=Tp(i),E!==0&&(h=E,o=Hm(i,E))),o===1)throw c=cu,bs(i,0),Pi(i,h),Nn(i,vt()),c;if(o===6)Pi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!P7(E)&&(o=Qc(i,h),o===2&&(b=Tp(i),b!==0&&(h=b,o=Hm(i,b))),o===1))throw c=cu,bs(i,0),Pi(i,h),Nn(i,vt()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:_s(i,An,Zr);break;case 3:if(Pi(i,h),(h&130023424)===h&&(o=Fm+500-vt(),10<o)){if(sc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){fn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Yp(_s.bind(null,i,An,Zr),o);break}_s(i,An,Zr);break;case 4:if(Pi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var w=31-lr(h);b=1<<w,w=o[w],w>E&&(E=w),h&=~b}if(h=E,h=vt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*I7(h/1960))-h,10<h){i.timeoutHandle=Yp(_s.bind(null,i,An,Zr),h);break}_s(i,An,Zr);break;case 5:_s(i,An,Zr);break;default:throw Error(n(329))}}}return Nn(i,vt()),i.callbackNode===c?Fw.bind(null,i):null}function Hm(i,o){var c=du;return i.current.memoizedState.isDehydrated&&(bs(i,o).flags|=256),i=Qc(i,o),i!==2&&(o=An,An=c,o!==null&&jm(o)),i}function jm(i){An===null?An=i:An.push.apply(An,i)}function P7(i){for(var o=i;;){if(o.flags&16384){var c=o.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var E=c[h],b=E.getSnapshot;E=E.value;try{if(!cr(b(),E))return!1}catch(w){return!1}}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Pi(i,o){for(o&=~Mm,o&=~qc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-lr(o),h=1<<c;i[c]=-1,o&=~h}}function Bw(i){if((et&6)!==0)throw Error(n(327));Do();var o=sc(i,0);if((o&1)===0)return Nn(i,vt()),null;var c=Qc(i,o);if(i.tag!==0&&c===2){var h=Tp(i);h!==0&&(o=h,c=Hm(i,h))}if(c===1)throw c=cu,bs(i,0),Pi(i,o),Nn(i,vt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,_s(i,An,Zr),Nn(i,vt()),null}function zm(i,o){var c=et;et|=1;try{return i(o)}finally{et=c,et===0&&(Lo=vt()+500,Sc&&vi())}}function Ts(i){Oi!==null&&Oi.tag===0&&(et&6)===0&&Do();var o=et;et|=1;var c=Gn.transition,h=it;try{if(Gn.transition=null,it=1,i)return i()}finally{it=h,Gn.transition=c,et=o,(et&6)===0&&vi()}}function $m(){Bn=Ro.current,pt(Ro)}function bs(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,u7(c)),It!==null)for(c=It.return;c!==null;){var h=c;switch(Jp(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&xc();break;case 3:Oo(),pt(wn),pt(nn),dm();break;case 5:lm(h);break;case 4:Oo();break;case 13:pt(yt);break;case 19:pt(yt);break;case 10:im(h.type._context);break;case 22:case 23:$m()}c=c.return}if(jt=i,It=i=Ri(i.current,null),Xt=Bn=o,Dt=0,cu=null,Mm=qc=ys=0,An=du=null,ms!==null){for(o=0;o<ms.length;o++)if(c=ms[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var w=b.next;b.next=E,h.next=w}c.pending=h}ms=null}return i}function Uw(i,o){do{var c=It;try{if(rm(),Lc.current=Bc,Dc){for(var h=Tt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Dc=!1}if(Es=0,Ht=Lt=Tt=null,iu=!1,su=0,Dm.current=null,c===null||c.return===null){Dt=1,cu=o,It=null;break}e:{var b=i,w=c.return,M=c,z=o;if(o=Xt,M.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var Z=z,Ee=M,be=Ee.tag;if((Ee.mode&1)===0&&(be===0||be===11||be===15)){var pe=Ee.alternate;pe?(Ee.updateQueue=pe.updateQueue,Ee.memoizedState=pe.memoizedState,Ee.lanes=pe.lanes):(Ee.updateQueue=null,Ee.memoizedState=null)}var Ce=cw(w);if(Ce!==null){Ce.flags&=-257,dw(Ce,w,M,b,o),Ce.mode&1&&lw(b,Z,o),o=Ce,z=Z;var Oe=o.updateQueue;if(Oe===null){var Ie=new Set;Ie.add(z),o.updateQueue=Ie}else Oe.add(z);break e}else{if((o&1)===0){lw(b,Z,o),Vm();break e}z=Error(n(426))}}else if(Et&&M.mode&1){var At=cw(w);if(At!==null){(At.flags&65536)===0&&(At.flags|=256),dw(At,w,M,b,o),tm(Io(z,M));break e}}b=z=Io(z,M),Dt!==4&&(Dt=2),du===null?du=[b]:du.push(b),b=w;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var G=aw(b,z,o);Lx(b,G);break e;case 1:M=z;var V=b.type,J=b.stateNode;if((b.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(ki===null||!ki.has(J)))){b.flags|=65536,o&=-o,b.lanes|=o;var Se=uw(b,M,o);Lx(b,Se);break e}}b=b.return}while(b!==null)}zw(c)}catch(Pe){o=Pe,It===c&&c!==null&&(It=c=c.return);continue}break}while(!0)}function Hw(){var i=Vc.current;return Vc.current=Bc,i===null?Bc:i}function Vm(){(Dt===0||Dt===3||Dt===2)&&(Dt=4),jt===null||(ys&268435455)===0&&(qc&268435455)===0||Pi(jt,Xt)}function Qc(i,o){var c=et;et|=2;var h=Hw();(jt!==i||Xt!==o)&&(Zr=null,bs(i,o));do try{R7();break}catch(E){Uw(i,E)}while(!0);if(rm(),et=c,Vc.current=h,It!==null)throw Error(n(261));return jt=null,Xt=0,Dt}function R7(){for(;It!==null;)jw(It)}function L7(){for(;It!==null&&!sF();)jw(It)}function jw(i){var o=qw(i.alternate,i,Bn);i.memoizedProps=i.pendingProps,o===null?zw(i):It=o,Dm.current=null}function zw(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=A7(c,o,Bn),c!==null){It=c;return}}else{if(c=N7(c,o),c!==null){c.flags&=32767,It=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Dt=6,It=null;return}}if(o=o.sibling,o!==null){It=o;return}It=o=i}while(o!==null);Dt===0&&(Dt=5)}function _s(i,o,c){var h=it,E=Gn.transition;try{Gn.transition=null,it=1,D7(i,o,c,h)}finally{Gn.transition=E,it=h}return null}function D7(i,o,c,h){do Do();while(Oi!==null);if((et&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(mF(i,b),i===jt&&(It=jt=null,Xt=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Wc||(Wc=!0,Yw(tc,function(){return Do(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=Gn.transition,Gn.transition=null;var w=it;it=1;var M=et;et|=4,Dm.current=null,k7(i,c),Pw(c,i),t7(Vp),uc=!!$p,Vp=$p=null,i.current=c,O7(c),oF(),et=M,it=w,Gn.transition=b}else i.current=c;if(Wc&&(Wc=!1,Oi=i,Gc=E),b=i.pendingLanes,b===0&&(ki=null),lF(c.stateNode),Nn(i,vt()),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(Yc)throw Yc=!1,i=Bm,Bm=null,i;return(Gc&1)!==0&&i.tag!==0&&Do(),b=i.pendingLanes,(b&1)!==0?i===Um?fu++:(fu=0,Um=i):fu=0,vi(),null}function Do(){if(Oi!==null){var i=O_(Gc),o=Gn.transition,c=it;try{if(Gn.transition=null,it=16>i?16:i,Oi===null)var h=!1;else{if(i=Oi,Oi=null,Gc=0,(et&6)!==0)throw Error(n(331));var E=et;for(et|=4,ke=i.current;ke!==null;){var b=ke,w=b.child;if((ke.flags&16)!==0){var M=b.deletions;if(M!==null){for(var z=0;z<M.length;z++){var Z=M[z];for(ke=Z;ke!==null;){var Ee=ke;switch(Ee.tag){case 0:case 11:case 15:lu(8,Ee,b)}var be=Ee.child;if(be!==null)be.return=Ee,ke=be;else for(;ke!==null;){Ee=ke;var pe=Ee.sibling,Ce=Ee.return;if(Nw(Ee),Ee===Z){ke=null;break}if(pe!==null){pe.return=Ce,ke=pe;break}ke=Ce}}}var Oe=b.alternate;if(Oe!==null){var Ie=Oe.child;if(Ie!==null){Oe.child=null;do{var At=Ie.sibling;Ie.sibling=null,Ie=At}while(Ie!==null)}}ke=b}}if((b.subtreeFlags&2064)!==0&&w!==null)w.return=b,ke=w;else e:for(;ke!==null;){if(b=ke,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:lu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,ke=G;break e}ke=b.return}}var V=i.current;for(ke=V;ke!==null;){w=ke;var J=w.child;if((w.subtreeFlags&2064)!==0&&J!==null)J.return=w,ke=J;else e:for(w=V;ke!==null;){if(M=ke,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:$c(9,M)}}catch(Pe){xt(M,M.return,Pe)}if(M===w){ke=null;break e}var Se=M.sibling;if(Se!==null){Se.return=M.return,ke=Se;break e}ke=M.return}}if(et=E,vi(),Pr&&typeof Pr.onPostCommitFiberRoot=="function")try{Pr.onPostCommitFiberRoot(nc,i)}catch(Pe){}h=!0}return h}finally{it=c,Gn.transition=o}}return!1}function $w(i,o,c){o=Io(c,o),o=aw(i,o,1),i=Ni(i,o,1),o=fn(),i!==null&&(Ma(i,1,o),Nn(i,o))}function xt(i,o,c){if(i.tag===3)$w(i,i,c);else for(;o!==null;){if(o.tag===3){$w(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ki===null||!ki.has(h))){i=Io(c,i),i=uw(o,i,1),o=Ni(o,i,1),i=fn(),o!==null&&(Ma(o,1,i),Nn(o,i));break}}o=o.return}}function M7(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=fn(),i.pingedLanes|=i.suspendedLanes&c,jt===i&&(Xt&c)===c&&(Dt===4||Dt===3&&(Xt&130023424)===Xt&&500>vt()-Fm?bs(i,0):Mm|=c),Nn(i,o)}function Vw(i,o){o===0&&((i.mode&1)===0?o=1:(o=ic,ic<<=1,(ic&130023424)===0&&(ic=4194304)));var c=fn();i=Kr(i,o),i!==null&&(Ma(i,o,c),Nn(i,c))}function F7(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),Vw(i,c)}function B7(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),Vw(i,c)}var qw;qw=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||wn.current)vn=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return vn=!1,v7(i,o,c);vn=(i.flags&131072)!==0}else vn=!1,Et&&(o.flags&1048576)!==0&&Sx(o,Ac,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;jc(i,o),i=o.pendingProps;var E=wo(o,nn.current);ko(o,c),E=pm(null,o,h,i,E,c);var b=mm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Sn(h)?(b=!0,wc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,am(o),E.updater=Uc,o.stateNode=E,E._reactInternals=o,_m(o,h,i,c),o=vm(null,o,h,!0,b,c)):(o.tag=0,Et&&b&&Qp(o),dn(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(jc(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=H7(h),i=fr(h,i),E){case 0:o=Sm(null,o,h,i,c);break e;case 1:o=Ew(null,o,h,i,c);break e;case 11:o=fw(null,o,h,i,c);break e;case 14:o=hw(null,o,h,fr(h.type,i),c);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),Sm(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),Ew(i,o,h,E,c);case 3:e:{if(yw(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,Rx(i,o),Pc(o,h,null,c);var w=o.memoizedState;if(h=w.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){E=Io(Error(n(423)),o),o=Tw(i,o,h,c,E);break e}else if(h!==E){E=Io(Error(n(424)),o),o=Tw(i,o,h,c,E);break e}else for(Fn=xi(o.stateNode.containerInfo.firstChild),Mn=o,Et=!0,dr=null,c=Ix(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Ao(),h===E){o=Jr(i,o,c);break e}dn(i,o,h,c)}o=o.child}return o;case 5:return Mx(o),i===null&&em(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,w=E.children,qp(h,E)?w=null:b!==null&&qp(h,b)&&(o.flags|=32),gw(i,o),dn(i,o,w,c),o.child;case 6:return i===null&&em(o),null;case 13:return bw(i,o,c);case 4:return um(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=No(o,null,h,c):dn(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),fw(i,o,h,E,c);case 7:return dn(i,o,o.pendingProps,c),o.child;case 8:return dn(i,o,o.pendingProps.children,c),o.child;case 12:return dn(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,b=o.memoizedProps,w=E.value,ct(kc,h._currentValue),h._currentValue=w,b!==null)if(cr(b.value,w)){if(b.children===E.children&&!wn.current){o=Jr(i,o,c);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var M=b.dependencies;if(M!==null){w=b.child;for(var z=M.firstContext;z!==null;){if(z.context===h){if(b.tag===1){z=Qr(-1,c&-c),z.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var Ee=Z.pending;Ee===null?z.next=z:(z.next=Ee.next,Ee.next=z),Z.pending=z}}b.lanes|=c,z=b.alternate,z!==null&&(z.lanes|=c),sm(b.return,c,o),M.lanes|=c;break}z=z.next}}else if(b.tag===10)w=b.type===o.type?null:b.child;else if(b.tag===18){if(w=b.return,w===null)throw Error(n(341));w.lanes|=c,M=w.alternate,M!==null&&(M.lanes|=c),sm(w,c,o),w=b.sibling}else w=b.child;if(w!==null)w.return=b;else for(w=b;w!==null;){if(w===o){w=null;break}if(b=w.sibling,b!==null){b.return=w.return,w=b;break}w=w.return}b=w}dn(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,ko(o,c),E=Yn(E),h=h(E),o.flags|=1,dn(i,o,h,c),o.child;case 14:return h=o.type,E=fr(h,o.pendingProps),E=fr(h.type,E),hw(i,o,h,E,c);case 15:return pw(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),jc(i,o),o.tag=1,Sn(h)?(i=!0,wc(o)):i=!1,ko(o,c),sw(o,h,E),_m(o,h,E,c),vm(null,o,h,!0,i,c);case 19:return xw(i,o,c);case 22:return mw(i,o,c)}throw Error(n(156,o.tag))};function Yw(i,o){return v_(i,o)}function U7(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 Xn(i,o,c,h){return new U7(i,o,c,h)}function qm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function H7(i){if(typeof i=="function")return qm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===te)return 11;if(i===ce)return 14}return 2}function Ri(i,o){var c=i.alternate;return c===null?(c=Xn(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 Jc(i,o,c,h,E,b){var w=2;if(h=i,typeof i=="function")qm(i)&&(w=1);else if(typeof i=="string")w=5;else e:switch(i){case K:return xs(c.children,E,b,o);case ne:w=8,E|=8;break;case de:return i=Xn(12,c,o,E|2),i.elementType=de,i.lanes=b,i;case xe:return i=Xn(13,c,o,E),i.elementType=xe,i.lanes=b,i;case fe:return i=Xn(19,c,o,E),i.elementType=fe,i.lanes=b,i;case le:return Zc(c,E,b,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:w=10;break e;case se:w=9;break e;case te:w=11;break e;case ce:w=14;break e;case he:w=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=Xn(w,c,o,E),o.elementType=i,o.type=h,o.lanes=b,o}function xs(i,o,c,h){return i=Xn(7,i,h,o),i.lanes=c,i}function Zc(i,o,c,h){return i=Xn(22,i,h,o),i.elementType=le,i.lanes=c,i.stateNode={isHidden:!1},i}function Ym(i,o,c){return i=Xn(6,i,null,o),i.lanes=c,i}function Wm(i,o,c){return o=Xn(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function j7(i,o,c,h,E){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bp(0),this.expirationTimes=bp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function Gm(i,o,c,h,E,b,w,M,z){return i=new j7(i,o,c,M,z),o===1?(o=1,b===!0&&(o|=8)):o=0,b=Xn(3,null,null,o),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},am(b),i}function z7(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 Ww(i){if(!i)return Si;i=i._reactInternals;e:{if(cs(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Sn(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(Sn(c))return _x(i,c,o)}return o}function Gw(i,o,c,h,E,b,w,M,z){return i=Gm(c,h,!0,i,E,b,w,M,z),i.context=Ww(null),c=i.current,h=fn(),E=Ii(c),b=Qr(h,E),b.callback=o!=null?o:null,Ni(c,b,E),i.current.lanes=E,Ma(i,E,h),Nn(i,h),i}function ed(i,o,c,h){var E=o.current,b=fn(),w=Ii(E);return c=Ww(c),o.context===null?o.context=c:o.pendingContext=c,o=Qr(b,w),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Ni(E,o,w),i!==null&&(mr(i,E,w,b),Ic(i,E,w)),w}function td(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Xw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function Xm(i,o){Xw(i,o),(i=i.alternate)&&Xw(i,o)}function $7(){return null}var Kw=typeof reportError=="function"?reportError:function(i){console.error(i)};function Km(i){this._internalRoot=i}nd.prototype.render=Km.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));ed(i,o,null,null)},nd.prototype.unmount=Km.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Ts(function(){ed(null,i,null,null)}),o[Yr]=null}};function nd(i){this._internalRoot=i}nd.prototype.unstable_scheduleHydration=function(i){if(i){var o=R_();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Ti.length&&o!==0&&o<Ti[c].priority;c++);Ti.splice(c,0,i),c===0&&M_(i)}};function Qm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function rd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Qw(){}function V7(i,o,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var Z=td(w);b.call(Z)}}var w=Gw(o,h,i,0,null,!1,!1,"",Qw);return i._reactRootContainer=w,i[Yr]=w.current,Ka(i.nodeType===8?i.parentNode:i),Ts(),w}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var M=h;h=function(){var Z=td(z);M.call(Z)}}var z=Gm(i,0,!1,null,null,!1,!1,"",Qw);return i._reactRootContainer=z,i[Yr]=z.current,Ka(i.nodeType===8?i.parentNode:i),Ts(function(){ed(o,z,c,h)}),z}function id(i,o,c,h,E){var b=c._reactRootContainer;if(b){var w=b;if(typeof E=="function"){var M=E;E=function(){var z=td(w);M.call(z)}}ed(o,w,i,E)}else w=V7(c,o,i,E,h);return td(w)}I_=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=Da(o.pendingLanes);c!==0&&(_p(o,c|1),Nn(o,vt()),(et&6)===0&&(Lo=vt()+500,vi()))}break;case 13:Ts(function(){var h=Kr(i,1);if(h!==null){var E=fn();mr(h,i,1,E)}}),Xm(i,1)}},xp=function(i){if(i.tag===13){var o=Kr(i,134217728);if(o!==null){var c=fn();mr(o,i,134217728,c)}Xm(i,134217728)}},P_=function(i){if(i.tag===13){var o=Ii(i),c=Kr(i,o);if(c!==null){var h=fn();mr(c,i,o,h)}Xm(i,o)}},R_=function(){return it},L_=function(i,o){var c=it;try{return it=i,o()}finally{it=c}},pp=function(i,o,c){switch(o){case"input":if(Ot(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=_c(h);if(!E)throw Error(n(90));_t(h),Ot(h,E)}}}break;case"textarea":Ql(i,c);break;case"select":o=c.value,o!=null&&Or(i,!!c.multiple,o,!1)}},y_=zm,T_=Ts;var q7={usingClientEntryPoint:!1,Events:[Za,_o,_c,g_,E_,zm]},hu={findFiberByHostInstance:ds,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Y7={bundleType:hu.bundleType,version:hu.version,rendererPackageName:hu.rendererPackageName,rendererConfig:hu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=w_(i),i===null?null:i.stateNode},findFiberByHostInstance:hu.findFiberByHostInstance||$7,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 sd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sd.isDisabled&&sd.supportsFiber)try{nc=sd.inject(Y7),Pr=sd}catch(i){}}return gn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q7,gn.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qm(o))throw Error(n(200));return z7(i,o,null,c)},gn.createRoot=function(i,o){if(!Qm(i))throw Error(n(299));var c=!1,h="",E=Kw;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=Gm(i,1,!1,null,null,c,!1,h,E),i[Yr]=o.current,Ka(i.nodeType===8?i.parentNode:i),new Km(o)},gn.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=w_(o),i=i===null?null:i.stateNode,i},gn.flushSync=function(i){return Ts(i)},gn.hydrate=function(i,o,c){if(!rd(o))throw Error(n(200));return id(null,i,o,!0,c)},gn.hydrateRoot=function(i,o,c){if(!Qm(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",w=Kw;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(w=c.onRecoverableError)),o=Gw(o,null,i,1,c!=null?c:null,E,!1,b,w),i[Yr]=o.current,Ka(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 nd(o)},gn.render=function(i,o,c){if(!rd(o))throw Error(n(200));return id(null,i,o,!1,c)},gn.unmountComponentAtNode=function(i){if(!rd(i))throw Error(n(40));return i._reactRootContainer?(Ts(function(){id(null,null,i,!1,function(){i._reactRootContainer=null,i[Yr]=null})}),!0):!1},gn.unstable_batchedUpdates=zm,gn.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!rd(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return id(i,o,c,!1,h)},gn.version="18.3.1-next-f1338f8080-20240426",gn}var qg;function Yg(){if(qg)return rf.exports;qg=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rf.exports=oN(),rf.exports}var Ds=Yg();function Wg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Wg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function F(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Wg(e))&&(r&&(r+=" "),r+=t);return r}var Gg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Xg=Mi.createContext&&Mi.createContext(Gg),aN=["attr","size","title"];function uN(e,t){if(e==null)return{};var n=lN(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 lN(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Vu(){return Vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vu.apply(this,arguments)}function Kg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function qu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kg(Object(n),!0).forEach(function(r){cN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cN(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=fN(e,"string");return typeof t=="symbol"?t:t+""}function fN(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 Qg(e){return e&&e.map((t,n)=>Mi.createElement(t.tag,qu({key:n},t.attr),Qg(t.child)))}function rt(e){return t=>Mi.createElement(hN,Vu({attr:qu({},e.attr)},t),Qg(e.child))}function hN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=uN(e,aN),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Mi.createElement("svg",Vu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:qu(qu({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&Mi.createElement("title",null,a),e.children)};return Xg!==void 0?Mi.createElement(Xg.Consumer,null,n=>t(n)):t(Gg)}function pN(e){return rt({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 mN(e){return rt({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 gN(e){return rt({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 er=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:_.jsx("button",{className:F(e,`${k}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?_.jsx("img",{className:F(`${k}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),EN="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",yN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ot(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?_.jsx(gN,{className:F(t,`${k}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||EN,alt:"Copilot",className:F(t,`${k}-minimized-icon-img`)});return _.jsx(er,{className:F(t,`${k}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},TN=()=>{const{globalClassName:e,themeVariables:t}=ot(),n=()=>{zu(!1),ni(!0)};return Ds.createPortal(_.jsx("div",{className:F(e,`${k}-minimized-container`),style:t,children:_.jsx(yN,{onClick:n})}),document.body)};function bN(e){return rt({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 un(){const e=H.useContext(mg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const _N=e=>({[`${Cn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Cn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Cn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Cn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Cn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Cn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function xN(e){return rt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm18.31 6-2.76 5z"},child:[]},{tag:"path",attr:{d:"M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"},child:[]}]})(e)}function wN(e){return rt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8A5.87 5.87 0 0 1 6 12c0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"},child:[]}]})(e)}function Jg(e){return rt({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 SN(e){return rt({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 af(e){return rt({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 vN(e){return rt({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 AN(e){return rt({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 NN(e){return rt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function Zg(e){return rt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function e1(e){return rt({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 CN(e){return rt({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 kN(e){return rt({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 ON(e){return rt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function t1(e){return rt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}const Yu=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>_.jsx("button",{className:F(`${k}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),IN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?_.jsx("img",{className:F(`${k}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(af,{size:"16px"})},PN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return _.jsx(er,{className:F(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:_.jsx(af,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(Yu,{className:F(e,n,`cim-${r}-component`,`${k}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&_.jsx(IN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function xB(){}function wB(){}function n1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function r1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const RN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,DN={};function i1(e,t){return(DN.jsx?LN:RN).test(e)}const MN=/[ \t\n\f\r]/g;function FN(e){return typeof e=="object"?e.type==="text"?s1(e.value):!1:s1(e)}function s1(e){return e.replace(MN,"")===""}class Go{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Go.prototype.normal={},Go.prototype.property={},Go.prototype.space=void 0;function o1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Go(n,r,t)}function Xo(e){return e.toLowerCase()}class En{constructor(t,n){this.attribute=n,this.property=t}}En.prototype.attribute="",En.prototype.booleanish=!1,En.prototype.boolean=!1,En.prototype.commaOrSpaceSeparated=!1,En.prototype.commaSeparated=!1,En.prototype.defined=!1,En.prototype.mustUseProperty=!1,En.prototype.number=!1,En.prototype.overloadedBoolean=!1,En.prototype.property="",En.prototype.spaceSeparated=!1,En.prototype.space=void 0;let BN=0;const qe=Yi(),kt=Yi(),uf=Yi(),_e=Yi(),at=Yi(),qi=Yi(),On=Yi();function Yi(){return ad(2,++BN)}const lf=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:kt,commaOrSpaceSeparated:On,commaSeparated:qi,number:_e,overloadedBoolean:uf,spaceSeparated:at},Symbol.toStringTag,{value:"Module"})),cf=Object.keys(lf);class df extends En{constructor(t,n,r,s){let a=-1;if(super(t,n),a1(this,"space",s),typeof r=="number")for(;++a<cf.length;){const u=cf[a];a1(this,cf[a],(r&lf[u])===lf[u])}}}df.prototype.defined=!0;function a1(e,t,n){n&&(e[t]=n)}function Ms(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new df(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Xo(r)]=r,n[Xo(a.attribute)]=r}return new Go(t,n,e.space)}const u1=Ms({properties:{ariaActiveDescendant:null,ariaAtomic:kt,ariaAutoComplete:null,ariaBusy:kt,ariaChecked:kt,ariaColCount:_e,ariaColIndex:_e,ariaColSpan:_e,ariaControls:at,ariaCurrent:null,ariaDescribedBy:at,ariaDetails:null,ariaDisabled:kt,ariaDropEffect:at,ariaErrorMessage:null,ariaExpanded:kt,ariaFlowTo:at,ariaGrabbed:kt,ariaHasPopup:null,ariaHidden:kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:at,ariaLevel:_e,ariaLive:null,ariaModal:kt,ariaMultiLine:kt,ariaMultiSelectable:kt,ariaOrientation:null,ariaOwns:at,ariaPlaceholder:null,ariaPosInSet:_e,ariaPressed:kt,ariaReadOnly:kt,ariaRelevant:null,ariaRequired:kt,ariaRoleDescription:at,ariaRowCount:_e,ariaRowIndex:_e,ariaRowSpan:_e,ariaSelected:kt,ariaSetSize:_e,ariaSort:null,ariaValueMax:_e,ariaValueMin:_e,ariaValueNow:_e,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function l1(e,t){return t in e?e[t]:t}function c1(e,t){return l1(e,t.toLowerCase())}const UN=Ms({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qi,acceptCharset:at,accessKey:at,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alpha:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:at,autoFocus:qe,autoPlay:qe,blocking:at,capture:null,charSet:null,checked:qe,cite:null,className:at,closedBy:null,colorSpace:null,cols:_e,colSpan:_e,command:null,commandFor:null,content:null,contentEditable:kt,controls:qe,controlsList:at,coords:_e|qi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:uf,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:at,height:_e,hidden:uf,high:_e,href:null,hrefLang:null,htmlFor:at,httpEquiv:at,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:at,itemRef:at,itemScope:qe,itemType:at,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:_e,manifest:null,max:null,maxLength:_e,media:null,method:null,min:null,minLength:_e,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,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:qe,optimum:_e,pattern:null,ping:at,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:at,required:qe,reversed:qe,rows:_e,rowSpan:_e,sandbox:at,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootCustomElementRegistry:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shadowRootSerializable:qe,shape:null,size:_e,sizes:null,slot:null,span:_e,spellCheck:kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_e,step:null,style:null,tabIndex:_e,target:null,title:null,translate:null,type:null,typeMustMatch:qe,useMap:null,value:kt,width:_e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:at,axis:null,background:null,bgColor:null,border:_e,borderColor:null,bottomMargin:_e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:_e,leftMargin:_e,link:null,longDesc:null,lowSrc:null,marginHeight:_e,marginWidth:_e,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:_e,rules:null,scheme:null,scrolling:kt,standby:null,summary:null,text:null,topMargin:_e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_e,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:qe,disablePictureInPicture:qe,disableRemotePlayback:qe,exportParts:qi,part:at,prefix:null,property:null,results:_e,security:null,unselectable:null},space:"html",transform:c1}),HN=Ms({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:On,accentHeight:_e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_e,amplitude:_e,arabicForm:null,ascent:_e,attributeName:null,attributeType:null,azimuth:_e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_e,by:null,calcMode:null,capHeight:_e,className:at,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:_e,diffuseConstant:_e,direction:null,display:null,dur:null,divisor:_e,dominantBaseline:null,download:qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:_e,enableBackground:null,end:null,event:null,exponent:_e,externalResourcesRequired:null,fill:null,fillOpacity:_e,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:qi,g2:qi,glyphName:qi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_e,horizOriginX:_e,horizOriginY:_e,id:null,ideographic:_e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_e,k:_e,k1:_e,k2:_e,k3:_e,k4:_e,kernelMatrix:On,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_e,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:_e,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:_e,overlineThickness:_e,paintOrder:null,panose1:null,path:null,pathLength:_e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:at,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_e,pointsAtY:_e,pointsAtZ:_e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:On,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:On,rev:On,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:On,requiredFeatures:On,requiredFonts:On,requiredFormats:On,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:_e,specularExponent:_e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_e,strikethroughThickness:_e,string:null,stroke:null,strokeDashArray:On,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_e,strokeOpacity:_e,strokeWidth:null,style:null,surfaceScale:_e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:On,tabIndex:_e,tableValues:null,target:null,targetX:_e,targetY:_e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:On,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_e,underlineThickness:_e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_e,values:null,vAlphabetic:_e,vMathematical:_e,vectorEffect:null,vHanging:_e,vIdeographic:_e,version:null,vertAdvY:_e,vertOriginX:_e,vertOriginY:_e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:l1}),d1=Ms({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),f1=Ms({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:c1}),h1=Ms({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),jN={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},zN=/[A-Z]/g,p1=/-[a-z]/g,$N=/^data[-\w.:]+$/i;function Wu(e,t){const n=Xo(t);let r=t,s=En;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$N.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(p1,qN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!p1.test(a)){let u=a.replace(zN,VN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=df}return new s(r,t)}function VN(e){return"-"+e.toLowerCase()}function qN(e){return e.charAt(1).toUpperCase()}const Ko=o1([u1,UN,d1,f1,h1],"html"),ii=o1([u1,HN,d1,f1,h1],"svg");function m1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function g1(e){return e.join(" ").trim()}var Fs={},ff,E1;function YN(){if(E1)return ff;E1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
|
|
24
|
+
`,f="/",p="*",m="",T="comment",y="declaration";function x(A,S){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];S=S||{};var C=1,P=1;function j(fe){var ce=fe.match(t);ce&&(C+=ce.length);var he=fe.lastIndexOf(d);P=~he?fe.length-he:P+fe.length}function W(){var fe={line:C,column:P};return function(ce){return ce.position=new D(fe),de(),ce}}function D(fe){this.start=fe,this.end={line:C,column:P},this.source=S.source}D.prototype.content=A;function K(fe){var ce=new Error(S.source+":"+C+":"+P+": "+fe);if(ce.reason=fe,ce.filename=S.source,ce.line=C,ce.column=P,ce.source=A,!S.silent)throw ce}function ne(fe){var ce=fe.exec(A);if(ce){var he=ce[0];return j(he),A=A.slice(he.length),ce}}function de(){ne(n)}function $(fe){var ce;for(fe=fe||[];ce=se();)ce!==!1&&fe.push(ce);return fe}function se(){var fe=W();if(!(f!=A.charAt(0)||p!=A.charAt(1))){for(var ce=2;m!=A.charAt(ce)&&(p!=A.charAt(ce)||f!=A.charAt(ce+1));)++ce;if(ce+=2,m===A.charAt(ce-1))return K("End of comment missing");var he=A.slice(2,ce-2);return P+=2,j(he),A=A.slice(ce),P+=2,fe({type:T,comment:he})}}function te(){var fe=W(),ce=ne(r);if(ce){if(se(),!ne(s))return K("property missing ':'");var he=ne(a),le=fe({type:y,property:v(ce[0].replace(e,m)),value:he?v(he[0].replace(e,m)):m});return ne(u),le}}function xe(){var fe=[];$(fe);for(var ce;ce=te();)ce!==!1&&(fe.push(ce),$(fe));return fe}return de(),xe()}function v(A){return A?A.replace(l,m):m}return ff=x,ff}var y1;function WN(){if(y1)return Fs;y1=1;var e=Fs&&Fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.default=n;const t=e(YN());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;l?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Fs}var Qo={},T1;function GN(){if(T1)return Qo;T1=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.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 Qo.camelCase=d,Qo}var Jo,b1;function XN(){if(b1)return Jo;b1=1;var e=Jo&&Jo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(WN()),n=GN();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,Jo=r,Jo}var KN=XN();const QN=Xe(KN),Gu=_1("end"),Tr=_1("start");function _1(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function x1(e){const t=Tr(e),n=Gu(e);if(t&&n)return{start:t,end:n}}function Zo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?w1(e.position):"start"in e||"end"in e?w1(e):"line"in e||"column"in e?hf(e):""}function hf(e){return S1(e&&e.line)+":"+S1(e&&e.column)}function w1(e){return hf(e&&e.start)+"-"+hf(e&&e.end)}function S1(e){return e&&typeof e=="number"?e:1}class Jt 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=Zo(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}}Jt.prototype.file="",Jt.prototype.name="",Jt.prototype.reason="",Jt.prototype.message="",Jt.prototype.stack="",Jt.prototype.column=void 0,Jt.prototype.line=void 0,Jt.prototype.ancestors=void 0,Jt.prototype.cause=void 0,Jt.prototype.fatal=void 0,Jt.prototype.place=void 0,Jt.prototype.ruleId=void 0,Jt.prototype.source=void 0;const pf={}.hasOwnProperty,JN=new Map,ZN=/[A-Z]/g,eC=new Set(["table","tbody","thead","tfoot","tr"]),tC=new Set(["td","th"]),v1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function nC(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=cC(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=lC(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ii:Ko,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=A1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function A1(e,t,n){if(t.type==="element")return rC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return iC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return oC(e,t,n);if(t.type==="mdxjsEsm")return sC(e,t);if(t.type==="root")return aC(e,t,n);if(t.type==="text")return uC(e,t)}function rC(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=C1(e,t.tagName,!1),u=dC(e,t);let l=gf(e,t);return eC.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!FN(d):!0})),N1(e,u,a,t),mf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function iC(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)}ea(e,t.position)}function sC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ea(e,t.position)}function oC(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:C1(e,t.name,!0),u=fC(e,t),l=gf(e,t);return N1(e,u,a,t),mf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function aC(e,t,n){const r={};return mf(r,gf(e,t)),e.create(t,e.Fragment,r,n)}function uC(e,t){return t.value}function N1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function mf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function lC(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 cC(e,t){return n;function n(r,s,a,u){const l=Array.isArray(a.children),d=Tr(r);return t(s,a,u,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function dC(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&pf.call(t.properties,s)){const a=hC(e,s,t.properties[s]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&tC.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 fC(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 ea(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 ea(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function gf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:JN;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const l=A1(e,a,u);l!==void 0&&n.push(l)}return n}function hC(e,t,n){const r=Wu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?r1(n):g1(n)),r.property==="style"){let s=typeof n=="object"?n:pC(e,String(n));return e.stylePropertyNameCase==="css"&&(s=mC(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?jN[r.property]||r.property:r.attribute,n]}}function pC(e,t){try{return QN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new Jt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=v1+"#cannot-parse-style-attribute",s}}function C1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const l=i1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=u}else r=i1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return pf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);ea(e)}function ea(e,t){const n=new Jt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=v1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function mC(e){const t={};let n;for(n in e)pf.call(e,n)&&(t[gC(n)]=e[n]);return t}function gC(e){let t=e.replace(ZN,EC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function EC(e){return"-"+e.toLowerCase()}const Ef={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"]},yC={};function yf(e,t){const n=yC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return k1(e,r,s)}function k1(e,t,n){if(TC(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return O1(e.children,t,n)}return Array.isArray(e)?O1(e,t,n):""}function O1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=k1(e[s],t,n);return r.join("")}function TC(e){return!!(e&&typeof e=="object")}const I1=document.createElement("i");function Tf(e){const t="&"+e+";";I1.innerHTML=t;const n=I1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function In(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 Hn(e,t){return e.length>0?(In(e,e.length,0,t),e):t}const P1={}.hasOwnProperty;function R1(e){const t={};let n=-1;for(;++n<e.length;)bC(t,e[n]);return t}function bC(e,t){let n;for(n in t){const s=(P1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){P1.call(s,u)||(s[u]=[]);const l=a[u];_C(s[u],Array.isArray(l)?l:l?[l]:[])}}}function _C(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);In(e,0,0,r)}function L1(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function tr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ln=si(/[A-Za-z]/),Zt=si(/[\dA-Za-z]/),xC=si(/[#-'*+\--9=?A-Z^-~]/);function Xu(e){return e!==null&&(e<32||e===127)}const bf=si(/\d/),wC=si(/[\dA-Fa-f]/),SC=si(/[!-/:-@[-`{-~]/);function Me(e){return e!==null&&e<-2}function ut(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const Ku=si(new RegExp("\\p{P}|\\p{S}","u")),Wi=si(/\s/);function si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bs(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Zt(e.charCodeAt(n+1))&&Zt(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 Je(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ke(d)?(e.enter(n),l(d)):t(d)}function l(d){return Ke(d)&&a++<s?(e.consume(d),l):(e.exit(n),t(d))}}const vC={tokenize:AC};function AC(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"),Je(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 Me(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const NC={tokenize:CC},D1={tokenize:kC};function CC(e){const t=this,n=[];let r=0,s,a,u;return l;function l(P){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,d,f)(P)}return f(P)}function d(P){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&C();const j=t.events.length;let W=j,D;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){D=t.events[W][1].end;break}S(r);let K=j;for(;K<t.events.length;)t.events[K][1].end=U({},D),K++;return In(t.events,W+1,0,t.events.slice(j)),t.events.length=K,f(P)}return l(P)}function f(P){if(r===n.length){if(!s)return T(P);if(s.currentConstruct&&s.currentConstruct.concrete)return x(P);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(D1,p,m)(P)}function p(P){return s&&C(),S(r),T(P)}function m(P){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(P)}function T(P){return t.containerState={},e.attempt(D1,y,x)(P)}function y(P){return r++,n.push([t.currentConstruct,t.containerState]),T(P)}function x(P){if(P===null){s&&C(),S(0),e.consume(P);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),v(P)}function v(P){if(P===null){A(e.exit("chunkFlow"),!0),S(0),e.consume(P);return}return Me(P)?(e.consume(P),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(P),v)}function A(P,j){const W=t.sliceStream(P);if(j&&W.push(null),P.previous=a,a&&(a.next=P),a=P,s.defineSkip(P.start),s.write(W),t.parser.lazy[P.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 K=t.events.length;let ne=K,de,$;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(de){$=t.events[ne][1].end;break}de=!0}for(S(r),D=K;D<t.events.length;)t.events[D][1].end=U({},$),D++;In(t.events,ne+1,0,t.events.slice(K)),t.events.length=D}}function S(P){let j=n.length;for(;j-- >P;){const W=n[j];t.containerState=W[1],W[0].exit.call(t,e)}n.length=P}function C(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function kC(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Us(e){if(e===null||ut(e)||Wi(e))return 1;if(Ku(e))return 2}function Qu(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 _f={name:"attention",resolveAll:OC,tokenize:IC};function OC(e,t){let n=-1,r,s,a,u,l,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=U({},e[r][1].end),T=U({},e[n][1].start);M1(m,-d),M1(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:U({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:U({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:U({},e[r][1].end),end:U({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:U({},u.start),end:U({},l.end)},e[r][1].end=U({},u.start),e[n][1].start=U({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Hn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Hn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Hn(f,Qu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Hn(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=Hn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,In(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 IC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Us(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===a)return e.consume(d),l;const f=e.exit("attentionSequence"),p=Us(d),m=!p||p===2&&s||n.includes(d),T=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function M1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const PC={name:"autolink",tokenize:RC};function RC(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return ln(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||Zt(y)?(r=1,l(y)):f(y)}function l(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Zt(y))&&r++<32?(e.consume(y),l):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Xu(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):xC(y)?(e.consume(y),f):n(y)}function p(y){return Zt(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):T(y)}function T(y){if((y===45||Zt(y))&&r++<63){const x=y===45?T:m;return e.consume(y),x}return n(y)}}const ta={partial:!0,tokenize:LC};function LC(e,t,n){return r;function r(a){return Ke(a)?Je(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Me(a)?t(a):n(a)}}const F1={continuation:{tokenize:MC},exit:FC,name:"blockQuote",tokenize:DC};function DC(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 Ke(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function MC(e,t,n){const r=this;return s;function s(u){return Ke(u)?Je(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(F1,t,n)(u)}}function FC(e){e.exit("blockQuote")}const B1={name:"characterEscape",tokenize:BC};function BC(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 SC(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const U1={name:"characterReference",tokenize:UC};function UC(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=Zt,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=wC,p):(e.enter("characterReferenceValue"),a=7,u=bf,p(m))}function p(m){if(m===59&&s){const T=e.exit("characterReferenceValue");return u===Zt&&!Tf(r.sliceSerialize(T))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const H1={partial:!0,tokenize:jC},j1={concrete:!0,name:"codeFenced",tokenize:HC};function HC(e,t,n){const r=this,s={partial:!0,tokenize:W};let a=0,u=0,l;return d;function d(D){return f(D)}function f(D){const K=r.events[r.events.length-1];return a=K&&K[1].type==="linePrefix"?K[2].sliceSerialize(K[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"),Ke(D)?Je(e,m,"whitespace")(D):m(D))}function m(D){return D===null||Me(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(H1,v,j)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(D))}function T(D){return D===null||Me(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(D)):Ke(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,y,"whitespace")(D)):D===96&&D===l?n(D):(e.consume(D),T)}function y(D){return D===null||Me(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===null||Me(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===l?n(D):(e.consume(D),x)}function v(D){return e.attempt(s,j,A)(D)}function A(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),S}function S(D){return a>0&&Ke(D)?Je(e,C,"linePrefix",a+1)(D):C(D)}function C(D){return D===null||Me(D)?e.check(H1,v,j)(D):(e.enter("codeFlowValue"),P(D))}function P(D){return D===null||Me(D)?(e.exit("codeFlowValue"),C(D)):(e.consume(D),P)}function j(D){return e.exit("codeFenced"),t(D)}function W(D,K,ne){let de=0;return $;function $(ce){return D.enter("lineEnding"),D.consume(ce),D.exit("lineEnding"),se}function se(ce){return D.enter("codeFencedFence"),Ke(ce)?Je(D,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ce):te(ce)}function te(ce){return ce===l?(D.enter("codeFencedFenceSequence"),xe(ce)):ne(ce)}function xe(ce){return ce===l?(de++,D.consume(ce),xe):de>=u?(D.exit("codeFencedFenceSequence"),Ke(ce)?Je(D,fe,"whitespace")(ce):fe(ce)):ne(ce)}function fe(ce){return ce===null||Me(ce)?(D.exit("codeFencedFence"),K(ce)):ne(ce)}}}function jC(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 xf={name:"codeIndented",tokenize:$C},zC={partial:!0,tokenize:VC};function $C(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),Je(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):Me(f)?e.attempt(zC,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||Me(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function VC(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Me(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):Je(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):Me(u)?s(u):n(u)}}const qC={name:"codeText",previous:WC,resolve:YC,tokenize:GC};function YC(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 WC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function GC(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)):Me(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||Me(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 XC{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&&na(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),na(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),na(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);na(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);na(this.left,n.reverse())}}}function na(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function z1(e){const t={};let n=-1,r,s,a,u,l,d,f;const p=new XC(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,KC(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 In(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function KC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const l=u.events,d=[],f={};let p,m,T=-1,y=n,x=0,v=0;const A=[v];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++T<l.length;)l[T][0]==="exit"&&l[T-1][0]==="enter"&&l[T][1].type===l[T-1][1].type&&l[T][1].start.line!==l[T][1].end.line&&(v=T+1,A.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),T=A.length;T--;){const S=l.slice(A[T],A[T+1]),C=a.pop();d.push([C,C+S.length-1]),e.splice(C,2,S)}for(d.reverse(),T=-1;++T<d.length;)f[x+d[T][0]]=x+d[T][1],x+=d[T][1]-d[T][0]-1;return f}const QC={resolve:ZC,tokenize:ek},JC={partial:!0,tokenize:tk};function ZC(e){return z1(e),e}function ek(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):Me(l)?e.check(JC,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 tk(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Je(e,a,"linePrefix")}function a(u){if(u===null||Me(u))return n(u);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function $1(e,t,n,r,s,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(S){return S===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(S),e.exit(a),T):S===null||S===32||S===41||Xu(S)?n(S):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(S))}function T(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===62?(e.exit("chunkString"),e.exit(l),T(S)):S===null||S===60||Me(S)?n(S):(e.consume(S),S===92?x:y)}function x(S){return S===60||S===62||S===92?(e.consume(S),y):y(S)}function v(S){return!p&&(S===null||S===41||ut(S))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(S)):p<f&&S===40?(e.consume(S),p++,v):S===41?(e.consume(S),p--,v):S===null||S===32||S===40||Xu(S)?n(S):(e.consume(S),S===92?A:v)}function A(S){return S===40||S===41||S===92?(e.consume(S),v):v(S)}}function V1(e,t,n,r,s,a){const u=this;let l=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):Me(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Me(y)||l++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ke(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function q1(e,t,n,r,s,a){let u;return l;function l(T){return T===34||T===39||T===40?(e.enter(r),e.enter(s),e.consume(T),e.exit(s),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(s),e.consume(T),e.exit(s),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Me(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Je(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Me(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function ra(e,t){let n;return r;function r(s){return Me(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ke(s)?Je(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const nk={name:"definition",tokenize:ik},rk={partial:!0,tokenize:sk};function ik(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return V1.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return s=tr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return ut(y)?ra(e,f)(y):f(y)}function f(y){return $1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(rk,m,m)(y)}function m(y){return Ke(y)?Je(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Me(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function sk(e,t,n){return r;function r(l){return ut(l)?ra(e,s)(l):n(l)}function s(l){return q1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Ke(l)?Je(e,u,"whitespace")(l):u(l)}function u(l){return l===null||Me(l)?t(l):n(l)}}const ok={name:"hardBreakEscape",tokenize:ak};function ak(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Me(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const uk={name:"headingAtx",resolve:lk,tokenize:ck};function lk(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"},In(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function ck(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||ut(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Me(p)?(e.exit("atxHeading"),t(p)):Ke(p)?Je(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||ut(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const dk=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Y1=["pre","script","style","textarea"],fk={concrete:!0,name:"htmlFlow",resolveTo:mk,tokenize:gk},hk={partial:!0,tokenize:yk},pk={partial:!0,tokenize:Ek};function mk(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 gk(e,t,n){const r=this;let s,a,u,l,d;return f;function f(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),T):O===47?(e.consume(O),a=!0,v):O===63?(e.consume(O),s=3,r.interrupt?t:N):ln(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function T(O){return O===45?(e.consume(O),s=2,y):O===91?(e.consume(O),s=5,l=0,x):ln(O)?(e.consume(O),s=4,r.interrupt?t:N):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:N):n(O)}function x(O){const ge="CDATA[";return O===ge.charCodeAt(l++)?(e.consume(O),l===ge.length?r.interrupt?t:te:x):n(O)}function v(O){return ln(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function A(O){if(O===null||O===47||O===62||ut(O)){const ge=O===47,Re=u.toLowerCase();return!ge&&!a&&Y1.includes(Re)?(s=1,r.interrupt?t(O):te(O)):dk.includes(u.toLowerCase())?(s=6,ge?(e.consume(O),S):r.interrupt?t(O):te(O)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?C(O):P(O))}return O===45||Zt(O)?(e.consume(O),u+=String.fromCharCode(O),A):n(O)}function S(O){return O===62?(e.consume(O),r.interrupt?t:te):n(O)}function C(O){return Ke(O)?(e.consume(O),C):$(O)}function P(O){return O===47?(e.consume(O),$):O===58||O===95||ln(O)?(e.consume(O),j):Ke(O)?(e.consume(O),P):$(O)}function j(O){return O===45||O===46||O===58||O===95||Zt(O)?(e.consume(O),j):W(O)}function W(O){return O===61?(e.consume(O),D):Ke(O)?(e.consume(O),W):P(O)}function D(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,K):Ke(O)?(e.consume(O),D):ne(O)}function K(O){return O===d?(e.consume(O),d=null,de):O===null||Me(O)?n(O):(e.consume(O),K)}function ne(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ut(O)?W(O):(e.consume(O),ne)}function de(O){return O===47||O===62||Ke(O)?P(O):n(O)}function $(O){return O===62?(e.consume(O),se):n(O)}function se(O){return O===null||Me(O)?te(O):Ke(O)?(e.consume(O),se):n(O)}function te(O){return O===45&&s===2?(e.consume(O),he):O===60&&s===1?(e.consume(O),le):O===62&&s===4?(e.consume(O),R):O===63&&s===3?(e.consume(O),N):O===93&&s===5?(e.consume(O),ue):Me(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(hk,Y,xe)(O)):O===null||Me(O)?(e.exit("htmlFlowData"),xe(O)):(e.consume(O),te)}function xe(O){return e.check(pk,fe,Y)(O)}function fe(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ce}function ce(O){return O===null||Me(O)?xe(O):(e.enter("htmlFlowData"),te(O))}function he(O){return O===45?(e.consume(O),N):te(O)}function le(O){return O===47?(e.consume(O),u="",Q):te(O)}function Q(O){if(O===62){const ge=u.toLowerCase();return Y1.includes(ge)?(e.consume(O),R):te(O)}return ln(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),Q):te(O)}function ue(O){return O===93?(e.consume(O),N):te(O)}function N(O){return O===62?(e.consume(O),R):O===45&&s===2?(e.consume(O),N):te(O)}function R(O){return O===null||Me(O)?(e.exit("htmlFlowData"),Y(O)):(e.consume(O),R)}function Y(O){return e.exit("htmlFlow"),t(O)}}function Ek(e,t,n){const r=this;return s;function s(u){return Me(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 yk(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ta,t,n)}}const Tk={name:"htmlText",tokenize:bk};function bk(e,t,n){const r=this;let s,a,u;return l;function l(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),W):N===63?(e.consume(N),P):ln(N)?(e.consume(N),ne):n(N)}function f(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),a=0,x):ln(N)?(e.consume(N),C):n(N)}function p(N){return N===45?(e.consume(N),y):n(N)}function m(N){return N===null?n(N):N===45?(e.consume(N),T):Me(N)?(u=m,le(N)):(e.consume(N),m)}function T(N){return N===45?(e.consume(N),y):m(N)}function y(N){return N===62?he(N):N===45?T(N):m(N)}function x(N){const R="CDATA[";return N===R.charCodeAt(a++)?(e.consume(N),a===R.length?v:x):n(N)}function v(N){return N===null?n(N):N===93?(e.consume(N),A):Me(N)?(u=v,le(N)):(e.consume(N),v)}function A(N){return N===93?(e.consume(N),S):v(N)}function S(N){return N===62?he(N):N===93?(e.consume(N),S):v(N)}function C(N){return N===null||N===62?he(N):Me(N)?(u=C,le(N)):(e.consume(N),C)}function P(N){return N===null?n(N):N===63?(e.consume(N),j):Me(N)?(u=P,le(N)):(e.consume(N),P)}function j(N){return N===62?he(N):P(N)}function W(N){return ln(N)?(e.consume(N),D):n(N)}function D(N){return N===45||Zt(N)?(e.consume(N),D):K(N)}function K(N){return Me(N)?(u=K,le(N)):Ke(N)?(e.consume(N),K):he(N)}function ne(N){return N===45||Zt(N)?(e.consume(N),ne):N===47||N===62||ut(N)?de(N):n(N)}function de(N){return N===47?(e.consume(N),he):N===58||N===95||ln(N)?(e.consume(N),$):Me(N)?(u=de,le(N)):Ke(N)?(e.consume(N),de):he(N)}function $(N){return N===45||N===46||N===58||N===95||Zt(N)?(e.consume(N),$):se(N)}function se(N){return N===61?(e.consume(N),te):Me(N)?(u=se,le(N)):Ke(N)?(e.consume(N),se):de(N)}function te(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),s=N,xe):Me(N)?(u=te,le(N)):Ke(N)?(e.consume(N),te):(e.consume(N),fe)}function xe(N){return N===s?(e.consume(N),s=void 0,ce):N===null?n(N):Me(N)?(u=xe,le(N)):(e.consume(N),xe)}function fe(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||ut(N)?de(N):(e.consume(N),fe)}function ce(N){return N===47||N===62||ut(N)?de(N):n(N)}function he(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function le(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Q}function Q(N){return Ke(N)?Je(e,ue,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ue(N)}function ue(N){return e.enter("htmlTextData"),u(N)}}const wf={name:"labelEnd",resolveAll:Sk,resolveTo:vk,tokenize:Ak},_k={tokenize:Nk},xk={tokenize:Ck},wk={tokenize:kk};function Sk(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&&In(e,0,e.length,n),e}function vk(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=Hn(l,e.slice(a+1,a+r+3)),l=Hn(l,[["enter",p,t]]),l=Hn(l,Qu(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=Hn(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=Hn(l,e.slice(u+1)),l=Hn(l,[["exit",d,t]]),In(e,a,e.length,l),e}function Ak(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return l;function l(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(tr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(_k,p,u?p:m)(T):T===91?e.attempt(xk,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(wk,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function Nk(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 ut(m)?ra(e,a)(m):a(m)}function a(m){return m===41?p(m):$1(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ut(m)?ra(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?q1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ut(m)?ra(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 Ck(e,t,n){const r=this;return s;function s(l){return V1.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(tr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function kk(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 Ok={name:"labelStartImage",resolveAll:wf.resolveAll,tokenize:Ik};function Ik(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 Pk={name:"labelStartLink",resolveAll:wf.resolveAll,tokenize:Rk};function Rk(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 Sf={name:"lineEnding",tokenize:Lk};function Lk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const Ju={name:"thematicBreak",tokenize:Dk};function Dk(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||Me(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ke(f)?Je(e,l,"whitespace")(f):l(f))}}const yn={continuation:{tokenize:Uk},exit:jk,name:"list",tokenize:Bk},Mk={partial:!0,tokenize:zk},Fk={partial:!0,tokenize:Hk};function Bk(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return l;function l(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:bf(y)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Ju,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return bf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(ta,r.interrupt?n:p,e.attempt(Mk,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Ke(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),T):n(y)}function T(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function Uk(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ta,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Je(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Ke(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(Fk,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Je(e,e.attempt(yn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Hk(e,t,n){const r=this;return Je(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 jk(e){e.exit(this.containerState.type)}function zk(e,t,n){const r=this;return Je(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!Ke(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const W1={name:"setextUnderline",resolveTo:$k,tokenize:Vk};function $k(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 Vk(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"),Ke(f)?Je(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Me(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const qk={tokenize:Yk};function Yk(e){const t=this,n=e.attempt(ta,r,e.attempt(this.parser.constructs.flowInitial,s,Je(e,e.attempt(this.parser.constructs.flow,s,e.attempt(QC,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 Wk={resolveAll:X1()},Gk=G1("string"),Xk=G1("text");function G1(e){return{resolveAll:X1(e==="text"?Kk:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,l);return u;function u(p){return f(p)?a(p):l(p)}function l(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let T=-1;if(m)for(;++T<m.length;){const y=m[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function X1(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function Kk(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 Qk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:nk},disable:{null:[]},document:{42:yn,43:yn,45:yn,48:yn,49:yn,50:yn,51:yn,52:yn,53:yn,54:yn,55:yn,56:yn,57:yn,62:F1},flow:{35:uk,42:Ju,45:[W1,Ju],60:fk,61:W1,95:Ju,96:j1,126:j1},flowInitial:{[-2]:xf,[-1]:xf,32:xf},insideSpan:{null:[_f,Wk]},string:{38:U1,92:B1},text:{[-5]:Sf,[-4]:Sf,[-3]:Sf,33:Ok,38:U1,42:_f,60:[PC,Tk],91:Pk,92:[ok,B1],93:wf,95:_f,96:qC}},Symbol.toStringTag,{value:"Module"}));function Jk(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:K(W),check:K(D),consume:C,enter:P,exit:j,interrupt:K(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:x,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(se){return u=Hn(u,se),A(),u[u.length-1]!==null?[]:(ne(t,0),f.events=Qu(a,f.events,f),f.events)}function T(se,te){return e3(y(se),te)}function y(se){return Zk(u,se)}function x(){const{_bufferIndex:se,_index:te,line:xe,column:fe,offset:ce}=r;return{_bufferIndex:se,_index:te,line:xe,column:fe,offset:ce}}function v(se){s[se.line]=se.column,$()}function A(){let se;for(;r._index<u.length;){const te=u[r._index];if(typeof te=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<te.length;)S(te.charCodeAt(r._bufferIndex));else S(te)}}function S(se){p=p(se)}function C(se){Me(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,$()):se!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=se}function P(se,te){const xe=te||{};return xe.type=se,xe.start=x(),f.events.push(["enter",xe,f]),l.push(xe),xe}function j(se){const te=l.pop();return te.end=x(),f.events.push(["exit",te,f]),te}function W(se,te){ne(se,te.from)}function D(se,te){te.restore()}function K(se,te){return xe;function xe(fe,ce,he){let le,Q,ue,N;return Array.isArray(fe)?Y(fe):"tokenize"in fe?Y([fe]):R(fe);function R(we){return re;function re(ye){const ie=ye!==null&&we[ye],ve=ye!==null&&we.null,Ve=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return Y(Ve)(ye)}}function Y(we){return le=we,Q=0,we.length===0?he:O(we[Q])}function O(we){return re;function re(ye){return N=de(),ue=we,we.partial||(f.currentConstruct=we),we.name&&f.parser.constructs.disable.null.includes(we.name)?Re():we.tokenize.call(te?Object.assign(Object.create(f),te):f,d,ge,Re)(ye)}}function ge(we){return se(ue,N),ce}function Re(we){return N.restore(),++Q<le.length?O(le[Q]):he}}}function ne(se,te){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&In(f.events,te,f.events.length-te,se.resolve(f.events.slice(te),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function de(){const se=x(),te=f.previous,xe=f.currentConstruct,fe=f.events.length,ce=Array.from(l);return{from:fe,restore:he};function he(){r=se,f.previous=te,f.currentConstruct=xe,f.events.length=fe,l=ce,$()}}function $(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function Zk(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 e3(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
25
25
|
`;break}case-3:{u=`\r
|
|
26
|
-
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function Yk(e){const r={constructs:I1([zk,...(e||{}).extensions||[]]),content:s(gC),defined:[],document:s(yC),flow:s(Mk),lazy:{},string:s(Uk),text:s(Hk)};return r;function s(a){return u;function u(c){return $k(r,a,c)}}}function Wk(e){for(;!H1(e););return e}const G1=/[\0\t\n\r]/g;function Gk(){let e=1,t="",n=!0,r;return s;function s(a,u,c){const d=[];let f,p,m,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(G1.lastIndex=m,f=G1.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=T+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Xk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Kk(e){return e.replace(Xk,Qk)}function Qk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return P1(n.slice(a?2:1),a?16:10)}return Tf(n)||e}const X1={}.hasOwnProperty;function Jk(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Zk(n)(Wk(Yk(n).document().write(Gk()(e,t,!0))))}function Zk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(bn),autolinkProtocol:he,autolinkEmail:he,atxHeading:a(an),blockQuote:a(Tt),characterEscape:he,characterReference:he,codeFenced:a(jn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(jn,u),codeText:a(Tn,u),codeTextData:he,data:he,codeFlowValue:he,definition:a($r),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Vr),hardBreakEscape:a(Ue),hardBreakTrailing:a(Ue),htmlFlow:a(Ct,u),htmlFlowData:he,htmlText:a(Ct,u),htmlTextData:he,image:a(In),label:u,link:a(bn),listItem:a(Cr),listItemValue:T,listOrdered:a(sr,m),listUnordered:a(sr),paragraph:a(or),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(an),strong:a(Ql),thematicBreak:a(Zl)},exit:{atxHeading:d(),atxHeadingSequence:G,autolink:d(),autolinkEmail:Ke,autolinkProtocol:Be,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:ye,characterReference:Re,codeFenced:d(A),codeFencedFence:N,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:V,codeIndented:d(v),codeText:d(ae),codeTextData:V,data:V,definition:d(),definitionDestinationString:$,definitionLabelString:C,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(ee),hardBreakTrailing:d(ee),htmlFlow:d(we),htmlFlowData:V,htmlText:d(de),htmlTextData:V,image:d(ue),label:Z,labelText:z,lineEnding:ie,link:d(_e),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:pe,resourceDestinationString:w,resourceTitleString:k,resource:q,setextHeading:d(se),setextHeadingLineSequence:J,setextHeadingText:D,strong:d(),thematicBreak:d()}};K1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(re){let be={type:"root",children:[]};const Fe={stack:[be],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},qe=[];let Qe=-1;for(;++Qe<re.length;)if(re[Qe][1].type==="listOrdered"||re[Qe][1].type==="listUnordered")if(re[Qe][0]==="enter")qe.push(Qe);else{const $t=qe.pop();Qe=s(re,$t,Qe)}for(Qe=-1;++Qe<re.length;){const $t=t[re[Qe][0]];X1.call($t,re[Qe][1].type)&&$t[re[Qe][1].type].call(Object.assign({sliceSerialize:re[Qe][2].sliceSerialize},Fe),re[Qe][1])}if(Fe.tokenStack.length>0){const $t=Fe.tokenStack[Fe.tokenStack.length-1];($t[1]||Q1).call(Fe,void 0,$t[0])}for(be.position={start:oi(re.length>0?re[0][1].start:{line:1,column:1,offset:0}),end:oi(re.length>0?re[re.length-2][1].end:{line:1,column:1,offset:0})},Qe=-1;++Qe<t.transforms.length;)be=t.transforms[Qe](be)||be;return be}function s(re,be,Fe){let qe=be-1,Qe=-1,$t=!1,qr,zn,mi,ls;for(;++qe<=Fe;){const Vt=re[qe];switch(Vt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Vt[0]==="enter"?Qe++:Qe--,ls=void 0;break}case"lineEndingBlank":{Vt[0]==="enter"&&(qr&&!ls&&!Qe&&!mi&&(mi=qe),ls=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ls=void 0}if(!Qe&&Vt[0]==="enter"&&Vt[1].type==="listItemPrefix"||Qe===-1&&Vt[0]==="exit"&&(Vt[1].type==="listUnordered"||Vt[1].type==="listOrdered")){if(qr){let kr=qe;for(zn=void 0;kr--;){const Pn=re[kr];if(Pn[1].type==="lineEnding"||Pn[1].type==="lineEndingBlank"){if(Pn[0]==="exit")continue;zn&&(re[zn][1].type="lineEndingBlank",$t=!0),Pn[1].type="lineEnding",zn=kr}else if(!(Pn[1].type==="linePrefix"||Pn[1].type==="blockQuotePrefix"||Pn[1].type==="blockQuotePrefixWhitespace"||Pn[1].type==="blockQuoteMarker"||Pn[1].type==="listItemIndent"))break}mi&&(!zn||mi<zn)&&(qr._spread=!0),qr.end=Object.assign({},zn?re[zn][1].start:Vt[1].end),re.splice(zn||qe,0,["exit",qr,Vt[2]]),qe++,Fe++}if(Vt[1].type==="listItemPrefix"){const kr={type:"listItem",_spread:!1,start:Object.assign({},Vt[1].start),end:void 0};qr=kr,re.splice(qe,0,["enter",kr,Vt[2]]),qe++,Fe++,mi=void 0,ls=!0}}}return re[be][1]._spread=$t,Fe}function a(re,be){return Fe;function Fe(qe){c.call(this,re(qe),qe),be&&be.call(this,qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(re,be,Fe){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([be,Fe||void 0]),re.position={start:oi(be.start),end:void 0}}function d(re){return be;function be(Fe){re&&re.call(this,Fe),f.call(this,Fe)}}function f(re,be){const Fe=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==re.type&&(be?be.call(this,re,qe[0]):(qe[1]||Q1).call(this,re,qe[0]));else throw new Error("Cannot close `"+re.type+"` ("+ta({start:re.start,end:re.end})+"): it’s not open");Fe.position.end=oi(re.end)}function p(){return yf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(re){if(this.data.expectingFirstListItemValue){const be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function y(){const re=this.resume(),be=this.stack[this.stack.length-1];be.lang=re}function x(){const re=this.resume(),be=this.stack[this.stack.length-1];be.meta=re}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const re=this.resume(),be=this.stack[this.stack.length-1];be.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const re=this.resume(),be=this.stack[this.stack.length-1];be.value=re.replace(/(\r?\n|\r)$/g,"")}function C(re){const be=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=be,Fe.identifier=er(this.sliceSerialize(re)).toLowerCase()}function R(){const re=this.resume(),be=this.stack[this.stack.length-1];be.title=re}function $(){const re=this.resume(),be=this.stack[this.stack.length-1];be.url=re}function G(re){const be=this.stack[this.stack.length-1];if(!be.depth){const Fe=this.sliceSerialize(re).length;be.depth=Fe}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function J(re){const be=this.stack[this.stack.length-1];be.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function se(){this.data.setextHeadingSlurpLineEnding=void 0}function he(re){const Fe=this.stack[this.stack.length-1].children;let qe=Fe[Fe.length-1];(!qe||qe.type!=="text")&&(qe=Jl(),qe.position={start:oi(re.start),end:void 0},Fe.push(qe)),this.stack.push(qe)}function V(re){const be=this.stack.pop();be.value+=this.sliceSerialize(re),be.position.end=oi(re.end)}function ie(re){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Fe=be.children[be.children.length-1];Fe.position.end=oi(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(be.type)&&(he.call(this,re),V.call(this,re))}function ee(){this.data.atHardBreak=!0}function we(){const re=this.resume(),be=this.stack[this.stack.length-1];be.value=re}function de(){const re=this.resume(),be=this.stack[this.stack.length-1];be.value=re}function ae(){const re=this.resume(),be=this.stack[this.stack.length-1];be.value=re}function _e(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=be,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function ue(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=be,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function z(re){const be=this.sliceSerialize(re),Fe=this.stack[this.stack.length-2];Fe.label=Kk(be),Fe.identifier=er(be).toLowerCase()}function Z(){const re=this.stack[this.stack.length-1],be=this.resume(),Fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Fe.type==="link"){const qe=re.children;Fe.children=qe}else Fe.alt=be}function w(){const re=this.resume(),be=this.stack[this.stack.length-1];be.url=re}function k(){const re=this.resume(),be=this.stack[this.stack.length-1];be.title=re}function q(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function pe(re){const be=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=be,Fe.identifier=er(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function Oe(re){this.data.characterReferenceType=re.type}function ye(re){const be=this.sliceSerialize(re),Fe=this.data.characterReferenceType;let qe;Fe?(qe=P1(be,Fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=Tf(be);const Qe=this.stack[this.stack.length-1];Qe.value+=qe}function Re(re){const be=this.stack.pop();be.position.end=oi(re.end)}function Be(re){V.call(this,re);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(re)}function Ke(re){V.call(this,re);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(re)}function Tt(){return{type:"blockquote",children:[]}}function jn(){return{type:"code",lang:null,meta:null,value:""}}function Tn(){return{type:"inlineCode",value:""}}function $r(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Vr(){return{type:"emphasis",children:[]}}function an(){return{type:"heading",depth:0,children:[]}}function Ue(){return{type:"break"}}function Ct(){return{type:"html",value:""}}function In(){return{type:"image",title:null,url:"",alt:null}}function bn(){return{type:"link",title:null,url:"",children:[]}}function sr(re){return{type:"list",ordered:re.type==="listOrdered",start:null,spread:re._spread,children:[]}}function Cr(re){return{type:"listItem",spread:re._spread,checked:null,children:[]}}function or(){return{type:"paragraph",children:[]}}function Ql(){return{type:"strong",children:[]}}function Jl(){return{type:"text",value:""}}function Zl(){return{type:"thematicBreak"}}}function oi(e){return{line:e.line,column:e.column,offset:e.offset}}function K1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?K1(e,r):e3(e,r)}}function e3(e,t){let n;for(n in t)if(X1.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 Q1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ta({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ta({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ta({start:t.start,end:t.end})+") is still open")}function t3(e){const t=this;t.parser=n;function n(r){return Jk(r,oe(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function n3(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 r3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
27
|
-
`}]}function
|
|
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
|
|
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 t3(e){const r={constructs:R1([Qk,...(e||{}).extensions||[]]),content:s(vC),defined:[],document:s(NC),flow:s(qk),lazy:{},string:s(Gk),text:s(Xk)};return r;function s(a){return u;function u(l){return Jk(r,a,l)}}}function n3(e){for(;!z1(e););return e}const K1=/[\0\t\n\r]/g;function r3(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,p,m,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(K1.lastIndex=m,f=K1.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=T+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const i3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function s3(e){return e.replace(i3,o3)}function o3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return L1(n.slice(a?2:1),a?16:10)}return Tf(n)||e}const Q1={}.hasOwnProperty;function a3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),u3(n)(n3(t3(n).document().write(r3()(e,t,!0))))}function u3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(xn),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(cn),blockQuote:a(ve),characterEscape:de,characterReference:de,codeFenced:a(Ve),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Ve,u),codeText:a(_t,u),codeTextData:de,data:de,codeFlowValue:de,definition:a(qt),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(or),hardBreakEscape:a(ze),hardBreakTrailing:a(ze),htmlFlow:a(Ot,u),htmlFlowData:de,htmlText:a(Ot,u),htmlTextData:de,image:a(Rn),label:u,link:a(xn),listItem:a(Or),listItemValue:T,listOrdered:a(ar,m),listUnordered:a(ar),paragraph:a(ur),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(cn),strong:a(Kl),thematicBreak:a(Jl)},exit:{atxHeading:d(),atxHeadingSequence:W,autolink:d(),autolinkEmail:ie,autolinkProtocol:ye,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:we,characterReference:re,codeFenced:d(A),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:$,codeIndented:d(S),codeText:d(ce),codeTextData:$,data:$,definition:d(),definitionDestinationString:j,definitionLabelString:C,definitionTitleString:P,emphasis:d(),hardBreakEscape:d(te),hardBreakTrailing:d(te),htmlFlow:d(xe),htmlFlowData:$,htmlText:d(fe),htmlTextData:$,image:d(le),label:ue,labelText:Q,lineEnding:se,link:d(he),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ge,resourceDestinationString:N,resourceTitleString:R,resource:Y,setextHeading:d(ne),setextHeadingLineSequence:K,setextHeadingText:D,strong:d(),thematicBreak:d()}};J1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let Ae={type:"root",children:[]};const je={stack:[Ae],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Ge=[];let Ze=-1;for(;++Ze<oe.length;)if(oe[Ze][1].type==="listOrdered"||oe[Ze][1].type==="listUnordered")if(oe[Ze][0]==="enter")Ge.push(Ze);else{const Yt=Ge.pop();Ze=s(oe,Yt,Ze)}for(Ze=-1;++Ze<oe.length;){const Yt=t[oe[Ze][0]];Q1.call(Yt,oe[Ze][1].type)&&Yt[oe[Ze][1].type].call(Object.assign({sliceSerialize:oe[Ze][2].sliceSerialize},je),oe[Ze][1])}if(je.tokenStack.length>0){const Yt=je.tokenStack[je.tokenStack.length-1];(Yt[1]||Z1).call(je,void 0,Yt[0])}for(Ae.position={start:oi(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:oi(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<t.transforms.length;)Ae=t.transforms[Ze](Ae)||Ae;return Ae}function s(oe,Ae,je){let Ge=Ae-1,Ze=-1,Yt=!1,qr,$n,mi,ls;for(;++Ge<=je;){const Wt=oe[Ge];switch(Wt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Wt[0]==="enter"?Ze++:Ze--,ls=void 0;break}case"lineEndingBlank":{Wt[0]==="enter"&&(qr&&!ls&&!Ze&&!mi&&(mi=Ge),ls=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ls=void 0}if(!Ze&&Wt[0]==="enter"&&Wt[1].type==="listItemPrefix"||Ze===-1&&Wt[0]==="exit"&&(Wt[1].type==="listUnordered"||Wt[1].type==="listOrdered")){if(qr){let Ir=Ge;for($n=void 0;Ir--;){const Ln=oe[Ir];if(Ln[1].type==="lineEnding"||Ln[1].type==="lineEndingBlank"){if(Ln[0]==="exit")continue;$n&&(oe[$n][1].type="lineEndingBlank",Yt=!0),Ln[1].type="lineEnding",$n=Ir}else if(!(Ln[1].type==="linePrefix"||Ln[1].type==="blockQuotePrefix"||Ln[1].type==="blockQuotePrefixWhitespace"||Ln[1].type==="blockQuoteMarker"||Ln[1].type==="listItemIndent"))break}mi&&(!$n||mi<$n)&&(qr._spread=!0),qr.end=Object.assign({},$n?oe[$n][1].start:Wt[1].end),oe.splice($n||Ge,0,["exit",qr,Wt[2]]),Ge++,je++}if(Wt[1].type==="listItemPrefix"){const Ir={type:"listItem",_spread:!1,start:Object.assign({},Wt[1].start),end:void 0};qr=Ir,oe.splice(Ge,0,["enter",Ir,Wt[2]]),Ge++,je++,mi=void 0,ls=!0}}}return oe[Ae][1]._spread=Yt,je}function a(oe,Ae){return je;function je(Ge){l.call(this,oe(Ge),Ge),Ae&&Ae.call(this,Ge)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(oe,Ae,je){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([Ae,je||void 0]),oe.position={start:oi(Ae.start),end:void 0}}function d(oe){return Ae;function Ae(je){oe&&oe.call(this,je),f.call(this,je)}}function f(oe,Ae){const je=this.stack.pop(),Ge=this.tokenStack.pop();if(Ge)Ge[0].type!==oe.type&&(Ae?Ae.call(this,oe,Ge[0]):(Ge[1]||Z1).call(this,oe,Ge[0]));else throw new Error("Cannot close `"+oe.type+"` ("+Zo({start:oe.start,end:oe.end})+"): it’s not open");je.position.end=oi(oe.end)}function p(){return yf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(oe){if(this.data.expectingFirstListItemValue){const Ae=this.stack[this.stack.length-2];Ae.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function y(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.lang=oe}function x(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.meta=oe}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe.replace(/(\r?\n|\r)$/g,"")}function C(oe){const Ae=this.resume(),je=this.stack[this.stack.length-1];je.label=Ae,je.identifier=tr(this.sliceSerialize(oe)).toLowerCase()}function P(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=oe}function j(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=oe}function W(oe){const Ae=this.stack[this.stack.length-1];if(!Ae.depth){const je=this.sliceSerialize(oe).length;Ae.depth=je}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function K(oe){const Ae=this.stack[this.stack.length-1];Ae.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function de(oe){const je=this.stack[this.stack.length-1].children;let Ge=je[je.length-1];(!Ge||Ge.type!=="text")&&(Ge=Ql(),Ge.position={start:oi(oe.start),end:void 0},je.push(Ge)),this.stack.push(Ge)}function $(oe){const Ae=this.stack.pop();Ae.value+=this.sliceSerialize(oe),Ae.position.end=oi(oe.end)}function se(oe){const Ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const je=Ae.children[Ae.children.length-1];je.position.end=oi(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ae.type)&&(de.call(this,oe),$.call(this,oe))}function te(){this.data.atHardBreak=!0}function xe(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe}function fe(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe}function ce(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe}function he(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Ae,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function le(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Ae,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function Q(oe){const Ae=this.sliceSerialize(oe),je=this.stack[this.stack.length-2];je.label=s3(Ae),je.identifier=tr(Ae).toLowerCase()}function ue(){const oe=this.stack[this.stack.length-1],Ae=this.resume(),je=this.stack[this.stack.length-1];if(this.data.inReference=!0,je.type==="link"){const Ge=oe.children;je.children=Ge}else je.alt=Ae}function N(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=oe}function R(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=oe}function Y(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function ge(oe){const Ae=this.resume(),je=this.stack[this.stack.length-1];je.label=Ae,je.identifier=tr(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function Re(oe){this.data.characterReferenceType=oe.type}function we(oe){const Ae=this.sliceSerialize(oe),je=this.data.characterReferenceType;let Ge;je?(Ge=L1(Ae,je==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ge=Tf(Ae);const Ze=this.stack[this.stack.length-1];Ze.value+=Ge}function re(oe){const Ae=this.stack.pop();Ae.position.end=oi(oe.end)}function ye(oe){$.call(this,oe);const Ae=this.stack[this.stack.length-1];Ae.url=this.sliceSerialize(oe)}function ie(oe){$.call(this,oe);const Ae=this.stack[this.stack.length-1];Ae.url="mailto:"+this.sliceSerialize(oe)}function ve(){return{type:"blockquote",children:[]}}function Ve(){return{type:"code",lang:null,meta:null,value:""}}function _t(){return{type:"inlineCode",value:""}}function qt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function or(){return{type:"emphasis",children:[]}}function cn(){return{type:"heading",depth:0,children:[]}}function ze(){return{type:"break"}}function Ot(){return{type:"html",value:""}}function Rn(){return{type:"image",title:null,url:"",alt:null}}function xn(){return{type:"link",title:null,url:"",children:[]}}function ar(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Or(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function ur(){return{type:"paragraph",children:[]}}function Kl(){return{type:"strong",children:[]}}function Ql(){return{type:"text",value:""}}function Jl(){return{type:"thematicBreak"}}}function oi(e){return{line:e.line,column:e.column,offset:e.offset}}function J1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?J1(e,r):l3(e,r)}}function l3(e,t){let n;for(n in t)if(Q1.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Z1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Zo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Zo({start:t.start,end:t.end})+") is still open")}function c3(e){const t=this;t.parser=n;function n(r){return a3(r,ae(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function d3(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 f3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
27
|
+
`}]}function h3(e,t){const n=t.value?t.value+`
|
|
28
|
+
`:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function p3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function m3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function g3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Bs(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,l+=1,e.footnoteCounts.set(r,l);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function E3(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 y3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function eE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=r:s.push({type:"text",value:r}),s}function T3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eE(e,t);const s={src:Bs(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function b3(e,t){const n={src:Bs(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function _3(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 x3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eE(e,t);const s={href:Bs(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function w3(e,t){const n={href:Bs(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function S3(e,t,n){const r=e.all(t),s=n?v3(n):tE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const p=r[l];(s||l!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
|
|
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
|
|
31
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(
|
|
32
|
-
`}]}}const
|
|
30
|
+
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function v3(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=tE(n[r])}return t}function tE(e){const t=e.spread;return t==null?e.children.length>1:t}function A3(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 N3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function C3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function k3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function O3(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Tr(t.children[1]),d=Gu(t.children[t.children.length-1]);l&&d&&(u.position={start:l,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function I3(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,l=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let x={type:"element",tagName:a,properties:T,children:[]};m&&(x.children=e.all(m),e.patch(m,x),x=e.applyData(m,x)),f.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function P3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const nE=9,rE=32;function R3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(iE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(iE(t.slice(s),s>0,!1)),a.join("")}function iE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===nE||a===rE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===nE||a===rE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function L3(e,t){const n={type:"text",value:R3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function D3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const M3={blockquote:d3,break:f3,code:h3,delete:p3,emphasis:m3,footnoteReference:g3,heading:E3,html:y3,imageReference:T3,image:b3,inlineCode:_3,linkReference:x3,link:w3,listItem:S3,list:A3,paragraph:N3,root:C3,strong:k3,table:O3,tableCell:P3,tableRow:I3,text:L3,thematicBreak:D3,toml:Zu,yaml:Zu,definition:Zu,footnoteDefinition:Zu};function Zu(){}const sE=-1,el=0,ia=1,tl=2,vf=3,Af=4,Nf=5,Cf=6,oE=7,aE=8,uE=typeof self=="object"?self:globalThis,lE=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new uE[e](t)},F3=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case el:case sE:return n(u,s);case ia:{const l=n([],s);for(const d of u)l.push(r(d));return l}case tl:{const l=n({},s);for(const[d,f]of u)l[r(d)]=r(f);return l}case vf:return n(new Date(u),s);case Af:{const{source:l,flags:d}=u;return n(new RegExp(l,d),s)}case Nf:{const l=n(new Map,s);for(const[d,f]of u)l.set(r(d),r(f));return l}case Cf:{const l=n(new Set,s);for(const d of u)l.add(r(d));return l}case oE:{const{name:l,message:d}=u;return n(typeof uE[l]=="function"?lE(l,d):new Error(d),s)}case aE:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:l}=new Uint8Array(u);return n(new DataView(l),u)}}return n(lE(a,u),s)};return r},cE=e=>F3(new Map,e)(0),Gi="",{toString:B3}={},{keys:U3}=Object,sa=e=>{const t=typeof e;if(t!=="object"||!e)return[el,t];const n=B3.call(e).slice(8,-1);switch(n){case"Array":return[ia,Gi];case"Object":return[tl,Gi];case"Date":return[vf,Gi];case"RegExp":return[Af,Gi];case"Map":return[Nf,Gi];case"Set":return[Cf,Gi];case"DataView":return[ia,n]}return n.includes("Array")?[ia,n]:e instanceof Error?[oE,e.name||"Error"]:[tl,n]},nl=([e,t])=>e===el&&(t==="function"||t==="symbol"),H3=(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]=sa(u);switch(l){case el:{let p=u;switch(d){case"bigint":l=aE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([sE],u)}return s([l,p],u)}case ia:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),s([d,[...T]],u)}const p=[],m=s([l,p],u);for(const T of u)p.push(a(T));return m}case tl:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=s([l,p],u);for(const T of U3(u))(e||!nl(sa(u[T])))&&p.push([a(T),a(u[T])]);return m}case vf:return s([l,isNaN(u.getTime())?Gi:u.toISOString()],u);case Af:{const{source:p,flags:m}=u;return s([l,{source:p,flags:m}],u)}case Nf:{const p=[],m=s([l,p],u);for(const[T,y]of u)(e||!(nl(sa(T))||nl(sa(y))))&&p.push([a(T),a(y)]);return m}case Cf:{const p=[],m=s([l,p],u);for(const T of u)(e||!nl(sa(T)))&&p.push(a(T));return m}}const{message:f}=u;return s([l,{name:d,message:f}],u)};return a},dE=(e,{json:t,lossy:n}={})=>{const r=[];return H3(!(t||n),!!t,new Map,r)(e),r},Xi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?cE(dE(e,t)):structuredClone(e):(e,t)=>cE(dE(e,t));function j3(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function z3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function $3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||j3,r=e.options.footnoteBackLabel||z3,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),T=Bs(m.toLowerCase());let y=0;const x=[],v=e.footnoteCounts.get(m);for(;v!==void 0&&++y<=v;){x.length>0&&x.push({type:"text",value:" "});let C=typeof n=="string"?n:n(d,y);typeof C=="string"&&(C={type:"text",value:C}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const C=A.children[A.children.length-1];C&&C.type==="text"?C.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...x)}else p.push(...x);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,S),l.push(S)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:ae(U({},Xi(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
|
|
31
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
32
|
+
`}]}}const rl=(function(e){if(e==null)return W3;if(typeof e=="function")return il(e);if(typeof e=="object")return Array.isArray(e)?V3(e):q3(e);if(typeof e=="string")return Y3(e);throw new Error("Expected function, string, or object as test")});function V3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rl(e[n]);return il(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function q3(e){const t=e;return il(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function Y3(e){return il(t);function t(n){return n&&n.type===e}}function il(e){return t;function t(n,r,s){return!!(G3(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function W3(){return!0}function G3(e){return e!==null&&typeof e=="object"&&"type"in e}function RB(e){return e}const fE=[],X3=!0,kf=!1,K3="skip";function hE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=rl(s),u=r?-1:1;l(e,void 0,[])();function l(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=fE,x,v,A;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=Q3(n(d,p)),y[0]===kf))return y;if("children"in d&&d.children){const S=d;if(S.children&&y[0]!==K3)for(v=(r?S.children.length:-1)+u,A=p.concat(S);v>-1&&v<S.children.length;){const C=S.children[v];if(x=l(C,v,A)(),x[0]===kf)return x;v=typeof x[1]=="number"?x[1]:v+u}}return y}}}function Q3(e){return Array.isArray(e)?e:typeof e=="number"?[X3,e]:e==null?fE:[e]}function sl(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),hE(e,a,l,s);function l(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const Of={}.hasOwnProperty,J3={};function Z3(e,t){const n=t||J3,r=new Map,s=new Map,a=new Map,u=U(U({},M3),n.handlers),l={all:f,applyData:tO,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:eO,wrap:rO};return sl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,T=String(p.identifier).toUpperCase();m.has(T)||m.set(T,p)}}),l;function d(p,m){const T=p.type,y=l.handlers[T];if(Of.call(l.handlers,T)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(T)){if("children"in p){const v=p,{children:A}=v,S=hn(v,["children"]),C=Xi(S);return C.children=l.all(p),C}return Xi(p)}return(l.options.unknownHandler||nO)(l,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const x=l.one(T[y],p);if(x){if(y&&T[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=pE(x.value)),!Array.isArray(x)&&x.type==="element")){const v=x.children[0];v&&v.type==="text"&&(v.value=pE(v.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function eO(e,t){e.position&&(t.position=x1(e))}function tO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,Xi(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function nO(e,t){const n=t.data||{},r="value"in t&&!(Of.call(n,"hProperties")||Of.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 rO(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
|
|
36
|
-
`},s),a}function X3(e,t){return e&&"run"in e?function(n,r){return je(this,null,function*(){const s=hE(n,U({file:r},t));yield e.run(s,r)})}:function(n,r){return hE(n,U({file:r},e||t))}}function pE(e){if(e)throw e}var If,mE;function K3(){if(mE)return If;mE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var T;for(T in f);return typeof T=="undefined"||e.call(f,T)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return If=function d(){var f,p,m,T,y,x,N=arguments[0],A=1,v=arguments.length,C=!1;for(typeof N=="boolean"&&(C=N,N=arguments[1]||{},A=2),(N==null||typeof N!="object"&&typeof N!="function")&&(N={});A<v;++A)if(f=arguments[A],f!=null)for(p in f)m=c(N,p),T=c(f,p),N!==T&&(C&&T&&(a(T)||(y=s(T)))?(y?(y=!1,x=m&&s(m)?m:[]):x=m&&a(m)?m:{},u(N,{name:p,newValue:d(C,x,T)})):typeof T!="undefined"&&u(N,{name:p,newValue:T}));return N},If}var Q3=K3();const Pf=Ye(Q3);function Rf(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 J3(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...s);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?Z3(p,c)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function Z3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return s(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...c){n||(n=!0,t(u,...c))}function a(u){s(null,u)}}const yr={basename:eO,dirname:tO,extname:nO,join:rO,sep:"/"};function eO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ua(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function tO(e){if(ua(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 nO(e){ua(e);let t=e.length,n=-1,r=0,s=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function rO(...e){let t=-1,n;for(;++t<e.length;)ua(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":iO(n)}function iO(e){ua(e);const t=e.codePointAt(0)===47;let n=sO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function sO(e,t){let n="",r=0,s=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(s===u-1||a===1))if(s!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function ua(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const oO={cwd:aO};function aO(){return"/"}function Lf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uO(e){if(typeof e=="string")e=new URL(e);else if(!Lf(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 lO(e)}function lO(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 Df=["history","path","basename","stem","extname","dirname"];class gE{constructor(t){let n;t?Lf(t)?n={path:t}:typeof t=="string"||cO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":oO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Df.length;){const a=Df[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)Df.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?yr.basename(this.path):void 0}set basename(t){Ff(t,"basename"),Mf(t,"basename"),this.path=yr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?yr.dirname(this.path):void 0}set dirname(t){EE(this.basename,"dirname"),this.path=yr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?yr.extname(this.path):void 0}set extname(t){if(Mf(t,"extname"),EE(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=yr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Lf(t)&&(t=uO(t)),Ff(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?yr.basename(this.path,this.extname):void 0}set stem(t){Ff(t,"stem"),Mf(t,"stem"),this.path=yr.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 Xt(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 Mf(e,t){if(e&&e.includes(yr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+yr.sep+"`")}function Ff(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function EE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dO=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),fO={}.hasOwnProperty;class Bf extends dO{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=J3()}copy(){const t=new Bf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Pf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(jf("data",this.frozen),this.namespace[t]=n,this):fO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(jf("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=al(t),r=this.parser||this.Parser;return Uf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Uf("process",this.parser||this.Parser),Hf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const c=al(t),d=r.parse(c);r.run(d,c,function(p,m,T){if(p||!m||!T)return f(p);const y=m,x=r.stringify(y,T);mO(x)?T.value=x:T.result=x,f(p,T)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Uf("processSync",this.parser||this.Parser),Hf("processSync",this.compiler||this.Compiler),this.process(t,s),TE("processSync","process",n),r;function s(a,u){n=!0,pE(a),r=u}}run(t,n,r){yE(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=al(n);s.run(t,d,f);function f(p,m,T){const y=m||t;p?c(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),TE("runSync","run",r),s;function a(u,c){pE(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=al(n),s=this.compiler||this.Compiler;return Hf("stringify",s),yE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(jf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(s.settings=Pf(!0,s.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,...x]=p;const N=r[T][1];Rf(N)&&Rf(y)&&(y=Pf(!0,N,y)),r[T]=[f,y,...x]}}}}const hO=new Bf().freeze();function Uf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Hf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jf(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 yE(e){if(!Rf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function TE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function al(e){return pO(e)?e:new gE(e)}function pO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mO(e){return typeof e=="string"||gO(e)}function gO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const EO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",bE=[],_E={allowDangerousHtml:!0},yO=/^(https?|ircs?|mailto|xmpp)$/i,TO=[{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 xE(e){const t=bO(e),n=_O(e);return xO(t.runSync(t.parse(n),n),e)}function bO(e){const t=e.rehypePlugins||bE,n=e.remarkPlugins||bE,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),_E):_E;return hO().use(t3).use(n).use(X3,r).use(t)}function _O(e){const t=e.children||"",n=new gE;return typeof t=="string"&&(n.value=t),n}function xO(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||wO;for(const p of TO)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+EO+p.id,void 0);return ol(e,f),WN(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Ef)if(Object.hasOwn(Ef,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],N=Ef[y];(N===null||N.includes(p.tagName))&&(p.properties[y]=d(String(x||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,T)),y&&T&&typeof m=="number")return c&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function wO(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||yO.test(e.slice(0,t))?e:""}const wE=/[#.]/g;function SO(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){wE.lastIndex=s;const c=wE.exec(n),d=n.slice(s,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),c&&(a=c[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function SE(e,t,n){const r=n?CO(n):void 0;function s(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=SO(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,vO(u))c.unshift(u);else for(const[m,T]of Object.entries(u))AO(e,d.properties,m,T)}for(const f of c)zf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function vO(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 AO(e,t,n,r){const s=Gu(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=h1(r):s.commaSeparated?a=e1(r):s.commaOrSpaceSeparated?a=h1(e1(r).join(" ")):a=vE(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?NO(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(vE(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function zf(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)zf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?zf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function vE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Qo(n)===Qo(t)))return!0}return n}function NO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function CO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const kO=["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"],OO=SE(Jo,"div"),IO=SE(ii,"g",kO);function PO(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=AE(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=AE(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function AE(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
37
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Ki={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},NE={}.hasOwnProperty,RO=Object.prototype;function LO(e,t){const n=t||{};return $f({file:n.file||void 0,location:!1,schema:n.space==="svg"?ii:Jo,verbose:n.verbose||!1},e)}function $f(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ul(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:CE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=PO(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},ul(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ul(e,r,n),n}default:return n=DO(e,t),n}}function CE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=$f(e,t[n]);r.push(s)}return r}function DO(e,t){const n=e.schema;e.schema=t.namespaceURI===Ki.svg?ii:Jo;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;NE.call(RO,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?IO:OO)(t.tagName,s,CE(e,t.childNodes));if(ul(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&Hs(d.startTag),p=d&&d.endTag&&Hs(d.endTag),m=$f(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function ul(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=MO(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function MO(e,t,n){const r=Hs(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)NE.call(n.attrs,u)&&(a[Gu(e.schema,u).property]=Hs(n.attrs[u]));n.startTag;const c=Hs(n.startTag),d=n.endTag?Hs(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Hs(e){const t=kE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=kE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function kE(e){return e.line&&e.column?e:void 0}const OE={}.hasOwnProperty;function IE(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&OE.call(s,e)){const d=String(s[e]);u=OE.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const FO={},BO={}.hasOwnProperty,PE=IE("type",{handlers:{root:HO,element:qO,text:$O,comment:VO,doctype:zO}});function UO(e,t){const r=(t||FO).space;return PE(e,r==="svg"?ii:Jo)}function HO(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Vf(e.children,n,t),js(e,n),n}function jO(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Vf(e.children,n,t),js(e,n),n}function zO(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return js(e,t),t}function $O(e){const t={nodeName:"#text",value:e.value,parentNode:null};return js(e,t),t}function VO(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return js(e,t),t}function qO(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ii);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&BO.call(e.properties,a)){const d=YO(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Ki[u],childNodes:[],parentNode:null};return c.childNodes=Vf(e.children,c,r),js(e,c),e.tagName==="template"&&e.content&&(c.content=jO(e.content,r)),c}function YO(e,t,n){const r=Gu(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?t1(n):p1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=Ki[r.space]}return s}function Vf(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=PE(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 WO=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],GO=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]),ht="�";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 gn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function RE(e){return e>=55296&&e<=57343}function XO(e){return e>=56320&&e<=57343}function KO(e,t){return(e-55296)*1024+9216+t}function LE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function DE(e){return e>=64976&&e<=65007||GO.has(e)}var ne;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ne||(ne={}));const QO=65536;class JO{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=QO,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:a}=this,u=s+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(XO(n))return this.pos++,this._addGap(),KO(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(ne.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,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,RE(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){LE(t)?this._err(ne.controlCharacterInInputStream):DE(t)&&this._err(ne.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ve;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ve||(Ve={}));function ME(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 ZO=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))),eI=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 tI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=eI.get(e))!==null&&t!==void 0?t:e}var Lt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Lt||(Lt={}));const nI=32;var ai;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ai||(ai={}));function qf(e){return e>=Lt.ZERO&&e<=Lt.NINE}function rI(e){return e>=Lt.UPPER_A&&e<=Lt.UPPER_F||e>=Lt.LOWER_A&&e<=Lt.LOWER_F}function iI(e){return e>=Lt.UPPER_A&&e<=Lt.UPPER_Z||e>=Lt.LOWER_A&&e<=Lt.LOWER_Z||qf(e)}function sI(e){return e===Lt.EQUALS||iI(e)}var Dt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Dt||(Dt={}));var Mr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Mr||(Mr={}));class oI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Dt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Mr.Strict}startEntity(t){this.decodeMode=t,this.state=Dt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Dt.EntityStart:return t.charCodeAt(n)===Lt.NUM?(this.state=Dt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Dt.NamedEntity,this.stateNamedEntity(t,n));case Dt.NumericStart:return this.stateNumericStart(t,n);case Dt.NumericDecimal:return this.stateNumericDecimal(t,n);case Dt.NumericHex:return this.stateNumericHex(t,n);case Dt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|nI)===Lt.LOWER_X?(this.state=Dt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Dt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,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(qf(s)||rI(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(qf(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===Lt.SEMI)this.consumed+=1;else if(this.decodeMode===Mr.Strict)return 0;return this.emitCodePoint(tI(this.result),this.consumed),this.errors&&(t!==Lt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&ai.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=aI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Mr.Attribute&&(a===0||sI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&ai.VALUE_LENGTH)>>14,a!==0){if(u===Lt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Mr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&ai.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~ai.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Dt.NamedEntity:return this.result!==0&&(this.decodeMode!==Mr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Dt.NumericDecimal:return this.emitNumericEntity(0,2);case Dt.NumericHex:return this.emitNumericEntity(0,3);case Dt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Dt.EntityStart:return 0}}}function aI(e,t,n,r){const s=(t&ai.BRANCH_LENGTH)>>7,a=t&ai.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,c=u+s-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+s]}return-1}var ce;(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/"})(ce||(ce={}));var Qi;(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"})(Qi||(Qi={}));var Un;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Un||(Un={}));var K;(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"})(K||(K={}));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 uI=new Map([[K.A,g.A],[K.ADDRESS,g.ADDRESS],[K.ANNOTATION_XML,g.ANNOTATION_XML],[K.APPLET,g.APPLET],[K.AREA,g.AREA],[K.ARTICLE,g.ARTICLE],[K.ASIDE,g.ASIDE],[K.B,g.B],[K.BASE,g.BASE],[K.BASEFONT,g.BASEFONT],[K.BGSOUND,g.BGSOUND],[K.BIG,g.BIG],[K.BLOCKQUOTE,g.BLOCKQUOTE],[K.BODY,g.BODY],[K.BR,g.BR],[K.BUTTON,g.BUTTON],[K.CAPTION,g.CAPTION],[K.CENTER,g.CENTER],[K.CODE,g.CODE],[K.COL,g.COL],[K.COLGROUP,g.COLGROUP],[K.DD,g.DD],[K.DESC,g.DESC],[K.DETAILS,g.DETAILS],[K.DIALOG,g.DIALOG],[K.DIR,g.DIR],[K.DIV,g.DIV],[K.DL,g.DL],[K.DT,g.DT],[K.EM,g.EM],[K.EMBED,g.EMBED],[K.FIELDSET,g.FIELDSET],[K.FIGCAPTION,g.FIGCAPTION],[K.FIGURE,g.FIGURE],[K.FONT,g.FONT],[K.FOOTER,g.FOOTER],[K.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[K.FORM,g.FORM],[K.FRAME,g.FRAME],[K.FRAMESET,g.FRAMESET],[K.H1,g.H1],[K.H2,g.H2],[K.H3,g.H3],[K.H4,g.H4],[K.H5,g.H5],[K.H6,g.H6],[K.HEAD,g.HEAD],[K.HEADER,g.HEADER],[K.HGROUP,g.HGROUP],[K.HR,g.HR],[K.HTML,g.HTML],[K.I,g.I],[K.IMG,g.IMG],[K.IMAGE,g.IMAGE],[K.INPUT,g.INPUT],[K.IFRAME,g.IFRAME],[K.KEYGEN,g.KEYGEN],[K.LABEL,g.LABEL],[K.LI,g.LI],[K.LINK,g.LINK],[K.LISTING,g.LISTING],[K.MAIN,g.MAIN],[K.MALIGNMARK,g.MALIGNMARK],[K.MARQUEE,g.MARQUEE],[K.MATH,g.MATH],[K.MENU,g.MENU],[K.META,g.META],[K.MGLYPH,g.MGLYPH],[K.MI,g.MI],[K.MO,g.MO],[K.MN,g.MN],[K.MS,g.MS],[K.MTEXT,g.MTEXT],[K.NAV,g.NAV],[K.NOBR,g.NOBR],[K.NOFRAMES,g.NOFRAMES],[K.NOEMBED,g.NOEMBED],[K.NOSCRIPT,g.NOSCRIPT],[K.OBJECT,g.OBJECT],[K.OL,g.OL],[K.OPTGROUP,g.OPTGROUP],[K.OPTION,g.OPTION],[K.P,g.P],[K.PARAM,g.PARAM],[K.PLAINTEXT,g.PLAINTEXT],[K.PRE,g.PRE],[K.RB,g.RB],[K.RP,g.RP],[K.RT,g.RT],[K.RTC,g.RTC],[K.RUBY,g.RUBY],[K.S,g.S],[K.SCRIPT,g.SCRIPT],[K.SEARCH,g.SEARCH],[K.SECTION,g.SECTION],[K.SELECT,g.SELECT],[K.SOURCE,g.SOURCE],[K.SMALL,g.SMALL],[K.SPAN,g.SPAN],[K.STRIKE,g.STRIKE],[K.STRONG,g.STRONG],[K.STYLE,g.STYLE],[K.SUB,g.SUB],[K.SUMMARY,g.SUMMARY],[K.SUP,g.SUP],[K.TABLE,g.TABLE],[K.TBODY,g.TBODY],[K.TEMPLATE,g.TEMPLATE],[K.TEXTAREA,g.TEXTAREA],[K.TFOOT,g.TFOOT],[K.TD,g.TD],[K.TH,g.TH],[K.THEAD,g.THEAD],[K.TITLE,g.TITLE],[K.TR,g.TR],[K.TRACK,g.TRACK],[K.TT,g.TT],[K.U,g.U],[K.UL,g.UL],[K.SVG,g.SVG],[K.VAR,g.VAR],[K.WBR,g.WBR],[K.XMP,g.XMP]]);function zs(e){var t;return(t=uI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const me=g,lI={[ce.HTML]:new Set([me.ADDRESS,me.APPLET,me.AREA,me.ARTICLE,me.ASIDE,me.BASE,me.BASEFONT,me.BGSOUND,me.BLOCKQUOTE,me.BODY,me.BR,me.BUTTON,me.CAPTION,me.CENTER,me.COL,me.COLGROUP,me.DD,me.DETAILS,me.DIR,me.DIV,me.DL,me.DT,me.EMBED,me.FIELDSET,me.FIGCAPTION,me.FIGURE,me.FOOTER,me.FORM,me.FRAME,me.FRAMESET,me.H1,me.H2,me.H3,me.H4,me.H5,me.H6,me.HEAD,me.HEADER,me.HGROUP,me.HR,me.HTML,me.IFRAME,me.IMG,me.INPUT,me.LI,me.LINK,me.LISTING,me.MAIN,me.MARQUEE,me.MENU,me.META,me.NAV,me.NOEMBED,me.NOFRAMES,me.NOSCRIPT,me.OBJECT,me.OL,me.P,me.PARAM,me.PLAINTEXT,me.PRE,me.SCRIPT,me.SECTION,me.SELECT,me.SOURCE,me.STYLE,me.SUMMARY,me.TABLE,me.TBODY,me.TD,me.TEMPLATE,me.TEXTAREA,me.TFOOT,me.TH,me.THEAD,me.TITLE,me.TR,me.TRACK,me.UL,me.WBR,me.XMP]),[ce.MATHML]:new Set([me.MI,me.MO,me.MN,me.MS,me.MTEXT,me.ANNOTATION_XML]),[ce.SVG]:new Set([me.TITLE,me.FOREIGN_OBJECT,me.DESC]),[ce.XLINK]:new Set,[ce.XML]:new Set,[ce.XMLNS]:new Set},Yf=new Set([me.H1,me.H2,me.H3,me.H4,me.H5,me.H6]);K.STYLE,K.SCRIPT,K.XMP,K.IFRAME,K.NOEMBED,K.NOFRAMES,K.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 xt={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function cI(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function la(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function dI(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function ui(e){return dI(e)||la(e)}function FE(e){return ui(e)||cI(e)}function ll(e){return e+32}function BE(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function UE(e){return BE(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function fI(e){return e===I.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:RE(e)?ne.surrogateCharacterReference:DE(e)?ne.noncharacterCharacterReference:LE(e)||e===I.CARRIAGE_RETURN?ne.controlCharacterReference:null}class hI{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 JO(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new oI(ZO,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ne.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ne.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=fI(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:Ve.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ve.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ve.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ve.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(ME(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(ne.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=zs(t.tagName),t.type===Ve.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ne.endTagWithAttributes),t.selfClosing&&this._err(ne.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ve.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ve.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ve.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ve.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=BE(t)?Ve.WHITESPACE_CHARACTER:t===I.NULL?Ve.NULL_CHARACTER:Ve.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ve.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Mr.Attribute:Mr.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(ne.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(ne.unexpectedNullCharacter),this._emitChars(ht);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(ne.unexpectedNullCharacter),this._emitChars(ht);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(ne.unexpectedNullCharacter),this._emitChars(ht);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ui(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case 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(ne.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ui(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(ne.missingEndTagName),this.state=L.DATA;break}case I.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ne.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(ne.unexpectedNullCharacter),n.tagName+=ht;break}case I.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(la(t)?ll(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){ui(t)?(this.state=L.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case 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){ui(t)?(this.state=L.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case 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){ui(t)?(this.state=L.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===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(ne.unexpectedNullCharacter),this._emitChars(ht);break}case I.EOF:{this._err(ne.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(ne.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(ht);break}case I.EOF:{this._err(ne.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(ne.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(ht);break}case I.EOF:{this._err(ne.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:ui(t)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ui(t)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(gn.SCRIPT,!1)&&UE(this.preprocessor.peek(gn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<gn.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(ne.unexpectedNullCharacter),this._emitChars(ht);break}case I.EOF:{this._err(ne.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(ne.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ht);break}case I.EOF:{this._err(ne.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(ne.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ht);break}case I.EOF:{this._err(ne.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(gn.SCRIPT,!1)&&UE(this.preprocessor.peek(gn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<gn.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(ne.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(ne.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.name+=ht;break}default:this.currentAttr.name+=String.fromCodePoint(la(t)?ll(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(ne.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(ne.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(ne.unexpectedNullCharacter),this.currentAttr.value+=ht;break}case I.EOF:{this._err(ne.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(ne.unexpectedNullCharacter),this.currentAttr.value+=ht;break}case I.EOF:{this._err(ne.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(ne.unexpectedNullCharacter),this.currentAttr.value+=ht;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(ne.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(ne.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(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.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(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.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(ne.unexpectedNullCharacter),n.data+=ht;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(gn.DASH_DASH,!0)?(this._createCommentToken(gn.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(gn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(gn.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(gn.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(gn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ne.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(ne.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(ne.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ne.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(ne.unexpectedNullCharacter),n.data+=ht;break}case I.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case 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(ne.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(ne.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(ne.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(ne.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ne.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(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(la(t))this._createDoctypeToken(String.fromCharCode(ll(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(ne.unexpectedNullCharacter),this._createDoctypeToken(ht),this.state=L.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=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(ne.unexpectedNullCharacter),n.name+=ht;break}case I.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(la(t)?ll(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(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(gn.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(gn.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ne.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(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.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(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.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(ne.unexpectedNullCharacter),n.publicId+=ht;break}case I.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case I.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=ht;break}case I.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case 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(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.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(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.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(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.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(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.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(ne.unexpectedNullCharacter),n.systemId+=ht;break}case I.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case I.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=ht;break}case I.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case 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(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.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(ne.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(ne.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()&&FE(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){FE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const HE=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),jE=new Set([...HE,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),cl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),pI=new Set([...cl,g.OL,g.UL]),mI=new Set([...cl,g.BUTTON]),zE=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),$E=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),gI=new Set([g.TR,g.TEMPLATE,g.HTML]),EI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),yI=new Set([g.TABLE,g.TEMPLATE,g.HTML]),TI=new Set([g.TD,g.TH]);class bI{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)===ce.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])!==ce.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(Yf,ce.HTML)}popUntilTableCellPopped(){this.popUntilPopped(TI,ce.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(yI,ce.HTML)}clearBackToTableBodyContext(){this.clearBackTo(EI,ce.HTML)}clearBackToTableRowContext(){this.clearBackTo(gI,ce.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 ce.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case ce.SVG:{if($E.has(s))return!1;break}case ce.MATHML:{if(zE.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,cl)}hasInListItemScope(t){return this.hasInDynamicScope(t,pI)}hasInButtonScope(t){return this.hasInDynamicScope(t,mI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ce.HTML:{if(Yf.has(n))return!0;if(cl.has(n))return!1;break}case ce.SVG:{if($E.has(n))return!1;break}case ce.MATHML:{if(zE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ce.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])===ce.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])===ce.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&&HE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&jE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&jE.has(this.currentTagId);)this.pop()}}const Wf=3;var Tr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Tr||(Tr={}));const VE={type:Tr.Marker};class _I{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Tr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Wf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Wf)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=Wf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(VE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Tr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Tr.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(VE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Tr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Tr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Tr.Element&&n.element===t)}}const li={createDocument(){return{nodeName:"#document",mode:Un.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};li.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(li.isTextNode(n)){n.value+=t;return}}li.appendChild(e,li.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&li.isTextNode(r)?r.value+=t:li.insertBefore(e,li.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=U(U({},e.sourceCodeLocation),t)}},qE="html",xI="about:legacy-compat",wI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",YE=["+//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//"],SI=[...YE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],vI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),WE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],AI=[...WE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function GE(e,t){return t.some(n=>e.startsWith(n))}function NI(e){return e.name===qE&&e.publicId===null&&(e.systemId===null||e.systemId===xI)}function CI(e){if(e.name!==qE)return Un.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===wI)return Un.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),vI.has(n))return Un.QUIRKS;let r=t===null?SI:YE;if(GE(n,r))return Un.QUIRKS;if(r=t===null?WE:AI,GE(n,r))return Un.LIMITED_QUIRKS}return Un.NO_QUIRKS}const XE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},kI="definitionurl",OI="definitionURL",II=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])),PI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ce.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ce.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ce.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ce.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ce.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ce.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ce.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ce.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ce.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ce.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ce.XMLNS}]]),RI=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])),LI=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 DI(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===Qi.COLOR||r===Qi.SIZE||r===Qi.FACE)||LI.has(t)}function KE(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===kI){e.attrs[t].name=OI;break}}function QE(e){for(let t=0;t<e.attrs.length;t++){const n=II.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Gf(e){for(let t=0;t<e.attrs.length;t++){const n=PI.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 MI(e){const t=RI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=zs(e.tagName))}function FI(e,t){return t===ce.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function BI(e,t,n){if(t===ce.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Qi.ENCODING){const s=n[r].value.toLowerCase();return s===XE.TEXT_HTML||s===XE.APPLICATION_XML}}return t===ce.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function UI(e,t,n,r){return(!r||r===ce.HTML)&&BI(e,t,n)||(!r||r===ce.MATHML)&&FI(e,t)}const HI="hidden",jI=8,zI=3;var B;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(B||(B={}));const $I={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},JE=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),ZE={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:li,onParseError:null};class ey{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=B.INITIAL,this.originalInsertionMode=B.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=U(U({},ZE),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 hI(this.options,this),this.activeFormattingElements=new _I(this.treeAdapter),this.fragmentContextID=r?zs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new bI(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({},ZE),n);t!=null||(t=r.treeAdapter.createElement(K.TEMPLATE,ce.HTML,[]));const s=r.treeAdapter.createElement("documentmock",ce.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(B.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:$I,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)===ce.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ce.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=B.TEXT}switchToPlaintextParsing(){this.insertionMode=B.TEXT,this.originalInsertionMode=B.IN_BODY,this.tokenizer.state=xt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===K.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ce.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=xt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=xt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=xt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=xt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&oe(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,ce.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ce.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(K.HTML,ce.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===Ve.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)===K.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ce.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ce.HTML)}_processToken(t){switch(t.type){case Ve.CHARACTER:{this.onCharacter(t);break}case Ve.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ve.COMMENT:{this.onComment(t);break}case Ve.DOCTYPE:{this.onDoctype(t);break}case Ve.START_TAG:{this._processStartTag(t);break}case Ve.END_TAG:{this.onEndTag(t);break}case Ve.EOF:{this.onEof(t);break}case Ve.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return UI(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Tr.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=B.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=B.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=B.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=B.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=B.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=B.IN_TABLE;return}case g.BODY:{this.insertionMode=B.IN_BODY;return}case g.FRAMESET:{this.insertionMode=B.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?B.AFTER_HEAD:B.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=B.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=B.IN_HEAD;return}break}}this.insertionMode=B.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=B.IN_SELECT_IN_TABLE;return}}this.insertionMode=B.IN_SELECT}_isElementCausesFosterParenting(t){return JE.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)===ce.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 lI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){TR(this,t);return}switch(this.insertionMode){case B.INITIAL:{ca(this,t);break}case B.BEFORE_HTML:{da(this,t);break}case B.BEFORE_HEAD:{fa(this,t);break}case B.IN_HEAD:{ha(this,t);break}case B.IN_HEAD_NO_SCRIPT:{pa(this,t);break}case B.AFTER_HEAD:{ma(this,t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:{ny(this,t);break}case B.TEXT:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Jf(this,t);break}case B.IN_TABLE_TEXT:{cy(this,t);break}case B.IN_COLUMN_GROUP:{hl(this,t);break}case B.AFTER_BODY:{gl(this,t);break}case B.AFTER_AFTER_BODY:{El(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){yR(this,t);return}switch(this.insertionMode){case B.INITIAL:{ca(this,t);break}case B.BEFORE_HTML:{da(this,t);break}case B.BEFORE_HEAD:{fa(this,t);break}case B.IN_HEAD:{ha(this,t);break}case B.IN_HEAD_NO_SCRIPT:{pa(this,t);break}case B.AFTER_HEAD:{ma(this,t);break}case B.TEXT:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Jf(this,t);break}case B.IN_COLUMN_GROUP:{hl(this,t);break}case B.AFTER_BODY:{gl(this,t);break}case B.AFTER_AFTER_BODY:{El(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Kf(this,t);return}switch(this.insertionMode){case B.INITIAL:case B.BEFORE_HTML:case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_TEMPLATE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{Kf(this,t);break}case B.IN_TABLE_TEXT:{ya(this,t);break}case B.AFTER_BODY:{KI(this,t);break}case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{QI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case B.INITIAL:{JI(this,t);break}case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:{this._err(t,ne.misplacedDoctype);break}case B.IN_TABLE_TEXT:{ya(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ne.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?bR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{ca(this,t);break}case B.BEFORE_HTML:{ZI(this,t);break}case B.BEFORE_HEAD:{tP(this,t);break}case B.IN_HEAD:{tr(this,t);break}case B.IN_HEAD_NO_SCRIPT:{iP(this,t);break}case B.AFTER_HEAD:{oP(this,t);break}case B.IN_BODY:{Qt(this,t);break}case B.IN_TABLE:{$s(this,t);break}case B.IN_TABLE_TEXT:{ya(this,t);break}case B.IN_CAPTION:{nR(this,t);break}case B.IN_COLUMN_GROUP:{Zf(this,t);break}case B.IN_TABLE_BODY:{pl(this,t);break}case B.IN_ROW:{ml(this,t);break}case B.IN_CELL:{sR(this,t);break}case B.IN_SELECT:{hy(this,t);break}case B.IN_SELECT_IN_TABLE:{aR(this,t);break}case B.IN_TEMPLATE:{lR(this,t);break}case B.AFTER_BODY:{dR(this,t);break}case B.IN_FRAMESET:{fR(this,t);break}case B.AFTER_FRAMESET:{pR(this,t);break}case B.AFTER_AFTER_BODY:{gR(this,t);break}case B.AFTER_AFTER_FRAMESET:{ER(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?_R(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{ca(this,t);break}case B.BEFORE_HTML:{eP(this,t);break}case B.BEFORE_HEAD:{nP(this,t);break}case B.IN_HEAD:{rP(this,t);break}case B.IN_HEAD_NO_SCRIPT:{sP(this,t);break}case B.AFTER_HEAD:{aP(this,t);break}case B.IN_BODY:{fl(this,t);break}case B.TEXT:{YP(this,t);break}case B.IN_TABLE:{ga(this,t);break}case B.IN_TABLE_TEXT:{ya(this,t);break}case B.IN_CAPTION:{rR(this,t);break}case B.IN_COLUMN_GROUP:{iR(this,t);break}case B.IN_TABLE_BODY:{eh(this,t);break}case B.IN_ROW:{fy(this,t);break}case B.IN_CELL:{oR(this,t);break}case B.IN_SELECT:{py(this,t);break}case B.IN_SELECT_IN_TABLE:{uR(this,t);break}case B.IN_TEMPLATE:{cR(this,t);break}case B.AFTER_BODY:{gy(this,t);break}case B.IN_FRAMESET:{hR(this,t);break}case B.AFTER_FRAMESET:{mR(this,t);break}case B.AFTER_AFTER_BODY:{El(this,t);break}}}onEof(t){switch(this.insertionMode){case B.INITIAL:{ca(this,t);break}case B.BEFORE_HTML:{da(this,t);break}case B.BEFORE_HEAD:{fa(this,t);break}case B.IN_HEAD:{ha(this,t);break}case B.IN_HEAD_NO_SCRIPT:{pa(this,t);break}case B.AFTER_HEAD:{ma(this,t);break}case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{uy(this,t);break}case B.TEXT:{WP(this,t);break}case B.IN_TABLE_TEXT:{ya(this,t);break}case B.IN_TEMPLATE:{my(this,t);break}case B.AFTER_BODY:case B.IN_FRAMESET:case B.AFTER_FRAMESET:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{Qf(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 B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.TEXT:case B.IN_COLUMN_GROUP:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{this._insertCharacters(t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:case B.AFTER_BODY:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{ty(this,t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Jf(this,t);break}case B.IN_TABLE_TEXT:{ly(this,t);break}}}}function VI(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):ay(e,t),n}function qI(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 YI(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=zI;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=WI(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function WI(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 GI(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===ce.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function XI(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 Xf(e,t){for(let n=0;n<jI;n++){const r=VI(e,t);if(!r)break;const s=qI(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=YI(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&GI(e,u,a),XI(e,s,r)}}function Kf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function KI(e,t){e._appendCommentNode(t,e.openElements.items[0])}function QI(e,t){e._appendCommentNode(t,e.document)}function Qf(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 JI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Un.QUIRKS:CI(t);NI(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=B.BEFORE_HTML}function ca(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Un.QUIRKS),e.insertionMode=B.BEFORE_HTML,e._processToken(t)}function ZI(e,t){t.tagID===g.HTML?(e._insertElement(t,ce.HTML),e.insertionMode=B.BEFORE_HEAD):da(e,t)}function eP(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&da(e,t)}function da(e,t){e._insertFakeRootElement(),e.insertionMode=B.BEFORE_HEAD,e._processToken(t)}function tP(e,t){switch(t.tagID){case g.HTML:{Qt(e,t);break}case g.HEAD:{e._insertElement(t,ce.HTML),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD;break}default:fa(e,t)}}function nP(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?fa(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function fa(e,t){e._insertFakeElement(K.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD,e._processToken(t)}function tr(e,t){switch(t.tagID){case g.HTML:{Qt(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,xt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,xt.RAWTEXT):(e._insertElement(t,ce.HTML),e.insertionMode=B.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,xt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,xt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=B.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(B.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:ha(e,t)}}function rP(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=B.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{ha(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Ji(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,ne.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ne.endTagWithoutMatchingOpenElement)}function ha(e,t){e.openElements.pop(),e.insertionMode=B.AFTER_HEAD,e._processToken(t)}function iP(e,t){switch(t.tagID){case g.HTML:{Qt(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{tr(e,t);break}case g.NOSCRIPT:{e._err(t,ne.nestedNoscriptInHead);break}default:pa(e,t)}}function sP(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=B.IN_HEAD;break}case g.BR:{pa(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function pa(e,t){const n=t.type===Ve.EOF?ne.openElementsLeftAfterEof:ne.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=B.IN_HEAD,e._processToken(t)}function oP(e,t){switch(t.tagID){case g.HTML:{Qt(e,t);break}case g.BODY:{e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=B.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ce.HTML),e.insertionMode=B.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,ne.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),tr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:ma(e,t)}}function aP(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{ma(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function ma(e,t){e._insertFakeElement(K.BODY,g.BODY),e.insertionMode=B.IN_BODY,dl(e,t)}function dl(e,t){switch(t.type){case Ve.CHARACTER:{ny(e,t);break}case Ve.WHITESPACE_CHARACTER:{ty(e,t);break}case Ve.COMMENT:{Kf(e,t);break}case Ve.START_TAG:{Qt(e,t);break}case Ve.END_TAG:{fl(e,t);break}case Ve.EOF:{uy(e,t);break}}}function ty(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ny(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function uP(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function lP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function cP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_FRAMESET)}function dP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML)}function fP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Yf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ce.HTML)}function hP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function pP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),n||(e.formElement=e.openElements.current))}function mP(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,ce.HTML)}function gP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.tokenizer.state=xt.PLAINTEXT}function EP(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1}function yP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(K.A);n&&(Xf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function TP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Xf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function _P(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function xP(e,t){e.treeAdapter.getDocumentMode(e.document)!==Un.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=B.IN_TABLE}function ry(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function iy(e){const t=ME(e,Qi.TYPE);return t!=null&&t.toLowerCase()===HI}function wP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),iy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function SP(e,t){e._appendElement(t,ce.HTML),t.ackSelfClosing=!0}function vP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function AP(e,t){t.tagName=K.IMG,t.tagID=g.IMG,ry(e,t)}function NP(e,t){e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.tokenizer.state=xt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=B.TEXT}function CP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,xt.RAWTEXT)}function kP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,xt.RAWTEXT)}function sy(e,t){e._switchToTextParsing(t,xt.RAWTEXT)}function OP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===B.IN_TABLE||e.insertionMode===B.IN_CAPTION||e.insertionMode===B.IN_TABLE_BODY||e.insertionMode===B.IN_ROW||e.insertionMode===B.IN_CELL?B.IN_SELECT_IN_TABLE:B.IN_SELECT}function IP(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function PP(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ce.HTML)}function RP(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ce.HTML)}function LP(e,t){e._reconstructActiveFormattingElements(),KE(t),Gf(t),t.selfClosing?e._appendElement(t,ce.MATHML):e._insertElement(t,ce.MATHML),t.ackSelfClosing=!0}function DP(e,t){e._reconstructActiveFormattingElements(),QE(t),Gf(t),t.selfClosing?e._appendElement(t,ce.SVG):e._insertElement(t,ce.SVG),t.ackSelfClosing=!0}function oy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function Qt(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:{TP(e,t);break}case g.A:{yP(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{fP(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:{dP(e,t);break}case g.LI:case g.DD:case g.DT:{mP(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{ry(e,t);break}case g.HR:{vP(e,t);break}case g.RB:case g.RTC:{PP(e,t);break}case g.RT:case g.RP:{RP(e,t);break}case g.PRE:case g.LISTING:{hP(e,t);break}case g.XMP:{CP(e,t);break}case g.SVG:{DP(e,t);break}case g.HTML:{uP(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:{tr(e,t);break}case g.BODY:{lP(e,t);break}case g.FORM:{pP(e,t);break}case g.NOBR:{bP(e,t);break}case g.MATH:{LP(e,t);break}case g.TABLE:{xP(e,t);break}case g.INPUT:{wP(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{SP(e,t);break}case g.IMAGE:{AP(e,t);break}case g.BUTTON:{EP(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{_P(e,t);break}case g.IFRAME:{kP(e,t);break}case g.SELECT:{OP(e,t);break}case g.OPTION:case g.OPTGROUP:{IP(e,t);break}case g.NOEMBED:case g.NOFRAMES:{sy(e,t);break}case g.FRAMESET:{cP(e,t);break}case g.TEXTAREA:{NP(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?sy(e,t):oy(e,t);break}case g.PLAINTEXT:{gP(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:oy(e,t)}}function MP(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function FP(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,gy(e,t))}function BP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function UP(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 HP(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(K.P,g.P),e._closePElement()}function jP(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function zP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function $P(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function VP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function qP(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(K.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function ay(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 fl(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:{Xf(e,t);break}case g.P:{HP(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:{BP(e,t);break}case g.LI:{jP(e);break}case g.DD:case g.DT:{zP(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{$P(e);break}case g.BR:{qP(e);break}case g.BODY:{MP(e,t);break}case g.HTML:{FP(e,t);break}case g.FORM:{UP(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{VP(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:ay(e,t)}}function uy(e,t){e.tmplInsertionModeStack.length>0?my(e,t):Qf(e,t)}function YP(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 WP(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Jf(e,t){if(e.openElements.currentTagId!==void 0&&JE.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=B.IN_TABLE_TEXT,t.type){case Ve.CHARACTER:{cy(e,t);break}case Ve.WHITESPACE_CHARACTER:{ly(e,t);break}}else Ea(e,t)}function GP(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_CAPTION}function XP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_COLUMN_GROUP}function KP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.COLGROUP,g.COLGROUP),e.insertionMode=B.IN_COLUMN_GROUP,Zf(e,t)}function QP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_TABLE_BODY}function JP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.TBODY,g.TBODY),e.insertionMode=B.IN_TABLE_BODY,pl(e,t)}function ZP(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function eR(e,t){iy(t)?e._appendElement(t,ce.HTML):Ea(e,t),t.ackSelfClosing=!0}function tR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ce.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function $s(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{JP(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{tr(e,t);break}case g.COL:{KP(e,t);break}case g.FORM:{tR(e,t);break}case g.TABLE:{ZP(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{QP(e,t);break}case g.INPUT:{eR(e,t);break}case g.CAPTION:{GP(e,t);break}case g.COLGROUP:{XP(e,t);break}default:Ea(e,t)}}function ga(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Ji(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ea(e,t)}}function Ea(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,dl(e,t),e.fosterParentingEnabled=n}function ly(e,t){e.pendingCharacterTokens.push(t)}function cy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ya(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ea(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const dy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function nR(e,t){const n=t.tagID;dy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,$s(e,t)):Qt(e,t)}function rR(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,n===g.TABLE&&ga(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:fl(e,t)}}function Zf(e,t){switch(t.tagID){case g.HTML:{Qt(e,t);break}case g.COL:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{tr(e,t);break}default:hl(e,t)}}function iR(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case g.TEMPLATE:{Ji(e,t);break}case g.COL:break;default:hl(e,t)}}function hl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE,e._processToken(t))}function pl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(K.TR,g.TR),e.insertionMode=B.IN_ROW,ml(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,$s(e,t));break}default:$s(e,t)}}function eh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,ga(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:ga(e,t)}}function ml(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,pl(e,t));break}default:$s(e,t)}}function fy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,eh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,eh(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:ga(e,t)}}function sR(e,t){const n=t.tagID;dy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),ml(e,t)):Qt(e,t)}function oR(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),fy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:fl(e,t)}}function hy(e,t){switch(t.tagID){case g.HTML:{Qt(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,ce.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ce.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ce.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:{tr(e,t);break}}}function py(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{Ji(e,t);break}}}function aR(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)):hy(e,t)}function uR(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)):py(e,t)}function lR(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:{tr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=B.IN_TABLE,e.insertionMode=B.IN_TABLE,$s(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=B.IN_COLUMN_GROUP,e.insertionMode=B.IN_COLUMN_GROUP,Zf(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=B.IN_TABLE_BODY,e.insertionMode=B.IN_TABLE_BODY,pl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=B.IN_ROW,e.insertionMode=B.IN_ROW,ml(e,t);break}default:e.tmplInsertionModeStack[0]=B.IN_BODY,e.insertionMode=B.IN_BODY,Qt(e,t)}}function cR(e,t){t.tagID===g.TEMPLATE&&Ji(e,t)}function my(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Qf(e,t)}function dR(e,t){t.tagID===g.HTML?Qt(e,t):gl(e,t)}function gy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=B.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else gl(e,t)}function gl(e,t){e.insertionMode=B.IN_BODY,dl(e,t)}function fR(e,t){switch(t.tagID){case g.HTML:{Qt(e,t);break}case g.FRAMESET:{e._insertElement(t,ce.HTML);break}case g.FRAME:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{tr(e,t);break}}}function hR(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=B.AFTER_FRAMESET))}function pR(e,t){switch(t.tagID){case g.HTML:{Qt(e,t);break}case g.NOFRAMES:{tr(e,t);break}}}function mR(e,t){t.tagID===g.HTML&&(e.insertionMode=B.AFTER_AFTER_FRAMESET)}function gR(e,t){t.tagID===g.HTML?Qt(e,t):El(e,t)}function El(e,t){e.insertionMode=B.IN_BODY,dl(e,t)}function ER(e,t){switch(t.tagID){case g.HTML:{Qt(e,t);break}case g.NOFRAMES:{tr(e,t);break}}}function yR(e,t){t.chars=ht,e._insertCharacters(t)}function TR(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ey(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ce.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function bR(e,t){if(DI(t))Ey(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ce.MATHML?KE(t):r===ce.SVG&&(MI(t),QE(t)),Gf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function _R(e,t){if(t.tagID===g.P||t.tagID===g.BR){Ey(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)===ce.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}K.AREA,K.BASE,K.BASEFONT,K.BGSOUND,K.BR,K.COL,K.EMBED,K.FRAME,K.HR,K.IMG,K.INPUT,K.KEYGEN,K.LINK,K.META,K.PARAM,K.SOURCE,K.TRACK,K.WBR;const xR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,wR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),yy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ty(e,t){const n=RR(e),r=IE("type",{handlers:{root:SR,element:vR,text:AR,comment:_y,doctype:NR,raw:kR},unknown:OR}),s={parser:n?new ey(yy):ey.getFragmentParser(void 0,yy),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),Vs(s,Er());const a=n?s.parser.document:s.parser.getFragment(),u=LO(a,{file:s.options.file});return s.stitches&&ol(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function by(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function SR(e,t){by(e.children,t)}function vR(e,t){IR(e,t),by(e.children,t),PR(e,t)}function AR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ve.CHARACTER,chars:e.value,location:Ta(e)};Vs(t,Er(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function NR(e,t){const n={type:Ve.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ta(e)};Vs(t,Er(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function CR(e,t){t.stitches=!0;const n=LR(e);if("children"in e&&"children"in n){const r=Ty({type:"root",children:e.children},t.options);n.children=r.children}_y({type:"comment",value:{stitch:n}},t)}function _y(e,t){const n=e.value,r={type:Ve.COMMENT,data:n,location:Ta(e)};Vs(t,Er(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function kR(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,xy(t,Er(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(xR,"<$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 OR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))CR(n,t);else{let r="";throw wR.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Vs(e,t){xy(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=xt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function xy(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 IR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===xt.PLAINTEXT)return;Vs(t,Er(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:Ki.html;s===Ki.html&&n==="svg"&&(s=Ki.svg);const a=UO(oe(U({},e),{children:[]}),{space:s===Ki.svg?"svg":"html"}),u={type:Ve.START_TAG,tagName:n,tagID:zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ta(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function PR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&WO.includes(n)||t.parser.tokenizer.state===xt.PLAINTEXT)return;Vs(t,Xu(e));const r={type:Ve.END_TAG,tagName:n,tagID:zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ta(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===xt.RCDATA||t.parser.tokenizer.state===xt.RAWTEXT||t.parser.tokenizer.state===xt.SCRIPT_DATA)&&(t.parser.tokenizer.state=xt.DATA)}function RR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ta(e){const t=Er(e)||{line:void 0,column:void 0,offset:void 0},n=Xu(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 LR(e){return"children"in e?Xi(oe(U({},e),{children:[]})):Xi(e)}function wy(e){return function(t,n){return Ty(t,oe(U({},e),{file:n}))}}const Zi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Sy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Zi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Zi],h2:[["className","sr-only"]],img:[...Zi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Zi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Zi],table:[...Zi],ul:[...Zi,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},ci={}.hasOwnProperty;function DR(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},Sy),t):Sy,stack:[]},s=vy(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function vy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return MR(e,n);case"doctype":return FR(e,n);case"element":return BR(e,n);case"root":return UR(e,n);case"text":return HR(e,n)}}}function MR(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 ba(a,t),a}}function FR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ba(n,t),n}}function BR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Ay(e,t.children),s=jR(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&ci.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:s,children:r};return ba(u,t),u}function UR(e,t){const r={type:"root",children:Ay(e,t.children)};return ba(r,t),r}function HR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ba(r,t),r}function Ay(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=vy(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function jR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&ci.call(r,n)?r[n]:void 0,u=r&&ci.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(ci.call(c,f)){const p=c[f];let m=Ny(e,ky(a,f),f,p);m==null&&(m=Ny(e,ky(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&ci.call(s,n)){const p=s[n];for(f in p)ci.call(p,f)&&!ci.call(d,f)&&(d[f]=p[f])}return d}function Ny(e,t,n,r){return t?Array.isArray(r)?zR(e,t,n,r):Cy(e,t,n,r):void 0}function zR(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Cy(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Cy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&$R(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 $R(e,t,n){const r=e.schema.protocols&&ci.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),c=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function ba(e,t){const n=b1(t);t.data&&(e.data=Xi(t.data)),n&&(e.position=n)}function ky(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 VR(e){return function(t){return DR(t,e)}}const Oy=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return _.jsx("a",oe(U(U({className:F(e,`${P}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},qR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=it();return!e&&!t?null:_.jsx("div",{className:F(n,`${P}-disclaimer`),children:t?_.jsx(xE,{rehypePlugins:[wy,VR],components:{ul:({children:r})=>_.jsx("ul",{className:F(n,`${P}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:F(n,`${P}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:F(n,`${P}-li`),children:r}),a:({href:r,title:s,children:a})=>_.jsx(Oy,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>_.jsx("img",{className:F(n,`${P}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>_.jsx("p",{className:F(n,`${P}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:F(n,`${P}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:F(n,`${P}-disclaimer-text`),children:e})})},th=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a}=sn(),{globalClassName:u,searchConfig:c,enableEscalationToAgent:d}=it(),f=H.useRef(null),p=t||!s&&!a,m=y=>{var N;y.preventDefault();const x=(((N=f.current)==null?void 0:N.value)||"").trim();x&&(f.current.value="",r(x))},T=()=>{r("Can you connect me to a human?")};return _.jsxs("div",{className:F(u,e,`cim-${n}-component`,`${P}-search-bar-wrapper`),children:[_.jsxs("form",{className:F(u,e,`cim-${n}-component`,`${P}-search-bar`),name:`${P}-search-form`,onSubmit:m,children:[_.jsx("input",{className:F(u,e,`cim-${n}-component`,`${P}-search-input`),type:"text",ref:f,placeholder:(c==null?void 0:c.placeholder)||"Ask us anything",name:`${P}-user-input`,disabled:p}),_.jsx(wN,{className:e,globalClassName:u,searchConfig:c,componentType:n,isLoading:p}),d&&_.jsx(Zn,{className:F(u,`${P}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:p,onClick:T,icon:_.jsx(fN,{})})]}),_.jsx(qR,{})]})};function YR(e){return tt({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 WR(e){return tt({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 Iy=H.createContext({isOpen:!1}),nh=H.createContext(null),Py=H.createContext(null),qs=()=>{var n,r;const e=H.useContext(nh),t=H.useContext(Py);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Ry=({onClearChat:e,componentType:t})=>{const n=qs(),r=()=>{e(),n()};return _.jsxs("button",{className:F(`${P}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(WR,{}),"Clear chat"]})},Ly=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=it(),r=qs(),[s,a]=H.useState(!1),u=()=>je(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return _.jsxs("button",{className:F(`${P}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[_.jsx(YR,{}),"Download transcript"]})};function GR(e){return e==null?[]:Array.isArray(e)?e:[e]}var XR=(e,...t)=>e.concat(t),KR=(e,...t)=>e.filter(n=>!t.includes(n)),QR=e=>Array.from(new Set(e));function Dy(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?s?c:0:a>=u?s?0:t>u?u:t:a}function JR(e,t,n={}){const{step:r=1,loop:s=!0}=n;return Dy(e,t,{step:-r,loop:s})}var ZR=e=>Array.isArray(e),My=e=>e!=null&&typeof e=="object",e6=e=>My(e)&&!ZR(e),yl=e=>typeof e=="string",Ys=e=>typeof e=="function",t6=e=>e==null,n6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r6=e=>Object.prototype.toString.call(e),Fy=Function.prototype.toString,i6=Fy.call(Object),s6=e=>{if(!My(e)||r6(e)!="[object Object]"||u6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=n6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Fy.call(n)==i6},o6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,a6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,u6=e=>o6(e)||a6(e),l6=e=>e(),c6=()=>{},rh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function d6(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:f6,max:h6}=Math,p6=e=>Number.isNaN(e),m6=e=>p6(e)?0:e,By=(e,t,n)=>f6(h6(m6(e),t),n);function ih(e){if(!s6(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]=ih(s))}return n}function sh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function g6(e,t){if(e==null)throw new Error(t())}function E6(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 y6=Object.defineProperty,T6=(e,t,n)=>t in e?y6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oh=(e,t,n)=>T6(e,typeof t!="symbol"?t+"":t,n),Uy=()=>{},Tl=e=>typeof e=="object"&&e!==null,Ws=e=>e?"":void 0,Hy=e=>e?"true":void 0,b6=1,_6=9,x6=11,Mt=e=>Tl(e)&&e.nodeType===b6&&typeof e.nodeName=="string",bl=e=>Tl(e)&&e.nodeType===_6,w6=e=>Tl(e)&&e===e.window,jy=e=>Mt(e)?e.localName||"":"#document";function S6(e){return["html","body","#document"].includes(jy(e))}var v6=e=>Tl(e)&&e.nodeType!==void 0,es=e=>v6(e)&&e.nodeType===x6&&"host"in e,A6=e=>Mt(e)&&e.localName==="input",N6=e=>Mt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function _a(e){if(!e)return!1;const t=e.getRootNode();return Ks(t)===e}var C6=/(textarea|select)/;function k6(e){if(e==null||!Mt(e))return!1;try{return A6(e)&&e.selectionStart!=null||C6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Gs(e,t){var r;if(!e||!t||!Mt(e)||!Mt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&es(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function br(e){var t;return bl(e)?e:w6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function O6(e){return br(e).documentElement}function Xs(e){var t,n,r;return es(e)?Xs(e.host):bl(e)?(t=e.defaultView)!=null?t:window:Mt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Ks(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function I6(e){if(jy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||es(e)&&e.host||O6(e);return es(t)?t.host:t}function ah(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),bl(t)||es(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var uh=new WeakMap;function Qs(e){return uh.has(e)||uh.set(e,Xs(e).getComputedStyle(e)),uh.get(e)}var lh=new Set(["menu","listbox","dialog","grid","tree","region"]),P6=e=>lh.has(e),zy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function $y(e,t){const n=new Set,r=ah(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=zy(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(m&&P6(m)&&!T&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function Vy(e,t){const n=ah(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=zy(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";m&&lh.has(m)&&!T&&(t(p),s(p))}}}};s(e)}function R6(e){const t=new Set;return Vy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function L6(e){const t=e.getAttribute("role");return!!(t&&lh.has(t))}function D6(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function M6(e){var t;return D6(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function F6(e){if(!e.id)return!1;const t=ah(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&L6(e))}var ch=()=>typeof document!="undefined";function B6(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var dh=e=>ch()&&e.test(B6()),U6=e=>ch()&&e.test(navigator.vendor),qy=()=>ch()&&!!navigator.maxTouchPoints,H6=()=>dh(/^iPhone/i),j6=()=>dh(/^iPad/i)||fh()&&navigator.maxTouchPoints>1,_l=()=>H6()||j6(),z6=()=>fh()||_l(),fh=()=>dh(/^Mac/i),$6=()=>z6()&&U6(/apple/i);function V6(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 nr(e){var n;const t=V6(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Yy=e=>e.button===0,q6=e=>e.button===2||fh()&&e.ctrlKey&&e.button===0,Y6=e=>"touches"in e&&e.touches.length>0,W6={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Wy={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function G6(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=W6[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in Wy&&(s=Wy[s]),s}function Gy(e,t="client"){const n=Y6(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Ft=(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)}},Xy=e=>Mt(e)&&e.tagName==="IFRAME",X6=/^(audio|video|details)$/;function Ky(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var K6=e=>!Number.isNaN(Ky(e)),Q6=e=>Ky(e)<0;function J6(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 Qy(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<s.length;){const d=s[c++];if(!d||a.has(d))continue;a.add(d);const f=J6(d,t);if(f){const p=Array.from(f.querySelectorAll(xl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,x)=>{u.set(y,T+x)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,T+x)})}s.push(...p)}}return r}var xl="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",Jy=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(xl));(n==!0||n=="if-empty"&&s.length===0)&&Mt(e)&&_r(e)&&s.unshift(e);const u=[];for(const c of s)if(_r(c)){if(Xy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Jy(d,{getShadowRoot:r}));continue}u.push(c)}return r?Qy(u,r,_r):u};function _r(e){return!Mt(e)||e.closest("[inert]")?!1:e.matches(xl)&&N6(e)}function Js(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(xl));n&&ts(e)&&s.unshift(e);const a=[];for(const u of s)if(ts(u)){if(Xy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Js(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Qy(a,r,ts);return!u.length&&n?s:u}return!a.length&&n?s:a}function ts(e){return Mt(e)&&e.tabIndex>0?!0:_r(e)&&!Q6(e)}function Z6(e,t={}){const n=Js(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function e4(e,t={}){const{current:n,getShadowRoot:r}=t,s=Js(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Ks(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function xa(e){return e.tabIndex<0&&(X6.test(e.localName)||k6(e))&&!K6(e)?0:e.tabIndex}function Zy(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=Js(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var t4=class t2{constructor(){oh(this,"id",null),oh(this,"fn_cleanup"),oh(this,"cleanup",()=>{this.cancel()})}static create(){return new t2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function Ot(e){const t=t4.create();return t.request(e),t.cleanup}function eT(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 hh(e){const t=I6(e);return S6(t)?br(t).body:Mt(t)&&i4(t)?t:hh(t)}var n4=/auto|scroll|overlay|hidden|clip/,r4=new Set(["inline","contents"]);function i4(e){const t=Xs(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return n4.test(n+s+r)&&!r4.has(a)}var Zs="default",ph="",wl=new WeakMap;function s4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return _l()?(Zs==="default"&&(ph=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),Zs="disabled"):t&&(wl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>o4({target:t,doc:r})}function o4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(_l()){if(Zs!=="disabled")return;Zs="restoring",setTimeout(()=>{eT(()=>{Zs==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=ph||""),ph="",Zs="default")})},300)}else if(t&&wl.has(t)){const a=wl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),wl.delete(t)}}function a4(e={}){const u=e,{defer:t,target:n}=u,r=cn(u,["defer","target"]),s=t?Ot:c=>c(),a=[];return a.push(s(()=>{const c=typeof n=="function"?n():n;a.push(s4(oe(U({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function u4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=c=>{const d=Gy(c),f=Math.sqrt(ud(d.x,2)+ud(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=Gy(c);r({point:d,event:c})},u=[Ft(e,"pointermove",s,!1),Ft(e,"pointerup",a,!1),Ft(e,"pointercancel",a,!1),Ft(e,"contextmenu",a,!1),a4({doc:e})];return()=>{u.forEach(c=>c())}}function l4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=Z6(e,{includeContainer:!0,getShadowRoot:a}),y=e4(c,{current:n,getShadowRoot:a}),x=!m&&!T;f.shiftKey&&_a(y)?(s==null||s(),p=T):f.shiftKey&&(_a(m)||x)?p=n:!f.shiftKey&&_a(n)?(s==null||s(),p=m):!f.shiftKey&&(_a(T)||x)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Ft(u,"keydown",d,!0)}function c4(e,t){const c=t,{defer:n,triggerElement:r}=c,s=cn(c,["defer","triggerElement"]),a=n?Ot:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(l4(d,U({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function d4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Sl(e,t){if(!e)return Uy;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 f4(e,t,n){if(!e)return Uy;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 h4(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),c(f))})}),()=>t.abort()]}function p4(e,t){const{timeout:n,rootNode:r}=t,s=Xs(r),a=br(r),u=new s.AbortController;return h4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var m4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),g4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,tT=e=>{const t={};let n;for(;n=g4.exec(e);)t[n[1]]=n[2];return t},E4=(e,t)=>{if(yl(e)){if(yl(t))return`${e};${t}`;e=tT(e)}else yl(t)&&(t=tT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function It(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=rh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=m4(t[s],n[s]);continue}if(s==="style"){t[s]=E4(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function x7(e){return e}var eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(eo||{}),mh="__init__";function y4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>br(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>Ks(t()),a=u=>t().getElementById(u);return oe(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:_a,getById:a})}function T4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var to=()=>e=>Array.from(new Set(e)),nT=typeof globalThis.document!="undefined"?H.useLayoutEffect:H.useEffect;function vl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=H.useState(t),[s,a]=H.useState(r),u=e().value!==void 0,c=H.useRef(s);c.current=u?e().value:s;const d=H.useRef(c.current);nT(()=>{d.current=c.current},[s,e().value]);const f=y=>{var A,v;const x=d.current,N=Ys(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:N,prev:x}),u||a(N),n(N,x)||(v=(A=e()).onChange)==null||v.call(A,N,x)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?Ds.flushSync:l6)(()=>f(y))},invoke(y,x){var N,A;(A=(N=e()).onChange)==null||A.call(N,y,x)},hash(y){var x,N,A;return(A=(N=(x=e()).hash)==null?void 0:N.call(x,y))!=null?A:String(y)}}}vl.cleanup=e=>{H.useEffect(()=>e,[])},vl.ref=e=>{const t=H.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function b4(e){const t=H.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var _4=(e,t)=>{const n=H.useRef(!1),r=H.useRef(!1);H.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),H.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Al(e,t={}){var ie,ee,we,de,ae,_e;const n=H.useMemo(()=>{const{id:ue,ids:z,getRootNode:Z}=t;return y4({id:ue,ids:z,getRootNode:Z})},[t]),r=(...ue)=>{e.debug&&console.log(...ue)},s=(ee=(ie=e.props)==null?void 0:ie.call(e,{props:ih(t),scope:n}))!=null?ee:t,a=x4(s),u=(we=e.context)==null?void 0:we.call(e,{prop:a,bindable:vl,scope:n,flush:iT,getContext(){return d},getComputed(){return G},getRefs(){return N},getEvent(){return y()}}),c=rT(u),d={get(ue){var z;return(z=c.current)==null?void 0:z[ue].ref.current},set(ue,z){var Z;(Z=c.current)==null||Z[ue].set(z)},initial(ue){var z;return(z=c.current)==null?void 0:z[ue].initial},hash(ue){var Z,w;const z=(Z=c.current)==null?void 0:Z[ue].get();return(w=c.current)==null?void 0:w[ue].hash(z)}},f=H.useRef(new Map),p=H.useRef(null),m=H.useRef(null),T=H.useRef({type:""}),y=()=>oe(U({},T.current),{current(){return T.current},previous(){return m.current}}),x=()=>oe(U({},D),{matches(...ue){return ue.includes(D.ref.current)},hasTag(ue){var z,Z;return!!((Z=(z=e.states[D.ref.current])==null?void 0:z.tags)!=null&&Z.includes(ue))}}),N=b4((ae=(de=e.refs)==null?void 0:de.call(e,{prop:a,context:d}))!=null?ae:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:V,action:v,guard:C,track:_4,refs:N,computed:G,flush:iT,scope:n,choose:$}),v=ue=>{const z=Ys(ue)?ue(A()):ue;if(!z)return;const Z=z.map(w=>{var q,O;const k=(O=(q=e.implementations)==null?void 0:q.actions)==null?void 0:O[w];return k||sh(`[zag-js] No implementation found for action "${JSON.stringify(w)}"`),k});for(const w of Z)w==null||w(A())},C=ue=>{var z,Z;return Ys(ue)?ue(A()):(Z=(z=e.implementations)==null?void 0:z.guards)==null?void 0:Z[ue](A())},R=ue=>{const z=Ys(ue)?ue(A()):ue;if(!z)return;const Z=z.map(k=>{var O,pe;const q=(pe=(O=e.implementations)==null?void 0:O.effects)==null?void 0:pe[k];return q||sh(`[zag-js] No implementation found for effect "${JSON.stringify(k)}"`),q}),w=[];for(const k of Z){const q=k==null?void 0:k(A());q&&w.push(q)}return()=>w.forEach(k=>k==null?void 0:k())},$=ue=>GR(ue).find(z=>{let Z=!z.guard;return yl(z.guard)?Z=!!C(z.guard):Ys(z.guard)&&(Z=z.guard(A())),Z}),G=ue=>{g6(e.computed,()=>"[zag-js] No computed object found on machine");const z=e.computed[ue];return z({context:d,event:y(),prop:a,refs:N,scope:n,computed:G})},D=vl(()=>({defaultValue:e.initialState({prop:a}),onChange(ue,z){var w,k,q,O;if(z){const pe=f.current.get(z);pe==null||pe(),f.current.delete(z)}z&&v((w=e.states[z])==null?void 0:w.exit),v((k=p.current)==null?void 0:k.actions);const Z=R((q=e.states[ue])==null?void 0:q.effects);if(Z&&f.current.set(ue,Z),z===mh){v(e.entry);const pe=R(e.effects);pe&&f.current.set(mh,pe)}v((O=e.states[ue])==null?void 0:O.entry)}})),J=H.useRef(void 0),se=H.useRef(eo.NotStarted);nT(()=>{queueMicrotask(()=>{var k;const Z=se.current===eo.Started;se.current=eo.Started,r(Z?"rehydrating...":"initializing...");const w=(k=J.current)!=null?k:D.initial;D.invoke(w,Z?D.get():mh)});const ue=f.current,z=D.ref.current;return()=>{r("unmounting..."),J.current=z,se.current=eo.Stopped,ue.forEach(Z=>Z==null?void 0:Z()),f.current=new Map,p.current=null,queueMicrotask(()=>{v(e.exit)})}},[]);const he=()=>"ref"in D?D.ref.current:D.get(),V=ue=>{queueMicrotask(()=>{var O,pe,Oe,ye,Re;if(se.current!==eo.Started)return;m.current=T.current,T.current=ue;let z=he();const Z=(Oe=(O=e.states[z].on)==null?void 0:O[ue.type])!=null?Oe:(pe=e.on)==null?void 0:pe[ue.type],w=$(Z);if(!w)return;p.current=w;const k=(ye=w.target)!=null?ye:z;r("transition",ue.type,w.target||z,`(${w.actions})`);const q=k!==z;q?Ds.flushSync(()=>D.set(k)):w.reenter&&!q?D.invoke(z,z):v((Re=w.actions)!=null?Re:[])})};return(_e=e.watch)==null||_e.call(e,A()),{state:x(),send:V,context:d,prop:a,scope:n,refs:N,computed:G,event:y(),getStatus:()=>se.current}}function rT(e){const t=H.useRef(e);return t.current=e,t}function x4(e){const t=rT(e);return function(r){return t.current[r]}}function iT(e){queueMicrotask(()=>{Ds.flushSync(()=>e())})}var gh=T4(e=>e);function Nl(...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 w4(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 Eh=e=>{const t=H.memo(H.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=cn(f,["asChild","children"]);if(!s)return H.createElement(e,oe(U({},u),{ref:r}),a);if(!H.isValidElement(a))return null;const c=H.Children.only(a),d=w4(c);return H.cloneElement(c,oe(U({},It(u,c.props)),{ref:r?Nl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Jt=(()=>{const e=new Map;return new Proxy(Eh,{apply(t,n,r){return Eh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Eh(r)),e.get(r)}})})();function S4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ns(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,c=H.createContext(u);c.displayName=t;function d(){var p;const f=H.useContext(c);if(!f&&n){const m=new Error(a!=null?a:S4(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[v4,yh]=ns({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[sT,wa]=ns({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),oT=H.forwardRef((e,t)=>{const n=yh(),r=wa(),s=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Jt.div,oe(U({},s),{ref:Nl(r.ref,t)}))});oT.displayName="PopoverContent";const aT=H.forwardRef((e,t)=>{const n=yh(),r=wa(),s=It(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(Jt.div,oe(U({},s),{ref:t}))});aT.displayName="PopoverPositioner";const Sa=()=>(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)]),uT=e=>Sa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function A4(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 N4={props({props:e}){return oe(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",Qs(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"});Ot(()=>{var c,d;const u=Cl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Ot(()=>{e.set("prevAnimationName",Cl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===s&&e.set("prevAnimationName",Cl(t.get("styles")))},u=d=>{const f=Cl(t.get("styles"));nr(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const c=Sl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),eT(()=>c())}}}}};function Cl(e){return(e==null?void 0:e.animationName)||"none"}to()(["onExitComplete","present","immediate"]);function C4(e,t={}){const{sync:n=!1}=t,r=k4(e);return H.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function k4(e){const t=H.useRef(e);return t.current=e,t}const Th=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=T,a=cn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=H.useRef(!1),c=oe(U({},a),{present:r,onExitComplete:C4(e.onExitComplete)}),d=Al(N4,c),f=A4(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var rs=(e,t=[])=>({parts:(...n)=>{if(O4(t))return rs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>rs(e,[...t,...n]),omit:(...n)=>rs(e,t.filter(r=>!n.includes(r))),rename:n=>rs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${no(e)}"][data-part="${no(r)}"]`,`& [data-scope="${no(e)}"][data-part="${no(r)}"]`].join(", "),attrs:{"data-scope":no(e),"data-part":no(r)}}}),{})}),no=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),O4=e=>e.length===0;const I4=["top","right","bottom","left"],di=Math.min,Fr=Math.max,kl=Math.round,Ol=Math.floor,xr=e=>({x:e,y:e}),P4={left:"right",right:"left",bottom:"top",top:"bottom"};function lT(e,t,n){return Fr(e,di(t,n))}function Br(e,t){return typeof e=="function"?e(t):e}function fi(e){return e.split("-")[0]}function ro(e){return e.split("-")[1]}function bh(e){return e==="x"?"y":"x"}function _h(e){return e==="y"?"height":"width"}function wr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function xh(e){return bh(wr(e))}function R4(e,t,n){n===void 0&&(n=!1);const r=ro(e),s=xh(e),a=_h(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Il(u)),[u,Il(u)]}function L4(e){const t=Il(e);return[wh(e),t,wh(t)]}function wh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const cT=["left","right"],dT=["right","left"],D4=["top","bottom"],M4=["bottom","top"];function F4(e,t,n){switch(e){case"top":case"bottom":return n?t?dT:cT:t?cT:dT;case"left":case"right":return t?D4:M4;default:return[]}}function B4(e,t,n,r){const s=ro(e);let a=F4(fi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(wh)))),a}function Il(e){const t=fi(e);return P4[t]+e.slice(t.length)}function U4(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 fT(e){return typeof e!="number"?U4(e):{top:e,right:e,bottom:e,left:e}}function Pl(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 hT(e,t,n){let{reference:r,floating:s}=e;const a=wr(t),u=xh(t),c=_h(u),d=fi(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,T=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const x=ro(t);return x&&(y[u]+=T*(x==="end"?1:-1)*(n&&f?-1:1)),y}function H4(e,t){return je(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=Br(t,e),x=fT(y),A=c[T?m==="floating"?"reference":"floating":m],v=Pl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),C=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,R=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),$=(yield a.isElement==null?void 0:a.isElement(R))&&(yield a.getScale==null?void 0:a.getScale(R))||{x:1,y:1},G=Pl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:R,strategy:d}):C);return{top:(v.top-G.top+x.top)/$.y,bottom:(G.bottom-v.bottom+x.bottom)/$.y,left:(v.left-G.left+x.left)/$.x,right:(G.right-v.right+x.right)/$.x}})}const j4=50,z4=(e,t,n)=>je(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,c=u.detectOverflow?u:oe(U({},u),{detectOverflow:H4}),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}=hT(f,r,d),T=r,y=0;const x={};for(let N=0;N<a.length;N++){const A=a[N];if(!A)continue;const{name:v,fn:C}=A,{x:R,y:$,data:G,reset:D}=yield C({x:p,y:m,initialPlacement:r,placement:T,strategy:s,middlewareData:x,rects:f,platform:c,elements:{reference:e,floating:t}});p=R!=null?R:p,m=$!=null?$:m,x[v]=U(U({},x[v]),G),D&&y<j4&&(y++,typeof D=="object"&&(D.placement&&(T=D.placement),D.rects&&(f=D.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:p,y:m}=hT(f,T,d)),N=-1)}return{x:p,y:m,placement:T,strategy:s,middlewareData:x}}),$4=e=>({name:"arrow",options:e,fn(n){return je(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=Br(e,n)||{};if(p==null)return{};const T=fT(m),y={x:r,y:s},x=xh(a),N=_h(x),A=yield c.getDimensions(p),v=x==="y",C=v?"top":"left",R=v?"bottom":"right",$=v?"clientHeight":"clientWidth",G=u.reference[N]+u.reference[x]-y[x]-u.floating[N],D=y[x]-u.reference[x],J=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let se=J?J[$]:0;(!se||!(yield c.isElement==null?void 0:c.isElement(J)))&&(se=d.floating[$]||u.floating[N]);const he=G/2-D/2,V=se/2-A[N]/2-1,ie=di(T[C],V),ee=di(T[R],V),we=se-A[N]-ee,de=se/2-A[N]/2+he,ae=lT(ie,de,we),_e=!f.arrow&&ro(a)!=null&&de!==ae&&u.reference[N]/2-(de<ie?ie:ee)-A[N]/2<0,ue=_e?de<ie?de-ie:de-we:0;return{[x]:y[x]+ue,data:U({[x]:ae,centerOffset:de-ae-ue},_e&&{alignmentOffset:ue}),reset:_e}})}}),V4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return je(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,ae=Br(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:A=!0}=ae,v=cn(ae,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=fi(a),R=wr(d),$=fi(d)===d,G=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||($||!A?[Il(d)]:L4(d)),J=N!=="none";!y&&J&&D.push(...B4(d,A,N,G));const se=[d,...D],he=yield f.detectOverflow(n,v),V=[];let ie=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&V.push(he[C]),T){const _e=R4(a,c,G);V.push(he[_e[0]],he[_e[1]])}if(ie=[...ie,{placement:a,overflows:V}],!V.every(_e=>_e<=0)){var ee,we;const _e=(((ee=u.flip)==null?void 0:ee.index)||0)+1,ue=se[_e];if(ue&&(!(T==="alignment"?R!==wr(ue):!1)||ie.every(w=>wr(w.placement)===R?w.overflows[0]>0:!0)))return{data:{index:_e,overflows:ie},reset:{placement:ue}};let z=(we=ie.filter(Z=>Z.overflows[0]<=0).sort((Z,w)=>Z.overflows[1]-w.overflows[1])[0])==null?void 0:we.placement;if(!z)switch(x){case"bestFit":{var de;const Z=(de=ie.filter(w=>{if(J){const k=wr(w.placement);return k===R||k==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(k=>k>0).reduce((k,q)=>k+q,0)]).sort((w,k)=>w[1]-k[1])[0])==null?void 0:de[0];Z&&(z=Z);break}case"initialPlacement":z=d;break}if(a!==z)return{reset:{placement:z}}}return{}})}}};function pT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function mT(e){return I4.some(t=>e[t]>=0)}const q4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return je(this,null,function*(){const{rects:r,platform:s}=n,c=Br(e,n),{strategy:a="referenceHidden"}=c,u=cn(c,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,oe(U({},u),{elementContext:"reference"})),f=pT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:mT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,oe(U({},u),{altBoundary:!0})),f=pT(d,r.floating);return{data:{escapedOffsets:f,escaped:mT(f)}}}default:return{}}})}}},gT=new Set(["left","top"]);function Y4(e,t){return je(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=fi(n),c=ro(n),d=wr(n)==="y",f=gT.has(u)?-1:1,p=a&&d?-1:1,m=Br(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof x=="number"&&(y=c==="end"?x*-1:x),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const W4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return je(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield Y4(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:oe(U({},f),{placement:c})}})}}},G4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return je(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,R=Br(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:$=>{let{x:G,y:D}=$;return{x:G,y:D}}}}=R,p=cn(R,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},T=yield u.detectOverflow(n,p),y=wr(a),x=bh(y);let N=m[x],A=m[y];const v=($,G)=>lT(G+T[$==="y"?"top":"left"],G,G-T[$==="y"?"bottom":"right"]);c&&(N=v(x,N)),d&&(A=v(y,A));const C=f.fn(oe(U({},n),{[x]:N,[y]:A}));return oe(U({},C),{data:{x:C.x-r,y:C.y-s,enabled:{[x]:c,[y]:d}}})})}}},X4=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=Br(e,t),T={x:s,y:a},y=wr(u),x=bh(y);let N=T[x],A=T[y];const v=Br(f,t),C=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:(n=v.mainAxis)!=null?n:0,crossAxis:(r=v.crossAxis)!=null?r:0};if(p){const G=x==="y"?"height":"width",D=c.reference[x]-c.floating[G]+C.mainAxis,J=c.reference[x]+c.reference[G]-C.mainAxis;N<D?N=D:N>J&&(N=J)}if(m){var R,$;const G=x==="y"?"width":"height",D=gT.has(fi(u)),J=c.reference[y]-c.floating[G]+(D&&((R=d.offset)==null?void 0:R[y])||0)+(D?0:C.crossAxis),se=c.reference[y]+c.reference[G]+(D?0:(($=d.offset)==null?void 0:$[y])||0)-(D?C.crossAxis:0);A<J?A=J:A>se&&(A=se)}return{[x]:N,[y]:A}}}},K4=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return je(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,V=Br(e,n),{apply:c=()=>{}}=V,d=cn(V,["apply"]),f=yield a.detectOverflow(n,d),p=fi(r),m=ro(r),T=wr(r)==="y",{width:y,height:x}=s.floating;let N,A;p==="top"||p==="bottom"?(N=p,A=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(A=p,N=m==="end"?"top":"bottom");const v=x-f.top-f.bottom,C=y-f.left-f.right,R=di(x-f[N],v),$=di(y-f[A],C),G=n.middlewareData.shift,D=!G;let J=R,se=$;G!=null&&G.enabled.x&&(se=C),G!=null&&G.enabled.y&&(J=v),D&&!m&&(T?se=y-2*Fr(f.left,f.right):J=x-2*Fr(f.top,f.bottom)),yield c(oe(U({},n),{availableWidth:se,availableHeight:J}));const he=yield a.getDimensions(u.floating);return y!==he.width||x!==he.height?{reset:{rects:!0}}:{}})}}};function Rl(){return typeof window!="undefined"}function io(e){return ET(e)?(e.nodeName||"").toLowerCase():"#document"}function On(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sr(e){var t;return(t=(ET(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ET(e){return Rl()?e instanceof Node||e instanceof On(e).Node:!1}function rr(e){return Rl()?e instanceof Element||e instanceof On(e).Element:!1}function vr(e){return Rl()?e instanceof HTMLElement||e instanceof On(e).HTMLElement:!1}function yT(e){return!Rl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof On(e).ShadowRoot}function va(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=ir(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function Q4(e){return/^(table|td|th)$/.test(io(e))}function Ll(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const J4=/transform|translate|scale|rotate|perspective|filter/,Z4=/paint|layout|strict|content/,is=e=>!!e&&e!=="none";let Sh;function vh(e){const t=rr(e)?ir(e):e;return is(t.transform)||is(t.translate)||is(t.scale)||is(t.rotate)||is(t.perspective)||!Ah()&&(is(t.backdropFilter)||is(t.filter))||J4.test(t.willChange||"")||Z4.test(t.contain||"")}function eL(e){let t=hi(e);for(;vr(t)&&!so(t);){if(vh(t))return t;if(Ll(t))return null;t=hi(t)}return null}function Ah(){return Sh==null&&(Sh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Sh}function so(e){return/^(html|body|#document)$/.test(io(e))}function ir(e){return On(e).getComputedStyle(e)}function Dl(e){return rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if(io(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yT(e)&&e.host||Sr(e);return yT(t)?t.host:t}function TT(e){const t=hi(e);return so(t)?(e.ownerDocument||e).body:vr(t)&&va(t)?t:TT(t)}function Aa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=TT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=On(s);if(a){const c=Nh(u);return t.concat(u,u.visualViewport||[],va(s)?s:[],c&&n?Aa(c):[])}else return t.concat(s,Aa(s,[],n))}function Nh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bT(e){const t=ir(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=vr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=kl(n)!==a||kl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Ch(e){return rr(e)?e:e.contextElement}function oo(e){const t=Ch(e);if(!vr(t))return xr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=bT(t);let u=(a?kl(n.width):n.width)/r,c=(a?kl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const tL=xr(0);function _T(e){const t=On(e);return!Ah()||!t.visualViewport?tL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==On(e)?!1:t}function ss(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Ch(e);let u=xr(1);t&&(r?rr(r)&&(u=oo(r)):u=oo(e));const c=nL(a,n,r)?_T(a):xr(0);let d=(s.left+c.x)/u.x,f=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const T=On(a),y=r&&rr(r)?On(r):r;let x=T,N=Nh(x);for(;N&&r&&y!==x;){const A=oo(N),v=N.getBoundingClientRect(),C=ir(N),R=v.left+(N.clientLeft+parseFloat(C.paddingLeft))*A.x,$=v.top+(N.clientTop+parseFloat(C.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,m*=A.y,d+=R,f+=$,x=On(N),N=Nh(x)}}return Pl({width:p,height:m,x:d,y:f})}function Ml(e,t){const n=Dl(e).scrollLeft;return t?t.left+n:ss(Sr(e)).left+n}function xT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ml(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function rL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Sr(r),c=t?Ll(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=xr(1);const p=xr(0),m=vr(r);if((m||!m&&!a)&&((io(r)!=="body"||va(u))&&(d=Dl(r)),vr(r))){const y=ss(r);f=oo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?xT(u,d):xr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function iL(e){return Array.from(e.getClientRects())}function sL(e){const t=Sr(e),n=Dl(e),r=e.ownerDocument.body,s=Fr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Fr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Ml(e);const c=-n.scrollTop;return ir(r).direction==="rtl"&&(u+=Fr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const wT=25;function oL(e,t){const n=On(e),r=Sr(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(s){a=s.width,u=s.height;const p=Ah();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=Ml(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-y);x<=wT&&(a-=x)}else f<=wT&&(a+=f);return{width:a,height:u,x:c,y:d}}const aL=new Set(["absolute","fixed"]);function uL(e,t){const n=ss(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=vr(e)?oo(e):xr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function ST(e,t,n){let r;if(t==="viewport")r=oL(e,n);else if(t==="document")r=sL(Sr(e));else if(rr(t))r=uL(t,n);else{const s=_T(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Pl(r)}function vT(e,t){const n=hi(e);return n===t||!rr(n)||so(n)?!1:ir(n).position==="fixed"||vT(n,t)}function lL(e,t){const n=t.get(e);if(n)return n;let r=Aa(e,[],!1).filter(c=>rr(c)&&io(c)!=="body"),s=null;const a=ir(e).position==="fixed";let u=a?hi(e):e;for(;rr(u)&&!so(u);){const c=ir(u),d=vh(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&aL.has(s.position)||va(u)&&!d&&vT(e,u))?r=r.filter(p=>p!==u):s=c,u=hi(u)}return t.set(e,r),r}function cL(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Ll(t)?[]:lL(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=ST(t,p,s);return f.top=Fr(m.top,f.top),f.right=di(m.right,f.right),f.bottom=di(m.bottom,f.bottom),f.left=Fr(m.left,f.left),f},ST(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function dL(e){const{width:t,height:n}=bT(e);return{width:t,height:n}}function fL(e,t,n){const r=vr(t),s=Sr(t),a=n==="fixed",u=ss(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=xr(0);function f(){d.x=Ml(s)}if(r||!r&&!a)if((io(t)!=="body"||va(s))&&(c=Dl(t)),r){const y=ss(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?xT(s,c):xr(0),m=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function kh(e){return ir(e).position==="static"}function AT(e,t){if(!vr(e)||ir(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Sr(e)===n&&(n=n.ownerDocument.body),n}function NT(e,t){const n=On(e);if(Ll(e))return n;if(!vr(e)){let s=hi(e);for(;s&&!so(s);){if(rr(s)&&!kh(s))return s;s=hi(s)}return n}let r=AT(e,t);for(;r&&Q4(r)&&kh(r);)r=AT(r,t);return r&&so(r)&&kh(r)&&!vh(r)?n:r||eL(e)||n}const hL=function(e){return je(this,null,function*(){const t=this.getOffsetParent||NT,n=this.getDimensions,r=yield n(e.floating);return{reference:fL(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function pL(e){return ir(e).direction==="rtl"}const mL={convertOffsetParentRelativeRectToViewportRelativeRect:rL,getDocumentElement:Sr,getClippingRect:cL,getOffsetParent:NT,getElementRects:hL,getClientRects:iL,getDimensions:dL,getScale:oo,isElement:rr,isRTL:pL};function CT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gL(e,t){let n=null,r;const s=Sr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(c||t(),!T||!y)return;const x=Ol(m),N=Ol(s.clientWidth-(p+T)),A=Ol(s.clientHeight-(m+y)),v=Ol(p),R={rootMargin:-x+"px "+-N+"px "+-A+"px "+-v+"px",threshold:Fr(0,di(1,d))||1};let $=!0;function G(D){const J=D[0].intersectionRatio;if(J!==d){if(!$)return u();J?u(!1,J):r=setTimeout(()=>{u(!1,1e-7)},1e3)}J===1&&!CT(f,e.getBoundingClientRect())&&u(),$=!1}try{n=new IntersectionObserver(G,oe(U({},R),{root:s.ownerDocument}))}catch(D){n=new IntersectionObserver(G,R)}n.observe(e)}return u(!0),a}function EL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Ch(e),p=s||a?[...f?Aa(f):[],...Aa(t)]:[];p.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const m=f&&c?gL(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(v=>{let[C]=v;C&&C.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var R;(R=y)==null||R.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let x,N=d?ss(e):null;d&&A();function A(){const v=ss(e);N&&!CT(N,v)&&n(),N=v,x=requestAnimationFrame(A)}return n(),()=>{var v;p.forEach(C=>{s&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),m==null||m(),(v=y)==null||v.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const yL=W4,TL=G4,bL=V4,_L=K4,xL=q4,wL=$4,SL=X4,vL=(e,t,n)=>{const r=new Map,s=U({platform:mL},n),a=oe(U({},s.platform),{_c:r});return z4(e,t,oe(U({},s),{platform:a}))};function kT(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 oe(U({},s),{toJSON:()=>s})}function AL(e){if(!e)return kT();const{x:t,y:n,width:r,height:s}=e;return kT(t,n,r,s)}function NL(e,t){return{contextElement:Mt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?AL(r):n.getBoundingClientRect()}}}var Na=e=>({variable:e,reference:`var(${e})`}),Ur={arrowSize:Na("--arrow-size"),arrowSizeHalf:Na("--arrow-size-half"),arrowBg:Na("--arrow-background"),transformOrigin:Na("--transform-origin"),arrowOffset:Na("--arrow-offset")},CL=e=>e==="top"||e==="bottom"?"y":"x";function kL(e,t){return{name:"transformOrigin",fn(n){var he,V,ie,ee,we;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=CL(d),p=((he=s.arrow)==null?void 0:he.x)||0,m=((V=s.arrow)==null?void 0:V.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+T/2,N=m+y/2,A=Math.abs(((ie=s.shift)==null?void 0:ie.y)||0),v=u.reference.height/2,C=y/2,R=(we=(ee=e.offset)==null?void 0:ee.mainAxis)!=null?we:e.gutter,$=typeof R=="number"?R+C:R!=null?R:C,G=A>$,D={top:`${x}px calc(100% + ${$}px)`,bottom:`${x}px ${-$}px`,left:`calc(100% + ${$}px) ${N}px`,right:`${-$}px ${N}px`}[d],J=`${x}px ${u.reference.y+v-c}px`,se=!!e.overlap&&f==="y"&&G;return r.floating.style.setProperty(Ur.transformOrigin.variable,se?J:D),{data:{transformOrigin:se?J:D}}}}}var OL={name:"rects",fn({rects:e}){return{data:e}}},IL=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% + ${Ur.arrowOffset.reference})`}),{}}}};function PL(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var RL={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function OT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Oh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function LL(e,t,n){const r=e||t.createElement("div");return wL({element:r,padding:n.arrowPadding})}function DL(e,t){var n;if(!t6((n=t.offset)!=null?n:t.gutter))return yL(({placement:r})=>{var p,m,T,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:c}=PL(r),d=c?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return ih({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function ML(e){if(!e.flip)return;const t=Oh(e.boundary);return bL(oe(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function FL(e){if(!e.slide&&!e.overlap)return;const t=Oh(e.boundary);return TL(oe(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:SL()}))}function BL(e){return _L({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function UL(e){var t;if(e.hideWhenDetached)return xL({strategy:"referenceHidden",boundary:(t=Oh(e.boundary))!=null?t:"clippingAncestors"})}function HL(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function jL(e,t,n={}){const r=NL(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},RL,n),a=t.querySelector("[data-part=arrow]"),u=[DL(a,s),ML(s),FL(s),LL(a,t.ownerDocument,s),IL(a),kL({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),BL(s),UL(s),OL],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>je(null,null,function*(){var $;if(!r||!t)return;const N=yield vL(r,t,{placement:c,middleware:u,strategy:d});f==null||f(N),p==null||p({placed:!0});const A=Xs(t),v=OT(A,N.x),C=OT(A,N.y);t.style.setProperty("--x",`${v}px`),t.style.setProperty("--y",`${C}px`),s.hideWhenDetached&&((($=N.middlewareData.hide)==null?void 0:$.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const R=t.firstElementChild;if(R){const G=Qs(R);t.style.setProperty("--z-index",G.zIndex)}}),T=()=>je(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=HL(s.listeners),x=s.listeners?EL(r,t,T,y):c6;return T(),()=>{x==null||x(),p==null||p({placed:!1})}}function IT(e,t,n={}){const c=n,{defer:r}=c,s=cn(c,["defer"]),a=r?Ot:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(jL(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var zL={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function $L(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:Ur.arrowSize.reference,height:Ur.arrowSize.reference,[Ur.arrowSizeHalf.variable]:`calc(${Ur.arrowSize.reference} / 2)`,[Ur.arrowOffset.variable]:`calc(${Ur.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?zL[t.split("-")[0]]:void 0,background:Ur.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var ao=new WeakMap,Fl=new WeakMap,Bl={},Ih=0,PT=e=>e&&(e.host||PT(e.parentNode)),VL=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=PT(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),qL=new Set(["script","output","status","next-route-announcer"]),YL=e=>qL.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),WL=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=VL(n,Array.isArray(e)?e:[e]);Bl[r]||(Bl[r]=new WeakMap);const c=Bl[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Mt(y)&&Vy(y,x=>{m(x)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(f.has(x))T(x);else try{if(YL(x))return;const A=x.getAttribute(s)==="true",v=(ao.get(x)||0)+1,C=(c.get(x)||0)+1;ao.set(x,v),c.set(x,C),d.push(x),v===1&&A&&Fl.set(x,!0),C===1&&x.setAttribute(r,""),A||x.setAttribute(s,"true")}catch(N){console.error("[zag-js > ariaHidden] cannot operate on ",x,N)}})};return T(n),f.clear(),Ih++,()=>{d.forEach(y=>{const x=ao.get(y)-1,N=c.get(y)-1;ao.set(y,x),c.set(y,N),x||(Fl.has(y)||y.removeAttribute(s),Fl.delete(y)),N||y.removeAttribute(r)}),Ih--,Ih||(ao=new WeakMap,ao=new WeakMap,Fl=new WeakMap,Bl={})}},GL=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,XL=(e,t=GL(e),n="data-aria-hidden",r=!0)=>{if(t)return WL(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},KL=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function RT(e,t={}){const{defer:n=!0}=t,r=n?KL:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(XL(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function QL(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 JL(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 LT="pointerdown.outside",DT="focus.outside";function ZL(e){for(const t of e)if(Mt(t)&&_r(t))return!0;return!1}var MT=e=>"clientY"in e;function e5(e,t){if(!MT(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 t5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function FT(e,t){if(!t||!MT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},c={x:e.clientX,y:e.clientY};return t5(u,c)?r||a:!1}function n5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=br(e),f=Xs(e),p=QL(f),m=JL(f);function T(R,$){if(!Mt($)||!$.isConnected||Gs(e,$)||e5(e,R)||c&&$y(e,$))return!1;const G=d.querySelector(`[aria-controls="${e.id}"]`);if(G){const J=hh(G);if(FT(R,J))return!1}const D=hh(e);return FT(R,D)?!1:!(n!=null&&n($))}const y=new Set,x=es(e==null?void 0:e.getRootNode());function N(R){function $(G){var he,V;const D=u&&!qy()?Ot:ie=>ie(),J=G!=null?G:R,se=(V=(he=J==null?void 0:J.composedPath)==null?void 0:he.call(J))!=null?V:[J==null?void 0:J.target];D(()=>{const ie=x?se[0]:nr(R);if(!(!e||!T(R,ie))){if(s||a){const ee=rh(s,a);e.addEventListener(LT,ee,{once:!0})}BT(e,LT,{bubbles:!1,cancelable:!0,detail:{originalEvent:J,contextmenu:q6(J),focusable:ZL(se),target:ie}})}})}R.pointerType==="touch"?(y.forEach(G=>G()),y.add(Ft(d,"click",$,{once:!0})),y.add(m.addEventListener("click",$,{once:!0})),y.add(p.addEventListener("click",$,{once:!0}))):$()}const A=new Set,v=setTimeout(()=>{A.add(Ft(d,"pointerdown",N,!0)),A.add(m.addEventListener("pointerdown",N,!0)),A.add(p.addEventListener("pointerdown",N,!0))},0);function C(R){(u?Ot:G=>G())(()=>{var J,se;const G=(se=(J=R==null?void 0:R.composedPath)==null?void 0:J.call(R))!=null?se:[R==null?void 0:R.target],D=x?G[0]:nr(R);if(!(!e||!T(R,D))){if(r||a){const he=rh(r,a);e.addEventListener(DT,he,{once:!0})}BT(e,DT,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:_r(D),target:D}})}})}return qy()||(A.add(Ft(d,"focusin",C,!0)),A.add(m.addEventListener("focusin",C,!0)),A.add(p.addEventListener("focusin",C,!0))),()=>{clearTimeout(v),y.forEach(R=>R()),A.forEach(R=>R())}}function r5(e,t){const{defer:n}=t,r=n?Ot:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(n5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function BT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function i5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Ft(br(e),"keydown",n,{capture:!0})}var UT="layer:request-dismiss",Hn={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Gs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Gs(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>Hn.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];o5(e,UT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),s5(e,UT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function s5(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 o5(e,t,n){e.addEventListener(t,n,{once:!0})}var HT;function jT(){Hn.layers.forEach(({node:e})=>{e.style.pointerEvents=Hn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function a5(e){e.style.pointerEvents=""}function u5(e,t){const n=br(e),r=[];return Hn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(HT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=p4(()=>{const c=s();return Mt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Sl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Hn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=HT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function l5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){sh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};Hn.add(f),jT();function p(N){var v,C;const A=nr(N.detail.originalEvent);Hn.isBelowPointerBlockingLayer(e)||Hn.isInBranch(A)||((v=t.onPointerDownOutside)==null||v.call(t,N),(C=t.onInteractOutside)==null||C.call(t,N),!N.defaultPrevented&&(c&&console.log("onPointerDownOutside:",N.detail.originalEvent),r==null||r()))}function m(N){var v,C;const A=nr(N.detail.originalEvent);Hn.isInBranch(A)||((v=t.onFocusOutside)==null||v.call(t,N),(C=t.onInteractOutside)==null||C.call(t,N),!N.defaultPrevented&&(c&&console.log("onFocusOutside:",N.detail.originalEvent),r==null||r()))}function T(N){var A;Hn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,N),!N.defaultPrevented&&r&&(N.preventDefault(),r()))}function y(N){var R;if(!e)return!1;const A=typeof u=="function"?u():u,v=Array.isArray(A)?A:[A],C=(R=t.persistentElements)==null?void 0:R.map($=>$()).filter(Mt);return C&&v.push(...C),v.some($=>Gs($,N))||Hn.isInNestedLayer(e,N)}const x=[a?u5(e,t.persistentElements):void 0,i5(e,T),r5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{Hn.remove(e),jT(),a5(e),x.forEach(N=>N==null?void 0:N())}}function zT(e,t){const{defer:n}=t,r=n?Ot:a=>a(),s=[];return s.push(r(()=>{const a=Ys(e)?e():e;s.push(l5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var c5=Object.defineProperty,d5=(e,t,n)=>t in e?c5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pt=(e,t,n)=>d5(e,typeof t!="symbol"?t+"":t,n),$T={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()}},f5=[],h5=class{constructor(e,t){pt(this,"trapStack"),pt(this,"config"),pt(this,"doc"),pt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),pt(this,"portalContainers",new Set),pt(this,"listenerCleanups",[]),pt(this,"handleFocus",r=>{const s=nr(r),a=this.findContainerIndex(s,r)>=0;if(a||bl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(xa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>xa(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),pt(this,"handlePointerDown",r=>{const s=nr(r);if(!(this.findContainerIndex(s,r)>=0)){if(ka(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ka(this.config.allowOutsideClick,r)||r.preventDefault()}}),pt(this,"handleClick",r=>{const s=nr(r);this.findContainerIndex(s,r)>=0||ka(this.config.clickOutsideDeactivates,r)||ka(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),pt(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;Ca(r)&&r.preventDefault(),this.tryFocus(a)}}),pt(this,"handleEscapeKey",r=>{p5(r)&&ka(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),pt(this,"_mutationObserver"),pt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return M6(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?F6(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),pt(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)}))}),pt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!_r(r)){const s=Ks(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),pt(this,"tryFocus",r=>{if(r!==!1&&r!==Ks(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,m5(r)&&r.select()}}),pt(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(),$T.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),c=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{VT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),pt(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}),pt(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}),pt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),pt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),pt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),pt(this,"getNodeForOption",(r,{hasFallback:s=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),pt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||nr(s);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||_r(u)&&!ts(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];c=xa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Ca(s)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||_r(u)&&!ts(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];c=xa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Ca(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||f5;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Ca(r)&&!r.shiftKey},isKeyBackward(r){return Ca(r)&&r.shiftKey}},t);this.doc=n.document||br(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=>{R6(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?$y(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Js(e,{getShadowRoot:this.config.getShadowRoot}),n=Jy(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let c=!1;for(let f=0;f<t.length;f++)if(xa(t[f])>0){c=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(ts(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(ts(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:s,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return $T.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?VT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ft(this.doc,"focusin",this.handleFocus,!0),Ft(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ft(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ft(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ft(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ft(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=Ks(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Ca=e=>e.key==="Tab",ka=(e,...t)=>typeof e=="function"?e(...t):e,p5=e=>!e.isComposing&&e.key==="Escape",VT=e=>setTimeout(e,0),m5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function qT(e,t={}){let n;const r=Ot(()=>{const s=typeof e=="function"?e():e;if(s){n=new h5(s,oe(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:br(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Ph="data-scroll-lock";function g5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function YT(e){const t=Qs(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function WT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Ph))return;const u=YT(r)||YT(s),c=n.innerWidth-r.clientWidth;s.setAttribute(Ph,"");const d=()=>f4(r,"--scrollbar-width",`${c}px`),f=g5(r),p=()=>{const x={overflow:"hidden"};return!u&&c>0&&(x[f]=`${c}px`),Sl(s,x)},m=()=>{var G,D;const{scrollX:x,scrollY:N,visualViewport:A}=n,v=(G=A==null?void 0:A.offsetLeft)!=null?G:0,C=(D=A==null?void 0:A.offsetTop)!=null?D:0,R={position:"fixed",overflow:"hidden",top:`${-(N-Math.floor(C))}px`,left:`${-(x-Math.floor(v))}px`,right:"0"};!u&&c>0&&(R[f]=`${c}px`);const $=Sl(s,R);return()=>{$==null||$(),n.scrollTo({left:x,top:N,behavior:"instant"})}},T=[d(),_l()?m():p()];return()=>{T.forEach(x=>x==null?void 0:x()),s.removeAttribute(Ph)}}var E5=rs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Ar=E5.build(),GT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},XT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Rh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},KT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},y5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Lh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Dh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},T5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},QT=e=>e.getById(GT(e)),uo=e=>e.getById(XT(e)),lo=e=>e.getById(Rh(e)),JT=e=>e.getById(KT(e)),b5=e=>e.getById(Lh(e)),_5=e=>e.getById(Dh(e));function x5(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=$L(oe(U({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(oe(U({id:y5(c)},Ar.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(oe(U({},Ar.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(oe(U({},Ar.anchor.attrs),{dir:u("dir"),id:GT(c)}))},getTriggerProps(){return t.button(oe(U({},Ar.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:XT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Rh(c),onPointerDown(y){Yy(y)&&$6()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(oe(U({},Ar.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(oe(U({id:KT(c)},Ar.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(oe(U({},Ar.content.attrs),{dir:u("dir"),id:Rh(c),tabIndex:-1,role:"dialog","aria-modal":Hy(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Ws(d),"aria-labelledby":m.title?Lh(c):void 0,"aria-describedby":m.description?Dh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(oe(U({},Ar.title.attrs),{id:Lh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(oe(U({},Ar.description.attrs),{id:Dh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(oe(U({},Ar.closeTrigger.attrs),{dir:u("dir"),id:T5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var w5={props({props:e}){return oe(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=QT(n))!=null?a:uo(n);return IT(r,()=>JT(n),oe(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>lo(n);let s=!0;return zT(r,{type:"popover",pointerBlocking:t("modal"),exclude:uo(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(s=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:c4(()=>lo(t),{triggerElement:uo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?RT(()=>[lo(t),uo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return WT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?qT(()=>lo(t),{initialFocus:()=>Zy({root:lo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=QT(n))!=null?u:uo(n);IT(s,()=>JT(n),oe(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Ot(()=>{Object.assign(e.get("renderedElements"),{title:!!b5(t),description:!!_5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Ot(()=>{const n=Zy({root:lo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Ot(()=>{const a=uo(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};to()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[S7,Ul]=ns({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[v7,Mh]=ns({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),S5=e=>{const t=H.useId(),{getRootNode:n}=Ul(),{dir:r}=Mh(),s=U({id:t,dir:r,getRootNode:n},e),a=Al(w5,s);return x5(a,gh)},v5=e=>{const[t,u]=uT(e),c=u,{children:n}=c,r=cn(c,["children"]),s=S5(r),a=Th(It({present:s.open},t));return _.jsx(v4,{value:s,children:_.jsx(sT,{value:a,children:n})})},ZT=H.forwardRef((e,t)=>{const n=yh(),r=wa(),s=It(oe(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(Jt.button,oe(U({},s),{ref:t}))});ZT.displayName="PopoverTrigger";function A5(e){return tt({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 N5(e){return tt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function eb(e){return tt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function tb(e){return tt({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 C5(e){return tt({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 k5(e){return tt({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 Fh(e){return tt({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 nb(e){return tt({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 O5=({className:e,componentType:t,children:n})=>{const[r,s]=H.useState(!1),{globalClassName:a}=it(),u=f=>{s(f.open)},c=H.useCallback(()=>{s(!1)},[]),d=H.useMemo(()=>({closeMenu:c}),[c]);return _.jsxs(v5,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(ZT,{"aria-label":`Overflow menu for ${t}`,className:F(`${P}-overflow-menu-button-trigger`,`${P}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(nb,{})}),_.jsx(aT,{children:_.jsx(oT,{className:F(`${P}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(Py.Provider,{value:d,children:n})})})]})};function rb(e){return tt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function ib(e){return tt({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[I5,os]=ns({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Bh=H.forwardRef((e,t)=>{const n=os(),r=It(n.getControlProps(),e);return _.jsx(Jt.div,oe(U(U({},r),e),{ref:t}))});Bh.displayName="CarouselControl";const Uh=H.forwardRef((e,t)=>{const[n,r]=Sa()(e,["readOnly","index"]),s=os(),a=It(s.getIndicatorProps(n),r);return _.jsx(Jt.button,oe(U({},a),{ref:t}))});Uh.displayName="CarouselIndicator";const Hh=H.forwardRef((e,t)=>{const n=os(),r=It(n.getIndicatorGroupProps(),e);return _.jsx(Jt.div,oe(U({},r),{ref:t}))});Hh.displayName="CarouselIndicatorGroup";const jh=H.forwardRef((e,t)=>{const[n,r]=Sa()(e,["index","snapAlign"]),s=os(),a=It(s.getItemProps(n),r);return _.jsx(Jt.div,oe(U({},a),{ref:t}))});jh.displayName="CarouselItem";const zh=H.forwardRef((e,t)=>{const n=os(),r=It(n.getItemGroupProps(),e);return _.jsx(Jt.div,oe(U({},r),{ref:t}))});zh.displayName="CarouselItemGroup";const $h=H.forwardRef((e,t)=>{const n=os(),r=It(n.getNextTriggerProps(),e);return _.jsx(Jt.button,oe(U({},r),{ref:t}))});$h.displayName="CarouselNextTrigger";const Vh=H.forwardRef((e,t)=>{const n=os(),r=It(n.getPrevTriggerProps(),e);return _.jsx(Jt.button,oe(U({},r),{ref:t}))});Vh.displayName="CarouselPrevTrigger";function P5(e){const t=Qs(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let x=parseFloat(T);return/%/.test(T)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=c(r,n.width),f=c(s,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function R5(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function sb(e){let t=[];for(const n of e.children)t=t.concat(n,sb(n));return t}function ob(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?sb(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!R5(n,m,u))continue;const T=Qs(p);let[y,x]=T.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const N=a==="x"?x:y,A=m[c]-n[c]+e[f];switch(N){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+m[d]/2});break;case"end":r[a].end.push({node:p,position:A+m[d]});break}}}return r}function ab(e){const t=e.getBoundingClientRect(),n=P5(e),r=ob(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:ub([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(lb(0,s.x))),y:ub([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(lb(0,s.y)))}}function L5(e,t,n){const r=ob(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var ub=e=>[...new Set(e)],lb=(e,t)=>n=>Math.max(e,Math.min(t,n)),D5=rs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Hr=D5.build(),M5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},F5=(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}`},Hl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},B5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},U5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},H5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},cb=(e,t)=>{var n,r,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}`},En=e=>e.getById(Hl(e)),db=e=>d4(En(e),"[data-part=item]"),j5=(e,t)=>e.getById(cb(e,t)),fb=e=>{const t=En(e);if(!t)return;const n=Js(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function z5(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),T=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),N=c("slidesPerPage"),A=c("padding"),v=c("translations");return{isPlaying:d,isDragging:f,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return x/y.length},scrollToIndex(C,R){a({type:"INDEX.SET",index:C,instant:R})},scrollTo(C,R){a({type:"PAGE.SET",index:C,instant:R})},scrollNext(C){a({type:"PAGE.NEXT",instant:C})},scrollPrev(C){a({type:"PAGE.PREV",instant:C})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(C){return Array.from(r.get("slidesInView")).includes(C)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(oe(U({},Hr.root.attrs),{id:M5(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":N,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(oe(U({},Hr.itemGroup.attrs),{id:Hl(u),"data-orientation":c("orientation"),"data-dragging":Ws(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(C){Gs(C.currentTarget,nr(C))&&a({type:"VIEWPORT.FOCUS"})},onBlur(C){Gs(C.currentTarget,C.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(C){if(C.defaultPrevented||!c("allowMouseDrag")||!Yy(C))return;const R=nr(C);_r(R)&&R!==C.currentTarget||(C.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:d6(C=>{const R=c("orientation")==="horizontal"?"deltaX":"deltaY";C[R]<0&&!s("canScrollPrev")||C[R]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:A,[T?"paddingInline":"paddingBlock"]:A,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(C){const R=r.get("slidesInView").includes(C.index);return t.element(oe(U({},Hr.item.attrs),{id:F5(u,C.index),dir:c("dir"),role:"group","data-index":C.index,"data-inview":Ws(R),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":v.item(C.index,c("slideCount")),"aria-hidden":Hy(!R),style:{scrollSnapAlign:(()=>{var se;const $=(se=C.snapAlign)!=null?se:"start",G=c("slidesPerMove"),D=G==="auto"?Math.floor(c("slidesPerPage")):G;return(C.index+D)%D===0?$:void 0})()}}))},getControlProps(){return t.element(oe(U({},Hr.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(oe(U({},Hr.prevTrigger.attrs),{id:U5(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":v.prevTrigger,"data-orientation":c("orientation"),"aria-controls":Hl(u),onClick(C){C.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(oe(U({},Hr.nextTrigger.attrs),{dir:c("dir"),id:B5(u),type:"button","aria-label":v.nextTrigger,"data-orientation":c("orientation"),"aria-controls":Hl(u),disabled:!p,onClick(C){C.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(oe(U({},Hr.indicatorGroup.attrs),{dir:c("dir"),id:H5(u),"data-orientation":c("orientation"),onKeyDown(C){if(C.defaultPrevented)return;const R="indicator",$={ArrowDown(J){T||(a({type:"PAGE.NEXT",src:R}),J.preventDefault())},ArrowUp(J){T||(a({type:"PAGE.PREV",src:R}),J.preventDefault())},ArrowRight(J){T&&(a({type:"PAGE.NEXT",src:R}),J.preventDefault())},ArrowLeft(J){T&&(a({type:"PAGE.PREV",src:R}),J.preventDefault())},Home(J){a({type:"PAGE.SET",index:0,src:R}),J.preventDefault()},End(J){a({type:"PAGE.SET",index:y.length-1,src:R}),J.preventDefault()}},G=G6(C,{dir:c("dir"),orientation:c("orientation")}),D=$[G];D==null||D(C)}}))},getIndicatorProps(C){return t.button(oe(U({},Hr.indicator.attrs),{dir:c("dir"),id:cb(u,C.index),type:"button","data-orientation":c("orientation"),"data-index":C.index,"data-readonly":Ws(C.readOnly),"data-current":Ws(C.index===x),"aria-label":v.indicator(C.index),onClick(R){R.defaultPrevented||C.readOnly||a({type:"PAGE.SET",index:C.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(oe(U({},Hr.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":Ws(d),"aria-label":d?v.autoplayStop:v.autoplayStart,onClick(C){C.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var $5={props({props:e}){return E6(e,["slideCount"],"carousel"),oe(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:V5(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 e6(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(En(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=En(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),fb(e)});return fb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!En(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Ot(()=>{s(),Ot(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return db(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=En(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?XR(d,m):KR(d,m)},n.get("slidesInView"));n.set("slidesInView",QR(c))},{root:r,threshold:t("inViewThreshold")});return db(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=En(n);return r?Ft(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Ft(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return u4(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Ft(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=By((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=En(n);if(!c)return;const d=r("isHorizontal")?"left":"top";s(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=En(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=Dy(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=JR(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=En(r);if(!s)return;const a=L5(s,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=By(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=En(n);if(!r)return;const s=ab(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=En(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=En(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=En(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=ab(r),c=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);Ot(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=j5(n,e.get("page"));r&&Ot(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function V5(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}to()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),to()(["index","readOnly"]),to()(["index","snapAlign"]);const q5=e=>{const t=H.useId(),{getRootNode:n}=Ul(),{dir:r}=Mh(),s=U({id:t,dir:r,getRootNode:n},e),a=Al($5,s);return z5(a,gh)},qh=H.forwardRef((e,t)=>{const[n,r]=Sa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=q5(n),a=It(s.getRootProps(),r);return _.jsx(I5,{value:s,children:_.jsx(Jt.div,oe(U({},a),{ref:t}))})});qh.displayName="CarouselRoot";const Y5=180,W5=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},G5=({globalClassName:e,className:t,itemMinWidth:n=Y5,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((se,he)=>({node:se,key:H.isValidElement(se)&&se.key!=null?se.key:`carousel-item-${he}`})),T=m.length,y=H.useRef(null),[x,N]=H.useState(0),{width:A}=jA();H.useLayoutEffect(()=>{y.current&&N(y.current.getBoundingClientRect().width)},[A,T]);const v=W5(r),C=n+v,R=x>0?(x+v)/C:1,$=Math.max(1,Math.floor(R));if(T===0)return null;const G=T>$,D=Math.ceil(T/$),J=G?Math.max(1,R):$;return _.jsxs(qh,{ref:y,className:F(e,t,`${P}-carousel`),slidesPerPage:J,slidesPerMove:$,spacing:r,loop:s,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[_.jsx(zh,{className:F(e,`${P}-carousel__item-group`,{"carousel-row-container":!G}),children:m.map(({node:se,key:he},V)=>_.jsx(jh,{index:V,className:F(e,`${P}-carousel__item`),children:se},he))}),c&&G&&_.jsxs(Bh,{className:F(e,`${P}-carousel__control`),children:[_.jsx(Vh,{className:F(e,`${P}-carousel__prev-trigger`),"aria-label":"Previous slide",children:_.jsx(eb,{size:"16px"})}),_.jsx($h,{className:F(e,`${P}-carousel__next-trigger`),"aria-label":"Next slide",children:_.jsx(tb,{size:"16px"})})]}),u&&G&&_.jsx(Hh,{className:F(e,`${P}-carousel__indicator-group`),children:Array.from({length:D},(se,he)=>_.jsx(Uh,{index:he,className:F(e,`${P}-carousel__indicator`),"aria-label":`Go to slide group ${he+1}`},he))})]})},X5=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:F(e,`${P}-close-button`),disabled:r,onClick:n,children:_.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),[K5,Q5]=ns({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),J5=e=>Sa()(e,["lazyMount","unmountOnExit"]),[Z5,Oa]=ns({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),hb=H.forwardRef((e,t)=>{const n=Oa(),r=Q5(),s=Th(oe(U({},r),{present:n.open})),a=It(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:_.jsx(Jt.div,oe(U({},a),{ref:Nl(s.ref,t)}))});hb.displayName="DialogBackdrop";const Yh=H.forwardRef((e,t)=>{const n=Oa(),r=wa(),s=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Jt.div,oe(U({},s),{ref:Nl(r.ref,t)}))});Yh.displayName="DialogContent";const Wh=H.forwardRef((e,t)=>{const n=Oa(),r=It(n.getDescriptionProps(),e);return _.jsx(Jt.div,oe(U({},r),{ref:t}))});Wh.displayName="DialogDescription";const Gh=H.forwardRef((e,t)=>{const n=Oa(),r=It(n.getPositionerProps(),e);return wa().unmounted?null:_.jsx(Jt.div,oe(U({},r),{ref:t}))});Gh.displayName="DialogPositioner";var eD=rs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),as=eD.build(),pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},mb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},gb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},jl=e=>e.getById(Xh(e)),tD=e=>e.getById(pb(e)),nD=e=>e.getById(mb(e)),rD=e=>e.getById(gb(e)),iD=e=>e.getById(Kh(e)),sD=e=>e.getById(Qh(e)),oD=e=>e.getById(Eb(e));function aD(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(oe(U({},as.trigger.attrs),{dir:a("dir"),id:gb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Xh(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(oe(U({},as.backdrop.attrs),{dir:a("dir"),hidden:!d,id:mb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(oe(U({},as.positioner.attrs),{dir:a("dir"),id:pb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(oe(U({},as.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Xh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:Kh(u),"aria-describedby":f.description?Qh(u):void 0}))},getTitleProps(){return t.element(oe(U({},as.title.attrs),{dir:a("dir"),id:Kh(u)}))},getDescriptionProps(){return t.element(oe(U({},as.description.attrs),{dir:a("dir"),id:Qh(u)}))},getCloseTriggerProps(){return t.button(oe(U({},as.closeTrigger.attrs),{dir:a("dir"),id:Eb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var uD={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>oD(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 zT(()=>jl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[rD(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 WT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?qT(()=>jl(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")?RT(()=>[jl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Ot(()=>{e.set("rendered",{title:!!iD(t),description:!!sD(t)})})},syncZIndex({scope:e}){Ot(()=>{const t=jl(e);if(!t)return;const n=Qs(t);[tD(e),nD(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};to()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const lD=e=>{const t=H.useId(),{getRootNode:n}=Ul(),{dir:r}=Mh(),s=U({id:t,getRootNode:n,dir:r},e),a=Al(uD,s);return aD(a,gh)},yb=e=>{const[t,c]=uT(e),d=c,{children:n}=d,r=cn(d,["children"]),[s]=J5(t),a=lD(r),u=Th(It({present:a.open},t));return _.jsx(Z5,{value:a,children:_.jsx(K5,{value:s,children:_.jsx(sT,{value:u,children:n})})})},Tb=H.forwardRef((e,t)=>{const n=Oa(),r=It(n.getTitleProps(),e);return _.jsx(Jt.h2,oe(U({},r),{ref:t}))});Tb.displayName="DialogTitle";const cD=({children:e})=>{const[t,n]=H.useState(!1),r=H.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=H.useMemo(()=>({isOpen:t}),[t]);return _.jsx(nh.Provider,{value:r,children:_.jsx(Iy.Provider,{value:s,children:e})})},bb=()=>H.useContext(Iy),_b=()=>{const e=H.useContext(nh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},dD=`${P}-overflow-menu-button-trigger`,fD=({componentType:e,children:t})=>{const{isOpen:n}=bb(),{closeMenu:r}=_b(),{globalClassName:s}=it(),a=H.useRef(null);return H.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${dD}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?_.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:F(`${P}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},hD=({componentType:e,className:t})=>{const{toggleMenu:n}=_b(),{isOpen:r}=bb(),{globalClassName:s}=it();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:F(`${P}-overflow-menu-button-trigger`,`${P}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:_.jsx(nb,{})})};class pD{constructor(){$e(this,"initialState",Pg);$e(this,"promptsStateProxy");$e(this,"promptsParamsProxy");$e(this,"_fullGet",(t,n)=>Reflect.get(t,n));$e(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return ED(n,r),Reflect.set(t,n,r)});$e(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));$e(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));$e(this,"updatePromptsParamsProxy",t=>new Proxy(U({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const pi=new pD,mD=e=>{window.addEventListener(ef,e)},gD=e=>{window.removeEventListener(ef,e)},ED=(e,t)=>{const n=new CustomEvent(ef,{detail:{property:e,value:t}});window.dispatchEvent(n)},xb=e=>{const t=pi.isOpen,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isOpen=n},yD=e=>{const t=pi.isInline,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isInline=n},TD=({elementId:e,entryType:t,params:n,isInline:r})=>{pi.promptsStateProxy.elementId=e,t&&(pi.promptsStateProxy.entryType=t),typeof r=="boolean"&&yD(r),n&&pi.updatePromptsParamsProxy(n),pi.isOpen||xb(!0)},bD=()=>{const e=H.useContext(Lg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},Jh=()=>{const e=H.useContext(Rg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},_D=({componentType:e,isIcon:t})=>{const{globalClassName:n}=it(),{previousComponentType:r}=ri(),s=qs(),a=()=>{Vu(r||"dialog"),s()};return t?_.jsx(Zn,{className:F(n,`${P}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(rb,{})}):_.jsxs("button",{className:F(n,`${P}-overflow-menu-button`,`${P}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(rb,{}),"Show ",r||"dialog"]})},xD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=it(),{isModalFullscreen:r}=ri(),s=qs(),a=()=>{tf(!r),s()},u=r?TN:bN,c="Toggle Fullscreen";return t?_.jsx(Zn,{ariaLabel:c,title:c,className:F(n,`${P}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:F(n,`${P}-overflow-menu-button`,`${P}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),c]})},wD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=it(),{dialogPosition:r}=ri(),s=qs(),a=r==="bottom-left",u=()=>{nf(a?"bottom-right":"bottom-left"),s()},c=a?N5:A5,d=a?"Move right":"Move left";return t?_.jsx(Zn,{className:F(n,`${P}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(c,{})}):_.jsxs("button",{className:F(n,`${P}-overflow-menu-button`,`${P}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(c,{}),d]})},wb=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:c}=it(),{mode:d}=ri(),f=u==="messaging"&&c&&!!r,p=d==="standalone",m=e==="modal",T=m?_D:vb,y=m?xD:wD,x=H.useMemo(()=>s?hN(s):{},[s]);return _.jsx(cD,{children:_.jsxs("div",{className:F(a,`${P}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:F(a,`${P}-${e}-header`,{standalone:p,embedded:!p}),style:x,children:[(s==null?void 0:s.logoUrl)&&_.jsx("img",{alt:"",role:"img",className:F(a,`${P}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),_.jsx(Tb,{className:F(a,`${P}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),_.jsxs("div",{className:F(a,`${P}-${e}-controls`),children:[_.jsx(T,{componentType:e,isIcon:!0}),_.jsx(hD,{componentType:e}),_.jsx(X5,{className:F(a,`cim-${e}-component`),onClick:n})]})]}),_.jsxs(fD,{componentType:e,children:[_.jsx(y,{componentType:e}),_.jsx(kD,{componentType:e}),_.jsx(Ry,{componentType:e,onClearChat:t}),f&&_.jsx(Ly,{componentType:e,onDownloadTranscript:r})]})]})})},zl="USD",jr=(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}`}},SD=({retailPrice:e,discountPrice:t,currencyCode:n=zl})=>{const r=n||zl,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:jr(a,r),comparePrice:jr(u,r),hasDiscount:s}},Sb=e=>typeof e=="number"&&Number.isFinite(e),vD=({priceBreakdown:e,currencyCode:t=zl})=>{if(!e)return null;const n=t||zl,r=[e.sales,e.original],s=r.map(p=>p==null?void 0:p.min).filter(Sb),a=r.map(p=>p==null?void 0:p.max).filter(Sb);if(s.length===0||a.length===0)return null;const u=Math.min(...s),c=Math.max(...a);if(u===c)return null;const d=jr(u,n),f=jr(c,n);return d===null||f===null?null:{range:`${d} – ${f}`,low:d,high:f}},Zh=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:c,hasDiscount:d}=SD({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return _.jsxs("div",{className:F(s,a,`${P}-price`),style:f,children:[_.jsx("span",{className:F(s,`${P}-price__amount`),children:u}),d&&c&&_.jsx("span",{className:F(s,`${P}-price__compare`),children:c})]})},AD={sparkle:Fh,plus:C5,"paper-plane":k5},ND=({icon:e,className:t})=>{const n=AD[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},CD=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=it(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=x=>()=>{a(x)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},T=x=>_.jsxs(_.Fragment,{children:[c&&_.jsx(ND,{icon:c,className:`${P}-suggestion-button-icon`}),_.jsx("span",{children:x})]});return _.jsx("div",{className:F(t,`${P}-suggestion-container ${f}`,e),children:n.map(x=>s?_.jsx(Wu,{disabled:r,className:F(t,`${P}-suggestion-button standalone`,m),onClick:p(x),children:T(x)},x):_.jsx("button",{disabled:r,className:F(t,`${P}-suggestion-button embedded`,m),onClick:p(x),children:T(x)},x))})},kD=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=it();if(!r)return null;const s=()=>{ni(!1),$u(!0)};return t?_.jsx(Zn,{className:F(n,`${P}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:_.jsx(Kg,{})}):_.jsxs("button",{className:F(n,`${P}-overflow-menu-button`,`${P}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(Kg,{}),"Minimize"]})},vb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=it(),r=qs(),s=()=>{Vu("modal"),r()};return t?_.jsx(Zn,{className:F(n,`${P}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:_.jsx(ib,{})}):_.jsxs("button",{className:F(n,`${P}-overflow-menu-button`,`${P}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(ib,{}),"Show modal"]})},OD=["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"],ID=3e3,PD=400,RD=({globalClassName:e,isWidgetStandalone:t,messages:n=OD})=>{const[r,s]=H.useState(0),[a,u]=H.useState(!0);return H.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},PD)},ID);return()=>{clearInterval(d),clearTimeout(c)}},[n.length]),_.jsxs("div",{className:F(e,`${P}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[_.jsxs("div",{className:`${P}-connecting-pulse-wrapper`,children:[_.jsx("div",{className:`${P}-connecting-pulse`}),_.jsx("div",{className:`${P}-connecting-ring`})]}),_.jsx("span",{className:F(`${P}-connecting-text`,a&&`${P}-connecting-text--visible`),children:n[r]})]})},LD=({shouldShow:e,loadingText:t})=>e?_.jsx("span",{className:`${P}-processing-text`,children:t}):null,DD=({shouldShow:e})=>e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:`${P}-processing-shimmer-bar`}),_.jsx("div",{className:`${P}-processing-shimmer-bar`}),_.jsx("div",{className:`${P}-processing-shimmer-bar`})]}):null,ep=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>_.jsxs("div",{className:F(e,`${P}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[_.jsx(LD,{shouldShow:!!n,loadingText:n}),_.jsx(DD,{shouldShow:!n})]});function Ab(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function MD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function FD(e,t,n){const s=il((n||{}).ignore||[]),a=BD(t);let u=-1;for(;++u<a.length;)dE(e,"text",c);function c(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],x=T?T.children:void 0;if(s(y,x?x.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let x=0;const A=m.children.indexOf(f);let v=!1,C=[];T.lastIndex=0;let R=T.exec(f.value);for(;R;){const $=R.index,G={index:R.index,input:R.input,stack:[...p,f]};let D=y(...R,G);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?T.lastIndex=$+1:(x!==$&&C.push({type:"text",value:f.value.slice(x,$)}),Array.isArray(D)?C.push(...D):D&&C.push(D),x=$+R[0].length,v=!0),!T.global)break;R=T.exec(f.value)}return v?(x<f.value.length&&C.push({type:"text",value:f.value.slice(x)}),m.children.splice(A,1,...C)):C=[f],A+C.length}}function BD(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([UD(s[0]),HD(s[1])])}return t}function UD(e){return typeof e=="string"?new RegExp(MD(e),"g"):e}function HD(e){return typeof e=="function"?e:function(){return e}}const tp="phrasing",np=["autolink","link","image","label"];function jD(){return{transforms:[GD],enter:{literalAutolink:$D,literalAutolinkEmail:rp,literalAutolinkHttp:rp,literalAutolinkWww:rp},exit:{literalAutolink:WD,literalAutolinkEmail:YD,literalAutolinkHttp:VD,literalAutolinkWww:qD}}}function zD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:tp,notInConstruct:np},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:tp,notInConstruct:np},{character:":",before:"[ps]",after:"\\/",inConstruct:tp,notInConstruct:np}]}}function $D(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function rp(e){this.config.enter.autolinkProtocol.call(this,e)}function VD(e){this.config.exit.autolinkProtocol.call(this,e)}function qD(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 YD(e){this.config.exit.autolinkEmail.call(this,e)}function WD(e){this.exit(e)}function GD(e){FD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,XD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),KD]],{ignore:["link","linkReference"]})}function XD(e,t,n,r,s){let a="";if(!Nb(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!QD(n)))return!1;const u=JD(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function KD(e,t,n,r){return!Nb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function QD(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 JD(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=Ab(e,"(");let a=Ab(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 Nb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wi(n)||Qu(n))&&(!t||n!==47)}Cb.peek=a8;function ZD(){this.buffer()}function e8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function t8(){this.buffer()}function n8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function r8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=er(this.sliceSerialize(e)).toLowerCase(),n.label=t}function i8(e){this.exit(e)}function s8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=er(this.sliceSerialize(e)).toLowerCase(),n.label=t}function o8(e){this.exit(e)}function a8(){return"["}function Cb(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=s.move("]"),a}function u8(){return{enter:{gfmFootnoteCallString:ZD,gfmFootnoteCall:e8,gfmFootnoteDefinitionLabelString:t8,gfmFootnoteDefinition:n8},exit:{gfmFootnoteCallString:r8,gfmFootnoteCall:i8,gfmFootnoteDefinitionLabelString:s8,gfmFootnoteDefinition:o8}}}function l8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Cb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
38
|
-
`:" ")+a.indentLines(a.containerFlow(r,
|
|
39
|
-
`)}function
|
|
40
|
-
`&&
|
|
41
|
-
`}function
|
|
42
|
-
`,encode:["`"]},
|
|
43
|
-
`),a&&(p+=
|
|
44
|
-
`)),p+=
|
|
45
|
-
`},d.current())))),
|
|
35
|
+
`}),n}function pE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function mE(e,t){const n=Z3(e,t),r=n.one(e,void 0),s=$3(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 iO(e,t){return e&&"run"in e?function(n,r){return He(this,null,function*(){const s=mE(n,U({file:r},t));yield e.run(s,r)})}:function(n,r){return mE(n,U({file:r},e||t))}}function gE(e){if(e)throw e}var If,EE;function sO(){if(EE)return If;EE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var T;for(T in f);return typeof T=="undefined"||e.call(f,T)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},l=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return If=function d(){var f,p,m,T,y,x,v=arguments[0],A=1,S=arguments.length,C=!1;for(typeof v=="boolean"&&(C=v,v=arguments[1]||{},A=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});A<S;++A)if(f=arguments[A],f!=null)for(p in f)m=l(v,p),T=l(f,p),v!==T&&(C&&T&&(a(T)||(y=s(T)))?(y?(y=!1,x=m&&s(m)?m:[]):x=m&&a(m)?m:{},u(v,{name:p,newValue:d(C,x,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},If}var oO=sO();const Pf=Xe(oO);function Rf(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 aO(){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?uO(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 uO(e,t){let n;return r;function r(...u){const l=e.length>u.length;let d;l&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(l&&n)throw p;return s(p)}l||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...l){n||(n=!0,t(u,...l))}function a(u){s(null,u)}}const br={basename:lO,dirname:cO,extname:dO,join:fO,sep:"/"};function lO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');oa(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 cO(e){if(oa(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 dO(e){oa(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 fO(...e){let t=-1,n;for(;++t<e.length;)oa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":hO(n)}function hO(e){oa(e);const t=e.codePointAt(0)===47;let n=pO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function pO(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 oa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const mO={cwd:gO};function gO(){return"/"}function Lf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function EO(e){if(typeof e=="string")e=new URL(e);else if(!Lf(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 yO(e)}function yO(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 Df=["history","path","basename","stem","extname","dirname"];class yE{constructor(t){let n;t?Lf(t)?n={path:t}:typeof t=="string"||TO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":mO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Df.length;){const a=Df[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)Df.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?br.basename(this.path):void 0}set basename(t){Ff(t,"basename"),Mf(t,"basename"),this.path=br.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?br.dirname(this.path):void 0}set dirname(t){TE(this.basename,"dirname"),this.path=br.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?br.extname(this.path):void 0}set extname(t){if(Mf(t,"extname"),TE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=br.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Lf(t)&&(t=EO(t)),Ff(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?br.basename(this.path,this.extname):void 0}set stem(t){Ff(t,"stem"),Mf(t,"stem"),this.path=br.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new Jt(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 Mf(e,t){if(e&&e.includes(br.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+br.sep+"`")}function Ff(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function TE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function TO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bO=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),_O={}.hasOwnProperty;class Bf extends bO{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=aO()}copy(){const t=new Bf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Pf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(jf("data",this.frozen),this.namespace[t]=n,this):_O.call(this.namespace,t)&&this.namespace[t]||void 0:t?(jf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ol(t),r=this.parser||this.Parser;return Uf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Uf("process",this.parser||this.Parser),Hf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const l=ol(t),d=r.parse(l);r.run(d,l,function(p,m,T){if(p||!m||!T)return f(p);const y=m,x=r.stringify(y,T);SO(x)?T.value=x:T.result=x,f(p,T)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Uf("processSync",this.parser||this.Parser),Hf("processSync",this.compiler||this.Compiler),this.process(t,s),_E("processSync","process",n),r;function s(a,u){n=!0,gE(a),r=u}}run(t,n,r){bE(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,l){const d=ol(n);s.run(t,d,f);function f(p,m,T){const y=m||t;p?l(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),_E("runSync","run",r),s;function a(u,l){gE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=ol(n),s=this.compiler||this.Compiler;return Hf("stringify",s),bE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(jf("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=Pf(!0,s.settings,f.settings))}function l(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,...x]=p;const v=r[T][1];Rf(v)&&Rf(y)&&(y=Pf(!0,v,y)),r[T]=[f,y,...x]}}}}const xO=new Bf().freeze();function Uf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Hf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function bE(e){if(!Rf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _E(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ol(e){return wO(e)?e:new yE(e)}function wO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function SO(e){return typeof e=="string"||vO(e)}function vO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const AO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",xE=[],wE={allowDangerousHtml:!0},NO=/^(https?|ircs?|mailto|xmpp)$/i,CO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function SE(e){const t=kO(e),n=OO(e);return IO(t.runSync(t.parse(n),n),e)}function kO(e){const t=e.rehypePlugins||xE,n=e.remarkPlugins||xE,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),wE):wE;return xO().use(c3).use(n).use(iO,r).use(t)}function OO(e){const t=e.children||"",n=new yE;return typeof t=="string"&&(n.value=t),n}function IO(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||PO;for(const p of CO)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+AO+p.id,void 0);return sl(e,f),nC(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Ef)if(Object.hasOwn(Ef,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],v=Ef[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(x||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,T)),y&&T&&typeof m=="number")return l&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function PO(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||NO.test(e.slice(0,t))?e:""}const vE=/[#.]/g;function RO(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){vE.lastIndex=s;const l=vE.exec(n),d=n.slice(s,l?l.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),l&&(a=l[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function AE(e,t,n){const r=n?FO(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=RO(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,LO(u))l.unshift(u);else for(const[m,T]of Object.entries(u))DO(e,d.properties,m,T)}for(const f of l)zf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function LO(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 DO(e,t,n,r){const s=Wu(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?s.spaceSeparated?a=m1(r):s.commaSeparated?a=n1(r):s.commaOrSpaceSeparated?a=m1(n1(r).join(" ")):a=NE(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?MO(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(NE(s,s.property,l));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function zf(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)zf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?zf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function NE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Xo(n)===Xo(t)))return!0}return n}function MO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function FO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const BO=["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"],UO=AE(Ko,"div"),HO=AE(ii,"g",BO);function jO(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let l=n[u];if(l===void 0){const d=CE(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=CE(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 CE(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
37
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Ki={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},kE={}.hasOwnProperty,zO=Object.prototype;function $O(e,t){const n=t||{};return $f({file:n.file||void 0,location:!1,schema:n.space==="svg"?ii:Ko,verbose:n.verbose||!1},e)}function $f(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},al(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:OE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=jO(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=VO(e,t),n}}function OE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=$f(e,t[n]);r.push(s)}return r}function VO(e,t){const n=e.schema;e.schema=t.namespaceURI===Ki.svg?ii:Ko;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;kE.call(zO,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?HO:UO)(t.tagName,s,OE(e,t.childNodes));if(al(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&Hs(d.startTag),p=d&&d.endTag&&Hs(d.endTag),m=$f(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=qO(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function qO(e,t,n){const r=Hs(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)kE.call(n.attrs,u)&&(a[Wu(e.schema,u).property]=Hs(n.attrs[u]));n.startTag;const l=Hs(n.startTag),d=n.endTag?Hs(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Hs(e){const t=IE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=IE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function IE(e){return e.line&&e.column?e:void 0}const PE={}.hasOwnProperty;function RE(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&PE.call(s,e)){const d=String(s[e]);u=PE.call(l,d)?l[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const YO={},WO={}.hasOwnProperty,LE=RE("type",{handlers:{root:XO,element:eI,text:JO,comment:ZO,doctype:QO}});function GO(e,t){const r=(t||YO).space;return LE(e,r==="svg"?ii:Ko)}function XO(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Vf(e.children,n,t),js(e,n),n}function KO(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Vf(e.children,n,t),js(e,n),n}function QO(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return js(e,t),t}function JO(e){const t={nodeName:"#text",value:e.value,parentNode:null};return js(e,t),t}function ZO(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return js(e,t),t}function eI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ii);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&WO.call(e.properties,a)){const d=tI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Ki[u],childNodes:[],parentNode:null};return l.childNodes=Vf(e.children,l,r),js(e,l),e.tagName==="template"&&e.content&&(l.content=KO(e.content,r)),l}function tI(e,t,n){const r=Wu(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?r1(n):g1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=Ki[r.space]}return s}function Vf(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=LE(e[r],n);a.parentNode=t,s.push(a)}return s}function js(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const nI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],rI=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]),mt="�";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 Tn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function DE(e){return e>=55296&&e<=57343}function iI(e){return e>=56320&&e<=57343}function sI(e,t){return(e-55296)*1024+9216+t}function ME(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function FE(e){return e>=64976&&e<=65007||rI.has(e)}var ee;(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"})(ee||(ee={}));const oI=65536;class aI{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=oI,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(iI(n))return this.pos++,this._addGap(),sI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(ee.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,DE(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){ME(t)?this._err(ee.controlCharacterInInputStream):FE(t)&&this._err(ee.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var We;(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"})(We||(We={}));function BE(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const uI=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))),lI=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 cI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=lI.get(e))!==null&&t!==void 0?t:e}var Mt;(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"})(Mt||(Mt={}));const dI=32;var ai;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ai||(ai={}));function qf(e){return e>=Mt.ZERO&&e<=Mt.NINE}function fI(e){return e>=Mt.UPPER_A&&e<=Mt.UPPER_F||e>=Mt.LOWER_A&&e<=Mt.LOWER_F}function hI(e){return e>=Mt.UPPER_A&&e<=Mt.UPPER_Z||e>=Mt.LOWER_A&&e<=Mt.LOWER_Z||qf(e)}function pI(e){return e===Mt.EQUALS||hI(e)}var Ft;(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"})(Ft||(Ft={}));var Br;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Br||(Br={}));class mI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ft.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Br.Strict}startEntity(t){this.decodeMode=t,this.state=Ft.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ft.EntityStart:return t.charCodeAt(n)===Mt.NUM?(this.state=Ft.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ft.NamedEntity,this.stateNamedEntity(t,n));case Ft.NumericStart:return this.stateNumericStart(t,n);case Ft.NumericDecimal:return this.stateNumericDecimal(t,n);case Ft.NumericHex:return this.stateNumericHex(t,n);case Ft.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|dI)===Mt.LOWER_X?(this.state=Ft.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ft.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(qf(s)||fI(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(qf(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===Mt.SEMI)this.consumed+=1;else if(this.decodeMode===Br.Strict)return 0;return this.emitCodePoint(cI(this.result),this.consumed),this.errors&&(t!==Mt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&ai.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=gI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Br.Attribute&&(a===0||pI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&ai.VALUE_LENGTH)>>14,a!==0){if(u===Mt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Br.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&ai.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~ai.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Ft.NamedEntity:return this.result!==0&&(this.decodeMode!==Br.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ft.NumericDecimal:return this.emitNumericEntity(0,2);case Ft.NumericHex:return this.emitNumericEntity(0,3);case Ft.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ft.EntityStart:return 0}}}function gI(e,t,n,r){const s=(t&ai.BRANCH_LENGTH)>>7,a=t&ai.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,l=u+s-1;for(;u<=l;){const d=u+l>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)l=d-1;else return e[d+s]}return-1}var me;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(me||(me={}));var Qi;(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"})(Qi||(Qi={}));var jn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(jn||(jn={}));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 EI=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=EI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const Te=g,yI={[me.HTML]:new Set([Te.ADDRESS,Te.APPLET,Te.AREA,Te.ARTICLE,Te.ASIDE,Te.BASE,Te.BASEFONT,Te.BGSOUND,Te.BLOCKQUOTE,Te.BODY,Te.BR,Te.BUTTON,Te.CAPTION,Te.CENTER,Te.COL,Te.COLGROUP,Te.DD,Te.DETAILS,Te.DIR,Te.DIV,Te.DL,Te.DT,Te.EMBED,Te.FIELDSET,Te.FIGCAPTION,Te.FIGURE,Te.FOOTER,Te.FORM,Te.FRAME,Te.FRAMESET,Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6,Te.HEAD,Te.HEADER,Te.HGROUP,Te.HR,Te.HTML,Te.IFRAME,Te.IMG,Te.INPUT,Te.LI,Te.LINK,Te.LISTING,Te.MAIN,Te.MARQUEE,Te.MENU,Te.META,Te.NAV,Te.NOEMBED,Te.NOFRAMES,Te.NOSCRIPT,Te.OBJECT,Te.OL,Te.P,Te.PARAM,Te.PLAINTEXT,Te.PRE,Te.SCRIPT,Te.SECTION,Te.SELECT,Te.SOURCE,Te.STYLE,Te.SUMMARY,Te.TABLE,Te.TBODY,Te.TD,Te.TEMPLATE,Te.TEXTAREA,Te.TFOOT,Te.TH,Te.THEAD,Te.TITLE,Te.TR,Te.TRACK,Te.UL,Te.WBR,Te.XMP]),[me.MATHML]:new Set([Te.MI,Te.MO,Te.MN,Te.MS,Te.MTEXT,Te.ANNOTATION_XML]),[me.SVG]:new Set([Te.TITLE,Te.FOREIGN_OBJECT,Te.DESC]),[me.XLINK]:new Set,[me.XML]:new Set,[me.XMLNS]:new Set},Yf=new Set([Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.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 St={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function TI(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function aa(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function bI(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function ui(e){return bI(e)||aa(e)}function UE(e){return ui(e)||TI(e)}function ul(e){return e+32}function HE(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function jE(e){return HE(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function _I(e){return e===I.NULL?ee.nullCharacterReference:e>1114111?ee.characterReferenceOutsideUnicodeRange:DE(e)?ee.surrogateCharacterReference:FE(e)?ee.noncharacterCharacterReference:ME(e)||e===I.CARRIAGE_RETURN?ee.controlCharacterReference:null}class xI{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 aI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new mI(uI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ee.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ee.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=_I(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:We.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:We.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:We.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:We.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(BE(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ee.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===We.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ee.endTagWithAttributes),t.selfClosing&&this._err(ee.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 We.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case We.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case We.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:We.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=HE(t)?We.WHITESPACE_CHARACTER:t===I.NULL?We.NULL_CHARACTER:We.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(We.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Br.Attribute:Br.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(ee.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(ee.unexpectedNullCharacter),this._emitChars(mt);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(ee.unexpectedNullCharacter),this._emitChars(mt);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(ee.unexpectedNullCharacter),this._emitChars(mt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(mt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ui(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case 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(ee.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ui(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(ee.missingEndTagName),this.state=L.DATA;break}case I.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ee.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(ee.unexpectedNullCharacter),n.tagName+=mt;break}case I.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(aa(t)?ul(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){ui(t)?(this.state=L.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case 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){ui(t)?(this.state=L.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case 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){ui(t)?(this.state=L.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===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(ee.unexpectedNullCharacter),this._emitChars(mt);break}case I.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(mt);break}case I.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(mt);break}case I.EOF:{this._err(ee.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:ui(t)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ui(t)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Tn.SCRIPT,!1)&&jE(this.preprocessor.peek(Tn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Tn.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(ee.unexpectedNullCharacter),this._emitChars(mt);break}case I.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(mt);break}case I.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(mt);break}case I.EOF:{this._err(ee.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(Tn.SCRIPT,!1)&&jE(this.preprocessor.peek(Tn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Tn.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(ee.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(ee.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.name+=mt;break}default:this.currentAttr.name+=String.fromCodePoint(aa(t)?ul(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(ee.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(ee.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(ee.unexpectedNullCharacter),this.currentAttr.value+=mt;break}case I.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.currentAttr.value+=mt;break}case I.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.currentAttr.value+=mt;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(ee.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(ee.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(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.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(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.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(ee.unexpectedNullCharacter),n.data+=mt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Tn.DASH_DASH,!0)?(this._createCommentToken(Tn.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(Tn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Tn.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(Tn.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(ee.cdataInHtmlContent),this._createCommentToken(Tn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ee.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(ee.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(ee.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),n.data+=mt;break}case I.EOF:{this._err(ee.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(ee.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(ee.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(ee.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(ee.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ee.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(ee.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(aa(t))this._createDoctypeToken(String.fromCharCode(ul(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(ee.unexpectedNullCharacter),this._createDoctypeToken(mt),this.state=L.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),n.name+=mt;break}case I.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(aa(t)?ul(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(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Tn.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Tn.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ee.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(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.unexpectedNullCharacter),n.publicId+=mt;break}case I.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),n.publicId+=mt;break}case I.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ee.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(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.unexpectedNullCharacter),n.systemId+=mt;break}case I.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),n.systemId+=mt;break}case I.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(ee.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(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.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(ee.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()&&UE(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){UE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(ee.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const zE=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),$E=new Set([...zE,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),ll=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),wI=new Set([...ll,g.OL,g.UL]),SI=new Set([...ll,g.BUTTON]),VE=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),qE=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),vI=new Set([g.TR,g.TEMPLATE,g.HTML]),AI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),NI=new Set([g.TABLE,g.TEMPLATE,g.HTML]),CI=new Set([g.TD,g.TH]);class kI{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===me.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==me.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Yf,me.HTML)}popUntilTableCellPopped(){this.popUntilPopped(CI,me.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(NI,me.HTML)}clearBackToTableBodyContext(){this.clearBackTo(AI,me.HTML)}clearBackToTableRowContext(){this.clearBackTo(vI,me.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case me.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case me.SVG:{if(qE.has(s))return!1;break}case me.MATHML:{if(VE.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ll)}hasInListItemScope(t){return this.hasInDynamicScope(t,wI)}hasInButtonScope(t){return this.hasInDynamicScope(t,SI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case me.HTML:{if(Yf.has(n))return!0;if(ll.has(n))return!1;break}case me.SVG:{if(qE.has(n))return!1;break}case me.MATHML:{if(VE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===me.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===me.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===me.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&zE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&$E.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&$E.has(this.currentTagId);)this.pop()}}const Wf=3;var _r;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(_r||(_r={}));const YE={type:_r.Marker};class OI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){const d=this.entries[l];if(d.type===_r.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:l,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Wf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Wf)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>=Wf&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(YE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:_r.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:_r.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(YE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===_r.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===_r.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===_r.Element&&n.element===t)}}const li={createDocument(){return{nodeName:"#document",mode:jn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};li.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(li.isTextNode(n)){n.value+=t;return}}li.appendChild(e,li.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&li.isTextNode(r)?r.value+=t:li.insertBefore(e,li.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=U(U({},e.sourceCodeLocation),t)}},WE="html",II="about:legacy-compat",PI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",GE=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],RI=[...GE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],LI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),XE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],DI=[...XE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function KE(e,t){return t.some(n=>e.startsWith(n))}function MI(e){return e.name===WE&&e.publicId===null&&(e.systemId===null||e.systemId===II)}function FI(e){if(e.name!==WE)return jn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===PI)return jn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),LI.has(n))return jn.QUIRKS;let r=t===null?RI:GE;if(KE(n,r))return jn.QUIRKS;if(r=t===null?XE:DI,KE(n,r))return jn.LIMITED_QUIRKS}return jn.NO_QUIRKS}const QE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},BI="definitionurl",UI="definitionURL",HI=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),jI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:me.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:me.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:me.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:me.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:me.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:me.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:me.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:me.XML}],["xml:space",{prefix:"xml",name:"space",namespace:me.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:me.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:me.XMLNS}]]),zI=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),$I=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 VI(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===Qi.COLOR||r===Qi.SIZE||r===Qi.FACE)||$I.has(t)}function JE(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===BI){e.attrs[t].name=UI;break}}function ZE(e){for(let t=0;t<e.attrs.length;t++){const n=HI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Gf(e){for(let t=0;t<e.attrs.length;t++){const n=jI.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function qI(e){const t=zI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=zs(e.tagName))}function YI(e,t){return t===me.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function WI(e,t,n){if(t===me.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Qi.ENCODING){const s=n[r].value.toLowerCase();return s===QE.TEXT_HTML||s===QE.APPLICATION_XML}}return t===me.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function GI(e,t,n,r){return(!r||r===me.HTML)&&WI(e,t,n)||(!r||r===me.MATHML)&&YI(e,t)}const XI="hidden",KI=8,QI=3;var B;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(B||(B={}));const JI={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ey=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),ty={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:li,onParseError:null};class ny{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=B.INITIAL,this.originalInsertionMode=B.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=U(U({},ty),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new xI(this.options,this),this.activeFormattingElements=new OI(this.treeAdapter),this.fragmentContextID=r?zs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new kI(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=U(U({},ty),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,me.HTML,[]));const s=r.treeAdapter.createElement("documentmock",me.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(B.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:JI,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===me.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,me.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=B.TEXT}switchToPlaintextParsing(){this.insertionMode=B.TEXT,this.originalInsertionMode=B.IN_BODY,this.tokenizer.state=St.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==me.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=St.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=St.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=St.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=St.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,me.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,me.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,me.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),a=n.type===We.END_TAG&&s===n.tagName?{endTag:U({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===me.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,me.HTML)}_processToken(t){switch(t.type){case We.CHARACTER:{this.onCharacter(t);break}case We.NULL_CHARACTER:{this.onNullCharacter(t);break}case We.COMMENT:{this.onComment(t);break}case We.DOCTYPE:{this.onDoctype(t);break}case We.START_TAG:{this._processStartTag(t);break}case We.END_TAG:{this.onEndTag(t);break}case We.EOF:{this.onEof(t);break}case We.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return GI(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===_r.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=B.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=B.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=B.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=B.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=B.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=B.IN_TABLE;return}case g.BODY:{this.insertionMode=B.IN_BODY;return}case g.FRAMESET:{this.insertionMode=B.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?B.AFTER_HEAD:B.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=B.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=B.IN_HEAD;return}break}}this.insertionMode=B.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=B.IN_SELECT_IN_TABLE;return}}this.insertionMode=B.IN_SELECT}_isElementCausesFosterParenting(t){return ey.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===me.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return yI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){CR(this,t);return}switch(this.insertionMode){case B.INITIAL:{ua(this,t);break}case B.BEFORE_HTML:{la(this,t);break}case B.BEFORE_HEAD:{ca(this,t);break}case B.IN_HEAD:{da(this,t);break}case B.IN_HEAD_NO_SCRIPT:{fa(this,t);break}case B.AFTER_HEAD:{ha(this,t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:{iy(this,t);break}case B.TEXT:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Jf(this,t);break}case B.IN_TABLE_TEXT:{fy(this,t);break}case B.IN_COLUMN_GROUP:{fl(this,t);break}case B.AFTER_BODY:{ml(this,t);break}case B.AFTER_AFTER_BODY:{gl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){NR(this,t);return}switch(this.insertionMode){case B.INITIAL:{ua(this,t);break}case B.BEFORE_HTML:{la(this,t);break}case B.BEFORE_HEAD:{ca(this,t);break}case B.IN_HEAD:{da(this,t);break}case B.IN_HEAD_NO_SCRIPT:{fa(this,t);break}case B.AFTER_HEAD:{ha(this,t);break}case B.TEXT:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Jf(this,t);break}case B.IN_COLUMN_GROUP:{fl(this,t);break}case B.AFTER_BODY:{ml(this,t);break}case B.AFTER_AFTER_BODY:{gl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Kf(this,t);return}switch(this.insertionMode){case B.INITIAL:case B.BEFORE_HTML:case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_TEMPLATE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{Kf(this,t);break}case B.IN_TABLE_TEXT:{ga(this,t);break}case B.AFTER_BODY:{sP(this,t);break}case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{oP(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case B.INITIAL:{aP(this,t);break}case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:{this._err(t,ee.misplacedDoctype);break}case B.IN_TABLE_TEXT:{ga(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ee.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?kR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{ua(this,t);break}case B.BEFORE_HTML:{uP(this,t);break}case B.BEFORE_HEAD:{cP(this,t);break}case B.IN_HEAD:{nr(this,t);break}case B.IN_HEAD_NO_SCRIPT:{hP(this,t);break}case B.AFTER_HEAD:{mP(this,t);break}case B.IN_BODY:{en(this,t);break}case B.IN_TABLE:{$s(this,t);break}case B.IN_TABLE_TEXT:{ga(this,t);break}case B.IN_CAPTION:{dR(this,t);break}case B.IN_COLUMN_GROUP:{Zf(this,t);break}case B.IN_TABLE_BODY:{hl(this,t);break}case B.IN_ROW:{pl(this,t);break}case B.IN_CELL:{pR(this,t);break}case B.IN_SELECT:{my(this,t);break}case B.IN_SELECT_IN_TABLE:{gR(this,t);break}case B.IN_TEMPLATE:{yR(this,t);break}case B.AFTER_BODY:{bR(this,t);break}case B.IN_FRAMESET:{_R(this,t);break}case B.AFTER_FRAMESET:{wR(this,t);break}case B.AFTER_AFTER_BODY:{vR(this,t);break}case B.AFTER_AFTER_FRAMESET:{AR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?OR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{ua(this,t);break}case B.BEFORE_HTML:{lP(this,t);break}case B.BEFORE_HEAD:{dP(this,t);break}case B.IN_HEAD:{fP(this,t);break}case B.IN_HEAD_NO_SCRIPT:{pP(this,t);break}case B.AFTER_HEAD:{gP(this,t);break}case B.IN_BODY:{dl(this,t);break}case B.TEXT:{tR(this,t);break}case B.IN_TABLE:{pa(this,t);break}case B.IN_TABLE_TEXT:{ga(this,t);break}case B.IN_CAPTION:{fR(this,t);break}case B.IN_COLUMN_GROUP:{hR(this,t);break}case B.IN_TABLE_BODY:{eh(this,t);break}case B.IN_ROW:{py(this,t);break}case B.IN_CELL:{mR(this,t);break}case B.IN_SELECT:{gy(this,t);break}case B.IN_SELECT_IN_TABLE:{ER(this,t);break}case B.IN_TEMPLATE:{TR(this,t);break}case B.AFTER_BODY:{yy(this,t);break}case B.IN_FRAMESET:{xR(this,t);break}case B.AFTER_FRAMESET:{SR(this,t);break}case B.AFTER_AFTER_BODY:{gl(this,t);break}}}onEof(t){switch(this.insertionMode){case B.INITIAL:{ua(this,t);break}case B.BEFORE_HTML:{la(this,t);break}case B.BEFORE_HEAD:{ca(this,t);break}case B.IN_HEAD:{da(this,t);break}case B.IN_HEAD_NO_SCRIPT:{fa(this,t);break}case B.AFTER_HEAD:{ha(this,t);break}case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{cy(this,t);break}case B.TEXT:{nR(this,t);break}case B.IN_TABLE_TEXT:{ga(this,t);break}case B.IN_TEMPLATE:{Ey(this,t);break}case B.AFTER_BODY:case B.IN_FRAMESET:case B.AFTER_FRAMESET:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{Qf(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 B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.TEXT:case B.IN_COLUMN_GROUP:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{this._insertCharacters(t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:case B.AFTER_BODY:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{ry(this,t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Jf(this,t);break}case B.IN_TABLE_TEXT:{dy(this,t);break}}}}function ZI(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):ly(e,t),n}function eP(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 tP(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>=QI;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=nP(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function nP(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 rP(e,t,n){const r=e.treeAdapter.getTagName(t),s=zs(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===me.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function iP(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 Xf(e,t){for(let n=0;n<KI;n++){const r=ZI(e,t);if(!r)break;const s=eP(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=tP(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&rP(e,u,a),iP(e,s,r)}}function Kf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function sP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function oP(e,t){e._appendCommentNode(t,e.document)}function Qf(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 aP(e,t){e._setDocumentType(t);const n=t.forceQuirks?jn.QUIRKS:FI(t);MI(t)||e._err(t,ee.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=B.BEFORE_HTML}function ua(e,t){e._err(t,ee.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,jn.QUIRKS),e.insertionMode=B.BEFORE_HTML,e._processToken(t)}function uP(e,t){t.tagID===g.HTML?(e._insertElement(t,me.HTML),e.insertionMode=B.BEFORE_HEAD):la(e,t)}function lP(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&la(e,t)}function la(e,t){e._insertFakeRootElement(),e.insertionMode=B.BEFORE_HEAD,e._processToken(t)}function cP(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.HEAD:{e._insertElement(t,me.HTML),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD;break}default:ca(e,t)}}function dP(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?ca(e,t):e._err(t,ee.endTagWithoutMatchingOpenElement)}function ca(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD,e._processToken(t)}function nr(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,St.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,St.RAWTEXT):(e._insertElement(t,me.HTML),e.insertionMode=B.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,St.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,St.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=B.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(B.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:da(e,t)}}function fP(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=B.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{da(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function Ji(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,ee.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ee.endTagWithoutMatchingOpenElement)}function da(e,t){e.openElements.pop(),e.insertionMode=B.AFTER_HEAD,e._processToken(t)}function hP(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{nr(e,t);break}case g.NOSCRIPT:{e._err(t,ee.nestedNoscriptInHead);break}default:fa(e,t)}}function pP(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=B.IN_HEAD;break}case g.BR:{fa(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function fa(e,t){const n=t.type===We.EOF?ee.openElementsLeftAfterEof:ee.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=B.IN_HEAD,e._processToken(t)}function mP(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.BODY:{e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=B.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,me.HTML),e.insertionMode=B.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,ee.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),nr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:ha(e,t)}}function gP(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{ha(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function ha(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=B.IN_BODY,cl(e,t)}function cl(e,t){switch(t.type){case We.CHARACTER:{iy(e,t);break}case We.WHITESPACE_CHARACTER:{ry(e,t);break}case We.COMMENT:{Kf(e,t);break}case We.START_TAG:{en(e,t);break}case We.END_TAG:{dl(e,t);break}case We.EOF:{cy(e,t);break}}}function ry(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function iy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function EP(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function yP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function TP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_FRAMESET)}function bP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function _P(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Yf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,me.HTML)}function xP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function wP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),n||(e.formElement=e.openElements.current))}function SP(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function vP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.tokenizer.state=St.PLAINTEXT}function AP(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1}function NP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Xf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function CP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function kP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Xf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function OP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function IP(e,t){e.treeAdapter.getDocumentMode(e.document)!==jn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=B.IN_TABLE}function sy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function oy(e){const t=BE(e,Qi.TYPE);return t!=null&&t.toLowerCase()===XI}function PP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),oy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function RP(e,t){e._appendElement(t,me.HTML),t.ackSelfClosing=!0}function LP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function DP(e,t){t.tagName=X.IMG,t.tagID=g.IMG,sy(e,t)}function MP(e,t){e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.tokenizer.state=St.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=B.TEXT}function FP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,St.RAWTEXT)}function BP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,St.RAWTEXT)}function ay(e,t){e._switchToTextParsing(t,St.RAWTEXT)}function UP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===B.IN_TABLE||e.insertionMode===B.IN_CAPTION||e.insertionMode===B.IN_TABLE_BODY||e.insertionMode===B.IN_ROW||e.insertionMode===B.IN_CELL?B.IN_SELECT_IN_TABLE:B.IN_SELECT}function HP(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function jP(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,me.HTML)}function zP(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,me.HTML)}function $P(e,t){e._reconstructActiveFormattingElements(),JE(t),Gf(t),t.selfClosing?e._appendElement(t,me.MATHML):e._insertElement(t,me.MATHML),t.ackSelfClosing=!0}function VP(e,t){e._reconstructActiveFormattingElements(),ZE(t),Gf(t),t.selfClosing?e._appendElement(t,me.SVG):e._insertElement(t,me.SVG),t.ackSelfClosing=!0}function uy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function en(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:{CP(e,t);break}case g.A:{NP(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{_P(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:{bP(e,t);break}case g.LI:case g.DD:case g.DT:{SP(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{sy(e,t);break}case g.HR:{LP(e,t);break}case g.RB:case g.RTC:{jP(e,t);break}case g.RT:case g.RP:{zP(e,t);break}case g.PRE:case g.LISTING:{xP(e,t);break}case g.XMP:{FP(e,t);break}case g.SVG:{VP(e,t);break}case g.HTML:{EP(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:{nr(e,t);break}case g.BODY:{yP(e,t);break}case g.FORM:{wP(e,t);break}case g.NOBR:{kP(e,t);break}case g.MATH:{$P(e,t);break}case g.TABLE:{IP(e,t);break}case g.INPUT:{PP(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{RP(e,t);break}case g.IMAGE:{DP(e,t);break}case g.BUTTON:{AP(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{OP(e,t);break}case g.IFRAME:{BP(e,t);break}case g.SELECT:{UP(e,t);break}case g.OPTION:case g.OPTGROUP:{HP(e,t);break}case g.NOEMBED:case g.NOFRAMES:{ay(e,t);break}case g.FRAMESET:{TP(e,t);break}case g.TEXTAREA:{MP(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?ay(e,t):uy(e,t);break}case g.PLAINTEXT:{vP(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:uy(e,t)}}function qP(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function YP(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,yy(e,t))}function WP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function GP(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 XP(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function KP(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function QP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function JP(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function ZP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function eR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function ly(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function dl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{Xf(e,t);break}case g.P:{XP(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:{WP(e,t);break}case g.LI:{KP(e);break}case g.DD:case g.DT:{QP(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{JP(e);break}case g.BR:{eR(e);break}case g.BODY:{qP(e,t);break}case g.HTML:{YP(e,t);break}case g.FORM:{GP(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{ZP(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:ly(e,t)}}function cy(e,t){e.tmplInsertionModeStack.length>0?Ey(e,t):Qf(e,t)}function tR(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 nR(e,t){e._err(t,ee.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Jf(e,t){if(e.openElements.currentTagId!==void 0&&ey.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=B.IN_TABLE_TEXT,t.type){case We.CHARACTER:{fy(e,t);break}case We.WHITESPACE_CHARACTER:{dy(e,t);break}}else ma(e,t)}function rR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_CAPTION}function iR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_COLUMN_GROUP}function sR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=B.IN_COLUMN_GROUP,Zf(e,t)}function oR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_TABLE_BODY}function aR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=B.IN_TABLE_BODY,hl(e,t)}function uR(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function lR(e,t){oy(t)?e._appendElement(t,me.HTML):ma(e,t),t.ackSelfClosing=!0}function cR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,me.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function $s(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{aR(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{nr(e,t);break}case g.COL:{sR(e,t);break}case g.FORM:{cR(e,t);break}case g.TABLE:{uR(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{oR(e,t);break}case g.INPUT:{lR(e,t);break}case g.CAPTION:{rR(e,t);break}case g.COLGROUP:{iR(e,t);break}default:ma(e,t)}}function pa(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Ji(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:ma(e,t)}}function ma(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,cl(e,t),e.fosterParentingEnabled=n}function dy(e,t){e.pendingCharacterTokens.push(t)}function fy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ga(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ma(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const hy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function dR(e,t){const n=t.tagID;hy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,$s(e,t)):en(e,t)}function fR(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,n===g.TABLE&&pa(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:dl(e,t)}}function Zf(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.COL:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{nr(e,t);break}default:fl(e,t)}}function hR(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case g.TEMPLATE:{Ji(e,t);break}case g.COL:break;default:fl(e,t)}}function fl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE,e._processToken(t))}function hl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=B.IN_ROW,pl(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,$s(e,t));break}default:$s(e,t)}}function eh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,pa(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:pa(e,t)}}function pl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,hl(e,t));break}default:$s(e,t)}}function py(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,eh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,eh(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:pa(e,t)}}function pR(e,t){const n=t.tagID;hy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),pl(e,t)):en(e,t)}function mR(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),py(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:dl(e,t)}}function my(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,me.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,me.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{nr(e,t);break}}}function gy(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{Ji(e,t);break}}}function gR(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):my(e,t)}function ER(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):gy(e,t)}function yR(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:{nr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=B.IN_TABLE,e.insertionMode=B.IN_TABLE,$s(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=B.IN_COLUMN_GROUP,e.insertionMode=B.IN_COLUMN_GROUP,Zf(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=B.IN_TABLE_BODY,e.insertionMode=B.IN_TABLE_BODY,hl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=B.IN_ROW,e.insertionMode=B.IN_ROW,pl(e,t);break}default:e.tmplInsertionModeStack[0]=B.IN_BODY,e.insertionMode=B.IN_BODY,en(e,t)}}function TR(e,t){t.tagID===g.TEMPLATE&&Ji(e,t)}function Ey(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Qf(e,t)}function bR(e,t){t.tagID===g.HTML?en(e,t):ml(e,t)}function yy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=B.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else ml(e,t)}function ml(e,t){e.insertionMode=B.IN_BODY,cl(e,t)}function _R(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.FRAMESET:{e._insertElement(t,me.HTML);break}case g.FRAME:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{nr(e,t);break}}}function xR(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=B.AFTER_FRAMESET))}function wR(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.NOFRAMES:{nr(e,t);break}}}function SR(e,t){t.tagID===g.HTML&&(e.insertionMode=B.AFTER_AFTER_FRAMESET)}function vR(e,t){t.tagID===g.HTML?en(e,t):gl(e,t)}function gl(e,t){e.insertionMode=B.IN_BODY,cl(e,t)}function AR(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.NOFRAMES:{nr(e,t);break}}}function NR(e,t){t.chars=mt,e._insertCharacters(t)}function CR(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ty(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==me.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function kR(e,t){if(VI(t))Ty(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===me.MATHML?JE(t):r===me.SVG&&(qI(t),ZE(t)),Gf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function OR(e,t){if(t.tagID===g.P||t.tagID===g.BR){Ty(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===me.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const IR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,PR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),by={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function _y(e,t){const n=zR(e),r=RE("type",{handlers:{root:RR,element:LR,text:DR,comment:wy,doctype:MR,raw:BR},unknown:UR}),s={parser:n?new ny(by):ny.getFragmentParser(void 0,by),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),Vs(s,Tr());const a=n?s.parser.document:s.parser.getFragment(),u=$O(a,{file:s.options.file});return s.stitches&&sl(u,"comment",function(l,d,f){const p=l;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function xy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function RR(e,t){xy(e.children,t)}function LR(e,t){HR(e,t),xy(e.children,t),jR(e,t)}function DR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:We.CHARACTER,chars:e.value,location:Ea(e)};Vs(t,Tr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function MR(e,t){const n={type:We.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ea(e)};Vs(t,Tr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function FR(e,t){t.stitches=!0;const n=$R(e);if("children"in e&&"children"in n){const r=_y({type:"root",children:e.children},t.options);n.children=r.children}wy({type:"comment",value:{stitch:n}},t)}function wy(e,t){const n=e.value,r={type:We.COMMENT,data:n,location:Ea(e)};Vs(t,Tr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function BR(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Sy(t,Tr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(IR,"<$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 UR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))FR(n,t);else{let r="";throw PR.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Vs(e,t){Sy(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=St.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Sy(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function HR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===St.PLAINTEXT)return;Vs(t,Tr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:Ki.html;s===Ki.html&&n==="svg"&&(s=Ki.svg);const a=GO(ae(U({},e),{children:[]}),{space:s===Ki.svg?"svg":"html"}),u={type:We.START_TAG,tagName:n,tagID:zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ea(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function jR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&nI.includes(n)||t.parser.tokenizer.state===St.PLAINTEXT)return;Vs(t,Gu(e));const r={type:We.END_TAG,tagName:n,tagID:zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ea(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===St.RCDATA||t.parser.tokenizer.state===St.RAWTEXT||t.parser.tokenizer.state===St.SCRIPT_DATA)&&(t.parser.tokenizer.state=St.DATA)}function zR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ea(e){const t=Tr(e)||{line:void 0,column:void 0,offset:void 0},n=Gu(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function $R(e){return"children"in e?Xi(ae(U({},e),{children:[]})):Xi(e)}function vy(e){return function(t,n){return _y(t,ae(U({},e),{file:n}))}}const Zi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ay={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Zi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Zi],h2:[["className","sr-only"]],img:[...Zi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Zi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Zi],table:[...Zi],ul:[...Zi,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},ci={}.hasOwnProperty;function VR(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},Ay),t):Ay,stack:[]},s=Ny(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function Ny(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return qR(e,n);case"doctype":return YR(e,n);case"element":return WR(e,n);case"root":return GR(e,n);case"text":return XR(e,n)}}}function qR(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 ya(a,t),a}}function YR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ya(n,t),n}}function WR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Cy(e,t.children),s=KR(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&ci.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let d=-1;for(a=!1;++d<l.length;)e.stack.includes(l[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:s,children:r};return ya(u,t),u}function GR(e,t){const r={type:"root",children:Cy(e,t.children)};return ya(r,t),r}function XR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ya(r,t),r}function Cy(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=Ny(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function KR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&ci.call(r,n)?r[n]:void 0,u=r&&ci.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(ci.call(l,f)){const p=l[f];let m=ky(e,Iy(a,f),f,p);m==null&&(m=ky(e,Iy(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&ci.call(s,n)){const p=s[n];for(f in p)ci.call(p,f)&&!ci.call(d,f)&&(d[f]=p[f])}return d}function ky(e,t,n,r){return t?Array.isArray(r)?QR(e,t,n,r):Oy(e,t,n,r):void 0}function QR(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Oy(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Oy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&JR(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 JR(e,t,n){const r=e.schema.protocols&&ci.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),l=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||l>-1&&a>l)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function ya(e,t){const n=x1(t);t.data&&(e.data=Xi(t.data)),n&&(e.position=n)}function Iy(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function ZR(e){return function(t){return VR(t,e)}}const Py=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return _.jsx("a",ae(U(U({className:F(e,`${k}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},e6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ot();return!e&&!t?null:_.jsx("div",{className:F(n,`${k}-disclaimer`),children:t?_.jsx(SE,{rehypePlugins:[vy,ZR],components:{ul:({children:r})=>_.jsx("ul",{className:F(n,`${k}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:F(n,`${k}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:F(n,`${k}-li`),children:r}),a:({href:r,title:s,children:a})=>_.jsx(Py,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>_.jsx("img",{className:F(n,`${k}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>_.jsx("p",{className:F(n,`${k}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:F(n,`${k}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:F(n,`${k}-disclaimer-text`),children:e})})},th=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a}=un(),{globalClassName:u,searchConfig:l,enableEscalationToAgent:d}=ot(),f=H.useRef(null),p=t||!s&&!a,m=y=>{var v;y.preventDefault();const x=(((v=f.current)==null?void 0:v.value)||"").trim();x&&(f.current.value="",r(x))},T=()=>{r("Can you connect me to a human?")};return _.jsxs("div",{className:F(u,e,`cim-${n}-component`,`${k}-search-bar-wrapper`),children:[_.jsxs("form",{className:F(u,e,`cim-${n}-component`,`${k}-search-bar`),name:`${k}-search-form`,onSubmit:m,children:[_.jsx("input",{className:F(u,e,`cim-${n}-component`,`${k}-search-input`),type:"text",ref:f,placeholder:(l==null?void 0:l.placeholder)||"Ask us anything",name:`${k}-user-input`,disabled:p}),_.jsx(PN,{className:e,globalClassName:u,searchConfig:l,componentType:n,isLoading:p}),d&&_.jsx(er,{className:F(u,`${k}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:p,onClick:T,icon:_.jsx(bN,{})})]}),_.jsx(e6,{})]})};function t6(e){return rt({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 n6(e){return rt({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const Ry=H.createContext({isOpen:!1}),nh=H.createContext(null),Ly=H.createContext(null),qs=()=>{var n,r;const e=H.useContext(nh),t=H.useContext(Ly);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Dy=({onClearChat:e,componentType:t})=>{const n=qs(),r=()=>{e(),n()};return _.jsxs("button",{className:F(`${k}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(n6,{}),"Clear chat"]})},My=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=ot(),r=qs(),[s,a]=H.useState(!1),u=()=>He(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(l){n==null||n.error("Error downloading transcript:",l)}finally{a(!1)}}});return _.jsxs("button",{className:F(`${k}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[_.jsx(t6,{}),"Download transcript"]})};function r6(e){return e==null?[]:Array.isArray(e)?e:[e]}var i6=(e,...t)=>e.concat(t),s6=(e,...t)=>e.filter(n=>!t.includes(n)),o6=e=>Array.from(new Set(e));function Fy(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?s?l:0:a>=u?s?0:t>u?u:t:a}function a6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return Fy(e,t,{step:-r,loop:s})}var u6=e=>Array.isArray(e),By=e=>e!=null&&typeof e=="object",l6=e=>By(e)&&!u6(e),El=e=>typeof e=="string",Ys=e=>typeof e=="function",c6=e=>e==null,d6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f6=e=>Object.prototype.toString.call(e),Uy=Function.prototype.toString,h6=Uy.call(Object),p6=e=>{if(!By(e)||f6(e)!="[object Object]"||E6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=d6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Uy.call(n)==h6},m6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,g6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,E6=e=>m6(e)||g6(e),y6=e=>e(),T6=()=>{},rh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function b6(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:_6,max:x6}=Math,w6=e=>Number.isNaN(e),S6=e=>w6(e)?0:e,Hy=(e,t,n)=>_6(x6(S6(e),t),n);function ih(e){if(!p6(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]=ih(s))}return n}function sh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function v6(e,t){if(e==null)throw new Error(t())}function A6(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 N6=Object.defineProperty,C6=(e,t,n)=>t in e?N6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oh=(e,t,n)=>C6(e,typeof t!="symbol"?t+"":t,n),jy=()=>{},yl=e=>typeof e=="object"&&e!==null,Ws=e=>e?"":void 0,zy=e=>e?"true":void 0,k6=1,O6=9,I6=11,Bt=e=>yl(e)&&e.nodeType===k6&&typeof e.nodeName=="string",Tl=e=>yl(e)&&e.nodeType===O6,P6=e=>yl(e)&&e===e.window,$y=e=>Bt(e)?e.localName||"":"#document";function R6(e){return["html","body","#document"].includes($y(e))}var L6=e=>yl(e)&&e.nodeType!==void 0,es=e=>L6(e)&&e.nodeType===I6&&"host"in e,D6=e=>Bt(e)&&e.localName==="input",M6=e=>Bt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ta(e){if(!e)return!1;const t=e.getRootNode();return Ks(t)===e}var F6=/(textarea|select)/;function B6(e){if(e==null||!Bt(e))return!1;try{return D6(e)&&e.selectionStart!=null||F6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Gs(e,t){var r;if(!e||!t||!Bt(e)||!Bt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&es(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function xr(e){var t;return Tl(e)?e:P6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function U6(e){return xr(e).documentElement}function Xs(e){var t,n,r;return es(e)?Xs(e.host):Tl(e)?(t=e.defaultView)!=null?t:window:Bt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Ks(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function H6(e){if($y(e)==="html")return e;const t=e.assignedSlot||e.parentNode||es(e)&&e.host||U6(e);return es(t)?t.host:t}function ah(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Tl(t)||es(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var uh=new WeakMap;function Qs(e){return uh.has(e)||uh.set(e,Xs(e).getComputedStyle(e)),uh.get(e)}var lh=new Set(["menu","listbox","dialog","grid","tree","region"]),j6=e=>lh.has(e),Vy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function qy(e,t){const n=new Set,r=ah(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Vy(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(m&&j6(m)&&!T&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function Yy(e,t){const n=ah(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Vy(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";m&&lh.has(m)&&!T&&(t(p),s(p))}}}};s(e)}function z6(e){const t=new Set;return Yy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function $6(e){const t=e.getAttribute("role");return!!(t&&lh.has(t))}function V6(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function q6(e){var t;return V6(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function Y6(e){if(!e.id)return!1;const t=ah(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&$6(e))}var ch=()=>typeof document!="undefined";function W6(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var dh=e=>ch()&&e.test(W6()),G6=e=>ch()&&e.test(navigator.vendor),Wy=()=>ch()&&!!navigator.maxTouchPoints,X6=()=>dh(/^iPhone/i),K6=()=>dh(/^iPad/i)||fh()&&navigator.maxTouchPoints>1,bl=()=>X6()||K6(),Q6=()=>fh()||bl(),fh=()=>dh(/^Mac/i),J6=()=>Q6()&&G6(/apple/i);function Z6(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 rr(e){var n;const t=Z6(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Gy=e=>e.button===0,e4=e=>e.button===2||fh()&&e.ctrlKey&&e.button===0,t4=e=>"touches"in e&&e.touches.length>0,n4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Xy={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function r4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=n4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in Xy&&(s=Xy[s]),s}function Ky(e,t="client"){const n=t4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Ut=(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)}},Qy=e=>Bt(e)&&e.tagName==="IFRAME",i4=/^(audio|video|details)$/;function Jy(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var s4=e=>!Number.isNaN(Jy(e)),o4=e=>Jy(e)<0;function a4(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function Zy(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let l=0;for(;l<s.length;){const d=s[l++];if(!d||a.has(d))continue;a.add(d);const f=a4(d,t);if(f){const p=Array.from(f.querySelectorAll(_l)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,x)=>{u.set(y,T+x)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,T+x)})}s.push(...p)}}return r}var _l="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",eT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(_l));(n==!0||n=="if-empty"&&s.length===0)&&Bt(e)&&wr(e)&&s.unshift(e);const u=[];for(const l of s)if(wr(l)){if(Qy(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...eT(d,{getShadowRoot:r}));continue}u.push(l)}return r?Zy(u,r,wr):u};function wr(e){return!Bt(e)||e.closest("[inert]")?!1:e.matches(_l)&&M6(e)}function Js(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(_l));n&&ts(e)&&s.unshift(e);const a=[];for(const u of s)if(ts(u)){if(Qy(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...Js(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Zy(a,r,ts);return!u.length&&n?s:u}return!a.length&&n?s:a}function ts(e){return Bt(e)&&e.tabIndex>0?!0:wr(e)&&!o4(e)}function u4(e,t={}){const n=Js(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function l4(e,t={}){const{current:n,getShadowRoot:r}=t,s=Js(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Ks(a);if(!u)return null;const l=s.indexOf(u);return s[l+1]||null}function ba(e){return e.tabIndex<0&&(i4.test(e.localName)||B6(e))&&!s4(e)?0:e.tabIndex}function tT(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=Js(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var c4=class r2{constructor(){oh(this,"id",null),oh(this,"fn_cleanup"),oh(this,"cleanup",()=>{this.cancel()})}static create(){return new r2}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 Pt(e){const t=c4.create();return t.request(e),t.cleanup}function nT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function hh(e){const t=H6(e);return R6(t)?xr(t).body:Bt(t)&&h4(t)?t:hh(t)}var d4=/auto|scroll|overlay|hidden|clip/,f4=new Set(["inline","contents"]);function h4(e){const t=Xs(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return d4.test(n+s+r)&&!f4.has(a)}var Zs="default",ph="",xl=new WeakMap;function p4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return bl()?(Zs==="default"&&(ph=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),Zs="disabled"):t&&(xl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>m4({target:t,doc:r})}function m4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(bl()){if(Zs!=="disabled")return;Zs="restoring",setTimeout(()=>{nT(()=>{Zs==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=ph||""),ph="",Zs="default")})},300)}else if(t&&xl.has(t)){const a=xl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),xl.delete(t)}}function g4(e={}){const u=e,{defer:t,target:n}=u,r=hn(u,["defer","target"]),s=t?Pt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(p4(ae(U({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function E4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=Ky(l),f=Math.sqrt(ad(d.x,2)+ad(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=Ky(l);r({point:d,event:l})},u=[Ut(e,"pointermove",s,!1),Ut(e,"pointerup",a,!1),Ut(e,"pointercancel",a,!1),Ut(e,"contextmenu",a,!1),g4({doc:e})];return()=>{u.forEach(l=>l())}}function y4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,l=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=u4(e,{includeContainer:!0,getShadowRoot:a}),y=l4(l,{current:n,getShadowRoot:a}),x=!m&&!T;f.shiftKey&&Ta(y)?(s==null||s(),p=T):f.shiftKey&&(Ta(m)||x)?p=n:!f.shiftKey&&Ta(n)?(s==null||s(),p=m):!f.shiftKey&&(Ta(T)||x)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Ut(u,"keydown",d,!0)}function T4(e,t){const l=t,{defer:n,triggerElement:r}=l,s=hn(l,["defer","triggerElement"]),a=n?Pt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(y4(d,U({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function b4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function wl(e,t){if(!e)return jy;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function _4(e,t,n){if(!e)return jy;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function x4(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 w4(e,t){const{timeout:n,rootNode:r}=t,s=Xs(r),a=xr(r),u=new s.AbortController;return x4(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 S4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),v4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,rT=e=>{const t={};let n;for(;n=v4.exec(e);)t[n[1]]=n[2];return t},A4=(e,t)=>{if(El(e)){if(El(t))return`${e};${t}`;e=rT(e)}else El(t)&&(t=rT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Rt(...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]=rh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=S4(t[s],n[s]);continue}if(s==="style"){t[s]=A4(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 LB(e){return e}var eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(eo||{}),mh="__init__";function N4(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>xr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>Ks(t()),a=u=>t().getElementById(u);return ae(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Ta,getById:a})}function C4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var to=()=>e=>Array.from(new Set(e)),iT=typeof globalThis.document!="undefined"?H.useLayoutEffect:H.useEffect;function Sl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=H.useState(t),[s,a]=H.useState(r),u=e().value!==void 0,l=H.useRef(s);l.current=u?e().value:s;const d=H.useRef(l.current);iT(()=>{d.current=l.current},[s,e().value]);const f=y=>{var A,S;const x=d.current,v=Ys(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:x}),u||a(v),n(v,x)||(S=(A=e()).onChange)==null||S.call(A,v,x)};function p(){return u?e().value:s}return{initial:r,ref:l,get:p,set(y){(e().sync?Ds.flushSync:y6)(()=>f(y))},invoke(y,x){var v,A;(A=(v=e()).onChange)==null||A.call(v,y,x)},hash(y){var x,v,A;return(A=(v=(x=e()).hash)==null?void 0:v.call(x,y))!=null?A:String(y)}}}Sl.cleanup=e=>{H.useEffect(()=>e,[])},Sl.ref=e=>{const t=H.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function k4(e){const t=H.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var O4=(e,t)=>{const n=H.useRef(!1),r=H.useRef(!1);H.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),H.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function vl(e,t={}){var se,te,xe,fe,ce,he;const n=H.useMemo(()=>{const{id:le,ids:Q,getRootNode:ue}=t;return N4({id:le,ids:Q,getRootNode:ue})},[t]),r=(...le)=>{e.debug&&console.log(...le)},s=(te=(se=e.props)==null?void 0:se.call(e,{props:ih(t),scope:n}))!=null?te:t,a=I4(s),u=(xe=e.context)==null?void 0:xe.call(e,{prop:a,bindable:Sl,scope:n,flush:oT,getContext(){return d},getComputed(){return W},getRefs(){return v},getEvent(){return y()}}),l=sT(u),d={get(le){var Q;return(Q=l.current)==null?void 0:Q[le].ref.current},set(le,Q){var ue;(ue=l.current)==null||ue[le].set(Q)},initial(le){var Q;return(Q=l.current)==null?void 0:Q[le].initial},hash(le){var ue,N;const Q=(ue=l.current)==null?void 0:ue[le].get();return(N=l.current)==null?void 0:N[le].hash(Q)}},f=H.useRef(new Map),p=H.useRef(null),m=H.useRef(null),T=H.useRef({type:""}),y=()=>ae(U({},T.current),{current(){return T.current},previous(){return m.current}}),x=()=>ae(U({},D),{matches(...le){return le.includes(D.ref.current)},hasTag(le){var Q,ue;return!!((ue=(Q=e.states[D.ref.current])==null?void 0:Q.tags)!=null&&ue.includes(le))}}),v=k4((ce=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:d}))!=null?ce:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:$,action:S,guard:C,track:O4,refs:v,computed:W,flush:oT,scope:n,choose:j}),S=le=>{const Q=Ys(le)?le(A()):le;if(!Q)return;const ue=Q.map(N=>{var Y,O;const R=(O=(Y=e.implementations)==null?void 0:Y.actions)==null?void 0:O[N];return R||sh(`[zag-js] No implementation found for action "${JSON.stringify(N)}"`),R});for(const N of ue)N==null||N(A())},C=le=>{var Q,ue;return Ys(le)?le(A()):(ue=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:ue[le](A())},P=le=>{const Q=Ys(le)?le(A()):le;if(!Q)return;const ue=Q.map(R=>{var O,ge;const Y=(ge=(O=e.implementations)==null?void 0:O.effects)==null?void 0:ge[R];return Y||sh(`[zag-js] No implementation found for effect "${JSON.stringify(R)}"`),Y}),N=[];for(const R of ue){const Y=R==null?void 0:R(A());Y&&N.push(Y)}return()=>N.forEach(R=>R==null?void 0:R())},j=le=>r6(le).find(Q=>{let ue=!Q.guard;return El(Q.guard)?ue=!!C(Q.guard):Ys(Q.guard)&&(ue=Q.guard(A())),ue}),W=le=>{v6(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[le];return Q({context:d,event:y(),prop:a,refs:v,scope:n,computed:W})},D=Sl(()=>({defaultValue:e.initialState({prop:a}),onChange(le,Q){var N,R,Y,O;if(Q){const ge=f.current.get(Q);ge==null||ge(),f.current.delete(Q)}Q&&S((N=e.states[Q])==null?void 0:N.exit),S((R=p.current)==null?void 0:R.actions);const ue=P((Y=e.states[le])==null?void 0:Y.effects);if(ue&&f.current.set(le,ue),Q===mh){S(e.entry);const ge=P(e.effects);ge&&f.current.set(mh,ge)}S((O=e.states[le])==null?void 0:O.entry)}})),K=H.useRef(void 0),ne=H.useRef(eo.NotStarted);iT(()=>{queueMicrotask(()=>{var R;const ue=ne.current===eo.Started;ne.current=eo.Started,r(ue?"rehydrating...":"initializing...");const N=(R=K.current)!=null?R:D.initial;D.invoke(N,ue?D.get():mh)});const le=f.current,Q=D.ref.current;return()=>{r("unmounting..."),K.current=Q,ne.current=eo.Stopped,le.forEach(ue=>ue==null?void 0:ue()),f.current=new Map,p.current=null,queueMicrotask(()=>{S(e.exit)})}},[]);const de=()=>"ref"in D?D.ref.current:D.get(),$=le=>{queueMicrotask(()=>{var O,ge,Re,we,re;if(ne.current!==eo.Started)return;m.current=T.current,T.current=le;let Q=de();const ue=(Re=(O=e.states[Q].on)==null?void 0:O[le.type])!=null?Re:(ge=e.on)==null?void 0:ge[le.type],N=j(ue);if(!N)return;p.current=N;const R=(we=N.target)!=null?we:Q;r("transition",le.type,N.target||Q,`(${N.actions})`);const Y=R!==Q;Y?Ds.flushSync(()=>D.set(R)):N.reenter&&!Y?D.invoke(Q,Q):S((re=N.actions)!=null?re:[])})};return(he=e.watch)==null||he.call(e,A()),{state:x(),send:$,context:d,prop:a,scope:n,refs:v,computed:W,event:y(),getStatus:()=>ne.current}}function sT(e){const t=H.useRef(e);return t.current=e,t}function I4(e){const t=sT(e);return function(r){return t.current[r]}}function oT(e){queueMicrotask(()=>{Ds.flushSync(()=>e())})}var gh=C4(e=>e);function Al(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function P4(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 Eh=e=>{const t=H.memo(H.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=hn(f,["asChild","children"]);if(!s)return H.createElement(e,ae(U({},u),{ref:r}),a);if(!H.isValidElement(a))return null;const l=H.Children.only(a),d=P4(l);return H.cloneElement(l,ae(U({},Rt(u,l.props)),{ref:r?Al(r,d):d}))}));return t.displayName=e.displayName||e.name,t},tn=(()=>{const e=new Map;return new Proxy(Eh,{apply(t,n,r){return Eh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Eh(r)),e.get(r)}})})();function R4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ns(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=H.createContext(u);l.displayName=t;function d(){var p;const f=H.useContext(l);if(!f&&n){const m=new Error(a!=null?a:R4(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[L4,yh]=ns({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[aT,_a]=ns({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),uT=H.forwardRef((e,t)=>{const n=yh(),r=_a(),s=Rt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(tn.div,ae(U({},s),{ref:Al(r.ref,t)}))});uT.displayName="PopoverContent";const lT=H.forwardRef((e,t)=>{const n=yh(),r=_a(),s=Rt(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(tn.div,ae(U({},s),{ref:t}))});lT.displayName="PopoverPositioner";const xa=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},U({},e)]),cT=e=>xa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function D4(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 M4={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",Qs(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"});Pt(()=>{var l,d;const u=Nl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((l=t.get("styles"))==null?void 0:l.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Pt(()=>{e.set("prevAnimationName",Nl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===s&&e.set("prevAnimationName",Nl(t.get("styles")))},u=d=>{const f=Nl(t.get("styles"));rr(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const l=wl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),nT(()=>l())}}}}};function Nl(e){return(e==null?void 0:e.animationName)||"none"}to()(["onExitComplete","present","immediate"]);function F4(e,t={}){const{sync:n=!1}=t,r=B4(e);return H.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function B4(e){const t=H.useRef(e);return t.current=e,t}const Th=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=T,a=hn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=H.useRef(!1),l=ae(U({},a),{present:r,onExitComplete:F4(e.onExitComplete)}),d=vl(M4,l),f=D4(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var rs=(e,t=[])=>({parts:(...n)=>{if(U4(t))return rs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>rs(e,[...t,...n]),omit:(...n)=>rs(e,t.filter(r=>!n.includes(r))),rename:n=>rs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${no(e)}"][data-part="${no(r)}"]`,`& [data-scope="${no(e)}"][data-part="${no(r)}"]`].join(", "),attrs:{"data-scope":no(e),"data-part":no(r)}}}),{})}),no=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),U4=e=>e.length===0;const H4=["top","right","bottom","left"],di=Math.min,Ur=Math.max,Cl=Math.round,kl=Math.floor,Sr=e=>({x:e,y:e}),j4={left:"right",right:"left",bottom:"top",top:"bottom"};function dT(e,t,n){return Ur(e,di(t,n))}function Hr(e,t){return typeof e=="function"?e(t):e}function fi(e){return e.split("-")[0]}function ro(e){return e.split("-")[1]}function bh(e){return e==="x"?"y":"x"}function _h(e){return e==="y"?"height":"width"}function vr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function xh(e){return bh(vr(e))}function z4(e,t,n){n===void 0&&(n=!1);const r=ro(e),s=xh(e),a=_h(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Ol(u)),[u,Ol(u)]}function $4(e){const t=Ol(e);return[wh(e),t,wh(t)]}function wh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const fT=["left","right"],hT=["right","left"],V4=["top","bottom"],q4=["bottom","top"];function Y4(e,t,n){switch(e){case"top":case"bottom":return n?t?hT:fT:t?fT:hT;case"left":case"right":return t?V4:q4;default:return[]}}function W4(e,t,n,r){const s=ro(e);let a=Y4(fi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(wh)))),a}function Ol(e){const t=fi(e);return j4[t]+e.slice(t.length)}function G4(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function pT(e){return typeof e!="number"?G4(e):{top:e,right:e,bottom:e,left:e}}function Il(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function mT(e,t,n){let{reference:r,floating:s}=e;const a=vr(t),u=xh(t),l=_h(u),d=fi(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,T=r[l]/2-s[l]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const x=ro(t);return x&&(y[u]+=T*(x==="end"?1:-1)*(n&&f?-1:1)),y}function X4(e,t){return He(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=Hr(t,e),x=pT(y),A=l[T?m==="floating"?"reference":"floating":m],S=Il(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),C=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,P=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),j=(yield a.isElement==null?void 0:a.isElement(P))&&(yield a.getScale==null?void 0:a.getScale(P))||{x:1,y:1},W=Il(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:C,offsetParent:P,strategy:d}):C);return{top:(S.top-W.top+x.top)/j.y,bottom:(W.bottom-S.bottom+x.bottom)/j.y,left:(S.left-W.left+x.left)/j.x,right:(W.right-S.right+x.right)/j.x}})}const K4=50,Q4=(e,t,n)=>He(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:ae(U({},u),{detectOverflow:X4}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=mT(f,r,d),T=r,y=0;const x={};for(let v=0;v<a.length;v++){const A=a[v];if(!A)continue;const{name:S,fn:C}=A,{x:P,y:j,data:W,reset:D}=yield C({x:p,y:m,initialPlacement:r,placement:T,strategy:s,middlewareData:x,rects:f,platform:l,elements:{reference:e,floating:t}});p=P!=null?P:p,m=j!=null?j:m,x[S]=U(U({},x[S]),W),D&&y<K4&&(y++,typeof D=="object"&&(D.placement&&(T=D.placement),D.rects&&(f=D.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:p,y:m}=mT(f,T,d)),v=-1)}return{x:p,y:m,placement:T,strategy:s,middlewareData:x}}),J4=e=>({name:"arrow",options:e,fn(n){return He(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=Hr(e,n)||{};if(p==null)return{};const T=pT(m),y={x:r,y:s},x=xh(a),v=_h(x),A=yield l.getDimensions(p),S=x==="y",C=S?"top":"left",P=S?"bottom":"right",j=S?"clientHeight":"clientWidth",W=u.reference[v]+u.reference[x]-y[x]-u.floating[v],D=y[x]-u.reference[x],K=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ne=K?K[j]:0;(!ne||!(yield l.isElement==null?void 0:l.isElement(K)))&&(ne=d.floating[j]||u.floating[v]);const de=W/2-D/2,$=ne/2-A[v]/2-1,se=di(T[C],$),te=di(T[P],$),xe=ne-A[v]-te,fe=ne/2-A[v]/2+de,ce=dT(se,fe,xe),he=!f.arrow&&ro(a)!=null&&fe!==ce&&u.reference[v]/2-(fe<se?se:te)-A[v]/2<0,le=he?fe<se?fe-se:fe-xe:0;return{[x]:y[x]+le,data:U({[x]:ce,centerOffset:fe-ce-le},he&&{alignmentOffset:le}),reset:he}})}}),Z4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return He(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,ce=Hr(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:A=!0}=ce,S=hn(ce,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=fi(a),P=vr(d),j=fi(d)===d,W=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||(j||!A?[Ol(d)]:$4(d)),K=v!=="none";!y&&K&&D.push(...W4(d,A,v,W));const ne=[d,...D],de=yield f.detectOverflow(n,S),$=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&$.push(de[C]),T){const he=z4(a,l,W);$.push(de[he[0]],de[he[1]])}if(se=[...se,{placement:a,overflows:$}],!$.every(he=>he<=0)){var te,xe;const he=(((te=u.flip)==null?void 0:te.index)||0)+1,le=ne[he];if(le&&(!(T==="alignment"?P!==vr(le):!1)||se.every(N=>vr(N.placement)===P?N.overflows[0]>0:!0)))return{data:{index:he,overflows:se},reset:{placement:le}};let Q=(xe=se.filter(ue=>ue.overflows[0]<=0).sort((ue,N)=>ue.overflows[1]-N.overflows[1])[0])==null?void 0:xe.placement;if(!Q)switch(x){case"bestFit":{var fe;const ue=(fe=se.filter(N=>{if(K){const R=vr(N.placement);return R===P||R==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(R=>R>0).reduce((R,Y)=>R+Y,0)]).sort((N,R)=>N[1]-R[1])[0])==null?void 0:fe[0];ue&&(Q=ue);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function gT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ET(e){return H4.some(t=>e[t]>=0)}const eL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return He(this,null,function*(){const{rects:r,platform:s}=n,l=Hr(e,n),{strategy:a="referenceHidden"}=l,u=hn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,ae(U({},u),{elementContext:"reference"})),f=gT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:ET(f)}}}case"escaped":{const d=yield s.detectOverflow(n,ae(U({},u),{altBoundary:!0})),f=gT(d,r.floating);return{data:{escapedOffsets:f,escaped:ET(f)}}}default:return{}}})}}},yT=new Set(["left","top"]);function tL(e,t){return He(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=fi(n),l=ro(n),d=vr(n)==="y",f=yT.has(u)?-1:1,p=a&&d?-1:1,m=Hr(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof x=="number"&&(y=l==="end"?x*-1:x),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const nL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return He(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield tL(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})}})}}},rL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return He(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,P=Hr(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:j=>{let{x:W,y:D}=j;return{x:W,y:D}}}}=P,p=hn(P,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},T=yield u.detectOverflow(n,p),y=vr(a),x=bh(y);let v=m[x],A=m[y];const S=(j,W)=>dT(W+T[j==="y"?"top":"left"],W,W-T[j==="y"?"bottom":"right"]);l&&(v=S(x,v)),d&&(A=S(y,A));const C=f.fn(ae(U({},n),{[x]:v,[y]:A}));return ae(U({},C),{data:{x:C.x-r,y:C.y-s,enabled:{[x]:l,[y]:d}}})})}}},iL=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}=Hr(e,t),T={x:s,y:a},y=vr(u),x=bh(y);let v=T[x],A=T[y];const S=Hr(f,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:(n=S.mainAxis)!=null?n:0,crossAxis:(r=S.crossAxis)!=null?r:0};if(p){const W=x==="y"?"height":"width",D=l.reference[x]-l.floating[W]+C.mainAxis,K=l.reference[x]+l.reference[W]-C.mainAxis;v<D?v=D:v>K&&(v=K)}if(m){var P,j;const W=x==="y"?"width":"height",D=yT.has(fi(u)),K=l.reference[y]-l.floating[W]+(D&&((P=d.offset)==null?void 0:P[y])||0)+(D?0:C.crossAxis),ne=l.reference[y]+l.reference[W]+(D?0:((j=d.offset)==null?void 0:j[y])||0)-(D?C.crossAxis:0);A<K?A=K:A>ne&&(A=ne)}return{[x]:v,[y]:A}}}},sL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return He(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,$=Hr(e,n),{apply:l=()=>{}}=$,d=hn($,["apply"]),f=yield a.detectOverflow(n,d),p=fi(r),m=ro(r),T=vr(r)==="y",{width:y,height:x}=s.floating;let v,A;p==="top"||p==="bottom"?(v=p,A=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(A=p,v=m==="end"?"top":"bottom");const S=x-f.top-f.bottom,C=y-f.left-f.right,P=di(x-f[v],S),j=di(y-f[A],C),W=n.middlewareData.shift,D=!W;let K=P,ne=j;W!=null&&W.enabled.x&&(ne=C),W!=null&&W.enabled.y&&(K=S),D&&!m&&(T?ne=y-2*Ur(f.left,f.right):K=x-2*Ur(f.top,f.bottom)),yield l(ae(U({},n),{availableWidth:ne,availableHeight:K}));const de=yield a.getDimensions(u.floating);return y!==de.width||x!==de.height?{reset:{rects:!0}}:{}})}}};function Pl(){return typeof window!="undefined"}function io(e){return TT(e)?(e.nodeName||"").toLowerCase():"#document"}function Pn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ar(e){var t;return(t=(TT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function TT(e){return Pl()?e instanceof Node||e instanceof Pn(e).Node:!1}function ir(e){return Pl()?e instanceof Element||e instanceof Pn(e).Element:!1}function Nr(e){return Pl()?e instanceof HTMLElement||e instanceof Pn(e).HTMLElement:!1}function bT(e){return!Pl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Pn(e).ShadowRoot}function wa(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=sr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function oL(e){return/^(table|td|th)$/.test(io(e))}function Rl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const aL=/transform|translate|scale|rotate|perspective|filter/,uL=/paint|layout|strict|content/,is=e=>!!e&&e!=="none";let Sh;function vh(e){const t=ir(e)?sr(e):e;return is(t.transform)||is(t.translate)||is(t.scale)||is(t.rotate)||is(t.perspective)||!Ah()&&(is(t.backdropFilter)||is(t.filter))||aL.test(t.willChange||"")||uL.test(t.contain||"")}function lL(e){let t=hi(e);for(;Nr(t)&&!so(t);){if(vh(t))return t;if(Rl(t))return null;t=hi(t)}return null}function Ah(){return Sh==null&&(Sh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Sh}function so(e){return/^(html|body|#document)$/.test(io(e))}function sr(e){return Pn(e).getComputedStyle(e)}function Ll(e){return ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if(io(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bT(e)&&e.host||Ar(e);return bT(t)?t.host:t}function _T(e){const t=hi(e);return so(t)?(e.ownerDocument||e).body:Nr(t)&&wa(t)?t:_T(t)}function Sa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=_T(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Pn(s);if(a){const l=Nh(u);return t.concat(u,u.visualViewport||[],wa(s)?s:[],l&&n?Sa(l):[])}else return t.concat(s,Sa(s,[],n))}function Nh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xT(e){const t=sr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Nr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=Cl(n)!==a||Cl(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function Ch(e){return ir(e)?e:e.contextElement}function oo(e){const t=Ch(e);if(!Nr(t))return Sr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=xT(t);let u=(a?Cl(n.width):n.width)/r,l=(a?Cl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const cL=Sr(0);function wT(e){const t=Pn(e);return!Ah()||!t.visualViewport?cL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pn(e)?!1:t}function ss(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Ch(e);let u=Sr(1);t&&(r?ir(r)&&(u=oo(r)):u=oo(e));const l=dL(a,n,r)?wT(a):Sr(0);let d=(s.left+l.x)/u.x,f=(s.top+l.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const T=Pn(a),y=r&&ir(r)?Pn(r):r;let x=T,v=Nh(x);for(;v&&r&&y!==x;){const A=oo(v),S=v.getBoundingClientRect(),C=sr(v),P=S.left+(v.clientLeft+parseFloat(C.paddingLeft))*A.x,j=S.top+(v.clientTop+parseFloat(C.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,m*=A.y,d+=P,f+=j,x=Pn(v),v=Nh(x)}}return Il({width:p,height:m,x:d,y:f})}function Dl(e,t){const n=Ll(e).scrollLeft;return t?t.left+n:ss(Ar(e)).left+n}function ST(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Dl(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function fL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Ar(r),l=t?Rl(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Sr(1);const p=Sr(0),m=Nr(r);if((m||!m&&!a)&&((io(r)!=="body"||wa(u))&&(d=Ll(r)),Nr(r))){const y=ss(r);f=oo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?ST(u,d):Sr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function hL(e){return Array.from(e.getClientRects())}function pL(e){const t=Ar(e),n=Ll(e),r=e.ownerDocument.body,s=Ur(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ur(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Dl(e);const l=-n.scrollTop;return sr(r).direction==="rtl"&&(u+=Ur(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const vT=25;function mL(e,t){const n=Pn(e),r=Ar(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(s){a=s.width,u=s.height;const p=Ah();(!p||p&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=Dl(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-y);x<=vT&&(a-=x)}else f<=vT&&(a+=f);return{width:a,height:u,x:l,y:d}}const gL=new Set(["absolute","fixed"]);function EL(e,t){const n=ss(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Nr(e)?oo(e):Sr(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function AT(e,t,n){let r;if(t==="viewport")r=mL(e,n);else if(t==="document")r=pL(Ar(e));else if(ir(t))r=EL(t,n);else{const s=wT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Il(r)}function NT(e,t){const n=hi(e);return n===t||!ir(n)||so(n)?!1:sr(n).position==="fixed"||NT(n,t)}function yL(e,t){const n=t.get(e);if(n)return n;let r=Sa(e,[],!1).filter(l=>ir(l)&&io(l)!=="body"),s=null;const a=sr(e).position==="fixed";let u=a?hi(e):e;for(;ir(u)&&!so(u);){const l=sr(u),d=vh(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&gL.has(s.position)||wa(u)&&!d&&NT(e,u))?r=r.filter(p=>p!==u):s=l,u=hi(u)}return t.set(e,r),r}function TL(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Rl(t)?[]:yL(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=AT(t,p,s);return f.top=Ur(m.top,f.top),f.right=di(m.right,f.right),f.bottom=di(m.bottom,f.bottom),f.left=Ur(m.left,f.left),f},AT(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function bL(e){const{width:t,height:n}=xT(e);return{width:t,height:n}}function _L(e,t,n){const r=Nr(t),s=Ar(t),a=n==="fixed",u=ss(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Sr(0);function f(){d.x=Dl(s)}if(r||!r&&!a)if((io(t)!=="body"||wa(s))&&(l=Ll(t)),r){const y=ss(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?ST(s,l):Sr(0),m=u.left+l.scrollLeft-d.x-p.x,T=u.top+l.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function kh(e){return sr(e).position==="static"}function CT(e,t){if(!Nr(e)||sr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ar(e)===n&&(n=n.ownerDocument.body),n}function kT(e,t){const n=Pn(e);if(Rl(e))return n;if(!Nr(e)){let s=hi(e);for(;s&&!so(s);){if(ir(s)&&!kh(s))return s;s=hi(s)}return n}let r=CT(e,t);for(;r&&oL(r)&&kh(r);)r=CT(r,t);return r&&so(r)&&kh(r)&&!vh(r)?n:r||lL(e)||n}const xL=function(e){return He(this,null,function*(){const t=this.getOffsetParent||kT,n=this.getDimensions,r=yield n(e.floating);return{reference:_L(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function wL(e){return sr(e).direction==="rtl"}const SL={convertOffsetParentRelativeRectToViewportRelativeRect:fL,getDocumentElement:Ar,getClippingRect:TL,getOffsetParent:kT,getElementRects:xL,getClientRects:hL,getDimensions:bL,getScale:oo,isElement:ir,isRTL:wL};function OT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vL(e,t){let n=null,r;const s=Ar(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function u(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(l||t(),!T||!y)return;const x=kl(m),v=kl(s.clientWidth-(p+T)),A=kl(s.clientHeight-(m+y)),S=kl(p),P={rootMargin:-x+"px "+-v+"px "+-A+"px "+-S+"px",threshold:Ur(0,di(1,d))||1};let j=!0;function W(D){const K=D[0].intersectionRatio;if(K!==d){if(!j)return u();K?u(!1,K):r=setTimeout(()=>{u(!1,1e-7)},1e3)}K===1&&!OT(f,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(W,ae(U({},P),{root:s.ownerDocument}))}catch(D){n=new IntersectionObserver(W,P)}n.observe(e)}return u(!0),a}function AL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Ch(e),p=s||a?[...f?Sa(f):[],...Sa(t)]:[];p.forEach(S=>{s&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const m=f&&l?vL(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(S=>{let[C]=S;C&&C.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var P;(P=y)==null||P.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let x,v=d?ss(e):null;d&&A();function A(){const S=ss(e);v&&!OT(v,S)&&n(),v=S,x=requestAnimationFrame(A)}return n(),()=>{var S;p.forEach(C=>{s&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),m==null||m(),(S=y)==null||S.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const NL=nL,CL=rL,kL=Z4,OL=sL,IL=eL,PL=J4,RL=iL,LL=(e,t,n)=>{const r=new Map,s=U({platform:SL},n),a=ae(U({},s.platform),{_c:r});return Q4(e,t,ae(U({},s),{platform:a}))};function IT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return ae(U({},s),{toJSON:()=>s})}function DL(e){if(!e)return IT();const{x:t,y:n,width:r,height:s}=e;return IT(t,n,r,s)}function ML(e,t){return{contextElement:Bt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?DL(r):n.getBoundingClientRect()}}}var va=e=>({variable:e,reference:`var(${e})`}),jr={arrowSize:va("--arrow-size"),arrowSizeHalf:va("--arrow-size-half"),arrowBg:va("--arrow-background"),transformOrigin:va("--transform-origin"),arrowOffset:va("--arrow-offset")},FL=e=>e==="top"||e==="bottom"?"y":"x";function BL(e,t){return{name:"transformOrigin",fn(n){var de,$,se,te,xe;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=FL(d),p=((de=s.arrow)==null?void 0:de.x)||0,m=(($=s.arrow)==null?void 0:$.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+T/2,v=m+y/2,A=Math.abs(((se=s.shift)==null?void 0:se.y)||0),S=u.reference.height/2,C=y/2,P=(xe=(te=e.offset)==null?void 0:te.mainAxis)!=null?xe:e.gutter,j=typeof P=="number"?P+C:P!=null?P:C,W=A>j,D={top:`${x}px calc(100% + ${j}px)`,bottom:`${x}px ${-j}px`,left:`calc(100% + ${j}px) ${v}px`,right:`${-j}px ${v}px`}[d],K=`${x}px ${u.reference.y+S-l}px`,ne=!!e.overlap&&f==="y"&&W;return r.floating.style.setProperty(jr.transformOrigin.variable,ne?K:D),{data:{transformOrigin:ne?K:D}}}}}var UL={name:"rects",fn({rects:e}){return{data:e}}},HL=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 jL(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var zL={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function PT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Oh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function $L(e,t,n){const r=e||t.createElement("div");return PL({element:r,padding:n.arrowPadding})}function VL(e,t){var n;if(!c6((n=t.offset)!=null?n:t.gutter))return NL(({placement:r})=>{var p,m,T,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:l}=jL(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return ih({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function qL(e){if(!e.flip)return;const t=Oh(e.boundary);return kL(ae(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function YL(e){if(!e.slide&&!e.overlap)return;const t=Oh(e.boundary);return CL(ae(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:RL()}))}function WL(e){return OL({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 GL(e){var t;if(e.hideWhenDetached)return IL({strategy:"referenceHidden",boundary:(t=Oh(e.boundary))!=null?t:"clippingAncestors"})}function XL(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function KL(e,t,n={}){const r=ML(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},zL,n),a=t.querySelector("[data-part=arrow]"),u=[VL(a,s),qL(s),YL(s),$L(a,t.ownerDocument,s),HL(a),BL({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),WL(s),GL(s),UL],{placement:l,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>He(null,null,function*(){var j;if(!r||!t)return;const v=yield LL(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),p==null||p({placed:!0});const A=Xs(t),S=PT(A,v.x),C=PT(A,v.y);t.style.setProperty("--x",`${S}px`),t.style.setProperty("--y",`${C}px`),s.hideWhenDetached&&(((j=v.middlewareData.hide)==null?void 0:j.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const P=t.firstElementChild;if(P){const W=Qs(P);t.style.setProperty("--z-index",W.zIndex)}}),T=()=>He(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=XL(s.listeners),x=s.listeners?AL(r,t,T,y):T6;return T(),()=>{x==null||x(),p==null||p({placed:!1})}}function RT(e,t,n={}){const l=n,{defer:r}=l,s=hn(l,["defer"]),a=r?Pt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(KL(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var QL={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function JL(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?QL[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 ao=new WeakMap,Ml=new WeakMap,Fl={},Ih=0,LT=e=>e&&(e.host||LT(e.parentNode)),ZL=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=LT(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),e5=new Set(["script","output","status","next-route-announcer"]),t5=e=>e5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),n5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=ZL(n,Array.isArray(e)?e:[e]);Fl[r]||(Fl[r]=new WeakMap);const l=Fl[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Bt(y)&&Yy(y,x=>{m(x)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(f.has(x))T(x);else try{if(t5(x))return;const A=x.getAttribute(s)==="true",S=(ao.get(x)||0)+1,C=(l.get(x)||0)+1;ao.set(x,S),l.set(x,C),d.push(x),S===1&&A&&Ml.set(x,!0),C===1&&x.setAttribute(r,""),A||x.setAttribute(s,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",x,v)}})};return T(n),f.clear(),Ih++,()=>{d.forEach(y=>{const x=ao.get(y)-1,v=l.get(y)-1;ao.set(y,x),l.set(y,v),x||(Ml.has(y)||y.removeAttribute(s),Ml.delete(y)),v||y.removeAttribute(r)}),Ih--,Ih||(ao=new WeakMap,ao=new WeakMap,Ml=new WeakMap,Fl={})}},r5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,i5=(e,t=r5(e),n="data-aria-hidden",r=!0)=>{if(t)return n5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},s5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function DT(e,t={}){const{defer:n=!0}=t,r=n?s5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(i5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function o5(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 a5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var MT="pointerdown.outside",FT="focus.outside";function u5(e){for(const t of e)if(Bt(t)&&wr(t))return!0;return!1}var BT=e=>"clientY"in e;function l5(e,t){if(!BT(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function c5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function UT(e,t){if(!t||!BT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},l={x:e.clientX,y:e.clientY};return c5(u,l)?r||a:!1}function d5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=xr(e),f=Xs(e),p=o5(f),m=a5(f);function T(P,j){if(!Bt(j)||!j.isConnected||Gs(e,j)||l5(e,P)||l&&qy(e,j))return!1;const W=d.querySelector(`[aria-controls="${e.id}"]`);if(W){const K=hh(W);if(UT(P,K))return!1}const D=hh(e);return UT(P,D)?!1:!(n!=null&&n(j))}const y=new Set,x=es(e==null?void 0:e.getRootNode());function v(P){function j(W){var de,$;const D=u&&!Wy()?Pt:se=>se(),K=W!=null?W:P,ne=($=(de=K==null?void 0:K.composedPath)==null?void 0:de.call(K))!=null?$:[K==null?void 0:K.target];D(()=>{const se=x?ne[0]:rr(P);if(!(!e||!T(P,se))){if(s||a){const te=rh(s,a);e.addEventListener(MT,te,{once:!0})}HT(e,MT,{bubbles:!1,cancelable:!0,detail:{originalEvent:K,contextmenu:e4(K),focusable:u5(ne),target:se}})}})}P.pointerType==="touch"?(y.forEach(W=>W()),y.add(Ut(d,"click",j,{once:!0})),y.add(m.addEventListener("click",j,{once:!0})),y.add(p.addEventListener("click",j,{once:!0}))):j()}const A=new Set,S=setTimeout(()=>{A.add(Ut(d,"pointerdown",v,!0)),A.add(m.addEventListener("pointerdown",v,!0)),A.add(p.addEventListener("pointerdown",v,!0))},0);function C(P){(u?Pt:W=>W())(()=>{var K,ne;const W=(ne=(K=P==null?void 0:P.composedPath)==null?void 0:K.call(P))!=null?ne:[P==null?void 0:P.target],D=x?W[0]:rr(P);if(!(!e||!T(P,D))){if(r||a){const de=rh(r,a);e.addEventListener(FT,de,{once:!0})}HT(e,FT,{bubbles:!1,cancelable:!0,detail:{originalEvent:P,contextmenu:!1,focusable:wr(D),target:D}})}})}return Wy()||(A.add(Ut(d,"focusin",C,!0)),A.add(m.addEventListener("focusin",C,!0)),A.add(p.addEventListener("focusin",C,!0))),()=>{clearTimeout(S),y.forEach(P=>P()),A.forEach(P=>P())}}function f5(e,t){const{defer:n}=t,r=n?Pt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(d5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function HT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function h5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Ut(xr(e),"keydown",n,{capture:!0})}var jT="layer:request-dismiss",zn={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Gs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Gs(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>zn.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];m5(e,jT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),p5(e,jT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function p5(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 m5(e,t,n){e.addEventListener(t,n,{once:!0})}var zT;function $T(){zn.layers.forEach(({node:e})=>{e.style.pointerEvents=zn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function g5(e){e.style.pointerEvents=""}function E5(e,t){const n=xr(e),r=[];return zn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(zT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=w4(()=>{const l=s();return Bt(l)?l:null},{timeout:1e3});a.then(l=>r.push(wl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{zn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=zT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function y5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){sh("[@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};zn.add(f),$T();function p(v){var S,C;const A=rr(v.detail.originalEvent);zn.isBelowPointerBlockingLayer(e)||zn.isInBranch(A)||((S=t.onPointerDownOutside)==null||S.call(t,v),(C=t.onInteractOutside)==null||C.call(t,v),!v.defaultPrevented&&(l&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function m(v){var S,C;const A=rr(v.detail.originalEvent);zn.isInBranch(A)||((S=t.onFocusOutside)==null||S.call(t,v),(C=t.onInteractOutside)==null||C.call(t,v),!v.defaultPrevented&&(l&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function T(v){var A;zn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var P;if(!e)return!1;const A=typeof u=="function"?u():u,S=Array.isArray(A)?A:[A],C=(P=t.persistentElements)==null?void 0:P.map(j=>j()).filter(Bt);return C&&S.push(...C),S.some(j=>Gs(j,v))||zn.isInNestedLayer(e,v)}const x=[a?E5(e,t.persistentElements):void 0,h5(e,T),f5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{zn.remove(e),$T(),g5(e),x.forEach(v=>v==null?void 0:v())}}function VT(e,t){const{defer:n}=t,r=n?Pt:a=>a(),s=[];return s.push(r(()=>{const a=Ys(e)?e():e;s.push(y5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var T5=Object.defineProperty,b5=(e,t,n)=>t in e?T5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gt=(e,t,n)=>b5(e,typeof t!="symbol"?t+"":t,n),qT={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},_5=[],x5=class{constructor(e,t){gt(this,"trapStack"),gt(this,"config"),gt(this,"doc"),gt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),gt(this,"portalContainers",new Set),gt(this,"listenerCleanups",[]),gt(this,"handleFocus",r=>{const s=rr(r),a=this.findContainerIndex(s,r)>=0;if(a||Tl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(ba(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=>ba(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}),gt(this,"handlePointerDown",r=>{const s=rr(r);if(!(this.findContainerIndex(s,r)>=0)){if(Na(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Na(this.config.allowOutsideClick,r)||r.preventDefault()}}),gt(this,"handleClick",r=>{const s=rr(r);this.findContainerIndex(s,r)>=0||Na(this.config.clickOutsideDeactivates,r)||Na(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),gt(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;Aa(r)&&r.preventDefault(),this.tryFocus(a)}}),gt(this,"handleEscapeKey",r=>{w5(r)&&Na(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),gt(this,"_mutationObserver"),gt(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 q6(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?Y6(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),gt(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)}))}),gt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!wr(r)){const s=Ks(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),gt(this,"tryFocus",r=>{if(r!==!1&&r!==Ks(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,S5(r)&&r.select()}}),gt(this,"deactivate",r=>{if(!this.state.active)return this;const s=U({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),qT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),l=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{YT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),gt(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}),gt(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}),gt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),gt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),gt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),gt(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}),gt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||rr(s);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||wr(u)&&!ts(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];l=ba(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Aa(s)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||wr(u)&&!ts(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];l=ba(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Aa(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||_5;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Aa(r)&&!r.shiftKey},isKeyBackward(r){return Aa(r)&&r.shiftKey}},t);this.doc=n.document||xr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{z6(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?qy(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Js(e,{getShadowRoot:this.config.getShadowRoot}),n=eT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let l=!1;for(let f=0;f<t.length;f++)if(ba(t[f])>0){l=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(ts(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(ts(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:r,lastTabbableNode:s,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return qT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?YT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ut(this.doc,"focusin",this.handleFocus,!0),Ut(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ut(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ut(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ut(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ut(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=Ks(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Aa=e=>e.key==="Tab",Na=(e,...t)=>typeof e=="function"?e(...t):e,w5=e=>!e.isComposing&&e.key==="Escape",YT=e=>setTimeout(e,0),S5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function WT(e,t={}){let n;const r=Pt(()=>{const s=typeof e=="function"?e():e;if(s){n=new x5(s,ae(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:xr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Ph="data-scroll-lock";function v5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function GT(e){const t=Qs(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function XT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Ph))return;const u=GT(r)||GT(s),l=n.innerWidth-r.clientWidth;s.setAttribute(Ph,"");const d=()=>_4(r,"--scrollbar-width",`${l}px`),f=v5(r),p=()=>{const x={overflow:"hidden"};return!u&&l>0&&(x[f]=`${l}px`),wl(s,x)},m=()=>{var W,D;const{scrollX:x,scrollY:v,visualViewport:A}=n,S=(W=A==null?void 0:A.offsetLeft)!=null?W:0,C=(D=A==null?void 0:A.offsetTop)!=null?D:0,P={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(C))}px`,left:`${-(x-Math.floor(S))}px`,right:"0"};!u&&l>0&&(P[f]=`${l}px`);const j=wl(s,P);return()=>{j==null||j(),n.scrollTo({left:x,top:v,behavior:"instant"})}},T=[d(),bl()?m():p()];return()=>{T.forEach(x=>x==null?void 0:x()),s.removeAttribute(Ph)}}var A5=rs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Cr=A5.build(),KT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},QT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Rh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},JT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},N5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Lh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Dh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},C5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},ZT=e=>e.getById(KT(e)),uo=e=>e.getById(QT(e)),lo=e=>e.getById(Rh(e)),eb=e=>e.getById(JT(e)),k5=e=>e.getById(Lh(e)),O5=e=>e.getById(Dh(e));function I5(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=JL(ae(U({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(ae(U({id:N5(l)},Cr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(ae(U({},Cr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(ae(U({},Cr.anchor.attrs),{dir:u("dir"),id:KT(l)}))},getTriggerProps(){return t.button(ae(U({},Cr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:QT(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Rh(l),onPointerDown(y){Gy(y)&&J6()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(ae(U({},Cr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ae(U({id:JT(l)},Cr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(ae(U({},Cr.content.attrs),{dir:u("dir"),id:Rh(l),tabIndex:-1,role:"dialog","aria-modal":zy(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Ws(d),"aria-labelledby":m.title?Lh(l):void 0,"aria-describedby":m.description?Dh(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(ae(U({},Cr.title.attrs),{id:Lh(l),dir:u("dir")}))},getDescriptionProps(){return t.element(ae(U({},Cr.description.attrs),{id:Dh(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ae(U({},Cr.closeTrigger.attrs),{dir:u("dir"),id:C5(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var P5={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=ZT(n))!=null?a:uo(n);return RT(r,()=>eb(n),ae(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>lo(n);let s=!0;return VT(r,{type:"popover",pointerBlocking:t("modal"),exclude:uo(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(s=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:T4(()=>lo(t),{triggerElement:uo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?DT(()=>[lo(t),uo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return XT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?WT(()=>lo(t),{initialFocus:()=>tT({root:lo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=ZT(n))!=null?u:uo(n);RT(s,()=>eb(n),ae(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Pt(()=>{Object.assign(e.get("renderedElements"),{title:!!k5(t),description:!!O5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Pt(()=>{const n=tT({root:lo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Pt(()=>{const a=uo(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};to()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[MB,Bl]=ns({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[FB,Mh]=ns({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),R5=e=>{const t=H.useId(),{getRootNode:n}=Bl(),{dir:r}=Mh(),s=U({id:t,dir:r,getRootNode:n},e),a=vl(P5,s);return I5(a,gh)},L5=e=>{const[t,u]=cT(e),l=u,{children:n}=l,r=hn(l,["children"]),s=R5(r),a=Th(Rt({present:s.open},t));return _.jsx(L4,{value:s,children:_.jsx(aT,{value:a,children:n})})},tb=H.forwardRef((e,t)=>{const n=yh(),r=_a(),s=Rt(ae(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(tn.button,ae(U({},s),{ref:t}))});tb.displayName="PopoverTrigger";function D5(e){return rt({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 M5(e){return rt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function nb(e){return rt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function rb(e){return rt({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 F5(e){return rt({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 B5(e){return rt({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 Fh(e){return rt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function ib(e){return rt({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 U5=({className:e,componentType:t,children:n})=>{const[r,s]=H.useState(!1),{globalClassName:a}=ot(),u=f=>{s(f.open)},l=H.useCallback(()=>{s(!1)},[]),d=H.useMemo(()=>({closeMenu:l}),[l]);return _.jsxs(L5,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(tb,{"aria-label":`Overflow menu for ${t}`,className:F(`${k}-overflow-menu-button-trigger`,`${k}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(ib,{})}),_.jsx(lT,{children:_.jsx(uT,{className:F(`${k}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(Ly.Provider,{value:d,children:n})})})]})};function sb(e){return rt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function ob(e){return rt({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[H5,os]=ns({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Bh=H.forwardRef((e,t)=>{const n=os(),r=Rt(n.getControlProps(),e);return _.jsx(tn.div,ae(U(U({},r),e),{ref:t}))});Bh.displayName="CarouselControl";const Uh=H.forwardRef((e,t)=>{const[n,r]=xa()(e,["readOnly","index"]),s=os(),a=Rt(s.getIndicatorProps(n),r);return _.jsx(tn.button,ae(U({},a),{ref:t}))});Uh.displayName="CarouselIndicator";const Hh=H.forwardRef((e,t)=>{const n=os(),r=Rt(n.getIndicatorGroupProps(),e);return _.jsx(tn.div,ae(U({},r),{ref:t}))});Hh.displayName="CarouselIndicatorGroup";const jh=H.forwardRef((e,t)=>{const[n,r]=xa()(e,["index","snapAlign"]),s=os(),a=Rt(s.getItemProps(n),r);return _.jsx(tn.div,ae(U({},a),{ref:t}))});jh.displayName="CarouselItem";const zh=H.forwardRef((e,t)=>{const n=os(),r=Rt(n.getItemGroupProps(),e);return _.jsx(tn.div,ae(U({},r),{ref:t}))});zh.displayName="CarouselItemGroup";const $h=H.forwardRef((e,t)=>{const n=os(),r=Rt(n.getNextTriggerProps(),e);return _.jsx(tn.button,ae(U({},r),{ref:t}))});$h.displayName="CarouselNextTrigger";const Vh=H.forwardRef((e,t)=>{const n=os(),r=Rt(n.getPrevTriggerProps(),e);return _.jsx(tn.button,ae(U({},r),{ref:t}))});Vh.displayName="CarouselPrevTrigger";function j5(e){const t=Qs(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function l(T,y){let x=parseFloat(T);return/%/.test(T)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=l(r,n.width),f=l(s,n.height),p=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function z5(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function ab(e){let t=[];for(const n of e.children)t=t.concat(n,ab(n));return t}function ub(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?ab(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",l=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!z5(n,m,u))continue;const T=Qs(p);let[y,x]=T.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const v=a==="x"?x:y,A=m[l]-n[l]+e[f];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+m[d]/2});break;case"end":r[a].end.push({node:p,position:A+m[d]});break}}}return r}function lb(e){const t=e.getBoundingClientRect(),n=j5(e),r=ub(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:cb([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(db(0,s.x))),y:cb([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(db(0,s.y)))}}function $5(e,t,n){const r=ub(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var cb=e=>[...new Set(e)],db=(e,t)=>n=>Math.max(e,Math.min(t,n)),V5=rs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),zr=V5.build(),q5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},Y5=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},Ul=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},W5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},G5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},X5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},fb=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},bn=e=>e.getById(Ul(e)),hb=e=>b4(bn(e),"[data-part=item]"),K5=(e,t)=>e.getById(fb(e,t)),pb=e=>{const t=bn(e);if(!t)return;const n=Js(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function Q5(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),T=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),v=l("slidesPerPage"),A=l("padding"),S=l("translations");return{isPlaying:d,isDragging:f,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return x/y.length},scrollToIndex(C,P){a({type:"INDEX.SET",index:C,instant:P})},scrollTo(C,P){a({type:"PAGE.SET",index:C,instant:P})},scrollNext(C){a({type:"PAGE.NEXT",instant:C})},scrollPrev(C){a({type:"PAGE.PREV",instant:C})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(C){return Array.from(r.get("slidesInView")).includes(C)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(ae(U({},zr.root.attrs),{id:q5(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":v,"--slide-spacing":l("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(ae(U({},zr.itemGroup.attrs),{id:Ul(u),"data-orientation":l("orientation"),"data-dragging":Ws(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(C){Gs(C.currentTarget,rr(C))&&a({type:"VIEWPORT.FOCUS"})},onBlur(C){Gs(C.currentTarget,C.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(C){if(C.defaultPrevented||!l("allowMouseDrag")||!Gy(C))return;const P=rr(C);wr(P)&&P!==C.currentTarget||(C.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:b6(C=>{const P=l("orientation")==="horizontal"?"deltaX":"deltaY";C[P]<0&&!s("canScrollPrev")||C[P]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",l("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:A,[T?"paddingInline":"paddingBlock"]:A,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(C){const P=r.get("slidesInView").includes(C.index);return t.element(ae(U({},zr.item.attrs),{id:Y5(u,C.index),dir:l("dir"),role:"group","data-index":C.index,"data-inview":Ws(P),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":S.item(C.index,l("slideCount")),"aria-hidden":zy(!P),style:{scrollSnapAlign:(()=>{var ne;const j=(ne=C.snapAlign)!=null?ne:"start",W=l("slidesPerMove"),D=W==="auto"?Math.floor(l("slidesPerPage")):W;return(C.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:G5(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":S.prevTrigger,"data-orientation":l("orientation"),"aria-controls":Ul(u),onClick(C){C.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ae(U({},zr.nextTrigger.attrs),{dir:l("dir"),id:W5(u),type:"button","aria-label":S.nextTrigger,"data-orientation":l("orientation"),"aria-controls":Ul(u),disabled:!p,onClick(C){C.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ae(U({},zr.indicatorGroup.attrs),{dir:l("dir"),id:X5(u),"data-orientation":l("orientation"),onKeyDown(C){if(C.defaultPrevented)return;const P="indicator",j={ArrowDown(K){T||(a({type:"PAGE.NEXT",src:P}),K.preventDefault())},ArrowUp(K){T||(a({type:"PAGE.PREV",src:P}),K.preventDefault())},ArrowRight(K){T&&(a({type:"PAGE.NEXT",src:P}),K.preventDefault())},ArrowLeft(K){T&&(a({type:"PAGE.PREV",src:P}),K.preventDefault())},Home(K){a({type:"PAGE.SET",index:0,src:P}),K.preventDefault()},End(K){a({type:"PAGE.SET",index:y.length-1,src:P}),K.preventDefault()}},W=r4(C,{dir:l("dir"),orientation:l("orientation")}),D=j[W];D==null||D(C)}}))},getIndicatorProps(C){return t.button(ae(U({},zr.indicator.attrs),{dir:l("dir"),id:fb(u,C.index),type:"button","data-orientation":l("orientation"),"data-index":C.index,"data-readonly":Ws(C.readOnly),"data-current":Ws(C.index===x),"aria-label":S.indicator(C.index),onClick(P){P.defaultPrevented||C.readOnly||a({type:"PAGE.SET",index:C.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ae(U({},zr.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":Ws(d),"aria-label":d?S.autoplayStop:S.autoplayStart,onClick(C){C.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var J5={props({props:e}){return A6(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:Z5(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 l6(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(bn(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=bn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),pb(e)});return pb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!bn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Pt(()=>{s(),Pt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return hb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=bn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?i6(d,m):s6(d,m)},n.get("slidesInView"));n.set("slidesInView",o6(l))},{root:r,threshold:t("inViewThreshold")});return hb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=bn(n);return r?Ut(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 Ut(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return E4(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 Ut(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=Hy((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=bn(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=bn(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=Fy(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=a6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=bn(r);if(!s)return;const a=$5(s,n("isHorizontal")?"x":"y",l=>l.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(l=>Math.abs(l-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=Hy(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=bn(n);if(!r)return;const s=lb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=bn(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=bn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=bn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=lb(r),l=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);Pt(()=>{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=K5(n,e.get("page"));r&&Pt(()=>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 Z5(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}to()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),to()(["index","readOnly"]),to()(["index","snapAlign"]);const eD=e=>{const t=H.useId(),{getRootNode:n}=Bl(),{dir:r}=Mh(),s=U({id:t,dir:r,getRootNode:n},e),a=vl(J5,s);return Q5(a,gh)},qh=H.forwardRef((e,t)=>{const[n,r]=xa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=eD(n),a=Rt(s.getRootProps(),r);return _.jsx(H5,{value:s,children:_.jsx(tn.div,ae(U({},a),{ref:t}))})});qh.displayName="CarouselRoot";const tD=180,nD=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},rD=({globalClassName:e,className:t,itemMinWidth:n=tD,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((ne,de)=>({node:ne,key:H.isValidElement(ne)&&ne.key!=null?ne.key:`carousel-item-${de}`})),T=m.length,y=H.useRef(null),[x,v]=H.useState(0),{width:A}=XA();H.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[A,T]);const S=nD(r),C=n+S,P=x>0?(x+S)/C:1,j=Math.max(1,Math.floor(P));if(T===0)return null;const W=T>j,D=Math.ceil(T/j),K=W?Math.max(1,P):j;return _.jsxs(qh,{ref:y,className:F(e,t,`${k}-carousel`),slidesPerPage:K,slidesPerMove:j,spacing:r,loop:s,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[_.jsx(zh,{className:F(e,`${k}-carousel__item-group`,{"carousel-row-container":!W}),children:m.map(({node:ne,key:de},$)=>_.jsx(jh,{index:$,className:F(e,`${k}-carousel__item`),children:ne},de))}),l&&W&&_.jsxs(Bh,{className:F(e,`${k}-carousel__control`),children:[_.jsx(Vh,{className:F(e,`${k}-carousel__prev-trigger`),"aria-label":"Previous slide",children:_.jsx(nb,{size:"16px"})}),_.jsx($h,{className:F(e,`${k}-carousel__next-trigger`),"aria-label":"Next slide",children:_.jsx(rb,{size:"16px"})})]}),u&&W&&_.jsx(Hh,{className:F(e,`${k}-carousel__indicator-group`),children:Array.from({length:D},(ne,de)=>_.jsx(Uh,{index:de,className:F(e,`${k}-carousel__indicator`),"aria-label":`Go to slide group ${de+1}`},de))})]})},iD=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:F(e,`${k}-close-button`),disabled:r,onClick:n,children:_.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),[sD,oD]=ns({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),aD=e=>xa()(e,["lazyMount","unmountOnExit"]),[uD,Ca]=ns({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),mb=H.forwardRef((e,t)=>{const n=Ca(),r=oD(),s=Th(ae(U({},r),{present:n.open})),a=Rt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:_.jsx(tn.div,ae(U({},a),{ref:Al(s.ref,t)}))});mb.displayName="DialogBackdrop";const Yh=H.forwardRef((e,t)=>{const n=Ca(),r=_a(),s=Rt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(tn.div,ae(U({},s),{ref:Al(r.ref,t)}))});Yh.displayName="DialogContent";const Wh=H.forwardRef((e,t)=>{const n=Ca(),r=Rt(n.getDescriptionProps(),e);return _.jsx(tn.div,ae(U({},r),{ref:t}))});Wh.displayName="DialogDescription";const Gh=H.forwardRef((e,t)=>{const n=Ca(),r=Rt(n.getPositionerProps(),e);return _a().unmounted?null:_.jsx(tn.div,ae(U({},r),{ref:t}))});Gh.displayName="DialogPositioner";var lD=rs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),as=lD.build(),gb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},yb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Tb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Hl=e=>e.getById(Xh(e)),cD=e=>e.getById(gb(e)),dD=e=>e.getById(Eb(e)),fD=e=>e.getById(yb(e)),hD=e=>e.getById(Kh(e)),pD=e=>e.getById(Qh(e)),mD=e=>e.getById(Tb(e));function gD(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({},as.trigger.attrs),{dir:a("dir"),id:yb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Xh(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ae(U({},as.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Eb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ae(U({},as.positioner.attrs),{dir:a("dir"),id:gb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(ae(U({},as.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Xh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:Kh(u),"aria-describedby":f.description?Qh(u):void 0}))},getTitleProps(){return t.element(ae(U({},as.title.attrs),{dir:a("dir"),id:Kh(u)}))},getDescriptionProps(){return t.element(ae(U({},as.description.attrs),{dir:a("dir"),id:Qh(u)}))},getCloseTriggerProps(){return t.button(ae(U({},as.closeTrigger.attrs),{dir:a("dir"),id:Tb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var ED={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>mD(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return U({role:"dialog",modal:s,trapFocus:s,preventScroll:s,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return VT(()=>Hl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[fD(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return XT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?WT(()=>Hl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?DT(()=>[Hl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Pt(()=>{e.set("rendered",{title:!!hD(t),description:!!pD(t)})})},syncZIndex({scope:e}){Pt(()=>{const t=Hl(e);if(!t)return;const n=Qs(t);[cD(e),dD(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};to()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const yD=e=>{const t=H.useId(),{getRootNode:n}=Bl(),{dir:r}=Mh(),s=U({id:t,getRootNode:n,dir:r},e),a=vl(ED,s);return gD(a,gh)},bb=e=>{const[t,l]=cT(e),d=l,{children:n}=d,r=hn(d,["children"]),[s]=aD(t),a=yD(r),u=Th(Rt({present:a.open},t));return _.jsx(uD,{value:a,children:_.jsx(sD,{value:s,children:_.jsx(aT,{value:u,children:n})})})},_b=H.forwardRef((e,t)=>{const n=Ca(),r=Rt(n.getTitleProps(),e);return _.jsx(tn.h2,ae(U({},r),{ref:t}))});_b.displayName="DialogTitle";const TD=({children:e})=>{const[t,n]=H.useState(!1),r=H.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=H.useMemo(()=>({isOpen:t}),[t]);return _.jsx(nh.Provider,{value:r,children:_.jsx(Ry.Provider,{value:s,children:e})})},xb=()=>H.useContext(Ry),wb=()=>{const e=H.useContext(nh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},bD=`${k}-overflow-menu-button-trigger`,_D=({componentType:e,children:t})=>{const{isOpen:n}=xb(),{closeMenu:r}=wb(),{globalClassName:s}=ot(),a=H.useRef(null);return H.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${bD}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",l),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",l)}},[n,r]),n?_.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:F(`${k}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},xD=({componentType:e,className:t})=>{const{toggleMenu:n}=wb(),{isOpen:r}=xb(),{globalClassName:s}=ot();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:F(`${k}-overflow-menu-button-trigger`,`${k}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:_.jsx(ib,{})})};class wD{constructor(){Ye(this,"initialState",Lg);Ye(this,"promptsStateProxy");Ye(this,"promptsParamsProxy");Ye(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ye(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return AD(n,r),Reflect.set(t,n,r)});Ye(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Ye(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Ye(this,"updatePromptsParamsProxy",t=>new Proxy(U({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const pi=new wD,SD=e=>{window.addEventListener(ef,e)},vD=e=>{window.removeEventListener(ef,e)},AD=(e,t)=>{const n=new CustomEvent(ef,{detail:{property:e,value:t}});window.dispatchEvent(n)},Sb=e=>{const t=pi.isOpen,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isOpen=n},ND=e=>{const t=pi.isInline,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isInline=n},CD=({elementId:e,entryType:t,params:n,isInline:r})=>{pi.promptsStateProxy.elementId=e,t&&(pi.promptsStateProxy.entryType=t),typeof r=="boolean"&&ND(r),n&&pi.updatePromptsParamsProxy(n),pi.isOpen||Sb(!0)},kD=()=>{const e=H.useContext(Mg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},Jh=()=>{const e=H.useContext(Dg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},OD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ot(),{previousComponentType:r}=ri(),s=qs(),a=()=>{$u(r||"dialog"),s()};return t?_.jsx(er,{className:F(n,`${k}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(sb,{})}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(sb,{}),"Show ",r||"dialog"]})},ID=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ot(),{isModalFullscreen:r}=ri(),s=qs(),a=()=>{tf(!r),s()},u=r?CN:kN,l="Toggle Fullscreen";return t?_.jsx(er,{ariaLabel:l,title:l,className:F(n,`${k}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),l]})},PD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ot(),{dialogPosition:r}=ri(),s=qs(),a=r==="bottom-left",u=()=>{nf(a?"bottom-right":"bottom-left"),s()},l=a?M5:D5,d=a?"Move right":"Move left";return t?_.jsx(er,{className:F(n,`${k}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(l,{})}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(l,{}),d]})},vb=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:l}=ot(),{mode:d}=ri(),f=u==="messaging"&&l&&!!r,p=d==="standalone",m=e==="modal",T=m?OD:Nb,y=m?ID:PD,x=H.useMemo(()=>s?_N(s):{},[s]);return _.jsx(TD,{children:_.jsxs("div",{className:F(a,`${k}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:F(a,`${k}-${e}-header`,{standalone:p,embedded:!p}),style:x,children:[(s==null?void 0:s.logoUrl)&&_.jsx("img",{alt:"",role:"img",className:F(a,`${k}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),_.jsx(_b,{className:F(a,`${k}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),_.jsxs("div",{className:F(a,`${k}-${e}-controls`),children:[_.jsx(T,{componentType:e,isIcon:!0}),_.jsx(xD,{componentType:e}),_.jsx(iD,{className:F(a,`cim-${e}-component`),onClick:n})]})]}),_.jsxs(_D,{componentType:e,children:[_.jsx(y,{componentType:e}),_.jsx(BD,{componentType:e}),_.jsx(Dy,{componentType:e,onClearChat:t}),f&&_.jsx(My,{componentType:e,onDownloadTranscript:r})]})]})})},jl="USD",$r=(e,t)=>{if(typeof e!="number"||Number.isNaN(e))return null;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e)}catch(n){return`${e}`}},RD=({retailPrice:e,discountPrice:t,currencyCode:n=jl})=>{const r=n||jl,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:$r(a,r),comparePrice:$r(u,r),hasDiscount:s}},Ab=e=>typeof e=="number"&&Number.isFinite(e),LD=({priceBreakdown:e,currencyCode:t=jl})=>{if(!e)return null;const n=t||jl,r=[e.sales,e.original],s=r.map(p=>p==null?void 0:p.min).filter(Ab),a=r.map(p=>p==null?void 0:p.max).filter(Ab);if(s.length===0||a.length===0)return null;const u=Math.min(...s),l=Math.max(...a);if(u===l)return null;const d=$r(u,n),f=$r(l,n);return d===null||f===null?null:{range:`${d} – ${f}`,low:d,high:f}},Zh=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=RD({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return _.jsxs("div",{className:F(s,a,`${k}-price`),style:f,children:[_.jsx("span",{className:F(s,`${k}-price__amount`),children:u}),d&&l&&_.jsx("span",{className:F(s,`${k}-price__compare`),children:l})]})},DD={sparkle:Fh,plus:F5,"paper-plane":B5},MD=({icon:e,className:t})=>{const n=DD[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},FD=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=ot(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=x=>()=>{a(x)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},T=x=>_.jsxs(_.Fragment,{children:[l&&_.jsx(MD,{icon:l,className:`${k}-suggestion-button-icon`}),_.jsx("span",{children:x})]});return _.jsx("div",{className:F(t,`${k}-suggestion-container ${f}`,e),children:n.map(x=>s?_.jsx(Yu,{disabled:r,className:F(t,`${k}-suggestion-button standalone`,m),onClick:p(x),children:T(x)},x):_.jsx("button",{disabled:r,className:F(t,`${k}-suggestion-button embedded`,m),onClick:p(x),children:T(x)},x))})},BD=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ot();if(!r)return null;const s=()=>{ni(!1),zu(!0)};return t?_.jsx(er,{className:F(n,`${k}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:_.jsx(Jg,{})}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(Jg,{}),"Minimize"]})},Nb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ot(),r=qs(),s=()=>{$u("modal"),r()};return t?_.jsx(er,{className:F(n,`${k}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:_.jsx(ob,{})}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(ob,{}),"Show modal"]})},UD=["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"],HD=3e3,jD=400,zD=({globalClassName:e,isWidgetStandalone:t,messages:n=UD})=>{const[r,s]=H.useState(0),[a,u]=H.useState(!0);return H.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},jD)},HD);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),_.jsxs("div",{className:F(e,`${k}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[_.jsxs("div",{className:`${k}-connecting-pulse-wrapper`,children:[_.jsx("div",{className:`${k}-connecting-pulse`}),_.jsx("div",{className:`${k}-connecting-ring`})]}),_.jsx("span",{className:F(`${k}-connecting-text`,a&&`${k}-connecting-text--visible`),children:n[r]})]})},$D=({shouldShow:e,loadingText:t})=>e?_.jsx("span",{className:`${k}-processing-text`,children:t}):null,VD=({shouldShow:e})=>e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:`${k}-processing-shimmer-bar`}),_.jsx("div",{className:`${k}-processing-shimmer-bar`}),_.jsx("div",{className:`${k}-processing-shimmer-bar`})]}):null,ep=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>_.jsxs("div",{className:F(e,`${k}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[_.jsx($D,{shouldShow:!!n,loadingText:n}),_.jsx(VD,{shouldShow:!n})]});function Cb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function qD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function YD(e,t,n){const s=rl((n||{}).ignore||[]),a=WD(t);let u=-1;for(;++u<a.length;)hE(e,"text",l);function l(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],x=T?T.children:void 0;if(s(y,x?x.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let x=0;const A=m.children.indexOf(f);let S=!1,C=[];T.lastIndex=0;let P=T.exec(f.value);for(;P;){const j=P.index,W={index:P.index,input:P.input,stack:[...p,f]};let D=y(...P,W);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?T.lastIndex=j+1:(x!==j&&C.push({type:"text",value:f.value.slice(x,j)}),Array.isArray(D)?C.push(...D):D&&C.push(D),x=j+P[0].length,S=!0),!T.global)break;P=T.exec(f.value)}return S?(x<f.value.length&&C.push({type:"text",value:f.value.slice(x)}),m.children.splice(A,1,...C)):C=[f],A+C.length}}function WD(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([GD(s[0]),XD(s[1])])}return t}function GD(e){return typeof e=="string"?new RegExp(qD(e),"g"):e}function XD(e){return typeof e=="function"?e:function(){return e}}const tp="phrasing",np=["autolink","link","image","label"];function KD(){return{transforms:[r8],enter:{literalAutolink:JD,literalAutolinkEmail:rp,literalAutolinkHttp:rp,literalAutolinkWww:rp},exit:{literalAutolink:n8,literalAutolinkEmail:t8,literalAutolinkHttp:ZD,literalAutolinkWww:e8}}}function QD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:tp,notInConstruct:np},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:tp,notInConstruct:np},{character:":",before:"[ps]",after:"\\/",inConstruct:tp,notInConstruct:np}]}}function JD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function rp(e){this.config.enter.autolinkProtocol.call(this,e)}function ZD(e){this.config.exit.autolinkProtocol.call(this,e)}function e8(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 t8(e){this.config.exit.autolinkEmail.call(this,e)}function n8(e){this.exit(e)}function r8(e){YD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,i8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),s8]],{ignore:["link","linkReference"]})}function i8(e,t,n,r,s){let a="";if(!kb(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!o8(n)))return!1;const u=a8(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 s8(e,t,n,r){return!kb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function o8(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 a8(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=Cb(e,"(");let a=Cb(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function kb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wi(n)||Ku(n))&&(!t||n!==47)}Ob.peek=g8;function u8(){this.buffer()}function l8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function c8(){this.buffer()}function d8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function f8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=tr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function h8(e){this.exit(e)}function p8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=tr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function m8(e){this.exit(e)}function g8(){return"["}function Ob(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 E8(){return{enter:{gfmFootnoteCallString:u8,gfmFootnoteCall:l8,gfmFootnoteDefinitionLabelString:c8,gfmFootnoteDefinition:d8},exit:{gfmFootnoteCallString:f8,gfmFootnoteCall:h8,gfmFootnoteDefinitionLabelString:p8,gfmFootnoteDefinition:m8}}}function y8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ob},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?Ib:T8))),f(),d}}function T8(e,t,n){return t===0?e:Ib(e,t,n)}function Ib(e,t,n){return(n?"":" ")+e}const b8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Pb.peek=v8;function _8(){return{canContainEols:["delete"],enter:{strikethrough:w8},exit:{strikethrough:S8}}}function x8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:b8}],handlers:{delete:Pb}}}function w8(e){this.enter({type:"delete",children:[]},e)}function S8(e){this.exit(e)}function Pb(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 v8(){return"~"}function A8(e){return e.length}function N8(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||A8,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const v=[],A=[];let S=-1;for(e[p].length>f&&(f=e[p].length);++S<e[p].length;){const C=C8(e[p][S]);if(n.alignDelimiters!==!1){const P=s(C);A[S]=P,(d[S]===void 0||P>d[S])&&(d[S]=P)}v.push(C)}u[p]=v,l[p]=A}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=Rb(r[m]);else{const v=Rb(r);for(;++m<f;)a[m]=v}m=-1;const T=[],y=[];for(;++m<f;){const v=a[m];let A="",S="";v===99?(A=":",S=":"):v===108?A=":":v===114&&(S=":");let C=n.alignDelimiters===!1?1:Math.max(1,d[m]-A.length-S.length);const P=A+"-".repeat(C)+S;n.alignDelimiters!==!1&&(C=A.length+C+S.length,C>d[m]&&(d[m]=C),y[m]=C),T[m]=P}u.splice(1,0,T),l.splice(1,0,y),p=-1;const x=[];for(;++p<u.length;){const v=u[p],A=l[p];m=-1;const S=[];for(;++m<f;){const C=v[m]||"";let P="",j="";if(n.alignDelimiters!==!1){const W=d[m]-(A[m]||0),D=a[m];D===114?P=" ".repeat(W):D===99?W%2?(P=" ".repeat(W/2+.5),j=" ".repeat(W/2-.5)):(P=" ".repeat(W/2),j=P):j=" ".repeat(W)}n.delimiterStart!==!1&&!m&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||m)&&S.push(" "),n.alignDelimiters!==!1&&S.push(P),S.push(C),n.alignDelimiters!==!1&&S.push(j),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&S.push("|")}x.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return x.join(`
|
|
39
|
+
`)}function C8(e){return e==null?"":String(e)}function Rb(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 k8(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()),O8);return s(),u}function O8(e,t,n){return">"+(n?"":" ")+e}function I8(e,t){return Lb(e,t.inConstruct,!0)&&!Lb(e,t.notInConstruct,!1)}function Lb(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 Db(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
40
|
+
`&&I8(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
41
|
+
`}function P8(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 R8(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 L8(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 D8(e,t,n,r){const s=L8(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(R8(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,M8);return m(),T}const l=n.createTracker(r),d=s.repeat(Math.max(P8(a,s)+1,3)),f=n.enter("codeFenced");let p=l.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=l.move(n.safe(e.lang,U({before:p,after:" ",encode:["`"]},l.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=l.move(" "),p+=l.move(n.safe(e.meta,U({before:p,after:`
|
|
42
|
+
`,encode:["`"]},l.current()))),m()}return p+=l.move(`
|
|
43
|
+
`),a&&(p+=l.move(a+`
|
|
44
|
+
`)),p+=l.move(d),f(),p}function M8(e,t,n){return(n?"":" ")+e}function ip(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function F8(e,t,n,r){const s=ip(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),U({before:f,after:"]"},d.current()))),f+=d.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,U({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,U({before:f,after:e.title?" ":`
|
|
45
|
+
`},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,U({before:f,after:s},d.current()))),f+=d.move(s),l()),u(),f}function B8(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 ka(e){return"&#x"+e.toString(16).toUpperCase()+";"}function zl(e,t,n){const r=Us(e),s=Us(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Mb.peek=U8;function Mb(e,t,n,r){const s=B8(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=zl(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=ka(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=zl(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+ka(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function U8(e,t,n){return n.options.emphasis||"*"}function H8(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,kf}),!!((!e.depth||e.depth<3)&&yf(e)&&(t.options.setext||n))}function j8(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(H8(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,ae(U({},a.current()),{before:`
|
|
46
46
|
`,after:`
|
|
47
47
|
`}));return m(),p(),T+`
|
|
48
48
|
`+(s===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
|
|
49
|
-
`))+1))}const u="#".repeat(s),
|
|
50
|
-
`},a.current()));return/^[\t ]/.test(f)&&(f=
|
|
51
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:
|
|
52
|
-
`))}function d(y,x,N,A){const v=N.enter("tableCell"),C=N.enter("phrasing"),R=N.containerPhrasing(y,oe(U({},A),{before:a,after:a}));return C(),v(),R}function f(y,x){return y8(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function p(y,x,N){const A=y.children;let v=-1;const C=[],R=x.enter("table");for(;++v<A.length;)C[v]=m(A[v],x,N);return R(),C}function m(y,x,N){const A=y.children;let v=-1;const C=[],R=x.enter("tableRow");for(;++v<A.length;)C[v]=d(A[v],y,x,N);return R(),C}function T(y,x,N){let A=Vb.inlineCode(y,x,N);return N.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function sM(){return{exit:{taskListCheckValueChecked:Yb,taskListCheckValueUnchecked:Yb,paragraph:aM}}}function oM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:uM}}}function Yb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function aM(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,u;for(;++a<s.length;){const c=s[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function uM(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=Vb.listItem(e,t,n,U(U({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function lM(){return[jD(),u8(),f8(),J8(),sM()]}function cM(e){return{extensions:[zD(),l8(e),h8(),iM(e),oM()]}}const dM={tokenize:EM,partial:!0},Wb={tokenize:yM,partial:!0},Gb={tokenize:TM,partial:!0},Xb={tokenize:bM,partial:!0},fM={tokenize:_M,partial:!0},Kb={name:"wwwAutolink",tokenize:mM,previous:Jb},Qb={name:"protocolAutolink",tokenize:gM,previous:Zb},zr={name:"emailAutolink",tokenize:pM,previous:e_},Nr={};function hM(){return{text:Nr}}let us=48;for(;us<123;)Nr[us]=zr,us++,us===58?us=65:us===91&&(us=97);Nr[43]=zr,Nr[45]=zr,Nr[46]=zr,Nr[95]=zr,Nr[72]=[zr,Qb],Nr[104]=[zr,Qb],Nr[87]=[zr,Kb],Nr[119]=[zr,Kb];function pM(e,t,n){const r=this;let s,a;return u;function u(m){return!ap(m)||!e_.call(r,r.previous)||up(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return ap(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(fM,p,f)(m):m===45||m===95||Kt(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&&on(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function mM(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!Jb.call(r,r.previous)||up(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(dM,e.attempt(Wb,e.attempt(Gb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function gM(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&Zb.call(r,r.previous)&&!up(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(on(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const T=s.toLowerCase();if(T==="http"||T==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||Ku(m)||ot(m)||Wi(m)||Qu(m)?n(m):e.attempt(Wb,e.attempt(Gb,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function EM(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 yM(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(Xb,d,c)(f):f===null||ot(f)||Wi(f)||f!==45&&Qu(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function TM(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(Xb,t,a)(u):u===null||ot(u)||Wi(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function bM(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),s):c===60||c===null||ot(c)||Wi(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||ot(c)||Wi(c)?t(c):r(c)}function a(c){return on(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):on(c)?(e.consume(c),u):n(c)}}function _M(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return Kt(a)?n(a):t(a)}}function Jb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ot(e)}function Zb(e){return!on(e)}function e_(e){return!(e===47||ap(e))}function ap(e){return e===43||e===45||e===46||e===95||Kt(e)}function up(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const xM={tokenize:OM,partial:!0};function wM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:NM,continuation:{tokenize:CM},exit:kM}},text:{91:{name:"gfmFootnoteCall",tokenize:AM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:SM,resolveTo:vM}}}}function SM(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=er(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function vM(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function AM(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||ot(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return s.includes(er(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ot(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 NM(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(x)}function p(x){if(u>999||x===93&&!c||x===null||x===91||ot(x))return n(x);if(x===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return a=er(r.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return ot(x)||(c=!0),u++,e.consume(x),x===92?m:p}function m(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}function T(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),Xe(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function CM(e,t,n){return e.check(ra,t,e.attempt(xM,t,n))}function kM(e){e.exit("gfmFootnoteDefinition")}function OM(e,t,n){const r=this;return Xe(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 IM(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&kn(T,T.length,0,Ju(y,u.slice(f+1,d),c)),kn(T,T.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),kn(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const f=this.previous,p=this.events;let m=0;return T;function T(x){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const N=Us(f);if(x===126)return m>1?d(x):(u.consume(x),m++,y);if(m<2&&!n)return d(x);const A=u.exit("strikethroughSequenceTemporary"),v=Us(x);return A._open=!v||v===2&&!!N,A._close=!N||N===2&&!!v,c(x)}}}class PM{constructor(){this.map=[]}add(t,n,r){RM(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 RM(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 LM(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 DM(){return{flow:{null:{name:"table",tokenize:MM,resolveAll:FM}}}}function MM(e,t,n){const r=this;let s=0,a=0,u;return c;function c(V){let ie=r.events.length-1;for(;ie>-1;){const de=r.events[ie][1].type;if(de==="lineEnding"||de==="linePrefix")ie--;else break}const ee=ie>-1?r.events[ie][1].type:null,we=ee==="tableHead"||ee==="tableRow"?D:d;return we===D&&r.parser.lazy[r.now().line]?n(V):we(V)}function d(V){return e.enter("tableHead"),e.enter("tableRow"),f(V)}function f(V){return V===124||(u=!0,a+=1),p(V)}function p(V){return V===null?n(V):Pe(V)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),y):n(V):We(V)?Xe(e,p,"whitespace")(V):(a+=1,u&&(u=!1,s+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||ot(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?T:m)}function T(V){return V===92||V===124?(e.consume(V),m):m(V)}function y(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),u=!1,We(V)?Xe(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):x(V))}function x(V){return V===45||V===58?A(V):V===124?(u=!0,e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),N):G(V)}function N(V){return We(V)?Xe(e,A,"whitespace")(V):A(V)}function A(V){return V===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),v):V===45?(a+=1,v(V)):V===null||Pe(V)?$(V):G(V)}function v(V){return V===45?(e.enter("tableDelimiterFiller"),C(V)):G(V)}function C(V){return V===45?(e.consume(V),C):V===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(V))}function R(V){return We(V)?Xe(e,$,"whitespace")(V):$(V)}function $(V){return V===124?x(V):V===null||Pe(V)?!u||s!==a?G(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):G(V)}function G(V){return n(V)}function D(V){return e.enter("tableRow"),J(V)}function J(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),J):V===null||Pe(V)?(e.exit("tableRow"),t(V)):We(V)?Xe(e,J,"whitespace")(V):(e.enter("data"),se(V))}function se(V){return V===null||V===124||ot(V)?(e.exit("data"),J(V)):(e.consume(V),V===92?he:se)}function he(V){return V===92||V===124?(e.consume(V),se):se(V)}}function FM(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const T=new PM;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(c=!1,d!==0&&(t_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",f,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",p,t]])),s=x.type==="tableDelimiterRow"?2:p?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=Vl(T,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=Vl(T,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):x.type==="tableHead"?(c=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=Vl(T,t,a,s,n,m)):u[1]!==0&&(m=Vl(T,t,u,s,n,m)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&t_(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=LM(t.events,n))}return e}function Vl(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},co(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=co(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=co(t.events,n[2]),p=co(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,N=n[3]-n[2]-1;e.add(x,N,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},co(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function t_(e,t,n,r,s){const a=[],u=co(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function co(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const BM={name:"tasklistCheck",tokenize:HM};function UM(){return{text:{91:BM}}}function HM(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 ot(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Pe(d)?t(d):We(d)?e.check({tokenize:jM},t,n)(d):n(d)}}function jM(e,t,n){return Xe(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function zM(e){return I1([hM(),wM(),IM(e),DM(),UM()])}const $M={};function VM(e){const t=this,n=e||$M,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(zM(n)),a.push(lM()),u.push(cM(n))}const qM=()=>_.jsx("span",{className:`${P}-blinking-cursor`,children:_.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Pa=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>_.jsx(xE,{remarkPlugins:[VM],rehypePlugins:[wy],components:{h1:({children:s})=>_.jsx("h1",{className:F(e,`${P}-header h1`),children:s}),h2:({children:s})=>_.jsx("h2",{className:F(e,`${P}-header h2`),children:s}),h3:({children:s})=>_.jsx("h3",{className:F(e,`${P}-header h3`),children:s}),ul:({children:s})=>_.jsx("ul",{className:F(e,`${P}-ul`),children:s}),ol:({children:s})=>_.jsx("ol",{className:F(e,`${P}-ol`),children:s}),li:({children:s})=>_.jsx("li",{className:F(e,`${P}-li`),children:s}),a:({href:s,children:a})=>_.jsx(Oy,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>_.jsx("div",{className:F(e,`${P}-table-container`),children:_.jsx("table",{className:F(e,`${P}-table`),children:s})}),thead:({children:s})=>_.jsx("thead",{className:F(e,`${P}-thead`),children:s}),tbody:({children:s})=>_.jsx("tbody",{className:F(e,`${P}-tbody`),children:s}),tr:({children:s})=>_.jsx("tr",{className:F(e,`${P}-tr`),children:s}),th:({children:s})=>_.jsx("th",{className:F(e,`${P}-th`),children:s}),td:({children:s})=>_.jsx("td",{className:F(e,`${P}-td`),children:s}),span:({className:s,children:a})=>s===`${P}-blinking-cursor`?_.jsx(qM,{}):_.jsx("span",{children:a})},children:r+(n?`<span className='${P}-blinking-cursor'></span>`:"")}),ql=()=>H.useContext(Bg),Yl=()=>{const{sendMessage:e,loading:t,isConnected:n}=sn(),{mode:r,status:s}=ri();return H.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function YM(e){return e.includes("-")&&e===e.toLowerCase()}function Wl({tagName:e,props:t,label:n}){const r=H.useRef(null),s=H.useRef(null),a=H.useRef(e),u=H.useRef(null);return H.useEffect(()=>{const c=r.current;if(!c)return;if(a.current!==e&&(a.current=e,s.current=null),!YM(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,c.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,c.replaceChildren();return}try{const f=document.createElement(e);f.props=t,c.replaceChildren(f);const p=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(p)?f:null}catch(f){At(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,c.replaceChildren()}},[e,t,n]),H.useEffect(()=>{const c=r.current;return()=>{s.current=null,c==null||c.replaceChildren()}},[]),_.jsx("div",{ref:r,"data-override":n||"custom"})}class WM extends H.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 GM(e){return tt({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 XM=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:c})=>{const{loading:d}=sn();return _.jsx("div",{className:F(t,`${P}-msg-product-card__image-wrapper`),children:e?n?_.jsx("button",{type:"button",className:F(t,`${P}-msg-product-card__image-button`),onClick:c,disabled:d,"aria-label":a,children:_.jsx("img",{className:F(t,`${P}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,children:_.jsx("img",{className:F(t,`${P}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):_.jsx("img",{className:F(t,`${P}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):_.jsx("div",{className:F(t,`${P}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:_.jsx(GM,{"aria-hidden":"true"})})})},KM=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:c}=sn();return n?_.jsx("button",{type:"button",disabled:c,onClick:u,className:F(t,`${P}-msg-product-card__title-link`),"aria-label":a,children:e}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:F(t,`${P}-msg-product-card__title-link`),"aria-label":a,children:e}):_.jsx("p",{className:F(t,`${P}-msg-product-card__title`),children:e})},QM=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=it(),{overrides:u,isInitialized:c}=ql(),{sendMessage:d,loading:f}=sn(),p=Yl(),m=c?u.ProductTile:void 0;if(m){const V={name:"ProductTile",payload:s!=null?s:{},api:p};return _.jsx(Wl,{tagName:m,props:V,label:"ProductTile"})}const{id:T,name:y,imageUrl:x,description:N,productPageUrl:A,price:v,priceBreakdown:C,discountPrice:R,listPrice:$,currencyCode:G}=e,D=R!=null?R:v,J=vD({priceBreakdown:C,currencyCode:G}),se=()=>{if(f)return;const V=y||"this product",ie=T?` [SKU: ${T}]`:"";d(`Show me details for ${V}${ie}`)},he=r?`View details for ${y}`:`Go to product page for ${y}`;return _.jsxs("div",{className:F(t,`${P}-msg-product-card`),children:[_.jsx(XM,{imageUrl:x||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:he,name:y,showInWidgetDetails:se}),_.jsxs("div",{className:F(t,`${P}-msg-product-card__content`),children:[_.jsxs("div",{className:F(t,`${P}-msg-product-card__content-header`),children:[_.jsx(KM,{name:y||T,globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:he,showInWidgetDetails:se}),a&&N&&_.jsx("div",{className:F(t,`${P}-msg-product-card__description`),title:N,children:_.jsx(Pa,{globalClassName:t,text:N})})]}),_.jsx("div",{className:F(t,`${P}-msg-product-card__price-row`),children:J?_.jsx("span",{className:F(t,`${P}-msg-product-card__price`),"aria-label":`Price from ${J.low} to ${J.high}`,children:J.range}):_.jsx(Zh,{globalClassName:t,retailPrice:$,discountPrice:D,currencyCode:G})})]})]})},JM=e=>{var t,n;return{id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,listPrice:(t=e.data.listPrice)!=null?t:void 0,priceBreakdown:(n=e.data.priceBreakdown)!=null?n:void 0,currencyCode:e.data.currencyCode}},ZM=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=it(),{overrides:c,isInitialized:d}=ql(),f=Yl(),p=d?c.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return _.jsx(Wl,{tagName:p,props:m,label:"ProductCarousel"})}return _.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&_.jsx("p",{className:F(n,`${P}-product-carousel-title`),children:e}),_.jsx(G5,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>_.jsxs("div",{className:F(n,`${P}-product-carousel-item`),children:[_.jsx(QM,{product:JM(m),globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&_.jsx("p",{className:F(n,`${P}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},lp=44,e9=400,t9=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?lp:Math.min(Math.max(Math.round(t),lp),e9)},n9=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},r9=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=H.useRef(null),[s,a]=H.useState(!1),[u,c]=H.useState(lp),d=n9(e);return H.useEffect(()=>{const f=p=>{var T,y,x;if(d&&p.origin!==d||r.current&&p.source!==r.current.contentWindow)return;const m=p.data;if(!(!m||typeof m.type!="string"))switch(m.type){case"express.payment.available":a(!0),c(t9((T=m.payload)==null?void 0:T.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((x=(y=m.payload)==null?void 0:y.orderId)!=null?x:null);break}};return window.addEventListener("message",f),()=>window.removeEventListener("message",f)},[d,n]),_.jsx("div",{className:F(t,`${P}-cart-express`,{[`${P}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:_.jsx("iframe",{ref:r,className:F(t,`${P}-cart-express-frame`),src:e,title:"Express payment",allow:"payment *",scrolling:"no"})})},Gl=({code:e,globalClassName:t})=>_.jsxs("span",{className:F(t,`${P}-cart-chip`),children:[_.jsx(Zg,{"aria-hidden":"true"}),_.jsx("span",{children:e})]}),yn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:c})=>{let d;if(typeof n=="number")n===0&&!u?d="Free":d=jr(u?-n:n,r);else if(c)d=c;else return null;return _.jsxs("div",{className:F(s,`${P}-cart-total-row`,{emphasized:a}),children:[_.jsxs("span",{className:F(s,`${P}-cart-total-label`),children:[e,t&&_.jsx("span",{className:F(s,`${P}-cart-total-badge`),children:t})]}),_.jsx("span",{className:F(s,`${P}-cart-total-value`),children:d})]})},i9=({item:e,currencyCode:t,loading:n,globalClassName:r,onRemove:s})=>{var u,c,d;const a=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:F(r,`${P}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(r,`${P}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(r,`${P}-cart-item-details`),children:[_.jsx("p",{className:F(r,`${P}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(r,`${P}-cart-item-attrs`),children:[((u=e.variants)!=null?u:[]).map(f=>_.jsxs("p",{className:F(r,`${P}-cart-item-attr`),children:[f.lbl,": ",f.value]},`${f.type}-${f.value}`)),((c=e.promotions)!=null?c:[]).map(f=>_.jsxs("p",{className:F(r,`${P}-cart-item-attr`),children:["Promotion: ",f]},f))]}),((d=e.coupons)!=null?d:[]).length>0&&_.jsx("div",{className:F(r,`${P}-cart-chips`),children:e.coupons.map(f=>_.jsx(Gl,{code:f,globalClassName:r},f))}),_.jsxs("span",{className:F(r,`${P}-cart-item-price`),children:[a&&_.jsx("span",{className:F(r,`${P}-cart-item-original-price`),children:jr(e.originalSubtotal,t)}),_.jsx("span",{className:F(r,`${P}-cart-item-final-price`),children:jr(e.itemSubtotal,t)})]}),_.jsxs("div",{className:F(r,`${P}-cart-item-footer`),children:[_.jsxs("span",{className:F(r,`${P}-cart-item-qty`),children:["Qty: ",e.quantity]}),_.jsx("button",{type:"button",className:F(r,`${P}-cart-item-remove`),disabled:n,onClick:()=>s(e),children:"Remove"})]})]})]})},s9=({cart:e,globalClassName:t,openLinksInNewTab:n})=>{const{sendMessage:r,loading:s}=sn(),[a,u]=H.useState(!0),[c,d]=H.useState(""),{items:f=[],currencyCode:p="USD",subtotal:m,total:T,taxes:y,shippingCost:x,shippingDiscount:N,shippingPromotions:A=[],promotionsDiscount:v,promotions:C=[],couponsDiscount:R,couponsApplied:$=[],bodyMessage:G,footerMessage:D,checkoutButtonUrl:J,expressPaymentUrl:se}=e,he=ee=>{s||r(`Remove ${ee.name} from my cart`)},V=ee=>{r(ee?`I completed express payment. Show my order confirmation for order ${ee}.`:"I completed express payment. Show my order confirmation.")},ie=()=>{const ee=c.trim();!ee||s||(r(`Apply coupon code ${ee}`),d(""))};return _.jsxs("div",{className:F(t,`${P}-cart`),children:[_.jsxs("div",{className:F(t,`${P}-cart-box`),children:[G&&_.jsxs("button",{type:"button",className:F(t,`${P}-cart-summary`),"aria-expanded":a,onClick:()=>u(ee=>!ee),children:[_.jsx("span",{className:F(t,`${P}-cart-summary-text`),children:_.jsx(Pa,{text:G,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${P}-cart-summary-toggle`),"aria-hidden":"true",children:a?_.jsx(Qg,{}):_.jsx(Jg,{})})]}),a&&_.jsxs("div",{className:F(t,`${P}-cart-expanded`),children:[_.jsx("ul",{className:F(t,`${P}-cart-items`),children:f.map(ee=>_.jsx(i9,{item:ee,currencyCode:p,loading:s,globalClassName:t,onRemove:he},ee.itemId))}),$.length>0&&_.jsx("div",{className:F(t,`${P}-cart-chips`,`${P}-cart-applied-coupons`),children:$.map(ee=>_.jsx(Gl,{code:ee,globalClassName:t},ee))}),_.jsxs("div",{className:F(t,`${P}-cart-totals`),children:[_.jsx(yn,{label:"Subtotal",value:m,currencyCode:p,globalClassName:t}),_.jsx(yn,{label:"Coupon",value:R,currencyCode:p,globalClassName:t,isDiscount:!0}),_.jsx(yn,{label:"Promotions",badge:C[0],value:v,currencyCode:p,globalClassName:t,isDiscount:!0}),_.jsx(yn,{label:"Shipping",value:x,currencyCode:p,globalClassName:t,fallback:"TBD"}),_.jsx(yn,{label:"Shipping Discount",badge:A[0],value:N,currencyCode:p,globalClassName:t,isDiscount:!0}),_.jsx(yn,{label:"Tax",value:y,currencyCode:p,globalClassName:t,fallback:"TBD"}),_.jsx(yn,{label:"Total",value:T,currencyCode:p,globalClassName:t,emphasized:!0})]})]})]}),_.jsxs("div",{className:F(t,`${P}-cart-coupon`),children:[_.jsxs("div",{className:F(t,`${P}-cart-coupon-field`),children:[_.jsx("span",{className:F(t,`${P}-cart-coupon-icon`),"aria-hidden":"true",children:_.jsx(Zg,{})}),_.jsx("input",{type:"text",className:F(t,`${P}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:c,disabled:s,onChange:ee=>d(ee.target.value),onKeyDown:ee=>{ee.key==="Enter"&&(ee.preventDefault(),ie())}})]}),_.jsx("button",{type:"button",className:F(t,`${P}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:s||!c.trim(),onClick:ie,children:_.jsx(EN,{"aria-hidden":"true"})})]}),se&&_.jsx(r9,{expressPaymentUrl:se,globalClassName:t,onOrderComplete:V}),J&&_.jsxs("a",{className:F(t,`${P}-cart-checkout-button`),href:J,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[_.jsx(mN,{"aria-hidden":"true"}),_.jsx("span",{children:"Checkout"})]}),_.jsx("p",{className:F(t,`${P}-cart-footer`),children:D||"Shipping and taxes calculated at checkout."})]})},o9=({item:e,currencyCode:t,globalClassName:n})=>{var s,a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:F(n,`${P}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(n,`${P}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(n,`${P}-cart-item-details`),children:[_.jsx("p",{className:F(n,`${P}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(n,`${P}-cart-item-attrs`),children:[((s=e.variants)!=null?s:[]).map(c=>_.jsxs("p",{className:F(n,`${P}-cart-item-attr`),children:[c.lbl,": ",c.value]},`${c.type}-${c.value}`)),((a=e.promotions)!=null?a:[]).map(c=>_.jsxs("p",{className:F(n,`${P}-cart-item-attr`),children:["Promotion: ",c]},c))]}),((u=e.coupons)!=null?u:[]).length>0&&_.jsx("div",{className:F(n,`${P}-cart-chips`),children:e.coupons.map(c=>_.jsx(Gl,{code:c,globalClassName:n},c))}),_.jsxs("span",{className:F(n,`${P}-cart-item-price`),children:[r&&_.jsx("span",{className:F(n,`${P}-cart-item-original-price`),children:jr(e.originalSubtotal,t)}),_.jsx("span",{className:F(n,`${P}-cart-item-final-price`),children:jr(e.itemSubtotal,t)})]}),_.jsx("div",{className:F(n,`${P}-cart-item-footer`),children:_.jsxs("span",{className:F(n,`${P}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},a9=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},u9=({order:e,globalClassName:t})=>{const[n,r]=H.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:c="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:T,shippingPromotions:y=[],promotionsDiscount:x,promotions:N=[],couponsDiscount:A,couponsApplied:v=[],bodyMessage:C,footerMessage:R}=e;return _.jsxs("div",{className:F(t,`${P}-cart`),children:[_.jsxs("div",{className:F(t,`${P}-cart-banner`),children:[_.jsx("span",{className:F(t,`${P}-cart-banner-icon`),"aria-hidden":"true",children:_.jsx(yN,{})}),_.jsx("p",{className:F(t,`${P}-cart-banner-text`),children:"Your order is confirmed!"})]}),_.jsxs("div",{className:F(t,`${P}-order-confirmation-meta`),children:[_.jsxs("span",{children:["Order No: ",s]}),_.jsxs("span",{children:["Ordered On: ",a9(a)]})]}),_.jsxs("div",{className:F(t,`${P}-cart-box`),children:[C&&_.jsxs("button",{type:"button",className:F(t,`${P}-cart-summary`),"aria-expanded":n,onClick:()=>r($=>!$),children:[_.jsx("span",{className:F(t,`${P}-cart-summary-text`),children:_.jsx(Pa,{text:C,globalClassName:t,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${P}-cart-summary-toggle`),"aria-hidden":"true",children:n?_.jsx(Qg,{}):_.jsx(Jg,{})})]}),n&&_.jsxs("div",{className:F(t,`${P}-cart-expanded`),children:[_.jsx("ul",{className:F(t,`${P}-cart-items`),children:u.map($=>_.jsx(o9,{item:$,currencyCode:c,globalClassName:t},$.itemId))}),v.length>0&&_.jsx("div",{className:F(t,`${P}-cart-chips`,`${P}-cart-applied-coupons`),children:v.map($=>_.jsx(Gl,{code:$,globalClassName:t},$))}),_.jsxs("div",{className:F(t,`${P}-cart-totals`),children:[_.jsx(yn,{label:"Subtotal",value:d,currencyCode:c,globalClassName:t}),_.jsx(yn,{label:"Coupon",value:A,currencyCode:c,globalClassName:t,isDiscount:!0}),_.jsx(yn,{label:"Promotions",badge:N[0],value:x,currencyCode:c,globalClassName:t,isDiscount:!0}),_.jsx(yn,{label:"Shipping",value:m,currencyCode:c,globalClassName:t,fallback:"TBD"}),_.jsx(yn,{label:"Shipping Discount",badge:y[0],value:T,currencyCode:c,globalClassName:t,isDiscount:!0}),_.jsx(yn,{label:"Tax",value:p,currencyCode:c,globalClassName:t,fallback:"TBD"}),_.jsx(yn,{label:"Total",value:f,currencyCode:c,globalClassName:t,emphasized:!0})]})]})]}),_.jsx("p",{className:F(t,`${P}-cart-footer`),children:R||"Shipping and taxes calculated at checkout."})]})},l9=({image:e,alt:t,globalClassName:n})=>{const[r,s]=H.useState(e.src),[a,u]=H.useState(!1),c=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return _.jsx("img",{className:F(n,`${P}-pdp-gallery__image`,{[`${P}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:c})},c9=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return _.jsxs(qh,{className:F(n,`${P}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[_.jsx(zh,{className:F(n,`${P}-pdp-gallery__item-group`),children:e.map((s,a)=>_.jsx(jh,{index:a,className:F(n,`${P}-pdp-gallery__item`),children:_.jsx(l9,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&_.jsxs(Bh,{className:F(n,`${P}-pdp-gallery__control`),children:[_.jsx(Vh,{className:F(n,`${P}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:_.jsx(eb,{size:"16px"})}),_.jsx($h,{className:F(n,`${P}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:_.jsx(tb,{size:"16px"})})]}),r&&_.jsx(Hh,{className:F(n,`${P}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>_.jsx(Uh,{index:a,className:F(n,`${P}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Ra="color",cp=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,d9=e=>e.replace(/(^|\/)large\//,"$1medium/"),n_=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Ra&&n.vals.includes(t)),r_=(e,t)=>{const n=d9(t),r=cp(e,n);return n===t?{src:r}:{src:r,fallbackSrc:cp(e,t)}},f9=(e,t)=>{var c,d;const n=((c=e.imgGroups)!=null?c:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>n_(f,t)),s=n.find(f=>f.vattr===null),a=r||s||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(f=>r_(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[r_(e.baseUrl,e.imageUrl)]:[]},h9=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(c=>c.viewType==="swatch"&&n_(c,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?cp(e.baseUrl,r):""},Xl=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(s=>{var a;return((a=s.vars)==null?void 0:a[t])!==n||s.ord===!1?!1:Object.entries(r).every(([u,c])=>{var d;return u===t||((d=s.vars)==null?void 0:d[u])===c})}),p9=(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]}))},m9=(e,t,n,r,s)=>{if(!e||e.length===0)return oe(U({},s),{[n]:r});const a=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length&&Object.entries(s).every(([f,p])=>{var m;return f===n||((m=c.vars)==null?void 0:m[f])===p})});if(a)return U({},a.vars);const u=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length});return u?U({},u.vars):oe(U({},s),{[n]:r})},g9=(e,t)=>{var s,a,u,c;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(s=e.id)!=null?s:null;if(!e.vmat||e.vmat.length===0)return(a=e.id)!=null?a:null;const r=e.vmat.find(d=>d.ord!==!1&&Object.entries(t).every(([f,p])=>{var m;return((m=d.vars)==null?void 0:m[f])===p}));return(c=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?c:null},E9=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([s,a])=>{var u;return((u=r.vars)==null?void 0:u[s])===a}));return n!=null&&n.pr?n.pr:e.pr},y9=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>Xl(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},T9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var de,ae,_e,ue,z,Z,w;const{addToCart:s,loading:a}=sn(),u=e.data,c=(de=u.vattr)!=null?de:[],[d,f]=H.useState(()=>y9(u)),p=p9(u.vmat,d),m=(_e=(ae=u.quantity)==null?void 0:ae.minQuantity)!=null?_e:1,T=(z=(ue=u.quantity)==null?void 0:ue.maxQuantity)!=null?z:Number.POSITIVE_INFINITY,y=(w=(Z=u.quantity)==null?void 0:Z.increment)!=null?w:1,[x,N]=H.useState(m),A=d[Ra],v=H.useMemo(()=>f9(u,A),[u,A]),C=H.useMemo(()=>E9(u,d),[u,d]),R=c.find(k=>k.id===Ra),$=c.filter(k=>k.id!==Ra),G=(k,q)=>()=>{f(O=>{const pe=!Xl(u.vmat,k,q,O);return k===Ra||pe?m9(u.vmat,c,k,q,O):oe(U({},O),{[k]:q})})},D=()=>{if(a)return;const k=g9(u,d);if(!k)return;const q=c.map(O=>{const pe=O.opts.find(Oe=>Oe.val===d[O.id]);return pe?{label:O.lbl||O.id,value:pe.name||pe.val}:null}).filter(O=>O!==null);s({productName:u.name,sku:k,quantity:x,variants:q})},J=!p||x-y<m,se=!p||x+y>T,he=k=>{var O;const q=d[k.id];return(O=k.opts.find(pe=>pe.val===q))==null?void 0:O.name},V=()=>N(k=>Math.max(m,k-y)),ie=()=>N(k=>Math.min(T,k+y)),ee=k=>_.jsxs("div",{className:F(t,`${P}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${P}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${k.id}`,className:F(t,`${P}-msg-pdp__variant-name`),children:k.lbl||k.id}),he(k)&&_.jsx("span",{className:F(t,`${P}-msg-pdp__variant-value`),children:he(k)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${k.id}`,className:F(t,`${P}-msg-pdp__chips`),children:k.opts.map(q=>{const O=Xl(u.vmat,k.id,q.val,d),pe=d[k.id]===q.val;return _.jsxs("label",{className:F(`${P}-msg-pdp__chip`,{selected:pe,unavailable:!O}),children:[_.jsx("input",{type:"radio",name:`variant-${k.id}`,value:q.val,checked:pe,"aria-description":O?void 0:"unavailable",onChange:G(k.id,q.val),className:`${P}-msg-pdp__radio-input`}),_.jsx("span",{children:q.name||q.val})]},q.val)})})]},k.id),we=k=>_.jsxs("div",{className:F(t,`${P}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${P}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${k.id}`,className:F(t,`${P}-msg-pdp__variant-name`),children:k.lbl||"Color"}),he(k)&&_.jsx("span",{className:F(t,`${P}-msg-pdp__variant-value`),children:he(k)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${k.id}`,className:F(t,`${P}-msg-pdp__swatches`),children:k.opts.map(q=>{const O=Xl(u.vmat,k.id,q.val,d),pe=d[k.id]===q.val,Oe=h9(u,q.val);return Oe?_.jsxs("label",{className:F(`${P}-msg-pdp__swatch`,{selected:pe,unavailable:!O}),children:[_.jsx("input",{type:"radio",name:`variant-${k.id}`,value:q.val,checked:pe,"aria-label":q.name||q.val,"aria-description":O?void 0:"unavailable",onChange:G(k.id,q.val),className:`${P}-msg-pdp__radio-input`}),_.jsx("img",{className:F(t,`${P}-msg-pdp__swatch-image`),src:Oe,alt:q.name||q.val,loading:"lazy"})]},q.val):_.jsxs("label",{className:F(`${P}-msg-pdp__chip`,{selected:pe,unavailable:!O}),children:[_.jsx("input",{type:"radio",name:`variant-${k.id}`,value:q.val,checked:pe,"aria-description":O?void 0:"unavailable",onChange:G(k.id,q.val),className:`${P}-msg-pdp__radio-input`}),_.jsx("span",{children:q.name||q.val})]},q.val)})})]});return _.jsx("div",{className:F(t,`${P}-msg-pdp`),children:_.jsxs("div",{className:F(t,`${P}-msg-pdp__card`),children:[_.jsx("div",{className:F(t,`${P}-msg-pdp__gallery`),children:_.jsx(c9,{images:v,altText:u.name,globalClassName:t})}),_.jsxs("div",{className:F(t,`${P}-msg-pdp__content`),children:[u.slugUrl?_.jsx("a",{href:u.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:F(t,`${P}-msg-pdp__title-link`),"aria-label":`Go to product page for ${u.name}`,children:u.name}):_.jsx("p",{className:F(t,`${P}-msg-pdp__title`),children:u.name}),_.jsx(Zh,{globalClassName:t,className:`${P}-msg-pdp__price`,retailPrice:C==null?void 0:C.orig,discountPrice:(C==null?void 0:C.cur)||(C==null?void 0:C.prom),currencyCode:u.ccy,fontSize:"14px"}),u.dscr&&_.jsx("p",{className:F(t,`${P}-msg-pdp__description`),children:u.dscr}),R&&we(R),$.map(ee),r&&_.jsxs("div",{className:F(t,`${P}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${P}-msg-pdp__variant-label`),children:[_.jsx("span",{className:F(t,`${P}-msg-pdp__variant-name`),children:"Quantity"}),_.jsx("span",{className:F(t,`${P}-msg-pdp__variant-value`),children:x})]}),_.jsxs("div",{className:F(t,`${P}-msg-pdp__stepper`),children:[_.jsx(Zn,{className:`${P}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:_.jsx(oN,{}),disabled:J,onClick:V}),_.jsx("span",{className:F(t,`${P}-msg-pdp__quantity`),children:x}),_.jsx(Zn,{className:`${P}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:_.jsx(aN,{}),disabled:se,onClick:ie})]})]}),r&&_.jsx("div",{className:F(t,`${P}-msg-pdp__actions`),children:_.jsx(Wu,{className:`${P}-msg-pdp__add-to-cart`,disabled:!p||a,onClick:D,children:"Add to cart"})})]})]})})},b9=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},_9=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:s=!1})=>{const{addToCart:a,loading:u}=sn();if(!e.length)return null;const c=`auto repeat(${e.length}, 1fr)`,d=`${90+e.length*140}px`,f=p=>()=>{u||a({productName:p.name,sku:p.id})};return _.jsx("div",{className:F(n,`${P}-product-comparison`),children:_.jsxs("div",{className:`${P}-product-comparison__grid`,style:{gridTemplateColumns:c,minWidth:d},children:[_.jsxs("div",{className:`${P}-product-comparison__header`,children:[_.jsx("div",{className:`${P}-product-comparison__header-spacer`}),e.map(p=>{var T,y,x,N;const m=b9(p);return _.jsxs("div",{className:F(n,`${P}-product-comparison__product-col`),children:[m&&_.jsx("img",{className:F(n,`${P}-product-comparison__image`),src:m,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?_.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:F(n,`${P}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):_.jsx("span",{className:F(n,`${P}-product-comparison__name`),children:p.name}),_.jsx(Zh,{globalClassName:n,retailPrice:(T=p.pr)==null?void 0:T.orig,discountPrice:(N=(y=p.pr)==null?void 0:y.prom)!=null?N:(x=p.pr)==null?void 0:x.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),_.jsx("div",{className:`${P}-product-comparison__table`,children:t.map(p=>_.jsxs("div",{className:`${P}-product-comparison__row`,children:[_.jsx("div",{className:F(n,`${P}-product-comparison__row-label`),children:p.row_name}),e.map((m,T)=>_.jsx("div",{className:F(n,`${P}-product-comparison__row-value`),children:p.values[T]},`${p.row_name}-${m.id}`))]},p.row_name))}),s&&_.jsxs("div",{className:`${P}-product-comparison__footer`,children:[_.jsx("div",{className:`${P}-product-comparison__footer-spacer`}),e.map(p=>_.jsx("div",{className:F(n,`${P}-product-comparison__footer-cell`),children:_.jsxs(Wu,{className:`${P}-product-comparison__add-to-cart`,disabled:u,onClick:f(p),children:[_.jsx(pN,{size:"14px"}),"Add to cart"]})},`cart-${p.id}`))]})]})})},i_=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:s,loading:a}=sn(),{isCartMgmtSupported:u,logger:c}=it(),{overrides:d,isInitialized:f}=ql(),p=Yl(),m=H.useMemo(()=>e.response.map(T=>{var x,N;if(T.type!=="markdown")return T;const y=dg((N=(x=T.data)==null?void 0:x.content)!=null?N:"");return y&&y.type!=="markdown"?y:T}),[e.response]);return _.jsx(_.Fragment,{children:m.map((T,y)=>{var x,N,A,v,C,R,$,G,D,J,se,he,V,ie,ee,we,de,ae,_e,ue,z,Z,w,k,q;switch(T.type){case"markdown":{const O=(N=(x=T.data)==null?void 0:x.content)!=null?N:"";return T.index===ji&&fg(O)?null:_.jsx(Pa,{text:O,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1},`${T.type}-${(A=T.index)!=null?A:y}`)}case"product_carousel":return _.jsx(ZM,{title:(C=(v=T.data)==null?void 0:v.title)!=null?C:"",products:($=(R=T.data)==null?void 0:R.products)!=null?$:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(G=T.index)!=null?G:y}`);case"product_tile":return _.jsx(T9,{product:T.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(D=T.index)!=null?D:y}`);case"product_comparison":return _.jsx(_9,{products:(se=(J=T.data)==null?void 0:J.products)!=null?se:[],table:(V=(he=T.data)==null?void 0:he.table)!=null?V:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(ie=T.index)!=null?ie:y}`);case"cart":{const O=(de=(we=(ee=T.data)==null?void 0:ee.cart)==null?void 0:we.cartSummary)==null?void 0:de.cartDetails;return O?_.jsx(s9,{cart:O,productsToHighlight:T.data.products_to_highlight,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${T.type}-${(ae=T.index)!=null?ae:y}`):null}case"order_confirmation":{const O=(ue=(_e=T.data)==null?void 0:_e.order)==null?void 0:ue.orderDetails;return O?_.jsx(u9,{order:O,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${T.type}-${(z=T.index)!=null?z:y}`):null}case"tool_results":{const O=T.data,pe=T.output_name,Oe=f&&pe&&Object.prototype.hasOwnProperty.call(d,pe)?d[pe]:void 0,ye=typeof Oe=="string"?Oe:void 0;if(!ye||!pe)return c!=null&&c.isDevelopment&&(pe?c.warn(`🦜 tool_results "${pe}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${pe}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(d),payload:O}):c.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:O})),null;const Re={name:pe,payload:O,api:p};return _.jsx(WM,{overrideName:pe,children:_.jsx(Wl,{tagName:ye,props:Re,label:`toolResult:${pe}`})},`${T.type}-${pe}-${(Z=T.index)!=null?Z:y}`)}case"suggestions":return _.jsx("div",{style:{marginTop:"0.5rem"},children:_.jsx(CD,{disabled:a,suggestions:(k=(w=T.data)==null?void 0:w.display_text)!=null?k:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:s})},`${T.type}-${(q=T.index)!=null?q:y}`);default:return null}})})},x9=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=it(),a=H.useMemo(()=>{if(typeof e.content!="string")return null;try{const d=JSON.parse(e.content);if(d&&typeof d=="object"&&Array.isArray(d.response))return d}catch(d){return null}const c=dg(e.content);return c?{response:[c]}:null},[e.content]),u=H.useMemo(()=>{const c="Oops, I had trouble with your request.";if(typeof e.content!="string")return s==null||s.warn("Message content is not richtext format. Showing fallback text.",e.content),c;const d=e.content.trim();try{const f=JSON.parse(d);if(typeof f=="object"&&f!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),f.text||f.message||c}catch(f){if(d.startsWith("{")||d.startsWith("["))return s==null||s.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),c}return e.content||c},[s,e.content]);switch(e.role){case"user":return _.jsx("div",{className:F(t,`${P}-message`,r?"standalone":"embedded"),children:_.jsx("div",{className:F(t,`${P}-user-message`,r?"standalone":"embedded"),children:_.jsxs("div",{className:F(t,`${P}-user-message-row`,r?"standalone":"embedded"),children:[_.jsx("span",{className:F(t,`${P}-message-icon user-message-icon`,r?"standalone":"embedded"),children:_.jsx(gN,{})}),_.jsx("p",{className:F(t,`${P}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return _.jsx("div",{className:F(t,`${P}-message-group`,r?"standalone":"embedded"),children:_.jsx("div",{className:`${P}-message-group-child`,children:a?_.jsx(i_,{content:a,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):_.jsx(Pa,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return _.jsx("div",{className:F(t,`${P}-message`,r?"standalone":"embedded"),children:_.jsx("p",{className:F(t,`${P}-reset-message`),children:e.content})})}},w9=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>_.jsxs("div",{className:F(n,`${P}-send-error`,r?"standalone":"embedded"),role:"alert",children:[_.jsx("span",{className:F(n,`${P}-send-error-text`),children:e}),_.jsxs("button",{type:"button",className:F(n,`${P}-retry-button`),onClick:t,children:[_.jsx(_N,{"aria-hidden":"true"})," Retry"]})]}),S9="You are offline or we couldn't reach the assistant. Check connection and try again.",dp=({isWidgetStandalone:e})=>{var se,he;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=it(),{messages:a,streamingBlocks:u,isAgentTyping:c,loading:d,progressMessage:f,connectionStatus:p,error:m,sendError:T,retryLastMessage:y,retryConnection:x}=sn(),N=H.useRef(null),A=a.length>0,v=u.some(Jv),C=A&&(d||c)&&!v,R=p==="reconnecting"&&!C,$=p==="error";let G=null;$?G={message:m!=null?m:S9,kind:"connection",onRetry:x}:T&&(G={message:T.message,kind:"send",onRetry:y}),H.useEffect(()=>{var V;(V=N.current)==null||V.scrollIntoView({behavior:"smooth"})},[]),H.useEffect(()=>{var V;s&&((V=N.current)==null||V.scrollIntoView({behavior:"smooth"}))},[a,u,T,m,s]);const D=(se=G==null?void 0:G.message)!=null?se:null,J=(he=G==null?void 0:G.kind)!=null?he:null;return H.useEffect(()=>{D&&(r==null||r.error("Error message shown to user",{message:D,kind:J}))},[D,J,r]),_.jsxs(_.Fragment,{children:[d&&!A&&_.jsx(RD,{globalClassName:t,isWidgetStandalone:e}),a.map(V=>_.jsx(x9,{message:V,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},V.id)),G&&_.jsx(w9,{message:G.message,onRetry:G.onRetry,globalClassName:t,isWidgetStandalone:e}),v&&_.jsxs("div",{className:F(t,`${P}-message-group`,e?"standalone":"embedded"),children:[_.jsx(i_,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(d||c)&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e})]}),C&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),R&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),_.jsx("div",{ref:N})]})},v9=()=>_.jsxs("svg",{className:`${P}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),A9=()=>_.jsx("svg",{className:`${P}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("path",{d:"M8 1v3M8 12v3M1 8h3M12 8h3M3.05 3.05l2.12 2.12M10.83 10.83l2.12 2.12M3.05 12.95l2.12-2.12M10.83 5.17l2.12-2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),fp=({steps:e,globalClassName:t})=>{const{overrides:n,isInitialized:r}=ql(),s=Yl();if(e.length===0)return null;const a=r?n.ProgressSteps:void 0;if(a){const u={name:"ProgressSteps",payload:{steps:e},api:s};return _.jsx(Wl,{tagName:a,props:u,label:"ProgressSteps"})}return _.jsx("div",{className:F(t,`${P}-progress-steps-panel`),children:_.jsxs("div",{className:`${P}-progress-steps`,children:[_.jsxs("span",{className:`${P}-progress-steps-header`,children:["Loading Step ",e.length]}),_.jsx("ul",{className:`${P}-progress-steps-list`,children:e.map((u,c)=>{const d=c<e.length-1,f=c===e.length-1;return _.jsxs("li",{className:F(`${P}-progress-step`,f&&"active"),children:[f&&_.jsx("span",{className:`${P}-progress-step-arc`}),_.jsx("span",{className:`${P}-progress-step-text`,children:u}),_.jsx("span",{className:F(`${P}-progress-step-icon`,d?"done":"active"),children:d?_.jsx(v9,{}):_.jsx(A9,{})})]},`${c}-${u}`)})})]})})},s_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=it(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:c,downloadTranscript:d}=sn(),f=s;return _.jsxs("div",{className:F(e,`${P}-container`,`${P}-embedded-chat`),style:t,children:[_.jsx("div",{className:F(e,`${P}-message-container`,`container-${n}`,"embedded"),children:_.jsx(dp,{isWidgetStandalone:!1})}),_.jsx(fp,{steps:c,globalClassName:e}),_.jsx(th,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:p=>a(p)}),_.jsx("div",{className:F(`${P}-embedded-chat-menu`),children:_.jsxs(O5,{componentType:"chat",children:[_.jsx(vb,{componentType:"chat"}),_.jsx(Ry,{componentType:"chat",onClearChat:u}),r&&_.jsx(Ly,{componentType:"chat",onDownloadTranscript:d})]})})]})},o_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=H.useState((d=e.container)==null?void 0:d.current),a=H.useSyncExternalStore(C9,()=>!1,()=>!0),{getRootNode:u}=Ul();if(H.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const c=r!=null?r:N9(u);return _.jsx(_.Fragment,{children:H.Children.map(t,f=>Ds.createPortal(f,c))})},N9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return es(n)?n:br(t).body},C9=()=>()=>{},a_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=it(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=ri(),{loading:d,isAgentTyping:f,sendMessage:p,resetConversation:m,progressSteps:T,downloadTranscript:y}=sn(),{isOpen:x}=s||{},N=!!s.isOpen,A=r==="standalone",v=f||d,C=()=>{ni(!1)};return N?_.jsx(yb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:N,children:_.jsx(o_,{children:_.jsx(Gh,{className:F(e,`${P}-container`,`${P}-dialog`,a,u&&"full-height"),style:U(U({},t),c&&{width:c}),children:_.jsxs(Yh,{className:F(e,`${P}-dialog-content`,{standalone:A,embedded:!A}),children:[_.jsx(wb,{componentType:"dialog",onClearChat:m,onClose:C,onDownloadTranscript:y}),_.jsx(Wh,{className:F(e,`${P}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:_.jsx(dp,{isWidgetStandalone:A,isOpen:x})}),_.jsx(fp,{steps:T,globalClassName:e}),_.jsx(th,{componentType:"dialog",isLoading:v,onSubmit:R=>p(R)})]})})})}):null},u_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=it(),{mode:r,status:s,isModalFullscreen:a}=ri(),{loading:u,isAgentTyping:c,sendMessage:d,resetConversation:f,progressSteps:p,downloadTranscript:m}=sn(),{isOpen:T}=s||{},y=!!s.isOpen,x=r==="standalone",N=c||u,A=({open:C})=>{ni(C)},v=()=>{ni(!1)};return y?_.jsx(yb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:_.jsx(o_,{children:_.jsxs("div",{className:F(e,`${P}-modal-container`),style:t,children:[_.jsx(hb,{className:F(e,`${P}-modal-backdrop`)}),_.jsx(Gh,{className:F(e,`${P}-container`,`${P}-modal`,{fullscreen:a,standalone:x,embedded:!x}),children:_.jsxs(Yh,{className:F(e,`${P}-modal-content`,{standalone:x,embedded:!x}),children:[_.jsx(wb,{componentType:"modal",onClearChat:f,onClose:v,onDownloadTranscript:m}),_.jsx(Wh,{className:F(e,`${P}-message-container`,`container-${n}`,{standalone:x,embedded:!x}),children:_.jsx(dp,{isWidgetStandalone:x,isOpen:T})}),_.jsx(fp,{steps:p,globalClassName:e}),_.jsx(th,{componentType:"modal",isLoading:N,onSubmit:C=>d(C)})]})})]})})}):null},k9=()=>{const e=ri(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(dN,{}):t==="dialog"?_.jsx(a_,{}):t==="modal"?_.jsx(u_,{}):_.jsx(s_,{})},O9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=bD();H.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&s(d))};return mD(a),()=>{gD(a)}},[e,t,n,r,s])};function I9({isReady:e,hasError:t,transmit:n}){const r=H.useRef([]),s=H.useRef(e);s.current=e;const a=H.useRef(n);a.current=n;const u=H.useCallback(c=>{s.current?a.current(c):r.current.push(c)},[]);return H.useEffect(()=>{if(e&&r.current.length){const c=r.current;r.current=[],c.forEach(d=>a.current(d))}},[e]),H.useEffect(()=>{t&&(r.current=[])},[t]),u}const l_={copilot:"Ask Copilot",messaging:"Ask a question"},P9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=it(),{placeholder:s,isResponseLoading:a}=Jh(),u=s||l_[r],[c,d]=H.useState(""),f=t||a,p=m=>{const T=c.trim();T&&(m.preventDefault(),e(T),d(""))};return _.jsxs("form",{className:F(n,`${P}-prompts-input-container`),name:`${P}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${P}-prompts-input`,"aria-label":u,children:_.jsx(Fh,{className:F(n,`${P}-prompts-input-icon`)})}),_.jsx("input",{id:`${P}-prompts-input`,className:F(n,`${P}-prompts-input`),name:`${P}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),_.jsx(Zn,{className:F(n,`${P}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(af,{}),disabled:f})]})},R9=()=>{const{globalClassName:e,mode:t}=it(),{placeholder:n}=Jh(),r=n||l_[t];return _.jsxs("div",{className:F(e,`${P}-prompts-header`),children:[_.jsx(Fh,{className:F(e,`${P}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:F(e,`${P}-prompts-header-text`),children:r})]})},L9=()=>{const{globalClassName:e,themeVariables:t}=it(),{isOpen:n,elementId:r,promptsDisplay:s}=Jh(),{isConnected:a,sendMessage:u,connectionStatus:c}=sn(),d=s!=="buttons",[f,p]=H.useState(null),m=c==="error",T=c==="connecting",y=I9({isReady:a,hasError:m,transmit:u});H.useEffect(()=>{if(!r||f)return;const N=document.getElementById(r);N&&p(N)},[r,f]);const x=H.useCallback(N=>{ni(!0),y(N)},[y]);return!n||!f?null:Ds.createPortal(_.jsxs("div",{className:F(e,`${P}-prompts-extension-container`),style:t,children:[d&&_.jsx(P9,{onSubmit:x,disabled:m}),!d&&_.jsx(R9,{}),!m&&T&&_.jsx("p",{className:F(e,`${P}-prompts-connecting-message`),children:"Connecting to agent..."}),m&&_.jsx("p",{className:F(e,`${P}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),f)},D9=()=>(O9(),_.jsx(L9,{})),c_=e=>_.jsxs(Ug,oe(U({},e),{children:[_.jsx(k9,{}),_.jsx(D9,{})]}));var Kl={},d_;function M9(){if(d_)return Kl;d_=1;var e=Vg();return Kl.createRoot=e.createRoot,Kl.hydrateRoot=e.hydrateRoot,Kl}var F9=M9();const f_=(e,t,n,r)=>{F9.createRoot(e).render(_.jsx(c_,oe(U({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},B9=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=cn(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let c;const d=(p,m)=>{for(const T of p)if(T.type==="childList"&&T.addedNodes.length)for(const y of T.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(At(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(c),f_(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),c=setTimeout(()=>{f.disconnect(),At(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},U9=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=cn(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 c=document.getElementById(t);if(!c){At(!0,"warn","Container element not found for id:",t),At(!0,"warn","Beginning observation for element"),B9(U({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}f_(c,s,n,r)};class H9 extends HTMLElement{constructor(){super(...arguments);$e(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const j9={components:{setEntryType:Mg,toggleWidgetOpen:ni,toggleWidgetMinimized:$u,toggleModalFullscreen:tf,setWidgetType:Vu,setWidgetDialogPosition:nf,loadPromptsComponent:TD,togglePromptsExtensionOpen:xb}};ke.AgentForceWidget=c_,ke.AgentforceWidgetProvider=Ug,ke.CIMULATE_WIDGET_READY_EVENT=Eg,ke.MessagingDialog=a_,ke.MessagingEmbed=s_,ke.MessagingModal=u_,ke.MessagingProvider=bg,ke.OverrideElement=H9,ke.eventHandlers=j9,ke.injectMessagingWidget=U9,ke.useMessaging=sn,Object.defineProperty(ke,Symbol.toStringTag,{value:"Module"})}));
|
|
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=ka(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}Fb.peek=z8;function Fb(e){return e.value||""}function z8(){return"<"}Bb.peek=$8;function Bb(e,t,n,r){const s=ip(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,U({before:f,after:"]"},d.current()))),f+=d.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,U({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,U({before:f,after:e.title?" ":")"},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,U({before:f,after:s},d.current()))),f+=d.move(s),l()),f+=d.move(")"),u(),f}function $8(){return"!"}Ub.peek=V8;function Ub(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 V8(){return"!"}Hb.peek=q8;function Hb(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 q8(){return"`"}function jb(e,t){const n=yf(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))}zb.peek=Y8;function zb(e,t,n,r){const s=ip(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(jb(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 Y8(e,t,n){return jb(e,n)?"<":"["}$b.peek=W8;function $b(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 W8(){return"["}function sp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function G8(e){const t=sp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function X8(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 Vb(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 K8(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?X8(n):sp(n);const l=e.ordered?u==="."?")":".":G8(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),Vb(n)===u&&p){let m=-1;for(;++m<e.children.length;){const T=e.children[m];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=l),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function Q8(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 J8(e,t,n,r){const s=Q8(n);let a=n.bulletCurrent||sp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(u-a.length)),l.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),p);return d(),f;function p(m,T,y){return T?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function Z8(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const eM=rl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function tM(e,t,n,r){return(e.children.some(function(u){return eM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function nM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}qb.peek=rM;function qb(e,t,n,r){const s=nM(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=zl(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=ka(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=zl(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+ka(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function rM(e,t,n){return n.options.strong||"*"}function iM(e,t,n,r){return n.safe(e.value,r)}function sM(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 oM(e,t,n){const r=(Vb(n)+(n.options.ruleSpaces?" ":"")).repeat(sM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Yb={blockquote:k8,break:Db,code:D8,definition:F8,emphasis:Mb,hardBreak:Db,heading:j8,html:Fb,image:Bb,imageReference:Ub,inlineCode:Hb,link:zb,linkReference:$b,list:K8,listItem:J8,paragraph:Z8,root:tM,strong:qb,text:iM,thematicBreak:oM};function aM(){return{enter:{table:uM,tableData:Wb,tableHeader:Wb,tableRow:cM},exit:{codeText:dM,table:lM,tableData:op,tableHeader:op,tableRow:op}}}function uM(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 lM(e){this.exit(e),this.data.inTable=void 0}function cM(e){this.enter({type:"tableRow",children:[]},e)}function op(e){this.exit(e)}function Wb(e){this.enter({type:"tableCell",children:[]},e)}function dM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,fM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function fM(e,t){return t==="|"?t:e}function hM(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
51
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:l}};function u(y,x,v,A){return f(p(y,v,A),y.align)}function l(y,x,v,A){const S=m(y,v,A),C=f([S]);return C.slice(0,C.indexOf(`
|
|
52
|
+
`))}function d(y,x,v,A){const S=v.enter("tableCell"),C=v.enter("phrasing"),P=v.containerPhrasing(y,ae(U({},A),{before:a,after:a}));return C(),S(),P}function f(y,x){return N8(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function p(y,x,v){const A=y.children;let S=-1;const C=[],P=x.enter("table");for(;++S<A.length;)C[S]=m(A[S],x,v);return P(),C}function m(y,x,v){const A=y.children;let S=-1;const C=[],P=x.enter("tableRow");for(;++S<A.length;)C[S]=d(A[S],y,x,v);return P(),C}function T(y,x,v){let A=Yb.inlineCode(y,x,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function pM(){return{exit:{taskListCheckValueChecked:Gb,taskListCheckValueUnchecked:Gb,paragraph:gM}}}function mM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:EM}}}function Gb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function gM(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 EM(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=Yb.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 yM(){return[KD(),E8(),_8(),aM(),pM()]}function TM(e){return{extensions:[QD(),y8(e),x8(),hM(e),mM()]}}const bM={tokenize:AM,partial:!0},Xb={tokenize:NM,partial:!0},Kb={tokenize:CM,partial:!0},Qb={tokenize:kM,partial:!0},_M={tokenize:OM,partial:!0},Jb={name:"wwwAutolink",tokenize:SM,previous:e_},Zb={name:"protocolAutolink",tokenize:vM,previous:t_},Vr={name:"emailAutolink",tokenize:wM,previous:n_},kr={};function xM(){return{text:kr}}let us=48;for(;us<123;)kr[us]=Vr,us++,us===58?us=65:us===91&&(us=97);kr[43]=Vr,kr[45]=Vr,kr[46]=Vr,kr[95]=Vr,kr[72]=[Vr,Zb],kr[104]=[Vr,Zb],kr[87]=[Vr,Jb],kr[119]=[Vr,Jb];function wM(e,t,n){const r=this;let s,a;return u;function u(m){return!ap(m)||!n_.call(r,r.previous)||up(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return ap(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(_M,p,f)(m):m===45||m===95||Zt(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&&ln(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function SM(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!e_.call(r,r.previous)||up(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(bM,e.attempt(Xb,e.attempt(Kb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function vM(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&t_.call(r,r.previous)&&!up(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(ln(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const T=s.toLowerCase();if(T==="http"||T==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||Xu(m)||ut(m)||Wi(m)||Ku(m)?n(m):e.attempt(Xb,e.attempt(Kb,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function AM(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 NM(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(Qb,d,l)(f):f===null||ut(f)||Wi(f)||f!==45&&Ku(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 CM(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(Qb,t,a)(u):u===null||ut(u)||Wi(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function kM(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||ut(l)||Wi(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||ut(l)||Wi(l)?t(l):r(l)}function a(l){return ln(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):ln(l)?(e.consume(l),u):n(l)}}function OM(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return Zt(a)?n(a):t(a)}}function e_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ut(e)}function t_(e){return!ln(e)}function n_(e){return!(e===47||ap(e))}function ap(e){return e===43||e===45||e===46||e===95||Zt(e)}function up(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const IM={tokenize:UM,partial:!0};function PM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:MM,continuation:{tokenize:FM},exit:BM}},text:{91:{name:"gfmFootnoteCall",tokenize:DM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:RM,resolveTo:LM}}}}function RM(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=tr(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 LM(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 DM(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||ut(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return s.includes(tr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ut(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 MM(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(x)}function p(x){if(u>999||x===93&&!l||x===null||x===91||ut(x))return n(x);if(x===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=tr(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return ut(x)||(l=!0),u++,e.consume(x),x===92?m:p}function m(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}function T(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),Je(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function FM(e,t,n){return e.check(ta,t,e.attempt(IM,t,n))}function BM(e){e.exit("gfmFootnoteDefinition")}function UM(e,t,n){const r=this;return Je(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 HM(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,l){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&In(T,T.length,0,Qu(y,u.slice(f+1,d),l)),In(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),In(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,p=this.events;let m=0;return T;function T(x){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const v=Us(f);if(x===126)return m>1?d(x):(u.consume(x),m++,y);if(m<2&&!n)return d(x);const A=u.exit("strikethroughSequenceTemporary"),S=Us(x);return A._open=!S||S===2&&!!v,A._close=!v||v===2&&!!S,l(x)}}}class jM{constructor(){this.map=[]}add(t,n,r){zM(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 zM(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 $M(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 VM(){return{flow:{null:{name:"table",tokenize:qM,resolveAll:YM}}}}function qM(e,t,n){const r=this;let s=0,a=0,u;return l;function l($){let se=r.events.length-1;for(;se>-1;){const fe=r.events[se][1].type;if(fe==="lineEnding"||fe==="linePrefix")se--;else break}const te=se>-1?r.events[se][1].type:null,xe=te==="tableHead"||te==="tableRow"?D:d;return xe===D&&r.parser.lazy[r.now().line]?n($):xe($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):Me($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):Ke($)?Je(e,p,"whitespace")($):(a+=1,u&&(u=!1,s+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m($)))}function m($){return $===null||$===124||ut($)?(e.exit("data"),p($)):(e.consume($),$===92?T:m)}function T($){return $===92||$===124?(e.consume($),m):m($)}function y($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),u=!1,Ke($)?Je(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):x($))}function x($){return $===45||$===58?A($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),v):W($)}function v($){return Ke($)?Je(e,A,"whitespace")($):A($)}function A($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),S):$===45?(a+=1,S($)):$===null||Me($)?j($):W($)}function S($){return $===45?(e.enter("tableDelimiterFiller"),C($)):W($)}function C($){return $===45?(e.consume($),C):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),P):(e.exit("tableDelimiterFiller"),P($))}function P($){return Ke($)?Je(e,j,"whitespace")($):j($)}function j($){return $===124?x($):$===null||Me($)?!u||s!==a?W($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):W($)}function W($){return n($)}function D($){return e.enter("tableRow"),K($)}function K($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),K):$===null||Me($)?(e.exit("tableRow"),t($)):Ke($)?Je(e,K,"whitespace")($):(e.enter("data"),ne($))}function ne($){return $===null||$===124||ut($)?(e.exit("data"),K($)):(e.consume($),$===92?de:ne)}function de($){return $===92||$===124?(e.consume($),ne):ne($)}}function YM(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,p,m;const T=new jM;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(l=!1,d!==0&&(r_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",f,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,p={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",p,t]])),s=x.type==="tableDelimiterRow"?2:p?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=$l(T,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=$l(T,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):x.type==="tableHead"?(l=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=$l(T,t,a,s,n,m)):u[1]!==0&&(m=$l(T,t,u,s,n,m)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&r_(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=$M(t.events,n))}return e}function $l(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},co(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=co(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=co(t.events,n[2]),p=co(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,v=n[3]-n[2]-1;e.add(x,v,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},co(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function r_(e,t,n,r,s){const a=[],u=co(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function co(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const WM={name:"tasklistCheck",tokenize:XM};function GM(){return{text:{91:WM}}}function XM(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 ut(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 Me(d)?t(d):Ke(d)?e.check({tokenize:KM},t,n)(d):n(d)}}function KM(e,t,n){return Je(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function QM(e){return R1([xM(),PM(),HM(e),VM(),GM()])}const JM={};function ZM(e){const t=this,n=e||JM,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(QM(n)),a.push(yM()),u.push(TM(n))}const e9=()=>_.jsx("span",{className:`${k}-blinking-cursor`,children:_.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Oa=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>_.jsx(SE,{remarkPlugins:[ZM],rehypePlugins:[vy],components:{h1:({children:s})=>_.jsx("h1",{className:F(e,`${k}-header h1`),children:s}),h2:({children:s})=>_.jsx("h2",{className:F(e,`${k}-header h2`),children:s}),h3:({children:s})=>_.jsx("h3",{className:F(e,`${k}-header h3`),children:s}),ul:({children:s})=>_.jsx("ul",{className:F(e,`${k}-ul`),children:s}),ol:({children:s})=>_.jsx("ol",{className:F(e,`${k}-ol`),children:s}),li:({children:s})=>_.jsx("li",{className:F(e,`${k}-li`),children:s}),a:({href:s,children:a})=>_.jsx(Py,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>_.jsx("div",{className:F(e,`${k}-table-container`),children:_.jsx("table",{className:F(e,`${k}-table`),children:s})}),thead:({children:s})=>_.jsx("thead",{className:F(e,`${k}-thead`),children:s}),tbody:({children:s})=>_.jsx("tbody",{className:F(e,`${k}-tbody`),children:s}),tr:({children:s})=>_.jsx("tr",{className:F(e,`${k}-tr`),children:s}),th:({children:s})=>_.jsx("th",{className:F(e,`${k}-th`),children:s}),td:({children:s})=>_.jsx("td",{className:F(e,`${k}-td`),children:s}),span:({className:s,children:a})=>s===`${k}-blinking-cursor`?_.jsx(e9,{}):_.jsx("span",{children:a})},children:r+(n?`<span className='${k}-blinking-cursor'></span>`:"")}),Vl=()=>H.useContext(Hg),ql=()=>{const{sendMessage:e,loading:t,isConnected:n}=un(),{mode:r,status:s}=ri();return H.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function t9(e){return e.includes("-")&&e===e.toLowerCase()}function Yl({tagName:e,props:t,label:n}){const r=H.useRef(null),s=H.useRef(null),a=H.useRef(e),u=H.useRef(null);return H.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!t9(e)){u.current!==e&&(u.current=e,Ct(!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){Ct(!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){Ct(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),H.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),_.jsx("div",{ref:r,"data-override":n||"custom"})}class n9 extends H.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){Ct(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function r9(e){return rt({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 i9=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=un();return _.jsx("div",{className:F(t,`${k}-msg-product-card__image-wrapper`),children:e?n?_.jsx("button",{type:"button",className:F(t,`${k}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:_.jsx("img",{className:F(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,children:_.jsx("img",{className:F(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):_.jsx("img",{className:F(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):_.jsx("div",{className:F(t,`${k}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:_.jsx(r9,{"aria-hidden":"true"})})})},s9=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=un();return n?_.jsx("button",{type:"button",disabled:l,onClick:u,className:F(t,`${k}-msg-product-card__title-link`),"aria-label":a,children:e}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:F(t,`${k}-msg-product-card__title-link`),"aria-label":a,children:e}):_.jsx("p",{className:F(t,`${k}-msg-product-card__title`),children:e})},o9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=ot(),{overrides:u,isInitialized:l}=Vl(),{sendMessage:d,loading:f}=un(),p=ql(),m=l?u.ProductTile:void 0;if(m){const $={name:"ProductTile",payload:s!=null?s:{},api:p};return _.jsx(Yl,{tagName:m,props:$,label:"ProductTile"})}const{id:T,name:y,imageUrl:x,description:v,productPageUrl:A,price:S,priceBreakdown:C,discountPrice:P,listPrice:j,currencyCode:W}=e,D=P!=null?P:S,K=LD({priceBreakdown:C,currencyCode:W}),ne=()=>{if(f)return;const $=y||"this product",se=T?` [SKU: ${T}]`:"";d(`Show me details for ${$}${se}`)},de=r?`View details for ${y}`:`Go to product page for ${y}`;return _.jsxs("div",{className:F(t,`${k}-msg-product-card`),children:[_.jsx(i9,{imageUrl:x||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:de,name:y,showInWidgetDetails:ne}),_.jsxs("div",{className:F(t,`${k}-msg-product-card__content`),children:[_.jsxs("div",{className:F(t,`${k}-msg-product-card__content-header`),children:[_.jsx(s9,{name:y||T,globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:de,showInWidgetDetails:ne}),a&&v&&_.jsx("div",{className:F(t,`${k}-msg-product-card__description`),title:v,children:_.jsx(Oa,{globalClassName:t,text:v})})]}),_.jsx("div",{className:F(t,`${k}-msg-product-card__price-row`),children:K?_.jsx("span",{className:F(t,`${k}-msg-product-card__price`),"aria-label":`Price from ${K.low} to ${K.high}`,children:K.range}):_.jsx(Zh,{globalClassName:t,retailPrice:j,discountPrice:D,currencyCode:W})})]})]})},a9=e=>{var t,n;return{id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,listPrice:(t=e.data.listPrice)!=null?t:void 0,priceBreakdown:(n=e.data.priceBreakdown)!=null?n:void 0,currencyCode:e.data.currencyCode}},u9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=ot(),{overrides:l,isInitialized:d}=Vl(),f=ql(),p=d?l.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return _.jsx(Yl,{tagName:p,props:m,label:"ProductCarousel"})}return _.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&_.jsx("p",{className:F(n,`${k}-product-carousel-title`),children:e}),_.jsx(rD,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>_.jsxs("div",{className:F(n,`${k}-product-carousel-item`),children:[_.jsx(o9,{product:a9(m),globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&_.jsx("p",{className:F(n,`${k}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},lp=44,l9=400,c9=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?lp:Math.min(Math.max(Math.round(t),lp),l9)},d9=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},f9="parentOrigin",h9=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(f9,t),n.toString()}catch(n){return e}},p9=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=H.useRef(null),[s,a]=H.useState(!1),[u,l]=H.useState(lp),d=typeof window!="undefined"?window.location.origin:"",f=h9(e,d),p=d9(e);return H.useEffect(()=>{const m=T=>{var x,v,A;if(p&&T.origin!==p||r.current&&T.source!==r.current.contentWindow)return;const y=T.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),l(c9((x=y.payload)==null?void 0:x.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((A=(v=y.payload)==null?void 0:v.orderId)!=null?A:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),_.jsx("div",{className:F(t,`${k}-cart-express`,{[`${k}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:_.jsx("iframe",{ref:r,className:F(t,`${k}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},Wl=({code:e,globalClassName:t})=>_.jsxs("span",{className:F(t,`${k}-cart-chip`),children:[_.jsx(t1,{"aria-hidden":"true"}),_.jsx("span",{children:e})]}),_n=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")n===0&&!u?f="Free":f=$r(u?-n:n,r);else if(l)f=l;else return null;return _.jsxs("div",{className:F(s,`${k}-cart-total-row`,{emphasized:a}),children:[_.jsxs("span",{className:F(s,`${k}-cart-total-label`),children:[e,t&&_.jsx("span",{className:F(s,`${k}-cart-total-badge`),children:t})]}),_.jsx("span",{className:F(s,`${k}-cart-total-value`),children:d?_.jsx("span",{className:F(s,`${k}-cart-total-shimmer`)}):f})]})},m9=({quantity:e,loading:t,globalClassName:n,onChange:r})=>{const[s,a]=H.useState(e.toString());H.useEffect(()=>{a(e.toString())},[e]);const u=f=>{const p=f.target.value;/^\d*$/.test(p)&&a(p)},l=()=>{const f=parseInt(s,10);!isNaN(f)&&f>0&&f!==e?r(f):a(e.toString())},d=f=>{f.key==="Enter"&&(f.preventDefault(),l())};return _.jsx("div",{className:F(n,`${k}-cart-qty-input-wrapper`),children:t?_.jsx(wN,{className:F(n,`${k}-cart-qty-spinner`),"aria-hidden":"true"}):_.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:F(n,`${k}-cart-qty-input`),value:s,disabled:t,onChange:u,onBlur:l,onKeyDown:d,"aria-label":"Quantity"})})},g9=({item:e,currencyCode:t,loading:n,disabled:r,globalClassName:s,onRemove:a,onQuantityChange:u})=>{var d,f,p;const l=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:F(s,`${k}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(s,`${k}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(s,`${k}-cart-item-details`),children:[_.jsx("p",{className:F(s,`${k}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(s,`${k}-cart-item-attrs`),children:[((d=e.variants)!=null?d:[]).map(m=>_.jsxs("p",{className:F(s,`${k}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((f=e.promotions)!=null?f:[]).map(m=>_.jsxs("p",{className:F(s,`${k}-cart-item-attr`),children:["Promotion: ",m]},m))]}),((p=e.coupons)!=null?p:[]).length>0&&_.jsx("div",{className:F(s,`${k}-cart-chips`),children:e.coupons.map(m=>_.jsx(Wl,{code:m,globalClassName:s},m))}),_.jsx("span",{className:F(s,`${k}-cart-item-price`),children:n?_.jsx("span",{className:F(s,`${k}-cart-total-shimmer`)}):_.jsxs(_.Fragment,{children:[l&&_.jsx("span",{className:F(s,`${k}-cart-item-original-price`),children:$r(e.originalSubtotal,t)}),_.jsx("span",{className:F(s,`${k}-cart-item-final-price`),children:$r(e.itemSubtotal,t)})]})}),_.jsxs("div",{className:F(s,`${k}-cart-item-footer`),children:[_.jsx("span",{className:F(s,`${k}-cart-qty-heading`),children:"Quantity"}),_.jsx(m9,{quantity:e.quantity,loading:n,globalClassName:s,onChange:m=>u(e,m)}),_.jsx("button",{type:"button",className:F(s,`${k}-cart-item-remove`),disabled:r,onClick:()=>a(e),children:"Remove"})]})]})]})},E9=({cart:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:s,loading:a}=un(),[u,l]=H.useState(!0),[d,f]=H.useState(""),[p,m]=H.useState(null),{items:T=[],currencyCode:y="USD",subtotal:x,total:v,taxes:A,shippingCost:S,shippingDiscount:C,shippingPromotions:P=[],promotionsDiscount:j,promotions:W=[],couponsDiscount:D,couponsApplied:K=[],bodyMessage:ne,footerMessage:de,checkoutButtonUrl:$,expressPaymentUrl:se}=e,te=he=>{a||s(`Remove ${he.name} from my cart`)},xe=he=>{s(he?`I completed express payment. Show my order confirmation for order ${he}.`:"I completed express payment. Show my order confirmation.")},fe=(he,le)=>{p||le<1||(m(he.itemId),s(`Update ${he.name} quantity to ${le}`,{silent:!0}))};H.useEffect(()=>{if(p){const he=setTimeout(()=>{m(null)},300);return()=>clearTimeout(he)}},[e.total,e.subtotal]);const ce=()=>{const he=d.trim();!he||a||(s(`Apply coupon code ${he}`),f(""))};return _.jsxs("div",{className:F(t,`${k}-cart`),children:[_.jsxs("div",{className:F(t,`${k}-cart-box`),children:[ne&&_.jsxs("button",{type:"button",className:F(t,`${k}-cart-summary`),"aria-expanded":u,onClick:()=>l(he=>!he),children:[_.jsx("span",{className:F(t,`${k}-cart-summary-text`),children:_.jsx(Oa,{text:ne,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${k}-cart-summary-toggle`),"aria-hidden":"true",children:u?_.jsx(Zg,{}):_.jsx(e1,{})})]}),u&&_.jsxs("div",{className:F(t,`${k}-cart-expanded`,r&&`${k}-cart-expanded-standalone`),children:[_.jsxs("div",{className:F(t,`${k}-cart-items-section`),children:[_.jsx("ul",{className:F(t,`${k}-cart-items`),children:T.map(he=>_.jsx(g9,{item:he,currencyCode:y,loading:p===he.itemId,disabled:a||p===he.itemId,globalClassName:t,onRemove:te,onQuantityChange:fe},he.itemId))}),K.length>0&&_.jsx("div",{className:F(t,`${k}-cart-chips`,`${k}-cart-applied-coupons`),children:K.map(he=>_.jsx(Wl,{code:he,globalClassName:t},he))})]}),_.jsxs("div",{className:F(t,`${k}-cart-totals`),children:[_.jsx(_n,{label:"Subtotal",value:x,currencyCode:y,globalClassName:t,loading:!!p}),_.jsx(_n,{label:"Coupon",value:D,currencyCode:y,globalClassName:t,isDiscount:!0,loading:!!p}),_.jsx(_n,{label:"Promotions",badge:W[0],value:j,currencyCode:y,globalClassName:t,isDiscount:!0,loading:!!p}),_.jsx(_n,{label:"Shipping",value:S,currencyCode:y,globalClassName:t,fallback:"TBD",loading:!!p}),_.jsx(_n,{label:"Shipping Discount",badge:P[0],value:C,currencyCode:y,globalClassName:t,isDiscount:!0,loading:!!p}),_.jsx(_n,{label:"Tax",value:A,currencyCode:y,globalClassName:t,fallback:"TBD",loading:!!p}),_.jsx(_n,{label:"Total",value:v,currencyCode:y,globalClassName:t,emphasized:!0,loading:!!p})]})]})]}),_.jsxs("div",{className:F(t,`${k}-cart-coupon`),children:[_.jsxs("div",{className:F(t,`${k}-cart-coupon-field`),children:[_.jsx("span",{className:F(t,`${k}-cart-coupon-icon`),"aria-hidden":"true",children:_.jsx(t1,{})}),_.jsx("input",{type:"text",className:F(t,`${k}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:d,disabled:a,onChange:he=>f(he.target.value),onKeyDown:he=>{he.key==="Enter"&&(he.preventDefault(),ce())}})]}),_.jsx("button",{type:"button",className:F(t,`${k}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:a||!d.trim(),onClick:ce,children:_.jsx(AN,{"aria-hidden":"true"})})]}),se&&_.jsx(p9,{expressPaymentUrl:se,globalClassName:t,onOrderComplete:xe}),$&&_.jsxs("a",{className:F(t,`${k}-cart-checkout-button`),href:$,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[_.jsx(SN,{"aria-hidden":"true"}),_.jsx("span",{children:"Checkout"})]}),_.jsx("p",{className:F(t,`${k}-cart-footer`),children:de||"Shipping and taxes calculated at checkout."})]})},y9=({item:e,currencyCode:t,globalClassName:n})=>{var s,a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:F(n,`${k}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(n,`${k}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(n,`${k}-cart-item-details`),children:[_.jsx("p",{className:F(n,`${k}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(n,`${k}-cart-item-attrs`),children:[((s=e.variants)!=null?s:[]).map(l=>_.jsxs("p",{className:F(n,`${k}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((a=e.promotions)!=null?a:[]).map(l=>_.jsxs("p",{className:F(n,`${k}-cart-item-attr`),children:["Promotion: ",l]},l))]}),((u=e.coupons)!=null?u:[]).length>0&&_.jsx("div",{className:F(n,`${k}-cart-chips`),children:e.coupons.map(l=>_.jsx(Wl,{code:l,globalClassName:n},l))}),_.jsxs("span",{className:F(n,`${k}-cart-item-price`),children:[r&&_.jsx("span",{className:F(n,`${k}-cart-item-original-price`),children:$r(e.originalSubtotal,t)}),_.jsx("span",{className:F(n,`${k}-cart-item-final-price`),children:$r(e.itemSubtotal,t)})]}),_.jsx("div",{className:F(n,`${k}-cart-item-footer`),children:_.jsxs("span",{className:F(n,`${k}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},T9=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},b9=({order:e,globalClassName:t})=>{const[n,r]=H.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:T,shippingPromotions:y=[],promotionsDiscount:x,promotions:v=[],couponsDiscount:A,couponsApplied:S=[],bodyMessage:C,footerMessage:P}=e;return _.jsxs("div",{className:F(t,`${k}-cart`),children:[_.jsxs("div",{className:F(t,`${k}-cart-banner`),children:[_.jsx("span",{className:F(t,`${k}-cart-banner-icon`),"aria-hidden":"true",children:_.jsx(NN,{})}),_.jsx("p",{className:F(t,`${k}-cart-banner-text`),children:"Your order is confirmed!"})]}),_.jsxs("div",{className:F(t,`${k}-order-confirmation-meta`),children:[_.jsxs("span",{children:["Order No: ",s]}),_.jsxs("span",{children:["Ordered On: ",T9(a)]})]}),_.jsxs("div",{className:F(t,`${k}-cart-box`),children:[C&&_.jsxs("button",{type:"button",className:F(t,`${k}-cart-summary`),"aria-expanded":n,onClick:()=>r(j=>!j),children:[_.jsx("span",{className:F(t,`${k}-cart-summary-text`),children:_.jsx(Oa,{text:C,globalClassName:t,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${k}-cart-summary-toggle`),"aria-hidden":"true",children:n?_.jsx(Zg,{}):_.jsx(e1,{})})]}),n&&_.jsxs("div",{className:F(t,`${k}-cart-expanded`),children:[_.jsx("ul",{className:F(t,`${k}-cart-items`),children:u.map(j=>_.jsx(y9,{item:j,currencyCode:l,globalClassName:t},j.itemId))}),S.length>0&&_.jsx("div",{className:F(t,`${k}-cart-chips`,`${k}-cart-applied-coupons`),children:S.map(j=>_.jsx(Wl,{code:j,globalClassName:t},j))}),_.jsxs("div",{className:F(t,`${k}-cart-totals`),children:[_.jsx(_n,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),_.jsx(_n,{label:"Coupon",value:A,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(_n,{label:"Promotions",badge:v[0],value:x,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(_n,{label:"Shipping",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),_.jsx(_n,{label:"Shipping Discount",badge:y[0],value:T,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(_n,{label:"Tax",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),_.jsx(_n,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),_.jsx("p",{className:F(t,`${k}-cart-footer`),children:P||"Shipping and taxes calculated at checkout."})]})},_9=({image:e,alt:t,globalClassName:n})=>{const[r,s]=H.useState(e.src),[a,u]=H.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return _.jsx("img",{className:F(n,`${k}-pdp-gallery__image`,{[`${k}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},x9=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return _.jsxs(qh,{className:F(n,`${k}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[_.jsx(zh,{className:F(n,`${k}-pdp-gallery__item-group`),children:e.map((s,a)=>_.jsx(jh,{index:a,className:F(n,`${k}-pdp-gallery__item`),children:_.jsx(_9,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&_.jsxs(Bh,{className:F(n,`${k}-pdp-gallery__control`),children:[_.jsx(Vh,{className:F(n,`${k}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:_.jsx(nb,{size:"16px"})}),_.jsx($h,{className:F(n,`${k}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:_.jsx(rb,{size:"16px"})})]}),r&&_.jsx(Hh,{className:F(n,`${k}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>_.jsx(Uh,{index:a,className:F(n,`${k}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Ia="color",cp=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,w9=e=>e.replace(/(^|\/)large\//,"$1medium/"),i_=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Ia&&n.vals.includes(t)),s_=(e,t)=>{const n=w9(t),r=cp(e,n);return n===t?{src:r}:{src:r,fallbackSrc:cp(e,t)}},S9=(e,t)=>{var l,d;const n=((l=e.imgGroups)!=null?l:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>i_(f,t)),s=n.find(f=>f.vattr===null),a=r||s||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(f=>s_(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[s_(e.baseUrl,e.imageUrl)]:[]},v9=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&i_(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?cp(e.baseUrl,r):""},Gl=(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})}),A9=(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]}))},N9=(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})},C9=(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},k9=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([s,a])=>{var u;return((u=r.vars)==null?void 0:u[s])===a}));return n!=null&&n.pr?n.pr:e.pr},O9=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>Gl(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},I9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var fe,ce,he,le,Q,ue,N;const{addToCart:s,loading:a}=un(),u=e.data,l=(fe=u.vattr)!=null?fe:[],[d,f]=H.useState(()=>O9(u)),p=A9(u.vmat,d),m=(he=(ce=u.quantity)==null?void 0:ce.minQuantity)!=null?he:1,T=(Q=(le=u.quantity)==null?void 0:le.maxQuantity)!=null?Q:Number.POSITIVE_INFINITY,y=(N=(ue=u.quantity)==null?void 0:ue.increment)!=null?N:1,[x,v]=H.useState(m),A=d[Ia],S=H.useMemo(()=>S9(u,A),[u,A]),C=H.useMemo(()=>k9(u,d),[u,d]),P=l.find(R=>R.id===Ia),j=l.filter(R=>R.id!==Ia),W=(R,Y)=>()=>{f(O=>{const ge=!Gl(u.vmat,R,Y,O);return R===Ia||ge?N9(u.vmat,l,R,Y,O):ae(U({},O),{[R]:Y})})},D=()=>{if(a)return;const R=C9(u,d);if(!R)return;const Y=l.map(O=>{const ge=O.opts.find(Re=>Re.val===d[O.id]);return ge?{label:O.lbl||O.id,value:ge.name||ge.val}:null}).filter(O=>O!==null);s({productName:u.name,sku:R,quantity:x,variants:Y})},K=!p||x-y<m,ne=!p||x+y>T,de=R=>{var O;const Y=d[R.id];return(O=R.opts.find(ge=>ge.val===Y))==null?void 0:O.name},$=()=>v(R=>Math.max(m,R-y)),se=()=>v(R=>Math.min(T,R+y)),te=R=>_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${R.id}`,className:F(t,`${k}-msg-pdp__variant-name`),children:R.lbl||R.id}),de(R)&&_.jsx("span",{className:F(t,`${k}-msg-pdp__variant-value`),children:de(R)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${R.id}`,className:F(t,`${k}-msg-pdp__chips`),children:R.opts.map(Y=>{const O=Gl(u.vmat,R.id,Y.val,d),ge=d[R.id]===Y.val;return _.jsxs("label",{className:F(`${k}-msg-pdp__chip`,{selected:ge,unavailable:!O}),children:[_.jsx("input",{type:"radio",name:`variant-${R.id}`,value:Y.val,checked:ge,"aria-description":O?void 0:"unavailable",onChange:W(R.id,Y.val),className:`${k}-msg-pdp__radio-input`}),_.jsx("span",{children:Y.name||Y.val})]},Y.val)})})]},R.id),xe=R=>_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${R.id}`,className:F(t,`${k}-msg-pdp__variant-name`),children:R.lbl||"Color"}),de(R)&&_.jsx("span",{className:F(t,`${k}-msg-pdp__variant-value`),children:de(R)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${R.id}`,className:F(t,`${k}-msg-pdp__swatches`),children:R.opts.map(Y=>{const O=Gl(u.vmat,R.id,Y.val,d),ge=d[R.id]===Y.val,Re=v9(u,Y.val);return Re?_.jsxs("label",{className:F(`${k}-msg-pdp__swatch`,{selected:ge,unavailable:!O}),children:[_.jsx("input",{type:"radio",name:`variant-${R.id}`,value:Y.val,checked:ge,"aria-label":Y.name||Y.val,"aria-description":O?void 0:"unavailable",onChange:W(R.id,Y.val),className:`${k}-msg-pdp__radio-input`}),_.jsx("img",{className:F(t,`${k}-msg-pdp__swatch-image`),src:Re,alt:Y.name||Y.val,loading:"lazy"})]},Y.val):_.jsxs("label",{className:F(`${k}-msg-pdp__chip`,{selected:ge,unavailable:!O}),children:[_.jsx("input",{type:"radio",name:`variant-${R.id}`,value:Y.val,checked:ge,"aria-description":O?void 0:"unavailable",onChange:W(R.id,Y.val),className:`${k}-msg-pdp__radio-input`}),_.jsx("span",{children:Y.name||Y.val})]},Y.val)})})]});return _.jsx("div",{className:F(t,`${k}-msg-pdp`),children:_.jsxs("div",{className:F(t,`${k}-msg-pdp__card`),children:[_.jsx("div",{className:F(t,`${k}-msg-pdp__gallery`),children:_.jsx(x9,{images:S,altText:u.name,globalClassName:t})}),_.jsxs("div",{className:F(t,`${k}-msg-pdp__content`),children:[u.slugUrl?_.jsx("a",{href:u.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:F(t,`${k}-msg-pdp__title-link`),"aria-label":`Go to product page for ${u.name}`,children:u.name}):_.jsx("p",{className:F(t,`${k}-msg-pdp__title`),children:u.name}),_.jsx(Zh,{globalClassName:t,className:`${k}-msg-pdp__price`,retailPrice:C==null?void 0:C.orig,discountPrice:(C==null?void 0:C.cur)||(C==null?void 0:C.prom),currencyCode:u.ccy,fontSize:"14px"}),u.dscr&&_.jsx("p",{className:F(t,`${k}-msg-pdp__description`),children:u.dscr}),P&&xe(P),j.map(te),r&&_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant-label`),children:[_.jsx("span",{className:F(t,`${k}-msg-pdp__variant-name`),children:"Quantity"}),_.jsx("span",{className:F(t,`${k}-msg-pdp__variant-value`),children:x})]}),_.jsxs("div",{className:F(t,`${k}-msg-pdp__stepper`),children:[_.jsx(er,{className:`${k}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:_.jsx(pN,{}),disabled:K,onClick:$}),_.jsx("span",{className:F(t,`${k}-msg-pdp__quantity`),children:x}),_.jsx(er,{className:`${k}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:_.jsx(mN,{}),disabled:ne,onClick:se})]})]}),r&&_.jsx("div",{className:F(t,`${k}-msg-pdp__actions`),children:_.jsx(Yu,{className:`${k}-msg-pdp__add-to-cart`,disabled:!p||a,onClick:D,children:"Add to cart"})})]})]})})},P9=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},R9=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:s=!1})=>{const{addToCart:a,loading:u}=un();if(!e.length)return null;const l=`auto repeat(${e.length}, 1fr)`,d=`${90+e.length*140}px`,f=p=>()=>{u||a({productName:p.name,sku:p.id})};return _.jsx("div",{className:F(n,`${k}-product-comparison`),children:_.jsxs("div",{className:`${k}-product-comparison__grid`,style:{gridTemplateColumns:l,minWidth:d},children:[_.jsxs("div",{className:`${k}-product-comparison__header`,children:[_.jsx("div",{className:`${k}-product-comparison__header-spacer`}),e.map(p=>{var T,y,x,v;const m=P9(p);return _.jsxs("div",{className:F(n,`${k}-product-comparison__product-col`),children:[m&&_.jsx("img",{className:F(n,`${k}-product-comparison__image`),src:m,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?_.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:F(n,`${k}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):_.jsx("span",{className:F(n,`${k}-product-comparison__name`),children:p.name}),_.jsx(Zh,{globalClassName:n,retailPrice:(T=p.pr)==null?void 0:T.orig,discountPrice:(v=(y=p.pr)==null?void 0:y.prom)!=null?v:(x=p.pr)==null?void 0:x.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),_.jsx("div",{className:`${k}-product-comparison__table`,children:t.map(p=>_.jsxs("div",{className:`${k}-product-comparison__row`,children:[_.jsx("div",{className:F(n,`${k}-product-comparison__row-label`),children:p.row_name}),e.map((m,T)=>_.jsx("div",{className:F(n,`${k}-product-comparison__row-value`),children:p.values[T]},`${p.row_name}-${m.id}`))]},p.row_name))}),s&&_.jsxs("div",{className:`${k}-product-comparison__footer`,children:[_.jsx("div",{className:`${k}-product-comparison__footer-spacer`}),e.map(p=>_.jsx("div",{className:F(n,`${k}-product-comparison__footer-cell`),children:_.jsxs(Yu,{className:`${k}-product-comparison__add-to-cart`,disabled:u,onClick:f(p),children:[_.jsx(xN,{size:"14px"}),"Add to cart"]})},`cart-${p.id}`))]})]})})},o_=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:s,loading:a}=un(),{isCartMgmtSupported:u,logger:l}=ot(),{overrides:d,isInitialized:f}=Vl(),p=ql(),m=H.useMemo(()=>e.response.map(T=>{var x,v;if(T.type!=="markdown")return T;const y=dg((v=(x=T.data)==null?void 0:x.content)!=null?v:"");return y&&y.type!=="markdown"?y:T}),[e.response]);return _.jsx(_.Fragment,{children:m.map((T,y)=>{var x,v,A,S,C,P,j,W,D,K,ne,de,$,se,te,xe,fe,ce,he,le,Q,ue,N,R,Y;switch(T.type){case"markdown":{const O=(v=(x=T.data)==null?void 0:x.content)!=null?v:"";return T.index===ji&&fg(O)?null:_.jsx(Oa,{text:O,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1},`${T.type}-${(A=T.index)!=null?A:y}`)}case"product_carousel":return _.jsx(u9,{title:(C=(S=T.data)==null?void 0:S.title)!=null?C:"",products:(j=(P=T.data)==null?void 0:P.products)!=null?j:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(W=T.index)!=null?W:y}`);case"product_tile":return _.jsx(I9,{product:T.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(D=T.index)!=null?D:y}`);case"product_comparison":return _.jsx(R9,{products:(ne=(K=T.data)==null?void 0:K.products)!=null?ne:[],table:($=(de=T.data)==null?void 0:de.table)!=null?$:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(se=T.index)!=null?se:y}`);case"cart":{const O=(fe=(xe=(te=T.data)==null?void 0:te.cart)==null?void 0:xe.cartSummary)==null?void 0:fe.cartDetails;return O?_.jsx(E9,{cart:O,productsToHighlight:T.data.products_to_highlight,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${T.type}-${(ce=T.index)!=null?ce:y}`):null}case"order_confirmation":{const O=(le=(he=T.data)==null?void 0:he.order)==null?void 0:le.orderDetails;return O?_.jsx(b9,{order:O,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${T.type}-${(Q=T.index)!=null?Q:y}`):null}case"tool_results":{const O=T.data,ge=T.output_name,Re=f&&ge&&Object.prototype.hasOwnProperty.call(d,ge)?d[ge]:void 0,we=typeof Re=="string"?Re:void 0;if(!we||!ge)return l!=null&&l.isDevelopment&&(ge?l.warn(`🦜 tool_results "${ge}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${ge}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(d),payload:O}):l.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:O})),null;const re={name:ge,payload:O,api:p};return _.jsx(n9,{overrideName:ge,children:_.jsx(Yl,{tagName:we,props:re,label:`toolResult:${ge}`})},`${T.type}-${ge}-${(ue=T.index)!=null?ue:y}`)}case"suggestions":return _.jsx("div",{style:{marginTop:"0.5rem"},children:_.jsx(FD,{disabled:a,suggestions:(R=(N=T.data)==null?void 0:N.display_text)!=null?R:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:s})},`${T.type}-${(Y=T.index)!=null?Y:y}`);default:return null}})})},L9=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=ot(),a=H.useMemo(()=>{if(typeof e.content!="string")return null;try{const d=JSON.parse(e.content);if(d&&typeof d=="object"&&Array.isArray(d.response))return d}catch(d){return null}const l=dg(e.content);return l?{response:[l]}:null},[e.content]),u=H.useMemo(()=>{const l="Oops, I had trouble with your request.";if(typeof e.content!="string")return s==null||s.warn("Message content is not richtext format. Showing fallback text.",e.content),l;const d=e.content.trim();try{const f=JSON.parse(d);if(typeof f=="object"&&f!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),f.text||f.message||l}catch(f){if(d.startsWith("{")||d.startsWith("["))return s==null||s.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),l}return e.content||l},[s,e.content]);switch(e.role){case"user":return _.jsx("div",{className:F(t,`${k}-message`,r?"standalone":"embedded"),children:_.jsx("div",{className:F(t,`${k}-user-message`,r?"standalone":"embedded"),children:_.jsxs("div",{className:F(t,`${k}-user-message-row`,r?"standalone":"embedded"),children:[_.jsx("span",{className:F(t,`${k}-message-icon user-message-icon`,r?"standalone":"embedded"),children:_.jsx(vN,{})}),_.jsx("p",{className:F(t,`${k}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return _.jsx("div",{className:F(t,`${k}-message-group`,r?"standalone":"embedded"),children:_.jsx("div",{className:`${k}-message-group-child`,children:a?_.jsx(o_,{content:a,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):_.jsx(Oa,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return _.jsx("div",{className:F(t,`${k}-message`,r?"standalone":"embedded"),children:_.jsx("p",{className:F(t,`${k}-reset-message`),children:e.content})})}},D9=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>_.jsxs("div",{className:F(n,`${k}-send-error`,r?"standalone":"embedded"),role:"alert",children:[_.jsx("span",{className:F(n,`${k}-send-error-text`),children:e}),_.jsxs("button",{type:"button",className:F(n,`${k}-retry-button`),onClick:t,children:[_.jsx(ON,{"aria-hidden":"true"})," Retry"]})]}),M9="You are offline or we couldn't reach the assistant. Check connection and try again.",dp=({isWidgetStandalone:e})=>{var se,te;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=ot(),{messages:a,streamingBlocks:u,isAgentTyping:l,loading:d,progressMessage:f,connectionStatus:p,error:m,sendError:T,retryLastMessage:y,retryConnection:x}=un(),v=H.useRef(null),A=a.filter(xe=>!xe.silent),S=A.length>0,C=u.some(eA),P=A[A.length-1];let j=!1;if(P)try{const xe=JSON.parse(P.content);Array.isArray(xe==null?void 0:xe.response)&&(j=xe.response.some(fe=>fe.type==="suggestions"))}catch(xe){}const W=S&&(d||l)&&!C&&!j,D=p==="reconnecting"&&!W,K=p==="error";let ne=null;K?ne={message:m!=null?m:M9,kind:"connection",onRetry:x}:T&&(ne={message:T.message,kind:"send",onRetry:y}),H.useEffect(()=>{var xe;(xe=v.current)==null||xe.scrollIntoView({behavior:"smooth"})},[]),H.useEffect(()=>{var xe;s&&((xe=v.current)==null||xe.scrollIntoView({behavior:"smooth"}))},[a,u,T,m,s]);const de=(se=ne==null?void 0:ne.message)!=null?se:null,$=(te=ne==null?void 0:ne.kind)!=null?te:null;return H.useEffect(()=>{de&&(r==null||r.error("Error message shown to user",{message:de,kind:$}))},[de,$,r]),_.jsxs(_.Fragment,{children:[d&&!S&&_.jsx(zD,{globalClassName:t,isWidgetStandalone:e}),A.map(xe=>_.jsx(L9,{message:xe,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},xe.id)),ne&&_.jsx(D9,{message:ne.message,onRetry:ne.onRetry,globalClassName:t,isWidgetStandalone:e}),C&&_.jsxs("div",{className:F(t,`${k}-message-group`,e?"standalone":"embedded"),children:[_.jsx(o_,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(d||l)&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e})]}),W&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),D&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),_.jsx("div",{ref:v})]})},F9=()=>_.jsxs("svg",{className:`${k}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),B9=()=>_.jsx("svg",{className:`${k}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("path",{d:"M8 1v3M8 12v3M1 8h3M12 8h3M3.05 3.05l2.12 2.12M10.83 10.83l2.12 2.12M3.05 12.95l2.12-2.12M10.83 5.17l2.12-2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),fp=({steps:e,globalClassName:t})=>{const{overrides:n,isInitialized:r}=Vl(),s=ql();if(e.length===0)return null;const a=r?n.ProgressSteps:void 0;if(a){const u={name:"ProgressSteps",payload:{steps:e},api:s};return _.jsx(Yl,{tagName:a,props:u,label:"ProgressSteps"})}return _.jsx("div",{className:F(t,`${k}-progress-steps-panel`),children:_.jsxs("div",{className:`${k}-progress-steps`,children:[_.jsxs("span",{className:`${k}-progress-steps-header`,children:["Loading Step ",e.length]}),_.jsx("ul",{className:`${k}-progress-steps-list`,children:e.map((u,l)=>{const d=l<e.length-1,f=l===e.length-1;return _.jsxs("li",{className:F(`${k}-progress-step`,f&&"active"),children:[f&&_.jsx("span",{className:`${k}-progress-step-arc`}),_.jsx("span",{className:`${k}-progress-step-text`,children:u}),_.jsx("span",{className:F(`${k}-progress-step-icon`,d?"done":"active"),children:d?_.jsx(F9,{}):_.jsx(B9,{})})]},`${l}-${u}`)})})]})})},a_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=ot(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:l,downloadTranscript:d}=un(),f=s;return _.jsxs("div",{className:F(e,`${k}-container`,`${k}-embedded-chat`),style:t,children:[_.jsx("div",{className:F(e,`${k}-message-container`,`container-${n}`,"embedded"),children:_.jsx(dp,{isWidgetStandalone:!0})}),_.jsx(fp,{steps:l,globalClassName:e}),_.jsx(th,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:p=>a(p)}),_.jsx("div",{className:F(`${k}-embedded-chat-menu`),children:_.jsxs(U5,{componentType:"chat",children:[_.jsx(Nb,{componentType:"chat"}),_.jsx(Dy,{componentType:"chat",onClearChat:u}),r&&_.jsx(My,{componentType:"chat",onDownloadTranscript:d})]})})]})},u_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=H.useState((d=e.container)==null?void 0:d.current),a=H.useSyncExternalStore(H9,()=>!1,()=>!0),{getRootNode:u}=Bl();if(H.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const l=r!=null?r:U9(u);return _.jsx(_.Fragment,{children:H.Children.map(t,f=>Ds.createPortal(f,l))})},U9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return es(n)?n:xr(t).body},H9=()=>()=>{},l_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ot(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=ri(),{loading:d,isAgentTyping:f,sendMessage:p,resetConversation:m,progressSteps:T,downloadTranscript:y}=un(),{isOpen:x}=s||{},v=!!s.isOpen,A=r==="standalone",S=f||d,C=()=>{ni(!1)};return v?_.jsx(bb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:v,children:_.jsx(u_,{children:_.jsx(Gh,{className:F(e,`${k}-container`,`${k}-dialog`,a,u&&"full-height"),style:U(U({},t),l&&{width:l}),children:_.jsxs(Yh,{className:F(e,`${k}-dialog-content`,{standalone:A,embedded:!A}),children:[_.jsx(vb,{componentType:"dialog",onClearChat:m,onClose:C,onDownloadTranscript:y}),_.jsx(Wh,{className:F(e,`${k}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:_.jsx(dp,{isWidgetStandalone:A,isOpen:x})}),_.jsx(fp,{steps:T,globalClassName:e}),_.jsx(th,{componentType:"dialog",isLoading:S,onSubmit:P=>p(P)})]})})})}):null},c_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ot(),{mode:r,status:s,isModalFullscreen:a}=ri(),{loading:u,isAgentTyping:l,sendMessage:d,resetConversation:f,progressSteps:p,downloadTranscript:m}=un(),{isOpen:T}=s||{},y=!!s.isOpen,x=r==="standalone",v=l||u,A=({open:C})=>{ni(C)},S=()=>{ni(!1)};return y?_.jsx(bb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:_.jsx(u_,{children:_.jsxs("div",{className:F(e,`${k}-modal-container`),style:t,children:[_.jsx(mb,{className:F(e,`${k}-modal-backdrop`)}),_.jsx(Gh,{className:F(e,`${k}-container`,`${k}-modal`,{fullscreen:a,standalone:x,embedded:!x}),children:_.jsxs(Yh,{className:F(e,`${k}-modal-content`,{standalone:x,embedded:!x}),children:[_.jsx(vb,{componentType:"modal",onClearChat:f,onClose:S,onDownloadTranscript:m}),_.jsx(Wh,{className:F(e,`${k}-message-container`,`container-${n}`,{standalone:x,embedded:!x}),children:_.jsx(dp,{isWidgetStandalone:x,isOpen:T})}),_.jsx(fp,{steps:p,globalClassName:e}),_.jsx(th,{componentType:"modal",isLoading:v,onSubmit:C=>d(C)})]})})]})})}):null},j9=()=>{const e=ri(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(TN,{}):t==="dialog"?_.jsx(l_,{}):t==="modal"?_.jsx(c_,{}):_.jsx(a_,{})},z9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=kD();H.useEffect(()=>{const a=u=>{const{property:l,value:d}=u.detail||{};!l||d===void 0||(l==="isOpen"&&e(d),l==="isInline"&&t(d),l==="elementId"&&n(d),l==="entryType"&&r(d),l==="params"&&s(d))};return SD(a),()=>{vD(a)}},[e,t,n,r,s])};function $9({isReady:e,hasError:t,transmit:n}){const r=H.useRef([]),s=H.useRef(e);s.current=e;const a=H.useRef(n);a.current=n;const u=H.useCallback(l=>{s.current?a.current(l):r.current.push(l)},[]);return H.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(d=>a.current(d))}},[e]),H.useEffect(()=>{t&&(r.current=[])},[t]),u}const d_={copilot:"Ask Copilot",messaging:"Ask a question"},V9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ot(),{placeholder:s,isResponseLoading:a}=Jh(),u=s||d_[r],[l,d]=H.useState(""),f=t||a,p=m=>{const T=l.trim();T&&(m.preventDefault(),e(T),d(""))};return _.jsxs("form",{className:F(n,`${k}-prompts-input-container`),name:`${k}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${k}-prompts-input`,"aria-label":u,children:_.jsx(Fh,{className:F(n,`${k}-prompts-input-icon`)})}),_.jsx("input",{id:`${k}-prompts-input`,className:F(n,`${k}-prompts-input`),name:`${k}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),_.jsx(er,{className:F(n,`${k}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(af,{}),disabled:f})]})},q9=()=>{const{globalClassName:e,mode:t}=ot(),{placeholder:n}=Jh(),r=n||d_[t];return _.jsxs("div",{className:F(e,`${k}-prompts-header`),children:[_.jsx(Fh,{className:F(e,`${k}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:F(e,`${k}-prompts-header-text`),children:r})]})},Y9=()=>{const{globalClassName:e,themeVariables:t}=ot(),{isOpen:n,elementId:r,promptsDisplay:s}=Jh(),{isConnected:a,sendMessage:u,connectionStatus:l}=un(),d=s!=="buttons",[f,p]=H.useState(null),m=l==="error",T=l==="connecting",y=$9({isReady:a,hasError:m,transmit:u});H.useEffect(()=>{if(!r||f)return;const v=document.getElementById(r);v&&p(v)},[r,f]);const x=H.useCallback(v=>{ni(!0),y(v)},[y]);return!n||!f?null:Ds.createPortal(_.jsxs("div",{className:F(e,`${k}-prompts-extension-container`),style:t,children:[d&&_.jsx(V9,{onSubmit:x,disabled:m}),!d&&_.jsx(q9,{}),!m&&T&&_.jsx("p",{className:F(e,`${k}-prompts-connecting-message`),children:"Connecting to agent..."}),m&&_.jsx("p",{className:F(e,`${k}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),f)},W9=()=>(z9(),_.jsx(Y9,{})),f_=e=>_.jsxs(jg,ae(U({},e),{children:[_.jsx(j9,{}),_.jsx(W9,{})]}));var Xl={},h_;function G9(){if(h_)return Xl;h_=1;var e=Yg();return Xl.createRoot=e.createRoot,Xl.hydrateRoot=e.hydrateRoot,Xl}var X9=G9();const p_=(e,t,n,r)=>{X9.createRoot(e).render(_.jsx(f_,ae(U({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},K9=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=hn(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let l;const d=(p,m)=>{for(const T of p)if(T.type==="childList"&&T.addedNodes.length)for(const y of T.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(Ct(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(l),p_(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),Ct(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},Q9=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=hn(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){Ct(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){Ct(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){Ct(!0,"warn","Container element not found for id:",t),Ct(!0,"warn","Beginning observation for element"),K9(U({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}p_(l,s,n,r)};class J9 extends HTMLElement{constructor(){super(...arguments);Ye(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const Z9={components:{setEntryType:Bg,toggleWidgetOpen:ni,toggleWidgetMinimized:zu,toggleModalFullscreen:tf,setWidgetType:$u,setWidgetDialogPosition:nf,loadPromptsComponent:CD,togglePromptsExtensionOpen:Sb}};Le.AgentForceWidget=f_,Le.AgentforceWidgetProvider=jg,Le.CIMULATE_WIDGET_READY_EVENT=yg,Le.MessagingDialog=l_,Le.MessagingEmbed=a_,Le.MessagingModal=c_,Le.MessagingProvider=xg,Le.OverrideElement=J9,Le.eventHandlers=Z9,Le.injectMessagingWidget=Q9,Le.useMessaging=un,Object.defineProperty(Le,Symbol.toStringTag,{value:"Module"})}));
|