@cimulate/copilot-widget 1.16.1 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,46 +1,46 @@
1
- (function(Fe,Ve){typeof exports=="object"&&typeof module!="undefined"?Ve(exports):typeof define=="function"&&define.amd?define(["exports"],Ve):(Fe=typeof globalThis!="undefined"?globalThis:Fe||self,Ve(Fe.CimulateCopilot={}))})(this,(function(Fe){"use strict";var P7=Object.defineProperty,N7=Object.defineProperties;var O7=Object.getOwnPropertyDescriptors;var Ad=Object.getOwnPropertySymbols;var F2=Object.prototype.hasOwnProperty,B2=Object.prototype.propertyIsEnumerable;var ea=(Fe,Ve)=>(Ve=Symbol[Fe])?Ve:Symbol.for("Symbol."+Fe),I7=Fe=>{throw TypeError(Fe)},ta=Math.pow,p0=(Fe,Ve,Qe)=>Ve in Fe?P7(Fe,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Fe[Ve]=Qe,M=(Fe,Ve)=>{for(var Qe in Ve||(Ve={}))F2.call(Ve,Qe)&&p0(Fe,Qe,Ve[Qe]);if(Ad)for(var Qe of Ad(Ve))B2.call(Ve,Qe)&&p0(Fe,Qe,Ve[Qe]);return Fe},pe=(Fe,Ve)=>N7(Fe,O7(Ve));var cn=(Fe,Ve)=>{var Qe={};for(var dt in Fe)F2.call(Fe,dt)&&Ve.indexOf(dt)<0&&(Qe[dt]=Fe[dt]);if(Fe!=null&&Ad)for(var dt of Ad(Fe))Ve.indexOf(dt)<0&&B2.call(Fe,dt)&&(Qe[dt]=Fe[dt]);return Qe};var Se=(Fe,Ve,Qe)=>p0(Fe,typeof Ve!="symbol"?Ve+"":Ve,Qe);var et=(Fe,Ve,Qe)=>new Promise((dt,Nt)=>{var xt=It=>{try{Xt(Qe.next(It))}catch(An){Nt(An)}},Ue=It=>{try{Xt(Qe.throw(It))}catch(An){Nt(An)}},Xt=It=>It.done?dt(It.value):Promise.resolve(It.value).then(xt,Ue);Xt((Qe=Qe.apply(Fe,Ve)).next())}),Jr=function(Fe,Ve){this[0]=Fe,this[1]=Ve},vd=(Fe,Ve,Qe)=>{var dt=(Ue,Xt,It,An)=>{try{var Fo=Qe[Ue](Xt),na=(Xt=Fo.value)instanceof Jr,kd=Fo.done;Promise.resolve(na?Xt[0]:Xt).then(dr=>na?dt(Ue==="return"?Ue:"next",Xt[1]?{done:dr.done,value:dr.value}:dr,It,An):It({value:dr,done:kd})).catch(dr=>dt("throw",dr,It,An))}catch(dr){An(dr)}},Nt=Ue=>xt[Ue]=Xt=>new Promise((It,An)=>dt(Ue,Xt,It,An)),xt={};return Qe=Qe.apply(Fe,Ve),xt[ea("asyncIterator")]=()=>xt,Nt("next"),Nt("throw"),Nt("return"),xt},m0=Fe=>{var Ve=Fe[ea("asyncIterator")],Qe=!1,dt,Nt={};return Ve==null?(Ve=Fe[ea("iterator")](),dt=xt=>Nt[xt]=Ue=>Ve[xt](Ue)):(Ve=Ve.call(Fe),dt=xt=>Nt[xt]=Ue=>{if(Qe){if(Qe=!1,xt==="throw")throw Ue;return Ue}return Qe=!0,{done:!1,value:new Jr(new Promise(Xt=>{var It=Ve[xt](Ue);It instanceof Object||I7("Object expected"),Xt(It)}),1)}}),Nt[ea("iterator")]=()=>Nt,dt("next"),"throw"in Ve?dt("throw"):Nt.throw=xt=>{throw xt},"return"in Ve&&dt("return"),Nt},U2=(Fe,Ve,Qe)=>(Ve=Fe[ea("asyncIterator")])?Ve.call(Fe):(Fe=Fe[ea("iterator")](),Ve={},Qe=(dt,Nt)=>(Nt=Fe[dt])&&(Ve[dt]=xt=>new Promise((Ue,Xt,It)=>(xt=Nt.call(Fe,xt),It=xt.done,Promise.resolve(xt.value).then(An=>Ue({value:An,done:It}),Xt)))),Qe("next"),Qe("return"),Ve);var Ve=document.createElement("style");Ve.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;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-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-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-cancel-button{color:#8a8a8a}.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-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:#fff;border-radius:var(--cim-widget-border-radius);box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.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-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.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-user-search{display:flex;flex-direction:column}.cim-widget-user-search.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%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.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-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}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0;line-height:normal;font-size:var(--cim-widget-header-text-font-size)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0;line-height:normal;font-size:var(--cim-widget-header-text-font-size)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.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-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: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%}
2
- /*$vite$:1*/`,document.head.appendChild(Ve);function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dt={exports:{}},Nt={},xt={exports:{}},Ue={};var Xt;function It(){if(Xt)return Ue;Xt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function A(D,te,O){this.props=D,this.context=te,this.refs=S,this.updater=O||y}A.prototype.isReactComponent={},A.prototype.setState=function(D,te){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,te,"setState")},A.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function v(){}v.prototype=A.prototype;function N(D,te,O){this.props=D,this.context=te,this.refs=S,this.updater=O||y}var k=N.prototype=new v;k.constructor=N,_(k,A.prototype),k.isPureReactComponent=!0;var H=Array.isArray,X=Object.prototype.hasOwnProperty,B={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function ie(D,te,O){var _e,De={},ke=null,ze=null;if(te!=null)for(_e in te.ref!==void 0&&(ze=te.ref),te.key!==void 0&&(ke=""+te.key),te)X.call(te,_e)&&!q.hasOwnProperty(_e)&&(De[_e]=te[_e]);var xe=arguments.length-2;if(xe===1)De.children=O;else if(1<xe){for(var Ye=Array(xe),ft=0;ft<xe;ft++)Ye[ft]=arguments[ft+2];De.children=Ye}if(D&&D.defaultProps)for(_e in xe=D.defaultProps,xe)De[_e]===void 0&&(De[_e]=xe[_e]);return{$$typeof:e,type:D,key:ke,ref:ze,props:De,_owner:B.current}}function me(D,te){return{$$typeof:e,type:D.type,key:te,ref:D.ref,props:D.props,_owner:D._owner}}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function oe(D){var te={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(O){return te[O]})}var de=/\/+/g;function le(D,te){return typeof D=="object"&&D!==null&&D.key!=null?oe(""+D.key):te.toString(36)}function ne(D,te,O,_e,De){var ke=typeof D;(ke==="undefined"||ke==="boolean")&&(D=null);var ze=!1;if(D===null)ze=!0;else switch(ke){case"string":case"number":ze=!0;break;case"object":switch(D.$$typeof){case e:case t:ze=!0}}if(ze)return ze=D,De=De(ze),D=_e===""?"."+le(ze,0):_e,H(De)?(O="",D!=null&&(O=D.replace(de,"$&/")+"/"),ne(De,te,O,"",function(ft){return ft})):De!=null&&($(De)&&(De=me(De,O+(!De.key||ze&&ze.key===De.key?"":(""+De.key).replace(de,"$&/")+"/")+D)),te.push(De)),1;if(ze=0,_e=_e===""?".":_e+":",H(D))for(var xe=0;xe<D.length;xe++){ke=D[xe];var Ye=_e+le(ke,xe);ze+=ne(ke,te,O,Ye,De)}else if(Ye=T(D),typeof Ye=="function")for(D=Ye.call(D),xe=0;!(ke=D.next()).done;)ke=ke.value,Ye=_e+le(ke,xe++),ze+=ne(ke,te,O,Ye,De);else if(ke==="object")throw te=String(D),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.");return ze}function Te(D,te,O){if(D==null)return D;var _e=[],De=0;return ne(D,_e,"","",function(ke){return te.call(O,ke,De++)}),_e}function Oe(D){if(D._status===-1){var te=D._result;te=te(),te.then(function(O){(D._status===0||D._status===-1)&&(D._status=1,D._result=O)},function(O){(D._status===0||D._status===-1)&&(D._status=2,D._result=O)}),D._status===-1&&(D._status=0,D._result=te)}if(D._status===1)return D._result.default;throw D._result}var ue={current:null},Q={transition:null},re={ReactCurrentDispatcher:ue,ReactCurrentBatchConfig:Q,ReactCurrentOwner:B};function C(){throw Error("act(...) is not supported in production builds of React.")}return Ue.Children={map:Te,forEach:function(D,te,O){Te(D,function(){te.apply(this,arguments)},O)},count:function(D){var te=0;return Te(D,function(){te++}),te},toArray:function(D){return Te(D,function(te){return te})||[]},only:function(D){if(!$(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Ue.Component=A,Ue.Fragment=n,Ue.Profiler=o,Ue.PureComponent=N,Ue.StrictMode=r,Ue.Suspense=d,Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,Ue.act=C,Ue.cloneElement=function(D,te,O){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var _e=_({},D.props),De=D.key,ke=D.ref,ze=D._owner;if(te!=null){if(te.ref!==void 0&&(ke=te.ref,ze=B.current),te.key!==void 0&&(De=""+te.key),D.type&&D.type.defaultProps)var xe=D.type.defaultProps;for(Ye in te)X.call(te,Ye)&&!q.hasOwnProperty(Ye)&&(_e[Ye]=te[Ye]===void 0&&xe!==void 0?xe[Ye]:te[Ye])}var Ye=arguments.length-2;if(Ye===1)_e.children=O;else if(1<Ye){xe=Array(Ye);for(var ft=0;ft<Ye;ft++)xe[ft]=arguments[ft+2];_e.children=xe}return{$$typeof:e,type:D.type,key:De,ref:ke,props:_e,_owner:ze}},Ue.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:a,_context:D},D.Consumer=D},Ue.createElement=ie,Ue.createFactory=function(D){var te=ie.bind(null,D);return te.type=D,te},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(D){return{$$typeof:c,render:D}},Ue.isValidElement=$,Ue.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:Oe}},Ue.memo=function(D,te){return{$$typeof:f,type:D,compare:te===void 0?null:te}},Ue.startTransition=function(D){var te=Q.transition;Q.transition={};try{D()}finally{Q.transition=te}},Ue.unstable_act=C,Ue.useCallback=function(D,te){return ue.current.useCallback(D,te)},Ue.useContext=function(D){return ue.current.useContext(D)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(D){return ue.current.useDeferredValue(D)},Ue.useEffect=function(D,te){return ue.current.useEffect(D,te)},Ue.useId=function(){return ue.current.useId()},Ue.useImperativeHandle=function(D,te,O){return ue.current.useImperativeHandle(D,te,O)},Ue.useInsertionEffect=function(D,te){return ue.current.useInsertionEffect(D,te)},Ue.useLayoutEffect=function(D,te){return ue.current.useLayoutEffect(D,te)},Ue.useMemo=function(D,te){return ue.current.useMemo(D,te)},Ue.useReducer=function(D,te,O){return ue.current.useReducer(D,te,O)},Ue.useRef=function(D){return ue.current.useRef(D)},Ue.useState=function(D){return ue.current.useState(D)},Ue.useSyncExternalStore=function(D,te,O){return ue.current.useSyncExternalStore(D,te,O)},Ue.useTransition=function(){return ue.current.useTransition()},Ue.version="18.3.1",Ue}var An;function Fo(){return An||(An=1,xt.exports=It()),xt.exports}var na;function kd(){if(na)return Nt;na=1;var e=Fo(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,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:o.current}}return Nt.Fragment=n,Nt.jsx=u,Nt.jsxs=u,Nt}var dr;function $2(){return dr||(dr=1,dt.exports=kd()),dt.exports}var w=$2();const kr=Object.create(null);kr.open="0",kr.close="1",kr.ping="2",kr.pong="3",kr.message="4",kr.upgrade="5",kr.noop="6";const zu=Object.create(null);Object.keys(kr).forEach(e=>{zu[kr[e]]=e});const Pd={type:"error",data:"parser error"},g0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",E0=typeof ArrayBuffer=="function",y0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Nd=({type:e,data:t},n,r)=>g0&&t instanceof Blob?n?r(t):b0(t,r):E0&&(t instanceof ArrayBuffer||y0(t))?n?r(t):b0(new Blob([t]),r):r(kr[e]+(t||"")),b0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function T0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Od;function V2(e,t){if(g0&&e.data instanceof Blob)return e.data.arrayBuffer().then(T0).then(t);if(E0&&(e.data instanceof ArrayBuffer||y0(e.data)))return t(T0(e.data));Nd(e,!1,n=>{Od||(Od=new TextEncoder),t(Od.encode(n))})}const _0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ra=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<_0.length;e++)ra[_0.charCodeAt(e)]=e;const q2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=ra[e.charCodeAt(r)],u=ra[e.charCodeAt(r+1)],c=ra[e.charCodeAt(r+2)],d=ra[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return f},Y2=typeof ArrayBuffer=="function",Id=(e,t)=>{if(typeof e!="string")return{type:"message",data:S0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:W2(e.substring(1),t)}:zu[n]?e.length>1?{type:zu[n],data:e.substring(1)}:{type:zu[n]}:Pd},W2=(e,t)=>{if(Y2){const n=q2(e);return S0(n,t)}else return{base64:!0,data:e}},S0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,x0="",G2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Nd(a,!1,c=>{r[u]=c,++o===n&&t(r.join(x0))})})},X2=(e,t)=>{const n=e.split(x0),r=[];for(let o=0;o<n.length;o++){const a=Id(n[o],t);if(r.push(a),a.type==="error")break}return r};function K2(){return new TransformStream({transform(e,t){V2(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Rd;function ju(e){return e.reduce((t,n)=>t+n.length,0)}function $u(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Q2(e,t){Rd||(Rd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(ju(n)<1)break;const d=$u(n,1);a=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(ju(n)<2)break;const d=$u(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(ju(n)<8)break;const d=$u(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(Pd);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(ju(n)<o)break;const d=$u(n,o);c.enqueue(Id(a?d:Rd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(Pd);break}}}})}const w0=4;function Bt(e){if(e)return J2(e)}function J2(e){for(var t in Bt.prototype)e[t]=Bt.prototype[t];return e}Bt.prototype.on=Bt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Bt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Bt.prototype.off=Bt.prototype.removeListener=Bt.prototype.removeAllListeners=Bt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Bt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Bt.prototype.emitReserved=Bt.prototype.emit,Bt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Bt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Vu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Kn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),Z2="arraybuffer";function R7(){}function C0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const ew=Kn.setTimeout,tw=Kn.clearTimeout;function qu(e,t){t.useNativeTimers?(e.setTimeoutFn=ew.bind(Kn),e.clearTimeoutFn=tw.bind(Kn)):(e.setTimeoutFn=Kn.setTimeout.bind(Kn),e.clearTimeoutFn=Kn.clearTimeout.bind(Kn))}const nw=1.33;function rw(e){return typeof e=="string"?iw(e):Math.ceil((e.byteLength||e.size)*nw)}function iw(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function A0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function ow(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function sw(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class aw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Ld extends Bt{constructor(t){super(),this.writable=!1,qu(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 aw(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=Id(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=ow(t);return n.length?"?"+n:""}}class uw extends Ld{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)};X2(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,G2(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]=A0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let v0=!1;try{v0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const lw=v0;function cw(){}class dw extends uw{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Pr extends Bt{constructor(t,n,r){super(),this.createRequest=t,qu(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 o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=Pr.requestsCount++,Pr.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=cw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Pr.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(Pr.requestsCount=0,Pr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",k0);else if(typeof addEventListener=="function"){const e="onpagehide"in Kn?"pagehide":"unload";addEventListener(e,k0,!1)}}function k0(){for(let e in Pr.requests)Pr.requests.hasOwnProperty(e)&&Pr.requests[e].abort()}const fw=(function(){const e=P0({xdomain:!1});return e&&e.responseType!==null})();class hw extends dw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=fw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Pr(P0,this.uri(),t)}}function P0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||lw))return new XMLHttpRequest}catch(n){}if(!t)try{return new Kn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const N0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class pw extends Ld{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=N0?{}: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(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;Nd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&Vu(()=>{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]=A0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Dd=Kn.WebSocket||Kn.MozWebSocket;class mw extends pw{createSocket(t,n,r){return N0?new Dd(t,n,r):n?new Dd(t,n):new Dd(t)}doWrite(t,n){this.ws.send(n)}}class gw extends Ld{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=Q2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=K2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Ew={websocket:mw,webtransport:gw,polling:hw},yw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,bw=["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 o=yw.exec(e||""),a={},u=14;for(;u--;)a[bw[u]]=o[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=Tw(a,a.path),a.queryKey=_w(a,a.query),a}function Tw(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 _w(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Fd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Yu=[];Fd&&addEventListener("offline",()=>{Yu.forEach(e=>e())},!1);class _i extends Bt{constructor(t,n){if(super(),this.binaryType=Z2,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);qu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=sw(this.opts.query)),Fd&&(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"})},Yu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=w0,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&&_i.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",_i.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=rw(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Vu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(_i.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(),Fd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Yu.indexOf(this._offlineEventListener);r!==-1&&Yu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}_i.protocol=w0;class Sw extends _i{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;_i.priorWebsocketSuccess=!1;const o=()=>{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;_i.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",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",o),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 xw=class extends Sw{constructor(t,n={}){const r=typeof t=="object",o=r?M({},t):M({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>Ew[a]).filter(a=>!!a)),super(r?o:t,o)}};function ww(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 Cw=typeof ArrayBuffer=="function",Aw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,O0=Object.prototype.toString,vw=typeof Blob=="function"||typeof Blob!="undefined"&&O0.call(Blob)==="[object BlobConstructor]",kw=typeof File=="function"||typeof File!="undefined"&&O0.call(File)==="[object FileConstructor]";function Bd(e){return Cw&&(e instanceof ArrayBuffer||Aw(e))||vw&&e instanceof Blob||kw&&e instanceof File}function Wu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Wu(e[n]))return!0;return!1}if(Bd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Wu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Wu(e[n]))return!0;return!1}function Pw(e){const t=[],n=e.data,r=e;return r.data=Ud(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Ud(e,t){if(!e)return e;if(Bd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Ud(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Ud(e[r],t));return n}return e}function Nw(e,t){return e.data=Hd(e.data,t),delete e.attachments,e}function Hd(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]=Hd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Hd(e[n],t));return e}const Ow=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var tt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(tt||(tt={}));class Iw{constructor(t){this.replacer=t}encode(t){return(t.type===tt.EVENT||t.type===tt.ACK)&&Wu(t)?this.encodeAsBinary({type:t.type===tt.EVENT?tt.BINARY_EVENT:tt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===tt.BINARY_EVENT||t.type===tt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Pw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class zd extends Bt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===tt.BINARY_EVENT;r||n.type===tt.BINARY_ACK?(n.type=r?tt.EVENT:tt.ACK,this.reconstructor=new Rw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Bd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(tt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===tt.BINARY_EVENT||r.type===tt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Lw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(zd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case tt.CONNECT:return I0(n);case tt.DISCONNECT:return n===void 0;case tt.CONNECT_ERROR:return typeof n=="string"||I0(n);case tt.EVENT:case tt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Ow.indexOf(n[0])===-1);case tt.ACK:case tt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Rw{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=Nw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Lw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function I0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Dw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zd,Encoder:Iw,get PacketType(){return tt}},Symbol.toStringTag,{value:"Module"}));function fr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Mw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class R0 extends Bt{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=[fr(t,"open",this.onopen.bind(this)),fr(t,"packet",this.onpacket.bind(this)),fr(t,"error",this.onerror.bind(this)),fr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(Mw.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:tt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:tt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tt.EVENT:case tt.BINARY_EVENT:this.onevent(t);break;case tt.ACK:case tt.BINARY_ACK:this.onack(t);break;case tt.DISCONNECT:this.ondisconnect();break;case tt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:tt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Bo(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}Bo.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},Bo.prototype.reset=function(){this.attempts=0},Bo.prototype.setMin=function(e){this.ms=e},Bo.prototype.setMax=function(e){this.max=e},Bo.prototype.setJitter=function(e){this.jitter=e};class jd extends Bt{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,qu(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 Bo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||Dw;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new xw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=fr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=fr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(fr(t,"ping",this.onping.bind(this)),fr(t,"data",this.ondata.bind(this)),fr(t,"error",this.onerror.bind(this)),fr(t,"close",this.onclose.bind(this)),fr(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){Vu(()=>{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 R0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ia={};function Gu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=ww(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ia[o]&&a in ia[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new jd(r,t):(ia[o]||(ia[o]=new jd(r,t)),d=ia[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Gu,{Manager:jd,Socket:R0,io:Gu,connect:Gu});var Fw=function(e){return(function(t){return!!t&&typeof t=="object"})(e)&&!(function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||(function(r){return r.$$typeof===Bw})(t)})(e)},Bw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function oa(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Uo((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Uw(e,t,n){return e.concat(t).map((function(r){return oa(r,n)}))}function L0(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function D0(e,t){try{return t in e}catch(n){return!1}}function Hw(e,t,n){var r={};return n.isMergeableObject(e)&&L0(e).forEach((function(o){r[o]=oa(e[o],n)})),L0(t).forEach((function(o){(function(a,u){return D0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(D0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return Uo;var c=u.customMerge(a);return typeof c=="function"?c:Uo})(o,n)(e[o],t[o],n):r[o]=oa(t[o],n))})),r}function Uo(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Uw,n.isMergeableObject=n.isMergeableObject||Fw,n.cloneUnlessOtherwiseSpecified=oa;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Hw(e,t,n):oa(t,n)}Uo.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Uo(n,r,t)}),{})};var zw=Uo;let jw=class{constructor(t){Object.assign(this,t)}};function _n(e){if(e)return(function(t){for(var n in _n.prototype)t[n]=_n.prototype[n];return t})(e)}_n.prototype.on=_n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},_n.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},_n.prototype.off=_n.prototype.removeListener=_n.prototype.removeAllListeners=_n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},_n.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){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},_n.prototype.emitReserved=_n.prototype.emit,_n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},_n.prototype.hasListeners=function(e){return!!this.listeners(e).length};const $w=typeof ArrayBuffer=="function",M0=Object.prototype.toString,Vw=typeof Blob=="function"||typeof Blob!="undefined"&&M0.call(Blob)==="[object BlobConstructor]",qw=typeof File=="function"||typeof File!="undefined"&&M0.call(File)==="[object FileConstructor]";function $d(e){return $w&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Vw&&e instanceof Blob||qw&&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($d(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 Yw(e){const t=[],n=e.data,r=e;return r.data=Vd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Vd(e,t){if(!e)return e;if($d(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Vd(e[r],t);return n}if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Vd(e[r],t));return n}return e}function Ww(e,t){return e.data=qd(e.data,t),delete e.attachments,e}function qd(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")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=qd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=qd(e[n],t));return e}const Gw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var vt;(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"})(vt||(vt={}));class Xw{constructor(t){this.replacer=t}encode(t){return t.type!==vt.EVENT&&t.type!==vt.ACK||!Xu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===vt.EVENT?vt.BINARY_EVENT:vt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==vt.BINARY_EVENT&&t.type!==vt.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=Yw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Yd extends _n{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===vt.BINARY_EVENT;r||n.type===vt.BINARY_ACK?(n.type=r?vt.EVENT:vt.ACK,this.reconstructor=new Kw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!$d(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(vt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===vt.BINARY_EVENT||r.type===vt.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(!Qw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!Yd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case vt.CONNECT:return F0(n);case vt.DISCONNECT:return n===void 0;case vt.CONNECT_ERROR:return typeof n=="string"||F0(n);case vt.EVENT:case vt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Gw.indexOf(n[0])===-1);case vt.ACK:case vt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Kw{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=Ww(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Qw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function F0(e){return Object.prototype.toString.call(e)==="[object Object]"}const B0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],U0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).map((([c,d])=>{const f=[...a,t(c)];return[e(c),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(o)?u.map((c=>c[1])):Object.fromEntries(u)},H0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Jw=U0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),B0),z0=U0(H0,H0,B0),Zw={Encoder:class extends Xw{encode(e){var t,n;return super.encode(pe(M({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],Jw(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends Yd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?z0(r):r)):n instanceof Object?z0(n):n)):t))}}},eC={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class tC{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",customerId:a,tenantId:u,socketOptions:c={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=m=>{console.log("[Copilot SDK] Connect Ack:",m),this.socket.auth={[this.sessionIdKey]:m.sessionId}},this.handleDisconnect=m=>{console.warn(`[Copilot SDK] Disconnected: ${m}`),m!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${m}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=m=>{console.error(`[Copilot SDK] Connect error: ${m.message}`);const T=m.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=T==null?void 0:T[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const d=`${r}${o}`,f={};t?f["x-cimulate-api-key"]=t:n&&(f.Authorization=`Bearer ${n}`),a&&(f["x-cimulate-customer-id"]=a),u&&(f["Tenant-ID"]=u);const p=[eC,c,{parser:Zw,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Gu(d,zw.all(p))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*ta(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout((()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())}),t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return et(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return et(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return et(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return et(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(o=>{n&&n(o),r(o)}))}))})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return et(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return vd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Jr(u({emit:m=>{c.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Jr(new Promise((m=>{f=m})));for(;c.length>0;)yield c.shift()}finally{yield new Jr(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==o&&u(p)};return this.socket.onAny(d),()=>et(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,c)=>this.socket.emit(t,n,(d=>{d.name==="error"?c(new jw(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}var F=Fo();const eo=Qe(F);var j0=Symbol.for("immer-nothing"),$0=Symbol.for("immer-draftable"),st=Symbol.for("immer-state");function Qn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ho=Object.getPrototypeOf;function zo(e){return!!e&&!!e[st]}function Zr(e){var t;return e?V0(e)||Array.isArray(e)||!!e[$0]||!!((t=e.constructor)!=null&&t[$0])||Qu(e)||Ju(e):!1}var nC=Object.prototype.constructor.toString();function V0(e){if(!e||typeof e!="object")return!1;const t=Ho(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)===nC}function sa(e,t){Ku(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ku(e){const t=e[st];return t?t.type_:Array.isArray(e)?1:Qu(e)?2:Ju(e)?3:0}function Wd(e,t){return Ku(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function q0(e,t,n){const r=Ku(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function rC(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Qu(e){return e instanceof Map}function Ju(e){return e instanceof Set}function Kt(e){return e.copy_||e.base_}function Gd(e,t){if(Qu(e))return new Map(e);if(Ju(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=V0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[st];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[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(Ho(e),r)}else{const r=Ho(e);if(r!==null&&n)return M({},e);const o=Object.create(r);return Object.assign(o,e)}}function Xd(e,t=!1){return Zu(e)||zo(e)||!Zr(e)||(Ku(e)>1&&(e.set=e.add=e.clear=e.delete=iC),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Xd(r,!0))),e}function iC(){Qn(2)}function Zu(e){return Object.isFrozen(e)}var Kd={};function to(e){const t=Kd[e];return t||Qn(0,e),t}function oC(e,t){Kd[e]||(Kd[e]=t)}var aa;function el(){return aa}function sC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Y0(e,t){t&&(to("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qd(e){Jd(e),e.drafts_.forEach(aC),e.drafts_=null}function Jd(e){e===aa&&(aa=e.parent_)}function W0(e){return aa=sC(aa,e)}function aC(e){const t=e[st];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function G0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[st].modified_&&(Qd(t),Qn(4)),Zr(e)&&(e=tl(t,e),t.parent_||nl(t,e)),t.patches_&&to("Patches").generateReplacementPatches_(n[st].base_,e,t.patches_,t.inversePatches_)):e=tl(t,n,[]),Qd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==j0?e:void 0}function tl(e,t,n){if(Zu(t))return t;const r=t[st];if(!r)return sa(t,(o,a)=>X0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return nl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),sa(a,(c,d)=>X0(e,r,o,c,d,n,u)),nl(e,o,!1),n&&e.patches_&&to("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function X0(e,t,n,r,o,a,u){if(zo(o)){const c=a&&t&&t.type_!==3&&!Wd(t.assigned_,r)?a.concat(r):void 0,d=tl(e,o,c);if(q0(n,r,d),zo(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Zr(o)&&!Zu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;tl(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&nl(e,o)}}function nl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xd(t,n)}function uC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:el(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Zd;n&&(o=[r],a=ua);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Zd={get(e,t){if(t===st)return e;const n=Kt(e);if(!Wd(n,t))return lC(e,n,t);const r=n[t];return e.finalized_||!Zr(r)?r:r===ef(e.base_,t)?(tf(e),e.copy_[t]=la(r,e)):r},has(e,t){return t in Kt(e)},ownKeys(e){return Reflect.ownKeys(Kt(e))},set(e,t,n){const r=K0(Kt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=ef(Kt(e),t),a=o==null?void 0:o[st];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(rC(n,o)&&(n!==void 0||Wd(e.base_,t)))return!0;tf(e),ei(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 ef(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,tf(e),ei(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Kt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Qn(11)},getPrototypeOf(e){return Ho(e.base_)},setPrototypeOf(){Qn(12)}},ua={};sa(Zd,(e,t)=>{ua[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ua.deleteProperty=function(e,t){return ua.set.call(this,e,t,void 0)},ua.set=function(e,t,n){return Zd.set.call(this,e[0],t,n,e[0])};function ef(e,t){const n=e[st];return(n?Kt(n):e)[t]}function lC(e,t,n){var o;const r=K0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function K0(e,t){if(!(t in e))return;let n=Ho(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ho(n)}}function ei(e){e.modified_||(e.modified_=!0,e.parent_&&ei(e.parent_))}function tf(e){e.copy_||(e.copy_=Gd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var cC=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"&&Qn(6),r!==void 0&&typeof r!="function"&&Qn(7);let o;if(Zr(t)){const a=W0(this),u=la(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Qd(a):Jd(a)}return Y0(a,r),G0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===j0&&(o=void 0),this.autoFreeze_&&Xd(o,!0),r){const a=[],u=[];to("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Qn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),r,o]},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){Zr(e)||Qn(8),zo(e)&&(e=dC(e));const t=W0(this),n=la(e,void 0);return n[st].isManual_=!0,Jd(t),n}finishDraft(e,t){const n=e&&e[st];(!n||!n.isManual_)&&Qn(9);const{scope_:r}=n;return Y0(r,t),G0(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 o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=to("Patches").applyPatches_;return zo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function la(e,t){const n=Qu(e)?to("MapSet").proxyMap_(e,t):Ju(e)?to("MapSet").proxySet_(e,t):uC(e,t);return(t?t.scope_:el()).drafts_.push(n),n}function dC(e){return zo(e)||Qn(10,e),Q0(e)}function Q0(e){if(!Zr(e)||Zu(e))return e;const t=e[st];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Gd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Gd(e,!0);return sa(n,(r,o)=>{q0(n,r,Q0(o))}),t&&(t.finalized_=!1),n}function fC(){class e extends Map{constructor(d,f){super(),this[st]={type_:2,parent_:f,scope_:f?f.scope_:el(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Kt(this[st]).size}has(d){return Kt(this[st]).has(d)}set(d,f){const p=this[st];return u(p),(!Kt(p).has(d)||Kt(p).get(d)!==f)&&(n(p),ei(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[st];return u(f),n(f),ei(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[st];u(d),Kt(d).size&&(n(d),ei(d),d.assigned_=new Map,sa(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[st];Kt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[st];u(f);const p=Kt(f).get(d);if(f.finalized_||!Zr(p)||p!==f.base_.get(d))return p;const m=la(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Kt(this[st]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[st]={type_:3,parent_:f,scope_:f?f.scope_:el(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Kt(this[st]).size}has(d){const f=this[st];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[st];return u(f),this.has(d)||(a(f),ei(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[st];return u(f),a(f),ei(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[st];u(d),Kt(d).size&&(a(d),ei(d),d.copy_.clear())}values(){const d=this[st];return u(d),a(d),d.copy_.values()}entries(){const d=this[st];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let m=p.next();for(;!m.done;)d.call(f,m.value,m.value,this),m=p.next()}}function o(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(Zr(d)){const f=la(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Qn(3,JSON.stringify(Kt(c)))}oC("MapSet",{proxyMap_:t,proxySet_:o})}var Un=new cC,hC=Un.produce;Un.produceWithPatches.bind(Un),Un.setAutoFreeze.bind(Un),Un.setUseStrictShallowCopy.bind(Un),Un.applyPatches.bind(Un),Un.createDraft.bind(Un),Un.finishDraft.bind(Un);function J0(e,t,n){var r=F.useMemo(function(){return hC(e)},[e]);return F.useReducer(r,t,n)}const Z0={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},mt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},no={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},pC=e=>{switch(!0){case e==="copilot_search":return"search";case e==="copilot_browse":return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return null}},jo="cimulate",nf=`${jo}:pdp-update`,rf=`${jo}:browse-update`,of=`${jo}:search-update`,sf=`${jo}:ui-state-update`,af=`${jo}:prompts-state-update`,uf=`${jo}:session-state`,Nr=M({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},Z0),mC={"browse-context":Nr.CONTEXT_UPDATED,categoryId:Nr.CATEGORY_ID_CHANGED,categoryName:Nr.CATEGORY_NAME_CHANGED,page:Nr.PAGE_CHANGED,pageSize:Nr.PAGE_SIZE_CHANGED,includeFacets:Nr.FACET_FILTERS_CHANGED,facetFilters:Nr.FACET_FILTERS_CHANGED,rangeFilters:Nr.RANGE_FILTERS_CHANGED,catalogSegment:Nr.CATALOG_SEGMENT_CHANGED,pricebooks:Nr.PRICEBOOKS_CHANGED},ti=M({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},Z0),gC={"search-context":ti.SEARCH_CONTEXT_UPDATED,query:ti.QUERY_CHANGED,page:ti.PAGE_CHANGED,pageSize:ti.PAGE_SIZE_CHANGED,includeFacets:ti.FACET_FILTERS_CHANGED,facetFilters:ti.FACET_FILTERS_CHANGED,rangeFilters:ti.RANGE_FILTERS_CHANGED,catalogSegment:ti.CATALOG_SEGMENT_CHANGED,pricebooks:ti.PRICEBOOKS_CHANGED},j="cim-widget",ni=`--${j}`,Si={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},EC=(e=Si)=>({[`${ni}-primary-color`]:e.primaryColor||Si.primaryColor,[`${ni}-secondary-color`]:e.secondaryColor||Si.secondaryColor,[`${ni}-font-color`]:e.fontColor||Si.fontColor,[`${ni}-font-family`]:e.fontFamily||Si.fontFamily,[`${ni}-background-color`]:e.backgroundColor||Si.backgroundColor,[`${ni}-border-color`]:e.borderColor||Si.borderColor,[`${ni}-border-radius`]:e.borderRadius||Si.borderRadius}),xi={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},eg=F.createContext(null),tg=F.createContext(null);function ng(e,t){return function(){return e.apply(t,arguments)}}const{toString:yC}=Object.prototype,{getPrototypeOf:rl}=Object,{iterator:il,toStringTag:rg}=Symbol,ol=(e=>t=>{const n=yC.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),hr=e=>(e=e.toLowerCase(),t=>ol(t)===e),sl=e=>t=>typeof t===e,{isArray:$o}=Array,Vo=sl("undefined");function ca(e){return e!==null&&!Vo(e)&&e.constructor!==null&&!Vo(e.constructor)&&vn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ig=hr("ArrayBuffer");function bC(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ig(e.buffer),t}const TC=sl("string"),vn=sl("function"),og=sl("number"),da=e=>e!==null&&typeof e=="object",_C=e=>e===!0||e===!1,al=e=>{if(ol(e)!=="object")return!1;const t=rl(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(rg in e)&&!(il in e)},SC=e=>{if(!da(e)||ca(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},xC=hr("Date"),wC=hr("File"),CC=e=>!!(e&&typeof e.uri!="undefined"),AC=e=>e&&typeof e.getParts!="undefined",vC=hr("Blob"),kC=hr("FileList"),PC=e=>da(e)&&vn(e.pipe);function NC(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const sg=NC(),ag=typeof sg.FormData!="undefined"?sg.FormData:void 0,OC=e=>{if(!e)return!1;if(ag&&e instanceof ag)return!0;const t=rl(e);if(!t||t===Object.prototype||!vn(e.append))return!1;const n=ol(e);return n==="formdata"||n==="object"&&vn(e.toString)&&e.toString()==="[object FormData]"},IC=hr("URLSearchParams"),[RC,LC,DC,MC]=["ReadableStream","Request","Response","Headers"].map(hr),FC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fa(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),$o(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(ca(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 ug(e,t){if(ca(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const ro=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,lg=e=>!Vo(e)&&e!==ro;function lf(...e){const{caseless:t,skipUndefined:n}=lg(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&ug(r,u)||u,d=cf(r,c)?r[c]:void 0;al(d)&&al(a)?r[c]=lf(d,a):al(a)?r[c]=lf({},a):$o(a)?r[c]=a.slice():(!n||!Vo(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&fa(e[a],o);return r}const BC=(e,t,n,{allOwnKeys:r}={})=>(fa(t,(o,a)=>{n&&vn(o)?Object.defineProperty(e,a,{__proto__:null,value:ng(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),UC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),HC=(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)},zC=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&rl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jC=(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},$C=e=>{if(!e)return null;if($o(e))return e;let t=e.length;if(!og(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},VC=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&rl(Uint8Array)),qC=(e,t)=>{const r=(e&&e[il]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},YC=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},WC=hr("HTMLFormElement"),GC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),cf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),XC=hr("RegExp"),cg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fa(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},KC=e=>{cg(e,(t,n)=>{if(vn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(vn(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+"'")})}})},QC=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return $o(e)?r(e):r(String(e).split(t)),n},JC=()=>{},ZC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function eA(e){return!!(e&&vn(e.append)&&e[rg]==="FormData"&&e[il])}const tA=e=>{const t=new WeakSet,n=r=>{if(da(r)){if(t.has(r))return;if(ca(r))return r;if(!("toJSON"in r)){t.add(r);const o=$o(r)?[]:{};return fa(r,(a,u)=>{const c=n(a);!Vo(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},nA=hr("AsyncFunction"),rA=e=>e&&(da(e)||vn(e))&&vn(e.then)&&vn(e.catch),dg=((e,t)=>e?setImmediate:t?((n,r)=>(ro.addEventListener("message",({source:o,data:a})=>{o===ro&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ro.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",vn(ro.postMessage)),iA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ro):typeof process!="undefined"&&process.nextTick||dg,V={isArray:$o,isArrayBuffer:ig,isBuffer:ca,isFormData:OC,isArrayBufferView:bC,isString:TC,isNumber:og,isBoolean:_C,isObject:da,isPlainObject:al,isEmptyObject:SC,isReadableStream:RC,isRequest:LC,isResponse:DC,isHeaders:MC,isUndefined:Vo,isDate:xC,isFile:wC,isReactNativeBlob:CC,isReactNative:AC,isBlob:vC,isRegExp:XC,isFunction:vn,isStream:PC,isURLSearchParams:IC,isTypedArray:VC,isFileList:kC,forEach:fa,merge:lf,extend:BC,trim:FC,stripBOM:UC,inherits:HC,toFlatObject:zC,kindOf:ol,kindOfTest:hr,endsWith:jC,toArray:$C,forEachEntry:qC,matchAll:YC,isHTMLForm:WC,hasOwnProperty:cf,hasOwnProp:cf,reduceDescriptors:cg,freezeMethods:KC,toObjectSet:QC,toCamelCase:GC,noop:JC,toFiniteNumber:ZC,findKey:ug,global:ro,isContextDefined:lg,isSpecCompliantForm:eA,toJSONObject:tA,isAsyncFn:nA,isThenable:rA,setImmediate:dg,asap:iA,isIterable:e=>e!=null&&vn(e[il])},oA=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sA=e=>{const t={};let n,r,o;return e&&e.split(`
3
- `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&oA[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function aA(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 uA=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),lA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function df(e,t){return V.isArray(e)?e.map(n=>df(n,t)):aA(String(e).replace(t,""))}const cA=e=>df(e,uA),dA=e=>df(e,lA);function fg(e){const t=Object.create(null);return V.forEach(e.toJSON(),(n,r)=>{t[r]=dA(n)}),t}const hg=Symbol("internals");function ha(e){return e&&String(e).trim().toLowerCase()}function ul(e){return e===!1||e==null?e:V.isArray(e)?e.map(ul):cA(String(e))}function fA(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 hA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ff(e,t,n,r,o){if(V.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function pA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function mA(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let Sn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,f){const p=ha(d);if(!p)throw new Error("header name must be a non-empty string");const m=V.findKey(o,p);(!m||o[m]===void 0||f===!0||f===void 0&&o[m]!==!1)&&(o[m||d]=ul(c))}const u=(c,d)=>V.forEach(c,(f,p)=>a(f,p,d));if(V.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(V.isString(t)&&(t=t.trim())&&!hA(t))u(sA(t),n);else if(V.isObject(t)&&V.isIterable(t)){let c={},d,f;for(const p of t){if(!V.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[f=p[0]]=(d=c[f])?V.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=ha(t),t){const r=V.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return fA(o);if(V.isFunction(n))return n.call(this,o,r);if(V.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ha(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ff(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=ha(u),u){const c=V.findKey(r,u);c&&(!n||ff(r,r[c],c,n))&&(delete r[c],o=!0)}}return V.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||ff(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return V.forEach(this,(o,a)=>{const u=V.findKey(r,a);if(u){n[u]=ul(o),delete n[a];return}const c=t?pA(a):String(a).trim();c!==a&&delete n[a],n[c]=ul(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return V.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
4
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[hg]=this[hg]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=ha(u);r[c]||(mA(o,u),r[c]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}};Sn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(Sn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(Sn);const gA="[REDACTED ****]";function EA(e){if(V.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(V.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function yA(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||V.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof Sn&&(a=a.toJSON()),r.push(a);let u;if(V.isArray(a))u=[],a.forEach((c,d)=>{const f=o(c);V.isUndefined(f)||(u[d]=f)});else{if(!V.isPlainObject(a)&&EA(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?gA:o(d);V.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return o(e)}let Ne=class H2 extends Error{static from(t,n,r,o,a,u){const c=new H2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&V.hasOwnProp(t,"redact")?t.redact:void 0,r=V.isArray(n)&&n.length>0?yA(t,n):V.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};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 bA=null;function hf(e){return V.isPlainObject(e)||V.isArray(e)}function pg(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function pf(e,t,n){return e?e.concat(t).map(function(o,a){return o=pg(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function TA(e){return V.isArray(e)&&!e.some(hf)}const _A=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function ll(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,v){return!V.isUndefined(v[A])});const r=n.metaTokens,o=n.visitor||m,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,f=c&&V.isSpecCompliantForm(t);if(!V.isFunction(o))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(V.isDate(S))return S.toISOString();if(V.isBoolean(S))return S.toString();if(!f&&V.isBlob(S))throw new Ne("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(S)||V.isTypedArray(S)?f&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function m(S,A,v){let N=S;if(V.isReactNative(t)&&V.isReactNativeBlob(S))return t.append(pf(v,A,a),p(S)),!1;if(S&&!v&&typeof S=="object"){if(V.endsWith(A,"{}"))A=r?A:A.slice(0,-2),S=JSON.stringify(S);else if(V.isArray(S)&&TA(S)||(V.isFileList(S)||V.endsWith(A,"[]"))&&(N=V.toArray(S)))return A=pg(A),N.forEach(function(H,X){!(V.isUndefined(H)||H===null)&&t.append(u===!0?pf([A],X,a):u===null?A:A+"[]",p(H))}),!1}return hf(S)?!0:(t.append(pf(v,A,a),p(S)),!1)}const T=[],y=Object.assign(_A,{defaultVisitor:m,convertValue:p,isVisitable:hf});function _(S,A,v=0){if(!V.isUndefined(S)){if(v>d)throw new Ne("Object is too deeply nested ("+v+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED);if(T.indexOf(S)!==-1)throw Error("Circular reference detected in "+A.join("."));T.push(S),V.forEach(S,function(k,H){(!(V.isUndefined(k)||k===null)&&o.call(t,k,V.isString(H)?H.trim():H,A,y))===!0&&_(k,A?A.concat(H):[H],v+1)}),T.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return _(e),t}function mg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function mf(e,t){this._pairs=[],e&&ll(e,this,t)}const gg=mf.prototype;gg.append=function(t,n){this._pairs.push([t,n])},gg.toString=function(t){const n=t?function(r){return t.call(this,r,mg)}:mg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function SA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Eg(e,t,n){if(!t)return e;const r=n&&n.encode||SA,o=V.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=V.isURLSearchParams(t)?t.toString():new mf(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class yg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const gf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},xA={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:mf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ef=typeof window!="undefined"&&typeof document!="undefined",yf=typeof navigator=="object"&&navigator||void 0,wA=Ef&&(!yf||["ReactNative","NativeScript","NS"].indexOf(yf.product)<0),CA=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",AA=Ef&&window.location.href||"http://localhost",dn=M(M({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ef,hasStandardBrowserEnv:wA,hasStandardBrowserWebWorkerEnv:CA,navigator:yf,origin:AA},Symbol.toStringTag,{value:"Module"}))),xA);function vA(e,t){return ll(e,new dn.classes.URLSearchParams,M({visitor:function(n,r,o,a){return dn.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function kA(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function PA(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function bg(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&V.isArray(o)?o.length:u,d?(V.hasOwnProp(o,u)?o[u]=V.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!V.hasOwnProp(o,u)||!V.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&V.isArray(o[u])&&(o[u]=PA(o[u])),!c)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,o)=>{t(kA(r),o,n,0)}),n}return null}const qo=(e,t)=>e!=null&&V.hasOwnProp(e,t)?e[t]:void 0;function NA(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const pa={transitional:gf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return o?JSON.stringify(bg(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=qo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return vA(t,d).toString();if((c=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=qo(this,"env"),p=f&&f.FormData;return ll(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),NA(t)):t}],transformResponse:[function(t){const n=qo(this,"transitional")||pa.transitional,r=n&&n.forcedJSONParsing,o=qo(this,"responseType"),a=o==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,qo(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,qo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dn.classes.FormData,Blob:dn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],e=>{pa.headers[e]={}});function bf(e,t){const n=this||pa,r=t||n,o=Sn.from(r.headers);let a=r.data;return V.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Tg(e){return!!(e&&e.__CANCEL__)}let ma=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function _g(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 OA(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function IA(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[o]=d,r[o]=f;let m=a,T=0;for(;m!==o;)T+=n[m++],m=m%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(T*1e3/y):void 0}}function RA(e,t){let n=0,r=1e3/t,o,a;const u=(f,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(o=f,a||(a=setTimeout(()=>{a=null,u(o)},r-m)))},()=>o&&u(o)]}const cl=(e,t,n=3)=>{let r=0;const o=IA(50,250);return RA(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=o(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)},Sg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},xg=e=>(...t)=>V.asap(()=>e(...t)),LA=dn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,dn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(dn.origin),dn.navigator&&/(msie|trident)/i.test(dn.navigator.userAgent)):()=>!0,DA=dn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&c.push(`path=${r}`),V.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),V.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function MA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function FA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function wg(e,t,n){let r=!MA(t);return e&&(r||n===!1)?FA(e,t):t}const Cg=e=>e instanceof Sn?M({},e):e;function io(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,p,m,T){return V.isPlainObject(f)&&V.isPlainObject(p)?V.merge.call({caseless:T},f,p):V.isPlainObject(p)?V.merge({},p):V.isArray(p)?p.slice():p}function o(f,p,m,T){if(V.isUndefined(p)){if(!V.isUndefined(f))return r(void 0,f,m,T)}else return r(f,p,m,T)}function a(f,p){if(!V.isUndefined(p))return r(void 0,p)}function u(f,p){if(V.isUndefined(p)){if(!V.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,m){if(V.hasOwnProp(t,m))return r(f,p);if(V.hasOwnProp(e,m))return r(void 0,f)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(f,p,m)=>o(Cg(f),Cg(p),m,!0)};return V.forEach(Object.keys(M(M({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const m=V.hasOwnProp(d,p)?d[p]:o,T=V.hasOwnProp(e,p)?e[p]:void 0,y=V.hasOwnProp(t,p)?t[p]:void 0,_=m(T,y,p);V.isUndefined(_)&&m!==c||(n[p]=_)}),n}const BA=["content-type","content-length"];function UA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{BA.includes(r.toLowerCase())&&e.set(r,o)})}const HA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Ag=e=>{const t=io({},e),n=T=>V.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=Sn.from(c),t.url=Eg(wg(f,m,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?HA(d.password):""))),V.isFormData(r)&&(dn.hasStandardBrowserEnv||dn.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):V.isFunction(r.getHeaders)&&UA(c,r.getHeaders(),n("formDataHeaderPolicy"))),dn.hasStandardBrowserEnv&&(V.isFunction(o)&&(o=o(t)),o===!0||o==null&&LA(t.url))){const y=a&&u&&DA.read(u);y&&c.set(a,y)}return t},zA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=Ag(e);let a=o.data;const u=Sn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,p,m,T,y,_;function S(){y&&y(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(o.method.toUpperCase(),o.url,!0),A.timeout=o.timeout;function v(){if(!A)return;const k=Sn.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),X={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:k,config:e,request:A};_g(function(q){n(q),S()},function(q){r(q),S()},X),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 Ne("Request aborted",Ne.ECONNABORTED,e,A)),S(),A=null)},A.onerror=function(H){const X=H&&H.message?H.message:"Network Error",B=new Ne(X,Ne.ERR_NETWORK,e,A);B.event=H||null,r(B),S(),A=null},A.ontimeout=function(){let H=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const X=o.transitional||gf;o.timeoutErrorMessage&&(H=o.timeoutErrorMessage),r(new Ne(H,X.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,A)),S(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&V.forEach(fg(u),function(H,X){A.setRequestHeader(X,H)}),V.isUndefined(o.withCredentials)||(A.withCredentials=!!o.withCredentials),c&&c!=="json"&&(A.responseType=o.responseType),f&&([T,_]=cl(f,!0),A.addEventListener("progress",T)),d&&A.upload&&([m,y]=cl(d),A.upload.addEventListener("progress",m),A.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=k=>{A&&(r(!k||k.type?new ma(null,e,A):k),A.abort(),S(),A=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const N=OA(o.url);if(N&&!dn.protocols.includes(N)){r(new Ne("Unsupported protocol "+N+":",Ne.ERR_BAD_REQUEST,e));return}A.send(a||null)})},jA=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Ne?f:new ma(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(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(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>V.asap(u),c},$A=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},VA=function(e,t){return vd(this,null,function*(){try{for(var n=U2(qA(e)),r,o,a;r=!(o=yield new Jr(n.next())).done;r=!1){const u=o.value;yield*m0($A(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Jr(o.call(n)))}finally{if(a)throw a[0]}}})},qA=function(e){return vd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*m0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Jr(t.read());if(n)break;yield r}}finally{yield new Jr(t.cancel())}})},vg=(e,t,n,r)=>{const o=VA(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return et(this,null,function*(){try{const{done:p,value:m}=yield o.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),o.return()}},{highWaterMark:2})};function YA(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 _=r.charCodeAt(y+1),S=r.charCodeAt(y+2);(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102)&&(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}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Tf="1.16.1",kg=64*1024,{isFunction:dl}=V,Pg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},WA=e=>{const t=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=V.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,c=o?dl(o):typeof fetch=="function",d=dl(a),f=dl(u);if(!c)return!1;const p=c&&dl(n),m=c&&(typeof r=="function"?(v=>N=>v.encode(N))(new r):v=>et(null,null,function*(){return new Uint8Array(yield new a(v).arrayBuffer())})),T=d&&p&&Pg(()=>{let v=!1;const N=new a(dn.origin,{body:new n,method:"POST",get duplex(){return v=!0,"half"}}),k=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),v&&!k}),y=f&&p&&Pg(()=>V.isReadableStream(new u("").body)),_={stream:y&&(v=>v.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!_[v]&&(_[v]=(N,k)=>{let H=N&&N[v];if(H)return H.call(N);throw new Ne(`Response type '${v}' is not supported`,Ne.ERR_NOT_SUPPORT,k)})});const S=v=>et(null,null,function*(){if(v==null)return 0;if(V.isBlob(v))return v.size;if(V.isSpecCompliantForm(v))return(yield new a(dn.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(V.isArrayBufferView(v)||V.isArrayBuffer(v))return v.byteLength;if(V.isURLSearchParams(v)&&(v=v+""),V.isString(v))return(yield m(v)).byteLength}),A=(v,N)=>et(null,null,function*(){const k=V.toFiniteNumber(v.getContentLength());return k==null?S(N):k});return v=>et(null,null,function*(){let{url:N,method:k,data:H,signal:X,cancelToken:B,timeout:q,onDownloadProgress:ie,onUploadProgress:me,responseType:$,headers:oe,withCredentials:de="same-origin",fetchOptions:le,maxContentLength:ne,maxBodyLength:Te}=Ag(v);const Oe=V.isNumber(ne)&&ne>-1,ue=V.isNumber(Te)&&Te>-1;let Q=o||fetch;$=$?($+"").toLowerCase():"text";let re=jA([X,B&&B.toAbortSignal()],q),C=null;const D=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let te;try{if(Oe&&typeof N=="string"&&N.startsWith("data:")&&YA(N)>ne)throw new Ne("maxContentLength size of "+ne+" exceeded",Ne.ERR_BAD_RESPONSE,v,C);if(ue&&k!=="get"&&k!=="head"){const xe=yield A(oe,H);if(typeof xe=="number"&&isFinite(xe)&&xe>Te)throw new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,v,C)}if(me&&T&&k!=="get"&&k!=="head"&&(te=yield A(oe,H))!==0){let xe=new a(N,{method:"POST",body:H,duplex:"half"}),Ye;if(V.isFormData(H)&&(Ye=xe.headers.get("content-type"))&&oe.setContentType(Ye),xe.body){const[ft,on]=Sg(te,cl(xg(me)));H=vg(xe.body,kg,ft,on)}}V.isString(de)||(de=de?"include":"omit");const O=d&&"credentials"in a.prototype;if(V.isFormData(H)){const xe=oe.getContentType();xe&&/^multipart\/form-data/i.test(xe)&&!/boundary=/i.test(xe)&&oe.delete("content-type")}oe.set("User-Agent","axios/"+Tf,!1);const _e=pe(M({},le),{signal:re,method:k.toUpperCase(),headers:fg(oe.normalize()),body:H,duplex:"half",credentials:O?de:void 0});C=d&&new a(N,_e);let De=yield d?Q(C,le):Q(N,_e);if(Oe){const xe=V.toFiniteNumber(De.headers.get("content-length"));if(xe!=null&&xe>ne)throw new Ne("maxContentLength size of "+ne+" exceeded",Ne.ERR_BAD_RESPONSE,v,C)}const ke=y&&($==="stream"||$==="response");if(y&&De.body&&(ie||Oe||ke&&D)){const xe={};["status","statusText","headers"].forEach(Rn=>{xe[Rn]=De[Rn]});const Ye=V.toFiniteNumber(De.headers.get("content-length")),[ft,on]=ie&&Sg(Ye,cl(xg(ie),!0))||[];let $r=0;const Vr=Rn=>{if(Oe&&($r=Rn,$r>ne))throw new Ne("maxContentLength size of "+ne+" exceeded",Ne.ERR_BAD_RESPONSE,v,C);ft&&ft(Rn)};De=new u(vg(De.body,kg,Vr,()=>{on&&on(),D&&D()}),xe)}$=$||"text";let ze=yield _[V.findKey(_,$)||"text"](De,v);if(Oe&&!y&&!ke){let xe;if(ze!=null&&(typeof ze.byteLength=="number"?xe=ze.byteLength:typeof ze.size=="number"?xe=ze.size:typeof ze=="string"&&(xe=typeof r=="function"?new r().encode(ze).byteLength:ze.length)),typeof xe=="number"&&xe>ne)throw new Ne("maxContentLength size of "+ne+" exceeded",Ne.ERR_BAD_RESPONSE,v,C)}return!ke&&D&&D(),yield new Promise((xe,Ye)=>{_g(xe,Ye,{data:ze,headers:Sn.from(De.headers),status:De.status,statusText:De.statusText,config:v,request:C})})}catch(O){if(D&&D(),re&&re.aborted&&re.reason instanceof Ne){const _e=re.reason;throw _e.config=v,C&&(_e.request=C),O!==_e&&(_e.cause=O),_e}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new Ne("Network Error",Ne.ERR_NETWORK,v,C,O&&O.response),{cause:O.cause||O}):Ne.from(O,O&&O.code,v,C,O&&O.response)}})},GA=new Map,Ng=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,f,p=GA;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:WA(t)),p=f;return f};Ng();const _f={http:bA,xhr:zA,fetch:{get:Ng}};V.forEach(_f,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Og=e=>`- ${e}`,XA=e=>V.isFunction(e)||e===null||e===!1;function KA(e,t){e=V.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!XA(r)&&(o=_f[(c=String(r)).toLowerCase()],o===void 0))throw new Ne(`Unknown adapter '${c}'`);if(o&&(V.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
5
- `+u.map(Og).join(`
6
- `):" "+Og(u[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const Ig={getAdapter:KA,adapters:_f};function Sf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ma(null,e)}function Rg(e){return Sf(e),e.headers=Sn.from(e.headers),e.data=bf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ig.getAdapter(e.adapter||pa.adapter,e)(e).then(function(r){Sf(e),e.response=r;try{r.data=bf.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Sn.from(r.headers),r},function(r){if(!Tg(r)&&(Sf(e),r&&r.response)){e.response=r.response;try{r.response.data=bf.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Sn.from(r.response.headers)}return Promise.reject(r)})}const fl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Lg={};fl.transitional=function(t,n,r){function o(a,u){return"[Axios v"+Tf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Ne(o(u," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!Lg[u]&&(Lg[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},fl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function QA(e,t,n){if(typeof e!="object")throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new 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 hl={assertOptions:QA,validators:fl},Jn=hl.validators;let oo=class{constructor(t){this.defaults=t||{},this.interceptors={request:new yg,response:new yg}}request(t,n){return et(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(`
1
+ (function(Fe,Ve){typeof exports=="object"&&typeof module!="undefined"?Ve(exports):typeof define=="function"&&define.amd?define(["exports"],Ve):(Fe=typeof globalThis!="undefined"?globalThis:Fe||self,Ve(Fe.CimulateCopilot={}))})(this,(function(Fe){"use strict";var U7=Object.defineProperty,H7=Object.defineProperties;var z7=Object.getOwnPropertyDescriptors;var Cd=Object.getOwnPropertySymbols;var z2=Object.prototype.hasOwnProperty,j2=Object.prototype.propertyIsEnumerable;var ea=(Fe,Ve)=>(Ve=Symbol[Fe])?Ve:Symbol.for("Symbol."+Fe),j7=Fe=>{throw TypeError(Fe)},ta=Math.pow,g0=(Fe,Ve,Qe)=>Ve in Fe?U7(Fe,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Fe[Ve]=Qe,M=(Fe,Ve)=>{for(var Qe in Ve||(Ve={}))z2.call(Ve,Qe)&&g0(Fe,Qe,Ve[Qe]);if(Cd)for(var Qe of Cd(Ve))j2.call(Ve,Qe)&&g0(Fe,Qe,Ve[Qe]);return Fe},pe=(Fe,Ve)=>H7(Fe,z7(Ve));var cn=(Fe,Ve)=>{var Qe={};for(var dt in Fe)z2.call(Fe,dt)&&Ve.indexOf(dt)<0&&(Qe[dt]=Fe[dt]);if(Fe!=null&&Cd)for(var dt of Cd(Fe))Ve.indexOf(dt)<0&&j2.call(Fe,dt)&&(Qe[dt]=Fe[dt]);return Qe};var Se=(Fe,Ve,Qe)=>g0(Fe,typeof Ve!="symbol"?Ve+"":Ve,Qe);var et=(Fe,Ve,Qe)=>new Promise((dt,Ot)=>{var xt=Rt=>{try{Xt(Qe.next(Rt))}catch(Cn){Ot(Cn)}},Ue=Rt=>{try{Xt(Qe.throw(Rt))}catch(Cn){Ot(Cn)}},Xt=Rt=>Rt.done?dt(Rt.value):Promise.resolve(Rt.value).then(xt,Ue);Xt((Qe=Qe.apply(Fe,Ve)).next())}),Zr=function(Fe,Ve){this[0]=Fe,this[1]=Ve},vd=(Fe,Ve,Qe)=>{var dt=(Ue,Xt,Rt,Cn)=>{try{var Fo=Qe[Ue](Xt),na=(Xt=Fo.value)instanceof Zr,kd=Fo.done;Promise.resolve(na?Xt[0]:Xt).then(fr=>na?dt(Ue==="return"?Ue:"next",Xt[1]?{done:fr.done,value:fr.value}:fr,Rt,Cn):Rt({value:fr,done:kd})).catch(fr=>dt("throw",fr,Rt,Cn))}catch(fr){Cn(fr)}},Ot=Ue=>xt[Ue]=Xt=>new Promise((Rt,Cn)=>dt(Ue,Xt,Rt,Cn)),xt={};return Qe=Qe.apply(Fe,Ve),xt[ea("asyncIterator")]=()=>xt,Ot("next"),Ot("throw"),Ot("return"),xt},E0=Fe=>{var Ve=Fe[ea("asyncIterator")],Qe=!1,dt,Ot={};return Ve==null?(Ve=Fe[ea("iterator")](),dt=xt=>Ot[xt]=Ue=>Ve[xt](Ue)):(Ve=Ve.call(Fe),dt=xt=>Ot[xt]=Ue=>{if(Qe){if(Qe=!1,xt==="throw")throw Ue;return Ue}return Qe=!0,{done:!1,value:new Zr(new Promise(Xt=>{var Rt=Ve[xt](Ue);Rt instanceof Object||j7("Object expected"),Xt(Rt)}),1)}}),Ot[ea("iterator")]=()=>Ot,dt("next"),"throw"in Ve?dt("throw"):Ot.throw=xt=>{throw xt},"return"in Ve&&dt("return"),Ot},$2=(Fe,Ve,Qe)=>(Ve=Fe[ea("asyncIterator")])?Ve.call(Fe):(Fe=Fe[ea("iterator")](),Ve={},Qe=(dt,Ot)=>(Ot=Fe[dt])&&(Ve[dt]=xt=>new Promise((Ue,Xt,Rt)=>(xt=Ot.call(Fe,xt),Rt=xt.done,Promise.resolve(xt.value).then(Cn=>Ue({value:Cn,done:Rt}),Xt)))),Qe("next"),Qe("return"),Ve);var Ve=document.createElement("style");Ve.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;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-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-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-cancel-button{color:#8a8a8a}.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-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:#fff;border-radius:var(--cim-widget-border-radius);box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.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-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.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-user-search{display:flex;flex-direction:column}.cim-widget-user-search.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%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.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-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}.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%}
2
+ /*$vite$:1*/`,document.head.appendChild(Ve);function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dt={exports:{}},Ot={},xt={exports:{}},Ue={};var Xt;function Rt(){if(Xt)return Ue;Xt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function A(D,ee,O){this.props=D,this.context=ee,this.refs=S,this.updater=O||y}A.prototype.isReactComponent={},A.prototype.setState=function(D,ee){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,ee,"setState")},A.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function C(){}C.prototype=A.prototype;function N(D,ee,O){this.props=D,this.context=ee,this.refs=S,this.updater=O||y}var k=N.prototype=new C;k.constructor=N,_(k,A.prototype),k.isPureReactComponent=!0;var H=Array.isArray,V=Object.prototype.hasOwnProperty,F={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function ie(D,ee,O){var _e,De={},Pe=null,ze=null;if(ee!=null)for(_e in ee.ref!==void 0&&(ze=ee.ref),ee.key!==void 0&&(Pe=""+ee.key),ee)V.call(ee,_e)&&!q.hasOwnProperty(_e)&&(De[_e]=ee[_e]);var xe=arguments.length-2;if(xe===1)De.children=O;else if(1<xe){for(var Ye=Array(xe),ft=0;ft<xe;ft++)Ye[ft]=arguments[ft+2];De.children=Ye}if(D&&D.defaultProps)for(_e in xe=D.defaultProps,xe)De[_e]===void 0&&(De[_e]=xe[_e]);return{$$typeof:e,type:D,key:Pe,ref:ze,props:De,_owner:F.current}}function ge(D,ee){return{$$typeof:e,type:D.type,key:ee,ref:D.ref,props:D.props,_owner:D._owner}}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function oe(D){var ee={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(O){return ee[O]})}var ce=/\/+/g;function fe(D,ee){return typeof D=="object"&&D!==null&&D.key!=null?oe(""+D.key):ee.toString(36)}function te(D,ee,O,_e,De){var Pe=typeof D;(Pe==="undefined"||Pe==="boolean")&&(D=null);var ze=!1;if(D===null)ze=!0;else switch(Pe){case"string":case"number":ze=!0;break;case"object":switch(D.$$typeof){case e:case t:ze=!0}}if(ze)return ze=D,De=De(ze),D=_e===""?"."+fe(ze,0):_e,H(De)?(O="",D!=null&&(O=D.replace(ce,"$&/")+"/"),te(De,ee,O,"",function(ft){return ft})):De!=null&&($(De)&&(De=ge(De,O+(!De.key||ze&&ze.key===De.key?"":(""+De.key).replace(ce,"$&/")+"/")+D)),ee.push(De)),1;if(ze=0,_e=_e===""?".":_e+":",H(D))for(var xe=0;xe<D.length;xe++){Pe=D[xe];var Ye=_e+fe(Pe,xe);ze+=te(Pe,ee,O,Ye,De)}else if(Ye=T(D),typeof Ye=="function")for(D=Ye.call(D),xe=0;!(Pe=D.next()).done;)Pe=Pe.value,Ye=_e+fe(Pe,xe++),ze+=te(Pe,ee,O,Ye,De);else if(Pe==="object")throw ee=String(D),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return ze}function be(D,ee,O){if(D==null)return D;var _e=[],De=0;return te(D,_e,"","",function(Pe){return ee.call(O,Pe,De++)}),_e}function ve(D){if(D._status===-1){var ee=D._result;ee=ee(),ee.then(function(O){(D._status===0||D._status===-1)&&(D._status=1,D._result=O)},function(O){(D._status===0||D._status===-1)&&(D._status=2,D._result=O)}),D._status===-1&&(D._status=0,D._result=ee)}if(D._status===1)return D._result.default;throw D._result}var se={current:null},Q={transition:null},re={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:Q,ReactCurrentOwner:F};function v(){throw Error("act(...) is not supported in production builds of React.")}return Ue.Children={map:be,forEach:function(D,ee,O){be(D,function(){ee.apply(this,arguments)},O)},count:function(D){var ee=0;return be(D,function(){ee++}),ee},toArray:function(D){return be(D,function(ee){return ee})||[]},only:function(D){if(!$(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Ue.Component=A,Ue.Fragment=n,Ue.Profiler=o,Ue.PureComponent=N,Ue.StrictMode=r,Ue.Suspense=d,Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,Ue.act=v,Ue.cloneElement=function(D,ee,O){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var _e=_({},D.props),De=D.key,Pe=D.ref,ze=D._owner;if(ee!=null){if(ee.ref!==void 0&&(Pe=ee.ref,ze=F.current),ee.key!==void 0&&(De=""+ee.key),D.type&&D.type.defaultProps)var xe=D.type.defaultProps;for(Ye in ee)V.call(ee,Ye)&&!q.hasOwnProperty(Ye)&&(_e[Ye]=ee[Ye]===void 0&&xe!==void 0?xe[Ye]:ee[Ye])}var Ye=arguments.length-2;if(Ye===1)_e.children=O;else if(1<Ye){xe=Array(Ye);for(var ft=0;ft<Ye;ft++)xe[ft]=arguments[ft+2];_e.children=xe}return{$$typeof:e,type:D.type,key:De,ref:Pe,props:_e,_owner:ze}},Ue.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:a,_context:D},D.Consumer=D},Ue.createElement=ie,Ue.createFactory=function(D){var ee=ie.bind(null,D);return ee.type=D,ee},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(D){return{$$typeof:c,render:D}},Ue.isValidElement=$,Ue.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:ve}},Ue.memo=function(D,ee){return{$$typeof:f,type:D,compare:ee===void 0?null:ee}},Ue.startTransition=function(D){var ee=Q.transition;Q.transition={};try{D()}finally{Q.transition=ee}},Ue.unstable_act=v,Ue.useCallback=function(D,ee){return se.current.useCallback(D,ee)},Ue.useContext=function(D){return se.current.useContext(D)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(D){return se.current.useDeferredValue(D)},Ue.useEffect=function(D,ee){return se.current.useEffect(D,ee)},Ue.useId=function(){return se.current.useId()},Ue.useImperativeHandle=function(D,ee,O){return se.current.useImperativeHandle(D,ee,O)},Ue.useInsertionEffect=function(D,ee){return se.current.useInsertionEffect(D,ee)},Ue.useLayoutEffect=function(D,ee){return se.current.useLayoutEffect(D,ee)},Ue.useMemo=function(D,ee){return se.current.useMemo(D,ee)},Ue.useReducer=function(D,ee,O){return se.current.useReducer(D,ee,O)},Ue.useRef=function(D){return se.current.useRef(D)},Ue.useState=function(D){return se.current.useState(D)},Ue.useSyncExternalStore=function(D,ee,O){return se.current.useSyncExternalStore(D,ee,O)},Ue.useTransition=function(){return se.current.useTransition()},Ue.version="18.3.1",Ue}var Cn;function Fo(){return Cn||(Cn=1,xt.exports=Rt()),xt.exports}var na;function kd(){if(na)return Ot;na=1;var e=Fo(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,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:o.current}}return Ot.Fragment=n,Ot.jsx=u,Ot.jsxs=u,Ot}var fr;function W2(){return fr||(fr=1,dt.exports=kd()),dt.exports}var w=W2();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 zu=Object.create(null);Object.keys(Pr).forEach(e=>{zu[Pr[e]]=e});const Pd={type:"error",data:"parser error"},y0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",b0=typeof ArrayBuffer=="function",T0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Nd=({type:e,data:t},n,r)=>y0&&t instanceof Blob?n?r(t):_0(t,r):b0&&(t instanceof ArrayBuffer||T0(t))?n?r(t):_0(new Blob([t]),r):r(Pr[e]+(t||"")),_0=(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 Od;function G2(e,t){if(y0&&e.data instanceof Blob)return e.data.arrayBuffer().then(S0).then(t);if(b0&&(e.data instanceof ArrayBuffer||T0(e.data)))return t(S0(e.data));Nd(e,!1,n=>{Od||(Od=new TextEncoder),t(Od.encode(n))})}const x0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ra=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<x0.length;e++)ra[x0.charCodeAt(e)]=e;const X2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=ra[e.charCodeAt(r)],u=ra[e.charCodeAt(r+1)],c=ra[e.charCodeAt(r+2)],d=ra[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return f},K2=typeof ArrayBuffer=="function",Id=(e,t)=>{if(typeof e!="string")return{type:"message",data:w0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Q2(e.substring(1),t)}:zu[n]?e.length>1?{type:zu[n],data:e.substring(1)}:{type:zu[n]}:Pd},Q2=(e,t)=>{if(K2){const n=X2(e);return w0(n,t)}else return{base64:!0,data:e}},w0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,A0="",J2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Nd(a,!1,c=>{r[u]=c,++o===n&&t(r.join(A0))})})},Z2=(e,t)=>{const n=e.split(A0),r=[];for(let o=0;o<n.length;o++){const a=Id(n[o],t);if(r.push(a),a.type==="error")break}return r};function ew(){return new TransformStream({transform(e,t){G2(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Rd;function ju(e){return e.reduce((t,n)=>t+n.length,0)}function $u(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function tw(e,t){Rd||(Rd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(ju(n)<1)break;const d=$u(n,1);a=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(ju(n)<2)break;const d=$u(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(ju(n)<8)break;const d=$u(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(Pd);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(ju(n)<o)break;const d=$u(n,o);c.enqueue(Id(a?d:Rd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(Pd);break}}}})}const C0=4;function Bt(e){if(e)return nw(e)}function nw(e){for(var t in Bt.prototype)e[t]=Bt.prototype[t];return e}Bt.prototype.on=Bt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Bt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Bt.prototype.off=Bt.prototype.removeListener=Bt.prototype.removeAllListeners=Bt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Bt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Bt.prototype.emitReserved=Bt.prototype.emit,Bt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Bt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Vu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Qn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),rw="arraybuffer";function $7(){}function v0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const iw=Qn.setTimeout,ow=Qn.clearTimeout;function qu(e,t){t.useNativeTimers?(e.setTimeoutFn=iw.bind(Qn),e.clearTimeoutFn=ow.bind(Qn)):(e.setTimeoutFn=Qn.setTimeout.bind(Qn),e.clearTimeoutFn=Qn.clearTimeout.bind(Qn))}const sw=1.33;function aw(e){return typeof e=="string"?uw(e):Math.ceil((e.byteLength||e.size)*sw)}function uw(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function k0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function lw(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function cw(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class dw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Ld extends Bt{constructor(t){super(),this.writable=!1,qu(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 dw(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=Id(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=lw(t);return n.length?"?"+n:""}}class fw extends Ld{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)};Z2(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,J2(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]=k0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let P0=!1;try{P0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const hw=P0;function pw(){}class mw extends fw{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Nr extends Bt{constructor(t,n,r){super(),this.createRequest=t,qu(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=v0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=Nr.requestsCount++,Nr.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=pw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Nr.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(Nr.requestsCount=0,Nr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",N0);else if(typeof addEventListener=="function"){const e="onpagehide"in Qn?"pagehide":"unload";addEventListener(e,N0,!1)}}function N0(){for(let e in Nr.requests)Nr.requests.hasOwnProperty(e)&&Nr.requests[e].abort()}const gw=(function(){const e=O0({xdomain:!1});return e&&e.responseType!==null})();class Ew extends mw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=gw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nr(O0,this.uri(),t)}}function O0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||hw))return new XMLHttpRequest}catch(n){}if(!t)try{return new Qn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const I0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class yw extends Ld{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=I0?{}:v0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;Nd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&Vu(()=>{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]=k0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Dd=Qn.WebSocket||Qn.MozWebSocket;class bw extends yw{createSocket(t,n,r){return I0?new Dd(t,n,r):n?new Dd(t,n):new Dd(t)}doWrite(t,n){this.ws.send(n)}}class Tw extends Ld{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=tw(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=ew();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const _w={websocket:bw,webtransport:Tw,polling:Ew},Sw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,xw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function 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 o=Sw.exec(e||""),a={},u=14;for(;u--;)a[xw[u]]=o[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=ww(a,a.path),a.queryKey=Aw(a,a.query),a}function ww(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Aw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Fd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Yu=[];Fd&&addEventListener("offline",()=>{Yu.forEach(e=>e())},!1);class Si extends Bt{constructor(t,n){if(super(),this.binaryType=rw,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);qu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=cw(this.opts.query)),Fd&&(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"})},Yu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=C0,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&&Si.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",Si.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=aw(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Vu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Si.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(),Fd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Yu.indexOf(this._offlineEventListener);r!==-1&&Yu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Si.protocol=C0;class Cw extends Si{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;Si.priorWebsocketSuccess=!1;const o=()=>{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;Si.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",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",o),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 vw=class extends Cw{constructor(t,n={}){const r=typeof t=="object",o=r?M({},t):M({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>_w[a]).filter(a=>!!a)),super(r?o:t,o)}};function kw(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 Pw=typeof ArrayBuffer=="function",Nw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,R0=Object.prototype.toString,Ow=typeof Blob=="function"||typeof Blob!="undefined"&&R0.call(Blob)==="[object BlobConstructor]",Iw=typeof File=="function"||typeof File!="undefined"&&R0.call(File)==="[object FileConstructor]";function Bd(e){return Pw&&(e instanceof ArrayBuffer||Nw(e))||Ow&&e instanceof Blob||Iw&&e instanceof File}function Wu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Wu(e[n]))return!0;return!1}if(Bd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Wu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Wu(e[n]))return!0;return!1}function Rw(e){const t=[],n=e.data,r=e;return r.data=Ud(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Ud(e,t){if(!e)return e;if(Bd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Ud(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Ud(e[r],t));return n}return e}function Lw(e,t){return e.data=Hd(e.data,t),delete e.attachments,e}function Hd(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]=Hd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Hd(e[n],t));return e}const Dw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var tt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(tt||(tt={}));class Mw{constructor(t){this.replacer=t}encode(t){return(t.type===tt.EVENT||t.type===tt.ACK)&&Wu(t)?this.encodeAsBinary({type:t.type===tt.EVENT?tt.BINARY_EVENT:tt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===tt.BINARY_EVENT||t.type===tt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Rw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class zd extends Bt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===tt.BINARY_EVENT;r||n.type===tt.BINARY_ACK?(n.type=r?tt.EVENT:tt.ACK,this.reconstructor=new Fw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Bd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(tt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===tt.BINARY_EVENT||r.type===tt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Bw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(zd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case tt.CONNECT:return L0(n);case tt.DISCONNECT:return n===void 0;case tt.CONNECT_ERROR:return typeof n=="string"||L0(n);case tt.EVENT:case tt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Dw.indexOf(n[0])===-1);case tt.ACK:case tt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Fw{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=Lw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Bw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function L0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Uw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zd,Encoder:Mw,get PacketType(){return tt}},Symbol.toStringTag,{value:"Module"}));function hr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Hw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class D0 extends Bt{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=[hr(t,"open",this.onopen.bind(this)),hr(t,"packet",this.onpacket.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(Hw.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:tt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:tt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tt.EVENT:case tt.BINARY_EVENT:this.onevent(t);break;case tt.ACK:case tt.BINARY_ACK:this.onack(t);break;case tt.DISCONNECT:this.ondisconnect();break;case tt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:tt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Bo(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}Bo.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},Bo.prototype.reset=function(){this.attempts=0},Bo.prototype.setMin=function(e){this.ms=e},Bo.prototype.setMax=function(e){this.max=e},Bo.prototype.setJitter=function(e){this.jitter=e};class jd extends Bt{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,qu(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 Bo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||Uw;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new vw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=hr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=hr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hr(t,"ping",this.onping.bind(this)),hr(t,"data",this.ondata.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this)),hr(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){Vu(()=>{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 D0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ia={};function Gu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=kw(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ia[o]&&a in ia[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new jd(r,t):(ia[o]||(ia[o]=new jd(r,t)),d=ia[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Gu,{Manager:jd,Socket:D0,io:Gu,connect:Gu});var zw=function(e){return(function(t){return!!t&&typeof t=="object"})(e)&&!(function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||(function(r){return r.$$typeof===jw})(t)})(e)},jw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function oa(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Uo((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function $w(e,t,n){return e.concat(t).map((function(r){return oa(r,n)}))}function M0(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function F0(e,t){try{return t in e}catch(n){return!1}}function Vw(e,t,n){var r={};return n.isMergeableObject(e)&&M0(e).forEach((function(o){r[o]=oa(e[o],n)})),M0(t).forEach((function(o){(function(a,u){return F0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(F0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return Uo;var c=u.customMerge(a);return typeof c=="function"?c:Uo})(o,n)(e[o],t[o],n):r[o]=oa(t[o],n))})),r}function Uo(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||$w,n.isMergeableObject=n.isMergeableObject||zw,n.cloneUnlessOtherwiseSpecified=oa;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Vw(e,t,n):oa(t,n)}Uo.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Uo(n,r,t)}),{})};var qw=Uo;let Yw=class{constructor(t){Object.assign(this,t)}};function _n(e){if(e)return(function(t){for(var n in _n.prototype)t[n]=_n.prototype[n];return t})(e)}_n.prototype.on=_n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},_n.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},_n.prototype.off=_n.prototype.removeListener=_n.prototype.removeAllListeners=_n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},_n.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){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},_n.prototype.emitReserved=_n.prototype.emit,_n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},_n.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Ww=typeof ArrayBuffer=="function",B0=Object.prototype.toString,Gw=typeof Blob=="function"||typeof Blob!="undefined"&&B0.call(Blob)==="[object BlobConstructor]",Xw=typeof File=="function"||typeof File!="undefined"&&B0.call(File)==="[object FileConstructor]";function $d(e){return Ww&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Gw&&e instanceof Blob||Xw&&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($d(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 Kw(e){const t=[],n=e.data,r=e;return r.data=Vd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Vd(e,t){if(!e)return e;if($d(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Vd(e[r],t);return n}if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Vd(e[r],t));return n}return e}function Qw(e,t){return e.data=qd(e.data,t),delete e.attachments,e}function qd(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")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=qd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=qd(e[n],t));return e}const Jw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var vt;(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"})(vt||(vt={}));class Zw{constructor(t){this.replacer=t}encode(t){return t.type!==vt.EVENT&&t.type!==vt.ACK||!Xu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===vt.EVENT?vt.BINARY_EVENT:vt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==vt.BINARY_EVENT&&t.type!==vt.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=Kw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Yd extends _n{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===vt.BINARY_EVENT;r||n.type===vt.BINARY_ACK?(n.type=r?vt.EVENT:vt.ACK,this.reconstructor=new eA(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!$d(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(vt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===vt.BINARY_EVENT||r.type===vt.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(!tA(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!Yd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case vt.CONNECT:return U0(n);case vt.DISCONNECT:return n===void 0;case vt.CONNECT_ERROR:return typeof n=="string"||U0(n);case vt.EVENT:case vt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Jw.indexOf(n[0])===-1);case vt.ACK:case vt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class eA{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=Qw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const tA=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function U0(e){return Object.prototype.toString.call(e)==="[object Object]"}const H0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],z0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).map((([c,d])=>{const f=[...a,t(c)];return[e(c),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(o)?u.map((c=>c[1])):Object.fromEntries(u)},j0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),nA=z0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),H0),$0=z0(j0,j0,H0),rA={Encoder:class extends Zw{encode(e){var t,n;return super.encode(pe(M({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],nA(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends Yd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?$0(r):r)):n instanceof Object?$0(n):n)):t))}}},iA={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class oA{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",customerId:a,tenantId:u,socketOptions:c={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=m=>{console.log("[Copilot SDK] Connect Ack:",m),this.socket.auth={[this.sessionIdKey]:m.sessionId}},this.handleDisconnect=m=>{console.warn(`[Copilot SDK] Disconnected: ${m}`),m!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${m}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=m=>{console.error(`[Copilot SDK] Connect error: ${m.message}`);const T=m.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=T==null?void 0:T[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const d=`${r}${o}`,f={};t?f["x-cimulate-api-key"]=t:n&&(f.Authorization=`Bearer ${n}`),a&&(f["x-cimulate-customer-id"]=a),u&&(f["Tenant-ID"]=u);const p=[iA,c,{parser:rA,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Gu(d,qw.all(p))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*ta(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout((()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())}),t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return et(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return et(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return et(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return et(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(o=>{n&&n(o),r(o)}))}))})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return et(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return vd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Zr(u({emit:m=>{c.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Zr(new Promise((m=>{f=m})));for(;c.length>0;)yield c.shift()}finally{yield new Zr(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==o&&u(p)};return this.socket.onAny(d),()=>et(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,c)=>this.socket.emit(t,n,(d=>{d.name==="error"?c(new Yw(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}var B=Fo();const eo=Qe(B);var V0=Symbol.for("immer-nothing"),q0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function Jn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ho=Object.getPrototypeOf;function zo(e){return!!e&&!!e[at]}function ei(e){var t;return e?Y0(e)||Array.isArray(e)||!!e[q0]||!!((t=e.constructor)!=null&&t[q0])||Qu(e)||Ju(e):!1}var sA=Object.prototype.constructor.toString();function Y0(e){if(!e||typeof e!="object")return!1;const t=Ho(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)===sA}function sa(e,t){Ku(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ku(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:Qu(e)?2:Ju(e)?3:0}function Wd(e,t){return Ku(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function W0(e,t,n){const r=Ku(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function aA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Qu(e){return e instanceof Map}function Ju(e){return e instanceof Set}function Kt(e){return e.copy_||e.base_}function Gd(e,t){if(Qu(e))return new Map(e);if(Ju(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Y0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[at];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[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(Ho(e),r)}else{const r=Ho(e);if(r!==null&&n)return M({},e);const o=Object.create(r);return Object.assign(o,e)}}function Xd(e,t=!1){return Zu(e)||zo(e)||!ei(e)||(Ku(e)>1&&(e.set=e.add=e.clear=e.delete=uA),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Xd(r,!0))),e}function uA(){Jn(2)}function Zu(e){return Object.isFrozen(e)}var Kd={};function to(e){const t=Kd[e];return t||Jn(0,e),t}function lA(e,t){Kd[e]||(Kd[e]=t)}var aa;function el(){return aa}function cA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function G0(e,t){t&&(to("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qd(e){Jd(e),e.drafts_.forEach(dA),e.drafts_=null}function Jd(e){e===aa&&(aa=e.parent_)}function X0(e){return aa=cA(aa,e)}function dA(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function K0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Qd(t),Jn(4)),ei(e)&&(e=tl(t,e),t.parent_||nl(t,e)),t.patches_&&to("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=tl(t,n,[]),Qd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==V0?e:void 0}function tl(e,t,n){if(Zu(t))return t;const r=t[at];if(!r)return sa(t,(o,a)=>Q0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return nl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),sa(a,(c,d)=>Q0(e,r,o,c,d,n,u)),nl(e,o,!1),n&&e.patches_&&to("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Q0(e,t,n,r,o,a,u){if(zo(o)){const c=a&&t&&t.type_!==3&&!Wd(t.assigned_,r)?a.concat(r):void 0,d=tl(e,o,c);if(W0(n,r,d),zo(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(ei(o)&&!Zu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;tl(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&nl(e,o)}}function nl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xd(t,n)}function fA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:el(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Zd;n&&(o=[r],a=ua);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Zd={get(e,t){if(t===at)return e;const n=Kt(e);if(!Wd(n,t))return hA(e,n,t);const r=n[t];return e.finalized_||!ei(r)?r:r===ef(e.base_,t)?(tf(e),e.copy_[t]=la(r,e)):r},has(e,t){return t in Kt(e)},ownKeys(e){return Reflect.ownKeys(Kt(e))},set(e,t,n){const r=J0(Kt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=ef(Kt(e),t),a=o==null?void 0:o[at];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(aA(n,o)&&(n!==void 0||Wd(e.base_,t)))return!0;tf(e),ti(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 ef(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,tf(e),ti(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Kt(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 Ho(e.base_)},setPrototypeOf(){Jn(12)}},ua={};sa(Zd,(e,t)=>{ua[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ua.deleteProperty=function(e,t){return ua.set.call(this,e,t,void 0)},ua.set=function(e,t,n){return Zd.set.call(this,e[0],t,n,e[0])};function ef(e,t){const n=e[at];return(n?Kt(n):e)[t]}function hA(e,t,n){var o;const r=J0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function J0(e,t){if(!(t in e))return;let n=Ho(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ho(n)}}function ti(e){e.modified_||(e.modified_=!0,e.parent_&&ti(e.parent_))}function tf(e){e.copy_||(e.copy_=Gd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pA=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 o;if(ei(t)){const a=X0(this),u=la(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Qd(a):Jd(a)}return G0(a,r),K0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===V0&&(o=void 0),this.autoFreeze_&&Xd(o,!0),r){const a=[],u=[];to("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Jn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),r,o]},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){ei(e)||Jn(8),zo(e)&&(e=mA(e));const t=X0(this),n=la(e,void 0);return n[at].isManual_=!0,Jd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&Jn(9);const{scope_:r}=n;return G0(r,t),K0(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 o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=to("Patches").applyPatches_;return zo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function la(e,t){const n=Qu(e)?to("MapSet").proxyMap_(e,t):Ju(e)?to("MapSet").proxySet_(e,t):fA(e,t);return(t?t.scope_:el()).drafts_.push(n),n}function mA(e){return zo(e)||Jn(10,e),Z0(e)}function Z0(e){if(!ei(e)||Zu(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Gd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Gd(e,!0);return sa(n,(r,o)=>{W0(n,r,Z0(o))}),t&&(t.finalized_=!1),n}function gA(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:el(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Kt(this[at]).size}has(d){return Kt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Kt(p).has(d)||Kt(p).get(d)!==f)&&(n(p),ti(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),n(f),ti(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[at];u(d),Kt(d).size&&(n(d),ti(d),d.assigned_=new Map,sa(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Kt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[at];u(f);const p=Kt(f).get(d);if(f.finalized_||!ei(p)||p!==f.base_.get(d))return p;const m=la(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Kt(this[at]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[at]={type_:3,parent_:f,scope_:f?f.scope_:el(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Kt(this[at]).size}has(d){const f=this[at];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[at];return u(f),this.has(d)||(a(f),ti(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),a(f),ti(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[at];u(d),Kt(d).size&&(a(d),ti(d),d.copy_.clear())}values(){const d=this[at];return u(d),a(d),d.copy_.values()}entries(){const d=this[at];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let m=p.next();for(;!m.done;)d.call(f,m.value,m.value,this),m=p.next()}}function o(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(ei(d)){const f=la(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Jn(3,JSON.stringify(Kt(c)))}lA("MapSet",{proxyMap_:t,proxySet_:o})}var Un=new pA,EA=Un.produce;Un.produceWithPatches.bind(Un),Un.setAutoFreeze.bind(Un),Un.setUseStrictShallowCopy.bind(Un),Un.applyPatches.bind(Un),Un.createDraft.bind(Un),Un.finishDraft.bind(Un);function eg(e,t,n){var r=B.useMemo(function(){return EA(e)},[e]);return B.useReducer(r,t,n)}const tg={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},mt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},no={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},yA=e=>{switch(!0){case e==="copilot_search":return"search";case e==="copilot_browse":return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return null}},jo="cimulate",nf=`${jo}:pdp-update`,rf=`${jo}:browse-update`,of=`${jo}:search-update`,sf=`${jo}:ui-state-update`,af=`${jo}:prompts-state-update`,uf=`${jo}:session-state`,Or=M({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},tg),bA={"browse-context":Or.CONTEXT_UPDATED,categoryId:Or.CATEGORY_ID_CHANGED,categoryName:Or.CATEGORY_NAME_CHANGED,page:Or.PAGE_CHANGED,pageSize:Or.PAGE_SIZE_CHANGED,includeFacets:Or.FACET_FILTERS_CHANGED,facetFilters:Or.FACET_FILTERS_CHANGED,rangeFilters:Or.RANGE_FILTERS_CHANGED,catalogSegment:Or.CATALOG_SEGMENT_CHANGED,pricebooks:Or.PRICEBOOKS_CHANGED},ni=M({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},tg),TA={"search-context":ni.SEARCH_CONTEXT_UPDATED,query:ni.QUERY_CHANGED,page:ni.PAGE_CHANGED,pageSize:ni.PAGE_SIZE_CHANGED,includeFacets:ni.FACET_FILTERS_CHANGED,facetFilters:ni.FACET_FILTERS_CHANGED,rangeFilters:ni.RANGE_FILTERS_CHANGED,catalogSegment:ni.CATALOG_SEGMENT_CHANGED,pricebooks:ni.PRICEBOOKS_CHANGED},z="cim-widget",Hn=`--${z}`,xi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},_A=(e=xi)=>({[`${Hn}-primary-color`]:e.primaryColor||xi.primaryColor,[`${Hn}-secondary-color`]:e.secondaryColor||xi.secondaryColor,[`${Hn}-font-color`]:e.fontColor||xi.fontColor,[`${Hn}-font-family`]:e.fontFamily||xi.fontFamily,[`${Hn}-background-color`]:e.backgroundColor||xi.backgroundColor,[`${Hn}-border-color`]:e.borderColor||xi.borderColor,[`${Hn}-border-radius`]:e.borderRadius||xi.borderRadius}),wi={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},ng=B.createContext(null),rg=B.createContext(null);function ig(e,t){return function(){return e.apply(t,arguments)}}const{toString:SA}=Object.prototype,{getPrototypeOf:rl}=Object,{iterator:il,toStringTag:og}=Symbol,ol=(e=>t=>{const n=SA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pr=e=>(e=e.toLowerCase(),t=>ol(t)===e),sl=e=>t=>typeof t===e,{isArray:$o}=Array,Vo=sl("undefined");function ca(e){return e!==null&&!Vo(e)&&e.constructor!==null&&!Vo(e.constructor)&&vn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const sg=pr("ArrayBuffer");function xA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&sg(e.buffer),t}const wA=sl("string"),vn=sl("function"),ag=sl("number"),da=e=>e!==null&&typeof e=="object",AA=e=>e===!0||e===!1,al=e=>{if(ol(e)!=="object")return!1;const t=rl(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(og in e)&&!(il in e)},CA=e=>{if(!da(e)||ca(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},vA=pr("Date"),kA=pr("File"),PA=e=>!!(e&&typeof e.uri!="undefined"),NA=e=>e&&typeof e.getParts!="undefined",OA=pr("Blob"),IA=pr("FileList"),RA=e=>da(e)&&vn(e.pipe);function LA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const ug=LA(),lg=typeof ug.FormData!="undefined"?ug.FormData:void 0,DA=e=>{if(!e)return!1;if(lg&&e instanceof lg)return!0;const t=rl(e);if(!t||t===Object.prototype||!vn(e.append))return!1;const n=ol(e);return n==="formdata"||n==="object"&&vn(e.toString)&&e.toString()==="[object FormData]"},MA=pr("URLSearchParams"),[FA,BA,UA,HA]=["ReadableStream","Request","Response","Headers"].map(pr),zA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fa(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),$o(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(ca(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 cg(e,t){if(ca(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const ro=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,dg=e=>!Vo(e)&&e!==ro;function lf(...e){const{caseless:t,skipUndefined:n}=dg(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&cg(r,u)||u,d=cf(r,c)?r[c]:void 0;al(d)&&al(a)?r[c]=lf(d,a):al(a)?r[c]=lf({},a):$o(a)?r[c]=a.slice():(!n||!Vo(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&fa(e[a],o);return r}const jA=(e,t,n,{allOwnKeys:r}={})=>(fa(t,(o,a)=>{n&&vn(o)?Object.defineProperty(e,a,{__proto__:null,value:ig(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),$A=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),VA=(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)},qA=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&rl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},YA=(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},WA=e=>{if(!e)return null;if($o(e))return e;let t=e.length;if(!ag(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},GA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&rl(Uint8Array)),XA=(e,t)=>{const r=(e&&e[il]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},KA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},QA=pr("HTMLFormElement"),JA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),cf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ZA=pr("RegExp"),fg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fa(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},eC=e=>{fg(e,(t,n)=>{if(vn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(vn(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+"'")})}})},tC=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return $o(e)?r(e):r(String(e).split(t)),n},nC=()=>{},rC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function iC(e){return!!(e&&vn(e.append)&&e[og]==="FormData"&&e[il])}const oC=e=>{const t=new WeakSet,n=r=>{if(da(r)){if(t.has(r))return;if(ca(r))return r;if(!("toJSON"in r)){t.add(r);const o=$o(r)?[]:{};return fa(r,(a,u)=>{const c=n(a);!Vo(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},sC=pr("AsyncFunction"),aC=e=>e&&(da(e)||vn(e))&&vn(e.then)&&vn(e.catch),hg=((e,t)=>e?setImmediate:t?((n,r)=>(ro.addEventListener("message",({source:o,data:a})=>{o===ro&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ro.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",vn(ro.postMessage)),uC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ro):typeof process!="undefined"&&process.nextTick||hg,Y={isArray:$o,isArrayBuffer:sg,isBuffer:ca,isFormData:DA,isArrayBufferView:xA,isString:wA,isNumber:ag,isBoolean:AA,isObject:da,isPlainObject:al,isEmptyObject:CA,isReadableStream:FA,isRequest:BA,isResponse:UA,isHeaders:HA,isUndefined:Vo,isDate:vA,isFile:kA,isReactNativeBlob:PA,isReactNative:NA,isBlob:OA,isRegExp:ZA,isFunction:vn,isStream:RA,isURLSearchParams:MA,isTypedArray:GA,isFileList:IA,forEach:fa,merge:lf,extend:jA,trim:zA,stripBOM:$A,inherits:VA,toFlatObject:qA,kindOf:ol,kindOfTest:pr,endsWith:YA,toArray:WA,forEachEntry:XA,matchAll:KA,isHTMLForm:QA,hasOwnProperty:cf,hasOwnProp:cf,reduceDescriptors:fg,freezeMethods:eC,toObjectSet:tC,toCamelCase:JA,noop:nC,toFiniteNumber:rC,findKey:cg,global:ro,isContextDefined:dg,isSpecCompliantForm:iC,toJSONObject:oC,isAsyncFn:sC,isThenable:aC,setImmediate:hg,asap:uC,isIterable:e=>e!=null&&vn(e[il])},lC=Y.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"]),cC=e=>{const t={};let n,r,o;return e&&e.split(`
3
+ `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&lC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function dC(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 fC=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),hC=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function df(e,t){return Y.isArray(e)?e.map(n=>df(n,t)):dC(String(e).replace(t,""))}const pC=e=>df(e,fC),mC=e=>df(e,hC);function pg(e){const t=Object.create(null);return Y.forEach(e.toJSON(),(n,r)=>{t[r]=mC(n)}),t}const mg=Symbol("internals");function ha(e){return e&&String(e).trim().toLowerCase()}function ul(e){return e===!1||e==null?e:Y.isArray(e)?e.map(ul):pC(String(e))}function gC(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 EC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ff(e,t,n,r,o){if(Y.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Y.isString(t)){if(Y.isString(r))return t.indexOf(r)!==-1;if(Y.isRegExp(r))return r.test(t)}}function yC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function bC(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let Sn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,f){const p=ha(d);if(!p)throw new Error("header name must be a non-empty string");const m=Y.findKey(o,p);(!m||o[m]===void 0||f===!0||f===void 0&&o[m]!==!1)&&(o[m||d]=ul(c))}const u=(c,d)=>Y.forEach(c,(f,p)=>a(f,p,d));if(Y.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(Y.isString(t)&&(t=t.trim())&&!EC(t))u(cC(t),n);else if(Y.isObject(t)&&Y.isIterable(t)){let c={},d,f;for(const p of t){if(!Y.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[f=p[0]]=(d=c[f])?Y.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=ha(t),t){const r=Y.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return gC(o);if(Y.isFunction(n))return n.call(this,o,r);if(Y.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ha(t),t){const r=Y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ff(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=ha(u),u){const c=Y.findKey(r,u);c&&(!n||ff(r,r[c],c,n))&&(delete r[c],o=!0)}}return Y.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||ff(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return Y.forEach(this,(o,a)=>{const u=Y.findKey(r,a);if(u){n[u]=ul(o),delete n[a];return}const c=t?yC(a):String(a).trim();c!==a&&delete n[a],n[c]=ul(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Y.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(`
4
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[mg]=this[mg]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=ha(u);r[c]||(bC(o,u),r[c]=!0)}return Y.isArray(t)?t.forEach(a):a(t),this}};Sn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(Sn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Y.freezeMethods(Sn);const TC="[REDACTED ****]";function _C(e){if(Y.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Y.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function SC(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||Y.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof Sn&&(a=a.toJSON()),r.push(a);let u;if(Y.isArray(a))u=[],a.forEach((c,d)=>{const f=o(c);Y.isUndefined(f)||(u[d]=f)});else{if(!Y.isPlainObject(a)&&_C(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?TC:o(d);Y.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return o(e)}let Oe=class V2 extends Error{static from(t,n,r,o,a,u){const c=new V2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&Y.hasOwnProp(t,"redact")?t.redact:void 0,r=Y.isArray(n)&&n.length>0?SC(t,n):Y.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}}};Oe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Oe.ERR_BAD_OPTION="ERR_BAD_OPTION",Oe.ECONNABORTED="ECONNABORTED",Oe.ETIMEDOUT="ETIMEDOUT",Oe.ECONNREFUSED="ECONNREFUSED",Oe.ERR_NETWORK="ERR_NETWORK",Oe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Oe.ERR_DEPRECATED="ERR_DEPRECATED",Oe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Oe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Oe.ERR_CANCELED="ERR_CANCELED",Oe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Oe.ERR_INVALID_URL="ERR_INVALID_URL",Oe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const xC=null;function hf(e){return Y.isPlainObject(e)||Y.isArray(e)}function gg(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function pf(e,t,n){return e?e.concat(t).map(function(o,a){return o=gg(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function wC(e){return Y.isArray(e)&&!e.some(hf)}const AC=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function ll(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,C){return!Y.isUndefined(C[A])});const r=n.metaTokens,o=n.visitor||m,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,f=c&&Y.isSpecCompliantForm(t);if(!Y.isFunction(o))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(Y.isDate(S))return S.toISOString();if(Y.isBoolean(S))return S.toString();if(!f&&Y.isBlob(S))throw new Oe("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(S)||Y.isTypedArray(S)?f&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function m(S,A,C){let N=S;if(Y.isReactNative(t)&&Y.isReactNativeBlob(S))return t.append(pf(C,A,a),p(S)),!1;if(S&&!C&&typeof S=="object"){if(Y.endsWith(A,"{}"))A=r?A:A.slice(0,-2),S=JSON.stringify(S);else if(Y.isArray(S)&&wC(S)||(Y.isFileList(S)||Y.endsWith(A,"[]"))&&(N=Y.toArray(S)))return A=gg(A),N.forEach(function(H,V){!(Y.isUndefined(H)||H===null)&&t.append(u===!0?pf([A],V,a):u===null?A:A+"[]",p(H))}),!1}return hf(S)?!0:(t.append(pf(C,A,a),p(S)),!1)}const T=[],y=Object.assign(AC,{defaultVisitor:m,convertValue:p,isVisitable:hf});function _(S,A,C=0){if(!Y.isUndefined(S)){if(C>d)throw new Oe("Object is too deeply nested ("+C+" levels). Max depth: "+d,Oe.ERR_FORM_DATA_DEPTH_EXCEEDED);if(T.indexOf(S)!==-1)throw Error("Circular reference detected in "+A.join("."));T.push(S),Y.forEach(S,function(k,H){(!(Y.isUndefined(k)||k===null)&&o.call(t,k,Y.isString(H)?H.trim():H,A,y))===!0&&_(k,A?A.concat(H):[H],C+1)}),T.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return _(e),t}function Eg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function mf(e,t){this._pairs=[],e&&ll(e,this,t)}const yg=mf.prototype;yg.append=function(t,n){this._pairs.push([t,n])},yg.toString=function(t){const n=t?function(r){return t.call(this,r,Eg)}:Eg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function CC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function bg(e,t,n){if(!t)return e;const r=n&&n.encode||CC,o=Y.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=Y.isURLSearchParams(t)?t.toString():new mf(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class Tg{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){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const gf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},vC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:mf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ef=typeof window!="undefined"&&typeof document!="undefined",yf=typeof navigator=="object"&&navigator||void 0,kC=Ef&&(!yf||["ReactNative","NativeScript","NS"].indexOf(yf.product)<0),PC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",NC=Ef&&window.location.href||"http://localhost",dn=M(M({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ef,hasStandardBrowserEnv:kC,hasStandardBrowserWebWorkerEnv:PC,navigator:yf,origin:NC},Symbol.toStringTag,{value:"Module"}))),vC);function OC(e,t){return ll(e,new dn.classes.URLSearchParams,M({visitor:function(n,r,o,a){return dn.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function IC(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function RC(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function _g(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&Y.isArray(o)?o.length:u,d?(Y.hasOwnProp(o,u)?o[u]=Y.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!Y.hasOwnProp(o,u)||!Y.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&Y.isArray(o[u])&&(o[u]=RC(o[u])),!c)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,o)=>{t(IC(r),o,n,0)}),n}return null}const qo=(e,t)=>e!=null&&Y.hasOwnProp(e,t)?e[t]:void 0;function LC(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const pa={transitional:gf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=Y.isObject(t);if(a&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return o?JSON.stringify(_g(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t)||Y.isReadableStream(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=qo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return OC(t,d).toString();if((c=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=qo(this,"env"),p=f&&f.FormData;return ll(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),LC(t)):t}],transformResponse:[function(t){const n=qo(this,"transitional")||pa.transitional,r=n&&n.forcedJSONParsing,o=qo(this,"responseType"),a=o==="json";if(Y.isResponse(t)||Y.isReadableStream(t))return t;if(t&&Y.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,qo(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Oe.from(d,Oe.ERR_BAD_RESPONSE,this,null,qo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dn.classes.FormData,Blob:dn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch","query"],e=>{pa.headers[e]={}});function bf(e,t){const n=this||pa,r=t||n,o=Sn.from(r.headers);let a=r.data;return Y.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Sg(e){return!!(e&&e.__CANCEL__)}let ma=class extends Oe{constructor(t,n,r){super(t==null?"canceled":t,Oe.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function xg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Oe("Request failed with status code "+n.status,n.status>=400&&n.status<500?Oe.ERR_BAD_REQUEST:Oe.ERR_BAD_RESPONSE,n.config,n.request,n))}function DC(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function MC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[o]=d,r[o]=f;let m=a,T=0;for(;m!==o;)T+=n[m++],m=m%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(T*1e3/y):void 0}}function FC(e,t){let n=0,r=1e3/t,o,a;const u=(f,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(o=f,a||(a=setTimeout(()=>{a=null,u(o)},r-m)))},()=>o&&u(o)]}const cl=(e,t,n=3)=>{let r=0;const o=MC(50,250);return FC(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=o(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)},wg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ag=e=>(...t)=>Y.asap(()=>e(...t)),BC=dn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,dn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(dn.origin),dn.navigator&&/(msie|trident)/i.test(dn.navigator.userAgent)):()=>!0,UC=dn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];Y.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),Y.isString(r)&&c.push(`path=${r}`),Y.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),Y.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function HC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function zC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Cg(e,t,n){let r=!HC(t);return e&&(r||n===!1)?zC(e,t):t}const vg=e=>e instanceof Sn?M({},e):e;function io(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,p,m,T){return Y.isPlainObject(f)&&Y.isPlainObject(p)?Y.merge.call({caseless:T},f,p):Y.isPlainObject(p)?Y.merge({},p):Y.isArray(p)?p.slice():p}function o(f,p,m,T){if(Y.isUndefined(p)){if(!Y.isUndefined(f))return r(void 0,f,m,T)}else return r(f,p,m,T)}function a(f,p){if(!Y.isUndefined(p))return r(void 0,p)}function u(f,p){if(Y.isUndefined(p)){if(!Y.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,m){if(Y.hasOwnProp(t,m))return r(f,p);if(Y.hasOwnProp(e,m))return r(void 0,f)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(f,p,m)=>o(vg(f),vg(p),m,!0)};return Y.forEach(Object.keys(M(M({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const m=Y.hasOwnProp(d,p)?d[p]:o,T=Y.hasOwnProp(e,p)?e[p]:void 0,y=Y.hasOwnProp(t,p)?t[p]:void 0,_=m(T,y,p);Y.isUndefined(_)&&m!==c||(n[p]=_)}),n}const jC=["content-type","content-length"];function $C(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{jC.includes(r.toLowerCase())&&e.set(r,o)})}const VC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),kg=e=>{const t=io({},e),n=T=>Y.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=Sn.from(c),t.url=bg(Cg(f,m,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?VC(d.password):""))),Y.isFormData(r)&&(dn.hasStandardBrowserEnv||dn.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):Y.isFunction(r.getHeaders)&&$C(c,r.getHeaders(),n("formDataHeaderPolicy"))),dn.hasStandardBrowserEnv&&(Y.isFunction(o)&&(o=o(t)),o===!0||o==null&&BC(t.url))){const y=a&&u&&UC.read(u);y&&c.set(a,y)}return t},qC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=kg(e);let a=o.data;const u=Sn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,p,m,T,y,_;function S(){y&&y(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(o.method.toUpperCase(),o.url,!0),A.timeout=o.timeout;function C(){if(!A)return;const k=Sn.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),V={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:k,config:e,request:A};xg(function(q){n(q),S()},function(q){r(q),S()},V),A=null}"onloadend"in A?A.onloadend=C:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(C)},A.onabort=function(){A&&(r(new Oe("Request aborted",Oe.ECONNABORTED,e,A)),S(),A=null)},A.onerror=function(H){const V=H&&H.message?H.message:"Network Error",F=new Oe(V,Oe.ERR_NETWORK,e,A);F.event=H||null,r(F),S(),A=null},A.ontimeout=function(){let H=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const V=o.transitional||gf;o.timeoutErrorMessage&&(H=o.timeoutErrorMessage),r(new Oe(H,V.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,e,A)),S(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&Y.forEach(pg(u),function(H,V){A.setRequestHeader(V,H)}),Y.isUndefined(o.withCredentials)||(A.withCredentials=!!o.withCredentials),c&&c!=="json"&&(A.responseType=o.responseType),f&&([T,_]=cl(f,!0),A.addEventListener("progress",T)),d&&A.upload&&([m,y]=cl(d),A.upload.addEventListener("progress",m),A.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=k=>{A&&(r(!k||k.type?new ma(null,e,A):k),A.abort(),S(),A=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const N=DC(o.url);if(N&&!dn.protocols.includes(N)){r(new Oe("Unsupported protocol "+N+":",Oe.ERR_BAD_REQUEST,e));return}A.send(a||null)})},YC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Oe?f:new ma(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new Oe(`timeout of ${t}ms exceeded`,Oe.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>Y.asap(u),c},WC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},GC=function(e,t){return vd(this,null,function*(){try{for(var n=$2(XC(e)),r,o,a;r=!(o=yield new Zr(n.next())).done;r=!1){const u=o.value;yield*E0(WC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Zr(o.call(n)))}finally{if(a)throw a[0]}}})},XC=function(e){return vd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*E0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Zr(t.read());if(n)break;yield r}}finally{yield new Zr(t.cancel())}})},Pg=(e,t,n,r)=>{const o=GC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return et(this,null,function*(){try{const{done:p,value:m}=yield o.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),o.return()}},{highWaterMark:2})};function KC(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 _=r.charCodeAt(y+1),S=r.charCodeAt(y+2);(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102)&&(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}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Tf="1.16.1",Ng=64*1024,{isFunction:dl}=Y,Og=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},QC=e=>{const t=Y.global!==void 0&&Y.global!==null?Y.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Y.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,c=o?dl(o):typeof fetch=="function",d=dl(a),f=dl(u);if(!c)return!1;const p=c&&dl(n),m=c&&(typeof r=="function"?(C=>N=>C.encode(N))(new r):C=>et(null,null,function*(){return new Uint8Array(yield new a(C).arrayBuffer())})),T=d&&p&&Og(()=>{let C=!1;const N=new a(dn.origin,{body:new n,method:"POST",get duplex(){return C=!0,"half"}}),k=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),C&&!k}),y=f&&p&&Og(()=>Y.isReadableStream(new u("").body)),_={stream:y&&(C=>C.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!_[C]&&(_[C]=(N,k)=>{let H=N&&N[C];if(H)return H.call(N);throw new Oe(`Response type '${C}' is not supported`,Oe.ERR_NOT_SUPPORT,k)})});const S=C=>et(null,null,function*(){if(C==null)return 0;if(Y.isBlob(C))return C.size;if(Y.isSpecCompliantForm(C))return(yield new a(dn.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(Y.isArrayBufferView(C)||Y.isArrayBuffer(C))return C.byteLength;if(Y.isURLSearchParams(C)&&(C=C+""),Y.isString(C))return(yield m(C)).byteLength}),A=(C,N)=>et(null,null,function*(){const k=Y.toFiniteNumber(C.getContentLength());return k==null?S(N):k});return C=>et(null,null,function*(){let{url:N,method:k,data:H,signal:V,cancelToken:F,timeout:q,onDownloadProgress:ie,onUploadProgress:ge,responseType:$,headers:oe,withCredentials:ce="same-origin",fetchOptions:fe,maxContentLength:te,maxBodyLength:be}=kg(C);const ve=Y.isNumber(te)&&te>-1,se=Y.isNumber(be)&&be>-1;let Q=o||fetch;$=$?($+"").toLowerCase():"text";let re=YC([V,F&&F.toAbortSignal()],q),v=null;const D=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let ee;try{if(ve&&typeof N=="string"&&N.startsWith("data:")&&KC(N)>te)throw new Oe("maxContentLength size of "+te+" exceeded",Oe.ERR_BAD_RESPONSE,C,v);if(se&&k!=="get"&&k!=="head"){const xe=yield A(oe,H);if(typeof xe=="number"&&isFinite(xe)&&xe>be)throw new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,C,v)}if(ge&&T&&k!=="get"&&k!=="head"&&(ee=yield A(oe,H))!==0){let xe=new a(N,{method:"POST",body:H,duplex:"half"}),Ye;if(Y.isFormData(H)&&(Ye=xe.headers.get("content-type"))&&oe.setContentType(Ye),xe.body){const[ft,on]=wg(ee,cl(Ag(ge)));H=Pg(xe.body,Ng,ft,on)}}Y.isString(ce)||(ce=ce?"include":"omit");const O=d&&"credentials"in a.prototype;if(Y.isFormData(H)){const xe=oe.getContentType();xe&&/^multipart\/form-data/i.test(xe)&&!/boundary=/i.test(xe)&&oe.delete("content-type")}oe.set("User-Agent","axios/"+Tf,!1);const _e=pe(M({},fe),{signal:re,method:k.toUpperCase(),headers:pg(oe.normalize()),body:H,duplex:"half",credentials:O?ce:void 0});v=d&&new a(N,_e);let De=yield d?Q(v,fe):Q(N,_e);if(ve){const xe=Y.toFiniteNumber(De.headers.get("content-length"));if(xe!=null&&xe>te)throw new Oe("maxContentLength size of "+te+" exceeded",Oe.ERR_BAD_RESPONSE,C,v)}const Pe=y&&($==="stream"||$==="response");if(y&&De.body&&(ie||ve||Pe&&D)){const xe={};["status","statusText","headers"].forEach(Rn=>{xe[Rn]=De[Rn]});const Ye=Y.toFiniteNumber(De.headers.get("content-length")),[ft,on]=ie&&wg(Ye,cl(Ag(ie),!0))||[];let Vr=0;const qr=Rn=>{if(ve&&(Vr=Rn,Vr>te))throw new Oe("maxContentLength size of "+te+" exceeded",Oe.ERR_BAD_RESPONSE,C,v);ft&&ft(Rn)};De=new u(Pg(De.body,Ng,qr,()=>{on&&on(),D&&D()}),xe)}$=$||"text";let ze=yield _[Y.findKey(_,$)||"text"](De,C);if(ve&&!y&&!Pe){let xe;if(ze!=null&&(typeof ze.byteLength=="number"?xe=ze.byteLength:typeof ze.size=="number"?xe=ze.size:typeof ze=="string"&&(xe=typeof r=="function"?new r().encode(ze).byteLength:ze.length)),typeof xe=="number"&&xe>te)throw new Oe("maxContentLength size of "+te+" exceeded",Oe.ERR_BAD_RESPONSE,C,v)}return!Pe&&D&&D(),yield new Promise((xe,Ye)=>{xg(xe,Ye,{data:ze,headers:Sn.from(De.headers),status:De.status,statusText:De.statusText,config:C,request:v})})}catch(O){if(D&&D(),re&&re.aborted&&re.reason instanceof Oe){const _e=re.reason;throw _e.config=C,v&&(_e.request=v),O!==_e&&(_e.cause=O),_e}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new Oe("Network Error",Oe.ERR_NETWORK,C,v,O&&O.response),{cause:O.cause||O}):Oe.from(O,O&&O.code,C,v,O&&O.response)}})},JC=new Map,Ig=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,f,p=JC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:QC(t)),p=f;return f};Ig();const _f={http:xC,xhr:qC,fetch:{get:Ig}};Y.forEach(_f,(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}`,ZC=e=>Y.isFunction(e)||e===null||e===!1;function ev(e,t){e=Y.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!ZC(r)&&(o=_f[(c=String(r)).toLowerCase()],o===void 0))throw new Oe(`Unknown adapter '${c}'`);if(o&&(Y.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){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 :
5
+ `+u.map(Rg).join(`
6
+ `):" "+Rg(u[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const Lg={getAdapter:ev,adapters:_f};function Sf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ma(null,e)}function Dg(e){return Sf(e),e.headers=Sn.from(e.headers),e.data=bf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Lg.getAdapter(e.adapter||pa.adapter,e)(e).then(function(r){Sf(e),e.response=r;try{r.data=bf.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Sn.from(r.headers),r},function(r){if(!Sg(r)&&(Sf(e),r&&r.response)){e.response=r.response;try{r.response.data=bf.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Sn.from(r.response.headers)}return Promise.reject(r)})}const fl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Mg={};fl.transitional=function(t,n,r){function o(a,u){return"[Axios v"+Tf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Oe(o(u," has been removed"+(n?" in "+n:"")),Oe.ERR_DEPRECATED);return n&&!Mg[u]&&(Mg[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},fl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function tv(e,t,n){if(typeof e!="object")throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new Oe("option "+a+" must be "+d,Oe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Oe("Unknown option "+a,Oe.ERR_BAD_OPTION)}}const hl={assertOptions:tv,validators:fl},Zn=hl.validators;let oo=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Tg,response:new Tg}}request(t,n){return et(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(`
7
7
  `);return u===-1?"":o.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
8
8
  `),c=u===-1?-1:a.indexOf(`
9
9
  `,u+1),d=c===-1?"":a.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
10
- `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=io(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&hl.assertOptions(r,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean),legacyInterceptorReqResOrdering:Jn.transitional(Jn.boolean)},!1),o!=null&&(V.isFunction(o)?n.paramsSerializer={serialize:o}:hl.assertOptions(o,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),hl.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&V.merge(a.common,a[n.method]);a&&V.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=Sn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;d=d&&S.synchronous;const A=n.transitional||gf;A&&A.legacyInterceptorReqResOrdering?c.unshift(S.fulfilled,S.rejected):c.push(S.fulfilled,S.rejected)});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let p,m=0,T;if(!d){const _=[Rg.bind(this),void 0];for(_.unshift(...c),_.push(...f),T=_.length,p=Promise.resolve(n);m<T;)p=p.then(_[m++],_[m++]);return p}T=c.length;let y=n;for(;m<T;){const _=c[m++],S=c[m++];try{y=_(y)}catch(A){S.call(this,A);break}}try{p=Rg.call(this,y)}catch(_){return Promise.reject(_)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=io(this.defaults,t);const n=wg(t.baseURL,t.url,t.allowAbsoluteUrls);return Eg(n,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){oo.prototype[t]=function(n,r){return this.request(io(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(io(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}oo.prototype[t]=n(),t!=="query"&&(oo.prototype[t+"Form"]=n(!0))});let JA=class z2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new ma(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 z2(function(o){t=o}),cancel:t}}};function ZA(e){return function(n){return e.apply(null,n)}}function ev(e){return V.isObject(e)&&e.isAxiosError===!0}const xf={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(xf).forEach(([e,t])=>{xf[t]=e});function Dg(e){const t=new oo(e),n=ng(oo.prototype.request,t);return V.extend(n,oo.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Dg(io(e,o))},n}const Rt=Dg(pa);Rt.Axios=oo,Rt.CanceledError=ma,Rt.CancelToken=JA,Rt.isCancel=Tg,Rt.VERSION=Tf,Rt.toFormData=ll,Rt.AxiosError=Ne,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=ZA,Rt.isAxiosError=ev,Rt.mergeConfig=io,Rt.AxiosHeaders=Sn,Rt.formToJSON=e=>bg(V.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=Ig.getAdapter,Rt.HttpStatusCode=xf,Rt.default=Rt;const{Axios:H7,AxiosError:z7,CanceledError:j7,isCancel:$7,CancelToken:V7,VERSION:q7,all:Y7,Cancel:W7,isAxiosError:G7,spread:X7,toFormData:K7,AxiosHeaders:Q7,HttpStatusCode:J7,formToJSON:Z7,getAdapter:eU,mergeConfig:tU,create:nU}=Rt;class tv{constructor(t,n,r,o=!1,a,u){Se(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Se(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Se(this,"CIMULATE_SEARCH_API_PATH","api/v1");Se(this,"baseApiUrl");Se(this,"headers",{});Se(this,"fetchConfig",()=>et(this,null,function*(){try{const t=yield Rt.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}}));Se(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class nv{constructor(t,n,r,o=!1,a,u){Se(this,"apiService");Se(this,"config",null);Se(this,"getConfig",()=>et(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}}));Se(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Se(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Se(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Se(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Se(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Se(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Se(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Se(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Se(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Se(this,"getProductField",t=>this.config?this.config[t]:"");Se(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new tv(t,n,r,o,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Yo=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class rv{constructor(t=!1){Se(this,"isDevelopment");Se(this,"_log",(t,n,...r)=>{Yo(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 iv={copilot:"Your Search Assistant",messaging:"Commerce Client"},Mg=F.createContext(null),ov=({mode:e,logoUrl:t,headerText:n="Your Search Assistant",headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:T,searchConfig:y,componentConfig:_,conversationHistory:S,resetConversationMessage:A="",apiKey:v,apiToken:N,baseUrl:k,customerId:H,tenantId:X,theme:B,isDevelopment:q,__features:ie,routingAttributes:me,children:$})=>{const oe=e==="messaging",de=F.useMemo(()=>{const re=me==null?void 0:me.isCartMgmtSupported;return re===!0||re==="true"},[me]),le=F.useMemo(()=>oe?{config:null}:new nv(k,v,N,q,H,X),[oe,k,v,N,q,H,X]),ne=F.useMemo(()=>new rv(q),[q]);F.useEffect(()=>{oe||!le||le.config||le.getConfig()},[le,oe]);const Te=F.useMemo(()=>EC(B),[B]),Oe=F.useMemo(()=>{const re=(y==null?void 0:y.placeholder)||m,C=(y==null?void 0:y.buttonLabel)||T;let D="icon";return y!=null&&y.buttonType?D=y.buttonType:T&&(D="text"),pe(M({},y||{}),{placeholder:re,buttonLabel:C,buttonType:D})},[y,m,T]),ue=F.useMemo(()=>pe(M({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:n||iv[e!=null?e:"copilot"]}),[r,t,n,e]),Q=F.useMemo(()=>({configModule:le,mode:e!=null?e:"copilot",headerConfig:ue,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:Te,logger:ne,searchConfig:Oe,enableMinimize:!!(_!=null&&_.enableMinimize),resetConversationMessage:A,conversationHistory:{sinceHours:typeof(S==null?void 0:S.sinceHours)=="number"?S.sinceHours:1,limit:S==null?void 0:S.limit},features:ie,isCartMgmtSupported:de}),[le,e,ue,a,o,f,p,c,d,u,Oe,_,A,ne,Te,S,ie,de]);return w.jsx(Mg.Provider,{value:Q,children:$})},at=()=>{const e=F.useContext(Mg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class sv{constructor(){Se(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}});Se(this,"connectedProxy");Se(this,"modeProxy");Se(this,"entryTypeProxy");Se(this,"statusProxy");Se(this,"dialogProxy");Se(this,"modalProxy",{isFullscreen:!1});Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return lv(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 Je=new sv,so=()=>Je.connected,ga=()=>Je.isOpen,av=e=>{window.addEventListener(sf,e)},uv=e=>{window.removeEventListener(sf,e)},lv=(e,t)=>{const n=new CustomEvent(sf,{detail:{property:e,value:t}});window.dispatchEvent(n)},cv=e=>{Je.connectedProxy.connected=e},Ea=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);Je.entryTypeProxy.entryType=e},ri=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1)},pl=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},wf=e=>{Je.modalProxy.isFullscreen=e},ml=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Je.statusProxy.type=e,e==="dialog"||e==="chat"?Je.modeProxy.mode="embedded":Je.modeProxy.mode="standalone"},Cf=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(", ")}.`);Je.dialogProxy.position=e},dv=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},fv=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=at(),o=F.useCallback(k=>{n({type:mt.SET_COPILOT,payload:k})},[n]),a=F.useCallback(k=>{cv(k),n({type:mt.SET_CONNECTED,payload:k})},[n]),u=F.useCallback(()=>{n({type:mt.RESET_COPILOT,payload:{}})},[n]),c=F.useCallback(()=>{n({type:mt.RESET_STATE,payload:{}})},[n]),d=F.useCallback(k=>{r==null||r.log(`${k.name} event received`,k),n({type:mt.ADD_MESSAGE,payload:k}),k.bypassHandlers||e==null||e(k)},[e,r,n]),f=F.useCallback(k=>{n({type:mt.ADD_LOADING_MESSAGE,payload:k})},[n]),p=F.useCallback(k=>{n({type:mt.REMOVE_LOADING_MESSAGE,payload:k})},[n]),m=F.useCallback(k=>{d(k),f(k.id)},[d,f]),T=F.useCallback(k=>{n({type:mt.SET_ACTIVE_CONVERSATION_ID,payload:k})},[n]),y=F.useCallback(k=>{n({type:mt.ADD_CONVERSATION_ID,payload:k})},[n]),_=F.useCallback(k=>{n({type:mt.SET_CONVERSATION_IDS,payload:k})},[n]),S=F.useCallback(k=>{n({type:mt.SET_IMAGE_FILE,payload:k})},[n]),A=F.useCallback(k=>{n({type:mt.SET_ASK_CIM_PROMPTS,payload:k})},[n]),v=F.useCallback(k=>{n({type:mt.SET_CONVERSATION_HISTORY_LOADED,payload:k})},[n]),N=F.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:T,addConversationId:y,setConversationIds:_,setImageFile:S,setAskCimPrompts:A,setConversationHistoryLoaded:v}),[o,a,u,c,d,f,p,m,T,y,_,S,A,v]);return w.jsx(tg.Provider,{value:N,children:t})};fC();const hv=(e,t)=>{const{type:n,payload:r}=t;if(n===mt.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===o.id);if(c!==-1){u[c]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case mt.RESET_STATE:e.messages=no.messages,e.groupedMessages=no.groupedMessages,e.loadingMessages=no.loadingMessages,e.imageFile=no.imageFile,e.askCimPrompts=no.askCimPrompts,e.conversationHistoryLoaded=no.conversationHistoryLoaded;break;case mt.RESET_COPILOT:e.copilot=null;break;case mt.SET_COPILOT:e.copilot=r;break;case mt.SET_CONNECTED:e.connected=r;break;case mt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case mt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case mt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case mt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case mt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case mt.SET_IMAGE_FILE:e.imageFile=r;break;case mt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case mt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},pv=({onCopilotEvent:e,children:t})=>{const[n,r]=J0(hv,no);return w.jsx(eg.Provider,{value:n,children:w.jsx(fv,{onCopilotEvent:e,dispatch:r,children:t})})};function mv(){var e=F.useRef(!0);return e.current?(e.current=!1,!0):e.current}function gv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function Ev(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Af=typeof window!="undefined",ya=function(e){F.useEffect(e,[])},yv=function(e){var t=F.useRef(e);t.current=e,ya(function(){return function(){return t.current()}})},bv=function(e){var t=F.useRef(0),n=F.useState(e),r=n[0],o=n[1],a=F.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return yv(function(){cancelAnimationFrame(t.current)}),[r,a]},Tv=function(e,t){return e===t};function _v(e,t){t===void 0&&(t=Tv);var n=F.useRef(),r=F.useRef(e),o=mv();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var Sv=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,c=bv({width:Af?window.innerWidth:r,height:Af?window.innerHeight:a}),d=c[0],f=c[1];return F.useEffect(function(){if(Af){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return gv(window,"resize",p),function(){Ev(window,"resize",p)}}},[]),d};class xv{constructor(){Se(this,"items",[]);Se(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Se(this,"remove",()=>this.items.shift());Se(this,"first",()=>this.items.length>0?this.items[0]:null);Se(this,"clear",()=>{this.items.length=0});Se(this,"processQueue",t=>{new Array(fn.size).fill(1).forEach(()=>{const r=fn.first();r&&(t(r),fn.remove())})})}get size(){return this.items.length}}const fn=new xv,Fg=e=>{window.addEventListener(of,e)},Bg=e=>{window.removeEventListener(of,e)},wv=(e,t,n)=>{const r=new CustomEvent(of,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Ug=e=>{window.addEventListener(rf,e)},Hg=e=>{window.removeEventListener(rf,e)},Cv=(e,t,n)=>{const r=new CustomEvent(rf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},zg=e=>{window.addEventListener(nf,e)},jg=e=>{window.removeEventListener(nf,e)},$g=(e,t,n)=>{const r=new CustomEvent(nf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},Av=e=>{window.addEventListener(uf,e)},vv=e=>{window.removeEventListener(uf,e)},gl=(e,t,n)=>{const r=new CustomEvent(uf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class kv{constructor(){Se(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"categoryIdProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const o=mC[n];return Cv(o,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const ut=new kv,Vg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},qg=(e,t,n)=>{var u,c;const r=M({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},Yg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Wg=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},Gg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Xg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},Pv=e=>{if(!so()||!ga()){so()&&fn.clear(),fn.add({context:"browse",payload:pe(M({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},Kg=e=>{Vg(e,ut)},Nv=(e,t)=>{qg(e,t,ut)},Qg=e=>{Yg(e,ut)},Ov=({field:e,value:t})=>{Wg({field:e,value:t},ut)},Iv=e=>{Gg(e,ut)},Jg=e=>{Xg(e,ut)},Zg=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=so(),n=ga();if(!t||!n){t&&fn.clear(),fn.add({context:"browse",payload:M({},e)});return}"facetFilters"in e&&Kg(e.facetFilters||{}),"rangeFilters"in e&&Qg(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Jg(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},Rv=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Zg,updateBrowseCategoryId:Pv,updateCatalogSegment:Iv,updateFacetFilter:Nv,updateFacetFilters:Kg,updatePricebooks:Jg,updateRangeFilter:Ov,updateRangeFilters:Qg},Symbol.toStringTag,{value:"Module"}));class Lv{constructor(){Se(this,"initialParams",{productId:"",productName:"",pdpLink:""});Se(this,"proxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>($g(n,r),Reflect.set(t,n,r)));Se(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const pr=new Lv,e1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=so(),n=ga();if(!t||!n){t&&fn.clear(),fn.add({context:"pdp",payload:M({},e)});return}pr.updateProxy(e),$g("pdp-context",e)},Dv=e=>{pr.proxy.productId=e,so()||fn.add({context:"pdp",payload:M({},pr.state)})},Mv=e=>{pr.proxy.pdpLink=e},gt={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"},t1={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};class Fv{constructor(){Se(this,"initialState",t1);Se(this,"promptsStateProxy");Se(this,"promptsParamsProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return ba(n,r),Reflect.set(t,n,r)});Se(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Se(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Se(this,"updatePromptsParamsProxy",t=>new Proxy(M({},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 Ut=new Fv,Bv=e=>{window.addEventListener(af,e)},Uv=e=>{window.removeEventListener(af,e)},ba=(e,t)=>{const n=new CustomEvent(af,{detail:{property:e,value:t}});window.dispatchEvent(n)},n1=e=>{const t=Ut.isOpen,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isOpen=n},r1=e=>{const t=Ut.isInline,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isInline=n},Hv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ba("params",e),Ut.promptsStateProxy.entryType="ask_cim"},zv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ba("params",e),Ut.promptsStateProxy.entryType="search"},jv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ba("params",e),Ut.promptsStateProxy.entryType="browse"},$v=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ba("params",e),Ut.promptsStateProxy.entryType="pdp"},Vv=({elementId:e,entryType:t,params:n,isInline:r})=>{Ut.promptsStateProxy.elementId=e,t&&(Ut.promptsStateProxy.entryType=t),typeof r=="boolean"&&r1(r),n&&Ut.updatePromptsParamsProxy(n),Ut.isOpen||n1(!0)},qv=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{gl("getConversationMessages",{payload:e,callback:t},xi.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{gl("getSessionInformation",{callback:e},xi.GET_SESSION_INFORMATION)},loadConversation:e=>{gl("loadConversation",e,xi.LOAD_CONVERSATION)},resetConversation:()=>{gl("resetConversation",!0,xi.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Yv{constructor(){Se(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"queryProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const o=gC[n];return wv(o,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const Tt=new Yv,Wv=e=>{const t=ga(),n=so();if(!n||!t){n&&fn.clear(),fn.add({context:"search",payload:pe(M({},Tt.state),{query:e})});return}Tt.queryProxy.query=e},i1=e=>{Vg(e,Tt)},Gv=(e,t)=>{qg(e,t,Tt)},o1=e=>{Yg(e,Tt)},Xv=({field:e,value:t})=>{Wg({field:e,value:t},Tt)},Kv=e=>{Gg(e,Tt)},s1=e=>{Xg(e,Tt)},a1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ga(),n=so();if(!n||!t){n&&fn.clear(),fn.add({context:"search",payload:M({},e)});return}"facetFilters"in e&&i1(e.facetFilters||{}),"rangeFilters"in e&&o1(e.rangeFilters||[]),"catalogSegment"in e&&(Tt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&s1(e.pricebooks||[]),Tt.queryProxy.query=e.query},Qv=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:a1,updateCatalogSegment:Kv,updateFacetFilter:Gv,updateFacetFilters:i1,updatePricebooks:s1,updateRangeFilter:Xv,updateRangeFilters:o1,updateSearchQuery:Wv},Symbol.toStringTag,{value:"Module"})),Jv={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},u1=F.createContext(Jv),Zv=({children:e})=>{const[t,n]=F.useState(ut.categoryId),[r,o]=F.useState(ut.categoryIdProxy.categoryName||""),[a,u]=F.useState(ut.facetFilters||{}),[c,d]=F.useState(ut.rangeFilters||[]),[f,p]=F.useState(ut.catalogSegment||null),[m,T]=F.useState(ut.pricebooks||null);F.useEffect(()=>{const _=({detail:S})=>{(S==null?void 0:S.property)==="categoryId"&&n(S.value),(S==null?void 0:S.property)==="categoryName"&&o(S.value),(S==null?void 0:S.property)==="facetFilters"&&u(S.value),(S==null?void 0:S.property)==="rangeFilters"&&d(S.value),(S==null?void 0:S.property)==="catalogSegment"&&p(S.value),(S==null?void 0:S.property)==="pricebooks"&&T(S.value)};return Ug(_),()=>{Hg(_)}},[]);const y=F.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:m}),[t,r,a,c,f,m]);return w.jsx(u1.Provider,{value:y,children:e})},ek=()=>{const e=F.useContext(u1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},tk={searchQuery:Tt.query,facetFilters:Tt.facetFilters,rangeFilters:Tt.rangeFilters,catalogSegment:Tt.catalogSegment,pricebooks:Tt.pricebooks},l1=F.createContext(tk),nk=({children:e})=>{const[t,n]=F.useState(Tt.query),[r,o]=F.useState(Tt.facetFilters),[a,u]=F.useState(Tt.rangeFilters),[c,d]=F.useState(Tt.catalogSegment),[f,p]=F.useState(Tt.pricebooks);F.useEffect(()=>{const T=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&o(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return Fg(T),()=>{Bg(T)}},[]);const m=F.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return w.jsx(l1.Provider,{value:m,children:e})},rk=()=>{const e=F.useContext(l1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},ik={productId:pr.productId,pdpLink:pr.pdpLink},c1=F.createContext(ik),ok=({children:e})=>{const[t,n]=F.useState(pr.productId),[r,o]=F.useState(pr.pdpLink);F.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),o(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&o(c.value)};return zg(u),()=>{jg(u)}},[]);const a=F.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(c1.Provider,{value:a,children:e})},sk=()=>{const e=F.useContext(c1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},d1=F.createContext({mode:Je.modeProxy.mode,entryType:Je.entryType,status:Je.statusProxy,dialogPosition:Je.dialogProxy.position,isDialogFullHeight:Je.dialogProxy.isFullHeight,dialogWidth:Je.dialogProxy.width,isModalFullscreen:Je.modalProxy.isFullscreen,previousComponentType:Je.statusProxy.type}),ak=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=F.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,c]=F.useState(Je.modeProxy.mode),[d,f]=F.useState({type:n||Je.statusProxy.type,isOpen:Je.statusProxy.isOpen,isMinimized:Je.statusProxy.isMinimized}),[p,m]=F.useState(Je.dialogProxy.position),[T,y]=F.useState(Je.dialogProxy.isFullHeight),[_,S]=F.useState(Je.dialogProxy.width),[A,v]=F.useState(Je.modalProxy.isFullscreen),N=_v(d.type);F.useEffect(()=>{const H=X=>{const{property:B,value:q}=X.detail||{};if(!(!B||q===void 0)){if(B==="mode"){c(q);return}if(B==="entryType"){a(q);return}if(B==="isMinimized"){f(ie=>pe(M({},ie),{isMinimized:q}));return}if(B==="isOpen"){f(ie=>pe(M({},ie),{isOpen:q}));return}if(B==="type"){f(ie=>pe(M({},ie),{type:q}));return}if(B==="position"){m(q);return}if(B==="isFullHeight"){y(q);return}if(B==="width"){S(q);return}if(B==="isFullscreen"){v(q);return}}};return av(H),()=>{uv(H)}},[]),ya(()=>{e&&Ea(e)}),ya(()=>{const H=n||(t==null?void 0:t.type);H&&ml(H),t&&"isOpen"in t&&ri(!!t.isOpen),t&&"isMinimized"in t&&pl(!!t.isMinimized)}),ya(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:H}=t.options;H&&Cf(H),"dialogFullHeight"in t.options&&dv(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&S(t.options.dialogWidth),"isModalFullscreen"in t.options&&wf(!!t.options.isModalFullscreen)});const k=F.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:N||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:_,isModalFullscreen:A}),[u,o,d,N,p,T,_,A]);return w.jsx(d1.Provider,{value:k,children:r})},Zn=()=>{const e=F.useContext(d1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},f1=F.createContext(null),h1=F.createContext(null),vf=()=>{const e=F.useContext(h1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},wi=()=>{const e=F.useContext(f1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Wo=()=>{const e=F.useContext(tg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},er=()=>{const e=F.useContext(eg);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},uk=({copilot:e})=>{const{logger:t,conversationHistory:n}=at(),{isInline:r}=wi(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=Wo(),{activeConversationId:u}=er(),c=F.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=F.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,m=>{t==null||t.log("Retrieved conversation messages: ",m),p==null||p(m)})},[e,t]);return F.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),m={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(m.limit=n.limit),d(m,T=>{const y=[];[...T.reverse()||[]].forEach(S=>{var v;const A=T.find(N=>N.id===S.eventSourceId);(v=A==null?void 0:A.name)!=null&&v.endsWith("_suggestions")||(S.bypassHandlers=!0,y.unshift(S))}),y.forEach(S=>{o(S)}),a(!0)})},[t,r,u,d,o,a,n]),{getSessionInformation:c,getConversationMessages:d}},p1=F.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),lk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:T}=at(),fi=rk(),{searchQuery:y}=fi,_=cn(fi,["searchQuery"]),Tr=ek(),{categoryId:S}=Tr,A=cn(Tr,["categoryId"]),{productId:v,pdpLink:N}=sk(),{setCopilot:k,setConnected:H,resetCopilot:X,resetCopilotState:B,addCopilotEvent:q,removeLoadingMessage:ie,handleCopilotRequestAck:me,setActiveConversationId:$,setConversationIds:oe,setAskCimPrompts:de}=Wo(),{connected:le,copilot:ne,messages:Te,groupedMessages:Oe,loadingMessages:ue,askCimPrompts:Q}=er(),{status:re,entryType:C}=Zn(),{isInline:D}=wi(),{getConversationMessages:te,getSessionInformation:O}=uk({copilot:ne}),_e=F.useMemo(()=>ue.size>0,[ue]),De=F.useCallback(Ce=>ue.has(Ce),[ue]),ke=F.useCallback(({query:Ce,facetFilters:Me,rangeFilters:Be,catalogSegment:rt,pricebooks:pt,userPrompt:J,imageFile:ge})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!Ce)return;const Ae={searchParams:{query:Ce}};J&&(Ae.userPrompt=J),ge&&(Ae.attachments={image:ge}),Me&&Object.keys(Me).length>0&&(Ae.searchParams.facetFilters=Me),Be&&Be.length>0&&(Ae.searchParams.rangeFilters=Be),rt&&(Ae.searchParams.catalogSegment=rt),pt&&(Ae.searchParams.pricebooks=pt),m&&(Ae.clientContext=m),Ea("search"),ne.search(Ae,qe=>{const Re=M({},qe);me(Re)})},[p,me,ne,m]),ze=F.useCallback(({categoryId:Ce,categoryName:Me,facetFilters:Be,rangeFilters:rt,catalogSegment:pt,pricebooks:J,userPrompt:ge,imageFile:Ae})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}const qe=Be&&Object.keys(Be).length>0;if(Ce===""&&!qe){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Re={browseParams:{categoryId:Ce||""}};ge&&(Re.userPrompt=ge),Ae&&(Re.attachments={image:Ae}),qe&&(Re.browseParams.facetFilters=Be),rt&&rt.length>0&&(Re.browseParams.rangeFilters=rt),pt&&(Re.browseParams.catalogSegment=pt),Array.isArray(J)&&J.length>0&&(Re.browseParams.pricebooks=J),(m||Me)&&(Re.clientContext={},m&&(Re.clientContext=M({},m)),Me&&(Re.clientContext.cimLabel=Me)),Ea("browse"),ne.browse(Re,lt=>{var qr;const Yt=M({},lt),jt=((qr=Yt.request)==null?void 0:qr.clientContext)||{},sn=(jt==null?void 0:jt.cimLabel)||Me;sn&&Yt.request&&(Yt.request.label=sn),me(Yt)})},[p,me,ne,m]),xe=F.useCallback(({productId:Ce,productName:Me,pdpLink:Be,userPrompt:rt,imageFile:pt})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!Ce)return;const J={productId:Ce};rt&&(J.userPrompt=rt),Be&&(J.pdpLink=Be),pt&&(J.attachments={image:pt}),(m||Me)&&(J.clientContext={},m&&(J.clientContext=M({},m)),Me&&(J.clientContext.cimLabel=Me)),T&&(J.baseCatalogParams=T),Ea("pdp"),ne.productView(J,ge=>{var lt;const Ae=M({},ge),qe=((lt=Ae.request)==null?void 0:lt.clientContext)||{},Re=(qe==null?void 0:qe.cimLabel)||Me;Re&&Ae.request&&(Ae.request.label=Re),me(Ae)})},[p,ne,me,m,T]),Ye=F.useCallback(({userPrompt:Ce,imageFile:Me})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!Ce)return;const Be={userPrompt:Ce};Me&&(Be.attachments={image:Me}),m&&(Be.clientContext=m),T&&(Be.baseCatalogParams=T),ne.askCim(Be,rt=>{const pt=M({},rt);me(pt)})},[p,ne,me,m,T]),ft=F.useCallback(Ce=>{q(Ce),c==null||c(Ce)},[q,c]),on=F.useCallback(Ce=>{q(Ce),d==null||d(Ce)},[q,d]),$r=F.useCallback(Ce=>{u==null||u(Ce),H(!0)},[u,H]);F.useEffect(()=>{!ne||!le||!re.isOpen||fn.size>0&&fn.processQueue(Ce=>{if(Ce.context==="search"){const Me=M({},Ce.payload);a1(Me)}if(Ce.context==="browse"){const Me=M({},Ce.payload);Zg(Me)}if(Ce.context==="pdp"){const Me=M({},Ce.payload);e1(Me)}})},[re.isOpen,ne,le]);const Vr=F.useCallback(Ce=>{const Me=Be=>{const rt=pe(M({},Be),{id:Be.inquiryLinkId||Be.id});q(rt)};Ce.on("connect_ack",$r),Ce.on("partial_inquiry",Me),Ce.on("display_products",q),Ce.on("progress",q),Ce.on("refined_search",ft),Ce.on("refined_browse",on),Ce.on("done",Be=>{ie(Be.eventSourceId)}),Ce.on("error",Be=>{q(Be),ie(Be.eventSourceId)}),Ce.onDisconnect(Be=>{const rt=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Be),!rt.includes(Be)){H(!1);return}p==null||p.log("De-registering event listeners");const pt=new Date().toISOString();q({name:"error",message:"Connection was lost. Please try again.",createdAt:pt,id:`error-${pt}`,sessionId:"session"}),Ce.off()})},[p,H,ie,ft,on,q,$r]);F.useEffect(()=>{if(!ne)return;const Ce=Me=>{if(!D){if(!Me.message&&Me.eventSourceId&&Me.eventSourceId===Q.requestId){de({requestId:Me.eventSourceId,message:Me});return}q(Me)}};return ne.on("follow_up",Ce),()=>{ne.off("follow_up",Ce)}},[ne,Te,Q.requestId,D,q,de]),F.useEffect(()=>{if(!ne)return;const Ce=Me=>{if(D)return;const Be=pe(M({},Me),{id:Me.inquiryLinkId||Me.id});q(Be)};return ne.on("inquiry",Ce),()=>{ne.off("inquiry",Ce)}},[ne,D,q]),ya(()=>{let Ce;n?Ce=n:Ce=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Me={baseUrl:Ce};e?Me.apiKey=e:t&&(Me.apiToken=t),r&&(Me.customerId=r),o&&(Me.tenantId=o);const Be=new tC(Me);return k(Be),Vr(Be),Be.connect(),Be.requestSessionInformation(rt=>{p==null||p.log("Session Information: ",rt);const{activeConversationId:pt,conversationIds:J}=rt.data||{};pt&&$(pt),J!=null&&J.length&&oe(J)}),()=>{Be.disconnect(),Be.off(),X()}});const Rn=F.useCallback(Ce=>{if(!ne)return;const Me={eventId:Ce,reason:"User cancelled the request"};ne.cancelRequest(Me,Be=>{q(Be),ie(Ce)})},[q,ie,ne]),Ri=F.useCallback(()=>{ne&&ne.conversationReset({},Ce=>{B(),q(Ce),ne.requestSessionInformation(Me=>{p==null||p.log("Session Information: ",Me);const{activeConversationId:Be,conversationIds:rt}=Me.data||{};Be&&$(Be),rt!=null&&rt.length&&oe(rt)})})},[ne,p,q,B,$,oe]),Li=F.useCallback((Ce,Me)=>{if(!Ce)return;const Be={userPrompt:Ce};switch(Me&&(Be.imageFile=Me),C){case"ask_cim":Ye(Be);return;case"search":y?ke(M(M({query:y},_),Be)):Ye(Be);return;case"browse":ze(M(M({categoryId:S},A),Be));return;case"pdp":v?xe(M({productId:v,pdpLink:N||""},Be)):Ye(Be);return}},[C,y,_,ke,Ye,S,A,ze,xe,v,N]),di=F.useCallback((Ce,Me)=>{var ge,Ae,qe;const rt=Ce.params.userPrompt||"";if(!rt)return;const pt=Te.find(Re=>Re.id===Me);if(!pt)return;const J=pt.name.replace("_suggestions","");if(J==="ask_cim"){Ye({userPrompt:rt});return}if(J==="copilot_search"){const Re=((ge=pt.request)==null?void 0:ge.searchParams)||{},Yt=Re.query===y;ke(pe(M({query:Re.query||y},Yt?_:{}),{userPrompt:rt}));return}if(J==="copilot_browse"){const Re=pt.request,lt=Re.browseParams||{},jt=lt.categoryId===S,sn=((Ae=Re.clientContext)==null?void 0:Ae.cimLabel)||"";ze(pe(M({categoryId:lt.categoryId||S||""},jt?A:{}),{categoryName:sn,userPrompt:rt}));return}if(J==="product_view"){const Re=pt.request||{},lt=Re.productId,Yt=lt===v,jt=((qe=Re.clientContext)==null?void 0:qe.cimLabel)||"";let sn="";Yt?sn=N||"":sn=Re.pdpLink||"",xe({productId:lt||v,pdpLink:sn,productName:jt,userPrompt:rt})}},[Te,y,_,ke,Ye,S,A,ze,xe,v,N]),Ps=F.useMemo(()=>({copilot:ne,messages:Te,groupedMessages:Oe,isLoading:_e,isResponseLoading:De,handleAskCim:Ye,handleSearch:ke,handleBrowse:ze,handlePdp:xe,handleUserInput:Li,handleSuggestion:di,handleCancel:Rn,resetConversation:Ri,getSessionInformation:O,getConversationMessages:te}),[ne,Te,Oe,_e,De,Ye,ke,ze,xe,Li,di,Rn,Ri,O,te]);return w.jsx(p1.Provider,{value:Ps,children:f})},m1=()=>{const{copilot:e}=er(),{addCopilotEvent:t}=Wo();return{getCopilotSuggestions:F.useCallback((r,o,a)=>{if(!e||!o||!r)return;const u=c=>{t(c),a(c)};switch(o){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Or=()=>{const e=F.useContext(p1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},ck=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=er(),{entryType:o}=Zn(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Wo(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Or(),{getCopilotSuggestions:_}=m1();F.useEffect(()=>{!e||!o||!t||!r||n.requestId||o==="ask_cim"&&_({},o,N=>{c({requestId:N.id,message:null})})},[e,t,n.requestId,o,r,_,c]);const S=F.useCallback(({query:N})=>{if(!e||!N)return;const{facetFilters:k}=Tt.facetFiltersProxy,{rangeFilters:H}=Tt.rangeFiltersProxy,{catalogSegment:X}=Tt.catalogSegmentProxy,{pricebooks:B}=Tt.pricebooksProxy,q={query:N};q.facetFilters=k||{},q.rangeFilters=H||[],q.catalogSegment=X||"",q.pricebooks=B||[],d(M({},q))},[e,d]),A=F.useCallback(({categoryId:N})=>{if(!e)return;const k=ut.categoryIdProxy.categoryName,{facetFilters:H}=ut.facetFiltersProxy,{rangeFilters:X}=ut.rangeFiltersProxy,{catalogSegment:B}=ut.catalogSegmentProxy,{pricebooks:q}=ut.pricebooksProxy,ie={categoryId:N};ie.categoryName=k||"",ie.facetFilters=H||{},ie.rangeFilters=X||[],ie.catalogSegment=B||"",ie.pricebooks=q||[],f(M({},ie))},[e,f]),v=F.useCallback(({productId:N})=>{if(!e||!N)return;const k={productId:N,pdpLink:pr.pdpLink,productName:pr.proxy.productName||""};p(k)},[e,p]);return F.useEffect(()=>{const N=({detail:k})=>{(k==null?void 0:k.property)==="query"&&S({query:k.value})};return Fg(N),()=>{Bg(N)}},[S]),F.useEffect(()=>{const N=({detail:k})=>{if((k==null?void 0:k.property)==="pdp-context"){const H=k.value;v({productId:H.productId});return}(k==null?void 0:k.property)==="productId"&&v({productId:k.value})};return zg(N),()=>{jg(N)}},[v]),F.useEffect(()=>{const N=({detail:k})=>{(k==null?void 0:k.property)==="categoryId"&&A({categoryId:k.value})};return Ug(N),()=>{Hg(N)}},[A]),F.useEffect(()=>{const N=({detail:k})=>{if((k==null?void 0:k.event)==xi.RESET_CONVERSATION&&m(),(k==null?void 0:k.event)==xi.GET_SESSION_INFORMATION){const H=k.value.callback;T(H)}if((k==null?void 0:k.event)==xi.GET_CONVERSATION_MESSAGES){const{payload:H,callback:X}=k.value;if(!H.conversationId||typeof X!="function")return;y(H,X)}if((k==null?void 0:k.event)==xi.LOAD_CONVERSATION){const H=k.value;if(!H.conversationId)return;y(H,B=>{a(),B.forEach(q=>{u(q)})})}};return Av(N),()=>{vv(N)}},[m,T,y,a,u]),null},dk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>w.jsxs(lk,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:[w.jsx(ck,{}),f]}),fk=({children:e,dispatch:t})=>{const n=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),o=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),T=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=F.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,o,a,u,c,d,f,p,m,T]);return w.jsx(h1.Provider,{value:y,children:e})},hk=(e,t)=>{const{type:n,payload:r}=t;switch(n){case gt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case gt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case gt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case gt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case gt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case gt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case gt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case gt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},pk=({promptsConfig:e,children:t})=>{const[n,r]=J0(hk,M(M({},t1),e||{}));return w.jsx(f1.Provider,{value:n,children:w.jsx(fk,{dispatch:r,children:t})})},g1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,theme:f,openLinksInNewTab:p,globalClassName:m,isDevelopment:T=!1,componentType:y,componentConfig:_,entryType:S,entryMessage:A,disclaimerText:v,disclaimerMarkdown:N,clientContext:k,baseCatalogParams:H,searchPlaceholder:X,searchButtonLabel:B,searchConfig:q,promptsConfig:ie,resetConversationMessage:me,conversationHistory:$,onConnect:oe,onCopilotEvent:de,onRefinedSearch:le,onRefinedBrowse:ne,__features:Te,children:Oe})=>w.jsx(ov,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:o,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,entryMessage:A,theme:f,globalClassName:m,openLinksInNewTab:p,searchPlaceholder:X,searchButtonLabel:B,searchConfig:q,componentConfig:_,clientContext:k,baseCatalogParams:H,disclaimerMarkdown:N,disclaimerText:v,resetConversationMessage:me,conversationHistory:$,isDevelopment:T,__features:Te,children:w.jsx(ak,{entryType:S,componentConfig:_,componentType:y,children:w.jsx(pv,{onCopilotEvent:de,children:w.jsx(ok,{children:w.jsx(Zv,{children:w.jsx(nk,{children:w.jsx(pk,{promptsConfig:ie,children:w.jsx(dk,{apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,isDevelopment:T,entryType:S,onConnect:oe,onRefinedSearch:le,onRefinedBrowse:ne,onCopilotEvent:de,children:Oe})})})})})})})});var kf={exports:{}},kn={},Pf={exports:{}},Nf={};var E1;function mk(){return E1||(E1=1,(function(e){function t(Q,re){var C=Q.length;Q.push(re);e:for(;0<C;){var D=C-1>>>1,te=Q[D];if(0<o(te,re))Q[D]=re,Q[C]=te,C=D;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var re=Q[0],C=Q.pop();if(C!==re){Q[0]=C;e:for(var D=0,te=Q.length,O=te>>>1;D<O;){var _e=2*(D+1)-1,De=Q[_e],ke=_e+1,ze=Q[ke];if(0>o(De,C))ke<te&&0>o(ze,De)?(Q[D]=ze,Q[ke]=C,D=ke):(Q[D]=De,Q[_e]=C,D=_e);else if(ke<te&&0>o(ze,C))Q[D]=ze,Q[ke]=C,D=ke;else break e}}return re}function o(Q,re){var C=Q.sortIndex-re.sortIndex;return C!==0?C:Q.id-re.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,_=!1,S=!1,A=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(Q){for(var re=n(f);re!==null;){if(re.callback===null)r(f);else if(re.startTime<=Q)r(f),re.sortIndex=re.expirationTime,t(d,re);else break;re=n(f)}}function H(Q){if(S=!1,k(Q),!_)if(n(d)!==null)_=!0,Oe(X);else{var re=n(f);re!==null&&ue(H,re.startTime-Q)}}function X(Q,re){_=!1,S&&(S=!1,v(ie),ie=-1),y=!0;var C=T;try{for(k(re),m=n(d);m!==null&&(!(m.expirationTime>re)||Q&&!oe());){var D=m.callback;if(typeof D=="function"){m.callback=null,T=m.priorityLevel;var te=D(m.expirationTime<=re);re=e.unstable_now(),typeof te=="function"?m.callback=te:m===n(d)&&r(d),k(re)}else r(d);m=n(d)}if(m!==null)var O=!0;else{var _e=n(f);_e!==null&&ue(H,_e.startTime-re),O=!1}return O}finally{m=null,T=C,y=!1}}var B=!1,q=null,ie=-1,me=5,$=-1;function oe(){return!(e.unstable_now()-$<me)}function de(){if(q!==null){var Q=e.unstable_now();$=Q;var re=!0;try{re=q(!0,Q)}finally{re?le():(B=!1,q=null)}}else B=!1}var le;if(typeof N=="function")le=function(){N(de)};else if(typeof MessageChannel!="undefined"){var ne=new MessageChannel,Te=ne.port2;ne.port1.onmessage=de,le=function(){Te.postMessage(null)}}else le=function(){A(de,0)};function Oe(Q){q=Q,B||(B=!0,le())}function ue(Q,re){ie=A(function(){Q(e.unstable_now())},re)}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(){_||y||(_=!0,Oe(X))},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"):me=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 re=3;break;default:re=T}var C=T;T=re;try{return Q()}finally{T=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,re){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var C=T;T=Q;try{return re()}finally{T=C}},e.unstable_scheduleCallback=function(Q,re,C){var D=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?D+C:D):C=D,Q){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=C+te,Q={id:p++,callback:re,priorityLevel:Q,startTime:C,expirationTime:te,sortIndex:-1},C>D?(Q.sortIndex=C,t(f,Q),n(d)===null&&Q===n(f)&&(S?(v(ie),ie=-1):S=!0,ue(H,C-D))):(Q.sortIndex=te,t(d,Q),_||y||(_=!0,Oe(X))),Q},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(Q){var re=T;return function(){var C=T;T=re;try{return Q.apply(this,arguments)}finally{T=C}}}})(Nf)),Nf}var y1;function gk(){return y1||(y1=1,Pf.exports=mk()),Pf.exports}var b1;function Ek(){if(b1)return kn;b1=1;var e=Fo(),t=gk();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,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,s,l,h){if(l!==null&&l.type===0)return!1;switch(typeof s){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 _(i,s,l,h){if(s===null||typeof s=="undefined"||y(i,s,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function S(i,s,l,h,E,b,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=x}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];A[s]=new S(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new S(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function N(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(v,N);A[s]=new S(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(v,N);A[s]=new S(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(v,N);A[s]=new S(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function k(i,s,l,h){var E=A.hasOwnProperty(s)?A[s]:null;(E!==null?E.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,E,h)&&(l=null),h||E===null?T(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(s=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(s):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,s,l):i.setAttribute(s,l))))}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),B=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),oe=Symbol.for("react.context"),de=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),Te=Symbol.for("react.memo"),Oe=Symbol.for("react.lazy"),ue=Symbol.for("react.offscreen"),Q=Symbol.iterator;function re(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,D;function te(i){if(D===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);D=s&&s[1]||""}return`
10
+ `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=io(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&hl.assertOptions(r,{silentJSONParsing:Zn.transitional(Zn.boolean),forcedJSONParsing:Zn.transitional(Zn.boolean),clarifyTimeoutError:Zn.transitional(Zn.boolean),legacyInterceptorReqResOrdering:Zn.transitional(Zn.boolean)},!1),o!=null&&(Y.isFunction(o)?n.paramsSerializer={serialize:o}:hl.assertOptions(o,{encode:Zn.function,serialize:Zn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),hl.assertOptions(n,{baseUrl:Zn.spelling("baseURL"),withXsrfToken:Zn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Y.merge(a.common,a[n.method]);a&&Y.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=Sn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;d=d&&S.synchronous;const A=n.transitional||gf;A&&A.legacyInterceptorReqResOrdering?c.unshift(S.fulfilled,S.rejected):c.push(S.fulfilled,S.rejected)});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let p,m=0,T;if(!d){const _=[Dg.bind(this),void 0];for(_.unshift(...c),_.push(...f),T=_.length,p=Promise.resolve(n);m<T;)p=p.then(_[m++],_[m++]);return p}T=c.length;let y=n;for(;m<T;){const _=c[m++],S=c[m++];try{y=_(y)}catch(A){S.call(this,A);break}}try{p=Dg.call(this,y)}catch(_){return Promise.reject(_)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=io(this.defaults,t);const n=Cg(t.baseURL,t.url,t.allowAbsoluteUrls);return bg(n,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){oo.prototype[t]=function(n,r){return this.request(io(r||{},{method:t,url:n,data:(r||{}).data}))}}),Y.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(io(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}oo.prototype[t]=n(),t!=="query"&&(oo.prototype[t+"Form"]=n(!0))});let nv=class q2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new ma(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 q2(function(o){t=o}),cancel:t}}};function rv(e){return function(n){return e.apply(null,n)}}function iv(e){return Y.isObject(e)&&e.isAxiosError===!0}const xf={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(xf).forEach(([e,t])=>{xf[t]=e});function Fg(e){const t=new oo(e),n=ig(oo.prototype.request,t);return Y.extend(n,oo.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Fg(io(e,o))},n}const Lt=Fg(pa);Lt.Axios=oo,Lt.CanceledError=ma,Lt.CancelToken=nv,Lt.isCancel=Sg,Lt.VERSION=Tf,Lt.toFormData=ll,Lt.AxiosError=Oe,Lt.Cancel=Lt.CanceledError,Lt.all=function(t){return Promise.all(t)},Lt.spread=rv,Lt.isAxiosError=iv,Lt.mergeConfig=io,Lt.AxiosHeaders=Sn,Lt.formToJSON=e=>_g(Y.isHTMLForm(e)?new FormData(e):e),Lt.getAdapter=Lg.getAdapter,Lt.HttpStatusCode=xf,Lt.default=Lt;const{Axios:K7,AxiosError:Q7,CanceledError:J7,isCancel:Z7,CancelToken:eU,VERSION:tU,all:nU,Cancel:rU,isAxiosError:iU,spread:oU,toFormData:sU,AxiosHeaders:aU,HttpStatusCode:uU,formToJSON:lU,getAdapter:cU,mergeConfig:dU,create:fU}=Lt;class ov{constructor(t,n,r,o=!1,a,u){Se(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Se(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Se(this,"CIMULATE_SEARCH_API_PATH","api/v1");Se(this,"baseApiUrl");Se(this,"headers",{});Se(this,"fetchConfig",()=>et(this,null,function*(){try{const t=yield Lt.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}}));Se(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class sv{constructor(t,n,r,o=!1,a,u){Se(this,"apiService");Se(this,"config",null);Se(this,"getConfig",()=>et(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}}));Se(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Se(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Se(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Se(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Se(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Se(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Se(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Se(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Se(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Se(this,"getProductField",t=>this.config?this.config[t]:"");Se(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new ov(t,n,r,o,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Yo=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class av{constructor(t=!1){Se(this,"isDevelopment");Se(this,"_log",(t,n,...r)=>{Yo(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 uv={copilot:"Your Search Assistant",messaging:"Commerce Client"},Bg=B.createContext(null),lv=({mode:e,logoUrl:t,headerText:n="Your Search Assistant",headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:T,searchConfig:y,suggestionButtonConfig:_,messageAlignment:S="start",autoScroll:A=!0,componentConfig:C,conversationHistory:N,resetConversationMessage:k="",apiKey:H,apiToken:V,baseUrl:F,customerId:q,tenantId:ie,theme:ge,isDevelopment:$,__features:oe,routingAttributes:ce,children:fe})=>{const te=e==="messaging",be=B.useMemo(()=>{const ee=ce==null?void 0:ce.isCartMgmtSupported;return ee===!0||ee==="true"},[ce]),ve=B.useMemo(()=>te?{config:null}:new sv(F,H,V,$,q,ie),[te,F,H,V,$,q,ie]),se=B.useMemo(()=>new av($),[$]);B.useEffect(()=>{te||!ve||ve.config||ve.getConfig()},[ve,te]);const Q=B.useMemo(()=>_A(ge),[ge]),re=B.useMemo(()=>{const ee=(y==null?void 0:y.placeholder)||m,O=(y==null?void 0:y.buttonLabel)||T;let _e="icon";return y!=null&&y.buttonType?_e=y.buttonType:T&&(_e="text"),pe(M({},y||{}),{placeholder:ee,buttonLabel:O,buttonType:_e})},[y,m,T]),v=B.useMemo(()=>pe(M({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:n||uv[e!=null?e:"copilot"]}),[r,t,n,e]),D=B.useMemo(()=>({configModule:ve,mode:e!=null?e:"copilot",headerConfig:v,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:Q,logger:se,searchConfig:re,suggestionButtonConfig:_,messageAlignment:S,autoScroll:A,enableMinimize:!!(C!=null&&C.enableMinimize),resetConversationMessage:k,conversationHistory:{sinceHours:typeof(N==null?void 0:N.sinceHours)=="number"?N.sinceHours:1,limit:N==null?void 0:N.limit},features:oe,isCartMgmtSupported:be}),[ve,e,v,a,o,f,p,c,d,u,re,_,S,A,C,k,se,Q,N,oe,be]);return w.jsx(Bg.Provider,{value:D,children:fe})},nt=()=>{const e=B.useContext(Bg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class cv{constructor(){Se(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}});Se(this,"connectedProxy");Se(this,"modeProxy");Se(this,"entryTypeProxy");Se(this,"statusProxy");Se(this,"dialogProxy");Se(this,"modalProxy",{isFullscreen:!1});Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return hv(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 Je=new cv,so=()=>Je.connected,ga=()=>Je.isOpen,dv=e=>{window.addEventListener(sf,e)},fv=e=>{window.removeEventListener(sf,e)},hv=(e,t)=>{const n=new CustomEvent(sf,{detail:{property:e,value:t}});window.dispatchEvent(n)},pv=e=>{Je.connectedProxy.connected=e},Ea=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);Je.entryTypeProxy.entryType=e},ri=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1)},pl=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},wf=e=>{Je.modalProxy.isFullscreen=e},ml=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Je.statusProxy.type=e,e==="dialog"||e==="chat"?Je.modeProxy.mode="embedded":Je.modeProxy.mode="standalone"},Af=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(", ")}.`);Je.dialogProxy.position=e},mv=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},gv=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=nt(),o=B.useCallback(k=>{n({type:mt.SET_COPILOT,payload:k})},[n]),a=B.useCallback(k=>{pv(k),n({type:mt.SET_CONNECTED,payload:k})},[n]),u=B.useCallback(()=>{n({type:mt.RESET_COPILOT,payload:{}})},[n]),c=B.useCallback(()=>{n({type:mt.RESET_STATE,payload:{}})},[n]),d=B.useCallback(k=>{r==null||r.log(`${k.name} event received`,k),n({type:mt.ADD_MESSAGE,payload:k}),k.bypassHandlers||e==null||e(k)},[e,r,n]),f=B.useCallback(k=>{n({type:mt.ADD_LOADING_MESSAGE,payload:k})},[n]),p=B.useCallback(k=>{n({type:mt.REMOVE_LOADING_MESSAGE,payload:k})},[n]),m=B.useCallback(k=>{d(k),f(k.id)},[d,f]),T=B.useCallback(k=>{n({type:mt.SET_ACTIVE_CONVERSATION_ID,payload:k})},[n]),y=B.useCallback(k=>{n({type:mt.ADD_CONVERSATION_ID,payload:k})},[n]),_=B.useCallback(k=>{n({type:mt.SET_CONVERSATION_IDS,payload:k})},[n]),S=B.useCallback(k=>{n({type:mt.SET_IMAGE_FILE,payload:k})},[n]),A=B.useCallback(k=>{n({type:mt.SET_ASK_CIM_PROMPTS,payload:k})},[n]),C=B.useCallback(k=>{n({type:mt.SET_CONVERSATION_HISTORY_LOADED,payload:k})},[n]),N=B.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:T,addConversationId:y,setConversationIds:_,setImageFile:S,setAskCimPrompts:A,setConversationHistoryLoaded:C}),[o,a,u,c,d,f,p,m,T,y,_,S,A,C]);return w.jsx(rg.Provider,{value:N,children:t})};gA();const Ev=(e,t)=>{const{type:n,payload:r}=t;if(n===mt.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===o.id);if(c!==-1){u[c]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case mt.RESET_STATE:e.messages=no.messages,e.groupedMessages=no.groupedMessages,e.loadingMessages=no.loadingMessages,e.imageFile=no.imageFile,e.askCimPrompts=no.askCimPrompts,e.conversationHistoryLoaded=no.conversationHistoryLoaded;break;case mt.RESET_COPILOT:e.copilot=null;break;case mt.SET_COPILOT:e.copilot=r;break;case mt.SET_CONNECTED:e.connected=r;break;case mt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case mt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case mt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case mt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case mt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case mt.SET_IMAGE_FILE:e.imageFile=r;break;case mt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case mt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},yv=({onCopilotEvent:e,children:t})=>{const[n,r]=eg(Ev,no);return w.jsx(ng.Provider,{value:n,children:w.jsx(gv,{onCopilotEvent:e,dispatch:r,children:t})})};function bv(){var e=B.useRef(!0);return e.current?(e.current=!1,!0):e.current}function Tv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function _v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Cf=typeof window!="undefined",ya=function(e){B.useEffect(e,[])},Sv=function(e){var t=B.useRef(e);t.current=e,ya(function(){return function(){return t.current()}})},xv=function(e){var t=B.useRef(0),n=B.useState(e),r=n[0],o=n[1],a=B.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return Sv(function(){cancelAnimationFrame(t.current)}),[r,a]},wv=function(e,t){return e===t};function Av(e,t){t===void 0&&(t=wv);var n=B.useRef(),r=B.useRef(e),o=bv();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var Cv=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,c=xv({width:Cf?window.innerWidth:r,height:Cf?window.innerHeight:a}),d=c[0],f=c[1];return B.useEffect(function(){if(Cf){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return Tv(window,"resize",p),function(){_v(window,"resize",p)}}},[]),d};class vv{constructor(){Se(this,"items",[]);Se(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Se(this,"remove",()=>this.items.shift());Se(this,"first",()=>this.items.length>0?this.items[0]:null);Se(this,"clear",()=>{this.items.length=0});Se(this,"processQueue",t=>{new Array(fn.size).fill(1).forEach(()=>{const r=fn.first();r&&(t(r),fn.remove())})})}get size(){return this.items.length}}const fn=new vv,Ug=e=>{window.addEventListener(of,e)},Hg=e=>{window.removeEventListener(of,e)},kv=(e,t,n)=>{const r=new CustomEvent(of,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},zg=e=>{window.addEventListener(rf,e)},jg=e=>{window.removeEventListener(rf,e)},Pv=(e,t,n)=>{const r=new CustomEvent(rf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},$g=e=>{window.addEventListener(nf,e)},Vg=e=>{window.removeEventListener(nf,e)},qg=(e,t,n)=>{const r=new CustomEvent(nf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},Nv=e=>{window.addEventListener(uf,e)},Ov=e=>{window.removeEventListener(uf,e)},gl=(e,t,n)=>{const r=new CustomEvent(uf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Iv{constructor(){Se(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"categoryIdProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const o=bA[n];return Pv(o,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const ut=new Iv,Yg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Wg=(e,t,n)=>{var u,c;const r=M({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},Gg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Xg=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},Kg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Qg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},Rv=e=>{if(!so()||!ga()){so()&&fn.clear(),fn.add({context:"browse",payload:pe(M({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},Jg=e=>{Yg(e,ut)},Lv=(e,t)=>{Wg(e,t,ut)},Zg=e=>{Gg(e,ut)},Dv=({field:e,value:t})=>{Xg({field:e,value:t},ut)},Mv=e=>{Kg(e,ut)},e1=e=>{Qg(e,ut)},t1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=so(),n=ga();if(!t||!n){t&&fn.clear(),fn.add({context:"browse",payload:M({},e)});return}"facetFilters"in e&&Jg(e.facetFilters||{}),"rangeFilters"in e&&Zg(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&e1(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},Fv=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:t1,updateBrowseCategoryId:Rv,updateCatalogSegment:Mv,updateFacetFilter:Lv,updateFacetFilters:Jg,updatePricebooks:e1,updateRangeFilter:Dv,updateRangeFilters:Zg},Symbol.toStringTag,{value:"Module"}));class Bv{constructor(){Se(this,"initialParams",{productId:"",productName:"",pdpLink:""});Se(this,"proxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>(qg(n,r),Reflect.set(t,n,r)));Se(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const mr=new Bv,n1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=so(),n=ga();if(!t||!n){t&&fn.clear(),fn.add({context:"pdp",payload:M({},e)});return}mr.updateProxy(e),qg("pdp-context",e)},Uv=e=>{mr.proxy.productId=e,so()||fn.add({context:"pdp",payload:M({},mr.state)})},Hv=e=>{mr.proxy.pdpLink=e},gt={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"},r1={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1};class zv{constructor(){Se(this,"initialState",r1);Se(this,"promptsStateProxy");Se(this,"promptsParamsProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return ba(n,r),Reflect.set(t,n,r)});Se(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Se(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Se(this,"updatePromptsParamsProxy",t=>new Proxy(M({},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 Ut=new zv,jv=e=>{window.addEventListener(af,e)},$v=e=>{window.removeEventListener(af,e)},ba=(e,t)=>{const n=new CustomEvent(af,{detail:{property:e,value:t}});window.dispatchEvent(n)},i1=e=>{const t=Ut.isOpen,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isOpen=n},o1=e=>{const t=Ut.isInline,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isInline=n},Vv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ba("params",e),Ut.promptsStateProxy.entryType="ask_cim"},qv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ba("params",e),Ut.promptsStateProxy.entryType="search"},Yv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ba("params",e),Ut.promptsStateProxy.entryType="browse"},Wv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ba("params",e),Ut.promptsStateProxy.entryType="pdp"},Gv=({elementId:e,entryType:t,params:n,isInline:r})=>{Ut.promptsStateProxy.elementId=e,t&&(Ut.promptsStateProxy.entryType=t),typeof r=="boolean"&&o1(r),n&&Ut.updatePromptsParamsProxy(n),Ut.isOpen||i1(!0)},Xv=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{gl("getConversationMessages",{payload:e,callback:t},wi.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{gl("getSessionInformation",{callback:e},wi.GET_SESSION_INFORMATION)},loadConversation:e=>{gl("loadConversation",e,wi.LOAD_CONVERSATION)},resetConversation:()=>{gl("resetConversation",!0,wi.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Kv{constructor(){Se(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"queryProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const o=TA[n];return kv(o,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const Tt=new Kv,Qv=e=>{const t=ga(),n=so();if(!n||!t){n&&fn.clear(),fn.add({context:"search",payload:pe(M({},Tt.state),{query:e})});return}Tt.queryProxy.query=e},s1=e=>{Yg(e,Tt)},Jv=(e,t)=>{Wg(e,t,Tt)},a1=e=>{Gg(e,Tt)},Zv=({field:e,value:t})=>{Xg({field:e,value:t},Tt)},ek=e=>{Kg(e,Tt)},u1=e=>{Qg(e,Tt)},l1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ga(),n=so();if(!n||!t){n&&fn.clear(),fn.add({context:"search",payload:M({},e)});return}"facetFilters"in e&&s1(e.facetFilters||{}),"rangeFilters"in e&&a1(e.rangeFilters||[]),"catalogSegment"in e&&(Tt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&u1(e.pricebooks||[]),Tt.queryProxy.query=e.query},tk=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:l1,updateCatalogSegment:ek,updateFacetFilter:Jv,updateFacetFilters:s1,updatePricebooks:u1,updateRangeFilter:Zv,updateRangeFilters:a1,updateSearchQuery:Qv},Symbol.toStringTag,{value:"Module"})),nk={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},c1=B.createContext(nk),rk=({children:e})=>{const[t,n]=B.useState(ut.categoryId),[r,o]=B.useState(ut.categoryIdProxy.categoryName||""),[a,u]=B.useState(ut.facetFilters||{}),[c,d]=B.useState(ut.rangeFilters||[]),[f,p]=B.useState(ut.catalogSegment||null),[m,T]=B.useState(ut.pricebooks||null);B.useEffect(()=>{const _=({detail:S})=>{(S==null?void 0:S.property)==="categoryId"&&n(S.value),(S==null?void 0:S.property)==="categoryName"&&o(S.value),(S==null?void 0:S.property)==="facetFilters"&&u(S.value),(S==null?void 0:S.property)==="rangeFilters"&&d(S.value),(S==null?void 0:S.property)==="catalogSegment"&&p(S.value),(S==null?void 0:S.property)==="pricebooks"&&T(S.value)};return zg(_),()=>{jg(_)}},[]);const y=B.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:m}),[t,r,a,c,f,m]);return w.jsx(c1.Provider,{value:y,children:e})},ik=()=>{const e=B.useContext(c1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},ok={searchQuery:Tt.query,facetFilters:Tt.facetFilters,rangeFilters:Tt.rangeFilters,catalogSegment:Tt.catalogSegment,pricebooks:Tt.pricebooks},d1=B.createContext(ok),sk=({children:e})=>{const[t,n]=B.useState(Tt.query),[r,o]=B.useState(Tt.facetFilters),[a,u]=B.useState(Tt.rangeFilters),[c,d]=B.useState(Tt.catalogSegment),[f,p]=B.useState(Tt.pricebooks);B.useEffect(()=>{const T=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&o(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return Ug(T),()=>{Hg(T)}},[]);const m=B.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return w.jsx(d1.Provider,{value:m,children:e})},ak=()=>{const e=B.useContext(d1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},uk={productId:mr.productId,pdpLink:mr.pdpLink},f1=B.createContext(uk),lk=({children:e})=>{const[t,n]=B.useState(mr.productId),[r,o]=B.useState(mr.pdpLink);B.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),o(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&o(c.value)};return $g(u),()=>{Vg(u)}},[]);const a=B.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(f1.Provider,{value:a,children:e})},ck=()=>{const e=B.useContext(f1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},h1=B.createContext({mode:Je.modeProxy.mode,entryType:Je.entryType,status:Je.statusProxy,dialogPosition:Je.dialogProxy.position,isDialogFullHeight:Je.dialogProxy.isFullHeight,dialogWidth:Je.dialogProxy.width,isModalFullscreen:Je.modalProxy.isFullscreen,previousComponentType:Je.statusProxy.type}),dk=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=B.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,c]=B.useState(Je.modeProxy.mode),[d,f]=B.useState({type:n||Je.statusProxy.type,isOpen:Je.statusProxy.isOpen,isMinimized:Je.statusProxy.isMinimized}),[p,m]=B.useState(Je.dialogProxy.position),[T,y]=B.useState(Je.dialogProxy.isFullHeight),[_,S]=B.useState(Je.dialogProxy.width),[A,C]=B.useState(Je.modalProxy.isFullscreen),N=Av(d.type);B.useEffect(()=>{const H=V=>{const{property:F,value:q}=V.detail||{};if(!(!F||q===void 0)){if(F==="mode"){c(q);return}if(F==="entryType"){a(q);return}if(F==="isMinimized"){f(ie=>pe(M({},ie),{isMinimized:q}));return}if(F==="isOpen"){f(ie=>pe(M({},ie),{isOpen:q}));return}if(F==="type"){f(ie=>pe(M({},ie),{type:q}));return}if(F==="position"){m(q);return}if(F==="isFullHeight"){y(q);return}if(F==="width"){S(q);return}if(F==="isFullscreen"){C(q);return}}};return dv(H),()=>{fv(H)}},[]),ya(()=>{e&&Ea(e)}),ya(()=>{const H=n||(t==null?void 0:t.type);H&&ml(H),t&&"isOpen"in t&&ri(!!t.isOpen),t&&"isMinimized"in t&&pl(!!t.isMinimized)}),ya(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:H}=t.options;H&&Af(H),"dialogFullHeight"in t.options&&mv(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&S(t.options.dialogWidth),"isModalFullscreen"in t.options&&wf(!!t.options.isModalFullscreen)});const k=B.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:N||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:_,isModalFullscreen:A}),[u,o,d,N,p,T,_,A]);return w.jsx(h1.Provider,{value:k,children:r})},er=()=>{const e=B.useContext(h1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},p1=B.createContext(null),m1=B.createContext(null),vf=()=>{const e=B.useContext(m1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ii=()=>{const e=B.useContext(p1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Wo=()=>{const e=B.useContext(rg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},tr=()=>{const e=B.useContext(ng);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},fk=({copilot:e})=>{const{logger:t,conversationHistory:n}=nt(),{isInline:r}=ii(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=Wo(),{activeConversationId:u}=tr(),c=B.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=B.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,m=>{t==null||t.log("Retrieved conversation messages: ",m),p==null||p(m)})},[e,t]);return B.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),m={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(m.limit=n.limit),d(m,T=>{const y=[];[...T.reverse()||[]].forEach(S=>{var C;const A=T.find(N=>N.id===S.eventSourceId);(C=A==null?void 0:A.name)!=null&&C.endsWith("_suggestions")||(S.bypassHandlers=!0,y.unshift(S))}),y.forEach(S=>{o(S)}),a(!0)})},[t,r,u,d,o,a,n]),{getSessionInformation:c,getConversationMessages:d}},g1=B.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),hk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:T}=nt(),hi=ak(),{searchQuery:y}=hi,_=cn(hi,["searchQuery"]),_r=ik(),{categoryId:S}=_r,A=cn(_r,["categoryId"]),{productId:C,pdpLink:N}=ck(),{setCopilot:k,setConnected:H,resetCopilot:V,resetCopilotState:F,addCopilotEvent:q,removeLoadingMessage:ie,handleCopilotRequestAck:ge,setActiveConversationId:$,setConversationIds:oe,setAskCimPrompts:ce}=Wo(),{connected:fe,copilot:te,messages:be,groupedMessages:ve,loadingMessages:se,askCimPrompts:Q}=tr(),{status:re,entryType:v}=er(),{isInline:D}=ii(),{getConversationMessages:ee,getSessionInformation:O}=fk({copilot:te}),_e=B.useMemo(()=>se.size>0,[se]),De=B.useCallback(Ae=>se.has(Ae),[se]),Pe=B.useCallback(({query:Ae,facetFilters:Me,rangeFilters:Be,catalogSegment:it,pricebooks:pt,userPrompt:J,imageFile:me})=>{if(!te){p==null||p.error("Copilot is not initialized");return}if(!Ae)return;const Ce={searchParams:{query:Ae}};J&&(Ce.userPrompt=J),me&&(Ce.attachments={image:me}),Me&&Object.keys(Me).length>0&&(Ce.searchParams.facetFilters=Me),Be&&Be.length>0&&(Ce.searchParams.rangeFilters=Be),it&&(Ce.searchParams.catalogSegment=it),pt&&(Ce.searchParams.pricebooks=pt),m&&(Ce.clientContext=m),Ea("search"),te.search(Ce,qe=>{const Re=M({},qe);ge(Re)})},[p,ge,te,m]),ze=B.useCallback(({categoryId:Ae,categoryName:Me,facetFilters:Be,rangeFilters:it,catalogSegment:pt,pricebooks:J,userPrompt:me,imageFile:Ce})=>{if(!te){p==null||p.error("Copilot is not initialized");return}const qe=Be&&Object.keys(Be).length>0;if(Ae===""&&!qe){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Re={browseParams:{categoryId:Ae||""}};me&&(Re.userPrompt=me),Ce&&(Re.attachments={image:Ce}),qe&&(Re.browseParams.facetFilters=Be),it&&it.length>0&&(Re.browseParams.rangeFilters=it),pt&&(Re.browseParams.catalogSegment=pt),Array.isArray(J)&&J.length>0&&(Re.browseParams.pricebooks=J),(m||Me)&&(Re.clientContext={},m&&(Re.clientContext=M({},m)),Me&&(Re.clientContext.cimLabel=Me)),Ea("browse"),te.browse(Re,lt=>{var Yr;const Yt=M({},lt),jt=((Yr=Yt.request)==null?void 0:Yr.clientContext)||{},sn=(jt==null?void 0:jt.cimLabel)||Me;sn&&Yt.request&&(Yt.request.label=sn),ge(Yt)})},[p,ge,te,m]),xe=B.useCallback(({productId:Ae,productName:Me,pdpLink:Be,userPrompt:it,imageFile:pt})=>{if(!te){p==null||p.error("Copilot is not initialized");return}if(!Ae)return;const J={productId:Ae};it&&(J.userPrompt=it),Be&&(J.pdpLink=Be),pt&&(J.attachments={image:pt}),(m||Me)&&(J.clientContext={},m&&(J.clientContext=M({},m)),Me&&(J.clientContext.cimLabel=Me)),T&&(J.baseCatalogParams=T),Ea("pdp"),te.productView(J,me=>{var lt;const Ce=M({},me),qe=((lt=Ce.request)==null?void 0:lt.clientContext)||{},Re=(qe==null?void 0:qe.cimLabel)||Me;Re&&Ce.request&&(Ce.request.label=Re),ge(Ce)})},[p,te,ge,m,T]),Ye=B.useCallback(({userPrompt:Ae,imageFile:Me})=>{if(!te){p==null||p.error("Copilot is not initialized");return}if(!Ae)return;const Be={userPrompt:Ae};Me&&(Be.attachments={image:Me}),m&&(Be.clientContext=m),T&&(Be.baseCatalogParams=T),te.askCim(Be,it=>{const pt=M({},it);ge(pt)})},[p,te,ge,m,T]),ft=B.useCallback(Ae=>{q(Ae),c==null||c(Ae)},[q,c]),on=B.useCallback(Ae=>{q(Ae),d==null||d(Ae)},[q,d]),Vr=B.useCallback(Ae=>{u==null||u(Ae),H(!0)},[u,H]);B.useEffect(()=>{!te||!fe||!re.isOpen||fn.size>0&&fn.processQueue(Ae=>{if(Ae.context==="search"){const Me=M({},Ae.payload);l1(Me)}if(Ae.context==="browse"){const Me=M({},Ae.payload);t1(Me)}if(Ae.context==="pdp"){const Me=M({},Ae.payload);n1(Me)}})},[re.isOpen,te,fe]);const qr=B.useCallback(Ae=>{const Me=Be=>{const it=pe(M({},Be),{id:Be.inquiryLinkId||Be.id});q(it)};Ae.on("connect_ack",Vr),Ae.on("partial_inquiry",Me),Ae.on("display_products",q),Ae.on("progress",q),Ae.on("refined_search",ft),Ae.on("refined_browse",on),Ae.on("done",Be=>{ie(Be.eventSourceId)}),Ae.on("error",Be=>{q(Be),ie(Be.eventSourceId)}),Ae.onDisconnect(Be=>{const it=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Be),!it.includes(Be)){H(!1);return}p==null||p.log("De-registering event listeners");const pt=new Date().toISOString();q({name:"error",message:"Connection was lost. Please try again.",createdAt:pt,id:`error-${pt}`,sessionId:"session"}),Ae.off()})},[p,H,ie,ft,on,q,Vr]);B.useEffect(()=>{if(!te)return;const Ae=Me=>{if(!D){if(!Me.message&&Me.eventSourceId&&Me.eventSourceId===Q.requestId){ce({requestId:Me.eventSourceId,message:Me});return}q(Me)}};return te.on("follow_up",Ae),()=>{te.off("follow_up",Ae)}},[te,be,Q.requestId,D,q,ce]),B.useEffect(()=>{if(!te)return;const Ae=Me=>{if(D)return;const Be=pe(M({},Me),{id:Me.inquiryLinkId||Me.id});q(Be)};return te.on("inquiry",Ae),()=>{te.off("inquiry",Ae)}},[te,D,q]),ya(()=>{let Ae;n?Ae=n:Ae=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Me={baseUrl:Ae};e?Me.apiKey=e:t&&(Me.apiToken=t),r&&(Me.customerId=r),o&&(Me.tenantId=o);const Be=new oA(Me);return k(Be),qr(Be),Be.connect(),Be.requestSessionInformation(it=>{p==null||p.log("Session Information: ",it);const{activeConversationId:pt,conversationIds:J}=it.data||{};pt&&$(pt),J!=null&&J.length&&oe(J)}),()=>{Be.disconnect(),Be.off(),V()}});const Rn=B.useCallback(Ae=>{if(!te)return;const Me={eventId:Ae,reason:"User cancelled the request"};te.cancelRequest(Me,Be=>{q(Be),ie(Ae)})},[q,ie,te]),Ri=B.useCallback(()=>{te&&te.conversationReset({},Ae=>{F(),q(Ae),te.requestSessionInformation(Me=>{p==null||p.log("Session Information: ",Me);const{activeConversationId:Be,conversationIds:it}=Me.data||{};Be&&$(Be),it!=null&&it.length&&oe(it)})})},[te,p,q,F,$,oe]),Li=B.useCallback((Ae,Me)=>{if(!Ae)return;const Be={userPrompt:Ae};switch(Me&&(Be.imageFile=Me),v){case"ask_cim":Ye(Be);return;case"search":y?Pe(M(M({query:y},_),Be)):Ye(Be);return;case"browse":ze(M(M({categoryId:S},A),Be));return;case"pdp":C?xe(M({productId:C,pdpLink:N||""},Be)):Ye(Be);return}},[v,y,_,Pe,Ye,S,A,ze,xe,C,N]),fi=B.useCallback((Ae,Me)=>{var me,Ce,qe;const it=Ae.params.userPrompt||"";if(!it)return;const pt=be.find(Re=>Re.id===Me);if(!pt)return;const J=pt.name.replace("_suggestions","");if(J==="ask_cim"){Ye({userPrompt:it});return}if(J==="copilot_search"){const Re=((me=pt.request)==null?void 0:me.searchParams)||{},Yt=Re.query===y;Pe(pe(M({query:Re.query||y},Yt?_:{}),{userPrompt:it}));return}if(J==="copilot_browse"){const Re=pt.request,lt=Re.browseParams||{},jt=lt.categoryId===S,sn=((Ce=Re.clientContext)==null?void 0:Ce.cimLabel)||"";ze(pe(M({categoryId:lt.categoryId||S||""},jt?A:{}),{categoryName:sn,userPrompt:it}));return}if(J==="product_view"){const Re=pt.request||{},lt=Re.productId,Yt=lt===C,jt=((qe=Re.clientContext)==null?void 0:qe.cimLabel)||"";let sn="";Yt?sn=N||"":sn=Re.pdpLink||"",xe({productId:lt||C,pdpLink:sn,productName:jt,userPrompt:it})}},[be,y,_,Pe,Ye,S,A,ze,xe,C,N]),Ps=B.useMemo(()=>({copilot:te,messages:be,groupedMessages:ve,isLoading:_e,isResponseLoading:De,handleAskCim:Ye,handleSearch:Pe,handleBrowse:ze,handlePdp:xe,handleUserInput:Li,handleSuggestion:fi,handleCancel:Rn,resetConversation:Ri,getSessionInformation:O,getConversationMessages:ee}),[te,be,ve,_e,De,Ye,Pe,ze,xe,Li,fi,Rn,Ri,O,ee]);return w.jsx(g1.Provider,{value:Ps,children:f})},E1=()=>{const{copilot:e}=tr(),{addCopilotEvent:t}=Wo();return{getCopilotSuggestions:B.useCallback((r,o,a)=>{if(!e||!o||!r)return;const u=c=>{t(c),a(c)};switch(o){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Ir=()=>{const e=B.useContext(g1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},pk=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=tr(),{entryType:o}=er(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Wo(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Ir(),{getCopilotSuggestions:_}=E1();B.useEffect(()=>{!e||!o||!t||!r||n.requestId||o==="ask_cim"&&_({},o,N=>{c({requestId:N.id,message:null})})},[e,t,n.requestId,o,r,_,c]);const S=B.useCallback(({query:N})=>{if(!e||!N)return;const{facetFilters:k}=Tt.facetFiltersProxy,{rangeFilters:H}=Tt.rangeFiltersProxy,{catalogSegment:V}=Tt.catalogSegmentProxy,{pricebooks:F}=Tt.pricebooksProxy,q={query:N};q.facetFilters=k||{},q.rangeFilters=H||[],q.catalogSegment=V||"",q.pricebooks=F||[],d(M({},q))},[e,d]),A=B.useCallback(({categoryId:N})=>{if(!e)return;const k=ut.categoryIdProxy.categoryName,{facetFilters:H}=ut.facetFiltersProxy,{rangeFilters:V}=ut.rangeFiltersProxy,{catalogSegment:F}=ut.catalogSegmentProxy,{pricebooks:q}=ut.pricebooksProxy,ie={categoryId:N};ie.categoryName=k||"",ie.facetFilters=H||{},ie.rangeFilters=V||[],ie.catalogSegment=F||"",ie.pricebooks=q||[],f(M({},ie))},[e,f]),C=B.useCallback(({productId:N})=>{if(!e||!N)return;const k={productId:N,pdpLink:mr.pdpLink,productName:mr.proxy.productName||""};p(k)},[e,p]);return B.useEffect(()=>{const N=({detail:k})=>{(k==null?void 0:k.property)==="query"&&S({query:k.value})};return Ug(N),()=>{Hg(N)}},[S]),B.useEffect(()=>{const N=({detail:k})=>{if((k==null?void 0:k.property)==="pdp-context"){const H=k.value;C({productId:H.productId});return}(k==null?void 0:k.property)==="productId"&&C({productId:k.value})};return $g(N),()=>{Vg(N)}},[C]),B.useEffect(()=>{const N=({detail:k})=>{(k==null?void 0:k.property)==="categoryId"&&A({categoryId:k.value})};return zg(N),()=>{jg(N)}},[A]),B.useEffect(()=>{const N=({detail:k})=>{if((k==null?void 0:k.event)==wi.RESET_CONVERSATION&&m(),(k==null?void 0:k.event)==wi.GET_SESSION_INFORMATION){const H=k.value.callback;T(H)}if((k==null?void 0:k.event)==wi.GET_CONVERSATION_MESSAGES){const{payload:H,callback:V}=k.value;if(!H.conversationId||typeof V!="function")return;y(H,V)}if((k==null?void 0:k.event)==wi.LOAD_CONVERSATION){const H=k.value;if(!H.conversationId)return;y(H,F=>{a(),F.forEach(q=>{u(q)})})}};return Nv(N),()=>{Ov(N)}},[m,T,y,a,u]),null},mk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>w.jsxs(hk,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:[w.jsx(pk,{}),f]}),gk=({children:e,dispatch:t})=>{const n=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),o=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),T=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=B.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,o,a,u,c,d,f,p,m,T]);return w.jsx(m1.Provider,{value:y,children:e})},Ek=(e,t)=>{const{type:n,payload:r}=t;switch(n){case gt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case gt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case gt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case gt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case gt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case gt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case gt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case gt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},yk=({promptsConfig:e,children:t})=>{const[n,r]=eg(Ek,M(M({},r1),e||{}));return w.jsx(p1.Provider,{value:n,children:w.jsx(gk,{dispatch:r,children:t})})},y1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,theme:f,openLinksInNewTab:p,globalClassName:m,isDevelopment:T=!1,componentType:y,componentConfig:_,entryType:S,entryMessage:A,disclaimerText:C,disclaimerMarkdown:N,clientContext:k,baseCatalogParams:H,searchPlaceholder:V,searchButtonLabel:F,searchConfig:q,suggestionButtonConfig:ie,messageAlignment:ge,autoScroll:$,promptsConfig:oe,resetConversationMessage:ce,conversationHistory:fe,onConnect:te,onCopilotEvent:be,onRefinedSearch:ve,onRefinedBrowse:se,__features:Q,children:re})=>w.jsx(lv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:o,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,entryMessage:A,theme:f,globalClassName:m,openLinksInNewTab:p,searchPlaceholder:V,searchButtonLabel:F,searchConfig:q,suggestionButtonConfig:ie,messageAlignment:ge,autoScroll:$,componentConfig:_,clientContext:k,baseCatalogParams:H,disclaimerMarkdown:N,disclaimerText:C,resetConversationMessage:ce,conversationHistory:fe,isDevelopment:T,__features:Q,children:w.jsx(dk,{entryType:S,componentConfig:_,componentType:y,children:w.jsx(yv,{onCopilotEvent:be,children:w.jsx(lk,{children:w.jsx(rk,{children:w.jsx(sk,{children:w.jsx(yk,{promptsConfig:oe,children:w.jsx(mk,{apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,isDevelopment:T,entryType:S,onConnect:te,onRefinedSearch:ve,onRefinedBrowse:se,onCopilotEvent:be,children:re})})})})})})})});var kf={exports:{}},kn={},Pf={exports:{}},Nf={};var b1;function bk(){return b1||(b1=1,(function(e){function t(Q,re){var v=Q.length;Q.push(re);e:for(;0<v;){var D=v-1>>>1,ee=Q[D];if(0<o(ee,re))Q[D]=re,Q[v]=ee,v=D;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var re=Q[0],v=Q.pop();if(v!==re){Q[0]=v;e:for(var D=0,ee=Q.length,O=ee>>>1;D<O;){var _e=2*(D+1)-1,De=Q[_e],Pe=_e+1,ze=Q[Pe];if(0>o(De,v))Pe<ee&&0>o(ze,De)?(Q[D]=ze,Q[Pe]=v,D=Pe):(Q[D]=De,Q[_e]=v,D=_e);else if(Pe<ee&&0>o(ze,v))Q[D]=ze,Q[Pe]=v,D=Pe;else break e}}return re}function o(Q,re){var v=Q.sortIndex-re.sortIndex;return v!==0?v:Q.id-re.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,_=!1,S=!1,A=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(Q){for(var re=n(f);re!==null;){if(re.callback===null)r(f);else if(re.startTime<=Q)r(f),re.sortIndex=re.expirationTime,t(d,re);else break;re=n(f)}}function H(Q){if(S=!1,k(Q),!_)if(n(d)!==null)_=!0,ve(V);else{var re=n(f);re!==null&&se(H,re.startTime-Q)}}function V(Q,re){_=!1,S&&(S=!1,C(ie),ie=-1),y=!0;var v=T;try{for(k(re),m=n(d);m!==null&&(!(m.expirationTime>re)||Q&&!oe());){var D=m.callback;if(typeof D=="function"){m.callback=null,T=m.priorityLevel;var ee=D(m.expirationTime<=re);re=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===n(d)&&r(d),k(re)}else r(d);m=n(d)}if(m!==null)var O=!0;else{var _e=n(f);_e!==null&&se(H,_e.startTime-re),O=!1}return O}finally{m=null,T=v,y=!1}}var F=!1,q=null,ie=-1,ge=5,$=-1;function oe(){return!(e.unstable_now()-$<ge)}function ce(){if(q!==null){var Q=e.unstable_now();$=Q;var re=!0;try{re=q(!0,Q)}finally{re?fe():(F=!1,q=null)}}else F=!1}var fe;if(typeof N=="function")fe=function(){N(ce)};else if(typeof MessageChannel!="undefined"){var te=new MessageChannel,be=te.port2;te.port1.onmessage=ce,fe=function(){be.postMessage(null)}}else fe=function(){A(ce,0)};function ve(Q){q=Q,F||(F=!0,fe())}function se(Q,re){ie=A(function(){Q(e.unstable_now())},re)}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(){_||y||(_=!0,ve(V))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ge=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 re=3;break;default:re=T}var v=T;T=re;try{return Q()}finally{T=v}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,re){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var v=T;T=Q;try{return re()}finally{T=v}},e.unstable_scheduleCallback=function(Q,re,v){var D=e.unstable_now();switch(typeof v=="object"&&v!==null?(v=v.delay,v=typeof v=="number"&&0<v?D+v:D):v=D,Q){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=v+ee,Q={id:p++,callback:re,priorityLevel:Q,startTime:v,expirationTime:ee,sortIndex:-1},v>D?(Q.sortIndex=v,t(f,Q),n(d)===null&&Q===n(f)&&(S?(C(ie),ie=-1):S=!0,se(H,v-D))):(Q.sortIndex=ee,t(d,Q),_||y||(_=!0,ve(V))),Q},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(Q){var re=T;return function(){var v=T;T=re;try{return Q.apply(this,arguments)}finally{T=v}}}})(Nf)),Nf}var T1;function Tk(){return T1||(T1=1,Pf.exports=bk()),Pf.exports}var _1;function _k(){if(_1)return kn;_1=1;var e=Fo(),t=Tk();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,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,s,l,h){if(l!==null&&l.type===0)return!1;switch(typeof s){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 _(i,s,l,h){if(s===null||typeof s=="undefined"||y(i,s,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function S(i,s,l,h,E,b,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=x}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];A[s]=new S(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new S(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function N(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(C,N);A[s]=new S(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(C,N);A[s]=new S(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(C,N);A[s]=new S(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function k(i,s,l,h){var E=A.hasOwnProperty(s)?A[s]:null;(E!==null?E.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,E,h)&&(l=null),h||E===null?T(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(s=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(s):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,s,l):i.setAttribute(s,l))))}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,V=Symbol.for("react.element"),F=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),oe=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),ve=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),Q=Symbol.iterator;function re(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var v=Object.assign,D;function ee(i){if(D===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);D=s&&s[1]||""}return`
11
11
  `+D+i}var O=!1;function _e(i,s){if(!i||O)return"";O=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(Z){var h=Z}Reflect.construct(i,[],s)}else{try{s.call()}catch(Z){h=Z}i.call(s.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(`
12
12
  `),b=h.stack.split(`
13
13
  `),x=E.length-1,R=b.length-1;1<=x&&0<=R&&E[x]!==b[R];)R--;for(;1<=x&&0<=R;x--,R--)if(E[x]!==b[R]){if(x!==1||R!==1)do if(x--,R--,0>R||E[x]!==b[R]){var U=`
14
- `+E[x].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=x&&0<=R);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?te(i):""}function De(i){switch(i.tag){case 5:return te(i.type);case 16:return te("Lazy");case 13:return te("Suspense");case 19:return te("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function ke(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 q:return"Fragment";case B:return"Portal";case me:return"Profiler";case ie:return"StrictMode";case le:return"Suspense";case ne:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case oe:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case de:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case Te:return s=i.displayName||null,s!==null?s:ke(i.type)||"Memo";case Oe:s=i._payload,i=i._init;try{return ke(i(s))}catch(l){}}return null}function ze(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ke(s);case 8:return s===ie?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function xe(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ye(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ft(i){var s=Ye(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,b=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(x){h=""+x,b.call(this,x)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function on(i){i._valueTracker||(i._valueTracker=ft(i))}function $r(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return i&&(h=Ye(i)?i.checked?"true":"false":i.value),i=h,i!==l?(s.setValue(i),!0):!1}function Vr(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function Rn(i,s){var l=s.checked;return C({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Ri(i,s){var l=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;l=xe(s.value!=null?s.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Li(i,s){s=s.checked,s!=null&&k(i,"checked",s,!1)}function di(i,s){Li(i,s);var l=xe(s.value),h=s.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}s.hasOwnProperty("value")?fi(i,s.type,l):s.hasOwnProperty("defaultValue")&&fi(i,s.type,xe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Ps(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var h=s.type;if(!(h!=="submit"&&h!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function fi(i,s,l){(s!=="number"||Vr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Tr=Array.isArray;function Ce(i,s,l,h){if(i=i.options,s){s={};for(var E=0;E<l.length;E++)s["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=s.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+xe(l),s=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function Me(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return C({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Be(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(Tr(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:xe(l)}}function rt(i,s){var l=xe(s.value),h=xe(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function pt(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function J(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 ge(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?J(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ae,qe=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(s,l,h,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Ae=Ae||document.createElement("div"),Ae.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ae.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Re(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var lt={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},Yt=["Webkit","ms","Moz","O"];Object.keys(lt).forEach(function(i){Yt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),lt[s]=lt[i]})});function jt(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||lt.hasOwnProperty(i)&&lt[i]?(""+s).trim():s+"px"}function sn(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=jt(l,s[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var qr=C({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function an(i,s){if(s){if(qr[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Yr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qn=null;function Pp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Np=null,Ns=null,Os=null;function eS(i){if(i=Au(i)){if(typeof Np!="function")throw Error(n(280));var s=i.stateNode;s&&(s=zc(s),Np(i.stateNode,i.type,s))}}function tS(i){Ns?Os?Os.push(i):Os=[i]:Ns=i}function nS(){if(Ns){var i=Ns,s=Os;if(Os=Ns=null,eS(i),s)for(i=0;i<s.length;i++)eS(s[i])}}function rS(i,s){return i(s)}function iS(){}var Op=!1;function oS(i,s,l){if(Op)return i(s,l);Op=!0;try{return rS(i,s,l)}finally{Op=!1,(Ns!==null||Os!==null)&&(iS(),nS())}}function ou(i,s){var l=i.stateNode;if(l===null)return null;var h=zc(l);if(h===null)return null;l=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(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,s,typeof l));return l}var Ip=!1;if(c)try{var su={};Object.defineProperty(su,"passive",{get:function(){Ip=!0}}),window.addEventListener("test",su,su),window.removeEventListener("test",su,su)}catch(i){Ip=!1}function D9(i,s,l,h,E,b,x,R,U){var Z=Array.prototype.slice.call(arguments,3);try{s.apply(l,Z)}catch(ce){this.onError(ce)}}var au=!1,bc=null,Tc=!1,Rp=null,M9={onError:function(i){au=!0,bc=i}};function F9(i,s,l,h,E,b,x,R,U){au=!1,bc=null,D9.apply(M9,arguments)}function B9(i,s,l,h,E,b,x,R,U){if(F9.apply(this,arguments),au){if(au){var Z=bc;au=!1,bc=null}else throw Error(n(198));Tc||(Tc=!0,Rp=Z)}}function wo(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function sS(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function aS(i){if(wo(i)!==i)throw Error(n(188))}function U9(i){var s=i.alternate;if(!s){if(s=wo(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,h=s;;){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 aS(E),i;if(b===h)return aS(E),s;b=b.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=b;else{for(var x=!1,R=E.child;R;){if(R===l){x=!0,l=E,h=b;break}if(R===h){x=!0,h=E,l=b;break}R=R.sibling}if(!x){for(R=b.child;R;){if(R===l){x=!0,l=b,h=E;break}if(R===h){x=!0,h=b,l=E;break}R=R.sibling}if(!x)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:s}function uS(i){return i=U9(i),i!==null?lS(i):null}function lS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=lS(i);if(s!==null)return s;i=i.sibling}return null}var cS=t.unstable_scheduleCallback,dS=t.unstable_cancelCallback,H9=t.unstable_shouldYield,z9=t.unstable_requestPaint,Mt=t.unstable_now,j9=t.unstable_getCurrentPriorityLevel,Lp=t.unstable_ImmediatePriority,fS=t.unstable_UserBlockingPriority,_c=t.unstable_NormalPriority,$9=t.unstable_LowPriority,hS=t.unstable_IdlePriority,Sc=null,Wr=null;function V9(i){if(Wr&&typeof Wr.onCommitFiberRoot=="function")try{Wr.onCommitFiberRoot(Sc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var _r=Math.clz32?Math.clz32:W9,q9=Math.log,Y9=Math.LN2;function W9(i){return i>>>=0,i===0?32:31-(q9(i)/Y9|0)|0}var xc=64,wc=4194304;function uu(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 Cc(i,s){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,x=l&268435455;if(x!==0){var R=x&~E;R!==0?h=uu(R):(b&=x,b!==0&&(h=uu(b)))}else x=l&~E,x!==0?h=uu(x):b!==0&&(h=uu(b));if(h===0)return 0;if(s!==0&&s!==h&&(s&E)===0&&(E=h&-h,b=s&-s,E>=b||E===16&&(b&4194240)!==0))return s;if((h&4)!==0&&(h|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=h;0<s;)l=31-_r(s),E=1<<l,h|=i[l],s&=~E;return h}function G9(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function X9(i,s){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var x=31-_r(b),R=1<<x,U=E[x];U===-1?((R&l)===0||(R&h)!==0)&&(E[x]=G9(R,s)):U<=s&&(i.expiredLanes|=R),b&=~R}}function Dp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function pS(){var i=xc;return xc<<=1,(xc&4194240)===0&&(xc=64),i}function Mp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function lu(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-_r(s),i[s]=l}function K9(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-_r(l),b=1<<E;s[E]=0,h[E]=-1,i[E]=-1,l&=~b}}function Fp(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var h=31-_r(l),E=1<<h;E&s|i[h]&s&&(i[h]|=s),l&=~E}}var ct=0;function mS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var gS,Bp,ES,yS,bS,Up=!1,Ac=[],Di=null,Mi=null,Fi=null,cu=new Map,du=new Map,Bi=[],Q9="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 TS(i,s){switch(i){case"focusin":case"focusout":Di=null;break;case"dragenter":case"dragleave":Mi=null;break;case"mouseover":case"mouseout":Fi=null;break;case"pointerover":case"pointerout":cu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":du.delete(s.pointerId)}}function fu(i,s,l,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},s!==null&&(s=Au(s),s!==null&&Bp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function J9(i,s,l,h,E){switch(s){case"focusin":return Di=fu(Di,i,s,l,h,E),!0;case"dragenter":return Mi=fu(Mi,i,s,l,h,E),!0;case"mouseover":return Fi=fu(Fi,i,s,l,h,E),!0;case"pointerover":var b=E.pointerId;return cu.set(b,fu(cu.get(b)||null,i,s,l,h,E)),!0;case"gotpointercapture":return b=E.pointerId,du.set(b,fu(du.get(b)||null,i,s,l,h,E)),!0}return!1}function _S(i){var s=Co(i.target);if(s!==null){var l=wo(s);if(l!==null){if(s=l.tag,s===13){if(s=sS(l),s!==null){i.blockedOn=s,bS(i.priority,function(){ES(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function vc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=zp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);qn=h,l.target.dispatchEvent(h),qn=null}else return s=Au(l),s!==null&&Bp(s),i.blockedOn=l,!1;s.shift()}return!0}function SS(i,s,l){vc(i)&&l.delete(s)}function Z9(){Up=!1,Di!==null&&vc(Di)&&(Di=null),Mi!==null&&vc(Mi)&&(Mi=null),Fi!==null&&vc(Fi)&&(Fi=null),cu.forEach(SS),du.forEach(SS)}function hu(i,s){i.blockedOn===s&&(i.blockedOn=null,Up||(Up=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Z9)))}function pu(i){function s(E){return hu(E,i)}if(0<Ac.length){hu(Ac[0],i);for(var l=1;l<Ac.length;l++){var h=Ac[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Di!==null&&hu(Di,i),Mi!==null&&hu(Mi,i),Fi!==null&&hu(Fi,i),cu.forEach(s),du.forEach(s),l=0;l<Bi.length;l++)h=Bi[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Bi.length&&(l=Bi[0],l.blockedOn===null);)_S(l),l.blockedOn===null&&Bi.shift()}var Is=H.ReactCurrentBatchConfig,kc=!0;function eB(i,s,l,h){var E=ct,b=Is.transition;Is.transition=null;try{ct=1,Hp(i,s,l,h)}finally{ct=E,Is.transition=b}}function tB(i,s,l,h){var E=ct,b=Is.transition;Is.transition=null;try{ct=4,Hp(i,s,l,h)}finally{ct=E,Is.transition=b}}function Hp(i,s,l,h){if(kc){var E=zp(i,s,l,h);if(E===null)im(i,s,h,Pc,l),TS(i,h);else if(J9(E,i,s,l,h))h.stopPropagation();else if(TS(i,h),s&4&&-1<Q9.indexOf(i)){for(;E!==null;){var b=Au(E);if(b!==null&&gS(b),b=zp(i,s,l,h),b===null&&im(i,s,h,Pc,l),b===E)break;E=b}E!==null&&h.stopPropagation()}else im(i,s,h,null,l)}}var Pc=null;function zp(i,s,l,h){if(Pc=null,i=Pp(h),i=Co(i),i!==null)if(s=wo(i),s===null)i=null;else if(l=s.tag,l===13){if(i=sS(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Pc=i,null}function xS(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(j9()){case Lp:return 1;case fS:return 4;case _c:case $9:return 16;case hS:return 536870912;default:return 16}default:return 16}}var Ui=null,jp=null,Nc=null;function wS(){if(Nc)return Nc;var i,s=jp,l=s.length,h,E="value"in Ui?Ui.value:Ui.textContent,b=E.length;for(i=0;i<l&&s[i]===E[i];i++);var x=l-i;for(h=1;h<=x&&s[l-h]===E[b-h];h++);return Nc=E.slice(i,1<h?1-h:void 0)}function Oc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Ic(){return!0}function CS(){return!1}function Yn(i){function s(l,h,E,b,x){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=x,this.currentTarget=null;for(var R in i)i.hasOwnProperty(R)&&(l=i[R],this[R]=l?l(b):b[R]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Ic:CS,this.isPropagationStopped=CS,this}return C(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ic)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ic)},persist:function(){},isPersistent:Ic}),s}var Rs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$p=Yn(Rs),mu=C({},Rs,{view:0,detail:0}),nB=Yn(mu),Vp,qp,gu,Rc=C({},mu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wp,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!==gu&&(gu&&i.type==="mousemove"?(Vp=i.screenX-gu.screenX,qp=i.screenY-gu.screenY):qp=Vp=0,gu=i),Vp)},movementY:function(i){return"movementY"in i?i.movementY:qp}}),AS=Yn(Rc),rB=C({},Rc,{dataTransfer:0}),iB=Yn(rB),oB=C({},mu,{relatedTarget:0}),Yp=Yn(oB),sB=C({},Rs,{animationName:0,elapsedTime:0,pseudoElement:0}),aB=Yn(sB),uB=C({},Rs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),lB=Yn(uB),cB=C({},Rs,{data:0}),vS=Yn(cB),dB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fB={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"},hB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pB(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=hB[i])?!!s[i]:!1}function Wp(){return pB}var mB=C({},mu,{key:function(i){if(i.key){var s=dB[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Oc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?fB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wp,charCode:function(i){return i.type==="keypress"?Oc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Oc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),gB=Yn(mB),EB=C({},Rc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kS=Yn(EB),yB=C({},mu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wp}),bB=Yn(yB),TB=C({},Rs,{propertyName:0,elapsedTime:0,pseudoElement:0}),_B=Yn(TB),SB=C({},Rc,{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}),xB=Yn(SB),wB=[9,13,27,32],Gp=c&&"CompositionEvent"in window,Eu=null;c&&"documentMode"in document&&(Eu=document.documentMode);var CB=c&&"TextEvent"in window&&!Eu,PS=c&&(!Gp||Eu&&8<Eu&&11>=Eu),NS=" ",OS=!1;function IS(i,s){switch(i){case"keyup":return wB.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function RS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ls=!1;function AB(i,s){switch(i){case"compositionend":return RS(s);case"keypress":return s.which!==32?null:(OS=!0,NS);case"textInput":return i=s.data,i===NS&&OS?null:i;default:return null}}function vB(i,s){if(Ls)return i==="compositionend"||!Gp&&IS(i,s)?(i=wS(),Nc=jp=Ui=null,Ls=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return PS&&s.locale!=="ko"?null:s.data;default:return null}}var kB={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 LS(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!kB[i.type]:s==="textarea"}function DS(i,s,l,h){tS(h),s=Bc(s,"onChange"),0<s.length&&(l=new $p("onChange","change",null,l,h),i.push({event:l,listeners:s}))}var yu=null,bu=null;function PB(i){ZS(i,0)}function Lc(i){var s=Us(i);if($r(s))return i}function NB(i,s){if(i==="change")return s}var MS=!1;if(c){var Xp;if(c){var Kp="oninput"in document;if(!Kp){var FS=document.createElement("div");FS.setAttribute("oninput","return;"),Kp=typeof FS.oninput=="function"}Xp=Kp}else Xp=!1;MS=Xp&&(!document.documentMode||9<document.documentMode)}function BS(){yu&&(yu.detachEvent("onpropertychange",US),bu=yu=null)}function US(i){if(i.propertyName==="value"&&Lc(bu)){var s=[];DS(s,bu,i,Pp(i)),oS(PB,s)}}function OB(i,s,l){i==="focusin"?(BS(),yu=s,bu=l,yu.attachEvent("onpropertychange",US)):i==="focusout"&&BS()}function IB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Lc(bu)}function RB(i,s){if(i==="click")return Lc(s)}function LB(i,s){if(i==="input"||i==="change")return Lc(s)}function DB(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Sr=typeof Object.is=="function"?Object.is:DB;function Tu(i,s){if(Sr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(s,E)||!Sr(i[E],s[E]))return!1}return!0}function HS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function zS(i,s){var l=HS(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=s&&h>=s)return{node:l,offset:s-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=HS(l)}}function jS(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?jS(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function $S(){for(var i=window,s=Vr();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=s.contentWindow;else break;s=Vr(i.document)}return s}function Qp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function MB(i){var s=$S(),l=i.focusedElem,h=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&jS(l.ownerDocument.documentElement,l)){if(h!==null&&Qp(l)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,b=Math.min(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=zS(l,b);var x=zS(l,h);E&&x&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var FB=c&&"documentMode"in document&&11>=document.documentMode,Ds=null,Jp=null,_u=null,Zp=!1;function VS(i,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Zp||Ds==null||Ds!==Vr(h)||(h=Ds,"selectionStart"in h&&Qp(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}),_u&&Tu(_u,h)||(_u=h,h=Bc(Jp,"onSelect"),0<h.length&&(s=new $p("onSelect","select",null,s,l),i.push({event:s,listeners:h}),s.target=Ds)))}function Dc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var Ms={animationend:Dc("Animation","AnimationEnd"),animationiteration:Dc("Animation","AnimationIteration"),animationstart:Dc("Animation","AnimationStart"),transitionend:Dc("Transition","TransitionEnd")},em={},qS={};c&&(qS=document.createElement("div").style,"AnimationEvent"in window||(delete Ms.animationend.animation,delete Ms.animationiteration.animation,delete Ms.animationstart.animation),"TransitionEvent"in window||delete Ms.transitionend.transition);function Mc(i){if(em[i])return em[i];if(!Ms[i])return i;var s=Ms[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in qS)return em[i]=s[l];return i}var YS=Mc("animationend"),WS=Mc("animationiteration"),GS=Mc("animationstart"),XS=Mc("transitionend"),KS=new Map,QS="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 Hi(i,s){KS.set(i,s),a(s,[i])}for(var tm=0;tm<QS.length;tm++){var nm=QS[tm],BB=nm.toLowerCase(),UB=nm[0].toUpperCase()+nm.slice(1);Hi(BB,"on"+UB)}Hi(YS,"onAnimationEnd"),Hi(WS,"onAnimationIteration"),Hi(GS,"onAnimationStart"),Hi("dblclick","onDoubleClick"),Hi("focusin","onFocus"),Hi("focusout","onBlur"),Hi(XS,"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 Su="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),HB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Su));function JS(i,s,l){var h=i.type||"unknown-event";i.currentTarget=l,B9(h,s,void 0,i),i.currentTarget=null}function ZS(i,s){s=(s&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(s)for(var x=h.length-1;0<=x;x--){var R=h[x],U=R.instance,Z=R.currentTarget;if(R=R.listener,U!==b&&E.isPropagationStopped())break e;JS(E,R,Z),b=U}else for(x=0;x<h.length;x++){if(R=h[x],U=R.instance,Z=R.currentTarget,R=R.listener,U!==b&&E.isPropagationStopped())break e;JS(E,R,Z),b=U}}}if(Tc)throw i=Rp,Tc=!1,Rp=null,i}function _t(i,s){var l=s[cm];l===void 0&&(l=s[cm]=new Set);var h=i+"__bubble";l.has(h)||(ex(s,i,2,!1),l.add(h))}function rm(i,s,l){var h=0;s&&(h|=4),ex(l,i,h,s)}var Fc="_reactListening"+Math.random().toString(36).slice(2);function xu(i){if(!i[Fc]){i[Fc]=!0,r.forEach(function(l){l!=="selectionchange"&&(HB.has(l)||rm(l,!1,i),rm(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Fc]||(s[Fc]=!0,rm("selectionchange",!1,s))}}function ex(i,s,l,h){switch(xS(s)){case 1:var E=eB;break;case 4:E=tB;break;default:E=Hp}l=E.bind(null,s,l,i),E=void 0,!Ip||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(s,l,{capture:!0,passive:E}):i.addEventListener(s,l,!0):E!==void 0?i.addEventListener(s,l,{passive:E}):i.addEventListener(s,l,!1)}function im(i,s,l,h,E){var b=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var R=h.stateNode.containerInfo;if(R===E||R.nodeType===8&&R.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var U=x.tag;if((U===3||U===4)&&(U=x.stateNode.containerInfo,U===E||U.nodeType===8&&U.parentNode===E))return;x=x.return}for(;R!==null;){if(x=Co(R),x===null)return;if(U=x.tag,U===5||U===6){h=b=x;continue e}R=R.parentNode}}h=h.return}oS(function(){var Z=b,ce=Pp(l),he=[];e:{var se=KS.get(i);if(se!==void 0){var we=$p,Pe=i;switch(i){case"keypress":if(Oc(l)===0)break e;case"keydown":case"keyup":we=gB;break;case"focusin":Pe="focus",we=Yp;break;case"focusout":Pe="blur",we=Yp;break;case"beforeblur":case"afterblur":we=Yp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=AS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=iB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=bB;break;case YS:case WS:case GS:we=aB;break;case XS:we=_B;break;case"scroll":we=nB;break;case"wheel":we=xB;break;case"copy":case"cut":case"paste":we=lB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=kS}var Ie=(s&4)!==0,Ft=!Ie&&i==="scroll",Y=Ie?se!==null?se+"Capture":null:se;Ie=[];for(var z=Z,K;z!==null;){K=z;var be=K.stateNode;if(K.tag===5&&be!==null&&(K=be,Y!==null&&(be=ou(z,Y),be!=null&&Ie.push(wu(z,be,K)))),Ft)break;z=z.return}0<Ie.length&&(se=new we(se,Pe,null,l,ce),he.push({event:se,listeners:Ie}))}}if((s&7)===0){e:{if(se=i==="mouseover"||i==="pointerover",we=i==="mouseout"||i==="pointerout",se&&l!==qn&&(Pe=l.relatedTarget||l.fromElement)&&(Co(Pe)||Pe[hi]))break e;if((we||se)&&(se=ce.window===ce?ce:(se=ce.ownerDocument)?se.defaultView||se.parentWindow:window,we?(Pe=l.relatedTarget||l.toElement,we=Z,Pe=Pe?Co(Pe):null,Pe!==null&&(Ft=wo(Pe),Pe!==Ft||Pe.tag!==5&&Pe.tag!==6)&&(Pe=null)):(we=null,Pe=Z),we!==Pe)){if(Ie=AS,be="onMouseLeave",Y="onMouseEnter",z="mouse",(i==="pointerout"||i==="pointerover")&&(Ie=kS,be="onPointerLeave",Y="onPointerEnter",z="pointer"),Ft=we==null?se:Us(we),K=Pe==null?se:Us(Pe),se=new Ie(be,z+"leave",we,l,ce),se.target=Ft,se.relatedTarget=K,be=null,Co(ce)===Z&&(Ie=new Ie(Y,z+"enter",Pe,l,ce),Ie.target=K,Ie.relatedTarget=Ft,be=Ie),Ft=be,we&&Pe)t:{for(Ie=we,Y=Pe,z=0,K=Ie;K;K=Fs(K))z++;for(K=0,be=Y;be;be=Fs(be))K++;for(;0<z-K;)Ie=Fs(Ie),z--;for(;0<K-z;)Y=Fs(Y),K--;for(;z--;){if(Ie===Y||Y!==null&&Ie===Y.alternate)break t;Ie=Fs(Ie),Y=Fs(Y)}Ie=null}else Ie=null;we!==null&&tx(he,se,we,Ie,!1),Pe!==null&&Ft!==null&&tx(he,Ft,Pe,Ie,!0)}}e:{if(se=Z?Us(Z):window,we=se.nodeName&&se.nodeName.toLowerCase(),we==="select"||we==="input"&&se.type==="file")var Le=NB;else if(LS(se))if(MS)Le=LB;else{Le=IB;var je=OB}else(we=se.nodeName)&&we.toLowerCase()==="input"&&(se.type==="checkbox"||se.type==="radio")&&(Le=RB);if(Le&&(Le=Le(i,Z))){DS(he,Le,l,ce);break e}je&&je(i,se,Z),i==="focusout"&&(je=se._wrapperState)&&je.controlled&&se.type==="number"&&fi(se,"number",se.value)}switch(je=Z?Us(Z):window,i){case"focusin":(LS(je)||je.contentEditable==="true")&&(Ds=je,Jp=Z,_u=null);break;case"focusout":_u=Jp=Ds=null;break;case"mousedown":Zp=!0;break;case"contextmenu":case"mouseup":case"dragend":Zp=!1,VS(he,l,ce);break;case"selectionchange":if(FB)break;case"keydown":case"keyup":VS(he,l,ce)}var $e;if(Gp)e:{switch(i){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else Ls?IS(i,l)&&(We="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(We="onCompositionStart");We&&(PS&&l.locale!=="ko"&&(Ls||We!=="onCompositionStart"?We==="onCompositionEnd"&&Ls&&($e=wS()):(Ui=ce,jp="value"in Ui?Ui.value:Ui.textContent,Ls=!0)),je=Bc(Z,We),0<je.length&&(We=new vS(We,i,null,l,ce),he.push({event:We,listeners:je}),$e?We.data=$e:($e=RS(l),$e!==null&&(We.data=$e)))),($e=CB?AB(i,l):vB(i,l))&&(Z=Bc(Z,"onBeforeInput"),0<Z.length&&(ce=new vS("onBeforeInput","beforeinput",null,l,ce),he.push({event:ce,listeners:Z}),ce.data=$e))}ZS(he,s)})}function wu(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Bc(i,s){for(var l=s+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=ou(i,l),b!=null&&h.unshift(wu(i,b,E)),b=ou(i,s),b!=null&&h.push(wu(i,b,E))),i=i.return}return h}function Fs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function tx(i,s,l,h,E){for(var b=s._reactName,x=[];l!==null&&l!==h;){var R=l,U=R.alternate,Z=R.stateNode;if(U!==null&&U===h)break;R.tag===5&&Z!==null&&(R=Z,E?(U=ou(l,b),U!=null&&x.unshift(wu(l,U,R))):E||(U=ou(l,b),U!=null&&x.push(wu(l,U,R)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var zB=/\r\n?/g,jB=/\u0000|\uFFFD/g;function nx(i){return(typeof i=="string"?i:""+i).replace(zB,`
15
- `).replace(jB,"")}function Uc(i,s,l){if(s=nx(s),nx(i)!==s&&l)throw Error(n(425))}function Hc(){}var om=null,sm=null;function am(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var um=typeof setTimeout=="function"?setTimeout:void 0,$B=typeof clearTimeout=="function"?clearTimeout:void 0,rx=typeof Promise=="function"?Promise:void 0,VB=typeof queueMicrotask=="function"?queueMicrotask:typeof rx!="undefined"?function(i){return rx.resolve(null).then(i).catch(qB)}:um;function qB(i){setTimeout(function(){throw i})}function lm(i,s){var l=s,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),pu(s);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);pu(s)}function zi(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function ix(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var Bs=Math.random().toString(36).slice(2),Gr="__reactFiber$"+Bs,Cu="__reactProps$"+Bs,hi="__reactContainer$"+Bs,cm="__reactEvents$"+Bs,YB="__reactListeners$"+Bs,WB="__reactHandles$"+Bs;function Co(i){var s=i[Gr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[hi]||l[Gr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=ix(i);i!==null;){if(l=i[Gr])return l;i=ix(i)}return s}i=l,l=i.parentNode}return null}function Au(i){return i=i[Gr]||i[hi],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Us(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function zc(i){return i[Cu]||null}var dm=[],Hs=-1;function ji(i){return{current:i}}function St(i){0>Hs||(i.current=dm[Hs],dm[Hs]=null,Hs--)}function bt(i,s){Hs++,dm[Hs]=i.current,i.current=s}var $i={},En=ji($i),Ln=ji(!1),Ao=$i;function zs(i,s){var l=i.type.contextTypes;if(!l)return $i;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in l)E[b]=s[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function Dn(i){return i=i.childContextTypes,i!=null}function jc(){St(Ln),St(En)}function ox(i,s,l){if(En.current!==$i)throw Error(n(168));bt(En,s),bt(Ln,l)}function sx(i,s,l){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in s))throw Error(n(108,ze(i)||"Unknown",E));return C({},l,h)}function $c(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||$i,Ao=En.current,bt(En,i),bt(Ln,Ln.current),!0}function ax(i,s,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=sx(i,s,Ao),h.__reactInternalMemoizedMergedChildContext=i,St(Ln),St(En),bt(En,i)):St(Ln),bt(Ln,l)}var pi=null,Vc=!1,fm=!1;function ux(i){pi===null?pi=[i]:pi.push(i)}function GB(i){Vc=!0,ux(i)}function Vi(){if(!fm&&pi!==null){fm=!0;var i=0,s=ct;try{var l=pi;for(ct=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}pi=null,Vc=!1}catch(E){throw pi!==null&&(pi=pi.slice(i+1)),cS(Lp,Vi),E}finally{ct=s,fm=!1}}return null}var js=[],$s=0,qc=null,Yc=0,or=[],sr=0,vo=null,mi=1,gi="";function ko(i,s){js[$s++]=Yc,js[$s++]=qc,qc=i,Yc=s}function lx(i,s,l){or[sr++]=mi,or[sr++]=gi,or[sr++]=vo,vo=i;var h=mi;i=gi;var E=32-_r(h)-1;h&=~(1<<E),l+=1;var b=32-_r(s)+E;if(30<b){var x=E-E%5;b=(h&(1<<x)-1).toString(32),h>>=x,E-=x,mi=1<<32-_r(s)+E|l<<E|h,gi=b+i}else mi=1<<b|l<<E|h,gi=i}function hm(i){i.return!==null&&(ko(i,1),lx(i,1,0))}function pm(i){for(;i===qc;)qc=js[--$s],js[$s]=null,Yc=js[--$s],js[$s]=null;for(;i===vo;)vo=or[--sr],or[sr]=null,gi=or[--sr],or[sr]=null,mi=or[--sr],or[sr]=null}var Wn=null,Gn=null,At=!1,xr=null;function cx(i,s){var l=cr(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function dx(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Wn=i,Gn=zi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Wn=i,Gn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=vo!==null?{id:mi,overflow:gi}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=cr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Wn=i,Gn=null,!0):!1;default:return!1}}function mm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function gm(i){if(At){var s=Gn;if(s){var l=s;if(!dx(i,s)){if(mm(i))throw Error(n(418));s=zi(l.nextSibling);var h=Wn;s&&dx(i,s)?cx(h,l):(i.flags=i.flags&-4097|2,At=!1,Wn=i)}}else{if(mm(i))throw Error(n(418));i.flags=i.flags&-4097|2,At=!1,Wn=i}}}function fx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Wn=i}function Wc(i){if(i!==Wn)return!1;if(!At)return fx(i),At=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!am(i.type,i.memoizedProps)),s&&(s=Gn)){if(mm(i))throw hx(),Error(n(418));for(;s;)cx(i,s),s=zi(s.nextSibling)}if(fx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){Gn=zi(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Gn=null}}else Gn=Wn?zi(i.stateNode.nextSibling):null;return!0}function hx(){for(var i=Gn;i;)i=zi(i.nextSibling)}function Vs(){Gn=Wn=null,At=!1}function Em(i){xr===null?xr=[i]:xr.push(i)}var XB=H.ReactCurrentBatchConfig;function vu(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(x){var R=E.refs;x===null?delete R[b]:R[b]=x},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Gc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function px(i){var s=i._init;return s(i._payload)}function mx(i){function s(Y,z){if(i){var K=Y.deletions;K===null?(Y.deletions=[z],Y.flags|=16):K.push(z)}}function l(Y,z){if(!i)return null;for(;z!==null;)s(Y,z),z=z.sibling;return null}function h(Y,z){for(Y=new Map;z!==null;)z.key!==null?Y.set(z.key,z):Y.set(z.index,z),z=z.sibling;return Y}function E(Y,z){return Y=Ji(Y,z),Y.index=0,Y.sibling=null,Y}function b(Y,z,K){return Y.index=K,i?(K=Y.alternate,K!==null?(K=K.index,K<z?(Y.flags|=2,z):K):(Y.flags|=2,z)):(Y.flags|=1048576,z)}function x(Y){return i&&Y.alternate===null&&(Y.flags|=2),Y}function R(Y,z,K,be){return z===null||z.tag!==6?(z=u0(K,Y.mode,be),z.return=Y,z):(z=E(z,K),z.return=Y,z)}function U(Y,z,K,be){var Le=K.type;return Le===q?ce(Y,z,K.props.children,be,K.key):z!==null&&(z.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===Oe&&px(Le)===z.type)?(be=E(z,K.props),be.ref=vu(Y,z,K),be.return=Y,be):(be=yd(K.type,K.key,K.props,null,Y.mode,be),be.ref=vu(Y,z,K),be.return=Y,be)}function Z(Y,z,K,be){return z===null||z.tag!==4||z.stateNode.containerInfo!==K.containerInfo||z.stateNode.implementation!==K.implementation?(z=l0(K,Y.mode,be),z.return=Y,z):(z=E(z,K.children||[]),z.return=Y,z)}function ce(Y,z,K,be,Le){return z===null||z.tag!==7?(z=Mo(K,Y.mode,be,Le),z.return=Y,z):(z=E(z,K),z.return=Y,z)}function he(Y,z,K){if(typeof z=="string"&&z!==""||typeof z=="number")return z=u0(""+z,Y.mode,K),z.return=Y,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case X:return K=yd(z.type,z.key,z.props,null,Y.mode,K),K.ref=vu(Y,null,z),K.return=Y,K;case B:return z=l0(z,Y.mode,K),z.return=Y,z;case Oe:var be=z._init;return he(Y,be(z._payload),K)}if(Tr(z)||re(z))return z=Mo(z,Y.mode,K,null),z.return=Y,z;Gc(Y,z)}return null}function se(Y,z,K,be){var Le=z!==null?z.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Le!==null?null:R(Y,z,""+K,be);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case X:return K.key===Le?U(Y,z,K,be):null;case B:return K.key===Le?Z(Y,z,K,be):null;case Oe:return Le=K._init,se(Y,z,Le(K._payload),be)}if(Tr(K)||re(K))return Le!==null?null:ce(Y,z,K,be,null);Gc(Y,K)}return null}function we(Y,z,K,be,Le){if(typeof be=="string"&&be!==""||typeof be=="number")return Y=Y.get(K)||null,R(z,Y,""+be,Le);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case X:return Y=Y.get(be.key===null?K:be.key)||null,U(z,Y,be,Le);case B:return Y=Y.get(be.key===null?K:be.key)||null,Z(z,Y,be,Le);case Oe:var je=be._init;return we(Y,z,K,je(be._payload),Le)}if(Tr(be)||re(be))return Y=Y.get(K)||null,ce(z,Y,be,Le,null);Gc(z,be)}return null}function Pe(Y,z,K,be){for(var Le=null,je=null,$e=z,We=z=0,rn=null;$e!==null&&We<K.length;We++){$e.index>We?(rn=$e,$e=null):rn=$e.sibling;var ot=se(Y,$e,K[We],be);if(ot===null){$e===null&&($e=rn);break}i&&$e&&ot.alternate===null&&s(Y,$e),z=b(ot,z,We),je===null?Le=ot:je.sibling=ot,je=ot,$e=rn}if(We===K.length)return l(Y,$e),At&&ko(Y,We),Le;if($e===null){for(;We<K.length;We++)$e=he(Y,K[We],be),$e!==null&&(z=b($e,z,We),je===null?Le=$e:je.sibling=$e,je=$e);return At&&ko(Y,We),Le}for($e=h(Y,$e);We<K.length;We++)rn=we($e,Y,We,K[We],be),rn!==null&&(i&&rn.alternate!==null&&$e.delete(rn.key===null?We:rn.key),z=b(rn,z,We),je===null?Le=rn:je.sibling=rn,je=rn);return i&&$e.forEach(function(Zi){return s(Y,Zi)}),At&&ko(Y,We),Le}function Ie(Y,z,K,be){var Le=re(K);if(typeof Le!="function")throw Error(n(150));if(K=Le.call(K),K==null)throw Error(n(151));for(var je=Le=null,$e=z,We=z=0,rn=null,ot=K.next();$e!==null&&!ot.done;We++,ot=K.next()){$e.index>We?(rn=$e,$e=null):rn=$e.sibling;var Zi=se(Y,$e,ot.value,be);if(Zi===null){$e===null&&($e=rn);break}i&&$e&&Zi.alternate===null&&s(Y,$e),z=b(Zi,z,We),je===null?Le=Zi:je.sibling=Zi,je=Zi,$e=rn}if(ot.done)return l(Y,$e),At&&ko(Y,We),Le;if($e===null){for(;!ot.done;We++,ot=K.next())ot=he(Y,ot.value,be),ot!==null&&(z=b(ot,z,We),je===null?Le=ot:je.sibling=ot,je=ot);return At&&ko(Y,We),Le}for($e=h(Y,$e);!ot.done;We++,ot=K.next())ot=we($e,Y,We,ot.value,be),ot!==null&&(i&&ot.alternate!==null&&$e.delete(ot.key===null?We:ot.key),z=b(ot,z,We),je===null?Le=ot:je.sibling=ot,je=ot);return i&&$e.forEach(function(k7){return s(Y,k7)}),At&&ko(Y,We),Le}function Ft(Y,z,K,be){if(typeof K=="object"&&K!==null&&K.type===q&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case X:e:{for(var Le=K.key,je=z;je!==null;){if(je.key===Le){if(Le=K.type,Le===q){if(je.tag===7){l(Y,je.sibling),z=E(je,K.props.children),z.return=Y,Y=z;break e}}else if(je.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===Oe&&px(Le)===je.type){l(Y,je.sibling),z=E(je,K.props),z.ref=vu(Y,je,K),z.return=Y,Y=z;break e}l(Y,je);break}else s(Y,je);je=je.sibling}K.type===q?(z=Mo(K.props.children,Y.mode,be,K.key),z.return=Y,Y=z):(be=yd(K.type,K.key,K.props,null,Y.mode,be),be.ref=vu(Y,z,K),be.return=Y,Y=be)}return x(Y);case B:e:{for(je=K.key;z!==null;){if(z.key===je)if(z.tag===4&&z.stateNode.containerInfo===K.containerInfo&&z.stateNode.implementation===K.implementation){l(Y,z.sibling),z=E(z,K.children||[]),z.return=Y,Y=z;break e}else{l(Y,z);break}else s(Y,z);z=z.sibling}z=l0(K,Y.mode,be),z.return=Y,Y=z}return x(Y);case Oe:return je=K._init,Ft(Y,z,je(K._payload),be)}if(Tr(K))return Pe(Y,z,K,be);if(re(K))return Ie(Y,z,K,be);Gc(Y,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,z!==null&&z.tag===6?(l(Y,z.sibling),z=E(z,K),z.return=Y,Y=z):(l(Y,z),z=u0(K,Y.mode,be),z.return=Y,Y=z),x(Y)):l(Y,z)}return Ft}var qs=mx(!0),gx=mx(!1),Xc=ji(null),Kc=null,Ys=null,ym=null;function bm(){ym=Ys=Kc=null}function Tm(i){var s=Xc.current;St(Xc),i._currentValue=s}function _m(i,s,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===l)break;i=i.return}}function Ws(i,s){Kc=i,ym=Ys=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(Mn=!0),i.firstContext=null)}function ar(i){var s=i._currentValue;if(ym!==i)if(i={context:i,memoizedValue:s,next:null},Ys===null){if(Kc===null)throw Error(n(308));Ys=i,Kc.dependencies={lanes:0,firstContext:i}}else Ys=Ys.next=i;return s}var Po=null;function Sm(i){Po===null?Po=[i]:Po.push(i)}function Ex(i,s,l,h){var E=s.interleaved;return E===null?(l.next=l,Sm(s)):(l.next=E.next,E.next=l),s.interleaved=l,Ei(i,h)}function Ei(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var qi=!1;function xm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yx(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function yi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Yi(i,s,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var E=h.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),h.pending=s,Ei(i,l)}return E=h.interleaved,E===null?(s.next=s,Sm(h)):(s.next=E.next,E.next=s),h.interleaved=s,Ei(i,l)}function Qc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,Fp(i,l)}}function bx(i,s){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 x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};b===null?E=b=x:b=b.next=x,l=l.next}while(l!==null);b===null?E=b=s:b=b.next=s}else E=b=s;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=s:i.next=s,l.lastBaseUpdate=s}function Jc(i,s,l,h){var E=i.updateQueue;qi=!1;var b=E.firstBaseUpdate,x=E.lastBaseUpdate,R=E.shared.pending;if(R!==null){E.shared.pending=null;var U=R,Z=U.next;U.next=null,x===null?b=Z:x.next=Z,x=U;var ce=i.alternate;ce!==null&&(ce=ce.updateQueue,R=ce.lastBaseUpdate,R!==x&&(R===null?ce.firstBaseUpdate=Z:R.next=Z,ce.lastBaseUpdate=U))}if(b!==null){var he=E.baseState;x=0,ce=Z=U=null,R=b;do{var se=R.lane,we=R.eventTime;if((h&se)===se){ce!==null&&(ce=ce.next={eventTime:we,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var Pe=i,Ie=R;switch(se=s,we=l,Ie.tag){case 1:if(Pe=Ie.payload,typeof Pe=="function"){he=Pe.call(we,he,se);break e}he=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Ie.payload,se=typeof Pe=="function"?Pe.call(we,he,se):Pe,se==null)break e;he=C({},he,se);break e;case 2:qi=!0}}R.callback!==null&&R.lane!==0&&(i.flags|=64,se=E.effects,se===null?E.effects=[R]:se.push(R))}else we={eventTime:we,lane:se,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ce===null?(Z=ce=we,U=he):ce=ce.next=we,x|=se;if(R=R.next,R===null){if(R=E.shared.pending,R===null)break;se=R,R=se.next,se.next=null,E.lastBaseUpdate=se,E.shared.pending=null}}while(!0);if(ce===null&&(U=he),E.baseState=U,E.firstBaseUpdate=Z,E.lastBaseUpdate=ce,s=E.shared.interleaved,s!==null){E=s;do x|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);Io|=x,i.lanes=x,i.memoizedState=he}}function Tx(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var ku={},Xr=ji(ku),Pu=ji(ku),Nu=ji(ku);function No(i){if(i===ku)throw Error(n(174));return i}function wm(i,s){switch(bt(Nu,s),bt(Pu,i),bt(Xr,ku),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ge(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=ge(s,i)}St(Xr),bt(Xr,s)}function Gs(){St(Xr),St(Pu),St(Nu)}function _x(i){No(Nu.current);var s=No(Xr.current),l=ge(s,i.type);s!==l&&(bt(Pu,i),bt(Xr,l))}function Cm(i){Pu.current===i&&(St(Xr),St(Pu))}var kt=ji(0);function Zc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Am=[];function vm(){for(var i=0;i<Am.length;i++)Am[i]._workInProgressVersionPrimary=null;Am.length=0}var ed=H.ReactCurrentDispatcher,km=H.ReactCurrentBatchConfig,Oo=0,Pt=null,Wt=null,tn=null,td=!1,Ou=!1,Iu=0,KB=0;function yn(){throw Error(n(321))}function Pm(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!Sr(i[l],s[l]))return!1;return!0}function Nm(i,s,l,h,E,b){if(Oo=b,Pt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,ed.current=i===null||i.memoizedState===null?e7:t7,i=l(h,E),Ou){b=0;do{if(Ou=!1,Iu=0,25<=b)throw Error(n(301));b+=1,tn=Wt=null,s.updateQueue=null,ed.current=n7,i=l(h,E)}while(Ou)}if(ed.current=id,s=Wt!==null&&Wt.next!==null,Oo=0,tn=Wt=Pt=null,td=!1,s)throw Error(n(300));return i}function Om(){var i=Iu!==0;return Iu=0,i}function Kr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tn===null?Pt.memoizedState=tn=i:tn=tn.next=i,tn}function ur(){if(Wt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=Wt.next;var s=tn===null?Pt.memoizedState:tn.next;if(s!==null)tn=s,Wt=i;else{if(i===null)throw Error(n(310));Wt=i,i={memoizedState:Wt.memoizedState,baseState:Wt.baseState,baseQueue:Wt.baseQueue,queue:Wt.queue,next:null},tn===null?Pt.memoizedState=tn=i:tn=tn.next=i}return tn}function Ru(i,s){return typeof s=="function"?s(i):s}function Im(i){var s=ur(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Wt,E=h.baseQueue,b=l.pending;if(b!==null){if(E!==null){var x=E.next;E.next=b.next,b.next=x}h.baseQueue=E=b,l.pending=null}if(E!==null){b=E.next,h=h.baseState;var R=x=null,U=null,Z=b;do{var ce=Z.lane;if((Oo&ce)===ce)U!==null&&(U=U.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 he={lane:ce,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};U===null?(R=U=he,x=h):U=U.next=he,Pt.lanes|=ce,Io|=ce}Z=Z.next}while(Z!==null&&Z!==b);U===null?x=h:U.next=R,Sr(h,s.memoizedState)||(Mn=!0),s.memoizedState=h,s.baseState=x,s.baseQueue=U,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do b=E.lane,Pt.lanes|=b,Io|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Rm(i){var s=ur(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,b=s.memoizedState;if(E!==null){l.pending=null;var x=E=E.next;do b=i(b,x.action),x=x.next;while(x!==E);Sr(b,s.memoizedState)||(Mn=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),l.lastRenderedState=b}return[b,h]}function Sx(){}function xx(i,s){var l=Pt,h=ur(),E=s(),b=!Sr(h.memoizedState,E);if(b&&(h.memoizedState=E,Mn=!0),h=h.queue,Lm(Ax.bind(null,l,h,i),[i]),h.getSnapshot!==s||b||tn!==null&&tn.memoizedState.tag&1){if(l.flags|=2048,Lu(9,Cx.bind(null,l,h,E,s),void 0,null),nn===null)throw Error(n(349));(Oo&30)!==0||wx(l,s,E)}return E}function wx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Pt.updateQueue,s===null?(s={lastEffect:null,stores:null},Pt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function Cx(i,s,l,h){s.value=l,s.getSnapshot=h,vx(s)&&kx(i)}function Ax(i,s,l){return l(function(){vx(s)&&kx(i)})}function vx(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!Sr(i,l)}catch(h){return!0}}function kx(i){var s=Ei(i,1);s!==null&&vr(s,i,1,-1)}function Px(i){var s=Kr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ru,lastRenderedState:i},s.queue=i,i=i.dispatch=ZB.bind(null,Pt,i),[s.memoizedState,i]}function Lu(i,s,l,h){return i={tag:i,create:s,destroy:l,deps:h,next:null},s=Pt.updateQueue,s===null?(s={lastEffect:null,stores:null},Pt.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,s.lastEffect=i)),i}function Nx(){return ur().memoizedState}function nd(i,s,l,h){var E=Kr();Pt.flags|=i,E.memoizedState=Lu(1|s,l,void 0,h===void 0?null:h)}function rd(i,s,l,h){var E=ur();h=h===void 0?null:h;var b=void 0;if(Wt!==null){var x=Wt.memoizedState;if(b=x.destroy,h!==null&&Pm(h,x.deps)){E.memoizedState=Lu(s,l,b,h);return}}Pt.flags|=i,E.memoizedState=Lu(1|s,l,b,h)}function Ox(i,s){return nd(8390656,8,i,s)}function Lm(i,s){return rd(2048,8,i,s)}function Ix(i,s){return rd(4,2,i,s)}function Rx(i,s){return rd(4,4,i,s)}function Lx(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Dx(i,s,l){return l=l!=null?l.concat([i]):null,rd(4,4,Lx.bind(null,s,i),l)}function Dm(){}function Mx(i,s){var l=ur();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&Pm(s,h[1])?h[0]:(l.memoizedState=[i,s],i)}function Fx(i,s){var l=ur();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&Pm(s,h[1])?h[0]:(i=i(),l.memoizedState=[i,s],i)}function Bx(i,s,l){return(Oo&21)===0?(i.baseState&&(i.baseState=!1,Mn=!0),i.memoizedState=l):(Sr(l,s)||(l=pS(),Pt.lanes|=l,Io|=l,i.baseState=!0),s)}function QB(i,s){var l=ct;ct=l!==0&&4>l?l:4,i(!0);var h=km.transition;km.transition={};try{i(!1),s()}finally{ct=l,km.transition=h}}function Ux(){return ur().memoizedState}function JB(i,s,l){var h=Ki(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Hx(i))zx(s,l);else if(l=Ex(i,s,l,h),l!==null){var E=Cn();vr(l,i,h,E),jx(l,s,h)}}function ZB(i,s,l){var h=Ki(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Hx(i))zx(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var x=s.lastRenderedState,R=b(x,l);if(E.hasEagerState=!0,E.eagerState=R,Sr(R,x)){var U=s.interleaved;U===null?(E.next=E,Sm(s)):(E.next=U.next,U.next=E),s.interleaved=E;return}}catch(Z){}l=Ex(i,s,E,h),l!==null&&(E=Cn(),vr(l,i,h,E),jx(l,s,h))}}function Hx(i){var s=i.alternate;return i===Pt||s!==null&&s===Pt}function zx(i,s){Ou=td=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function jx(i,s,l){if((l&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,Fp(i,l)}}var id={readContext:ar,useCallback:yn,useContext:yn,useEffect:yn,useImperativeHandle:yn,useInsertionEffect:yn,useLayoutEffect:yn,useMemo:yn,useReducer:yn,useRef:yn,useState:yn,useDebugValue:yn,useDeferredValue:yn,useTransition:yn,useMutableSource:yn,useSyncExternalStore:yn,useId:yn,unstable_isNewReconciler:!1},e7={readContext:ar,useCallback:function(i,s){return Kr().memoizedState=[i,s===void 0?null:s],i},useContext:ar,useEffect:Ox,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,nd(4194308,4,Lx.bind(null,s,i),l)},useLayoutEffect:function(i,s){return nd(4194308,4,i,s)},useInsertionEffect:function(i,s){return nd(4,2,i,s)},useMemo:function(i,s){var l=Kr();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var h=Kr();return s=l!==void 0?l(s):s,h.memoizedState=h.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},h.queue=i,i=i.dispatch=JB.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var s=Kr();return i={current:i},s.memoizedState=i},useState:Px,useDebugValue:Dm,useDeferredValue:function(i){return Kr().memoizedState=i},useTransition:function(){var i=Px(!1),s=i[0];return i=QB.bind(null,i[1]),Kr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var h=Pt,E=Kr();if(At){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),nn===null)throw Error(n(349));(Oo&30)!==0||wx(h,s,l)}E.memoizedState=l;var b={value:l,getSnapshot:s};return E.queue=b,Ox(Ax.bind(null,h,b,i),[i]),h.flags|=2048,Lu(9,Cx.bind(null,h,b,l,s),void 0,null),l},useId:function(){var i=Kr(),s=nn.identifierPrefix;if(At){var l=gi,h=mi;l=(h&~(1<<32-_r(h)-1)).toString(32)+l,s=":"+s+"R"+l,l=Iu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=KB++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},t7={readContext:ar,useCallback:Mx,useContext:ar,useEffect:Lm,useImperativeHandle:Dx,useInsertionEffect:Ix,useLayoutEffect:Rx,useMemo:Fx,useReducer:Im,useRef:Nx,useState:function(){return Im(Ru)},useDebugValue:Dm,useDeferredValue:function(i){var s=ur();return Bx(s,Wt.memoizedState,i)},useTransition:function(){var i=Im(Ru)[0],s=ur().memoizedState;return[i,s]},useMutableSource:Sx,useSyncExternalStore:xx,useId:Ux,unstable_isNewReconciler:!1},n7={readContext:ar,useCallback:Mx,useContext:ar,useEffect:Lm,useImperativeHandle:Dx,useInsertionEffect:Ix,useLayoutEffect:Rx,useMemo:Fx,useReducer:Rm,useRef:Nx,useState:function(){return Rm(Ru)},useDebugValue:Dm,useDeferredValue:function(i){var s=ur();return Wt===null?s.memoizedState=i:Bx(s,Wt.memoizedState,i)},useTransition:function(){var i=Rm(Ru)[0],s=ur().memoizedState;return[i,s]},useMutableSource:Sx,useSyncExternalStore:xx,useId:Ux,unstable_isNewReconciler:!1};function wr(i,s){if(i&&i.defaultProps){s=C({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function Mm(i,s,l,h){s=i.memoizedState,l=l(h,s),l=l==null?s:C({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var od={isMounted:function(i){return(i=i._reactInternals)?wo(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var h=Cn(),E=Ki(i),b=yi(h,E);b.payload=s,l!=null&&(b.callback=l),s=Yi(i,b,E),s!==null&&(vr(s,i,E,h),Qc(s,i,E))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var h=Cn(),E=Ki(i),b=yi(h,E);b.tag=1,b.payload=s,l!=null&&(b.callback=l),s=Yi(i,b,E),s!==null&&(vr(s,i,E,h),Qc(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=Cn(),h=Ki(i),E=yi(l,h);E.tag=2,s!=null&&(E.callback=s),s=Yi(i,E,h),s!==null&&(vr(s,i,h,l),Qc(s,i,h))}};function $x(i,s,l,h,E,b,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,x):s.prototype&&s.prototype.isPureReactComponent?!Tu(l,h)||!Tu(E,b):!0}function Vx(i,s,l){var h=!1,E=$i,b=s.contextType;return typeof b=="object"&&b!==null?b=ar(b):(E=Dn(s)?Ao:En.current,h=s.contextTypes,b=(h=h!=null)?zs(i,E):$i),s=new s(l,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=od,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function qx(i,s,l,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,h),s.state!==i&&od.enqueueReplaceState(s,s.state,null)}function Fm(i,s,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},xm(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=ar(b):(b=Dn(s)?Ao:En.current,E.context=zs(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Mm(i,s,b,l),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&od.enqueueReplaceState(E,E.state,null),Jc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Xs(i,s){try{var l="",h=s;do l+=De(h),h=h.return;while(h);var E=l}catch(b){E=`
14
+ `+E[x].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=x&&0<=R);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?ee(i):""}function De(i){switch(i.tag){case 5:return ee(i.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function Pe(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 q:return"Fragment";case F:return"Portal";case ge:return"Profiler";case ie:return"StrictMode";case fe:return"Suspense";case te:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case oe:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case ce:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case be:return s=i.displayName||null,s!==null?s:Pe(i.type)||"Memo";case ve:s=i._payload,i=i._init;try{return Pe(i(s))}catch(l){}}return null}function ze(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Pe(s);case 8:return s===ie?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function xe(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ye(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ft(i){var s=Ye(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,b=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(x){h=""+x,b.call(this,x)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function on(i){i._valueTracker||(i._valueTracker=ft(i))}function Vr(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return i&&(h=Ye(i)?i.checked?"true":"false":i.value),i=h,i!==l?(s.setValue(i),!0):!1}function qr(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function Rn(i,s){var l=s.checked;return v({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Ri(i,s){var l=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;l=xe(s.value!=null?s.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Li(i,s){s=s.checked,s!=null&&k(i,"checked",s,!1)}function fi(i,s){Li(i,s);var l=xe(s.value),h=s.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}s.hasOwnProperty("value")?hi(i,s.type,l):s.hasOwnProperty("defaultValue")&&hi(i,s.type,xe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Ps(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var h=s.type;if(!(h!=="submit"&&h!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function hi(i,s,l){(s!=="number"||qr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var _r=Array.isArray;function Ae(i,s,l,h){if(i=i.options,s){s={};for(var E=0;E<l.length;E++)s["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=s.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+xe(l),s=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function Me(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return v({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Be(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(_r(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:xe(l)}}function it(i,s){var l=xe(s.value),h=xe(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function pt(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function J(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 me(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?J(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,qe=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(s,l,h,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Re(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var lt={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},Yt=["Webkit","ms","Moz","O"];Object.keys(lt).forEach(function(i){Yt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),lt[s]=lt[i]})});function jt(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||lt.hasOwnProperty(i)&&lt[i]?(""+s).trim():s+"px"}function sn(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=jt(l,s[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var Yr=v({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function an(i,s){if(s){if(Yr[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Wr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Yn=null;function Op(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ip=null,Ns=null,Os=null;function iS(i){if(i=Cu(i)){if(typeof Ip!="function")throw Error(n(280));var s=i.stateNode;s&&(s=zc(s),Ip(i.stateNode,i.type,s))}}function oS(i){Ns?Os?Os.push(i):Os=[i]:Ns=i}function sS(){if(Ns){var i=Ns,s=Os;if(Os=Ns=null,iS(i),s)for(i=0;i<s.length;i++)iS(s[i])}}function aS(i,s){return i(s)}function uS(){}var Rp=!1;function lS(i,s,l){if(Rp)return i(s,l);Rp=!0;try{return aS(i,s,l)}finally{Rp=!1,(Ns!==null||Os!==null)&&(uS(),sS())}}function ou(i,s){var l=i.stateNode;if(l===null)return null;var h=zc(l);if(h===null)return null;l=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(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,s,typeof l));return l}var Lp=!1;if(c)try{var su={};Object.defineProperty(su,"passive",{get:function(){Lp=!0}}),window.addEventListener("test",su,su),window.removeEventListener("test",su,su)}catch(i){Lp=!1}function q9(i,s,l,h,E,b,x,R,U){var Z=Array.prototype.slice.call(arguments,3);try{s.apply(l,Z)}catch(le){this.onError(le)}}var au=!1,bc=null,Tc=!1,Dp=null,Y9={onError:function(i){au=!0,bc=i}};function W9(i,s,l,h,E,b,x,R,U){au=!1,bc=null,q9.apply(Y9,arguments)}function G9(i,s,l,h,E,b,x,R,U){if(W9.apply(this,arguments),au){if(au){var Z=bc;au=!1,bc=null}else throw Error(n(198));Tc||(Tc=!0,Dp=Z)}}function wo(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function cS(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function dS(i){if(wo(i)!==i)throw Error(n(188))}function X9(i){var s=i.alternate;if(!s){if(s=wo(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,h=s;;){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 dS(E),i;if(b===h)return dS(E),s;b=b.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=b;else{for(var x=!1,R=E.child;R;){if(R===l){x=!0,l=E,h=b;break}if(R===h){x=!0,h=E,l=b;break}R=R.sibling}if(!x){for(R=b.child;R;){if(R===l){x=!0,l=b,h=E;break}if(R===h){x=!0,h=b,l=E;break}R=R.sibling}if(!x)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:s}function fS(i){return i=X9(i),i!==null?hS(i):null}function hS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=hS(i);if(s!==null)return s;i=i.sibling}return null}var pS=t.unstable_scheduleCallback,mS=t.unstable_cancelCallback,K9=t.unstable_shouldYield,Q9=t.unstable_requestPaint,Mt=t.unstable_now,J9=t.unstable_getCurrentPriorityLevel,Mp=t.unstable_ImmediatePriority,gS=t.unstable_UserBlockingPriority,_c=t.unstable_NormalPriority,Z9=t.unstable_LowPriority,ES=t.unstable_IdlePriority,Sc=null,Gr=null;function eB(i){if(Gr&&typeof Gr.onCommitFiberRoot=="function")try{Gr.onCommitFiberRoot(Sc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Sr=Math.clz32?Math.clz32:rB,tB=Math.log,nB=Math.LN2;function rB(i){return i>>>=0,i===0?32:31-(tB(i)/nB|0)|0}var xc=64,wc=4194304;function uu(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Ac(i,s){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,x=l&268435455;if(x!==0){var R=x&~E;R!==0?h=uu(R):(b&=x,b!==0&&(h=uu(b)))}else x=l&~E,x!==0?h=uu(x):b!==0&&(h=uu(b));if(h===0)return 0;if(s!==0&&s!==h&&(s&E)===0&&(E=h&-h,b=s&-s,E>=b||E===16&&(b&4194240)!==0))return s;if((h&4)!==0&&(h|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=h;0<s;)l=31-Sr(s),E=1<<l,h|=i[l],s&=~E;return h}function iB(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oB(i,s){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var x=31-Sr(b),R=1<<x,U=E[x];U===-1?((R&l)===0||(R&h)!==0)&&(E[x]=iB(R,s)):U<=s&&(i.expiredLanes|=R),b&=~R}}function Fp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function yS(){var i=xc;return xc<<=1,(xc&4194240)===0&&(xc=64),i}function Bp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function lu(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Sr(s),i[s]=l}function sB(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-Sr(l),b=1<<E;s[E]=0,h[E]=-1,i[E]=-1,l&=~b}}function Up(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var h=31-Sr(l),E=1<<h;E&s|i[h]&s&&(i[h]|=s),l&=~E}}var ct=0;function bS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var TS,Hp,_S,SS,xS,zp=!1,Cc=[],Di=null,Mi=null,Fi=null,cu=new Map,du=new Map,Bi=[],aB="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 wS(i,s){switch(i){case"focusin":case"focusout":Di=null;break;case"dragenter":case"dragleave":Mi=null;break;case"mouseover":case"mouseout":Fi=null;break;case"pointerover":case"pointerout":cu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":du.delete(s.pointerId)}}function fu(i,s,l,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},s!==null&&(s=Cu(s),s!==null&&Hp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function uB(i,s,l,h,E){switch(s){case"focusin":return Di=fu(Di,i,s,l,h,E),!0;case"dragenter":return Mi=fu(Mi,i,s,l,h,E),!0;case"mouseover":return Fi=fu(Fi,i,s,l,h,E),!0;case"pointerover":var b=E.pointerId;return cu.set(b,fu(cu.get(b)||null,i,s,l,h,E)),!0;case"gotpointercapture":return b=E.pointerId,du.set(b,fu(du.get(b)||null,i,s,l,h,E)),!0}return!1}function AS(i){var s=Ao(i.target);if(s!==null){var l=wo(s);if(l!==null){if(s=l.tag,s===13){if(s=cS(l),s!==null){i.blockedOn=s,xS(i.priority,function(){_S(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function vc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=$p(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Yn=h,l.target.dispatchEvent(h),Yn=null}else return s=Cu(l),s!==null&&Hp(s),i.blockedOn=l,!1;s.shift()}return!0}function CS(i,s,l){vc(i)&&l.delete(s)}function lB(){zp=!1,Di!==null&&vc(Di)&&(Di=null),Mi!==null&&vc(Mi)&&(Mi=null),Fi!==null&&vc(Fi)&&(Fi=null),cu.forEach(CS),du.forEach(CS)}function hu(i,s){i.blockedOn===s&&(i.blockedOn=null,zp||(zp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,lB)))}function pu(i){function s(E){return hu(E,i)}if(0<Cc.length){hu(Cc[0],i);for(var l=1;l<Cc.length;l++){var h=Cc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Di!==null&&hu(Di,i),Mi!==null&&hu(Mi,i),Fi!==null&&hu(Fi,i),cu.forEach(s),du.forEach(s),l=0;l<Bi.length;l++)h=Bi[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Bi.length&&(l=Bi[0],l.blockedOn===null);)AS(l),l.blockedOn===null&&Bi.shift()}var Is=H.ReactCurrentBatchConfig,kc=!0;function cB(i,s,l,h){var E=ct,b=Is.transition;Is.transition=null;try{ct=1,jp(i,s,l,h)}finally{ct=E,Is.transition=b}}function dB(i,s,l,h){var E=ct,b=Is.transition;Is.transition=null;try{ct=4,jp(i,s,l,h)}finally{ct=E,Is.transition=b}}function jp(i,s,l,h){if(kc){var E=$p(i,s,l,h);if(E===null)sm(i,s,h,Pc,l),wS(i,h);else if(uB(E,i,s,l,h))h.stopPropagation();else if(wS(i,h),s&4&&-1<aB.indexOf(i)){for(;E!==null;){var b=Cu(E);if(b!==null&&TS(b),b=$p(i,s,l,h),b===null&&sm(i,s,h,Pc,l),b===E)break;E=b}E!==null&&h.stopPropagation()}else sm(i,s,h,null,l)}}var Pc=null;function $p(i,s,l,h){if(Pc=null,i=Op(h),i=Ao(i),i!==null)if(s=wo(i),s===null)i=null;else if(l=s.tag,l===13){if(i=cS(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Pc=i,null}function vS(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(J9()){case Mp:return 1;case gS:return 4;case _c:case Z9:return 16;case ES:return 536870912;default:return 16}default:return 16}}var Ui=null,Vp=null,Nc=null;function kS(){if(Nc)return Nc;var i,s=Vp,l=s.length,h,E="value"in Ui?Ui.value:Ui.textContent,b=E.length;for(i=0;i<l&&s[i]===E[i];i++);var x=l-i;for(h=1;h<=x&&s[l-h]===E[b-h];h++);return Nc=E.slice(i,1<h?1-h:void 0)}function Oc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Ic(){return!0}function PS(){return!1}function Wn(i){function s(l,h,E,b,x){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=x,this.currentTarget=null;for(var R in i)i.hasOwnProperty(R)&&(l=i[R],this[R]=l?l(b):b[R]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Ic:PS,this.isPropagationStopped=PS,this}return v(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ic)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ic)},persist:function(){},isPersistent:Ic}),s}var Rs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qp=Wn(Rs),mu=v({},Rs,{view:0,detail:0}),fB=Wn(mu),Yp,Wp,gu,Rc=v({},mu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xp,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!==gu&&(gu&&i.type==="mousemove"?(Yp=i.screenX-gu.screenX,Wp=i.screenY-gu.screenY):Wp=Yp=0,gu=i),Yp)},movementY:function(i){return"movementY"in i?i.movementY:Wp}}),NS=Wn(Rc),hB=v({},Rc,{dataTransfer:0}),pB=Wn(hB),mB=v({},mu,{relatedTarget:0}),Gp=Wn(mB),gB=v({},Rs,{animationName:0,elapsedTime:0,pseudoElement:0}),EB=Wn(gB),yB=v({},Rs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),bB=Wn(yB),TB=v({},Rs,{data:0}),OS=Wn(TB),_B={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},SB={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"},xB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wB(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=xB[i])?!!s[i]:!1}function Xp(){return wB}var AB=v({},mu,{key:function(i){if(i.key){var s=_B[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Oc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?SB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xp,charCode:function(i){return i.type==="keypress"?Oc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Oc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),CB=Wn(AB),vB=v({},Rc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),IS=Wn(vB),kB=v({},mu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xp}),PB=Wn(kB),NB=v({},Rs,{propertyName:0,elapsedTime:0,pseudoElement:0}),OB=Wn(NB),IB=v({},Rc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),RB=Wn(IB),LB=[9,13,27,32],Kp=c&&"CompositionEvent"in window,Eu=null;c&&"documentMode"in document&&(Eu=document.documentMode);var DB=c&&"TextEvent"in window&&!Eu,RS=c&&(!Kp||Eu&&8<Eu&&11>=Eu),LS=" ",DS=!1;function MS(i,s){switch(i){case"keyup":return LB.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function FS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ls=!1;function MB(i,s){switch(i){case"compositionend":return FS(s);case"keypress":return s.which!==32?null:(DS=!0,LS);case"textInput":return i=s.data,i===LS&&DS?null:i;default:return null}}function FB(i,s){if(Ls)return i==="compositionend"||!Kp&&MS(i,s)?(i=kS(),Nc=Vp=Ui=null,Ls=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return RS&&s.locale!=="ko"?null:s.data;default:return null}}var BB={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 BS(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!BB[i.type]:s==="textarea"}function US(i,s,l,h){oS(h),s=Bc(s,"onChange"),0<s.length&&(l=new qp("onChange","change",null,l,h),i.push({event:l,listeners:s}))}var yu=null,bu=null;function UB(i){rx(i,0)}function Lc(i){var s=Us(i);if(Vr(s))return i}function HB(i,s){if(i==="change")return s}var HS=!1;if(c){var Qp;if(c){var Jp="oninput"in document;if(!Jp){var zS=document.createElement("div");zS.setAttribute("oninput","return;"),Jp=typeof zS.oninput=="function"}Qp=Jp}else Qp=!1;HS=Qp&&(!document.documentMode||9<document.documentMode)}function jS(){yu&&(yu.detachEvent("onpropertychange",$S),bu=yu=null)}function $S(i){if(i.propertyName==="value"&&Lc(bu)){var s=[];US(s,bu,i,Op(i)),lS(UB,s)}}function zB(i,s,l){i==="focusin"?(jS(),yu=s,bu=l,yu.attachEvent("onpropertychange",$S)):i==="focusout"&&jS()}function jB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Lc(bu)}function $B(i,s){if(i==="click")return Lc(s)}function VB(i,s){if(i==="input"||i==="change")return Lc(s)}function qB(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var xr=typeof Object.is=="function"?Object.is:qB;function Tu(i,s){if(xr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(s,E)||!xr(i[E],s[E]))return!1}return!0}function VS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function qS(i,s){var l=VS(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=s&&h>=s)return{node:l,offset:s-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=VS(l)}}function YS(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?YS(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function WS(){for(var i=window,s=qr();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=s.contentWindow;else break;s=qr(i.document)}return s}function Zp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function YB(i){var s=WS(),l=i.focusedElem,h=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&YS(l.ownerDocument.documentElement,l)){if(h!==null&&Zp(l)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,b=Math.min(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=qS(l,b);var x=qS(l,h);E&&x&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var WB=c&&"documentMode"in document&&11>=document.documentMode,Ds=null,em=null,_u=null,tm=!1;function GS(i,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;tm||Ds==null||Ds!==qr(h)||(h=Ds,"selectionStart"in h&&Zp(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}),_u&&Tu(_u,h)||(_u=h,h=Bc(em,"onSelect"),0<h.length&&(s=new qp("onSelect","select",null,s,l),i.push({event:s,listeners:h}),s.target=Ds)))}function Dc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var Ms={animationend:Dc("Animation","AnimationEnd"),animationiteration:Dc("Animation","AnimationIteration"),animationstart:Dc("Animation","AnimationStart"),transitionend:Dc("Transition","TransitionEnd")},nm={},XS={};c&&(XS=document.createElement("div").style,"AnimationEvent"in window||(delete Ms.animationend.animation,delete Ms.animationiteration.animation,delete Ms.animationstart.animation),"TransitionEvent"in window||delete Ms.transitionend.transition);function Mc(i){if(nm[i])return nm[i];if(!Ms[i])return i;var s=Ms[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in XS)return nm[i]=s[l];return i}var KS=Mc("animationend"),QS=Mc("animationiteration"),JS=Mc("animationstart"),ZS=Mc("transitionend"),ex=new Map,tx="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 Hi(i,s){ex.set(i,s),a(s,[i])}for(var rm=0;rm<tx.length;rm++){var im=tx[rm],GB=im.toLowerCase(),XB=im[0].toUpperCase()+im.slice(1);Hi(GB,"on"+XB)}Hi(KS,"onAnimationEnd"),Hi(QS,"onAnimationIteration"),Hi(JS,"onAnimationStart"),Hi("dblclick","onDoubleClick"),Hi("focusin","onFocus"),Hi("focusout","onBlur"),Hi(ZS,"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 Su="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(" "),KB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Su));function nx(i,s,l){var h=i.type||"unknown-event";i.currentTarget=l,G9(h,s,void 0,i),i.currentTarget=null}function rx(i,s){s=(s&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(s)for(var x=h.length-1;0<=x;x--){var R=h[x],U=R.instance,Z=R.currentTarget;if(R=R.listener,U!==b&&E.isPropagationStopped())break e;nx(E,R,Z),b=U}else for(x=0;x<h.length;x++){if(R=h[x],U=R.instance,Z=R.currentTarget,R=R.listener,U!==b&&E.isPropagationStopped())break e;nx(E,R,Z),b=U}}}if(Tc)throw i=Dp,Tc=!1,Dp=null,i}function _t(i,s){var l=s[fm];l===void 0&&(l=s[fm]=new Set);var h=i+"__bubble";l.has(h)||(ix(s,i,2,!1),l.add(h))}function om(i,s,l){var h=0;s&&(h|=4),ix(l,i,h,s)}var Fc="_reactListening"+Math.random().toString(36).slice(2);function xu(i){if(!i[Fc]){i[Fc]=!0,r.forEach(function(l){l!=="selectionchange"&&(KB.has(l)||om(l,!1,i),om(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Fc]||(s[Fc]=!0,om("selectionchange",!1,s))}}function ix(i,s,l,h){switch(vS(s)){case 1:var E=cB;break;case 4:E=dB;break;default:E=jp}l=E.bind(null,s,l,i),E=void 0,!Lp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(s,l,{capture:!0,passive:E}):i.addEventListener(s,l,!0):E!==void 0?i.addEventListener(s,l,{passive:E}):i.addEventListener(s,l,!1)}function sm(i,s,l,h,E){var b=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var R=h.stateNode.containerInfo;if(R===E||R.nodeType===8&&R.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var U=x.tag;if((U===3||U===4)&&(U=x.stateNode.containerInfo,U===E||U.nodeType===8&&U.parentNode===E))return;x=x.return}for(;R!==null;){if(x=Ao(R),x===null)return;if(U=x.tag,U===5||U===6){h=b=x;continue e}R=R.parentNode}}h=h.return}lS(function(){var Z=b,le=Op(l),he=[];e:{var ae=ex.get(i);if(ae!==void 0){var we=qp,Ne=i;switch(i){case"keypress":if(Oc(l)===0)break e;case"keydown":case"keyup":we=CB;break;case"focusin":Ne="focus",we=Gp;break;case"focusout":Ne="blur",we=Gp;break;case"beforeblur":case"afterblur":we=Gp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=NS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=pB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=PB;break;case KS:case QS:case JS:we=EB;break;case ZS:we=OB;break;case"scroll":we=fB;break;case"wheel":we=RB;break;case"copy":case"cut":case"paste":we=bB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=IS}var Ie=(s&4)!==0,Ft=!Ie&&i==="scroll",W=Ie?ae!==null?ae+"Capture":null:ae;Ie=[];for(var j=Z,K;j!==null;){K=j;var Te=K.stateNode;if(K.tag===5&&Te!==null&&(K=Te,W!==null&&(Te=ou(j,W),Te!=null&&Ie.push(wu(j,Te,K)))),Ft)break;j=j.return}0<Ie.length&&(ae=new we(ae,Ne,null,l,le),he.push({event:ae,listeners:Ie}))}}if((s&7)===0){e:{if(ae=i==="mouseover"||i==="pointerover",we=i==="mouseout"||i==="pointerout",ae&&l!==Yn&&(Ne=l.relatedTarget||l.fromElement)&&(Ao(Ne)||Ne[pi]))break e;if((we||ae)&&(ae=le.window===le?le:(ae=le.ownerDocument)?ae.defaultView||ae.parentWindow:window,we?(Ne=l.relatedTarget||l.toElement,we=Z,Ne=Ne?Ao(Ne):null,Ne!==null&&(Ft=wo(Ne),Ne!==Ft||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(we=null,Ne=Z),we!==Ne)){if(Ie=NS,Te="onMouseLeave",W="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(Ie=IS,Te="onPointerLeave",W="onPointerEnter",j="pointer"),Ft=we==null?ae:Us(we),K=Ne==null?ae:Us(Ne),ae=new Ie(Te,j+"leave",we,l,le),ae.target=Ft,ae.relatedTarget=K,Te=null,Ao(le)===Z&&(Ie=new Ie(W,j+"enter",Ne,l,le),Ie.target=K,Ie.relatedTarget=Ft,Te=Ie),Ft=Te,we&&Ne)t:{for(Ie=we,W=Ne,j=0,K=Ie;K;K=Fs(K))j++;for(K=0,Te=W;Te;Te=Fs(Te))K++;for(;0<j-K;)Ie=Fs(Ie),j--;for(;0<K-j;)W=Fs(W),K--;for(;j--;){if(Ie===W||W!==null&&Ie===W.alternate)break t;Ie=Fs(Ie),W=Fs(W)}Ie=null}else Ie=null;we!==null&&ox(he,ae,we,Ie,!1),Ne!==null&&Ft!==null&&ox(he,Ft,Ne,Ie,!0)}}e:{if(ae=Z?Us(Z):window,we=ae.nodeName&&ae.nodeName.toLowerCase(),we==="select"||we==="input"&&ae.type==="file")var Le=HB;else if(BS(ae))if(HS)Le=VB;else{Le=jB;var je=zB}else(we=ae.nodeName)&&we.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(Le=$B);if(Le&&(Le=Le(i,Z))){US(he,Le,l,le);break e}je&&je(i,ae,Z),i==="focusout"&&(je=ae._wrapperState)&&je.controlled&&ae.type==="number"&&hi(ae,"number",ae.value)}switch(je=Z?Us(Z):window,i){case"focusin":(BS(je)||je.contentEditable==="true")&&(Ds=je,em=Z,_u=null);break;case"focusout":_u=em=Ds=null;break;case"mousedown":tm=!0;break;case"contextmenu":case"mouseup":case"dragend":tm=!1,GS(he,l,le);break;case"selectionchange":if(WB)break;case"keydown":case"keyup":GS(he,l,le)}var $e;if(Kp)e:{switch(i){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else Ls?MS(i,l)&&(We="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(We="onCompositionStart");We&&(RS&&l.locale!=="ko"&&(Ls||We!=="onCompositionStart"?We==="onCompositionEnd"&&Ls&&($e=kS()):(Ui=le,Vp="value"in Ui?Ui.value:Ui.textContent,Ls=!0)),je=Bc(Z,We),0<je.length&&(We=new OS(We,i,null,l,le),he.push({event:We,listeners:je}),$e?We.data=$e:($e=FS(l),$e!==null&&(We.data=$e)))),($e=DB?MB(i,l):FB(i,l))&&(Z=Bc(Z,"onBeforeInput"),0<Z.length&&(le=new OS("onBeforeInput","beforeinput",null,l,le),he.push({event:le,listeners:Z}),le.data=$e))}rx(he,s)})}function wu(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Bc(i,s){for(var l=s+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=ou(i,l),b!=null&&h.unshift(wu(i,b,E)),b=ou(i,s),b!=null&&h.push(wu(i,b,E))),i=i.return}return h}function Fs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function ox(i,s,l,h,E){for(var b=s._reactName,x=[];l!==null&&l!==h;){var R=l,U=R.alternate,Z=R.stateNode;if(U!==null&&U===h)break;R.tag===5&&Z!==null&&(R=Z,E?(U=ou(l,b),U!=null&&x.unshift(wu(l,U,R))):E||(U=ou(l,b),U!=null&&x.push(wu(l,U,R)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var QB=/\r\n?/g,JB=/\u0000|\uFFFD/g;function sx(i){return(typeof i=="string"?i:""+i).replace(QB,`
15
+ `).replace(JB,"")}function Uc(i,s,l){if(s=sx(s),sx(i)!==s&&l)throw Error(n(425))}function Hc(){}var am=null,um=null;function lm(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var cm=typeof setTimeout=="function"?setTimeout:void 0,ZB=typeof clearTimeout=="function"?clearTimeout:void 0,ax=typeof Promise=="function"?Promise:void 0,e7=typeof queueMicrotask=="function"?queueMicrotask:typeof ax!="undefined"?function(i){return ax.resolve(null).then(i).catch(t7)}:cm;function t7(i){setTimeout(function(){throw i})}function dm(i,s){var l=s,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),pu(s);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);pu(s)}function zi(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function ux(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var Bs=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Bs,Au="__reactProps$"+Bs,pi="__reactContainer$"+Bs,fm="__reactEvents$"+Bs,n7="__reactListeners$"+Bs,r7="__reactHandles$"+Bs;function Ao(i){var s=i[Xr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[pi]||l[Xr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=ux(i);i!==null;){if(l=i[Xr])return l;i=ux(i)}return s}i=l,l=i.parentNode}return null}function Cu(i){return i=i[Xr]||i[pi],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Us(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function zc(i){return i[Au]||null}var hm=[],Hs=-1;function ji(i){return{current:i}}function St(i){0>Hs||(i.current=hm[Hs],hm[Hs]=null,Hs--)}function bt(i,s){Hs++,hm[Hs]=i.current,i.current=s}var $i={},En=ji($i),Ln=ji(!1),Co=$i;function zs(i,s){var l=i.type.contextTypes;if(!l)return $i;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in l)E[b]=s[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function Dn(i){return i=i.childContextTypes,i!=null}function jc(){St(Ln),St(En)}function lx(i,s,l){if(En.current!==$i)throw Error(n(168));bt(En,s),bt(Ln,l)}function cx(i,s,l){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in s))throw Error(n(108,ze(i)||"Unknown",E));return v({},l,h)}function $c(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||$i,Co=En.current,bt(En,i),bt(Ln,Ln.current),!0}function dx(i,s,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=cx(i,s,Co),h.__reactInternalMemoizedMergedChildContext=i,St(Ln),St(En),bt(En,i)):St(Ln),bt(Ln,l)}var mi=null,Vc=!1,pm=!1;function fx(i){mi===null?mi=[i]:mi.push(i)}function i7(i){Vc=!0,fx(i)}function Vi(){if(!pm&&mi!==null){pm=!0;var i=0,s=ct;try{var l=mi;for(ct=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}mi=null,Vc=!1}catch(E){throw mi!==null&&(mi=mi.slice(i+1)),pS(Mp,Vi),E}finally{ct=s,pm=!1}}return null}var js=[],$s=0,qc=null,Yc=0,sr=[],ar=0,vo=null,gi=1,Ei="";function ko(i,s){js[$s++]=Yc,js[$s++]=qc,qc=i,Yc=s}function hx(i,s,l){sr[ar++]=gi,sr[ar++]=Ei,sr[ar++]=vo,vo=i;var h=gi;i=Ei;var E=32-Sr(h)-1;h&=~(1<<E),l+=1;var b=32-Sr(s)+E;if(30<b){var x=E-E%5;b=(h&(1<<x)-1).toString(32),h>>=x,E-=x,gi=1<<32-Sr(s)+E|l<<E|h,Ei=b+i}else gi=1<<b|l<<E|h,Ei=i}function mm(i){i.return!==null&&(ko(i,1),hx(i,1,0))}function gm(i){for(;i===qc;)qc=js[--$s],js[$s]=null,Yc=js[--$s],js[$s]=null;for(;i===vo;)vo=sr[--ar],sr[ar]=null,Ei=sr[--ar],sr[ar]=null,gi=sr[--ar],sr[ar]=null}var Gn=null,Xn=null,Ct=!1,wr=null;function px(i,s){var l=dr(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function mx(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Gn=i,Xn=zi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Gn=i,Xn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=vo!==null?{id:gi,overflow:Ei}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=dr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Gn=i,Xn=null,!0):!1;default:return!1}}function Em(i){return(i.mode&1)!==0&&(i.flags&128)===0}function ym(i){if(Ct){var s=Xn;if(s){var l=s;if(!mx(i,s)){if(Em(i))throw Error(n(418));s=zi(l.nextSibling);var h=Gn;s&&mx(i,s)?px(h,l):(i.flags=i.flags&-4097|2,Ct=!1,Gn=i)}}else{if(Em(i))throw Error(n(418));i.flags=i.flags&-4097|2,Ct=!1,Gn=i}}}function gx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Gn=i}function Wc(i){if(i!==Gn)return!1;if(!Ct)return gx(i),Ct=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!lm(i.type,i.memoizedProps)),s&&(s=Xn)){if(Em(i))throw Ex(),Error(n(418));for(;s;)px(i,s),s=zi(s.nextSibling)}if(gx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){Xn=zi(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Xn=null}}else Xn=Gn?zi(i.stateNode.nextSibling):null;return!0}function Ex(){for(var i=Xn;i;)i=zi(i.nextSibling)}function Vs(){Xn=Gn=null,Ct=!1}function bm(i){wr===null?wr=[i]:wr.push(i)}var o7=H.ReactCurrentBatchConfig;function vu(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(x){var R=E.refs;x===null?delete R[b]:R[b]=x},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Gc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function yx(i){var s=i._init;return s(i._payload)}function bx(i){function s(W,j){if(i){var K=W.deletions;K===null?(W.deletions=[j],W.flags|=16):K.push(j)}}function l(W,j){if(!i)return null;for(;j!==null;)s(W,j),j=j.sibling;return null}function h(W,j){for(W=new Map;j!==null;)j.key!==null?W.set(j.key,j):W.set(j.index,j),j=j.sibling;return W}function E(W,j){return W=Ji(W,j),W.index=0,W.sibling=null,W}function b(W,j,K){return W.index=K,i?(K=W.alternate,K!==null?(K=K.index,K<j?(W.flags|=2,j):K):(W.flags|=2,j)):(W.flags|=1048576,j)}function x(W){return i&&W.alternate===null&&(W.flags|=2),W}function R(W,j,K,Te){return j===null||j.tag!==6?(j=c0(K,W.mode,Te),j.return=W,j):(j=E(j,K),j.return=W,j)}function U(W,j,K,Te){var Le=K.type;return Le===q?le(W,j,K.props.children,Te,K.key):j!==null&&(j.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===ve&&yx(Le)===j.type)?(Te=E(j,K.props),Te.ref=vu(W,j,K),Te.return=W,Te):(Te=yd(K.type,K.key,K.props,null,W.mode,Te),Te.ref=vu(W,j,K),Te.return=W,Te)}function Z(W,j,K,Te){return j===null||j.tag!==4||j.stateNode.containerInfo!==K.containerInfo||j.stateNode.implementation!==K.implementation?(j=d0(K,W.mode,Te),j.return=W,j):(j=E(j,K.children||[]),j.return=W,j)}function le(W,j,K,Te,Le){return j===null||j.tag!==7?(j=Mo(K,W.mode,Te,Le),j.return=W,j):(j=E(j,K),j.return=W,j)}function he(W,j,K){if(typeof j=="string"&&j!==""||typeof j=="number")return j=c0(""+j,W.mode,K),j.return=W,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case V:return K=yd(j.type,j.key,j.props,null,W.mode,K),K.ref=vu(W,null,j),K.return=W,K;case F:return j=d0(j,W.mode,K),j.return=W,j;case ve:var Te=j._init;return he(W,Te(j._payload),K)}if(_r(j)||re(j))return j=Mo(j,W.mode,K,null),j.return=W,j;Gc(W,j)}return null}function ae(W,j,K,Te){var Le=j!==null?j.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Le!==null?null:R(W,j,""+K,Te);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case V:return K.key===Le?U(W,j,K,Te):null;case F:return K.key===Le?Z(W,j,K,Te):null;case ve:return Le=K._init,ae(W,j,Le(K._payload),Te)}if(_r(K)||re(K))return Le!==null?null:le(W,j,K,Te,null);Gc(W,K)}return null}function we(W,j,K,Te,Le){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return W=W.get(K)||null,R(j,W,""+Te,Le);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case V:return W=W.get(Te.key===null?K:Te.key)||null,U(j,W,Te,Le);case F:return W=W.get(Te.key===null?K:Te.key)||null,Z(j,W,Te,Le);case ve:var je=Te._init;return we(W,j,K,je(Te._payload),Le)}if(_r(Te)||re(Te))return W=W.get(K)||null,le(j,W,Te,Le,null);Gc(j,Te)}return null}function Ne(W,j,K,Te){for(var Le=null,je=null,$e=j,We=j=0,rn=null;$e!==null&&We<K.length;We++){$e.index>We?(rn=$e,$e=null):rn=$e.sibling;var st=ae(W,$e,K[We],Te);if(st===null){$e===null&&($e=rn);break}i&&$e&&st.alternate===null&&s(W,$e),j=b(st,j,We),je===null?Le=st:je.sibling=st,je=st,$e=rn}if(We===K.length)return l(W,$e),Ct&&ko(W,We),Le;if($e===null){for(;We<K.length;We++)$e=he(W,K[We],Te),$e!==null&&(j=b($e,j,We),je===null?Le=$e:je.sibling=$e,je=$e);return Ct&&ko(W,We),Le}for($e=h(W,$e);We<K.length;We++)rn=we($e,W,We,K[We],Te),rn!==null&&(i&&rn.alternate!==null&&$e.delete(rn.key===null?We:rn.key),j=b(rn,j,We),je===null?Le=rn:je.sibling=rn,je=rn);return i&&$e.forEach(function(Zi){return s(W,Zi)}),Ct&&ko(W,We),Le}function Ie(W,j,K,Te){var Le=re(K);if(typeof Le!="function")throw Error(n(150));if(K=Le.call(K),K==null)throw Error(n(151));for(var je=Le=null,$e=j,We=j=0,rn=null,st=K.next();$e!==null&&!st.done;We++,st=K.next()){$e.index>We?(rn=$e,$e=null):rn=$e.sibling;var Zi=ae(W,$e,st.value,Te);if(Zi===null){$e===null&&($e=rn);break}i&&$e&&Zi.alternate===null&&s(W,$e),j=b(Zi,j,We),je===null?Le=Zi:je.sibling=Zi,je=Zi,$e=rn}if(st.done)return l(W,$e),Ct&&ko(W,We),Le;if($e===null){for(;!st.done;We++,st=K.next())st=he(W,st.value,Te),st!==null&&(j=b(st,j,We),je===null?Le=st:je.sibling=st,je=st);return Ct&&ko(W,We),Le}for($e=h(W,$e);!st.done;We++,st=K.next())st=we($e,W,We,st.value,Te),st!==null&&(i&&st.alternate!==null&&$e.delete(st.key===null?We:st.key),j=b(st,j,We),je===null?Le=st:je.sibling=st,je=st);return i&&$e.forEach(function(B7){return s(W,B7)}),Ct&&ko(W,We),Le}function Ft(W,j,K,Te){if(typeof K=="object"&&K!==null&&K.type===q&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case V:e:{for(var Le=K.key,je=j;je!==null;){if(je.key===Le){if(Le=K.type,Le===q){if(je.tag===7){l(W,je.sibling),j=E(je,K.props.children),j.return=W,W=j;break e}}else if(je.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===ve&&yx(Le)===je.type){l(W,je.sibling),j=E(je,K.props),j.ref=vu(W,je,K),j.return=W,W=j;break e}l(W,je);break}else s(W,je);je=je.sibling}K.type===q?(j=Mo(K.props.children,W.mode,Te,K.key),j.return=W,W=j):(Te=yd(K.type,K.key,K.props,null,W.mode,Te),Te.ref=vu(W,j,K),Te.return=W,W=Te)}return x(W);case F:e:{for(je=K.key;j!==null;){if(j.key===je)if(j.tag===4&&j.stateNode.containerInfo===K.containerInfo&&j.stateNode.implementation===K.implementation){l(W,j.sibling),j=E(j,K.children||[]),j.return=W,W=j;break e}else{l(W,j);break}else s(W,j);j=j.sibling}j=d0(K,W.mode,Te),j.return=W,W=j}return x(W);case ve:return je=K._init,Ft(W,j,je(K._payload),Te)}if(_r(K))return Ne(W,j,K,Te);if(re(K))return Ie(W,j,K,Te);Gc(W,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,j!==null&&j.tag===6?(l(W,j.sibling),j=E(j,K),j.return=W,W=j):(l(W,j),j=c0(K,W.mode,Te),j.return=W,W=j),x(W)):l(W,j)}return Ft}var qs=bx(!0),Tx=bx(!1),Xc=ji(null),Kc=null,Ys=null,Tm=null;function _m(){Tm=Ys=Kc=null}function Sm(i){var s=Xc.current;St(Xc),i._currentValue=s}function xm(i,s,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===l)break;i=i.return}}function Ws(i,s){Kc=i,Tm=Ys=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(Mn=!0),i.firstContext=null)}function ur(i){var s=i._currentValue;if(Tm!==i)if(i={context:i,memoizedValue:s,next:null},Ys===null){if(Kc===null)throw Error(n(308));Ys=i,Kc.dependencies={lanes:0,firstContext:i}}else Ys=Ys.next=i;return s}var Po=null;function wm(i){Po===null?Po=[i]:Po.push(i)}function _x(i,s,l,h){var E=s.interleaved;return E===null?(l.next=l,wm(s)):(l.next=E.next,E.next=l),s.interleaved=l,yi(i,h)}function yi(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var qi=!1;function Am(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Sx(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function bi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Yi(i,s,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(ot&2)!==0){var E=h.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),h.pending=s,yi(i,l)}return E=h.interleaved,E===null?(s.next=s,wm(h)):(s.next=E.next,E.next=s),h.interleaved=s,yi(i,l)}function Qc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,Up(i,l)}}function xx(i,s){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 x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};b===null?E=b=x:b=b.next=x,l=l.next}while(l!==null);b===null?E=b=s:b=b.next=s}else E=b=s;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=s:i.next=s,l.lastBaseUpdate=s}function Jc(i,s,l,h){var E=i.updateQueue;qi=!1;var b=E.firstBaseUpdate,x=E.lastBaseUpdate,R=E.shared.pending;if(R!==null){E.shared.pending=null;var U=R,Z=U.next;U.next=null,x===null?b=Z:x.next=Z,x=U;var le=i.alternate;le!==null&&(le=le.updateQueue,R=le.lastBaseUpdate,R!==x&&(R===null?le.firstBaseUpdate=Z:R.next=Z,le.lastBaseUpdate=U))}if(b!==null){var he=E.baseState;x=0,le=Z=U=null,R=b;do{var ae=R.lane,we=R.eventTime;if((h&ae)===ae){le!==null&&(le=le.next={eventTime:we,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var Ne=i,Ie=R;switch(ae=s,we=l,Ie.tag){case 1:if(Ne=Ie.payload,typeof Ne=="function"){he=Ne.call(we,he,ae);break e}he=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Ie.payload,ae=typeof Ne=="function"?Ne.call(we,he,ae):Ne,ae==null)break e;he=v({},he,ae);break e;case 2:qi=!0}}R.callback!==null&&R.lane!==0&&(i.flags|=64,ae=E.effects,ae===null?E.effects=[R]:ae.push(R))}else we={eventTime:we,lane:ae,tag:R.tag,payload:R.payload,callback:R.callback,next:null},le===null?(Z=le=we,U=he):le=le.next=we,x|=ae;if(R=R.next,R===null){if(R=E.shared.pending,R===null)break;ae=R,R=ae.next,ae.next=null,E.lastBaseUpdate=ae,E.shared.pending=null}}while(!0);if(le===null&&(U=he),E.baseState=U,E.firstBaseUpdate=Z,E.lastBaseUpdate=le,s=E.shared.interleaved,s!==null){E=s;do x|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);Io|=x,i.lanes=x,i.memoizedState=he}}function wx(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var ku={},Kr=ji(ku),Pu=ji(ku),Nu=ji(ku);function No(i){if(i===ku)throw Error(n(174));return i}function Cm(i,s){switch(bt(Nu,s),bt(Pu,i),bt(Kr,ku),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:me(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=me(s,i)}St(Kr),bt(Kr,s)}function Gs(){St(Kr),St(Pu),St(Nu)}function Ax(i){No(Nu.current);var s=No(Kr.current),l=me(s,i.type);s!==l&&(bt(Pu,i),bt(Kr,l))}function vm(i){Pu.current===i&&(St(Kr),St(Pu))}var Pt=ji(0);function Zc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var km=[];function Pm(){for(var i=0;i<km.length;i++)km[i]._workInProgressVersionPrimary=null;km.length=0}var ed=H.ReactCurrentDispatcher,Nm=H.ReactCurrentBatchConfig,Oo=0,Nt=null,Wt=null,tn=null,td=!1,Ou=!1,Iu=0,s7=0;function yn(){throw Error(n(321))}function Om(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!xr(i[l],s[l]))return!1;return!0}function Im(i,s,l,h,E,b){if(Oo=b,Nt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,ed.current=i===null||i.memoizedState===null?c7:d7,i=l(h,E),Ou){b=0;do{if(Ou=!1,Iu=0,25<=b)throw Error(n(301));b+=1,tn=Wt=null,s.updateQueue=null,ed.current=f7,i=l(h,E)}while(Ou)}if(ed.current=id,s=Wt!==null&&Wt.next!==null,Oo=0,tn=Wt=Nt=null,td=!1,s)throw Error(n(300));return i}function Rm(){var i=Iu!==0;return Iu=0,i}function Qr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tn===null?Nt.memoizedState=tn=i:tn=tn.next=i,tn}function lr(){if(Wt===null){var i=Nt.alternate;i=i!==null?i.memoizedState:null}else i=Wt.next;var s=tn===null?Nt.memoizedState:tn.next;if(s!==null)tn=s,Wt=i;else{if(i===null)throw Error(n(310));Wt=i,i={memoizedState:Wt.memoizedState,baseState:Wt.baseState,baseQueue:Wt.baseQueue,queue:Wt.queue,next:null},tn===null?Nt.memoizedState=tn=i:tn=tn.next=i}return tn}function Ru(i,s){return typeof s=="function"?s(i):s}function Lm(i){var s=lr(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Wt,E=h.baseQueue,b=l.pending;if(b!==null){if(E!==null){var x=E.next;E.next=b.next,b.next=x}h.baseQueue=E=b,l.pending=null}if(E!==null){b=E.next,h=h.baseState;var R=x=null,U=null,Z=b;do{var le=Z.lane;if((Oo&le)===le)U!==null&&(U=U.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 he={lane:le,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};U===null?(R=U=he,x=h):U=U.next=he,Nt.lanes|=le,Io|=le}Z=Z.next}while(Z!==null&&Z!==b);U===null?x=h:U.next=R,xr(h,s.memoizedState)||(Mn=!0),s.memoizedState=h,s.baseState=x,s.baseQueue=U,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do b=E.lane,Nt.lanes|=b,Io|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Dm(i){var s=lr(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,b=s.memoizedState;if(E!==null){l.pending=null;var x=E=E.next;do b=i(b,x.action),x=x.next;while(x!==E);xr(b,s.memoizedState)||(Mn=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),l.lastRenderedState=b}return[b,h]}function Cx(){}function vx(i,s){var l=Nt,h=lr(),E=s(),b=!xr(h.memoizedState,E);if(b&&(h.memoizedState=E,Mn=!0),h=h.queue,Mm(Nx.bind(null,l,h,i),[i]),h.getSnapshot!==s||b||tn!==null&&tn.memoizedState.tag&1){if(l.flags|=2048,Lu(9,Px.bind(null,l,h,E,s),void 0,null),nn===null)throw Error(n(349));(Oo&30)!==0||kx(l,s,E)}return E}function kx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Nt.updateQueue,s===null?(s={lastEffect:null,stores:null},Nt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function Px(i,s,l,h){s.value=l,s.getSnapshot=h,Ox(s)&&Ix(i)}function Nx(i,s,l){return l(function(){Ox(s)&&Ix(i)})}function Ox(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!xr(i,l)}catch(h){return!0}}function Ix(i){var s=yi(i,1);s!==null&&kr(s,i,1,-1)}function Rx(i){var s=Qr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ru,lastRenderedState:i},s.queue=i,i=i.dispatch=l7.bind(null,Nt,i),[s.memoizedState,i]}function Lu(i,s,l,h){return i={tag:i,create:s,destroy:l,deps:h,next:null},s=Nt.updateQueue,s===null?(s={lastEffect:null,stores:null},Nt.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,s.lastEffect=i)),i}function Lx(){return lr().memoizedState}function nd(i,s,l,h){var E=Qr();Nt.flags|=i,E.memoizedState=Lu(1|s,l,void 0,h===void 0?null:h)}function rd(i,s,l,h){var E=lr();h=h===void 0?null:h;var b=void 0;if(Wt!==null){var x=Wt.memoizedState;if(b=x.destroy,h!==null&&Om(h,x.deps)){E.memoizedState=Lu(s,l,b,h);return}}Nt.flags|=i,E.memoizedState=Lu(1|s,l,b,h)}function Dx(i,s){return nd(8390656,8,i,s)}function Mm(i,s){return rd(2048,8,i,s)}function Mx(i,s){return rd(4,2,i,s)}function Fx(i,s){return rd(4,4,i,s)}function Bx(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Ux(i,s,l){return l=l!=null?l.concat([i]):null,rd(4,4,Bx.bind(null,s,i),l)}function Fm(){}function Hx(i,s){var l=lr();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&Om(s,h[1])?h[0]:(l.memoizedState=[i,s],i)}function zx(i,s){var l=lr();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&Om(s,h[1])?h[0]:(i=i(),l.memoizedState=[i,s],i)}function jx(i,s,l){return(Oo&21)===0?(i.baseState&&(i.baseState=!1,Mn=!0),i.memoizedState=l):(xr(l,s)||(l=yS(),Nt.lanes|=l,Io|=l,i.baseState=!0),s)}function a7(i,s){var l=ct;ct=l!==0&&4>l?l:4,i(!0);var h=Nm.transition;Nm.transition={};try{i(!1),s()}finally{ct=l,Nm.transition=h}}function $x(){return lr().memoizedState}function u7(i,s,l){var h=Ki(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Vx(i))qx(s,l);else if(l=_x(i,s,l,h),l!==null){var E=An();kr(l,i,h,E),Yx(l,s,h)}}function l7(i,s,l){var h=Ki(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Vx(i))qx(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var x=s.lastRenderedState,R=b(x,l);if(E.hasEagerState=!0,E.eagerState=R,xr(R,x)){var U=s.interleaved;U===null?(E.next=E,wm(s)):(E.next=U.next,U.next=E),s.interleaved=E;return}}catch(Z){}l=_x(i,s,E,h),l!==null&&(E=An(),kr(l,i,h,E),Yx(l,s,h))}}function Vx(i){var s=i.alternate;return i===Nt||s!==null&&s===Nt}function qx(i,s){Ou=td=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function Yx(i,s,l){if((l&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,Up(i,l)}}var id={readContext:ur,useCallback:yn,useContext:yn,useEffect:yn,useImperativeHandle:yn,useInsertionEffect:yn,useLayoutEffect:yn,useMemo:yn,useReducer:yn,useRef:yn,useState:yn,useDebugValue:yn,useDeferredValue:yn,useTransition:yn,useMutableSource:yn,useSyncExternalStore:yn,useId:yn,unstable_isNewReconciler:!1},c7={readContext:ur,useCallback:function(i,s){return Qr().memoizedState=[i,s===void 0?null:s],i},useContext:ur,useEffect:Dx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,nd(4194308,4,Bx.bind(null,s,i),l)},useLayoutEffect:function(i,s){return nd(4194308,4,i,s)},useInsertionEffect:function(i,s){return nd(4,2,i,s)},useMemo:function(i,s){var l=Qr();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var h=Qr();return s=l!==void 0?l(s):s,h.memoizedState=h.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},h.queue=i,i=i.dispatch=u7.bind(null,Nt,i),[h.memoizedState,i]},useRef:function(i){var s=Qr();return i={current:i},s.memoizedState=i},useState:Rx,useDebugValue:Fm,useDeferredValue:function(i){return Qr().memoizedState=i},useTransition:function(){var i=Rx(!1),s=i[0];return i=a7.bind(null,i[1]),Qr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var h=Nt,E=Qr();if(Ct){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),nn===null)throw Error(n(349));(Oo&30)!==0||kx(h,s,l)}E.memoizedState=l;var b={value:l,getSnapshot:s};return E.queue=b,Dx(Nx.bind(null,h,b,i),[i]),h.flags|=2048,Lu(9,Px.bind(null,h,b,l,s),void 0,null),l},useId:function(){var i=Qr(),s=nn.identifierPrefix;if(Ct){var l=Ei,h=gi;l=(h&~(1<<32-Sr(h)-1)).toString(32)+l,s=":"+s+"R"+l,l=Iu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=s7++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},d7={readContext:ur,useCallback:Hx,useContext:ur,useEffect:Mm,useImperativeHandle:Ux,useInsertionEffect:Mx,useLayoutEffect:Fx,useMemo:zx,useReducer:Lm,useRef:Lx,useState:function(){return Lm(Ru)},useDebugValue:Fm,useDeferredValue:function(i){var s=lr();return jx(s,Wt.memoizedState,i)},useTransition:function(){var i=Lm(Ru)[0],s=lr().memoizedState;return[i,s]},useMutableSource:Cx,useSyncExternalStore:vx,useId:$x,unstable_isNewReconciler:!1},f7={readContext:ur,useCallback:Hx,useContext:ur,useEffect:Mm,useImperativeHandle:Ux,useInsertionEffect:Mx,useLayoutEffect:Fx,useMemo:zx,useReducer:Dm,useRef:Lx,useState:function(){return Dm(Ru)},useDebugValue:Fm,useDeferredValue:function(i){var s=lr();return Wt===null?s.memoizedState=i:jx(s,Wt.memoizedState,i)},useTransition:function(){var i=Dm(Ru)[0],s=lr().memoizedState;return[i,s]},useMutableSource:Cx,useSyncExternalStore:vx,useId:$x,unstable_isNewReconciler:!1};function Ar(i,s){if(i&&i.defaultProps){s=v({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function Bm(i,s,l,h){s=i.memoizedState,l=l(h,s),l=l==null?s:v({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var od={isMounted:function(i){return(i=i._reactInternals)?wo(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var h=An(),E=Ki(i),b=bi(h,E);b.payload=s,l!=null&&(b.callback=l),s=Yi(i,b,E),s!==null&&(kr(s,i,E,h),Qc(s,i,E))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var h=An(),E=Ki(i),b=bi(h,E);b.tag=1,b.payload=s,l!=null&&(b.callback=l),s=Yi(i,b,E),s!==null&&(kr(s,i,E,h),Qc(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=An(),h=Ki(i),E=bi(l,h);E.tag=2,s!=null&&(E.callback=s),s=Yi(i,E,h),s!==null&&(kr(s,i,h,l),Qc(s,i,h))}};function Wx(i,s,l,h,E,b,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,x):s.prototype&&s.prototype.isPureReactComponent?!Tu(l,h)||!Tu(E,b):!0}function Gx(i,s,l){var h=!1,E=$i,b=s.contextType;return typeof b=="object"&&b!==null?b=ur(b):(E=Dn(s)?Co:En.current,h=s.contextTypes,b=(h=h!=null)?zs(i,E):$i),s=new s(l,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=od,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function Xx(i,s,l,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,h),s.state!==i&&od.enqueueReplaceState(s,s.state,null)}function Um(i,s,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},Am(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=ur(b):(b=Dn(s)?Co:En.current,E.context=zs(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Bm(i,s,b,l),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&od.enqueueReplaceState(E,E.state,null),Jc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Xs(i,s){try{var l="",h=s;do l+=De(h),h=h.return;while(h);var E=l}catch(b){E=`
16
16
  Error generating stack: `+b.message+`
17
- `+b.stack}return{value:i,source:s,stack:E,digest:null}}function Bm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function Um(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var r7=typeof WeakMap=="function"?WeakMap:Map;function Yx(i,s,l){l=yi(-1,l),l.tag=3,l.payload={element:null};var h=s.value;return l.callback=function(){fd||(fd=!0,e0=h),Um(i,s)},l}function Wx(i,s,l){l=yi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=s.value;l.payload=function(){return h(E)},l.callback=function(){Um(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){Um(i,s),typeof h!="function"&&(Gi===null?Gi=new Set([this]):Gi.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function Gx(i,s,l){var h=i.pingCache;if(h===null){h=i.pingCache=new r7;var E=new Set;h.set(s,E)}else E=h.get(s),E===void 0&&(E=new Set,h.set(s,E));E.has(l)||(E.add(l),i=E7.bind(null,i,s,l),s.then(i,i))}function Xx(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Kx(i,s,l,h,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=yi(-1,1),s.tag=2,Yi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var i7=H.ReactCurrentOwner,Mn=!1;function wn(i,s,l,h){s.child=i===null?gx(s,null,l,h):qs(s,i.child,l,h)}function Qx(i,s,l,h,E){l=l.render;var b=s.ref;return Ws(s,E),h=Nm(i,s,l,h,b,E),l=Om(),i!==null&&!Mn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,bi(i,s,E)):(At&&l&&hm(s),s.flags|=1,wn(i,s,h,E),s.child)}function Jx(i,s,l,h,E){if(i===null){var b=l.type;return typeof b=="function"&&!a0(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=b,Zx(i,s,b,h,E)):(i=yd(l.type,null,h,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(b=i.child,(i.lanes&E)===0){var x=b.memoizedProps;if(l=l.compare,l=l!==null?l:Tu,l(x,h)&&i.ref===s.ref)return bi(i,s,E)}return s.flags|=1,i=Ji(b,h),i.ref=s.ref,i.return=s,s.child=i}function Zx(i,s,l,h,E){if(i!==null){var b=i.memoizedProps;if(Tu(b,h)&&i.ref===s.ref)if(Mn=!1,s.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Mn=!0);else return s.lanes=i.lanes,bi(i,s,E)}return Hm(i,s,l,h,E)}function e2(i,s,l){var h=s.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(Qs,Xn),Xn|=l;else{if((l&1073741824)===0)return i=b!==null?b.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,bt(Qs,Xn),Xn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:l,bt(Qs,Xn),Xn|=h}else b!==null?(h=b.baseLanes|l,s.memoizedState=null):h=l,bt(Qs,Xn),Xn|=h;return wn(i,s,E,l),s.child}function t2(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function Hm(i,s,l,h,E){var b=Dn(l)?Ao:En.current;return b=zs(s,b),Ws(s,E),l=Nm(i,s,l,h,b,E),h=Om(),i!==null&&!Mn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,bi(i,s,E)):(At&&h&&hm(s),s.flags|=1,wn(i,s,l,E),s.child)}function n2(i,s,l,h,E){if(Dn(l)){var b=!0;$c(s)}else b=!1;if(Ws(s,E),s.stateNode===null)ad(i,s),Vx(s,l,h),Fm(s,l,h,E),h=!0;else if(i===null){var x=s.stateNode,R=s.memoizedProps;x.props=R;var U=x.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=ar(Z):(Z=Dn(l)?Ao:En.current,Z=zs(s,Z));var ce=l.getDerivedStateFromProps,he=typeof ce=="function"||typeof x.getSnapshotBeforeUpdate=="function";he||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==h||U!==Z)&&qx(s,x,h,Z),qi=!1;var se=s.memoizedState;x.state=se,Jc(s,h,x,E),U=s.memoizedState,R!==h||se!==U||Ln.current||qi?(typeof ce=="function"&&(Mm(s,l,ce,h),U=s.memoizedState),(R=qi||$x(s,l,R,h,se,U,Z))?(he||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=U),x.props=h,x.state=U,x.context=Z,h=R):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{x=s.stateNode,yx(i,s),R=s.memoizedProps,Z=s.type===s.elementType?R:wr(s.type,R),x.props=Z,he=s.pendingProps,se=x.context,U=l.contextType,typeof U=="object"&&U!==null?U=ar(U):(U=Dn(l)?Ao:En.current,U=zs(s,U));var we=l.getDerivedStateFromProps;(ce=typeof we=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==he||se!==U)&&qx(s,x,h,U),qi=!1,se=s.memoizedState,x.state=se,Jc(s,h,x,E);var Pe=s.memoizedState;R!==he||se!==Pe||Ln.current||qi?(typeof we=="function"&&(Mm(s,l,we,h),Pe=s.memoizedState),(Z=qi||$x(s,l,Z,h,se,Pe,U)||!1)?(ce||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,Pe,U),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,Pe,U)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Pe),x.props=h,x.state=Pe,x.context=U,h=Z):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),h=!1)}return zm(i,s,l,h,b,E)}function zm(i,s,l,h,E,b){t2(i,s);var x=(s.flags&128)!==0;if(!h&&!x)return E&&ax(s,l,!1),bi(i,s,b);h=s.stateNode,i7.current=s;var R=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&x?(s.child=qs(s,i.child,null,b),s.child=qs(s,null,R,b)):wn(i,s,R,b),s.memoizedState=h.state,E&&ax(s,l,!0),s.child}function r2(i){var s=i.stateNode;s.pendingContext?ox(i,s.pendingContext,s.pendingContext!==s.context):s.context&&ox(i,s.context,!1),wm(i,s.containerInfo)}function i2(i,s,l,h,E){return Vs(),Em(E),s.flags|=256,wn(i,s,l,h),s.child}var jm={dehydrated:null,treeContext:null,retryLane:0};function $m(i){return{baseLanes:i,cachePool:null,transitions:null}}function o2(i,s,l){var h=s.pendingProps,E=kt.current,b=!1,x=(s.flags&128)!==0,R;if((R=x)||(R=i!==null&&i.memoizedState===null?!1:(E&2)!==0),R?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),bt(kt,E&1),i===null)return gm(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=h.children,i=h.fallback,b?(h=s.mode,b=s.child,x={mode:"hidden",children:x},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=x):b=bd(x,h,0,null),i=Mo(i,h,l,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=$m(l),s.memoizedState=jm,i):Vm(s,x));if(E=i.memoizedState,E!==null&&(R=E.dehydrated,R!==null))return o7(i,s,x,h,R,E,l);if(b){b=h.fallback,x=s.mode,E=i.child,R=E.sibling;var U={mode:"hidden",children:h.children};return(x&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=U,s.deletions=null):(h=Ji(E,U),h.subtreeFlags=E.subtreeFlags&14680064),R!==null?b=Ji(R,b):(b=Mo(b,x,l,null),b.flags|=2),b.return=s,h.return=s,h.sibling=b,s.child=h,h=b,b=s.child,x=i.child.memoizedState,x=x===null?$m(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},b.memoizedState=x,b.childLanes=i.childLanes&~l,s.memoizedState=jm,h}return b=i.child,i=b.sibling,h=Ji(b,{mode:"visible",children:h.children}),(s.mode&1)===0&&(h.lanes=l),h.return=s,h.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=h,s.memoizedState=null,h}function Vm(i,s){return s=bd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function sd(i,s,l,h){return h!==null&&Em(h),qs(s,i.child,null,l),i=Vm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function o7(i,s,l,h,E,b,x){if(l)return s.flags&256?(s.flags&=-257,h=Bm(Error(n(422))),sd(i,s,x,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=h.fallback,E=s.mode,h=bd({mode:"visible",children:h.children},E,0,null),b=Mo(b,E,x,null),b.flags|=2,h.return=s,b.return=s,h.sibling=b,s.child=h,(s.mode&1)!==0&&qs(s,i.child,null,x),s.child.memoizedState=$m(x),s.memoizedState=jm,b);if((s.mode&1)===0)return sd(i,s,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var R=h.dgst;return h=R,b=Error(n(419)),h=Bm(b,h,void 0),sd(i,s,x,h)}if(R=(x&i.childLanes)!==0,Mn||R){if(h=nn,h!==null){switch(x&-x){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|x))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,Ei(i,E),vr(h,i,E,-1))}return s0(),h=Bm(Error(n(421))),sd(i,s,x,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=y7.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,Gn=zi(E.nextSibling),Wn=s,At=!0,xr=null,i!==null&&(or[sr++]=mi,or[sr++]=gi,or[sr++]=vo,mi=i.id,gi=i.overflow,vo=s),s=Vm(s,h.children),s.flags|=4096,s)}function s2(i,s,l){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),_m(i.return,s,l)}function qm(i,s,l,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=l,b.tailMode=E)}function a2(i,s,l){var h=s.pendingProps,E=h.revealOrder,b=h.tail;if(wn(i,s,h.children,l),h=kt.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&s2(i,l,s);else if(i.tag===19)s2(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(bt(kt,h),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(l=s.child,E=null;l!==null;)i=l.alternate,i!==null&&Zc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=s.child,s.child=null):(E=l.sibling,l.sibling=null),qm(s,!1,E,l,b);break;case"backwards":for(l=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&Zc(i)===null){s.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}qm(s,!0,l,null,b);break;case"together":qm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ad(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function bi(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),Io|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Ji(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Ji(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function s7(i,s,l){switch(s.tag){case 3:r2(s),Vs();break;case 5:_x(s);break;case 1:Dn(s.type)&&$c(s);break;case 4:wm(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;bt(Xc,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(bt(kt,kt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?o2(i,s,l):(bt(kt,kt.current&1),i=bi(i,s,l),i!==null?i.sibling:null);bt(kt,kt.current&1);break;case 19:if(h=(l&s.childLanes)!==0,(i.flags&128)!==0){if(h)return a2(i,s,l);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(kt,kt.current),h)break;return null;case 22:case 23:return s.lanes=0,e2(i,s,l)}return bi(i,s,l)}var u2,Ym,l2,c2;u2=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Ym=function(){},l2=function(i,s,l,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,No(Xr.current);var b=null;switch(l){case"input":E=Rn(i,E),h=Rn(i,h),b=[];break;case"select":E=C({},E,{value:void 0}),h=C({},h,{value:void 0}),b=[];break;case"textarea":E=Me(i,E),h=Me(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Hc)}an(l,h);var x;l=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var R=E[Z];for(x in R)R.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(o.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in h){var U=h[Z];if(R=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&U!==R&&(U!=null||R!=null))if(Z==="style")if(R){for(x in R)!R.hasOwnProperty(x)||U&&U.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in U)U.hasOwnProperty(x)&&R[x]!==U[x]&&(l||(l={}),l[x]=U[x])}else l||(b||(b=[]),b.push(Z,l)),l=U;else Z==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,R=R?R.__html:void 0,U!=null&&R!==U&&(b=b||[]).push(Z,U)):Z==="children"?typeof U!="string"&&typeof U!="number"||(b=b||[]).push(Z,""+U):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(o.hasOwnProperty(Z)?(U!=null&&Z==="onScroll"&&_t("scroll",i),b||R===U||(b=[])):(b=b||[]).push(Z,U))}l&&(b=b||[]).push("style",l);var Z=b;(s.updateQueue=Z)&&(s.flags|=4)}},c2=function(i,s,l,h){l!==h&&(s.flags|=4)};function Du(i,s){if(!At)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function bn(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(s)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,s}function a7(i,s,l){var h=s.pendingProps;switch(pm(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bn(s),null;case 1:return Dn(s.type)&&jc(),bn(s),null;case 3:return h=s.stateNode,Gs(),St(Ln),St(En),vm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Wc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,xr!==null&&(r0(xr),xr=null))),Ym(i,s),bn(s),null;case 5:Cm(s);var E=No(Nu.current);if(l=s.type,i!==null&&s.stateNode!=null)l2(i,s,l,h,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return bn(s),null}if(i=No(Xr.current),Wc(s)){h=s.stateNode,l=s.type;var b=s.memoizedProps;switch(h[Gr]=s,h[Cu]=b,i=(s.mode&1)!==0,l){case"dialog":_t("cancel",h),_t("close",h);break;case"iframe":case"object":case"embed":_t("load",h);break;case"video":case"audio":for(E=0;E<Su.length;E++)_t(Su[E],h);break;case"source":_t("error",h);break;case"img":case"image":case"link":_t("error",h),_t("load",h);break;case"details":_t("toggle",h);break;case"input":Ri(h,b),_t("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},_t("invalid",h);break;case"textarea":Be(h,b),_t("invalid",h)}an(l,b),E=null;for(var x in b)if(b.hasOwnProperty(x)){var R=b[x];x==="children"?typeof R=="string"?h.textContent!==R&&(b.suppressHydrationWarning!==!0&&Uc(h.textContent,R,i),E=["children",R]):typeof R=="number"&&h.textContent!==""+R&&(b.suppressHydrationWarning!==!0&&Uc(h.textContent,R,i),E=["children",""+R]):o.hasOwnProperty(x)&&R!=null&&x==="onScroll"&&_t("scroll",h)}switch(l){case"input":on(h),Ps(h,b,!0);break;case"textarea":on(h),pt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=Hc)}h=E,s.updateQueue=h,h!==null&&(s.flags|=4)}else{x=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Gr]=s,i[Cu]=h,u2(i,s,!1,!1),s.stateNode=i;e:{switch(x=Yr(l,h),l){case"dialog":_t("cancel",i),_t("close",i),E=h;break;case"iframe":case"object":case"embed":_t("load",i),E=h;break;case"video":case"audio":for(E=0;E<Su.length;E++)_t(Su[E],i);E=h;break;case"source":_t("error",i),E=h;break;case"img":case"image":case"link":_t("error",i),_t("load",i),E=h;break;case"details":_t("toggle",i),E=h;break;case"input":Ri(i,h),E=Rn(i,h),_t("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=C({},h,{value:void 0}),_t("invalid",i);break;case"textarea":Be(i,h),E=Me(i,h),_t("invalid",i);break;default:E=h}an(l,E),R=E;for(b in R)if(R.hasOwnProperty(b)){var U=R[b];b==="style"?sn(i,U):b==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&qe(i,U)):b==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Re(i,U):typeof U=="number"&&Re(i,""+U):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?U!=null&&b==="onScroll"&&_t("scroll",i):U!=null&&k(i,b,U,x))}switch(l){case"input":on(i),Ps(i,h,!1);break;case"textarea":on(i),pt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+xe(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?Ce(i,!!h.multiple,b,!1):h.defaultValue!=null&&Ce(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Hc)}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&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return bn(s),null;case 6:if(i&&s.stateNode!=null)c2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(l=No(Nu.current),No(Xr.current),Wc(s)){if(h=s.stateNode,l=s.memoizedProps,h[Gr]=s,(b=h.nodeValue!==l)&&(i=Wn,i!==null))switch(i.tag){case 3:Uc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Uc(h.nodeValue,l,(i.mode&1)!==0)}b&&(s.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Gr]=s,s.stateNode=h}return bn(s),null;case 13:if(St(kt),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(At&&Gn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)hx(),Vs(),s.flags|=98560,b=!1;else if(b=Wc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Gr]=s}else Vs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;bn(s),b=!1}else xr!==null&&(r0(xr),xr=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(kt.current&1)!==0?Gt===0&&(Gt=3):s0())),s.updateQueue!==null&&(s.flags|=4),bn(s),null);case 4:return Gs(),Ym(i,s),i===null&&xu(s.stateNode.containerInfo),bn(s),null;case 10:return Tm(s.type._context),bn(s),null;case 17:return Dn(s.type)&&jc(),bn(s),null;case 19:if(St(kt),b=s.memoizedState,b===null)return bn(s),null;if(h=(s.flags&128)!==0,x=b.rendering,x===null)if(h)Du(b,!1);else{if(Gt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Zc(i),x!==null){for(s.flags|=128,Du(b,!1),h=x.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=l,l=s.child;l!==null;)b=l,i=h,b.flags&=14680066,x=b.alternate,x===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=x.childLanes,b.lanes=x.lanes,b.child=x.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=x.memoizedProps,b.memoizedState=x.memoizedState,b.updateQueue=x.updateQueue,b.type=x.type,i=x.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return bt(kt,kt.current&1|2),s.child}i=i.sibling}b.tail!==null&&Mt()>Js&&(s.flags|=128,h=!0,Du(b,!1),s.lanes=4194304)}else{if(!h)if(i=Zc(x),i!==null){if(s.flags|=128,h=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Du(b,!0),b.tail===null&&b.tailMode==="hidden"&&!x.alternate&&!At)return bn(s),null}else 2*Mt()-b.renderingStartTime>Js&&l!==1073741824&&(s.flags|=128,h=!0,Du(b,!1),s.lanes=4194304);b.isBackwards?(x.sibling=s.child,s.child=x):(l=b.last,l!==null?l.sibling=x:s.child=x,b.last=x)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=Mt(),s.sibling=null,l=kt.current,bt(kt,h?l&1|2:l&1),s):(bn(s),null);case 22:case 23:return o0(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(Xn&1073741824)!==0&&(bn(s),s.subtreeFlags&6&&(s.flags|=8192)):bn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function u7(i,s){switch(pm(s),s.tag){case 1:return Dn(s.type)&&jc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Gs(),St(Ln),St(En),vm(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Cm(s),null;case 13:if(St(kt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Vs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return St(kt),null;case 4:return Gs(),null;case 10:return Tm(s.type._context),null;case 22:case 23:return o0(),null;case 24:return null;default:return null}}var ud=!1,Tn=!1,l7=typeof WeakSet=="function"?WeakSet:Set,ve=null;function Ks(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Ot(i,s,h)}else l.current=null}function Wm(i,s,l){try{l()}catch(h){Ot(i,s,h)}}var d2=!1;function c7(i,s){if(om=kc,i=$S(),Qp(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(be){l=null;break e}var x=0,R=-1,U=-1,Z=0,ce=0,he=i,se=null;t:for(;;){for(var we;he!==l||E!==0&&he.nodeType!==3||(R=x+E),he!==b||h!==0&&he.nodeType!==3||(U=x+h),he.nodeType===3&&(x+=he.nodeValue.length),(we=he.firstChild)!==null;)se=he,he=we;for(;;){if(he===i)break t;if(se===l&&++Z===E&&(R=x),se===b&&++ce===h&&(U=x),(we=he.nextSibling)!==null)break;he=se,se=he.parentNode}he=we}l=R===-1||U===-1?null:{start:R,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(sm={focusedElem:i,selectionRange:l},kc=!1,ve=s;ve!==null;)if(s=ve,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,ve=i;else for(;ve!==null;){s=ve;try{var Pe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Pe!==null){var Ie=Pe.memoizedProps,Ft=Pe.memoizedState,Y=s.stateNode,z=Y.getSnapshotBeforeUpdate(s.elementType===s.type?Ie:wr(s.type,Ie),Ft);Y.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var K=s.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(be){Ot(s,s.return,be)}if(i=s.sibling,i!==null){i.return=s.return,ve=i;break}ve=s.return}return Pe=d2,d2=!1,Pe}function Mu(i,s,l){var h=s.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&&Wm(s,l,b)}E=E.next}while(E!==h)}}function ld(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==s)}}function Gm(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function f2(i){var s=i.alternate;s!==null&&(i.alternate=null,f2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Gr],delete s[Cu],delete s[cm],delete s[YB],delete s[WB])),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 h2(i){return i.tag===5||i.tag===3||i.tag===4}function p2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||h2(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 Xm(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=Hc));else if(h!==4&&(i=i.child,i!==null))for(Xm(i,s,l),i=i.sibling;i!==null;)Xm(i,s,l),i=i.sibling}function Km(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Km(i,s,l),i=i.sibling;i!==null;)Km(i,s,l),i=i.sibling}var un=null,Cr=!1;function Wi(i,s,l){for(l=l.child;l!==null;)m2(i,s,l),l=l.sibling}function m2(i,s,l){if(Wr&&typeof Wr.onCommitFiberUnmount=="function")try{Wr.onCommitFiberUnmount(Sc,l)}catch(R){}switch(l.tag){case 5:Tn||Ks(l,s);case 6:var h=un,E=Cr;un=null,Wi(i,s,l),un=h,Cr=E,un!==null&&(Cr?(i=un,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):un.removeChild(l.stateNode));break;case 18:un!==null&&(Cr?(i=un,l=l.stateNode,i.nodeType===8?lm(i.parentNode,l):i.nodeType===1&&lm(i,l),pu(i)):lm(un,l.stateNode));break;case 4:h=un,E=Cr,un=l.stateNode.containerInfo,Cr=!0,Wi(i,s,l),un=h,Cr=E;break;case 0:case 11:case 14:case 15:if(!Tn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,x=b.destroy;b=b.tag,x!==void 0&&((b&2)!==0||(b&4)!==0)&&Wm(l,s,x),E=E.next}while(E!==h)}Wi(i,s,l);break;case 1:if(!Tn&&(Ks(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(R){Ot(l,s,R)}Wi(i,s,l);break;case 21:Wi(i,s,l);break;case 22:l.mode&1?(Tn=(h=Tn)||l.memoizedState!==null,Wi(i,s,l),Tn=h):Wi(i,s,l);break;default:Wi(i,s,l)}}function g2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new l7),s.forEach(function(h){var E=b7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function Ar(i,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var b=i,x=s,R=x;e:for(;R!==null;){switch(R.tag){case 5:un=R.stateNode,Cr=!1;break e;case 3:un=R.stateNode.containerInfo,Cr=!0;break e;case 4:un=R.stateNode.containerInfo,Cr=!0;break e}R=R.return}if(un===null)throw Error(n(160));m2(b,x,E),un=null,Cr=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(Z){Ot(E,s,Z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)E2(s,i),s=s.sibling}function E2(i,s){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Ar(s,i),Qr(i),h&4){try{Mu(3,i,i.return),ld(3,i)}catch(Ie){Ot(i,i.return,Ie)}try{Mu(5,i,i.return)}catch(Ie){Ot(i,i.return,Ie)}}break;case 1:Ar(s,i),Qr(i),h&512&&l!==null&&Ks(l,l.return);break;case 5:if(Ar(s,i),Qr(i),h&512&&l!==null&&Ks(l,l.return),i.flags&32){var E=i.stateNode;try{Re(E,"")}catch(Ie){Ot(i,i.return,Ie)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,x=l!==null?l.memoizedProps:b,R=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{R==="input"&&b.type==="radio"&&b.name!=null&&Li(E,b),Yr(R,x);var Z=Yr(R,b);for(x=0;x<U.length;x+=2){var ce=U[x],he=U[x+1];ce==="style"?sn(E,he):ce==="dangerouslySetInnerHTML"?qe(E,he):ce==="children"?Re(E,he):k(E,ce,he,Z)}switch(R){case"input":di(E,b);break;case"textarea":rt(E,b);break;case"select":var se=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var we=b.value;we!=null?Ce(E,!!b.multiple,we,!1):se!==!!b.multiple&&(b.defaultValue!=null?Ce(E,!!b.multiple,b.defaultValue,!0):Ce(E,!!b.multiple,b.multiple?[]:"",!1))}E[Cu]=b}catch(Ie){Ot(i,i.return,Ie)}}break;case 6:if(Ar(s,i),Qr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Ie){Ot(i,i.return,Ie)}}break;case 3:if(Ar(s,i),Qr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{pu(s.containerInfo)}catch(Ie){Ot(i,i.return,Ie)}break;case 4:Ar(s,i),Qr(i);break;case 13:Ar(s,i),Qr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(Zm=Mt())),h&4&&g2(i);break;case 22:if(ce=l!==null&&l.memoizedState!==null,i.mode&1?(Tn=(Z=Tn)||ce,Ar(s,i),Tn=Z):Ar(s,i),Qr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!ce&&(i.mode&1)!==0)for(ve=i,ce=i.child;ce!==null;){for(he=ve=ce;ve!==null;){switch(se=ve,we=se.child,se.tag){case 0:case 11:case 14:case 15:Mu(4,se,se.return);break;case 1:Ks(se,se.return);var Pe=se.stateNode;if(typeof Pe.componentWillUnmount=="function"){h=se,l=se.return;try{s=h,Pe.props=s.memoizedProps,Pe.state=s.memoizedState,Pe.componentWillUnmount()}catch(Ie){Ot(h,l,Ie)}}break;case 5:Ks(se,se.return);break;case 22:if(se.memoizedState!==null){T2(he);continue}}we!==null?(we.return=se,ve=we):T2(he)}ce=ce.sibling}e:for(ce=null,he=i;;){if(he.tag===5){if(ce===null){ce=he;try{E=he.stateNode,Z?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(R=he.stateNode,U=he.memoizedProps.style,x=U!=null&&U.hasOwnProperty("display")?U.display:null,R.style.display=jt("display",x))}catch(Ie){Ot(i,i.return,Ie)}}}else if(he.tag===6){if(ce===null)try{he.stateNode.nodeValue=Z?"":he.memoizedProps}catch(Ie){Ot(i,i.return,Ie)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===i)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===i)break e;for(;he.sibling===null;){if(he.return===null||he.return===i)break e;ce===he&&(ce=null),he=he.return}ce===he&&(ce=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:Ar(s,i),Qr(i),h&4&&g2(i);break;case 21:break;default:Ar(s,i),Qr(i)}}function Qr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(h2(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&&(Re(E,""),h.flags&=-33);var b=p2(i);Km(i,b,E);break;case 3:case 4:var x=h.stateNode.containerInfo,R=p2(i);Xm(i,R,x);break;default:throw Error(n(161))}}catch(U){Ot(i,i.return,U)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function d7(i,s,l){ve=i,y2(i)}function y2(i,s,l){for(var h=(i.mode&1)!==0;ve!==null;){var E=ve,b=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||ud;if(!x){var R=E.alternate,U=R!==null&&R.memoizedState!==null||Tn;R=ud;var Z=Tn;if(ud=x,(Tn=U)&&!Z)for(ve=E;ve!==null;)x=ve,U=x.child,x.tag===22&&x.memoizedState!==null?_2(E):U!==null?(U.return=x,ve=U):_2(E);for(;b!==null;)ve=b,y2(b),b=b.sibling;ve=E,ud=R,Tn=Z}b2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,ve=b):b2(i)}}function b2(i){for(;ve!==null;){var s=ve;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Tn||ld(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!Tn)if(l===null)h.componentDidMount();else{var E=s.elementType===s.type?l.memoizedProps:wr(s.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&Tx(s,b,h);break;case 3:var x=s.updateQueue;if(x!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}Tx(s,x,l)}break;case 5:var R=s.stateNode;if(l===null&&s.flags&4){l=R;var U=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&l.focus();break;case"img":U.src&&(l.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Z=s.alternate;if(Z!==null){var ce=Z.memoizedState;if(ce!==null){var he=ce.dehydrated;he!==null&&pu(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Tn||s.flags&512&&Gm(s)}catch(se){Ot(s,s.return,se)}}if(s===i){ve=null;break}if(l=s.sibling,l!==null){l.return=s.return,ve=l;break}ve=s.return}}function T2(i){for(;ve!==null;){var s=ve;if(s===i){ve=null;break}var l=s.sibling;if(l!==null){l.return=s.return,ve=l;break}ve=s.return}}function _2(i){for(;ve!==null;){var s=ve;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{ld(4,s)}catch(U){Ot(s,l,U)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch(U){Ot(s,E,U)}}var b=s.return;try{Gm(s)}catch(U){Ot(s,b,U)}break;case 5:var x=s.return;try{Gm(s)}catch(U){Ot(s,x,U)}}}catch(U){Ot(s,s.return,U)}if(s===i){ve=null;break}var R=s.sibling;if(R!==null){R.return=s.return,ve=R;break}ve=s.return}}var f7=Math.ceil,cd=H.ReactCurrentDispatcher,Qm=H.ReactCurrentOwner,lr=H.ReactCurrentBatchConfig,it=0,nn=null,$t=null,ln=0,Xn=0,Qs=ji(0),Gt=0,Fu=null,Io=0,dd=0,Jm=0,Bu=null,Fn=null,Zm=0,Js=1/0,Ti=null,fd=!1,e0=null,Gi=null,hd=!1,Xi=null,pd=0,Uu=0,t0=null,md=-1,gd=0;function Cn(){return(it&6)!==0?Mt():md!==-1?md:md=Mt()}function Ki(i){return(i.mode&1)===0?1:(it&2)!==0&&ln!==0?ln&-ln:XB.transition!==null?(gd===0&&(gd=pS()),gd):(i=ct,i!==0||(i=window.event,i=i===void 0?16:xS(i.type)),i)}function vr(i,s,l,h){if(50<Uu)throw Uu=0,t0=null,Error(n(185));lu(i,l,h),((it&2)===0||i!==nn)&&(i===nn&&((it&2)===0&&(dd|=l),Gt===4&&Qi(i,ln)),Bn(i,h),l===1&&it===0&&(s.mode&1)===0&&(Js=Mt()+500,Vc&&Vi()))}function Bn(i,s){var l=i.callbackNode;X9(i,s);var h=Cc(i,i===nn?ln:0);if(h===0)l!==null&&dS(l),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(l!=null&&dS(l),s===1)i.tag===0?GB(x2.bind(null,i)):ux(x2.bind(null,i)),VB(function(){(it&6)===0&&Vi()}),l=null;else{switch(mS(h)){case 1:l=Lp;break;case 4:l=fS;break;case 16:l=_c;break;case 536870912:l=hS;break;default:l=_c}l=O2(l,S2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function S2(i,s){if(md=-1,gd=0,(it&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Zs()&&i.callbackNode!==l)return null;var h=Cc(i,i===nn?ln:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Ed(i,h);else{s=h;var E=it;it|=2;var b=C2();(nn!==i||ln!==s)&&(Ti=null,Js=Mt()+500,Lo(i,s));do try{m7();break}catch(R){w2(i,R)}while(!0);bm(),cd.current=b,it=E,$t!==null?s=0:(nn=null,ln=0,s=Gt)}if(s!==0){if(s===2&&(E=Dp(i),E!==0&&(h=E,s=n0(i,E))),s===1)throw l=Fu,Lo(i,0),Qi(i,h),Bn(i,Mt()),l;if(s===6)Qi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!h7(E)&&(s=Ed(i,h),s===2&&(b=Dp(i),b!==0&&(h=b,s=n0(i,b))),s===1))throw l=Fu,Lo(i,0),Qi(i,h),Bn(i,Mt()),l;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:Do(i,Fn,Ti);break;case 3:if(Qi(i,h),(h&130023424)===h&&(s=Zm+500-Mt(),10<s)){if(Cc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){Cn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=um(Do.bind(null,i,Fn,Ti),s);break}Do(i,Fn,Ti);break;case 4:if(Qi(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var x=31-_r(h);b=1<<x,x=s[x],x>E&&(E=x),h&=~b}if(h=E,h=Mt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*f7(h/1960))-h,10<h){i.timeoutHandle=um(Do.bind(null,i,Fn,Ti),h);break}Do(i,Fn,Ti);break;case 5:Do(i,Fn,Ti);break;default:throw Error(n(329))}}}return Bn(i,Mt()),i.callbackNode===l?S2.bind(null,i):null}function n0(i,s){var l=Bu;return i.current.memoizedState.isDehydrated&&(Lo(i,s).flags|=256),i=Ed(i,s),i!==2&&(s=Fn,Fn=l,s!==null&&r0(s)),i}function r0(i){Fn===null?Fn=i:Fn.push.apply(Fn,i)}function h7(i){for(var s=i;;){if(s.flags&16384){var l=s.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(!Sr(b(),E))return!1}catch(x){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Qi(i,s){for(s&=~Jm,s&=~dd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-_r(s),h=1<<l;i[l]=-1,s&=~h}}function x2(i){if((it&6)!==0)throw Error(n(327));Zs();var s=Cc(i,0);if((s&1)===0)return Bn(i,Mt()),null;var l=Ed(i,s);if(i.tag!==0&&l===2){var h=Dp(i);h!==0&&(s=h,l=n0(i,h))}if(l===1)throw l=Fu,Lo(i,0),Qi(i,s),Bn(i,Mt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Do(i,Fn,Ti),Bn(i,Mt()),null}function i0(i,s){var l=it;it|=1;try{return i(s)}finally{it=l,it===0&&(Js=Mt()+500,Vc&&Vi())}}function Ro(i){Xi!==null&&Xi.tag===0&&(it&6)===0&&Zs();var s=it;it|=1;var l=lr.transition,h=ct;try{if(lr.transition=null,ct=1,i)return i()}finally{ct=h,lr.transition=l,it=s,(it&6)===0&&Vi()}}function o0(){Xn=Qs.current,St(Qs)}function Lo(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,$B(l)),$t!==null)for(l=$t.return;l!==null;){var h=l;switch(pm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&jc();break;case 3:Gs(),St(Ln),St(En),vm();break;case 5:Cm(h);break;case 4:Gs();break;case 13:St(kt);break;case 19:St(kt);break;case 10:Tm(h.type._context);break;case 22:case 23:o0()}l=l.return}if(nn=i,$t=i=Ji(i.current,null),ln=Xn=s,Gt=0,Fu=null,Jm=dd=Io=0,Fn=Bu=null,Po!==null){for(s=0;s<Po.length;s++)if(l=Po[s],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,b=l.pending;if(b!==null){var x=b.next;b.next=E,h.next=x}l.pending=h}Po=null}return i}function w2(i,s){do{var l=$t;try{if(bm(),ed.current=id,td){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}td=!1}if(Oo=0,tn=Wt=Pt=null,Ou=!1,Iu=0,Qm.current=null,l===null||l.return===null){Gt=1,Fu=s,$t=null;break}e:{var b=i,x=l.return,R=l,U=s;if(s=ln,R.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var Z=U,ce=R,he=ce.tag;if((ce.mode&1)===0&&(he===0||he===11||he===15)){var se=ce.alternate;se?(ce.updateQueue=se.updateQueue,ce.memoizedState=se.memoizedState,ce.lanes=se.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var we=Xx(x);if(we!==null){we.flags&=-257,Kx(we,x,R,b,s),we.mode&1&&Gx(b,Z,s),s=we,U=Z;var Pe=s.updateQueue;if(Pe===null){var Ie=new Set;Ie.add(U),s.updateQueue=Ie}else Pe.add(U);break e}else{if((s&1)===0){Gx(b,Z,s),s0();break e}U=Error(n(426))}}else if(At&&R.mode&1){var Ft=Xx(x);if(Ft!==null){(Ft.flags&65536)===0&&(Ft.flags|=256),Kx(Ft,x,R,b,s),Em(Xs(U,R));break e}}b=U=Xs(U,R),Gt!==4&&(Gt=2),Bu===null?Bu=[b]:Bu.push(b),b=x;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var Y=Yx(b,U,s);bx(b,Y);break e;case 1:R=U;var z=b.type,K=b.stateNode;if((b.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Gi===null||!Gi.has(K)))){b.flags|=65536,s&=-s,b.lanes|=s;var be=Wx(b,R,s);bx(b,be);break e}}b=b.return}while(b!==null)}v2(l)}catch(Le){s=Le,$t===l&&l!==null&&($t=l=l.return);continue}break}while(!0)}function C2(){var i=cd.current;return cd.current=id,i===null?id:i}function s0(){(Gt===0||Gt===3||Gt===2)&&(Gt=4),nn===null||(Io&268435455)===0&&(dd&268435455)===0||Qi(nn,ln)}function Ed(i,s){var l=it;it|=2;var h=C2();(nn!==i||ln!==s)&&(Ti=null,Lo(i,s));do try{p7();break}catch(E){w2(i,E)}while(!0);if(bm(),it=l,cd.current=h,$t!==null)throw Error(n(261));return nn=null,ln=0,Gt}function p7(){for(;$t!==null;)A2($t)}function m7(){for(;$t!==null&&!H9();)A2($t)}function A2(i){var s=N2(i.alternate,i,Xn);i.memoizedProps=i.pendingProps,s===null?v2(i):$t=s,Qm.current=null}function v2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=a7(l,s,Xn),l!==null){$t=l;return}}else{if(l=u7(l,s),l!==null){l.flags&=32767,$t=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Gt=6,$t=null;return}}if(s=s.sibling,s!==null){$t=s;return}$t=s=i}while(s!==null);Gt===0&&(Gt=5)}function Do(i,s,l){var h=ct,E=lr.transition;try{lr.transition=null,ct=1,g7(i,s,l,h)}finally{lr.transition=E,ct=h}return null}function g7(i,s,l,h){do Zs();while(Xi!==null);if((it&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=l.lanes|l.childLanes;if(K9(i,b),i===nn&&($t=nn=null,ln=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||hd||(hd=!0,O2(_c,function(){return Zs(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=lr.transition,lr.transition=null;var x=ct;ct=1;var R=it;it|=4,Qm.current=null,c7(i,l),E2(l,i),MB(sm),kc=!!om,sm=om=null,i.current=l,d7(l),z9(),it=R,ct=x,lr.transition=b}else i.current=l;if(hd&&(hd=!1,Xi=i,pd=E),b=i.pendingLanes,b===0&&(Gi=null),V9(l.stateNode),Bn(i,Mt()),s!==null)for(h=i.onRecoverableError,l=0;l<s.length;l++)E=s[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(fd)throw fd=!1,i=e0,e0=null,i;return(pd&1)!==0&&i.tag!==0&&Zs(),b=i.pendingLanes,(b&1)!==0?i===t0?Uu++:(Uu=0,t0=i):Uu=0,Vi(),null}function Zs(){if(Xi!==null){var i=mS(pd),s=lr.transition,l=ct;try{if(lr.transition=null,ct=16>i?16:i,Xi===null)var h=!1;else{if(i=Xi,Xi=null,pd=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,ve=i.current;ve!==null;){var b=ve,x=b.child;if((ve.flags&16)!==0){var R=b.deletions;if(R!==null){for(var U=0;U<R.length;U++){var Z=R[U];for(ve=Z;ve!==null;){var ce=ve;switch(ce.tag){case 0:case 11:case 15:Mu(8,ce,b)}var he=ce.child;if(he!==null)he.return=ce,ve=he;else for(;ve!==null;){ce=ve;var se=ce.sibling,we=ce.return;if(f2(ce),ce===Z){ve=null;break}if(se!==null){se.return=we,ve=se;break}ve=we}}}var Pe=b.alternate;if(Pe!==null){var Ie=Pe.child;if(Ie!==null){Pe.child=null;do{var Ft=Ie.sibling;Ie.sibling=null,Ie=Ft}while(Ie!==null)}}ve=b}}if((b.subtreeFlags&2064)!==0&&x!==null)x.return=b,ve=x;else e:for(;ve!==null;){if(b=ve,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Mu(9,b,b.return)}var Y=b.sibling;if(Y!==null){Y.return=b.return,ve=Y;break e}ve=b.return}}var z=i.current;for(ve=z;ve!==null;){x=ve;var K=x.child;if((x.subtreeFlags&2064)!==0&&K!==null)K.return=x,ve=K;else e:for(x=z;ve!==null;){if(R=ve,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:ld(9,R)}}catch(Le){Ot(R,R.return,Le)}if(R===x){ve=null;break e}var be=R.sibling;if(be!==null){be.return=R.return,ve=be;break e}ve=R.return}}if(it=E,Vi(),Wr&&typeof Wr.onPostCommitFiberRoot=="function")try{Wr.onPostCommitFiberRoot(Sc,i)}catch(Le){}h=!0}return h}finally{ct=l,lr.transition=s}}return!1}function k2(i,s,l){s=Xs(l,s),s=Yx(i,s,1),i=Yi(i,s,1),s=Cn(),i!==null&&(lu(i,1,s),Bn(i,s))}function Ot(i,s,l){if(i.tag===3)k2(i,i,l);else for(;s!==null;){if(s.tag===3){k2(s,i,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Gi===null||!Gi.has(h))){i=Xs(l,i),i=Wx(s,i,1),s=Yi(s,i,1),i=Cn(),s!==null&&(lu(s,1,i),Bn(s,i));break}}s=s.return}}function E7(i,s,l){var h=i.pingCache;h!==null&&h.delete(s),s=Cn(),i.pingedLanes|=i.suspendedLanes&l,nn===i&&(ln&l)===l&&(Gt===4||Gt===3&&(ln&130023424)===ln&&500>Mt()-Zm?Lo(i,0):Jm|=l),Bn(i,s)}function P2(i,s){s===0&&((i.mode&1)===0?s=1:(s=wc,wc<<=1,(wc&130023424)===0&&(wc=4194304)));var l=Cn();i=Ei(i,s),i!==null&&(lu(i,s,l),Bn(i,l))}function y7(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),P2(i,l)}function b7(i,s){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(s),P2(i,l)}var N2;N2=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||Ln.current)Mn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return Mn=!1,s7(i,s,l);Mn=(i.flags&131072)!==0}else Mn=!1,At&&(s.flags&1048576)!==0&&lx(s,Yc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;ad(i,s),i=s.pendingProps;var E=zs(s,En.current);Ws(s,l),E=Nm(null,s,h,i,E,l);var b=Om();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Dn(h)?(b=!0,$c(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,xm(s),E.updater=od,s.stateNode=E,E._reactInternals=s,Fm(s,h,i,l),s=zm(null,s,h,!0,b,l)):(s.tag=0,At&&b&&hm(s),wn(null,s,E,l),s=s.child),s;case 16:h=s.elementType;e:{switch(ad(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=_7(h),i=wr(h,i),E){case 0:s=Hm(null,s,h,i,l);break e;case 1:s=n2(null,s,h,i,l);break e;case 11:s=Qx(null,s,h,i,l);break e;case 14:s=Jx(null,s,h,wr(h.type,i),l);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:wr(h,E),Hm(i,s,h,E,l);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:wr(h,E),n2(i,s,h,E,l);case 3:e:{if(r2(s),i===null)throw Error(n(387));h=s.pendingProps,b=s.memoizedState,E=b.element,yx(i,s),Jc(s,h,null,l);var x=s.memoizedState;if(h=x.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=Xs(Error(n(423)),s),s=i2(i,s,h,l,E);break e}else if(h!==E){E=Xs(Error(n(424)),s),s=i2(i,s,h,l,E);break e}else for(Gn=zi(s.stateNode.containerInfo.firstChild),Wn=s,At=!0,xr=null,l=gx(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Vs(),h===E){s=bi(i,s,l);break e}wn(i,s,h,l)}s=s.child}return s;case 5:return _x(s),i===null&&gm(s),h=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,x=E.children,am(h,E)?x=null:b!==null&&am(h,b)&&(s.flags|=32),t2(i,s),wn(i,s,x,l),s.child;case 6:return i===null&&gm(s),null;case 13:return o2(i,s,l);case 4:return wm(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=qs(s,null,h,l):wn(i,s,h,l),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:wr(h,E),Qx(i,s,h,E,l);case 7:return wn(i,s,s.pendingProps,l),s.child;case 8:return wn(i,s,s.pendingProps.children,l),s.child;case 12:return wn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(h=s.type._context,E=s.pendingProps,b=s.memoizedProps,x=E.value,bt(Xc,h._currentValue),h._currentValue=x,b!==null)if(Sr(b.value,x)){if(b.children===E.children&&!Ln.current){s=bi(i,s,l);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var R=b.dependencies;if(R!==null){x=b.child;for(var U=R.firstContext;U!==null;){if(U.context===h){if(b.tag===1){U=yi(-1,l&-l),U.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var ce=Z.pending;ce===null?U.next=U:(U.next=ce.next,ce.next=U),Z.pending=U}}b.lanes|=l,U=b.alternate,U!==null&&(U.lanes|=l),_m(b.return,l,s),R.lanes|=l;break}U=U.next}}else if(b.tag===10)x=b.type===s.type?null:b.child;else if(b.tag===18){if(x=b.return,x===null)throw Error(n(341));x.lanes|=l,R=x.alternate,R!==null&&(R.lanes|=l),_m(x,l,s),x=b.sibling}else x=b.child;if(x!==null)x.return=b;else for(x=b;x!==null;){if(x===s){x=null;break}if(b=x.sibling,b!==null){b.return=x.return,x=b;break}x=x.return}b=x}wn(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,Ws(s,l),E=ar(E),h=h(E),s.flags|=1,wn(i,s,h,l),s.child;case 14:return h=s.type,E=wr(h,s.pendingProps),E=wr(h.type,E),Jx(i,s,h,E,l);case 15:return Zx(i,s,s.type,s.pendingProps,l);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:wr(h,E),ad(i,s),s.tag=1,Dn(h)?(i=!0,$c(s)):i=!1,Ws(s,l),Vx(s,h,E),Fm(s,h,E,l),zm(null,s,h,!0,i,l);case 19:return a2(i,s,l);case 22:return e2(i,s,l)}throw Error(n(156,s.tag))};function O2(i,s){return cS(i,s)}function T7(i,s,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=s,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 cr(i,s,l,h){return new T7(i,s,l,h)}function a0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function _7(i){if(typeof i=="function")return a0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===de)return 11;if(i===Te)return 14}return 2}function Ji(i,s){var l=i.alternate;return l===null?(l=cr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function yd(i,s,l,h,E,b){var x=2;if(h=i,typeof i=="function")a0(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case q:return Mo(l.children,E,b,s);case ie:x=8,E|=8;break;case me:return i=cr(12,l,s,E|2),i.elementType=me,i.lanes=b,i;case le:return i=cr(13,l,s,E),i.elementType=le,i.lanes=b,i;case ne:return i=cr(19,l,s,E),i.elementType=ne,i.lanes=b,i;case ue:return bd(l,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:x=10;break e;case oe:x=9;break e;case de:x=11;break e;case Te:x=14;break e;case Oe:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=cr(x,l,s,E),s.elementType=i,s.type=h,s.lanes=b,s}function Mo(i,s,l,h){return i=cr(7,i,h,s),i.lanes=l,i}function bd(i,s,l,h){return i=cr(22,i,h,s),i.elementType=ue,i.lanes=l,i.stateNode={isHidden:!1},i}function u0(i,s,l){return i=cr(6,i,null,s),i.lanes=l,i}function l0(i,s,l){return s=cr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function S7(i,s,l,h,E){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mp(0),this.expirationTimes=Mp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function c0(i,s,l,h,E,b,x,R,U){return i=new S7(i,s,l,R,U),s===1?(s=1,b===!0&&(s|=8)):s=0,b=cr(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},xm(b),i}function x7(i,s,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:h==null?null:""+h,children:i,containerInfo:s,implementation:l}}function I2(i){if(!i)return $i;i=i._reactInternals;e:{if(wo(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Dn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(Dn(l))return sx(i,l,s)}return s}function R2(i,s,l,h,E,b,x,R,U){return i=c0(l,h,!0,i,E,b,x,R,U),i.context=I2(null),l=i.current,h=Cn(),E=Ki(l),b=yi(h,E),b.callback=s!=null?s:null,Yi(l,b,E),i.current.lanes=E,lu(i,E,h),Bn(i,h),i}function Td(i,s,l,h){var E=s.current,b=Cn(),x=Ki(E);return l=I2(l),s.context===null?s.context=l:s.pendingContext=l,s=yi(b,x),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=Yi(E,s,x),i!==null&&(vr(i,E,x,b),Qc(i,E,x)),x}function _d(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function L2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function d0(i,s){L2(i,s),(i=i.alternate)&&L2(i,s)}function w7(){return null}var D2=typeof reportError=="function"?reportError:function(i){console.error(i)};function f0(i){this._internalRoot=i}Sd.prototype.render=f0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Td(i,s,null,null)},Sd.prototype.unmount=f0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Ro(function(){Td(null,i,null,null)}),s[hi]=null}};function Sd(i){this._internalRoot=i}Sd.prototype.unstable_scheduleHydration=function(i){if(i){var s=yS();i={blockedOn:null,target:i,priority:s};for(var l=0;l<Bi.length&&s!==0&&s<Bi[l].priority;l++);Bi.splice(l,0,i),l===0&&_S(i)}};function h0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function xd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function M2(){}function C7(i,s,l,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var Z=_d(x);b.call(Z)}}var x=R2(s,h,i,0,null,!1,!1,"",M2);return i._reactRootContainer=x,i[hi]=x.current,xu(i.nodeType===8?i.parentNode:i),Ro(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var R=h;h=function(){var Z=_d(U);R.call(Z)}}var U=c0(i,0,!1,null,null,!1,!1,"",M2);return i._reactRootContainer=U,i[hi]=U.current,xu(i.nodeType===8?i.parentNode:i),Ro(function(){Td(s,U,l,h)}),U}function wd(i,s,l,h,E){var b=l._reactRootContainer;if(b){var x=b;if(typeof E=="function"){var R=E;E=function(){var U=_d(x);R.call(U)}}Td(s,x,i,E)}else x=C7(l,s,i,E,h);return _d(x)}gS=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=uu(s.pendingLanes);l!==0&&(Fp(s,l|1),Bn(s,Mt()),(it&6)===0&&(Js=Mt()+500,Vi()))}break;case 13:Ro(function(){var h=Ei(i,1);if(h!==null){var E=Cn();vr(h,i,1,E)}}),d0(i,1)}},Bp=function(i){if(i.tag===13){var s=Ei(i,134217728);if(s!==null){var l=Cn();vr(s,i,134217728,l)}d0(i,134217728)}},ES=function(i){if(i.tag===13){var s=Ki(i),l=Ei(i,s);if(l!==null){var h=Cn();vr(l,i,s,h)}d0(i,s)}},yS=function(){return ct},bS=function(i,s){var l=ct;try{return ct=i,s()}finally{ct=l}},Np=function(i,s,l){switch(s){case"input":if(di(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==i&&h.form===i.form){var E=zc(h);if(!E)throw Error(n(90));$r(h),di(h,E)}}}break;case"textarea":rt(i,l);break;case"select":s=l.value,s!=null&&Ce(i,!!l.multiple,s,!1)}},rS=i0,iS=Ro;var A7={usingClientEntryPoint:!1,Events:[Au,Us,zc,tS,nS,i0]},Hu={findFiberByHostInstance:Co,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},v7={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:H.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=uS(i),i===null?null:i.stateNode},findFiberByHostInstance:Hu.findFiberByHostInstance||w7,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 Cd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cd.isDisabled&&Cd.supportsFiber)try{Sc=Cd.inject(v7),Wr=Cd}catch(i){}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A7,kn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h0(s))throw Error(n(200));return x7(i,s,null,l)},kn.createRoot=function(i,s){if(!h0(i))throw Error(n(299));var l=!1,h="",E=D2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=c0(i,1,!1,null,null,l,!1,h,E),i[hi]=s.current,xu(i.nodeType===8?i.parentNode:i),new f0(s)},kn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=uS(s),i=i===null?null:i.stateNode,i},kn.flushSync=function(i){return Ro(i)},kn.hydrate=function(i,s,l){if(!xd(s))throw Error(n(200));return wd(null,i,s,!0,l)},kn.hydrateRoot=function(i,s,l){if(!h0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,b="",x=D2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=R2(s,null,i,1,l!=null?l:null,E,!1,b,x),i[hi]=s.current,xu(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,E]:s.mutableSourceEagerHydrationData.push(l,E);return new Sd(s)},kn.render=function(i,s,l){if(!xd(s))throw Error(n(200));return wd(null,i,s,!1,l)},kn.unmountComponentAtNode=function(i){if(!xd(i))throw Error(n(40));return i._reactRootContainer?(Ro(function(){wd(null,null,i,!1,function(){i._reactRootContainer=null,i[hi]=null})}),!0):!1},kn.unstable_batchedUpdates=i0,kn.unstable_renderSubtreeIntoContainer=function(i,s,l,h){if(!xd(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return wd(i,s,l,!1,h)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var T1;function _1(){if(T1)return kf.exports;T1=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(),kf.exports=Ek(),kf.exports}var Go=_1();function S1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=S1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function G(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=S1(e))&&(r&&(r+=" "),r+=t);return r}var x1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},w1=eo.createContext&&eo.createContext(x1),yk=["attr","size","title"];function bk(e,t){if(e==null)return{};var n=Tk(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Tk(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 El(){return El=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},El.apply(this,arguments)}function C1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function yl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C1(Object(n),!0).forEach(function(r){_k(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _k(e,t,n){return t=Sk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sk(e){var t=xk(e,"string");return typeof t=="symbol"?t:t+""}function xk(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 A1(e){return e&&e.map((t,n)=>eo.createElement(t.tag,yl({key:n},t.attr),A1(t.child)))}function Lt(e){return t=>eo.createElement(wk,El({attr:yl({},e.attr)},t),A1(e.child))}function wk(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=bk(e,yk),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),eo.createElement("svg",El({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:yl(yl({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&eo.createElement("title",null,a),e.children)};return w1!==void 0?eo.createElement(w1.Consumer,null,n=>t(n)):t(x1)}function Ck(e){return Lt({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 ii=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:w.jsx("button",{className:G(e,`${j}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?w.jsx("img",{className:G(`${j}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),Ak="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",vk=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=at(),o=r==="messaging",a=o?"Open Commerce Client":"Open Copilot",u=o?w.jsx(Ck,{className:G(t,`${j}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||Ak,alt:"Copilot",className:G(t,`${j}-minimized-icon-img`)});return w.jsx(ii,{className:G(t,`${j}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},kk=()=>{const{globalClassName:e,themeVariables:t}=at(),n=()=>{pl(!1),ri(!0)};return Go.createPortal(w.jsx("div",{className:G(e,`${j}-minimized-container`),style:t,children:w.jsx(vk,{onClick:n})}),document.body)};function v1(e){return Lt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function k1(e){return Lt({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 Xo(e){return Lt({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 Pk(e){return Lt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function P1(e){return Lt({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 Nk(e){return Lt({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 Ok(e){return Lt({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 Ik(e){return Lt({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 Rk(e){return Lt({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 Lk(e){return Lt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}const Dk=e=>({[`${ni}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${ni}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem"}),N1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:G(e,`${j}-close-button`),disabled:r,onClick:n,children:w.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),bl=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>w.jsx("button",{className:G(`${j}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Mk=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:G(`${j}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(Xo,{size:"16px"})},Fk=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(ii,{className:G(e,n,`cim-${r}-component`,`${j}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:w.jsx(Xo,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(bl,{className:G(e,n,`cim-${r}-component`,`${j}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&w.jsx(Mk,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function Bk(e){return Lt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const Uk=()=>{const{messages:e}=er(),{handleCancel:t}=Or();return{cancelRequest:F.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},Hk=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=at(),{cancelRequest:r}=Uk();return n!=null&&n.enableCancelSearch?w.jsx(ii,{className:G(t,`${j}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:w.jsx(Bk,{}),disabled:!e,onClick:r}):null};function aU(){}function uU(){}function O1(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function I1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$k={};function R1(e,t){return($k.jsx?jk:zk).test(e)}const Vk=/[ \t\n\f\r]/g;function qk(e){return typeof e=="object"?e.type==="text"?L1(e.value):!1:L1(e)}function L1(e){return e.replace(Vk,"")===""}let Ta=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ta.prototype.normal={},Ta.prototype.property={},Ta.prototype.space=void 0;function D1(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ta(n,r,t)}function _a(e){return e.toLowerCase()}let Pn=class{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 Yk=0;const Xe=ao(),Ht=ao(),Of=ao(),Ee=ao(),Et=ao(),Ko=ao(),Hn=ao();function ao(){return ta(2,++Yk)}const If=Object.freeze(Object.defineProperty({__proto__:null,boolean:Xe,booleanish:Ht,commaOrSpaceSeparated:Hn,commaSeparated:Ko,number:Ee,overloadedBoolean:Of,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),Rf=Object.keys(If);let Lf=class extends Pn{constructor(t,n,r,o){let a=-1;if(super(t,n),M1(this,"space",o),typeof r=="number")for(;++a<Rf.length;){const u=Rf[a];M1(this,Rf[a],(r&If[u])===If[u])}}};Lf.prototype.defined=!0;function M1(e,t,n){n&&(e[t]=n)}function Qo(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Lf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[_a(r)]=r,n[_a(a.attribute)]=r}return new Ta(t,n,e.space)}const F1=Qo({properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:Et,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:Ee,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:Et,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Ht,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 B1(e,t){return t in e?e[t]:t}function U1(e,t){return B1(e,t.toLowerCase())}const Wk=Qo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ko,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Xe,allowPaymentRequest:Xe,allowUserMedia:Xe,alt:null,as:null,async:Xe,autoCapitalize:null,autoComplete:Et,autoFocus:Xe,autoPlay:Xe,blocking:Et,capture:null,charSet:null,checked:Xe,cite:null,className:Et,cols:Ee,colSpan:null,content:null,contentEditable:Ht,controls:Xe,controlsList:Et,coords:Ee|Ko,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xe,defer:Xe,dir:null,dirName:null,disabled:Xe,download:Of,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xe,formTarget:null,headers:Et,height:Ee,hidden:Of,high:Ee,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Xe,inputMode:null,integrity:null,is:null,isMap:Xe,itemId:null,itemProp:Et,itemRef:Et,itemScope:Xe,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xe,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:Xe,muted:Xe,name:null,nonce:null,noModule:Xe,noValidate:Xe,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:Xe,optimum:Ee,pattern:null,ping:Et,placeholder:null,playsInline:Xe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xe,referrerPolicy:null,rel:Et,required:Xe,reversed:Xe,rows:Ee,rowSpan:Ee,sandbox:Et,scope:null,scoped:Xe,seamless:Xe,selected:Xe,shadowRootClonable:Xe,shadowRootDelegatesFocus:Xe,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Ht,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:Xe,useMap:null,value:Ht,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,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:Xe,declare:Xe,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:Xe,noHref:Xe,noShade:Xe,noWrap:Xe,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Xe,disableRemotePlayback:Xe,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:U1}),Gk=Qo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Hn,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:Et,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:Xe,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:Ko,g2:Ko,glyphName:Ko,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:Hn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hn,rev:Hn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hn,requiredFeatures:Hn,requiredFonts:Hn,requiredFormats:Hn,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:Hn,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:Hn,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:Hn,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:B1}),H1=Qo({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()}}),z1=Qo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:U1}),j1=Qo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Xk={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"},Kk=/[A-Z]/g,$1=/-[a-z]/g,Qk=/^data[-\w.:]+$/i;function Df(e,t){const n=_a(t);let r=t,o=Pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Qk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace($1,Zk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!$1.test(a)){let u=a.replace(Kk,Jk);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Lf}return new o(r,t)}function Jk(e){return"-"+e.toLowerCase()}function Zk(e){return e.charAt(1).toUpperCase()}const Tl=D1([F1,Wk,H1,z1,j1],"html"),Jo=D1([F1,Gk,H1,z1,j1],"svg");function V1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function q1(e){return e.join(" ").trim()}var Zo={},Mf,Y1;function eP(){if(Y1)return Mf;Y1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
18
- `,f="/",p="*",m="",T="comment",y="declaration";Mf=function(S,A){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];A=A||{};var v=1,N=1;function k(le){var ne=le.match(t);ne&&(v+=ne.length);var Te=le.lastIndexOf(d);N=~Te?le.length-Te:N+le.length}function H(){var le={line:v,column:N};return function(ne){return ne.position=new X(le),ie(),ne}}function X(le){this.start=le,this.end={line:v,column:N},this.source=A.source}X.prototype.content=S;function B(le){var ne=new Error(A.source+":"+v+":"+N+": "+le);if(ne.reason=le,ne.filename=A.source,ne.line=v,ne.column=N,ne.source=S,!A.silent)throw ne}function q(le){var ne=le.exec(S);if(ne){var Te=ne[0];return k(Te),S=S.slice(Te.length),ne}}function ie(){q(n)}function me(le){var ne;for(le=le||[];ne=$();)ne!==!1&&le.push(ne);return le}function $(){var le=H();if(!(f!=S.charAt(0)||p!=S.charAt(1))){for(var ne=2;m!=S.charAt(ne)&&(p!=S.charAt(ne)||f!=S.charAt(ne+1));)++ne;if(ne+=2,m===S.charAt(ne-1))return B("End of comment missing");var Te=S.slice(2,ne-2);return N+=2,k(Te),S=S.slice(ne),N+=2,le({type:T,comment:Te})}}function oe(){var le=H(),ne=q(r);if(ne){if($(),!q(o))return B("property missing ':'");var Te=q(a),Oe=le({type:y,property:_(ne[0].replace(e,m)),value:Te?_(Te[0].replace(e,m)):m});return q(u),Oe}}function de(){var le=[];me(le);for(var ne;ne=oe();)ne!==!1&&(le.push(ne),me(le));return le}return ie(),de()};function _(S){return S?S.replace(c,m):m}return Mf}var W1;function tP(){if(W1)return Zo;W1=1;var e=Zo&&Zo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=n;var t=e(eP());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var f=d.property,p=d.value;c?o(f,p,d):p&&(a=a||{},a[f]=p)}}),a}return Zo}var Sa={},G1;function nP(){if(G1)return Sa;G1=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(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(o,c):f=f.replace(r,c),f.replace(t,u))};return Sa.camelCase=d,Sa}var xa,X1;function rP(){if(X1)return xa;X1=1;var e=xa&&xa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(tP()),n=nP();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,xa=r,xa}var iP=rP();const oP=Qe(iP),_l=K1("end"),Ir=K1("start");function K1(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 Q1(e){const t=Ir(e),n=_l(e);if(t&&n)return{start:t,end:n}}function wa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?J1(e.position):"start"in e||"end"in e?J1(e):"line"in e||"column"in e?Ff(e):""}function Ff(e){return Z1(e&&e.line)+":"+Z1(e&&e.column)}function J1(e){return Ff(e&&e.start)+"-"+Ff(e&&e.end)}function Z1(e){return e&&typeof e=="number"?e:1}class hn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=M({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=wa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}hn.prototype.file="",hn.prototype.name="",hn.prototype.reason="",hn.prototype.message="",hn.prototype.stack="",hn.prototype.column=void 0,hn.prototype.line=void 0,hn.prototype.ancestors=void 0,hn.prototype.cause=void 0,hn.prototype.fatal=void 0,hn.prototype.place=void 0,hn.prototype.ruleId=void 0,hn.prototype.source=void 0;const Bf={}.hasOwnProperty,sP=new Map,aP=/[A-Z]/g,uP=new Set(["table","tbody","thead","tfoot","tr"]),lP=new Set(["td","th"]),eE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function cP(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=yP(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=EP(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Jo:Tl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=tE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function tE(e,t,n){if(t.type==="element")return dP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return fP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return pP(e,t,n);if(t.type==="mdxjsEsm")return hP(e,t);if(t.type==="root")return mP(e,t,n);if(t.type==="text")return gP(e,t)}function dP(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Jo,e.schema=o),e.ancestors.push(t);const a=rE(e,t.tagName,!1),u=bP(e,t);let c=Hf(e,t);return uP.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!qk(d):!0})),nE(e,u,a,t),Uf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function fP(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)}Ca(e,t.position)}function hP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ca(e,t.position)}function pP(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Jo,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:rE(e,t.name,!0),u=TP(e,t),c=Hf(e,t);return nE(e,u,a,t),Uf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function mP(e,t,n){const r={};return Uf(r,Hf(e,t)),e.create(t,e.Fragment,r,n)}function gP(e,t){return t.value}function nE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Uf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function EP(e,t,n){return r;function r(o,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function yP(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=Ir(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function bP(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Bf.call(t.properties,o)){const a=_P(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&lP.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 TP(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 Ca(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Ca(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Hf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:sP;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=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const c=tE(e,a,u);c!==void 0&&n.push(c)}return n}function _P(e,t,n){const r=Df(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?I1(n):q1(n)),r.property==="style"){let o=typeof n=="object"?n:SP(e,String(n));return e.stylePropertyNameCase==="css"&&(o=xP(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Xk[r.property]||r.property:r.attribute,n]}}function SP(e,t){try{return oP(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new hn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=eE+"#cannot-parse-style-attribute",o}}function rE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=R1(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=R1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Bf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ca(e)}function Ca(e,t){const n=new hn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=eE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function xP(e){const t={};let n;for(n in e)Bf.call(e,n)&&(t[wP(n)]=e[n]);return t}function wP(e){let t=e.replace(aP,CP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function CP(e){return"-"+e.toLowerCase()}const zf={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"]},AP={};function jf(e,t){const n=AP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return iE(e,r,o)}function iE(e,t,n){if(vP(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 oE(e.children,t,n)}return Array.isArray(e)?oE(e,t,n):""}function oE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=iE(e[o],t,n);return r.join("")}function vP(e){return!!(e&&typeof e=="object")}const sE=document.createElement("i");function $f(e){const t="&"+e+";";sE.innerHTML=t;const n=sE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function tr(e,t){return e.length>0?(zn(e,e.length,0,t),e):t}const aE={}.hasOwnProperty;function uE(e){const t={};let n=-1;for(;++n<e.length;)kP(t,e[n]);return t}function kP(e,t){let n;for(n in t){const o=(aE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){aE.call(o,u)||(o[u]=[]);const c=a[u];PP(o[u],Array.isArray(c)?c:c?[c]:[])}}}function PP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);zn(e,0,0,r)}function lE(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 mr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xn=Ci(/[A-Za-z]/),pn=Ci(/[\dA-Za-z]/),NP=Ci(/[#-'*+\--9=?A-Z^-~]/);function Sl(e){return e!==null&&(e<32||e===127)}const Vf=Ci(/\d/),OP=Ci(/[\dA-Fa-f]/),IP=Ci(/[!-/:-@[-`{-~]/);function He(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const xl=Ci(new RegExp("\\p{P}|\\p{S}","u")),uo=Ci(/\s/);function Ci(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function es(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&pn(e.charCodeAt(n+1))&&pn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function nt(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ze(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const RP={tokenize:LP};function LP(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),nt(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return He(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const DP={tokenize:MP},cE={tokenize:FP};function MP(e){const t=this,n=[];let r=0,o,a,u;return c;function c(k){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,d,f)(k)}return f(k)}function d(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&N();const H=t.events.length;let X=H,B;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){B=t.events[X][1].end;break}v(r);let q=H;for(;q<t.events.length;)t.events[q][1].end=M({},B),q++;return zn(t.events,X+1,0,t.events.slice(H)),t.events.length=q,f(k)}return c(k)}function f(k){if(r===n.length){if(!o)return T(k);if(o.currentConstruct&&o.currentConstruct.concrete)return _(k);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(cE,p,m)(k)}function p(k){return o&&N(),v(r),T(k)}function m(k){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(k)}function T(k){return t.containerState={},e.attempt(cE,y,_)(k)}function y(k){return r++,n.push([t.currentConstruct,t.containerState]),T(k)}function _(k){if(k===null){o&&N(),v(0),e.consume(k);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(k)}function S(k){if(k===null){A(e.exit("chunkFlow"),!0),v(0),e.consume(k);return}return He(k)?(e.consume(k),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(k),S)}function A(k,H){const X=t.sliceStream(k);if(H&&X.push(null),k.previous=a,a&&(a.next=k),a=k,o.defineSkip(k.start),o.write(X),t.parser.lazy[k.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<u&&(!o.events[B][1].end||o.events[B][1].end.offset>u))return;const q=t.events.length;let ie=q,me,$;for(;ie--;)if(t.events[ie][0]==="exit"&&t.events[ie][1].type==="chunkFlow"){if(me){$=t.events[ie][1].end;break}me=!0}for(v(r),B=q;B<t.events.length;)t.events[B][1].end=M({},$),B++;zn(t.events,ie+1,0,t.events.slice(q)),t.events.length=B}}function v(k){let H=n.length;for(;H-- >k;){const X=n[H];t.containerState=X[1],X[0].exit.call(t,e)}n.length=k}function N(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function FP(e,t,n){return nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ts(e){if(e===null||ht(e)||uo(e))return 1;if(xl(e))return 2}function wl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const qf={name:"attention",resolveAll:BP,tokenize:UP};function BP(e,t){let n=-1,r,o,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=M({},e[r][1].end),T=M({},e[n][1].start);dE(m,-d),dE(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:M({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:M({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:M({},e[r][1].end),end:M({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:M({},u.start),end:M({},c.end)},e[r][1].end=M({},u.start),e[n][1].start=M({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=tr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=tr(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=tr(f,wl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=tr(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=tr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,zn(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 UP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ts(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=ts(d),m=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(o||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function dE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const HP={name:"autolink",tokenize:zP};function zP(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return xn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||pn(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||pn(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||Sl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):NP(y)?(e.consume(y),f):n(y)}function p(y){return pn(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||pn(y))&&r++<63){const _=y===45?T:m;return e.consume(y),_}return n(y)}}const Aa={partial:!0,tokenize:jP};function jP(e,t,n){return r;function r(a){return Ze(a)?nt(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||He(a)?t(a):n(a)}}const fE={continuation:{tokenize:VP},exit:qP,name:"blockQuote",tokenize:$P};function $P(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function VP(e,t,n){const r=this;return o;function o(u){return Ze(u)?nt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(fE,t,n)(u)}}function qP(e){e.exit("blockQuote")}const hE={name:"characterEscape",tokenize:YP};function YP(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return IP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const pE={name:"characterReference",tokenize:WP};function WP(e,t,n){const r=this;let o=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=pn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=OP,p):(e.enter("characterReferenceValue"),a=7,u=Vf,p(m))}function p(m){if(m===59&&o){const T=e.exit("characterReferenceValue");return u===pn&&!$f(r.sliceSerialize(T))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&o++<a?(e.consume(m),p):n(m)}}const mE={partial:!0,tokenize:XP},gE={concrete:!0,name:"codeFenced",tokenize:GP};function GP(e,t,n){const r=this,o={partial:!0,tokenize:X};let a=0,u=0,c;return d;function d(B){return f(B)}function f(B){const q=r.events[r.events.length-1];return a=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(B)}function p(B){return B===c?(u++,e.consume(B),p):u<3?n(B):(e.exit("codeFencedFenceSequence"),Ze(B)?nt(e,m,"whitespace")(B):m(B))}function m(B){return B===null||He(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(mE,S,H)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(B))}function T(B){return B===null||He(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(B)):Ze(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,y,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),T)}function y(B){return B===null||He(B)?m(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||He(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(B)):B===96&&B===c?n(B):(e.consume(B),_)}function S(B){return e.attempt(o,H,A)(B)}function A(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),v}function v(B){return a>0&&Ze(B)?nt(e,N,"linePrefix",a+1)(B):N(B)}function N(B){return B===null||He(B)?e.check(mE,S,H)(B):(e.enter("codeFlowValue"),k(B))}function k(B){return B===null||He(B)?(e.exit("codeFlowValue"),N(B)):(e.consume(B),k)}function H(B){return e.exit("codeFenced"),t(B)}function X(B,q,ie){let me=0;return $;function $(Te){return B.enter("lineEnding"),B.consume(Te),B.exit("lineEnding"),oe}function oe(Te){return B.enter("codeFencedFence"),Ze(Te)?nt(B,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Te):de(Te)}function de(Te){return Te===c?(B.enter("codeFencedFenceSequence"),le(Te)):ie(Te)}function le(Te){return Te===c?(me++,B.consume(Te),le):me>=u?(B.exit("codeFencedFenceSequence"),Ze(Te)?nt(B,ne,"whitespace")(Te):ne(Te)):ie(Te)}function ne(Te){return Te===null||He(Te)?(B.exit("codeFencedFence"),q(Te)):ie(Te)}}}function XP(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Yf={name:"codeIndented",tokenize:QP},KP={partial:!0,tokenize:JP};function QP(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),nt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):He(f)?e.attempt(KP,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||He(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function JP(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):nt(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):He(u)?o(u):n(u)}}const ZP={name:"codeText",previous:tN,resolve:eN,tokenize:nN};function eN(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function tN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function nN(e,t,n){let r=0,o,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"),o=0,p(m)):He(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||He(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class rN{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&va(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),va(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),va(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);va(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);va(this.left,n.reverse())}}}function va(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 EE(e){const t={};let n=-1,r,o,a,u,c,d,f;const p=new rN(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,iN(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=M({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return zn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function iN(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,m,T=-1,y=n,_=0,S=0;const A=[S];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),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&&(S=T+1,A.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),T=A.length;T--;){const v=c.slice(A[T],A[T+1]),N=a.pop();d.push([N,N+v.length-1]),e.splice(N,2,v)}for(d.reverse(),T=-1;++T<d.length;)f[_+d[T][0]]=_+d[T][1],_+=d[T][1]-d[T][0]-1;return f}const oN={resolve:aN,tokenize:uN},sN={partial:!0,tokenize:lN};function aN(e){return EE(e),e}function uN(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):He(c)?e.check(sN,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function lN(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),nt(e,a,"linePrefix")}function a(u){if(u===null||He(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function yE(e,t,n,r,o,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(o),e.enter(a),e.consume(v),e.exit(a),T):v===null||v===32||v===41||Sl(v)?n(v):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(v))}function T(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(o),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||He(v)?n(v):(e.consume(v),v===92?_:y)}function _(v){return v===60||v===62||v===92?(e.consume(v),y):y(v)}function S(v){return!p&&(v===null||v===41||ht(v))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(v)):p<f&&v===40?(e.consume(v),p++,S):v===41?(e.consume(v),p--,S):v===null||v===32||v===40||Sl(v)?n(v):(e.consume(v),v===92?A:S)}function A(v){return v===40||v===41||v===92?(e.consume(v),S):S(v)}}function bE(e,t,n,r,o,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):He(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function TE(e,t,n,r,o,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):He(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),nt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||He(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 ka(e,t){let n;return r;function r(o){return He(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ze(o)?nt(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const cN={name:"definition",tokenize:fN},dN={partial:!0,tokenize:hN};function fN(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return bE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=mr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return ht(y)?ka(e,f)(y):f(y)}function f(y){return yE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(dN,m,m)(y)}function m(y){return Ze(y)?nt(e,T,"whitespace")(y):T(y)}function T(y){return y===null||He(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function hN(e,t,n){return r;function r(c){return ht(c)?ka(e,o)(c):n(c)}function o(c){return TE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ze(c)?nt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||He(c)?t(c):n(c)}}const pN={name:"hardBreakEscape",tokenize:mN};function mN(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return He(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const gN={name:"headingAtx",resolve:EN,tokenize:yN};function EN(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},zn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function yN(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||ht(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||He(p)?(e.exit("atxHeading"),t(p)):Ze(p)?nt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ht(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const bN=["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"],_E=["pre","script","style","textarea"],TN={concrete:!0,name:"htmlFlow",resolveTo:xN,tokenize:wN},_N={partial:!0,tokenize:AN},SN={partial:!0,tokenize:CN};function xN(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 wN(e,t,n){const r=this;let o,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,S):O===63?(e.consume(O),o=3,r.interrupt?t:C):xn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function T(O){return O===45?(e.consume(O),o=2,y):O===91?(e.consume(O),o=5,c=0,_):xn(O)?(e.consume(O),o=4,r.interrupt?t:C):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:C):n(O)}function _(O){const _e="CDATA[";return O===_e.charCodeAt(c++)?(e.consume(O),c===_e.length?r.interrupt?t:de:_):n(O)}function S(O){return xn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function A(O){if(O===null||O===47||O===62||ht(O)){const _e=O===47,De=u.toLowerCase();return!_e&&!a&&_E.includes(De)?(o=1,r.interrupt?t(O):de(O)):bN.includes(u.toLowerCase())?(o=6,_e?(e.consume(O),v):r.interrupt?t(O):de(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?N(O):k(O))}return O===45||pn(O)?(e.consume(O),u+=String.fromCharCode(O),A):n(O)}function v(O){return O===62?(e.consume(O),r.interrupt?t:de):n(O)}function N(O){return Ze(O)?(e.consume(O),N):$(O)}function k(O){return O===47?(e.consume(O),$):O===58||O===95||xn(O)?(e.consume(O),H):Ze(O)?(e.consume(O),k):$(O)}function H(O){return O===45||O===46||O===58||O===95||pn(O)?(e.consume(O),H):X(O)}function X(O){return O===61?(e.consume(O),B):Ze(O)?(e.consume(O),X):k(O)}function B(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,q):Ze(O)?(e.consume(O),B):ie(O)}function q(O){return O===d?(e.consume(O),d=null,me):O===null||He(O)?n(O):(e.consume(O),q)}function ie(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ht(O)?X(O):(e.consume(O),ie)}function me(O){return O===47||O===62||Ze(O)?k(O):n(O)}function $(O){return O===62?(e.consume(O),oe):n(O)}function oe(O){return O===null||He(O)?de(O):Ze(O)?(e.consume(O),oe):n(O)}function de(O){return O===45&&o===2?(e.consume(O),Oe):O===60&&o===1?(e.consume(O),ue):O===62&&o===4?(e.consume(O),D):O===63&&o===3?(e.consume(O),C):O===93&&o===5?(e.consume(O),re):He(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(_N,te,le)(O)):O===null||He(O)?(e.exit("htmlFlowData"),le(O)):(e.consume(O),de)}function le(O){return e.check(SN,ne,te)(O)}function ne(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Te}function Te(O){return O===null||He(O)?le(O):(e.enter("htmlFlowData"),de(O))}function Oe(O){return O===45?(e.consume(O),C):de(O)}function ue(O){return O===47?(e.consume(O),u="",Q):de(O)}function Q(O){if(O===62){const _e=u.toLowerCase();return _E.includes(_e)?(e.consume(O),D):de(O)}return xn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),Q):de(O)}function re(O){return O===93?(e.consume(O),C):de(O)}function C(O){return O===62?(e.consume(O),D):O===45&&o===2?(e.consume(O),C):de(O)}function D(O){return O===null||He(O)?(e.exit("htmlFlowData"),te(O)):(e.consume(O),D)}function te(O){return e.exit("htmlFlow"),t(O)}}function CN(e,t,n){const r=this;return o;function o(u){return He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function AN(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Aa,t,n)}}const vN={name:"htmlText",tokenize:kN};function kN(e,t,n){const r=this;let o,a,u;return c;function c(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),f):C===47?(e.consume(C),X):C===63?(e.consume(C),k):xn(C)?(e.consume(C),ie):n(C)}function f(C){return C===45?(e.consume(C),p):C===91?(e.consume(C),a=0,_):xn(C)?(e.consume(C),N):n(C)}function p(C){return C===45?(e.consume(C),y):n(C)}function m(C){return C===null?n(C):C===45?(e.consume(C),T):He(C)?(u=m,ue(C)):(e.consume(C),m)}function T(C){return C===45?(e.consume(C),y):m(C)}function y(C){return C===62?Oe(C):C===45?T(C):m(C)}function _(C){const D="CDATA[";return C===D.charCodeAt(a++)?(e.consume(C),a===D.length?S:_):n(C)}function S(C){return C===null?n(C):C===93?(e.consume(C),A):He(C)?(u=S,ue(C)):(e.consume(C),S)}function A(C){return C===93?(e.consume(C),v):S(C)}function v(C){return C===62?Oe(C):C===93?(e.consume(C),v):S(C)}function N(C){return C===null||C===62?Oe(C):He(C)?(u=N,ue(C)):(e.consume(C),N)}function k(C){return C===null?n(C):C===63?(e.consume(C),H):He(C)?(u=k,ue(C)):(e.consume(C),k)}function H(C){return C===62?Oe(C):k(C)}function X(C){return xn(C)?(e.consume(C),B):n(C)}function B(C){return C===45||pn(C)?(e.consume(C),B):q(C)}function q(C){return He(C)?(u=q,ue(C)):Ze(C)?(e.consume(C),q):Oe(C)}function ie(C){return C===45||pn(C)?(e.consume(C),ie):C===47||C===62||ht(C)?me(C):n(C)}function me(C){return C===47?(e.consume(C),Oe):C===58||C===95||xn(C)?(e.consume(C),$):He(C)?(u=me,ue(C)):Ze(C)?(e.consume(C),me):Oe(C)}function $(C){return C===45||C===46||C===58||C===95||pn(C)?(e.consume(C),$):oe(C)}function oe(C){return C===61?(e.consume(C),de):He(C)?(u=oe,ue(C)):Ze(C)?(e.consume(C),oe):me(C)}function de(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),o=C,le):He(C)?(u=de,ue(C)):Ze(C)?(e.consume(C),de):(e.consume(C),ne)}function le(C){return C===o?(e.consume(C),o=void 0,Te):C===null?n(C):He(C)?(u=le,ue(C)):(e.consume(C),le)}function ne(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||ht(C)?me(C):(e.consume(C),ne)}function Te(C){return C===47||C===62||ht(C)?me(C):n(C)}function Oe(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function ue(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),Q}function Q(C){return Ze(C)?nt(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):re(C)}function re(C){return e.enter("htmlTextData"),u(C)}}const Wf={name:"labelEnd",resolveAll:IN,resolveTo:RN,tokenize:LN},PN={tokenize:DN},NN={tokenize:MN},ON={tokenize:FN};function IN(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&zn(e,0,e.length,n),e}function RN(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:M({},e[a][1].start),end:M({},e[e.length-1][1].end)},f={type:"label",start:M({},e[a][1].start),end:M({},e[u][1].end)},p={type:"labelText",start:M({},e[a+r+2][1].end),end:M({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=tr(c,e.slice(a+1,a+r+3)),c=tr(c,[["enter",p,t]]),c=tr(c,wl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=tr(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=tr(c,e.slice(u+1)),c=tr(c,[["exit",d,t]]),zn(e,a,e.length,c),e}function LN(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(mr(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(PN,p,u?p:m)(T):T===91?e.attempt(NN,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(ON,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function DN(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return ht(m)?ka(e,a)(m):a(m)}function a(m){return m===41?p(m):yE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ht(m)?ka(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?TE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ht(m)?ka(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 MN(e,t,n){const r=this;return o;function o(c){return bE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(mr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function FN(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const BN={name:"labelStartImage",resolveAll:Wf.resolveAll,tokenize:UN};function UN(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const HN={name:"labelStartLink",resolveAll:Wf.resolveAll,tokenize:zN};function zN(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Gf={name:"lineEnding",tokenize:jN};function jN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const Cl={name:"thematicBreak",tokenize:$N};function $N(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,c(f)}function c(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||He(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?nt(e,c,"whitespace")(f):c(f))}}const Nn={continuation:{tokenize:WN},exit:XN,name:"list",tokenize:YN},VN={partial:!0,tokenize:KN},qN={partial:!0,tokenize:GN};function YN(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Vf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Cl,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 Vf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Aa,r.interrupt?n:p,e.attempt(VN,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Ze(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 WN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Aa,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ze(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(qN,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,nt(e,e.attempt(Nn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function GN(e,t,n){const r=this;return nt(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function XN(e){e.exit(this.containerState.type)}function KN(e,t,n){const r=this;return nt(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const SE={name:"setextUnderline",resolveTo:QN,tokenize:JN};function QN(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:M({},e[r][1].start),end:M({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=M({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function JN(e,t,n){const r=this;let o;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"),o=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===o?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ze(f)?nt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||He(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const ZN={tokenize:eO};function eO(e){const t=this,n=e.attempt(Aa,r,e.attempt(this.parser.constructs.flowInitial,o,nt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(oN,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const tO={resolveAll:wE()},nO=xE("string"),rO=xE("text");function xE(e){return{resolveAll:wE(e==="text"?iO:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return 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=o[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 wE(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function iO(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const f=o[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:M({},r.end)};r.end=M({},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 oO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:cN},disable:{null:[]},document:{42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:fE},flow:{35:gN,42:Cl,45:[SE,Cl],60:TN,61:SE,95:Cl,96:gE,126:gE},flowInitial:{[-2]:Yf,[-1]:Yf,32:Yf},insideSpan:{null:[qf,tO]},string:{38:pE,92:hE},text:{[-5]:Gf,[-4]:Gf,[-3]:Gf,33:BN,38:pE,42:qf,60:[HP,vN],91:HN,92:[pN,hE],93:Wf,95:qf,96:ZP}},Symbol.toStringTag,{value:"Module"}));function sO(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:q(X),check:q(B),consume:N,enter:k,exit:H,interrupt:q(B,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:_,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(oe){return u=tr(u,oe),A(),u[u.length-1]!==null?[]:(ie(t,0),f.events=wl(a,f.events,f),f.events)}function T(oe,de){return uO(y(oe),de)}function y(oe){return aO(u,oe)}function _(){const{_bufferIndex:oe,_index:de,line:le,column:ne,offset:Te}=r;return{_bufferIndex:oe,_index:de,line:le,column:ne,offset:Te}}function S(oe){o[oe.line]=oe.column,$()}function A(){let oe;for(;r._index<u.length;){const de=u[r._index];if(typeof de=="string")for(oe=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===oe&&r._bufferIndex<de.length;)v(de.charCodeAt(r._bufferIndex));else v(de)}}function v(oe){p=p(oe)}function N(oe){He(oe)?(r.line++,r.column=1,r.offset+=oe===-3?2:1,$()):oe!==-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=oe}function k(oe,de){const le=de||{};return le.type=oe,le.start=_(),f.events.push(["enter",le,f]),c.push(le),le}function H(oe){const de=c.pop();return de.end=_(),f.events.push(["exit",de,f]),de}function X(oe,de){ie(oe,de.from)}function B(oe,de){de.restore()}function q(oe,de){return le;function le(ne,Te,Oe){let ue,Q,re,C;return Array.isArray(ne)?te(ne):"tokenize"in ne?te([ne]):D(ne);function D(ke){return ze;function ze(xe){const Ye=xe!==null&&ke[xe],ft=xe!==null&&ke.null,on=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(ft)?ft:ft?[ft]:[]];return te(on)(xe)}}function te(ke){return ue=ke,Q=0,ke.length===0?Oe:O(ke[Q])}function O(ke){return ze;function ze(xe){return C=me(),re=ke,ke.partial||(f.currentConstruct=ke),ke.name&&f.parser.constructs.disable.null.includes(ke.name)?De():ke.tokenize.call(de?Object.assign(Object.create(f),de):f,d,_e,De)(xe)}}function _e(ke){return oe(re,C),Te}function De(ke){return C.restore(),++Q<ue.length?O(ue[Q]):Oe}}}function ie(oe,de){oe.resolveAll&&!a.includes(oe)&&a.push(oe),oe.resolve&&zn(f.events,de,f.events.length-de,oe.resolve(f.events.slice(de),f)),oe.resolveTo&&(f.events=oe.resolveTo(f.events,f))}function me(){const oe=_(),de=f.previous,le=f.currentConstruct,ne=f.events.length,Te=Array.from(c);return{from:ne,restore:Oe};function Oe(){r=oe,f.previous=de,f.currentConstruct=le,f.events.length=ne,c=Te,$()}}function $(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function aO(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function uO(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
17
+ `+b.stack}return{value:i,source:s,stack:E,digest:null}}function Hm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function zm(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var h7=typeof WeakMap=="function"?WeakMap:Map;function Kx(i,s,l){l=bi(-1,l),l.tag=3,l.payload={element:null};var h=s.value;return l.callback=function(){fd||(fd=!0,n0=h),zm(i,s)},l}function Qx(i,s,l){l=bi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=s.value;l.payload=function(){return h(E)},l.callback=function(){zm(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){zm(i,s),typeof h!="function"&&(Gi===null?Gi=new Set([this]):Gi.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function Jx(i,s,l){var h=i.pingCache;if(h===null){h=i.pingCache=new h7;var E=new Set;h.set(s,E)}else E=h.get(s),E===void 0&&(E=new Set,h.set(s,E));E.has(l)||(E.add(l),i=v7.bind(null,i,s,l),s.then(i,i))}function Zx(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function e2(i,s,l,h,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=bi(-1,1),s.tag=2,Yi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var p7=H.ReactCurrentOwner,Mn=!1;function wn(i,s,l,h){s.child=i===null?Tx(s,null,l,h):qs(s,i.child,l,h)}function t2(i,s,l,h,E){l=l.render;var b=s.ref;return Ws(s,E),h=Im(i,s,l,h,b,E),l=Rm(),i!==null&&!Mn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Ti(i,s,E)):(Ct&&l&&mm(s),s.flags|=1,wn(i,s,h,E),s.child)}function n2(i,s,l,h,E){if(i===null){var b=l.type;return typeof b=="function"&&!l0(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=b,r2(i,s,b,h,E)):(i=yd(l.type,null,h,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(b=i.child,(i.lanes&E)===0){var x=b.memoizedProps;if(l=l.compare,l=l!==null?l:Tu,l(x,h)&&i.ref===s.ref)return Ti(i,s,E)}return s.flags|=1,i=Ji(b,h),i.ref=s.ref,i.return=s,s.child=i}function r2(i,s,l,h,E){if(i!==null){var b=i.memoizedProps;if(Tu(b,h)&&i.ref===s.ref)if(Mn=!1,s.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Mn=!0);else return s.lanes=i.lanes,Ti(i,s,E)}return jm(i,s,l,h,E)}function i2(i,s,l){var h=s.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(Qs,Kn),Kn|=l;else{if((l&1073741824)===0)return i=b!==null?b.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,bt(Qs,Kn),Kn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:l,bt(Qs,Kn),Kn|=h}else b!==null?(h=b.baseLanes|l,s.memoizedState=null):h=l,bt(Qs,Kn),Kn|=h;return wn(i,s,E,l),s.child}function o2(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function jm(i,s,l,h,E){var b=Dn(l)?Co:En.current;return b=zs(s,b),Ws(s,E),l=Im(i,s,l,h,b,E),h=Rm(),i!==null&&!Mn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Ti(i,s,E)):(Ct&&h&&mm(s),s.flags|=1,wn(i,s,l,E),s.child)}function s2(i,s,l,h,E){if(Dn(l)){var b=!0;$c(s)}else b=!1;if(Ws(s,E),s.stateNode===null)ad(i,s),Gx(s,l,h),Um(s,l,h,E),h=!0;else if(i===null){var x=s.stateNode,R=s.memoizedProps;x.props=R;var U=x.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=ur(Z):(Z=Dn(l)?Co:En.current,Z=zs(s,Z));var le=l.getDerivedStateFromProps,he=typeof le=="function"||typeof x.getSnapshotBeforeUpdate=="function";he||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==h||U!==Z)&&Xx(s,x,h,Z),qi=!1;var ae=s.memoizedState;x.state=ae,Jc(s,h,x,E),U=s.memoizedState,R!==h||ae!==U||Ln.current||qi?(typeof le=="function"&&(Bm(s,l,le,h),U=s.memoizedState),(R=qi||Wx(s,l,R,h,ae,U,Z))?(he||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=U),x.props=h,x.state=U,x.context=Z,h=R):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{x=s.stateNode,Sx(i,s),R=s.memoizedProps,Z=s.type===s.elementType?R:Ar(s.type,R),x.props=Z,he=s.pendingProps,ae=x.context,U=l.contextType,typeof U=="object"&&U!==null?U=ur(U):(U=Dn(l)?Co:En.current,U=zs(s,U));var we=l.getDerivedStateFromProps;(le=typeof we=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==he||ae!==U)&&Xx(s,x,h,U),qi=!1,ae=s.memoizedState,x.state=ae,Jc(s,h,x,E);var Ne=s.memoizedState;R!==he||ae!==Ne||Ln.current||qi?(typeof we=="function"&&(Bm(s,l,we,h),Ne=s.memoizedState),(Z=qi||Wx(s,l,Z,h,ae,Ne,U)||!1)?(le||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,Ne,U),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,Ne,U)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&ae===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ae===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Ne),x.props=h,x.state=Ne,x.context=U,h=Z):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&ae===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ae===i.memoizedState||(s.flags|=1024),h=!1)}return $m(i,s,l,h,b,E)}function $m(i,s,l,h,E,b){o2(i,s);var x=(s.flags&128)!==0;if(!h&&!x)return E&&dx(s,l,!1),Ti(i,s,b);h=s.stateNode,p7.current=s;var R=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&x?(s.child=qs(s,i.child,null,b),s.child=qs(s,null,R,b)):wn(i,s,R,b),s.memoizedState=h.state,E&&dx(s,l,!0),s.child}function a2(i){var s=i.stateNode;s.pendingContext?lx(i,s.pendingContext,s.pendingContext!==s.context):s.context&&lx(i,s.context,!1),Cm(i,s.containerInfo)}function u2(i,s,l,h,E){return Vs(),bm(E),s.flags|=256,wn(i,s,l,h),s.child}var Vm={dehydrated:null,treeContext:null,retryLane:0};function qm(i){return{baseLanes:i,cachePool:null,transitions:null}}function l2(i,s,l){var h=s.pendingProps,E=Pt.current,b=!1,x=(s.flags&128)!==0,R;if((R=x)||(R=i!==null&&i.memoizedState===null?!1:(E&2)!==0),R?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),bt(Pt,E&1),i===null)return ym(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=h.children,i=h.fallback,b?(h=s.mode,b=s.child,x={mode:"hidden",children:x},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=x):b=bd(x,h,0,null),i=Mo(i,h,l,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=qm(l),s.memoizedState=Vm,i):Ym(s,x));if(E=i.memoizedState,E!==null&&(R=E.dehydrated,R!==null))return m7(i,s,x,h,R,E,l);if(b){b=h.fallback,x=s.mode,E=i.child,R=E.sibling;var U={mode:"hidden",children:h.children};return(x&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=U,s.deletions=null):(h=Ji(E,U),h.subtreeFlags=E.subtreeFlags&14680064),R!==null?b=Ji(R,b):(b=Mo(b,x,l,null),b.flags|=2),b.return=s,h.return=s,h.sibling=b,s.child=h,h=b,b=s.child,x=i.child.memoizedState,x=x===null?qm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},b.memoizedState=x,b.childLanes=i.childLanes&~l,s.memoizedState=Vm,h}return b=i.child,i=b.sibling,h=Ji(b,{mode:"visible",children:h.children}),(s.mode&1)===0&&(h.lanes=l),h.return=s,h.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=h,s.memoizedState=null,h}function Ym(i,s){return s=bd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function sd(i,s,l,h){return h!==null&&bm(h),qs(s,i.child,null,l),i=Ym(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function m7(i,s,l,h,E,b,x){if(l)return s.flags&256?(s.flags&=-257,h=Hm(Error(n(422))),sd(i,s,x,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=h.fallback,E=s.mode,h=bd({mode:"visible",children:h.children},E,0,null),b=Mo(b,E,x,null),b.flags|=2,h.return=s,b.return=s,h.sibling=b,s.child=h,(s.mode&1)!==0&&qs(s,i.child,null,x),s.child.memoizedState=qm(x),s.memoizedState=Vm,b);if((s.mode&1)===0)return sd(i,s,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var R=h.dgst;return h=R,b=Error(n(419)),h=Hm(b,h,void 0),sd(i,s,x,h)}if(R=(x&i.childLanes)!==0,Mn||R){if(h=nn,h!==null){switch(x&-x){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|x))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,yi(i,E),kr(h,i,E,-1))}return u0(),h=Hm(Error(n(421))),sd(i,s,x,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=k7.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,Xn=zi(E.nextSibling),Gn=s,Ct=!0,wr=null,i!==null&&(sr[ar++]=gi,sr[ar++]=Ei,sr[ar++]=vo,gi=i.id,Ei=i.overflow,vo=s),s=Ym(s,h.children),s.flags|=4096,s)}function c2(i,s,l){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),xm(i.return,s,l)}function Wm(i,s,l,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=l,b.tailMode=E)}function d2(i,s,l){var h=s.pendingProps,E=h.revealOrder,b=h.tail;if(wn(i,s,h.children,l),h=Pt.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&c2(i,l,s);else if(i.tag===19)c2(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(bt(Pt,h),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(l=s.child,E=null;l!==null;)i=l.alternate,i!==null&&Zc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=s.child,s.child=null):(E=l.sibling,l.sibling=null),Wm(s,!1,E,l,b);break;case"backwards":for(l=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&Zc(i)===null){s.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Wm(s,!0,l,null,b);break;case"together":Wm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ad(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Ti(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),Io|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Ji(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Ji(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function g7(i,s,l){switch(s.tag){case 3:a2(s),Vs();break;case 5:Ax(s);break;case 1:Dn(s.type)&&$c(s);break;case 4:Cm(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;bt(Xc,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(bt(Pt,Pt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?l2(i,s,l):(bt(Pt,Pt.current&1),i=Ti(i,s,l),i!==null?i.sibling:null);bt(Pt,Pt.current&1);break;case 19:if(h=(l&s.childLanes)!==0,(i.flags&128)!==0){if(h)return d2(i,s,l);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(Pt,Pt.current),h)break;return null;case 22:case 23:return s.lanes=0,i2(i,s,l)}return Ti(i,s,l)}var f2,Gm,h2,p2;f2=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Gm=function(){},h2=function(i,s,l,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,No(Kr.current);var b=null;switch(l){case"input":E=Rn(i,E),h=Rn(i,h),b=[];break;case"select":E=v({},E,{value:void 0}),h=v({},h,{value:void 0}),b=[];break;case"textarea":E=Me(i,E),h=Me(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Hc)}an(l,h);var x;l=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var R=E[Z];for(x in R)R.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(o.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in h){var U=h[Z];if(R=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&U!==R&&(U!=null||R!=null))if(Z==="style")if(R){for(x in R)!R.hasOwnProperty(x)||U&&U.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in U)U.hasOwnProperty(x)&&R[x]!==U[x]&&(l||(l={}),l[x]=U[x])}else l||(b||(b=[]),b.push(Z,l)),l=U;else Z==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,R=R?R.__html:void 0,U!=null&&R!==U&&(b=b||[]).push(Z,U)):Z==="children"?typeof U!="string"&&typeof U!="number"||(b=b||[]).push(Z,""+U):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(o.hasOwnProperty(Z)?(U!=null&&Z==="onScroll"&&_t("scroll",i),b||R===U||(b=[])):(b=b||[]).push(Z,U))}l&&(b=b||[]).push("style",l);var Z=b;(s.updateQueue=Z)&&(s.flags|=4)}},p2=function(i,s,l,h){l!==h&&(s.flags|=4)};function Du(i,s){if(!Ct)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function bn(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(s)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,s}function E7(i,s,l){var h=s.pendingProps;switch(gm(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bn(s),null;case 1:return Dn(s.type)&&jc(),bn(s),null;case 3:return h=s.stateNode,Gs(),St(Ln),St(En),Pm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Wc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,wr!==null&&(o0(wr),wr=null))),Gm(i,s),bn(s),null;case 5:vm(s);var E=No(Nu.current);if(l=s.type,i!==null&&s.stateNode!=null)h2(i,s,l,h,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return bn(s),null}if(i=No(Kr.current),Wc(s)){h=s.stateNode,l=s.type;var b=s.memoizedProps;switch(h[Xr]=s,h[Au]=b,i=(s.mode&1)!==0,l){case"dialog":_t("cancel",h),_t("close",h);break;case"iframe":case"object":case"embed":_t("load",h);break;case"video":case"audio":for(E=0;E<Su.length;E++)_t(Su[E],h);break;case"source":_t("error",h);break;case"img":case"image":case"link":_t("error",h),_t("load",h);break;case"details":_t("toggle",h);break;case"input":Ri(h,b),_t("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},_t("invalid",h);break;case"textarea":Be(h,b),_t("invalid",h)}an(l,b),E=null;for(var x in b)if(b.hasOwnProperty(x)){var R=b[x];x==="children"?typeof R=="string"?h.textContent!==R&&(b.suppressHydrationWarning!==!0&&Uc(h.textContent,R,i),E=["children",R]):typeof R=="number"&&h.textContent!==""+R&&(b.suppressHydrationWarning!==!0&&Uc(h.textContent,R,i),E=["children",""+R]):o.hasOwnProperty(x)&&R!=null&&x==="onScroll"&&_t("scroll",h)}switch(l){case"input":on(h),Ps(h,b,!0);break;case"textarea":on(h),pt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=Hc)}h=E,s.updateQueue=h,h!==null&&(s.flags|=4)}else{x=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Xr]=s,i[Au]=h,f2(i,s,!1,!1),s.stateNode=i;e:{switch(x=Wr(l,h),l){case"dialog":_t("cancel",i),_t("close",i),E=h;break;case"iframe":case"object":case"embed":_t("load",i),E=h;break;case"video":case"audio":for(E=0;E<Su.length;E++)_t(Su[E],i);E=h;break;case"source":_t("error",i),E=h;break;case"img":case"image":case"link":_t("error",i),_t("load",i),E=h;break;case"details":_t("toggle",i),E=h;break;case"input":Ri(i,h),E=Rn(i,h),_t("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=v({},h,{value:void 0}),_t("invalid",i);break;case"textarea":Be(i,h),E=Me(i,h),_t("invalid",i);break;default:E=h}an(l,E),R=E;for(b in R)if(R.hasOwnProperty(b)){var U=R[b];b==="style"?sn(i,U):b==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&qe(i,U)):b==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Re(i,U):typeof U=="number"&&Re(i,""+U):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?U!=null&&b==="onScroll"&&_t("scroll",i):U!=null&&k(i,b,U,x))}switch(l){case"input":on(i),Ps(i,h,!1);break;case"textarea":on(i),pt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+xe(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?Ae(i,!!h.multiple,b,!1):h.defaultValue!=null&&Ae(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Hc)}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&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return bn(s),null;case 6:if(i&&s.stateNode!=null)p2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(l=No(Nu.current),No(Kr.current),Wc(s)){if(h=s.stateNode,l=s.memoizedProps,h[Xr]=s,(b=h.nodeValue!==l)&&(i=Gn,i!==null))switch(i.tag){case 3:Uc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Uc(h.nodeValue,l,(i.mode&1)!==0)}b&&(s.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Xr]=s,s.stateNode=h}return bn(s),null;case 13:if(St(Pt),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Ct&&Xn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Ex(),Vs(),s.flags|=98560,b=!1;else if(b=Wc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Xr]=s}else Vs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;bn(s),b=!1}else wr!==null&&(o0(wr),wr=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(Pt.current&1)!==0?Gt===0&&(Gt=3):u0())),s.updateQueue!==null&&(s.flags|=4),bn(s),null);case 4:return Gs(),Gm(i,s),i===null&&xu(s.stateNode.containerInfo),bn(s),null;case 10:return Sm(s.type._context),bn(s),null;case 17:return Dn(s.type)&&jc(),bn(s),null;case 19:if(St(Pt),b=s.memoizedState,b===null)return bn(s),null;if(h=(s.flags&128)!==0,x=b.rendering,x===null)if(h)Du(b,!1);else{if(Gt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Zc(i),x!==null){for(s.flags|=128,Du(b,!1),h=x.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=l,l=s.child;l!==null;)b=l,i=h,b.flags&=14680066,x=b.alternate,x===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=x.childLanes,b.lanes=x.lanes,b.child=x.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=x.memoizedProps,b.memoizedState=x.memoizedState,b.updateQueue=x.updateQueue,b.type=x.type,i=x.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return bt(Pt,Pt.current&1|2),s.child}i=i.sibling}b.tail!==null&&Mt()>Js&&(s.flags|=128,h=!0,Du(b,!1),s.lanes=4194304)}else{if(!h)if(i=Zc(x),i!==null){if(s.flags|=128,h=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Du(b,!0),b.tail===null&&b.tailMode==="hidden"&&!x.alternate&&!Ct)return bn(s),null}else 2*Mt()-b.renderingStartTime>Js&&l!==1073741824&&(s.flags|=128,h=!0,Du(b,!1),s.lanes=4194304);b.isBackwards?(x.sibling=s.child,s.child=x):(l=b.last,l!==null?l.sibling=x:s.child=x,b.last=x)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=Mt(),s.sibling=null,l=Pt.current,bt(Pt,h?l&1|2:l&1),s):(bn(s),null);case 22:case 23:return a0(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(Kn&1073741824)!==0&&(bn(s),s.subtreeFlags&6&&(s.flags|=8192)):bn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function y7(i,s){switch(gm(s),s.tag){case 1:return Dn(s.type)&&jc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Gs(),St(Ln),St(En),Pm(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return vm(s),null;case 13:if(St(Pt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Vs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return St(Pt),null;case 4:return Gs(),null;case 10:return Sm(s.type._context),null;case 22:case 23:return a0(),null;case 24:return null;default:return null}}var ud=!1,Tn=!1,b7=typeof WeakSet=="function"?WeakSet:Set,ke=null;function Ks(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){It(i,s,h)}else l.current=null}function Xm(i,s,l){try{l()}catch(h){It(i,s,h)}}var m2=!1;function T7(i,s){if(am=kc,i=WS(),Zp(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 x=0,R=-1,U=-1,Z=0,le=0,he=i,ae=null;t:for(;;){for(var we;he!==l||E!==0&&he.nodeType!==3||(R=x+E),he!==b||h!==0&&he.nodeType!==3||(U=x+h),he.nodeType===3&&(x+=he.nodeValue.length),(we=he.firstChild)!==null;)ae=he,he=we;for(;;){if(he===i)break t;if(ae===l&&++Z===E&&(R=x),ae===b&&++le===h&&(U=x),(we=he.nextSibling)!==null)break;he=ae,ae=he.parentNode}he=we}l=R===-1||U===-1?null:{start:R,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(um={focusedElem:i,selectionRange:l},kc=!1,ke=s;ke!==null;)if(s=ke,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,ke=i;else for(;ke!==null;){s=ke;try{var Ne=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Ie=Ne.memoizedProps,Ft=Ne.memoizedState,W=s.stateNode,j=W.getSnapshotBeforeUpdate(s.elementType===s.type?Ie:Ar(s.type,Ie),Ft);W.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var K=s.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Te){It(s,s.return,Te)}if(i=s.sibling,i!==null){i.return=s.return,ke=i;break}ke=s.return}return Ne=m2,m2=!1,Ne}function Mu(i,s,l){var h=s.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&&Xm(s,l,b)}E=E.next}while(E!==h)}}function ld(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==s)}}function Km(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function g2(i){var s=i.alternate;s!==null&&(i.alternate=null,g2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Xr],delete s[Au],delete s[fm],delete s[n7],delete s[r7])),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 E2(i){return i.tag===5||i.tag===3||i.tag===4}function y2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||E2(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 Qm(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=Hc));else if(h!==4&&(i=i.child,i!==null))for(Qm(i,s,l),i=i.sibling;i!==null;)Qm(i,s,l),i=i.sibling}function Jm(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Jm(i,s,l),i=i.sibling;i!==null;)Jm(i,s,l),i=i.sibling}var un=null,Cr=!1;function Wi(i,s,l){for(l=l.child;l!==null;)b2(i,s,l),l=l.sibling}function b2(i,s,l){if(Gr&&typeof Gr.onCommitFiberUnmount=="function")try{Gr.onCommitFiberUnmount(Sc,l)}catch(R){}switch(l.tag){case 5:Tn||Ks(l,s);case 6:var h=un,E=Cr;un=null,Wi(i,s,l),un=h,Cr=E,un!==null&&(Cr?(i=un,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):un.removeChild(l.stateNode));break;case 18:un!==null&&(Cr?(i=un,l=l.stateNode,i.nodeType===8?dm(i.parentNode,l):i.nodeType===1&&dm(i,l),pu(i)):dm(un,l.stateNode));break;case 4:h=un,E=Cr,un=l.stateNode.containerInfo,Cr=!0,Wi(i,s,l),un=h,Cr=E;break;case 0:case 11:case 14:case 15:if(!Tn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,x=b.destroy;b=b.tag,x!==void 0&&((b&2)!==0||(b&4)!==0)&&Xm(l,s,x),E=E.next}while(E!==h)}Wi(i,s,l);break;case 1:if(!Tn&&(Ks(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(R){It(l,s,R)}Wi(i,s,l);break;case 21:Wi(i,s,l);break;case 22:l.mode&1?(Tn=(h=Tn)||l.memoizedState!==null,Wi(i,s,l),Tn=h):Wi(i,s,l);break;default:Wi(i,s,l)}}function T2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new b7),s.forEach(function(h){var E=P7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function vr(i,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var b=i,x=s,R=x;e:for(;R!==null;){switch(R.tag){case 5:un=R.stateNode,Cr=!1;break e;case 3:un=R.stateNode.containerInfo,Cr=!0;break e;case 4:un=R.stateNode.containerInfo,Cr=!0;break e}R=R.return}if(un===null)throw Error(n(160));b2(b,x,E),un=null,Cr=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(Z){It(E,s,Z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)_2(s,i),s=s.sibling}function _2(i,s){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(vr(s,i),Jr(i),h&4){try{Mu(3,i,i.return),ld(3,i)}catch(Ie){It(i,i.return,Ie)}try{Mu(5,i,i.return)}catch(Ie){It(i,i.return,Ie)}}break;case 1:vr(s,i),Jr(i),h&512&&l!==null&&Ks(l,l.return);break;case 5:if(vr(s,i),Jr(i),h&512&&l!==null&&Ks(l,l.return),i.flags&32){var E=i.stateNode;try{Re(E,"")}catch(Ie){It(i,i.return,Ie)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,x=l!==null?l.memoizedProps:b,R=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{R==="input"&&b.type==="radio"&&b.name!=null&&Li(E,b),Wr(R,x);var Z=Wr(R,b);for(x=0;x<U.length;x+=2){var le=U[x],he=U[x+1];le==="style"?sn(E,he):le==="dangerouslySetInnerHTML"?qe(E,he):le==="children"?Re(E,he):k(E,le,he,Z)}switch(R){case"input":fi(E,b);break;case"textarea":it(E,b);break;case"select":var ae=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var we=b.value;we!=null?Ae(E,!!b.multiple,we,!1):ae!==!!b.multiple&&(b.defaultValue!=null?Ae(E,!!b.multiple,b.defaultValue,!0):Ae(E,!!b.multiple,b.multiple?[]:"",!1))}E[Au]=b}catch(Ie){It(i,i.return,Ie)}}break;case 6:if(vr(s,i),Jr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Ie){It(i,i.return,Ie)}}break;case 3:if(vr(s,i),Jr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{pu(s.containerInfo)}catch(Ie){It(i,i.return,Ie)}break;case 4:vr(s,i),Jr(i);break;case 13:vr(s,i),Jr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(t0=Mt())),h&4&&T2(i);break;case 22:if(le=l!==null&&l.memoizedState!==null,i.mode&1?(Tn=(Z=Tn)||le,vr(s,i),Tn=Z):vr(s,i),Jr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!le&&(i.mode&1)!==0)for(ke=i,le=i.child;le!==null;){for(he=ke=le;ke!==null;){switch(ae=ke,we=ae.child,ae.tag){case 0:case 11:case 14:case 15:Mu(4,ae,ae.return);break;case 1:Ks(ae,ae.return);var Ne=ae.stateNode;if(typeof Ne.componentWillUnmount=="function"){h=ae,l=ae.return;try{s=h,Ne.props=s.memoizedProps,Ne.state=s.memoizedState,Ne.componentWillUnmount()}catch(Ie){It(h,l,Ie)}}break;case 5:Ks(ae,ae.return);break;case 22:if(ae.memoizedState!==null){w2(he);continue}}we!==null?(we.return=ae,ke=we):w2(he)}le=le.sibling}e:for(le=null,he=i;;){if(he.tag===5){if(le===null){le=he;try{E=he.stateNode,Z?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(R=he.stateNode,U=he.memoizedProps.style,x=U!=null&&U.hasOwnProperty("display")?U.display:null,R.style.display=jt("display",x))}catch(Ie){It(i,i.return,Ie)}}}else if(he.tag===6){if(le===null)try{he.stateNode.nodeValue=Z?"":he.memoizedProps}catch(Ie){It(i,i.return,Ie)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===i)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===i)break e;for(;he.sibling===null;){if(he.return===null||he.return===i)break e;le===he&&(le=null),he=he.return}le===he&&(le=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:vr(s,i),Jr(i),h&4&&T2(i);break;case 21:break;default:vr(s,i),Jr(i)}}function Jr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(E2(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&&(Re(E,""),h.flags&=-33);var b=y2(i);Jm(i,b,E);break;case 3:case 4:var x=h.stateNode.containerInfo,R=y2(i);Qm(i,R,x);break;default:throw Error(n(161))}}catch(U){It(i,i.return,U)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function _7(i,s,l){ke=i,S2(i)}function S2(i,s,l){for(var h=(i.mode&1)!==0;ke!==null;){var E=ke,b=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||ud;if(!x){var R=E.alternate,U=R!==null&&R.memoizedState!==null||Tn;R=ud;var Z=Tn;if(ud=x,(Tn=U)&&!Z)for(ke=E;ke!==null;)x=ke,U=x.child,x.tag===22&&x.memoizedState!==null?A2(E):U!==null?(U.return=x,ke=U):A2(E);for(;b!==null;)ke=b,S2(b),b=b.sibling;ke=E,ud=R,Tn=Z}x2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,ke=b):x2(i)}}function x2(i){for(;ke!==null;){var s=ke;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Tn||ld(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!Tn)if(l===null)h.componentDidMount();else{var E=s.elementType===s.type?l.memoizedProps:Ar(s.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&wx(s,b,h);break;case 3:var x=s.updateQueue;if(x!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}wx(s,x,l)}break;case 5:var R=s.stateNode;if(l===null&&s.flags&4){l=R;var U=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&l.focus();break;case"img":U.src&&(l.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Z=s.alternate;if(Z!==null){var le=Z.memoizedState;if(le!==null){var he=le.dehydrated;he!==null&&pu(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Tn||s.flags&512&&Km(s)}catch(ae){It(s,s.return,ae)}}if(s===i){ke=null;break}if(l=s.sibling,l!==null){l.return=s.return,ke=l;break}ke=s.return}}function w2(i){for(;ke!==null;){var s=ke;if(s===i){ke=null;break}var l=s.sibling;if(l!==null){l.return=s.return,ke=l;break}ke=s.return}}function A2(i){for(;ke!==null;){var s=ke;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{ld(4,s)}catch(U){It(s,l,U)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch(U){It(s,E,U)}}var b=s.return;try{Km(s)}catch(U){It(s,b,U)}break;case 5:var x=s.return;try{Km(s)}catch(U){It(s,x,U)}}}catch(U){It(s,s.return,U)}if(s===i){ke=null;break}var R=s.sibling;if(R!==null){R.return=s.return,ke=R;break}ke=s.return}}var S7=Math.ceil,cd=H.ReactCurrentDispatcher,Zm=H.ReactCurrentOwner,cr=H.ReactCurrentBatchConfig,ot=0,nn=null,$t=null,ln=0,Kn=0,Qs=ji(0),Gt=0,Fu=null,Io=0,dd=0,e0=0,Bu=null,Fn=null,t0=0,Js=1/0,_i=null,fd=!1,n0=null,Gi=null,hd=!1,Xi=null,pd=0,Uu=0,r0=null,md=-1,gd=0;function An(){return(ot&6)!==0?Mt():md!==-1?md:md=Mt()}function Ki(i){return(i.mode&1)===0?1:(ot&2)!==0&&ln!==0?ln&-ln:o7.transition!==null?(gd===0&&(gd=yS()),gd):(i=ct,i!==0||(i=window.event,i=i===void 0?16:vS(i.type)),i)}function kr(i,s,l,h){if(50<Uu)throw Uu=0,r0=null,Error(n(185));lu(i,l,h),((ot&2)===0||i!==nn)&&(i===nn&&((ot&2)===0&&(dd|=l),Gt===4&&Qi(i,ln)),Bn(i,h),l===1&&ot===0&&(s.mode&1)===0&&(Js=Mt()+500,Vc&&Vi()))}function Bn(i,s){var l=i.callbackNode;oB(i,s);var h=Ac(i,i===nn?ln:0);if(h===0)l!==null&&mS(l),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(l!=null&&mS(l),s===1)i.tag===0?i7(v2.bind(null,i)):fx(v2.bind(null,i)),e7(function(){(ot&6)===0&&Vi()}),l=null;else{switch(bS(h)){case 1:l=Mp;break;case 4:l=gS;break;case 16:l=_c;break;case 536870912:l=ES;break;default:l=_c}l=D2(l,C2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function C2(i,s){if(md=-1,gd=0,(ot&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Zs()&&i.callbackNode!==l)return null;var h=Ac(i,i===nn?ln:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Ed(i,h);else{s=h;var E=ot;ot|=2;var b=P2();(nn!==i||ln!==s)&&(_i=null,Js=Mt()+500,Lo(i,s));do try{A7();break}catch(R){k2(i,R)}while(!0);_m(),cd.current=b,ot=E,$t!==null?s=0:(nn=null,ln=0,s=Gt)}if(s!==0){if(s===2&&(E=Fp(i),E!==0&&(h=E,s=i0(i,E))),s===1)throw l=Fu,Lo(i,0),Qi(i,h),Bn(i,Mt()),l;if(s===6)Qi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!x7(E)&&(s=Ed(i,h),s===2&&(b=Fp(i),b!==0&&(h=b,s=i0(i,b))),s===1))throw l=Fu,Lo(i,0),Qi(i,h),Bn(i,Mt()),l;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:Do(i,Fn,_i);break;case 3:if(Qi(i,h),(h&130023424)===h&&(s=t0+500-Mt(),10<s)){if(Ac(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){An(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=cm(Do.bind(null,i,Fn,_i),s);break}Do(i,Fn,_i);break;case 4:if(Qi(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var x=31-Sr(h);b=1<<x,x=s[x],x>E&&(E=x),h&=~b}if(h=E,h=Mt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*S7(h/1960))-h,10<h){i.timeoutHandle=cm(Do.bind(null,i,Fn,_i),h);break}Do(i,Fn,_i);break;case 5:Do(i,Fn,_i);break;default:throw Error(n(329))}}}return Bn(i,Mt()),i.callbackNode===l?C2.bind(null,i):null}function i0(i,s){var l=Bu;return i.current.memoizedState.isDehydrated&&(Lo(i,s).flags|=256),i=Ed(i,s),i!==2&&(s=Fn,Fn=l,s!==null&&o0(s)),i}function o0(i){Fn===null?Fn=i:Fn.push.apply(Fn,i)}function x7(i){for(var s=i;;){if(s.flags&16384){var l=s.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(!xr(b(),E))return!1}catch(x){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Qi(i,s){for(s&=~e0,s&=~dd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-Sr(s),h=1<<l;i[l]=-1,s&=~h}}function v2(i){if((ot&6)!==0)throw Error(n(327));Zs();var s=Ac(i,0);if((s&1)===0)return Bn(i,Mt()),null;var l=Ed(i,s);if(i.tag!==0&&l===2){var h=Fp(i);h!==0&&(s=h,l=i0(i,h))}if(l===1)throw l=Fu,Lo(i,0),Qi(i,s),Bn(i,Mt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Do(i,Fn,_i),Bn(i,Mt()),null}function s0(i,s){var l=ot;ot|=1;try{return i(s)}finally{ot=l,ot===0&&(Js=Mt()+500,Vc&&Vi())}}function Ro(i){Xi!==null&&Xi.tag===0&&(ot&6)===0&&Zs();var s=ot;ot|=1;var l=cr.transition,h=ct;try{if(cr.transition=null,ct=1,i)return i()}finally{ct=h,cr.transition=l,ot=s,(ot&6)===0&&Vi()}}function a0(){Kn=Qs.current,St(Qs)}function Lo(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,ZB(l)),$t!==null)for(l=$t.return;l!==null;){var h=l;switch(gm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&jc();break;case 3:Gs(),St(Ln),St(En),Pm();break;case 5:vm(h);break;case 4:Gs();break;case 13:St(Pt);break;case 19:St(Pt);break;case 10:Sm(h.type._context);break;case 22:case 23:a0()}l=l.return}if(nn=i,$t=i=Ji(i.current,null),ln=Kn=s,Gt=0,Fu=null,e0=dd=Io=0,Fn=Bu=null,Po!==null){for(s=0;s<Po.length;s++)if(l=Po[s],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,b=l.pending;if(b!==null){var x=b.next;b.next=E,h.next=x}l.pending=h}Po=null}return i}function k2(i,s){do{var l=$t;try{if(_m(),ed.current=id,td){for(var h=Nt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}td=!1}if(Oo=0,tn=Wt=Nt=null,Ou=!1,Iu=0,Zm.current=null,l===null||l.return===null){Gt=1,Fu=s,$t=null;break}e:{var b=i,x=l.return,R=l,U=s;if(s=ln,R.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var Z=U,le=R,he=le.tag;if((le.mode&1)===0&&(he===0||he===11||he===15)){var ae=le.alternate;ae?(le.updateQueue=ae.updateQueue,le.memoizedState=ae.memoizedState,le.lanes=ae.lanes):(le.updateQueue=null,le.memoizedState=null)}var we=Zx(x);if(we!==null){we.flags&=-257,e2(we,x,R,b,s),we.mode&1&&Jx(b,Z,s),s=we,U=Z;var Ne=s.updateQueue;if(Ne===null){var Ie=new Set;Ie.add(U),s.updateQueue=Ie}else Ne.add(U);break e}else{if((s&1)===0){Jx(b,Z,s),u0();break e}U=Error(n(426))}}else if(Ct&&R.mode&1){var Ft=Zx(x);if(Ft!==null){(Ft.flags&65536)===0&&(Ft.flags|=256),e2(Ft,x,R,b,s),bm(Xs(U,R));break e}}b=U=Xs(U,R),Gt!==4&&(Gt=2),Bu===null?Bu=[b]:Bu.push(b),b=x;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var W=Kx(b,U,s);xx(b,W);break e;case 1:R=U;var j=b.type,K=b.stateNode;if((b.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Gi===null||!Gi.has(K)))){b.flags|=65536,s&=-s,b.lanes|=s;var Te=Qx(b,R,s);xx(b,Te);break e}}b=b.return}while(b!==null)}O2(l)}catch(Le){s=Le,$t===l&&l!==null&&($t=l=l.return);continue}break}while(!0)}function P2(){var i=cd.current;return cd.current=id,i===null?id:i}function u0(){(Gt===0||Gt===3||Gt===2)&&(Gt=4),nn===null||(Io&268435455)===0&&(dd&268435455)===0||Qi(nn,ln)}function Ed(i,s){var l=ot;ot|=2;var h=P2();(nn!==i||ln!==s)&&(_i=null,Lo(i,s));do try{w7();break}catch(E){k2(i,E)}while(!0);if(_m(),ot=l,cd.current=h,$t!==null)throw Error(n(261));return nn=null,ln=0,Gt}function w7(){for(;$t!==null;)N2($t)}function A7(){for(;$t!==null&&!K9();)N2($t)}function N2(i){var s=L2(i.alternate,i,Kn);i.memoizedProps=i.pendingProps,s===null?O2(i):$t=s,Zm.current=null}function O2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=E7(l,s,Kn),l!==null){$t=l;return}}else{if(l=y7(l,s),l!==null){l.flags&=32767,$t=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Gt=6,$t=null;return}}if(s=s.sibling,s!==null){$t=s;return}$t=s=i}while(s!==null);Gt===0&&(Gt=5)}function Do(i,s,l){var h=ct,E=cr.transition;try{cr.transition=null,ct=1,C7(i,s,l,h)}finally{cr.transition=E,ct=h}return null}function C7(i,s,l,h){do Zs();while(Xi!==null);if((ot&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(sB(i,b),i===nn&&($t=nn=null,ln=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||hd||(hd=!0,D2(_c,function(){return Zs(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=cr.transition,cr.transition=null;var x=ct;ct=1;var R=ot;ot|=4,Zm.current=null,T7(i,l),_2(l,i),YB(um),kc=!!am,um=am=null,i.current=l,_7(l),Q9(),ot=R,ct=x,cr.transition=b}else i.current=l;if(hd&&(hd=!1,Xi=i,pd=E),b=i.pendingLanes,b===0&&(Gi=null),eB(l.stateNode),Bn(i,Mt()),s!==null)for(h=i.onRecoverableError,l=0;l<s.length;l++)E=s[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(fd)throw fd=!1,i=n0,n0=null,i;return(pd&1)!==0&&i.tag!==0&&Zs(),b=i.pendingLanes,(b&1)!==0?i===r0?Uu++:(Uu=0,r0=i):Uu=0,Vi(),null}function Zs(){if(Xi!==null){var i=bS(pd),s=cr.transition,l=ct;try{if(cr.transition=null,ct=16>i?16:i,Xi===null)var h=!1;else{if(i=Xi,Xi=null,pd=0,(ot&6)!==0)throw Error(n(331));var E=ot;for(ot|=4,ke=i.current;ke!==null;){var b=ke,x=b.child;if((ke.flags&16)!==0){var R=b.deletions;if(R!==null){for(var U=0;U<R.length;U++){var Z=R[U];for(ke=Z;ke!==null;){var le=ke;switch(le.tag){case 0:case 11:case 15:Mu(8,le,b)}var he=le.child;if(he!==null)he.return=le,ke=he;else for(;ke!==null;){le=ke;var ae=le.sibling,we=le.return;if(g2(le),le===Z){ke=null;break}if(ae!==null){ae.return=we,ke=ae;break}ke=we}}}var Ne=b.alternate;if(Ne!==null){var Ie=Ne.child;if(Ie!==null){Ne.child=null;do{var Ft=Ie.sibling;Ie.sibling=null,Ie=Ft}while(Ie!==null)}}ke=b}}if((b.subtreeFlags&2064)!==0&&x!==null)x.return=b,ke=x;else e:for(;ke!==null;){if(b=ke,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Mu(9,b,b.return)}var W=b.sibling;if(W!==null){W.return=b.return,ke=W;break e}ke=b.return}}var j=i.current;for(ke=j;ke!==null;){x=ke;var K=x.child;if((x.subtreeFlags&2064)!==0&&K!==null)K.return=x,ke=K;else e:for(x=j;ke!==null;){if(R=ke,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:ld(9,R)}}catch(Le){It(R,R.return,Le)}if(R===x){ke=null;break e}var Te=R.sibling;if(Te!==null){Te.return=R.return,ke=Te;break e}ke=R.return}}if(ot=E,Vi(),Gr&&typeof Gr.onPostCommitFiberRoot=="function")try{Gr.onPostCommitFiberRoot(Sc,i)}catch(Le){}h=!0}return h}finally{ct=l,cr.transition=s}}return!1}function I2(i,s,l){s=Xs(l,s),s=Kx(i,s,1),i=Yi(i,s,1),s=An(),i!==null&&(lu(i,1,s),Bn(i,s))}function It(i,s,l){if(i.tag===3)I2(i,i,l);else for(;s!==null;){if(s.tag===3){I2(s,i,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Gi===null||!Gi.has(h))){i=Xs(l,i),i=Qx(s,i,1),s=Yi(s,i,1),i=An(),s!==null&&(lu(s,1,i),Bn(s,i));break}}s=s.return}}function v7(i,s,l){var h=i.pingCache;h!==null&&h.delete(s),s=An(),i.pingedLanes|=i.suspendedLanes&l,nn===i&&(ln&l)===l&&(Gt===4||Gt===3&&(ln&130023424)===ln&&500>Mt()-t0?Lo(i,0):e0|=l),Bn(i,s)}function R2(i,s){s===0&&((i.mode&1)===0?s=1:(s=wc,wc<<=1,(wc&130023424)===0&&(wc=4194304)));var l=An();i=yi(i,s),i!==null&&(lu(i,s,l),Bn(i,l))}function k7(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),R2(i,l)}function P7(i,s){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(s),R2(i,l)}var L2;L2=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||Ln.current)Mn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return Mn=!1,g7(i,s,l);Mn=(i.flags&131072)!==0}else Mn=!1,Ct&&(s.flags&1048576)!==0&&hx(s,Yc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;ad(i,s),i=s.pendingProps;var E=zs(s,En.current);Ws(s,l),E=Im(null,s,h,i,E,l);var b=Rm();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Dn(h)?(b=!0,$c(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Am(s),E.updater=od,s.stateNode=E,E._reactInternals=s,Um(s,h,i,l),s=$m(null,s,h,!0,b,l)):(s.tag=0,Ct&&b&&mm(s),wn(null,s,E,l),s=s.child),s;case 16:h=s.elementType;e:{switch(ad(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=O7(h),i=Ar(h,i),E){case 0:s=jm(null,s,h,i,l);break e;case 1:s=s2(null,s,h,i,l);break e;case 11:s=t2(null,s,h,i,l);break e;case 14:s=n2(null,s,h,Ar(h.type,i),l);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),jm(i,s,h,E,l);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),s2(i,s,h,E,l);case 3:e:{if(a2(s),i===null)throw Error(n(387));h=s.pendingProps,b=s.memoizedState,E=b.element,Sx(i,s),Jc(s,h,null,l);var x=s.memoizedState;if(h=x.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=Xs(Error(n(423)),s),s=u2(i,s,h,l,E);break e}else if(h!==E){E=Xs(Error(n(424)),s),s=u2(i,s,h,l,E);break e}else for(Xn=zi(s.stateNode.containerInfo.firstChild),Gn=s,Ct=!0,wr=null,l=Tx(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Vs(),h===E){s=Ti(i,s,l);break e}wn(i,s,h,l)}s=s.child}return s;case 5:return Ax(s),i===null&&ym(s),h=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,x=E.children,lm(h,E)?x=null:b!==null&&lm(h,b)&&(s.flags|=32),o2(i,s),wn(i,s,x,l),s.child;case 6:return i===null&&ym(s),null;case 13:return l2(i,s,l);case 4:return Cm(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=qs(s,null,h,l):wn(i,s,h,l),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),t2(i,s,h,E,l);case 7:return wn(i,s,s.pendingProps,l),s.child;case 8:return wn(i,s,s.pendingProps.children,l),s.child;case 12:return wn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(h=s.type._context,E=s.pendingProps,b=s.memoizedProps,x=E.value,bt(Xc,h._currentValue),h._currentValue=x,b!==null)if(xr(b.value,x)){if(b.children===E.children&&!Ln.current){s=Ti(i,s,l);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var R=b.dependencies;if(R!==null){x=b.child;for(var U=R.firstContext;U!==null;){if(U.context===h){if(b.tag===1){U=bi(-1,l&-l),U.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var le=Z.pending;le===null?U.next=U:(U.next=le.next,le.next=U),Z.pending=U}}b.lanes|=l,U=b.alternate,U!==null&&(U.lanes|=l),xm(b.return,l,s),R.lanes|=l;break}U=U.next}}else if(b.tag===10)x=b.type===s.type?null:b.child;else if(b.tag===18){if(x=b.return,x===null)throw Error(n(341));x.lanes|=l,R=x.alternate,R!==null&&(R.lanes|=l),xm(x,l,s),x=b.sibling}else x=b.child;if(x!==null)x.return=b;else for(x=b;x!==null;){if(x===s){x=null;break}if(b=x.sibling,b!==null){b.return=x.return,x=b;break}x=x.return}b=x}wn(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,Ws(s,l),E=ur(E),h=h(E),s.flags|=1,wn(i,s,h,l),s.child;case 14:return h=s.type,E=Ar(h,s.pendingProps),E=Ar(h.type,E),n2(i,s,h,E,l);case 15:return r2(i,s,s.type,s.pendingProps,l);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),ad(i,s),s.tag=1,Dn(h)?(i=!0,$c(s)):i=!1,Ws(s,l),Gx(s,h,E),Um(s,h,E,l),$m(null,s,h,!0,i,l);case 19:return d2(i,s,l);case 22:return i2(i,s,l)}throw Error(n(156,s.tag))};function D2(i,s){return pS(i,s)}function N7(i,s,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=s,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 dr(i,s,l,h){return new N7(i,s,l,h)}function l0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function O7(i){if(typeof i=="function")return l0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ce)return 11;if(i===be)return 14}return 2}function Ji(i,s){var l=i.alternate;return l===null?(l=dr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function yd(i,s,l,h,E,b){var x=2;if(h=i,typeof i=="function")l0(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case q:return Mo(l.children,E,b,s);case ie:x=8,E|=8;break;case ge:return i=dr(12,l,s,E|2),i.elementType=ge,i.lanes=b,i;case fe:return i=dr(13,l,s,E),i.elementType=fe,i.lanes=b,i;case te:return i=dr(19,l,s,E),i.elementType=te,i.lanes=b,i;case se:return bd(l,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:x=10;break e;case oe:x=9;break e;case ce:x=11;break e;case be:x=14;break e;case ve:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=dr(x,l,s,E),s.elementType=i,s.type=h,s.lanes=b,s}function Mo(i,s,l,h){return i=dr(7,i,h,s),i.lanes=l,i}function bd(i,s,l,h){return i=dr(22,i,h,s),i.elementType=se,i.lanes=l,i.stateNode={isHidden:!1},i}function c0(i,s,l){return i=dr(6,i,null,s),i.lanes=l,i}function d0(i,s,l){return s=dr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function I7(i,s,l,h,E){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=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 f0(i,s,l,h,E,b,x,R,U){return i=new I7(i,s,l,R,U),s===1?(s=1,b===!0&&(s|=8)):s=0,b=dr(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Am(b),i}function R7(i,s,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,key:h==null?null:""+h,children:i,containerInfo:s,implementation:l}}function M2(i){if(!i)return $i;i=i._reactInternals;e:{if(wo(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Dn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(Dn(l))return cx(i,l,s)}return s}function F2(i,s,l,h,E,b,x,R,U){return i=f0(l,h,!0,i,E,b,x,R,U),i.context=M2(null),l=i.current,h=An(),E=Ki(l),b=bi(h,E),b.callback=s!=null?s:null,Yi(l,b,E),i.current.lanes=E,lu(i,E,h),Bn(i,h),i}function Td(i,s,l,h){var E=s.current,b=An(),x=Ki(E);return l=M2(l),s.context===null?s.context=l:s.pendingContext=l,s=bi(b,x),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=Yi(E,s,x),i!==null&&(kr(i,E,x,b),Qc(i,E,x)),x}function _d(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function B2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function h0(i,s){B2(i,s),(i=i.alternate)&&B2(i,s)}function L7(){return null}var U2=typeof reportError=="function"?reportError:function(i){console.error(i)};function p0(i){this._internalRoot=i}Sd.prototype.render=p0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Td(i,s,null,null)},Sd.prototype.unmount=p0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Ro(function(){Td(null,i,null,null)}),s[pi]=null}};function Sd(i){this._internalRoot=i}Sd.prototype.unstable_scheduleHydration=function(i){if(i){var s=SS();i={blockedOn:null,target:i,priority:s};for(var l=0;l<Bi.length&&s!==0&&s<Bi[l].priority;l++);Bi.splice(l,0,i),l===0&&AS(i)}};function m0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function xd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function H2(){}function D7(i,s,l,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var Z=_d(x);b.call(Z)}}var x=F2(s,h,i,0,null,!1,!1,"",H2);return i._reactRootContainer=x,i[pi]=x.current,xu(i.nodeType===8?i.parentNode:i),Ro(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var R=h;h=function(){var Z=_d(U);R.call(Z)}}var U=f0(i,0,!1,null,null,!1,!1,"",H2);return i._reactRootContainer=U,i[pi]=U.current,xu(i.nodeType===8?i.parentNode:i),Ro(function(){Td(s,U,l,h)}),U}function wd(i,s,l,h,E){var b=l._reactRootContainer;if(b){var x=b;if(typeof E=="function"){var R=E;E=function(){var U=_d(x);R.call(U)}}Td(s,x,i,E)}else x=D7(l,s,i,E,h);return _d(x)}TS=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=uu(s.pendingLanes);l!==0&&(Up(s,l|1),Bn(s,Mt()),(ot&6)===0&&(Js=Mt()+500,Vi()))}break;case 13:Ro(function(){var h=yi(i,1);if(h!==null){var E=An();kr(h,i,1,E)}}),h0(i,1)}},Hp=function(i){if(i.tag===13){var s=yi(i,134217728);if(s!==null){var l=An();kr(s,i,134217728,l)}h0(i,134217728)}},_S=function(i){if(i.tag===13){var s=Ki(i),l=yi(i,s);if(l!==null){var h=An();kr(l,i,s,h)}h0(i,s)}},SS=function(){return ct},xS=function(i,s){var l=ct;try{return ct=i,s()}finally{ct=l}},Ip=function(i,s,l){switch(s){case"input":if(fi(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==i&&h.form===i.form){var E=zc(h);if(!E)throw Error(n(90));Vr(h),fi(h,E)}}}break;case"textarea":it(i,l);break;case"select":s=l.value,s!=null&&Ae(i,!!l.multiple,s,!1)}},aS=s0,uS=Ro;var M7={usingClientEntryPoint:!1,Events:[Cu,Us,zc,oS,sS,s0]},Hu={findFiberByHostInstance:Ao,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},F7={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:H.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=fS(i),i===null?null:i.stateNode},findFiberByHostInstance:Hu.findFiberByHostInstance||L7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var Ad=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ad.isDisabled&&Ad.supportsFiber)try{Sc=Ad.inject(F7),Gr=Ad}catch(i){}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M7,kn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m0(s))throw Error(n(200));return R7(i,s,null,l)},kn.createRoot=function(i,s){if(!m0(i))throw Error(n(299));var l=!1,h="",E=U2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=f0(i,1,!1,null,null,l,!1,h,E),i[pi]=s.current,xu(i.nodeType===8?i.parentNode:i),new p0(s)},kn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=fS(s),i=i===null?null:i.stateNode,i},kn.flushSync=function(i){return Ro(i)},kn.hydrate=function(i,s,l){if(!xd(s))throw Error(n(200));return wd(null,i,s,!0,l)},kn.hydrateRoot=function(i,s,l){if(!m0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,b="",x=U2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=F2(s,null,i,1,l!=null?l:null,E,!1,b,x),i[pi]=s.current,xu(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,E]:s.mutableSourceEagerHydrationData.push(l,E);return new Sd(s)},kn.render=function(i,s,l){if(!xd(s))throw Error(n(200));return wd(null,i,s,!1,l)},kn.unmountComponentAtNode=function(i){if(!xd(i))throw Error(n(40));return i._reactRootContainer?(Ro(function(){wd(null,null,i,!1,function(){i._reactRootContainer=null,i[pi]=null})}),!0):!1},kn.unstable_batchedUpdates=s0,kn.unstable_renderSubtreeIntoContainer=function(i,s,l,h){if(!xd(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return wd(i,s,l,!1,h)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var S1;function x1(){if(S1)return kf.exports;S1=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(),kf.exports=_k(),kf.exports}var Go=x1();function w1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=w1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function G(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=w1(e))&&(r&&(r+=" "),r+=t);return r}var A1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},C1=eo.createContext&&eo.createContext(A1),Sk=["attr","size","title"];function xk(e,t){if(e==null)return{};var n=wk(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wk(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 El(){return El=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},El.apply(this,arguments)}function v1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function yl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(n),!0).forEach(function(r){Ak(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ak(e,t,n){return t=Ck(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ck(e){var t=vk(e,"string");return typeof t=="symbol"?t:t+""}function vk(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 k1(e){return e&&e.map((t,n)=>eo.createElement(t.tag,yl({key:n},t.attr),k1(t.child)))}function kt(e){return t=>eo.createElement(kk,El({attr:yl({},e.attr)},t),k1(e.child))}function kk(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=xk(e,Sk),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),eo.createElement("svg",El({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:yl(yl({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&eo.createElement("title",null,a),e.children)};return C1!==void 0?eo.createElement(C1.Consumer,null,n=>t(n)):t(A1)}function Pk(e){return kt({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 oi=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:w.jsx("button",{className:G(e,`${z}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?w.jsx("img",{className:G(`${z}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),Nk="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",Ok=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=nt(),o=r==="messaging",a=o?"Open Commerce Client":"Open Copilot",u=o?w.jsx(Pk,{className:G(t,`${z}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||Nk,alt:"Copilot",className:G(t,`${z}-minimized-icon-img`)});return w.jsx(oi,{className:G(t,`${z}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},Ik=()=>{const{globalClassName:e,themeVariables:t}=nt(),n=()=>{pl(!1),ri(!0)};return Go.createPortal(w.jsx("div",{className:G(e,`${z}-minimized-container`),style:t,children:w.jsx(Ok,{onClick:n})}),document.body)};function P1(e){return kt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function N1(e){return kt({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 Xo(e){return kt({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 Rk(e){return kt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function O1(e){return kt({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 Lk(e){return kt({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 Dk(e){return kt({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 Mk(e){return kt({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 Fk(e){return kt({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 Bk(e){return kt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}const Uk=e=>({[`${Hn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Hn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Hn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Hn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Hn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Hn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),I1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:G(e,`${z}-close-button`),disabled:r,onClick:n,children:w.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),bl=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>w.jsx("button",{className:G(`${z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Hk=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:G(`${z}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(Xo,{size:"16px"})},zk=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(oi,{className:G(e,n,`cim-${r}-component`,`${z}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:w.jsx(Xo,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(bl,{className:G(e,n,`cim-${r}-component`,`${z}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&w.jsx(Hk,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function jk(e){return kt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const $k=()=>{const{messages:e}=tr(),{handleCancel:t}=Ir();return{cancelRequest:B.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},Vk=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=nt(),{cancelRequest:r}=$k();return n!=null&&n.enableCancelSearch?w.jsx(oi,{className:G(t,`${z}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:w.jsx(jk,{}),disabled:!e,onClick:r}):null};function EU(){}function yU(){}function R1(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function L1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const qk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wk={};function D1(e,t){return(Wk.jsx?Yk:qk).test(e)}const Gk=/[ \t\n\f\r]/g;function Xk(e){return typeof e=="object"?e.type==="text"?M1(e.value):!1:M1(e)}function M1(e){return e.replace(Gk,"")===""}let Ta=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ta.prototype.normal={},Ta.prototype.property={},Ta.prototype.space=void 0;function F1(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ta(n,r,t)}function _a(e){return e.toLowerCase()}let Pn=class{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 Kk=0;const Xe=ao(),Ht=ao(),Of=ao(),Ee=ao(),Et=ao(),Ko=ao(),zn=ao();function ao(){return ta(2,++Kk)}const If=Object.freeze(Object.defineProperty({__proto__:null,boolean:Xe,booleanish:Ht,commaOrSpaceSeparated:zn,commaSeparated:Ko,number:Ee,overloadedBoolean:Of,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),Rf=Object.keys(If);let Lf=class extends Pn{constructor(t,n,r,o){let a=-1;if(super(t,n),B1(this,"space",o),typeof r=="number")for(;++a<Rf.length;){const u=Rf[a];B1(this,Rf[a],(r&If[u])===If[u])}}};Lf.prototype.defined=!0;function B1(e,t,n){n&&(e[t]=n)}function Qo(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Lf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[_a(r)]=r,n[_a(a.attribute)]=r}return new Ta(t,n,e.space)}const U1=Qo({properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:Et,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:Ee,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:Et,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Ht,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 H1(e,t){return t in e?e[t]:t}function z1(e,t){return H1(e,t.toLowerCase())}const Qk=Qo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ko,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Xe,allowPaymentRequest:Xe,allowUserMedia:Xe,alt:null,as:null,async:Xe,autoCapitalize:null,autoComplete:Et,autoFocus:Xe,autoPlay:Xe,blocking:Et,capture:null,charSet:null,checked:Xe,cite:null,className:Et,cols:Ee,colSpan:null,content:null,contentEditable:Ht,controls:Xe,controlsList:Et,coords:Ee|Ko,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xe,defer:Xe,dir:null,dirName:null,disabled:Xe,download:Of,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xe,formTarget:null,headers:Et,height:Ee,hidden:Of,high:Ee,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Xe,inputMode:null,integrity:null,is:null,isMap:Xe,itemId:null,itemProp:Et,itemRef:Et,itemScope:Xe,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xe,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:Xe,muted:Xe,name:null,nonce:null,noModule:Xe,noValidate:Xe,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:Xe,optimum:Ee,pattern:null,ping:Et,placeholder:null,playsInline:Xe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xe,referrerPolicy:null,rel:Et,required:Xe,reversed:Xe,rows:Ee,rowSpan:Ee,sandbox:Et,scope:null,scoped:Xe,seamless:Xe,selected:Xe,shadowRootClonable:Xe,shadowRootDelegatesFocus:Xe,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Ht,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:Xe,useMap:null,value:Ht,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,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:Xe,declare:Xe,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:Xe,noHref:Xe,noShade:Xe,noWrap:Xe,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Xe,disableRemotePlayback:Xe,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:z1}),Jk=Qo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:zn,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:Et,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:Xe,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:Ko,g2:Ko,glyphName:Ko,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:zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zn,rev:zn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zn,requiredFeatures:zn,requiredFonts:zn,requiredFormats:zn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant: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:zn,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:zn,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:zn,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:H1}),j1=Qo({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()}}),$1=Qo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:z1}),V1=Qo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Zk={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"},eP=/[A-Z]/g,q1=/-[a-z]/g,tP=/^data[-\w.:]+$/i;function Df(e,t){const n=_a(t);let r=t,o=Pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&tP.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(q1,rP);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!q1.test(a)){let u=a.replace(eP,nP);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Lf}return new o(r,t)}function nP(e){return"-"+e.toLowerCase()}function rP(e){return e.charAt(1).toUpperCase()}const Tl=F1([U1,Qk,j1,$1,V1],"html"),Jo=F1([U1,Jk,j1,$1,V1],"svg");function Y1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function W1(e){return e.join(" ").trim()}var Zo={},Mf,G1;function iP(){if(G1)return Mf;G1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
18
+ `,f="/",p="*",m="",T="comment",y="declaration";Mf=function(S,A){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];A=A||{};var C=1,N=1;function k(fe){var te=fe.match(t);te&&(C+=te.length);var be=fe.lastIndexOf(d);N=~be?fe.length-be:N+fe.length}function H(){var fe={line:C,column:N};return function(te){return te.position=new V(fe),ie(),te}}function V(fe){this.start=fe,this.end={line:C,column:N},this.source=A.source}V.prototype.content=S;function F(fe){var te=new Error(A.source+":"+C+":"+N+": "+fe);if(te.reason=fe,te.filename=A.source,te.line=C,te.column=N,te.source=S,!A.silent)throw te}function q(fe){var te=fe.exec(S);if(te){var be=te[0];return k(be),S=S.slice(be.length),te}}function ie(){q(n)}function ge(fe){var te;for(fe=fe||[];te=$();)te!==!1&&fe.push(te);return fe}function $(){var fe=H();if(!(f!=S.charAt(0)||p!=S.charAt(1))){for(var te=2;m!=S.charAt(te)&&(p!=S.charAt(te)||f!=S.charAt(te+1));)++te;if(te+=2,m===S.charAt(te-1))return F("End of comment missing");var be=S.slice(2,te-2);return N+=2,k(be),S=S.slice(te),N+=2,fe({type:T,comment:be})}}function oe(){var fe=H(),te=q(r);if(te){if($(),!q(o))return F("property missing ':'");var be=q(a),ve=fe({type:y,property:_(te[0].replace(e,m)),value:be?_(be[0].replace(e,m)):m});return q(u),ve}}function ce(){var fe=[];ge(fe);for(var te;te=oe();)te!==!1&&(fe.push(te),ge(fe));return fe}return ie(),ce()};function _(S){return S?S.replace(c,m):m}return Mf}var X1;function oP(){if(X1)return Zo;X1=1;var e=Zo&&Zo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=n;var t=e(iP());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var f=d.property,p=d.value;c?o(f,p,d):p&&(a=a||{},a[f]=p)}}),a}return Zo}var Sa={},K1;function sP(){if(K1)return Sa;K1=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(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(o,c):f=f.replace(r,c),f.replace(t,u))};return Sa.camelCase=d,Sa}var xa,Q1;function aP(){if(Q1)return xa;Q1=1;var e=xa&&xa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(oP()),n=sP();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,xa=r,xa}var uP=aP();const lP=Qe(uP),_l=J1("end"),Rr=J1("start");function J1(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 Z1(e){const t=Rr(e),n=_l(e);if(t&&n)return{start:t,end:n}}function wa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?eE(e.position):"start"in e||"end"in e?eE(e):"line"in e||"column"in e?Ff(e):""}function Ff(e){return tE(e&&e.line)+":"+tE(e&&e.column)}function eE(e){return Ff(e&&e.start)+"-"+Ff(e&&e.end)}function tE(e){return e&&typeof e=="number"?e:1}class hn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=M({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=wa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}hn.prototype.file="",hn.prototype.name="",hn.prototype.reason="",hn.prototype.message="",hn.prototype.stack="",hn.prototype.column=void 0,hn.prototype.line=void 0,hn.prototype.ancestors=void 0,hn.prototype.cause=void 0,hn.prototype.fatal=void 0,hn.prototype.place=void 0,hn.prototype.ruleId=void 0,hn.prototype.source=void 0;const Bf={}.hasOwnProperty,cP=new Map,dP=/[A-Z]/g,fP=new Set(["table","tbody","thead","tfoot","tr"]),hP=new Set(["td","th"]),nE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pP(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=SP(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=_P(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Jo:Tl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=rE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function rE(e,t,n){if(t.type==="element")return mP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return gP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return yP(e,t,n);if(t.type==="mdxjsEsm")return EP(e,t);if(t.type==="root")return bP(e,t,n);if(t.type==="text")return TP(e,t)}function mP(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Jo,e.schema=o),e.ancestors.push(t);const a=oE(e,t.tagName,!1),u=xP(e,t);let c=Hf(e,t);return fP.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Xk(d):!0})),iE(e,u,a,t),Uf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function gP(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)}Aa(e,t.position)}function EP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Aa(e,t.position)}function yP(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Jo,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:oE(e,t.name,!0),u=wP(e,t),c=Hf(e,t);return iE(e,u,a,t),Uf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function bP(e,t,n){const r={};return Uf(r,Hf(e,t)),e.create(t,e.Fragment,r,n)}function TP(e,t){return t.value}function iE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Uf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function _P(e,t,n){return r;function r(o,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function SP(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=Rr(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function xP(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Bf.call(t.properties,o)){const a=AP(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&hP.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 wP(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 Aa(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Aa(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Hf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:cP;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=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const c=rE(e,a,u);c!==void 0&&n.push(c)}return n}function AP(e,t,n){const r=Df(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?L1(n):W1(n)),r.property==="style"){let o=typeof n=="object"?n:CP(e,String(n));return e.stylePropertyNameCase==="css"&&(o=vP(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Zk[r.property]||r.property:r.attribute,n]}}function CP(e,t){try{return lP(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new hn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=nE+"#cannot-parse-style-attribute",o}}function oE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=D1(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=D1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Bf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Aa(e)}function Aa(e,t){const n=new hn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=nE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function vP(e){const t={};let n;for(n in e)Bf.call(e,n)&&(t[kP(n)]=e[n]);return t}function kP(e){let t=e.replace(dP,PP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function PP(e){return"-"+e.toLowerCase()}const zf={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"]},NP={};function jf(e,t){const n=NP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return sE(e,r,o)}function sE(e,t,n){if(OP(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 aE(e.children,t,n)}return Array.isArray(e)?aE(e,t,n):""}function aE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=sE(e[o],t,n);return r.join("")}function OP(e){return!!(e&&typeof e=="object")}const uE=document.createElement("i");function $f(e){const t="&"+e+";";uE.innerHTML=t;const n=uE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function jn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function nr(e,t){return e.length>0?(jn(e,e.length,0,t),e):t}const lE={}.hasOwnProperty;function cE(e){const t={};let n=-1;for(;++n<e.length;)IP(t,e[n]);return t}function IP(e,t){let n;for(n in t){const o=(lE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){lE.call(o,u)||(o[u]=[]);const c=a[u];RP(o[u],Array.isArray(c)?c:c?[c]:[])}}}function RP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);jn(e,0,0,r)}function dE(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 gr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xn=Ai(/[A-Za-z]/),pn=Ai(/[\dA-Za-z]/),LP=Ai(/[#-'*+\--9=?A-Z^-~]/);function Sl(e){return e!==null&&(e<32||e===127)}const Vf=Ai(/\d/),DP=Ai(/[\dA-Fa-f]/),MP=Ai(/[!-/:-@[-`{-~]/);function He(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const xl=Ai(new RegExp("\\p{P}|\\p{S}","u")),uo=Ai(/\s/);function Ai(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function es(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&pn(e.charCodeAt(n+1))&&pn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function rt(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ze(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const FP={tokenize:BP};function BP(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),rt(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return He(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const UP={tokenize:HP},fE={tokenize:zP};function HP(e){const t=this,n=[];let r=0,o,a,u;return c;function c(k){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,d,f)(k)}return f(k)}function d(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&N();const H=t.events.length;let V=H,F;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){F=t.events[V][1].end;break}C(r);let q=H;for(;q<t.events.length;)t.events[q][1].end=M({},F),q++;return jn(t.events,V+1,0,t.events.slice(H)),t.events.length=q,f(k)}return c(k)}function f(k){if(r===n.length){if(!o)return T(k);if(o.currentConstruct&&o.currentConstruct.concrete)return _(k);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(fE,p,m)(k)}function p(k){return o&&N(),C(r),T(k)}function m(k){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(k)}function T(k){return t.containerState={},e.attempt(fE,y,_)(k)}function y(k){return r++,n.push([t.currentConstruct,t.containerState]),T(k)}function _(k){if(k===null){o&&N(),C(0),e.consume(k);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(k)}function S(k){if(k===null){A(e.exit("chunkFlow"),!0),C(0),e.consume(k);return}return He(k)?(e.consume(k),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(k),S)}function A(k,H){const V=t.sliceStream(k);if(H&&V.push(null),k.previous=a,a&&(a.next=k),a=k,o.defineSkip(k.start),o.write(V),t.parser.lazy[k.start.line]){let F=o.events.length;for(;F--;)if(o.events[F][1].start.offset<u&&(!o.events[F][1].end||o.events[F][1].end.offset>u))return;const q=t.events.length;let ie=q,ge,$;for(;ie--;)if(t.events[ie][0]==="exit"&&t.events[ie][1].type==="chunkFlow"){if(ge){$=t.events[ie][1].end;break}ge=!0}for(C(r),F=q;F<t.events.length;)t.events[F][1].end=M({},$),F++;jn(t.events,ie+1,0,t.events.slice(q)),t.events.length=F}}function C(k){let H=n.length;for(;H-- >k;){const V=n[H];t.containerState=V[1],V[0].exit.call(t,e)}n.length=k}function N(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function zP(e,t,n){return rt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ts(e){if(e===null||ht(e)||uo(e))return 1;if(xl(e))return 2}function wl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const qf={name:"attention",resolveAll:jP,tokenize:$P};function jP(e,t){let n=-1,r,o,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=M({},e[r][1].end),T=M({},e[n][1].start);hE(m,-d),hE(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:M({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:M({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:M({},e[r][1].end),end:M({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:M({},u.start),end:M({},c.end)},e[r][1].end=M({},u.start),e[n][1].start=M({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=nr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=nr(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=nr(f,wl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=nr(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=nr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,jn(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 $P(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ts(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=ts(d),m=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(o||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function hE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const VP={name:"autolink",tokenize:qP};function qP(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return xn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||pn(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||pn(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||Sl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):LP(y)?(e.consume(y),f):n(y)}function p(y){return pn(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||pn(y))&&r++<63){const _=y===45?T:m;return e.consume(y),_}return n(y)}}const Ca={partial:!0,tokenize:YP};function YP(e,t,n){return r;function r(a){return Ze(a)?rt(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||He(a)?t(a):n(a)}}const pE={continuation:{tokenize:GP},exit:XP,name:"blockQuote",tokenize:WP};function WP(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function GP(e,t,n){const r=this;return o;function o(u){return Ze(u)?rt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(pE,t,n)(u)}}function XP(e){e.exit("blockQuote")}const mE={name:"characterEscape",tokenize:KP};function KP(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return MP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const gE={name:"characterReference",tokenize:QP};function QP(e,t,n){const r=this;let o=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=pn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=DP,p):(e.enter("characterReferenceValue"),a=7,u=Vf,p(m))}function p(m){if(m===59&&o){const T=e.exit("characterReferenceValue");return u===pn&&!$f(r.sliceSerialize(T))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&o++<a?(e.consume(m),p):n(m)}}const EE={partial:!0,tokenize:ZP},yE={concrete:!0,name:"codeFenced",tokenize:JP};function JP(e,t,n){const r=this,o={partial:!0,tokenize:V};let a=0,u=0,c;return d;function d(F){return f(F)}function f(F){const q=r.events[r.events.length-1];return a=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,c=F,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(F)}function p(F){return F===c?(u++,e.consume(F),p):u<3?n(F):(e.exit("codeFencedFenceSequence"),Ze(F)?rt(e,m,"whitespace")(F):m(F))}function m(F){return F===null||He(F)?(e.exit("codeFencedFence"),r.interrupt?t(F):e.check(EE,S,H)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(F))}function T(F){return F===null||He(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(F)):Ze(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),rt(e,y,"whitespace")(F)):F===96&&F===c?n(F):(e.consume(F),T)}function y(F){return F===null||He(F)?m(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(F))}function _(F){return F===null||He(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(F)):F===96&&F===c?n(F):(e.consume(F),_)}function S(F){return e.attempt(o,H,A)(F)}function A(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),C}function C(F){return a>0&&Ze(F)?rt(e,N,"linePrefix",a+1)(F):N(F)}function N(F){return F===null||He(F)?e.check(EE,S,H)(F):(e.enter("codeFlowValue"),k(F))}function k(F){return F===null||He(F)?(e.exit("codeFlowValue"),N(F)):(e.consume(F),k)}function H(F){return e.exit("codeFenced"),t(F)}function V(F,q,ie){let ge=0;return $;function $(be){return F.enter("lineEnding"),F.consume(be),F.exit("lineEnding"),oe}function oe(be){return F.enter("codeFencedFence"),Ze(be)?rt(F,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(be):ce(be)}function ce(be){return be===c?(F.enter("codeFencedFenceSequence"),fe(be)):ie(be)}function fe(be){return be===c?(ge++,F.consume(be),fe):ge>=u?(F.exit("codeFencedFenceSequence"),Ze(be)?rt(F,te,"whitespace")(be):te(be)):ie(be)}function te(be){return be===null||He(be)?(F.exit("codeFencedFence"),q(be)):ie(be)}}}function ZP(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Yf={name:"codeIndented",tokenize:tN},eN={partial:!0,tokenize:nN};function tN(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),rt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):He(f)?e.attempt(eN,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||He(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function nN(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):rt(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):He(u)?o(u):n(u)}}const rN={name:"codeText",previous:oN,resolve:iN,tokenize:sN};function iN(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function oN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sN(e,t,n){let r=0,o,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"),o=0,p(m)):He(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||He(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class aN{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&va(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),va(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),va(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);va(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);va(this.left,n.reverse())}}}function va(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 bE(e){const t={};let n=-1,r,o,a,u,c,d,f;const p=new aN(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,uN(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=M({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return jn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function uN(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,m,T=-1,y=n,_=0,S=0;const A=[S];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),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&&(S=T+1,A.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),T=A.length;T--;){const C=c.slice(A[T],A[T+1]),N=a.pop();d.push([N,N+C.length-1]),e.splice(N,2,C)}for(d.reverse(),T=-1;++T<d.length;)f[_+d[T][0]]=_+d[T][1],_+=d[T][1]-d[T][0]-1;return f}const lN={resolve:dN,tokenize:fN},cN={partial:!0,tokenize:hN};function dN(e){return bE(e),e}function fN(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):He(c)?e.check(cN,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function hN(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),rt(e,a,"linePrefix")}function a(u){if(u===null||He(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function TE(e,t,n,r,o,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(C){return C===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(C),e.exit(a),T):C===null||C===32||C===41||Sl(C)?n(C):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(C))}function T(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(C))}function y(C){return C===62?(e.exit("chunkString"),e.exit(c),T(C)):C===null||C===60||He(C)?n(C):(e.consume(C),C===92?_:y)}function _(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function S(C){return!p&&(C===null||C===41||ht(C))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(C)):p<f&&C===40?(e.consume(C),p++,S):C===41?(e.consume(C),p--,S):C===null||C===32||C===40||Sl(C)?n(C):(e.consume(C),C===92?A:S)}function A(C){return C===40||C===41||C===92?(e.consume(C),S):S(C)}}function _E(e,t,n,r,o,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):He(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function SE(e,t,n,r,o,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):He(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),rt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||He(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 ka(e,t){let n;return r;function r(o){return He(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ze(o)?rt(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const pN={name:"definition",tokenize:gN},mN={partial:!0,tokenize:EN};function gN(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return _E.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return ht(y)?ka(e,f)(y):f(y)}function f(y){return TE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(mN,m,m)(y)}function m(y){return Ze(y)?rt(e,T,"whitespace")(y):T(y)}function T(y){return y===null||He(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function EN(e,t,n){return r;function r(c){return ht(c)?ka(e,o)(c):n(c)}function o(c){return SE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ze(c)?rt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||He(c)?t(c):n(c)}}const yN={name:"hardBreakEscape",tokenize:bN};function bN(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return He(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const TN={name:"headingAtx",resolve:_N,tokenize:SN};function _N(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},jn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function SN(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||ht(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||He(p)?(e.exit("atxHeading"),t(p)):Ze(p)?rt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ht(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const xN=["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"],xE=["pre","script","style","textarea"],wN={concrete:!0,name:"htmlFlow",resolveTo:vN,tokenize:kN},AN={partial:!0,tokenize:NN},CN={partial:!0,tokenize:PN};function vN(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 kN(e,t,n){const r=this;let o,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,S):O===63?(e.consume(O),o=3,r.interrupt?t:v):xn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function T(O){return O===45?(e.consume(O),o=2,y):O===91?(e.consume(O),o=5,c=0,_):xn(O)?(e.consume(O),o=4,r.interrupt?t:v):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:v):n(O)}function _(O){const _e="CDATA[";return O===_e.charCodeAt(c++)?(e.consume(O),c===_e.length?r.interrupt?t:ce:_):n(O)}function S(O){return xn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function A(O){if(O===null||O===47||O===62||ht(O)){const _e=O===47,De=u.toLowerCase();return!_e&&!a&&xE.includes(De)?(o=1,r.interrupt?t(O):ce(O)):xN.includes(u.toLowerCase())?(o=6,_e?(e.consume(O),C):r.interrupt?t(O):ce(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?N(O):k(O))}return O===45||pn(O)?(e.consume(O),u+=String.fromCharCode(O),A):n(O)}function C(O){return O===62?(e.consume(O),r.interrupt?t:ce):n(O)}function N(O){return Ze(O)?(e.consume(O),N):$(O)}function k(O){return O===47?(e.consume(O),$):O===58||O===95||xn(O)?(e.consume(O),H):Ze(O)?(e.consume(O),k):$(O)}function H(O){return O===45||O===46||O===58||O===95||pn(O)?(e.consume(O),H):V(O)}function V(O){return O===61?(e.consume(O),F):Ze(O)?(e.consume(O),V):k(O)}function F(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,q):Ze(O)?(e.consume(O),F):ie(O)}function q(O){return O===d?(e.consume(O),d=null,ge):O===null||He(O)?n(O):(e.consume(O),q)}function ie(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ht(O)?V(O):(e.consume(O),ie)}function ge(O){return O===47||O===62||Ze(O)?k(O):n(O)}function $(O){return O===62?(e.consume(O),oe):n(O)}function oe(O){return O===null||He(O)?ce(O):Ze(O)?(e.consume(O),oe):n(O)}function ce(O){return O===45&&o===2?(e.consume(O),ve):O===60&&o===1?(e.consume(O),se):O===62&&o===4?(e.consume(O),D):O===63&&o===3?(e.consume(O),v):O===93&&o===5?(e.consume(O),re):He(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(AN,ee,fe)(O)):O===null||He(O)?(e.exit("htmlFlowData"),fe(O)):(e.consume(O),ce)}function fe(O){return e.check(CN,te,ee)(O)}function te(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),be}function be(O){return O===null||He(O)?fe(O):(e.enter("htmlFlowData"),ce(O))}function ve(O){return O===45?(e.consume(O),v):ce(O)}function se(O){return O===47?(e.consume(O),u="",Q):ce(O)}function Q(O){if(O===62){const _e=u.toLowerCase();return xE.includes(_e)?(e.consume(O),D):ce(O)}return xn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),Q):ce(O)}function re(O){return O===93?(e.consume(O),v):ce(O)}function v(O){return O===62?(e.consume(O),D):O===45&&o===2?(e.consume(O),v):ce(O)}function D(O){return O===null||He(O)?(e.exit("htmlFlowData"),ee(O)):(e.consume(O),D)}function ee(O){return e.exit("htmlFlow"),t(O)}}function PN(e,t,n){const r=this;return o;function o(u){return He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function NN(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ca,t,n)}}const ON={name:"htmlText",tokenize:IN};function IN(e,t,n){const r=this;let o,a,u;return c;function c(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),d}function d(v){return v===33?(e.consume(v),f):v===47?(e.consume(v),V):v===63?(e.consume(v),k):xn(v)?(e.consume(v),ie):n(v)}function f(v){return v===45?(e.consume(v),p):v===91?(e.consume(v),a=0,_):xn(v)?(e.consume(v),N):n(v)}function p(v){return v===45?(e.consume(v),y):n(v)}function m(v){return v===null?n(v):v===45?(e.consume(v),T):He(v)?(u=m,se(v)):(e.consume(v),m)}function T(v){return v===45?(e.consume(v),y):m(v)}function y(v){return v===62?ve(v):v===45?T(v):m(v)}function _(v){const D="CDATA[";return v===D.charCodeAt(a++)?(e.consume(v),a===D.length?S:_):n(v)}function S(v){return v===null?n(v):v===93?(e.consume(v),A):He(v)?(u=S,se(v)):(e.consume(v),S)}function A(v){return v===93?(e.consume(v),C):S(v)}function C(v){return v===62?ve(v):v===93?(e.consume(v),C):S(v)}function N(v){return v===null||v===62?ve(v):He(v)?(u=N,se(v)):(e.consume(v),N)}function k(v){return v===null?n(v):v===63?(e.consume(v),H):He(v)?(u=k,se(v)):(e.consume(v),k)}function H(v){return v===62?ve(v):k(v)}function V(v){return xn(v)?(e.consume(v),F):n(v)}function F(v){return v===45||pn(v)?(e.consume(v),F):q(v)}function q(v){return He(v)?(u=q,se(v)):Ze(v)?(e.consume(v),q):ve(v)}function ie(v){return v===45||pn(v)?(e.consume(v),ie):v===47||v===62||ht(v)?ge(v):n(v)}function ge(v){return v===47?(e.consume(v),ve):v===58||v===95||xn(v)?(e.consume(v),$):He(v)?(u=ge,se(v)):Ze(v)?(e.consume(v),ge):ve(v)}function $(v){return v===45||v===46||v===58||v===95||pn(v)?(e.consume(v),$):oe(v)}function oe(v){return v===61?(e.consume(v),ce):He(v)?(u=oe,se(v)):Ze(v)?(e.consume(v),oe):ge(v)}function ce(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),o=v,fe):He(v)?(u=ce,se(v)):Ze(v)?(e.consume(v),ce):(e.consume(v),te)}function fe(v){return v===o?(e.consume(v),o=void 0,be):v===null?n(v):He(v)?(u=fe,se(v)):(e.consume(v),fe)}function te(v){return v===null||v===34||v===39||v===60||v===61||v===96?n(v):v===47||v===62||ht(v)?ge(v):(e.consume(v),te)}function be(v){return v===47||v===62||ht(v)?ge(v):n(v)}function ve(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),t):n(v)}function se(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Q}function Q(v){return Ze(v)?rt(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):re(v)}function re(v){return e.enter("htmlTextData"),u(v)}}const Wf={name:"labelEnd",resolveAll:MN,resolveTo:FN,tokenize:BN},RN={tokenize:UN},LN={tokenize:HN},DN={tokenize:zN};function MN(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&jn(e,0,e.length,n),e}function FN(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:M({},e[a][1].start),end:M({},e[e.length-1][1].end)},f={type:"label",start:M({},e[a][1].start),end:M({},e[u][1].end)},p={type:"labelText",start:M({},e[a+r+2][1].end),end:M({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=nr(c,e.slice(a+1,a+r+3)),c=nr(c,[["enter",p,t]]),c=nr(c,wl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=nr(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=nr(c,e.slice(u+1)),c=nr(c,[["exit",d,t]]),jn(e,a,e.length,c),e}function BN(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(gr(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(RN,p,u?p:m)(T):T===91?e.attempt(LN,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(DN,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function UN(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return ht(m)?ka(e,a)(m):a(m)}function a(m){return m===41?p(m):TE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ht(m)?ka(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?SE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ht(m)?ka(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 HN(e,t,n){const r=this;return o;function o(c){return _E.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function zN(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const jN={name:"labelStartImage",resolveAll:Wf.resolveAll,tokenize:$N};function $N(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const VN={name:"labelStartLink",resolveAll:Wf.resolveAll,tokenize:qN};function qN(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Gf={name:"lineEnding",tokenize:YN};function YN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),rt(e,t,"linePrefix")}}const Al={name:"thematicBreak",tokenize:WN};function WN(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,c(f)}function c(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||He(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?rt(e,c,"whitespace")(f):c(f))}}const Nn={continuation:{tokenize:QN},exit:ZN,name:"list",tokenize:KN},GN={partial:!0,tokenize:eO},XN={partial:!0,tokenize:JN};function KN(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Vf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Al,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 Vf(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(Ca,r.interrupt?n:p,e.attempt(GN,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Ze(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 QN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ca,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,rt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ze(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(XN,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,rt(e,e.attempt(Nn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function JN(e,t,n){const r=this;return rt(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function ZN(e){e.exit(this.containerState.type)}function eO(e,t,n){const r=this;return rt(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const wE={name:"setextUnderline",resolveTo:tO,tokenize:nO};function tO(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:M({},e[r][1].start),end:M({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=M({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function nO(e,t,n){const r=this;let o;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"),o=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===o?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ze(f)?rt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||He(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const rO={tokenize:iO};function iO(e){const t=this,n=e.attempt(Ca,r,e.attempt(this.parser.constructs.flowInitial,o,rt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(lN,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const oO={resolveAll:CE()},sO=AE("string"),aO=AE("text");function AE(e){return{resolveAll:CE(e==="text"?uO:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return 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=o[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 CE(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function uO(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const f=o[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:M({},r.end)};r.end=M({},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 lO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:pN},disable:{null:[]},document:{42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:pE},flow:{35:TN,42:Al,45:[wE,Al],60:wN,61:wE,95:Al,96:yE,126:yE},flowInitial:{[-2]:Yf,[-1]:Yf,32:Yf},insideSpan:{null:[qf,oO]},string:{38:gE,92:mE},text:{[-5]:Gf,[-4]:Gf,[-3]:Gf,33:jN,38:gE,42:qf,60:[VP,ON],91:VN,92:[yN,mE],93:Wf,95:qf,96:rN}},Symbol.toStringTag,{value:"Module"}));function cO(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:q(V),check:q(F),consume:N,enter:k,exit:H,interrupt:q(F,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:_,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(oe){return u=nr(u,oe),A(),u[u.length-1]!==null?[]:(ie(t,0),f.events=wl(a,f.events,f),f.events)}function T(oe,ce){return fO(y(oe),ce)}function y(oe){return dO(u,oe)}function _(){const{_bufferIndex:oe,_index:ce,line:fe,column:te,offset:be}=r;return{_bufferIndex:oe,_index:ce,line:fe,column:te,offset:be}}function S(oe){o[oe.line]=oe.column,$()}function A(){let oe;for(;r._index<u.length;){const ce=u[r._index];if(typeof ce=="string")for(oe=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===oe&&r._bufferIndex<ce.length;)C(ce.charCodeAt(r._bufferIndex));else C(ce)}}function C(oe){p=p(oe)}function N(oe){He(oe)?(r.line++,r.column=1,r.offset+=oe===-3?2:1,$()):oe!==-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=oe}function k(oe,ce){const fe=ce||{};return fe.type=oe,fe.start=_(),f.events.push(["enter",fe,f]),c.push(fe),fe}function H(oe){const ce=c.pop();return ce.end=_(),f.events.push(["exit",ce,f]),ce}function V(oe,ce){ie(oe,ce.from)}function F(oe,ce){ce.restore()}function q(oe,ce){return fe;function fe(te,be,ve){let se,Q,re,v;return Array.isArray(te)?ee(te):"tokenize"in te?ee([te]):D(te);function D(Pe){return ze;function ze(xe){const Ye=xe!==null&&Pe[xe],ft=xe!==null&&Pe.null,on=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(ft)?ft:ft?[ft]:[]];return ee(on)(xe)}}function ee(Pe){return se=Pe,Q=0,Pe.length===0?ve:O(Pe[Q])}function O(Pe){return ze;function ze(xe){return v=ge(),re=Pe,Pe.partial||(f.currentConstruct=Pe),Pe.name&&f.parser.constructs.disable.null.includes(Pe.name)?De():Pe.tokenize.call(ce?Object.assign(Object.create(f),ce):f,d,_e,De)(xe)}}function _e(Pe){return oe(re,v),be}function De(Pe){return v.restore(),++Q<se.length?O(se[Q]):ve}}}function ie(oe,ce){oe.resolveAll&&!a.includes(oe)&&a.push(oe),oe.resolve&&jn(f.events,ce,f.events.length-ce,oe.resolve(f.events.slice(ce),f)),oe.resolveTo&&(f.events=oe.resolveTo(f.events,f))}function ge(){const oe=_(),ce=f.previous,fe=f.currentConstruct,te=f.events.length,be=Array.from(c);return{from:te,restore:ve};function ve(){r=oe,f.previous=ce,f.currentConstruct=fe,f.events.length=te,c=be,$()}}function $(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function dO(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function fO(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
19
19
  `;break}case-3:{u=`\r
20
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function lO(e){const r={constructs:uE([oO,...(e||{}).extensions||[]]),content:o(RP),defined:[],document:o(DP),flow:o(ZN),lazy:{},string:o(nO),text:o(rO)};return r;function o(a){return u;function u(c){return sO(r,a,c)}}}function cO(e){for(;!EE(e););return e}const CE=/[\0\t\n\r]/g;function dO(){let e=1,t="",n=!0,r;return o;function o(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(CE.lastIndex=m,f=CE.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 fO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function hO(e){return e.replace(fO,pO)}function pO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return lE(n.slice(a?2:1),a?16:10)}return $f(n)||e}const AE={}.hasOwnProperty;function mO(e,t,n){return typeof t!="string"&&(n=t,t=void 0),gO(n)(cO(lO(n).document().write(dO()(e,t,!0))))}function gO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(fi),autolinkProtocol:me,autolinkEmail:me,atxHeading:a(Ri),blockQuote:a(ft),characterEscape:me,characterReference:me,codeFenced:a(on),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(on,u),codeText:a($r,u),codeTextData:me,data:me,codeFlowValue:me,definition:a(Vr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Rn),hardBreakEscape:a(Li),hardBreakTrailing:a(Li),htmlFlow:a(di,u),htmlFlowData:me,htmlText:a(di,u),htmlTextData:me,image:a(Ps),label:u,link:a(fi),listItem:a(Ce),listItemValue:T,listOrdered:a(Tr,m),listUnordered:a(Tr),paragraph:a(Me),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Ri),strong:a(Be),thematicBreak:a(pt)},exit:{atxHeading:d(),atxHeadingSequence:X,autolink:d(),autolinkEmail:Ye,autolinkProtocol:xe,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:De,characterReferenceMarkerNumeric:De,characterReferenceValue:ke,characterReference:ze,codeFenced:d(A),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:$,codeIndented:d(v),codeText:d(Te),codeTextData:$,data:$,definition:d(),definitionDestinationString:H,definitionLabelString:N,definitionTitleString:k,emphasis:d(),hardBreakEscape:d(de),hardBreakTrailing:d(de),htmlFlow:d(le),htmlFlowData:$,htmlText:d(ne),htmlTextData:$,image:d(ue),label:re,labelText:Q,lineEnding:oe,link:d(Oe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:C,resourceTitleString:D,resource:te,setextHeading:d(ie),setextHeadingLineSequence:q,setextHeadingText:B,strong:d(),thematicBreak:d()}};vE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ge={type:"root",children:[]};const Ae={stack:[ge],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},qe=[];let Re=-1;for(;++Re<J.length;)if(J[Re][1].type==="listOrdered"||J[Re][1].type==="listUnordered")if(J[Re][0]==="enter")qe.push(Re);else{const lt=qe.pop();Re=o(J,lt,Re)}for(Re=-1;++Re<J.length;){const lt=t[J[Re][0]];AE.call(lt,J[Re][1].type)&&lt[J[Re][1].type].call(Object.assign({sliceSerialize:J[Re][2].sliceSerialize},Ae),J[Re][1])}if(Ae.tokenStack.length>0){const lt=Ae.tokenStack[Ae.tokenStack.length-1];(lt[1]||kE).call(Ae,void 0,lt[0])}for(ge.position={start:Ai(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Ai(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Re=-1;++Re<t.transforms.length;)ge=t.transforms[Re](ge)||ge;return ge}function o(J,ge,Ae){let qe=ge-1,Re=-1,lt=!1,Yt,jt,sn,qr;for(;++qe<=Ae;){const an=J[qe];switch(an[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{an[0]==="enter"?Re++:Re--,qr=void 0;break}case"lineEndingBlank":{an[0]==="enter"&&(Yt&&!qr&&!Re&&!sn&&(sn=qe),qr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qr=void 0}if(!Re&&an[0]==="enter"&&an[1].type==="listItemPrefix"||Re===-1&&an[0]==="exit"&&(an[1].type==="listUnordered"||an[1].type==="listOrdered")){if(Yt){let Yr=qe;for(jt=void 0;Yr--;){const qn=J[Yr];if(qn[1].type==="lineEnding"||qn[1].type==="lineEndingBlank"){if(qn[0]==="exit")continue;jt&&(J[jt][1].type="lineEndingBlank",lt=!0),qn[1].type="lineEnding",jt=Yr}else if(!(qn[1].type==="linePrefix"||qn[1].type==="blockQuotePrefix"||qn[1].type==="blockQuotePrefixWhitespace"||qn[1].type==="blockQuoteMarker"||qn[1].type==="listItemIndent"))break}sn&&(!jt||sn<jt)&&(Yt._spread=!0),Yt.end=Object.assign({},jt?J[jt][1].start:an[1].end),J.splice(jt||qe,0,["exit",Yt,an[2]]),qe++,Ae++}if(an[1].type==="listItemPrefix"){const Yr={type:"listItem",_spread:!1,start:Object.assign({},an[1].start),end:void 0};Yt=Yr,J.splice(qe,0,["enter",Yr,an[2]]),qe++,Ae++,sn=void 0,qr=!0}}}return J[ge][1]._spread=lt,Ae}function a(J,ge){return Ae;function Ae(qe){c.call(this,J(qe),qe),ge&&ge.call(this,qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,ge,Ae){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ge,Ae||void 0]),J.position={start:Ai(ge.start),end:void 0}}function d(J){return ge;function ge(Ae){J&&J.call(this,Ae),f.call(this,Ae)}}function f(J,ge){const Ae=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==J.type&&(ge?ge.call(this,J,qe[0]):(qe[1]||kE).call(this,J,qe[0]));else throw new Error("Cannot close `"+J.type+"` ("+wa({start:J.start,end:J.end})+"): it’s not open");Ae.position.end=Ai(J.end)}function p(){return jf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(J){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=J}function _(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/(\r?\n|\r)$/g,"")}function N(J){const ge=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=ge,Ae.identifier=mr(this.sliceSerialize(J)).toLowerCase()}function k(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function H(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function X(J){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ae=this.sliceSerialize(J).length;ge.depth=Ae}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function q(J){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function ie(){this.data.setextHeadingSlurpLineEnding=void 0}function me(J){const Ae=this.stack[this.stack.length-1].children;let qe=Ae[Ae.length-1];(!qe||qe.type!=="text")&&(qe=rt(),qe.position={start:Ai(J.start),end:void 0},Ae.push(qe)),this.stack.push(qe)}function $(J){const ge=this.stack.pop();ge.value+=this.sliceSerialize(J),ge.position.end=Ai(J.end)}function oe(J){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=ge.children[ge.children.length-1];Ae.position.end=Ai(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(me.call(this,J),$.call(this,J))}function de(){this.data.atHardBreak=!0}function le(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function ne(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function Te(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function Oe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function ue(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Q(J){const ge=this.sliceSerialize(J),Ae=this.stack[this.stack.length-2];Ae.label=hO(ge),Ae.identifier=mr(ge).toLowerCase()}function re(){const J=this.stack[this.stack.length-1],ge=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const qe=J.children;Ae.children=qe}else Ae.alt=ge}function C(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function D(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function te(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(J){const ge=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=ge,Ae.identifier=mr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function De(J){this.data.characterReferenceType=J.type}function ke(J){const ge=this.sliceSerialize(J),Ae=this.data.characterReferenceType;let qe;Ae?(qe=lE(ge,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=$f(ge);const Re=this.stack[this.stack.length-1];Re.value+=qe}function ze(J){const ge=this.stack.pop();ge.position.end=Ai(J.end)}function xe(J){$.call(this,J);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(J)}function Ye(J){$.call(this,J);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(J)}function ft(){return{type:"blockquote",children:[]}}function on(){return{type:"code",lang:null,meta:null,value:""}}function $r(){return{type:"inlineCode",value:""}}function Vr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Rn(){return{type:"emphasis",children:[]}}function Ri(){return{type:"heading",depth:0,children:[]}}function Li(){return{type:"break"}}function di(){return{type:"html",value:""}}function Ps(){return{type:"image",title:null,url:"",alt:null}}function fi(){return{type:"link",title:null,url:"",children:[]}}function Tr(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Ce(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Me(){return{type:"paragraph",children:[]}}function Be(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function Ai(e){return{line:e.line,column:e.column,offset:e.offset}}function vE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?vE(e,r):EO(e,r)}}function EO(e,t){let n;for(n in t)if(AE.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 kE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+wa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+wa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+wa({start:t.start,end:t.end})+") is still open")}function yO(e){const t=this;t.parser=n;function n(r){return mO(r,pe(M(M({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function bO(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 TO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
21
- `}]}function _O(e,t){const n=t.value?t.value+`
22
- `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function SO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=es(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function CO(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 AO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function PE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function vO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return PE(e,t);const o={src:es(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function kO(e,t){const n={src:es(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 PO(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 NO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return PE(e,t);const o={href:es(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function OO(e,t){const n={href:es(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 IO(e,t,n){const r=e.all(t),o=n?RO(n):NE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
20
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function hO(e){const r={constructs:cE([lO,...(e||{}).extensions||[]]),content:o(FP),defined:[],document:o(UP),flow:o(rO),lazy:{},string:o(sO),text:o(aO)};return r;function o(a){return u;function u(c){return cO(r,a,c)}}}function pO(e){for(;!bE(e););return e}const vE=/[\0\t\n\r]/g;function mO(){let e=1,t="",n=!0,r;return o;function o(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(vE.lastIndex=m,f=vE.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 gO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function EO(e){return e.replace(gO,yO)}function yO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return dE(n.slice(a?2:1),a?16:10)}return $f(n)||e}const kE={}.hasOwnProperty;function bO(e,t,n){return typeof t!="string"&&(n=t,t=void 0),TO(n)(pO(hO(n).document().write(mO()(e,t,!0))))}function TO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(hi),autolinkProtocol:ge,autolinkEmail:ge,atxHeading:a(Ri),blockQuote:a(ft),characterEscape:ge,characterReference:ge,codeFenced:a(on),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(on,u),codeText:a(Vr,u),codeTextData:ge,data:ge,codeFlowValue:ge,definition:a(qr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Rn),hardBreakEscape:a(Li),hardBreakTrailing:a(Li),htmlFlow:a(fi,u),htmlFlowData:ge,htmlText:a(fi,u),htmlTextData:ge,image:a(Ps),label:u,link:a(hi),listItem:a(Ae),listItemValue:T,listOrdered:a(_r,m),listUnordered:a(_r),paragraph:a(Me),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Ri),strong:a(Be),thematicBreak:a(pt)},exit:{atxHeading:d(),atxHeadingSequence:V,autolink:d(),autolinkEmail:Ye,autolinkProtocol:xe,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:De,characterReferenceMarkerNumeric:De,characterReferenceValue:Pe,characterReference:ze,codeFenced:d(A),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:$,codeIndented:d(C),codeText:d(be),codeTextData:$,data:$,definition:d(),definitionDestinationString:H,definitionLabelString:N,definitionTitleString:k,emphasis:d(),hardBreakEscape:d(ce),hardBreakTrailing:d(ce),htmlFlow:d(fe),htmlFlowData:$,htmlText:d(te),htmlTextData:$,image:d(se),label:re,labelText:Q,lineEnding:oe,link:d(ve),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:v,resourceTitleString:D,resource:ee,setextHeading:d(ie),setextHeadingLineSequence:q,setextHeadingText:F,strong:d(),thematicBreak:d()}};PE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let me={type:"root",children:[]};const Ce={stack:[me],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},qe=[];let Re=-1;for(;++Re<J.length;)if(J[Re][1].type==="listOrdered"||J[Re][1].type==="listUnordered")if(J[Re][0]==="enter")qe.push(Re);else{const lt=qe.pop();Re=o(J,lt,Re)}for(Re=-1;++Re<J.length;){const lt=t[J[Re][0]];kE.call(lt,J[Re][1].type)&&lt[J[Re][1].type].call(Object.assign({sliceSerialize:J[Re][2].sliceSerialize},Ce),J[Re][1])}if(Ce.tokenStack.length>0){const lt=Ce.tokenStack[Ce.tokenStack.length-1];(lt[1]||NE).call(Ce,void 0,lt[0])}for(me.position={start:Ci(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Ci(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Re=-1;++Re<t.transforms.length;)me=t.transforms[Re](me)||me;return me}function o(J,me,Ce){let qe=me-1,Re=-1,lt=!1,Yt,jt,sn,Yr;for(;++qe<=Ce;){const an=J[qe];switch(an[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{an[0]==="enter"?Re++:Re--,Yr=void 0;break}case"lineEndingBlank":{an[0]==="enter"&&(Yt&&!Yr&&!Re&&!sn&&(sn=qe),Yr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Yr=void 0}if(!Re&&an[0]==="enter"&&an[1].type==="listItemPrefix"||Re===-1&&an[0]==="exit"&&(an[1].type==="listUnordered"||an[1].type==="listOrdered")){if(Yt){let Wr=qe;for(jt=void 0;Wr--;){const Yn=J[Wr];if(Yn[1].type==="lineEnding"||Yn[1].type==="lineEndingBlank"){if(Yn[0]==="exit")continue;jt&&(J[jt][1].type="lineEndingBlank",lt=!0),Yn[1].type="lineEnding",jt=Wr}else if(!(Yn[1].type==="linePrefix"||Yn[1].type==="blockQuotePrefix"||Yn[1].type==="blockQuotePrefixWhitespace"||Yn[1].type==="blockQuoteMarker"||Yn[1].type==="listItemIndent"))break}sn&&(!jt||sn<jt)&&(Yt._spread=!0),Yt.end=Object.assign({},jt?J[jt][1].start:an[1].end),J.splice(jt||qe,0,["exit",Yt,an[2]]),qe++,Ce++}if(an[1].type==="listItemPrefix"){const Wr={type:"listItem",_spread:!1,start:Object.assign({},an[1].start),end:void 0};Yt=Wr,J.splice(qe,0,["enter",Wr,an[2]]),qe++,Ce++,sn=void 0,Yr=!0}}}return J[me][1]._spread=lt,Ce}function a(J,me){return Ce;function Ce(qe){c.call(this,J(qe),qe),me&&me.call(this,qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,me,Ce){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([me,Ce||void 0]),J.position={start:Ci(me.start),end:void 0}}function d(J){return me;function me(Ce){J&&J.call(this,Ce),f.call(this,Ce)}}function f(J,me){const Ce=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==J.type&&(me?me.call(this,J,qe[0]):(qe[1]||NE).call(this,J,qe[0]));else throw new Error("Cannot close `"+J.type+"` ("+wa({start:J.start,end:J.end})+"): it’s not open");Ce.position.end=Ci(J.end)}function p(){return jf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(J){if(this.data.expectingFirstListItemValue){const me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),me=this.stack[this.stack.length-1];me.lang=J}function _(){const J=this.resume(),me=this.stack[this.stack.length-1];me.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J.replace(/(\r?\n|\r)$/g,"")}function N(J){const me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=me,Ce.identifier=gr(this.sliceSerialize(J)).toLowerCase()}function k(){const J=this.resume(),me=this.stack[this.stack.length-1];me.title=J}function H(){const J=this.resume(),me=this.stack[this.stack.length-1];me.url=J}function V(J){const me=this.stack[this.stack.length-1];if(!me.depth){const Ce=this.sliceSerialize(J).length;me.depth=Ce}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function q(J){const me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function ie(){this.data.setextHeadingSlurpLineEnding=void 0}function ge(J){const Ce=this.stack[this.stack.length-1].children;let qe=Ce[Ce.length-1];(!qe||qe.type!=="text")&&(qe=it(),qe.position={start:Ci(J.start),end:void 0},Ce.push(qe)),this.stack.push(qe)}function $(J){const me=this.stack.pop();me.value+=this.sliceSerialize(J),me.position.end=Ci(J.end)}function oe(J){const me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=me.children[me.children.length-1];Ce.position.end=Ci(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(me.type)&&(ge.call(this,J),$.call(this,J))}function ce(){this.data.atHardBreak=!0}function fe(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J}function te(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J}function be(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J}function ve(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=me,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function se(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=me,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Q(J){const me=this.sliceSerialize(J),Ce=this.stack[this.stack.length-2];Ce.label=EO(me),Ce.identifier=gr(me).toLowerCase()}function re(){const J=this.stack[this.stack.length-1],me=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const qe=J.children;Ce.children=qe}else Ce.alt=me}function v(){const J=this.resume(),me=this.stack[this.stack.length-1];me.url=J}function D(){const J=this.resume(),me=this.stack[this.stack.length-1];me.title=J}function ee(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(J){const me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=me,Ce.identifier=gr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function De(J){this.data.characterReferenceType=J.type}function Pe(J){const me=this.sliceSerialize(J),Ce=this.data.characterReferenceType;let qe;Ce?(qe=dE(me,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=$f(me);const Re=this.stack[this.stack.length-1];Re.value+=qe}function ze(J){const me=this.stack.pop();me.position.end=Ci(J.end)}function xe(J){$.call(this,J);const me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(J)}function Ye(J){$.call(this,J);const me=this.stack[this.stack.length-1];me.url="mailto:"+this.sliceSerialize(J)}function ft(){return{type:"blockquote",children:[]}}function on(){return{type:"code",lang:null,meta:null,value:""}}function Vr(){return{type:"inlineCode",value:""}}function qr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Rn(){return{type:"emphasis",children:[]}}function Ri(){return{type:"heading",depth:0,children:[]}}function Li(){return{type:"break"}}function fi(){return{type:"html",value:""}}function Ps(){return{type:"image",title:null,url:"",alt:null}}function hi(){return{type:"link",title:null,url:"",children:[]}}function _r(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Ae(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Me(){return{type:"paragraph",children:[]}}function Be(){return{type:"strong",children:[]}}function it(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function Ci(e){return{line:e.line,column:e.column,offset:e.offset}}function PE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?PE(e,r):_O(e,r)}}function _O(e,t){let n;for(n in t)if(kE.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 NE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+wa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+wa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+wa({start:t.start,end:t.end})+") is still open")}function SO(e){const t=this;t.parser=n;function n(r){return bO(r,pe(M(M({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function xO(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 wO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
21
+ `}]}function AO(e,t){const n=t.value?t.value+`
22
+ `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function CO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=es(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function PO(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 NO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function OE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function OO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return OE(e,t);const o={src:es(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function IO(e,t){const n={src:es(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 RO(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 LO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return OE(e,t);const o={href:es(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function DO(e,t){const n={href:es(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 MO(e,t,n){const r=e.all(t),o=n?FO(n):IE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
23
23
  `}),p.type==="element"&&p.tagName==="p"&&!o?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
24
- `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function RO(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=NE(n[r])}return t}function NE(e){const t=e.spread;return t==null?e.children.length>1:t}function LO(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function DO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function FO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BO(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Ir(t.children[1]),d=_l(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function UO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let _={type:"element",tagName:a,properties:T,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function HO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const OE=9,IE=32;function zO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(RE(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(RE(t.slice(o),o>0,!1)),a.join("")}function RE(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===OE||a===IE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===OE||a===IE;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function jO(e,t){const n={type:"text",value:zO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function $O(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const VO={blockquote:bO,break:TO,code:_O,delete:SO,emphasis:xO,footnoteReference:wO,heading:CO,html:AO,imageReference:vO,image:kO,inlineCode:PO,linkReference:NO,link:OO,listItem:IO,list:LO,paragraph:DO,root:MO,strong:FO,table:BO,tableCell:HO,tableRow:UO,text:jO,thematicBreak:$O,toml:Al,yaml:Al,definition:Al,footnoteDefinition:Al};function Al(){}const LE=-1,vl=0,Pa=1,kl=2,Xf=3,Kf=4,Qf=5,Jf=6,DE=7,ME=8,FE=typeof self=="object"?self:globalThis,qO=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case vl:case LE:return n(u,o);case Pa:{const c=n([],o);for(const d of u)c.push(r(d));return c}case kl:{const c=n({},o);for(const[d,f]of u)c[r(d)]=r(f);return c}case Xf:return n(new Date(u),o);case Kf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),o)}case Qf:{const c=n(new Map,o);for(const[d,f]of u)c.set(r(d),r(f));return c}case Jf:{const c=n(new Set,o);for(const d of u)c.add(r(d));return c}case DE:{const{name:c,message:d}=u;return n(new FE[c](d),o)}case ME:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new FE[a](u),o)};return r},BE=e=>qO(new Map,e)(0),ns="",{toString:YO}={},{keys:WO}=Object,Na=e=>{const t=typeof e;if(t!=="object"||!e)return[vl,t];const n=YO.call(e).slice(8,-1);switch(n){case"Array":return[Pa,ns];case"Object":return[kl,ns];case"Date":return[Xf,ns];case"RegExp":return[Kf,ns];case"Map":return[Qf,ns];case"Set":return[Jf,ns];case"DataView":return[Pa,n]}return n.includes("Array")?[Pa,n]:n.includes("Error")?[DE,n]:[kl,n]},Pl=([e,t])=>e===vl&&(t==="function"||t==="symbol"),GO=(e,t,n,r)=>{const o=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=Na(u);switch(c){case vl:{let p=u;switch(d){case"bigint":c=ME,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([LE],u)}return o([c,p],u)}case Pa:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),o([d,[...T]],u)}const p=[],m=o([c,p],u);for(const T of u)p.push(a(T));return m}case kl:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=o([c,p],u);for(const T of WO(u))(e||!Pl(Na(u[T])))&&p.push([a(T),a(u[T])]);return m}case Xf:return o([c,u.toISOString()],u);case Kf:{const{source:p,flags:m}=u;return o([c,{source:p,flags:m}],u)}case Qf:{const p=[],m=o([c,p],u);for(const[T,y]of u)(e||!(Pl(Na(T))||Pl(Na(y))))&&p.push([a(T),a(y)]);return m}case Jf:{const p=[],m=o([c,p],u);for(const T of u)(e||!Pl(Na(T)))&&p.push(a(T));return m}}const{message:f}=u;return o([c,{name:d,message:f}],u)};return a},UE=(e,{json:t,lossy:n}={})=>{const r=[];return GO(!(t||n),!!t,new Map,r)(e),r},lo=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?BE(UE(e,t)):structuredClone(e):(e,t)=>BE(UE(e,t));function XO(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 KO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function QO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||XO,r=e.options.footnoteBackLabel||KO,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),T=es(m.toLowerCase());let y=0;const _=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++y<=S;){_.length>0&&_.push({type:"text",value:" "});let N=typeof n=="string"?n:n(d,y);typeof N=="string"&&(N={type:"text",value:N}),_.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(N)?N:[N]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const N=A.children[A.children.length-1];N&&N.type==="text"?N.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(..._)}else p.push(..._);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,v),c.push(v)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:pe(M({},lo(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
24
+ `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function FO(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=IE(n[r])}return t}function IE(e){const t=e.spread;return t==null?e.children.length>1:t}function BO(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function UO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function zO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jO(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Rr(t.children[1]),d=_l(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function $O(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let _={type:"element",tagName:a,properties:T,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function VO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const RE=9,LE=32;function qO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(DE(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(DE(t.slice(o),o>0,!1)),a.join("")}function DE(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===RE||a===LE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===RE||a===LE;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function YO(e,t){const n={type:"text",value:qO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function WO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const GO={blockquote:xO,break:wO,code:AO,delete:CO,emphasis:vO,footnoteReference:kO,heading:PO,html:NO,imageReference:OO,image:IO,inlineCode:RO,linkReference:LO,link:DO,listItem:MO,list:BO,paragraph:UO,root:HO,strong:zO,table:jO,tableCell:VO,tableRow:$O,text:YO,thematicBreak:WO,toml:Cl,yaml:Cl,definition:Cl,footnoteDefinition:Cl};function Cl(){}const ME=-1,vl=0,Pa=1,kl=2,Xf=3,Kf=4,Qf=5,Jf=6,FE=7,BE=8,UE=typeof self=="object"?self:globalThis,XO=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case vl:case ME:return n(u,o);case Pa:{const c=n([],o);for(const d of u)c.push(r(d));return c}case kl:{const c=n({},o);for(const[d,f]of u)c[r(d)]=r(f);return c}case Xf:return n(new Date(u),o);case Kf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),o)}case Qf:{const c=n(new Map,o);for(const[d,f]of u)c.set(r(d),r(f));return c}case Jf:{const c=n(new Set,o);for(const d of u)c.add(r(d));return c}case FE:{const{name:c,message:d}=u;return n(new UE[c](d),o)}case BE:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new UE[a](u),o)};return r},HE=e=>XO(new Map,e)(0),ns="",{toString:KO}={},{keys:QO}=Object,Na=e=>{const t=typeof e;if(t!=="object"||!e)return[vl,t];const n=KO.call(e).slice(8,-1);switch(n){case"Array":return[Pa,ns];case"Object":return[kl,ns];case"Date":return[Xf,ns];case"RegExp":return[Kf,ns];case"Map":return[Qf,ns];case"Set":return[Jf,ns];case"DataView":return[Pa,n]}return n.includes("Array")?[Pa,n]:n.includes("Error")?[FE,n]:[kl,n]},Pl=([e,t])=>e===vl&&(t==="function"||t==="symbol"),JO=(e,t,n,r)=>{const o=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=Na(u);switch(c){case vl:{let p=u;switch(d){case"bigint":c=BE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([ME],u)}return o([c,p],u)}case Pa:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),o([d,[...T]],u)}const p=[],m=o([c,p],u);for(const T of u)p.push(a(T));return m}case kl:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=o([c,p],u);for(const T of QO(u))(e||!Pl(Na(u[T])))&&p.push([a(T),a(u[T])]);return m}case Xf:return o([c,u.toISOString()],u);case Kf:{const{source:p,flags:m}=u;return o([c,{source:p,flags:m}],u)}case Qf:{const p=[],m=o([c,p],u);for(const[T,y]of u)(e||!(Pl(Na(T))||Pl(Na(y))))&&p.push([a(T),a(y)]);return m}case Jf:{const p=[],m=o([c,p],u);for(const T of u)(e||!Pl(Na(T)))&&p.push(a(T));return m}}const{message:f}=u;return o([c,{name:d,message:f}],u)};return a},zE=(e,{json:t,lossy:n}={})=>{const r=[];return JO(!(t||n),!!t,new Map,r)(e),r},lo=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?HE(zE(e,t)):structuredClone(e):(e,t)=>HE(zE(e,t));function ZO(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 eI(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function tI(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ZO,r=e.options.footnoteBackLabel||eI,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),T=es(m.toLowerCase());let y=0;const _=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++y<=S;){_.length>0&&_.push({type:"text",value:" "});let N=typeof n=="string"?n:n(d,y);typeof N=="string"&&(N={type:"text",value:N}),_.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(N)?N:[N]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const N=A.children[A.children.length-1];N&&N.type==="text"?N.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(..._)}else p.push(..._);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,C),c.push(C)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:pe(M({},lo(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
25
25
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
26
- `}]}}const Nl=(function(e){if(e==null)return tI;if(typeof e=="function")return Ol(e);if(typeof e=="object")return Array.isArray(e)?JO(e):ZO(e);if(typeof e=="string")return eI(e);throw new Error("Expected function, string, or object as test")});function JO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Nl(e[n]);return Ol(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function ZO(e){const t=e;return Ol(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function eI(e){return Ol(t);function t(n){return n&&n.type===e}}function Ol(e){return t;function t(n,r,o){return!!(nI(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function tI(){return!0}function nI(e){return e!==null&&typeof e=="object"&&"type"in e}function yU(e){return e}const HE=[],rI=!0,Zf=!1,iI="skip";function zE(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=Nl(o),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=HE,_,S,A;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=oI(n(d,p)),y[0]===Zf))return y;if("children"in d&&d.children){const v=d;if(v.children&&y[0]!==iI)for(S=(r?v.children.length:-1)+u,A=p.concat(v);S>-1&&S<v.children.length;){const N=v.children[S];if(_=c(N,S,A)(),_[0]===Zf)return _;S=typeof _[1]=="number"?_[1]:S+u}}return y}}}function oI(e){return Array.isArray(e)?e:typeof e=="number"?[rI,e]:e==null?HE:[e]}function Il(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),zE(e,a,c,o);function c(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const eh={}.hasOwnProperty,sI={};function aI(e,t){const n=t||sI,r=new Map,o=new Map,a=new Map,u=M(M({},VO),n.handlers),c={all:f,applyData:lI,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:uI,wrap:dI};return Il(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:o,T=String(p.identifier).toUpperCase();m.has(T)||m.set(T,p)}}),c;function d(p,m){const T=p.type,y=c.handlers[T];if(eh.call(c.handlers,T)&&y)return y(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(T)){if("children"in p){const S=p,{children:A}=S,v=cn(S,["children"]),N=lo(v);return N.children=c.all(p),N}return lo(p)}return(c.options.unknownHandler||cI)(c,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const _=c.one(T[y],p);if(_){if(y&&T[y-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=jE(_.value)),!Array.isArray(_)&&_.type==="element")){const S=_.children[0];S&&S.type==="text"&&(S.value=jE(S.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function uI(e,t){e.position&&(t.position=Q1(e))}function lI(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,lo(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function cI(e,t){const n=t.data||{},r="value"in t&&!(eh.call(n,"hProperties")||eh.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function dI(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
26
+ `}]}}const Nl=(function(e){if(e==null)return oI;if(typeof e=="function")return Ol(e);if(typeof e=="object")return Array.isArray(e)?nI(e):rI(e);if(typeof e=="string")return iI(e);throw new Error("Expected function, string, or object as test")});function nI(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Nl(e[n]);return Ol(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function rI(e){const t=e;return Ol(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function iI(e){return Ol(t);function t(n){return n&&n.type===e}}function Ol(e){return t;function t(n,r,o){return!!(sI(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function oI(){return!0}function sI(e){return e!==null&&typeof e=="object"&&"type"in e}function kU(e){return e}const jE=[],aI=!0,Zf=!1,uI="skip";function $E(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=Nl(o),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=jE,_,S,A;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=lI(n(d,p)),y[0]===Zf))return y;if("children"in d&&d.children){const C=d;if(C.children&&y[0]!==uI)for(S=(r?C.children.length:-1)+u,A=p.concat(C);S>-1&&S<C.children.length;){const N=C.children[S];if(_=c(N,S,A)(),_[0]===Zf)return _;S=typeof _[1]=="number"?_[1]:S+u}}return y}}}function lI(e){return Array.isArray(e)?e:typeof e=="number"?[aI,e]:e==null?jE:[e]}function Il(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),$E(e,a,c,o);function c(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const eh={}.hasOwnProperty,cI={};function dI(e,t){const n=t||cI,r=new Map,o=new Map,a=new Map,u=M(M({},GO),n.handlers),c={all:f,applyData:hI,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:fI,wrap:mI};return Il(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:o,T=String(p.identifier).toUpperCase();m.has(T)||m.set(T,p)}}),c;function d(p,m){const T=p.type,y=c.handlers[T];if(eh.call(c.handlers,T)&&y)return y(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(T)){if("children"in p){const S=p,{children:A}=S,C=cn(S,["children"]),N=lo(C);return N.children=c.all(p),N}return lo(p)}return(c.options.unknownHandler||pI)(c,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const _=c.one(T[y],p);if(_){if(y&&T[y-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=VE(_.value)),!Array.isArray(_)&&_.type==="element")){const S=_.children[0];S&&S.type==="text"&&(S.value=VE(S.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function fI(e,t){e.position&&(t.position=Z1(e))}function hI(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,lo(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function pI(e,t){const n=t.data||{},r="value"in t&&!(eh.call(n,"hProperties")||eh.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function mI(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
27
27
  `});++r<e.length;)r&&n.push({type:"text",value:`
28
28
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
29
- `}),n}function jE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function $E(e,t){const n=aI(e,t),r=n.one(e,void 0),o=QO(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
30
- `},o),a}function fI(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const o=$E(n,M({file:r},t));yield e.run(o,r)})}:function(n,r){return $E(n,M({file:r},e||t))}}function VE(e){if(e)throw e}var th,qE;function hI(){if(qE)return th;qE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=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 th=function d(){var f,p,m,T,y,_,S=arguments[0],A=1,v=arguments.length,N=!1;for(typeof S=="boolean"&&(N=S,S=arguments[1]||{},A=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});A<v;++A)if(f=arguments[A],f!=null)for(p in f)m=c(S,p),T=c(f,p),S!==T&&(N&&T&&(a(T)||(y=o(T)))?(y?(y=!1,_=m&&o(m)?m:[]):_=m&&a(m)?m:{},u(S,{name:p,newValue:d(N,_,T)})):typeof T!="undefined"&&u(S,{name:p,newValue:T}));return S},th}var pI=hI();const nh=Qe(pI);function rh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function mI(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<o.length;)(f[m]===null||f[m]===void 0)&&(f[m]=o[m]);o=f,p?gI(p,c)(...f):u(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function gI(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return o(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const Rr={basename:EI,dirname:yI,extname:bI,join:TI,sep:"/"};function EI(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,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function yI(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 bI(e){Oa(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function TI(...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?".":_I(n)}function _I(e){Oa(e);const t=e.codePointAt(0)===47;let n=SI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function SI(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function Oa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const xI={cwd:wI};function wI(){return"/"}function ih(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function CI(e){if(typeof e=="string")e=new URL(e);else if(!ih(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return AI(e)}function AI(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const oh=["history","path","basename","stem","extname","dirname"];class YE{constructor(t){let n;t?ih(t)?n={path:t}:typeof t=="string"||vI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":xI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<oh.length;){const a=oh[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)oh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Rr.basename(this.path):void 0}set basename(t){ah(t,"basename"),sh(t,"basename"),this.path=Rr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rr.dirname(this.path):void 0}set dirname(t){WE(this.basename,"dirname"),this.path=Rr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rr.extname(this.path):void 0}set extname(t){if(sh(t,"extname"),WE(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=Rr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ih(t)&&(t=CI(t)),ah(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rr.basename(this.path,this.extname):void 0}set stem(t){ah(t,"stem"),sh(t,"stem"),this.path=Rr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new hn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function sh(e,t){if(e&&e.includes(Rr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rr.sep+"`")}function ah(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function WE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function vI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const kI=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),PI={}.hasOwnProperty;class uh extends kI{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=mI()}copy(){const t=new uh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(nh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(dh("data",this.frozen),this.namespace[t]=n,this):PI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(dh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Rl(t),r=this.parser||this.Parser;return lh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),lh("process",this.parser||this.Parser),ch("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=Rl(t),d=r.parse(c);r.run(d,c,function(p,m,T){if(p||!m||!T)return f(p);const y=m,_=r.stringify(y,T);II(_)?T.value=_:T.result=_,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(),lh("processSync",this.parser||this.Parser),ch("processSync",this.compiler||this.Compiler),this.process(t,o),XE("processSync","process",n),r;function o(a,u){n=!0,VE(a),r=u}}run(t,n,r){GE(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=Rl(n);o.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,o;return this.run(t,n,a),XE("runSync","run",r),o;function a(u,c){VE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=Rl(n),o=this.compiler||this.Compiler;return ch("stringify",o),GE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(dh("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&&(o.settings=nh(!0,o.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,..._]=p;const S=r[T][1];rh(S)&&rh(y)&&(y=nh(!0,S,y)),r[T]=[f,y,..._]}}}}const NI=new uh().freeze();function lh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ch(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function GE(e){if(!rh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function XE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Rl(e){return OI(e)?e:new YE(e)}function OI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function II(e){return typeof e=="string"||RI(e)}function RI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const LI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",KE=[],QE={allowDangerousHtml:!0},DI=/^(https?|ircs?|mailto|xmpp)$/i,MI=[{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 JE(e){const t=FI(e),n=BI(e);return UI(t.runSync(t.parse(n),n),e)}function FI(e){const t=e.rehypePlugins||KE,n=e.remarkPlugins||KE,r=e.remarkRehypeOptions?M(M({},e.remarkRehypeOptions),QE):QE;return NI().use(yO).use(n).use(fI,r).use(t)}function BI(e){const t=e.children||"",n=new YE;return typeof t=="string"&&(n.value=t),n}function UI(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||HI;for(const p of MI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+LI+p.id,void 0);return Il(e,f),cP(e,{Fragment:w.Fragment,components:o,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.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 zf)if(Object.hasOwn(zf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],S=zf[y];(S===null||S.includes(p.tagName))&&(p.properties[y]=d(String(_||""),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 HI(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||DI.test(e.slice(0,t))?e:""}const ZE=/[#.]/g;function zI(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){ZE.lastIndex=o;const c=ZE.exec(n),d=n.slice(o,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function ey(e,t,n){const r=n?qI(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=zI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,jI(u))c.unshift(u);else for(const[m,T]of Object.entries(u))$I(e,d.properties,m,T)}for(const f of c)fh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function jI(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function $I(e,t,n,r){const o=Df(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?o.spaceSeparated?a=V1(r):o.commaSeparated?a=O1(r):o.commaOrSpaceSeparated?a=V1(O1(r).join(" ")):a=ty(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?VI(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(ty(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function fh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)fh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?fh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ty(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||_a(n)===_a(t)))return!0}return n}function VI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function qI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const YI=["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"],WI=ey(Tl,"div"),GI=ey(Jo,"g",YI);function XI(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=ny(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=ny(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 ny(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
31
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const co={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/"},ry={}.hasOwnProperty,KI=Object.prototype;function QI(e,t){const n=t||{};return hh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Jo:Tl,verbose:n.verbose||!1},e)}function hh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ll(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:iy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=XI(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"},Ll(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ll(e,r,n),n}default:return n=JI(e,t),n}}function iy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=hh(e,t[n]);r.push(o)}return r}function JI(e,t){const n=e.schema;e.schema=t.namespaceURI===co.svg?Jo:Tl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;ry.call(KI,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?GI:WI)(t.tagName,o,iy(e,t.childNodes));if(Ll(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&rs(d.startTag),p=d&&d.endTag&&rs(d.endTag),m=hh(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Ll(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=ZI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function ZI(e,t,n){const r=rs(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)ry.call(n.attrs,u)&&(a[Df(e.schema,u).property]=rs(n.attrs[u]));n.startTag;const c=rs(n.startTag),d=n.endTag?rs(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function rs(e){const t=oy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=oy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function oy(e){return e.line&&e.column?e:void 0}class Ia{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ia.prototype.property={},Ia.prototype.normal={},Ia.prototype.space=null;function sy(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Ia(n,r,t)}function ph(e){return e.toLowerCase()}class nr{constructor(t,n){this.property=t,this.attribute=n}}nr.prototype.space=null,nr.prototype.boolean=!1,nr.prototype.booleanish=!1,nr.prototype.overloadedBoolean=!1,nr.prototype.number=!1,nr.prototype.commaSeparated=!1,nr.prototype.spaceSeparated=!1,nr.prototype.commaOrSpaceSeparated=!1,nr.prototype.mustUseProperty=!1,nr.prototype.defined=!1;let e3=0;const Ge=fo(),zt=fo(),ay=fo(),ye=fo(),yt=fo(),is=fo(),jn=fo();function fo(){return ta(2,++e3)}const mh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:zt,commaOrSpaceSeparated:jn,commaSeparated:is,number:ye,overloadedBoolean:ay,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),gh=Object.keys(mh);class Eh extends nr{constructor(t,n,r,o){let a=-1;if(super(t,n),uy(this,"space",o),typeof r=="number")for(;++a<gh.length;){const u=gh[a];uy(this,gh[a],(r&mh[u])===mh[u])}}}Eh.prototype.defined=!0;function uy(e,t,n){n&&(e[t]=n)}const t3={}.hasOwnProperty;function os(e){const t={},n={};let r;for(r in e.properties)if(t3.call(e.properties,r)){const o=e.properties[r],a=new Eh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ph(r)]=r,n[ph(a.attribute)]=r}return new Ia(t,n,e.space)}const ly=os({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),cy=os({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function dy(e,t){return t in e?e[t]:t}function fy(e,t){return dy(e,t.toLowerCase())}const hy=os({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:fy,properties:{xmlns:null,xmlnsXLink:null}}),py=os({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:yt,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:ye,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:yt,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:zt,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null}}),n3=os({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:fy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:is,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:yt,autoFocus:Ge,autoPlay:Ge,blocking:yt,capture:null,charSet:null,checked:Ge,cite:null,className:yt,cols:ye,colSpan:null,content:null,contentEditable:zt,controls:Ge,controlsList:yt,coords:ye|is,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:ay,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:yt,height:ye,hidden:Ge,high:ye,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:yt,itemRef:yt,itemScope:Ge,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:ye,pattern:null,ping:yt,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:yt,required:Ge,reversed:Ge,rows:ye,rowSpan:ye,sandbox:yt,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:zt,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:ye,security:null,unselectable:null}}),r3=os({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:dy,properties:{about:jn,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:is,g2:is,glyphName:is,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jn,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),i3=/^data[-\w.:]+$/i,my=/-[a-z]/g,o3=/[A-Z]/g;function s3(e,t){const n=ph(t);let r=t,o=nr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&i3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(my,u3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!my.test(a)){let u=a.replace(o3,a3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Eh}return new o(r,t)}function a3(e){return"-"+e.toLowerCase()}function u3(e){return e.charAt(1).toUpperCase()}const l3=sy([cy,ly,hy,py,n3],"html"),gy=sy([cy,ly,hy,py,r3],"svg"),Ey={}.hasOwnProperty;function yy(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&Ey.call(o,e)){const d=String(o[e]);u=Ey.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const c3={},d3={}.hasOwnProperty,by=yy("type",{handlers:{root:h3,element:y3,text:g3,comment:E3,doctype:m3}});function f3(e,t){const r=(t||c3).space;return by(e,r==="svg"?gy:l3)}function h3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=yh(e.children,n,t),ss(e,n),n}function p3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=yh(e.children,n,t),ss(e,n),n}function m3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ss(e,t),t}function g3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ss(e,t),t}function E3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ss(e,t),t}function y3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=gy);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&d3.call(e.properties,a)){const d=b3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:co[u],childNodes:[],parentNode:null};return c.childNodes=yh(e.children,c,r),ss(e,c),e.tagName==="template"&&e.content&&(c.content=p3(e.content,r)),c}function b3(e,t,n){const r=s3(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?I1(n):q1(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=co[r.space]}return o}function yh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=by(e[r],n);a.parentNode=t,o.push(a)}return o}function ss(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 T3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],_3=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]),wt="�";var P;(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"})(P||(P={}));const On={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ty(e){return e>=55296&&e<=57343}function S3(e){return e>=56320&&e<=57343}function x3(e,t){return(e-55296)*1024+9216+t}function _y(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Sy(e){return e>=64976&&e<=65007||_3.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 w3=65536;class C3{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=w3,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(S3(n))return this.pos++,this._addGap(),x3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.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,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.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,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ty(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){_y(t)?this._err(ee.controlCharacterInInputStream):Sy(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 Ke;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ke||(Ke={}));function xy(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 A3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),v3=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 k3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=v3.get(e))!==null&&t!==void 0?t:e}var Qt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Qt||(Qt={}));const P3=32;var vi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(vi||(vi={}));function bh(e){return e>=Qt.ZERO&&e<=Qt.NINE}function N3(e){return e>=Qt.UPPER_A&&e<=Qt.UPPER_F||e>=Qt.LOWER_A&&e<=Qt.LOWER_F}function O3(e){return e>=Qt.UPPER_A&&e<=Qt.UPPER_Z||e>=Qt.LOWER_A&&e<=Qt.LOWER_Z||bh(e)}function I3(e){return e===Qt.EQUALS||O3(e)}var Jt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Jt||(Jt={}));var oi;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(oi||(oi={}));class R3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Jt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=oi.Strict}startEntity(t){this.decodeMode=t,this.state=Jt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Jt.EntityStart:return t.charCodeAt(n)===Qt.NUM?(this.state=Jt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Jt.NamedEntity,this.stateNamedEntity(t,n));case Jt.NumericStart:return this.stateNumericStart(t,n);case Jt.NumericDecimal:return this.stateNumericDecimal(t,n);case Jt.NumericHex:return this.stateNumericHex(t,n);case Jt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|P3)===Qt.LOWER_X?(this.state=Jt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Jt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(bh(o)||N3(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(bh(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Qt.SEMI)this.consumed+=1;else if(this.decodeMode===oi.Strict)return 0;return this.emitCodePoint(k3(this.result),this.consumed),this.errors&&(t!==Qt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&vi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=L3(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===oi.Attribute&&(a===0||I3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&vi.VALUE_LENGTH)>>14,a!==0){if(u===Qt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==oi.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&vi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~vi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Jt.NamedEntity:return this.result!==0&&(this.decodeMode!==oi.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Jt.NumericDecimal:return this.emitNumericEntity(0,2);case Jt.NumericHex:return this.emitNumericEntity(0,3);case Jt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Jt.EntityStart:return 0}}}function L3(e,t,n,r){const o=(t&vi.BRANCH_LENGTH)>>7,a=t&vi.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+o]}return-1}var ae;(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/"})(ae||(ae={}));var ho;(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"})(ho||(ho={}));var rr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(rr||(rr={}));var W;(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"})(W||(W={}));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 D3=new Map([[W.A,g.A],[W.ADDRESS,g.ADDRESS],[W.ANNOTATION_XML,g.ANNOTATION_XML],[W.APPLET,g.APPLET],[W.AREA,g.AREA],[W.ARTICLE,g.ARTICLE],[W.ASIDE,g.ASIDE],[W.B,g.B],[W.BASE,g.BASE],[W.BASEFONT,g.BASEFONT],[W.BGSOUND,g.BGSOUND],[W.BIG,g.BIG],[W.BLOCKQUOTE,g.BLOCKQUOTE],[W.BODY,g.BODY],[W.BR,g.BR],[W.BUTTON,g.BUTTON],[W.CAPTION,g.CAPTION],[W.CENTER,g.CENTER],[W.CODE,g.CODE],[W.COL,g.COL],[W.COLGROUP,g.COLGROUP],[W.DD,g.DD],[W.DESC,g.DESC],[W.DETAILS,g.DETAILS],[W.DIALOG,g.DIALOG],[W.DIR,g.DIR],[W.DIV,g.DIV],[W.DL,g.DL],[W.DT,g.DT],[W.EM,g.EM],[W.EMBED,g.EMBED],[W.FIELDSET,g.FIELDSET],[W.FIGCAPTION,g.FIGCAPTION],[W.FIGURE,g.FIGURE],[W.FONT,g.FONT],[W.FOOTER,g.FOOTER],[W.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[W.FORM,g.FORM],[W.FRAME,g.FRAME],[W.FRAMESET,g.FRAMESET],[W.H1,g.H1],[W.H2,g.H2],[W.H3,g.H3],[W.H4,g.H4],[W.H5,g.H5],[W.H6,g.H6],[W.HEAD,g.HEAD],[W.HEADER,g.HEADER],[W.HGROUP,g.HGROUP],[W.HR,g.HR],[W.HTML,g.HTML],[W.I,g.I],[W.IMG,g.IMG],[W.IMAGE,g.IMAGE],[W.INPUT,g.INPUT],[W.IFRAME,g.IFRAME],[W.KEYGEN,g.KEYGEN],[W.LABEL,g.LABEL],[W.LI,g.LI],[W.LINK,g.LINK],[W.LISTING,g.LISTING],[W.MAIN,g.MAIN],[W.MALIGNMARK,g.MALIGNMARK],[W.MARQUEE,g.MARQUEE],[W.MATH,g.MATH],[W.MENU,g.MENU],[W.META,g.META],[W.MGLYPH,g.MGLYPH],[W.MI,g.MI],[W.MO,g.MO],[W.MN,g.MN],[W.MS,g.MS],[W.MTEXT,g.MTEXT],[W.NAV,g.NAV],[W.NOBR,g.NOBR],[W.NOFRAMES,g.NOFRAMES],[W.NOEMBED,g.NOEMBED],[W.NOSCRIPT,g.NOSCRIPT],[W.OBJECT,g.OBJECT],[W.OL,g.OL],[W.OPTGROUP,g.OPTGROUP],[W.OPTION,g.OPTION],[W.P,g.P],[W.PARAM,g.PARAM],[W.PLAINTEXT,g.PLAINTEXT],[W.PRE,g.PRE],[W.RB,g.RB],[W.RP,g.RP],[W.RT,g.RT],[W.RTC,g.RTC],[W.RUBY,g.RUBY],[W.S,g.S],[W.SCRIPT,g.SCRIPT],[W.SEARCH,g.SEARCH],[W.SECTION,g.SECTION],[W.SELECT,g.SELECT],[W.SOURCE,g.SOURCE],[W.SMALL,g.SMALL],[W.SPAN,g.SPAN],[W.STRIKE,g.STRIKE],[W.STRONG,g.STRONG],[W.STYLE,g.STYLE],[W.SUB,g.SUB],[W.SUMMARY,g.SUMMARY],[W.SUP,g.SUP],[W.TABLE,g.TABLE],[W.TBODY,g.TBODY],[W.TEMPLATE,g.TEMPLATE],[W.TEXTAREA,g.TEXTAREA],[W.TFOOT,g.TFOOT],[W.TD,g.TD],[W.TH,g.TH],[W.THEAD,g.THEAD],[W.TITLE,g.TITLE],[W.TR,g.TR],[W.TRACK,g.TRACK],[W.TT,g.TT],[W.U,g.U],[W.UL,g.UL],[W.SVG,g.SVG],[W.VAR,g.VAR],[W.WBR,g.WBR],[W.XMP,g.XMP]]);function as(e){var t;return(t=D3.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const fe=g,M3={[ae.HTML]:new Set([fe.ADDRESS,fe.APPLET,fe.AREA,fe.ARTICLE,fe.ASIDE,fe.BASE,fe.BASEFONT,fe.BGSOUND,fe.BLOCKQUOTE,fe.BODY,fe.BR,fe.BUTTON,fe.CAPTION,fe.CENTER,fe.COL,fe.COLGROUP,fe.DD,fe.DETAILS,fe.DIR,fe.DIV,fe.DL,fe.DT,fe.EMBED,fe.FIELDSET,fe.FIGCAPTION,fe.FIGURE,fe.FOOTER,fe.FORM,fe.FRAME,fe.FRAMESET,fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6,fe.HEAD,fe.HEADER,fe.HGROUP,fe.HR,fe.HTML,fe.IFRAME,fe.IMG,fe.INPUT,fe.LI,fe.LINK,fe.LISTING,fe.MAIN,fe.MARQUEE,fe.MENU,fe.META,fe.NAV,fe.NOEMBED,fe.NOFRAMES,fe.NOSCRIPT,fe.OBJECT,fe.OL,fe.P,fe.PARAM,fe.PLAINTEXT,fe.PRE,fe.SCRIPT,fe.SECTION,fe.SELECT,fe.SOURCE,fe.STYLE,fe.SUMMARY,fe.TABLE,fe.TBODY,fe.TD,fe.TEMPLATE,fe.TEXTAREA,fe.TFOOT,fe.TH,fe.THEAD,fe.TITLE,fe.TR,fe.TRACK,fe.UL,fe.WBR,fe.XMP]),[ae.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[ae.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[ae.XLINK]:new Set,[ae.XML]:new Set,[ae.XMLNS]:new Set},Th=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);W.STYLE,W.SCRIPT,W.XMP,W.IFRAME,W.NOEMBED,W.NOFRAMES,W.PLAINTEXT;var I;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(I||(I={}));const Dt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function F3(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Ra(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function B3(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function ki(e){return B3(e)||Ra(e)}function wy(e){return ki(e)||F3(e)}function Dl(e){return e+32}function Cy(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function Ay(e){return Cy(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function U3(e){return e===P.NULL?ee.nullCharacterReference:e>1114111?ee.characterReferenceOutsideUnicodeRange:Ty(e)?ee.surrogateCharacterReference:Sy(e)?ee.noncharacterCharacterReference:_y(e)||e===P.CARRIAGE_RETURN?ee.controlCharacterReference:null}class H3{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new C3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new R3(A3,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-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 o=U3(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ke.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ke.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(xy(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(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=as(t.tagName),t.type===Ke.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 Ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ke.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ke.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Cy(t)?Ke.WHITESPACE_CHARACTER:t===P.NULL?Ke.NULL_CHARACTER:Ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?oi.Attribute:oi.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ki(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(ee.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ki(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(ee.missingEndTagName),this.state=I.DATA;break}case P.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(ee.unexpectedNullCharacter),n.tagName+=wt;break}case P.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ra(t)?Dl(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ki(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ki(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ki(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ki(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ki(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(On.SCRIPT,!1)&&Ay(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(On.SCRIPT,!1)&&Ay(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(ee.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(ee.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.name+=wt;break}default:this.currentAttr.name+=String.fromCodePoint(Ra(t)?Dl(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ee.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(ee.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(ee.unexpectedNullCharacter),n.data+=wt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(On.DASH_DASH,!0)?(this._createCommentToken(On.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(On.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(On.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(On.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(ee.cdataInHtmlContent),this._createCommentToken(On.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ee.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(ee.unexpectedNullCharacter),n.data+=wt;break}case P.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 P.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(ee.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case P.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(ee.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.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=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ra(t))this._createDoctypeToken(String.fromCharCode(Dl(t))),this.state=I.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(ee.unexpectedNullCharacter),this._createDoctypeToken(wt),this.state=I.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.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=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(ee.unexpectedNullCharacter),n.name+=wt;break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ra(t)?Dl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(On.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(On.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ee.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(ee.unexpectedNullCharacter),n.publicId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.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 P.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(ee.unexpectedNullCharacter),n.publicId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.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 P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(ee.unexpectedNullCharacter),n.systemId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.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 P.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(ee.unexpectedNullCharacter),n.systemId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.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 P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.NULL:{this._err(ee.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(ee.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&wy(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){wy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(ee.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const vy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),ky=new Set([...vy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Ml=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),z3=new Set([...Ml,g.OL,g.UL]),j3=new Set([...Ml,g.BUTTON]),Py=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Ny=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),$3=new Set([g.TR,g.TEMPLATE,g.HTML]),V3=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),q3=new Set([g.TABLE,g.TEMPLATE,g.HTML]),Y3=new Set([g.TD,g.TH]);class W3{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)===ae.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==ae.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(Th,ae.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Y3,ae.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(q3,ae.HTML)}clearBackToTableBodyContext(){this.clearBackTo(V3,ae.HTML)}clearBackToTableRowContext(){this.clearBackTo($3,ae.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 o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ae.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ae.SVG:{if(Ny.has(o))return!1;break}case ae.MATHML:{if(Py.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ml)}hasInListItemScope(t){return this.hasInDynamicScope(t,z3)}hasInButtonScope(t){return this.hasInDynamicScope(t,j3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ae.HTML:{if(Th.has(n))return!0;if(Ml.has(n))return!1;break}case ae.SVG:{if(Ny.has(n))return!1;break}case ae.MATHML:{if(Py.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ae.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])===ae.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])===ae.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&&vy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ky.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ky.has(this.currentTagId);)this.pop()}}const _h=3;var Lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Lr||(Lr={}));const Oy={type:Lr.Marker};class G3{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Lr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<_h)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<_h)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=_h&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Oy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Lr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Oy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Lr.Element&&n.element===t)}}const Pi={createDocument(){return{nodeName:"#document",mode:rr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Pi.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(Pi.isTextNode(n)){n.value+=t;return}}Pi.appendChild(e,Pi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Pi.isTextNode(r)?r.value+=t:Pi.insertBefore(e,Pi.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=M(M({},e.sourceCodeLocation),t)}},Iy="html",X3="about:legacy-compat",K3="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Ry=["+//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//"],Q3=[...Ry,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],J3=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ly=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Z3=[...Ly,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Dy(e,t){return t.some(n=>e.startsWith(n))}function eR(e){return e.name===Iy&&e.publicId===null&&(e.systemId===null||e.systemId===X3)}function tR(e){if(e.name!==Iy)return rr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===K3)return rr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),J3.has(n))return rr.QUIRKS;let r=t===null?Q3:Ry;if(Dy(n,r))return rr.QUIRKS;if(r=t===null?Ly:Z3,Dy(n,r))return rr.LIMITED_QUIRKS}return rr.NO_QUIRKS}const My={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},nR="definitionurl",rR="definitionURL",iR=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])),oR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ae.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ae.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ae.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ae.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ae.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ae.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ae.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ae.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ae.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ae.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ae.XMLNS}]]),sR=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])),aR=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 uR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ho.COLOR||r===ho.SIZE||r===ho.FACE)||aR.has(t)}function Fy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===nR){e.attrs[t].name=rR;break}}function By(e){for(let t=0;t<e.attrs.length;t++){const n=iR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Sh(e){for(let t=0;t<e.attrs.length;t++){const n=oR.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 lR(e){const t=sR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=as(e.tagName))}function cR(e,t){return t===ae.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function dR(e,t,n){if(t===ae.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ho.ENCODING){const o=n[r].value.toLowerCase();return o===My.TEXT_HTML||o===My.APPLICATION_XML}}return t===ae.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function fR(e,t,n,r){return(!r||r===ae.HTML)&&dR(e,t,n)||(!r||r===ae.MATHML)&&cR(e,t)}const hR="hidden",pR=8,mR=3;var L;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(L||(L={}));const gR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Uy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Hy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Pi,onParseError:null};class zy{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=M(M({},Hy),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 H3(this.options,this),this.activeFormattingElements=new G3(this.treeAdapter),this.fragmentContextID=r?as(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new W3(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=M(M({},Hy),n);t!=null||(t=r.treeAdapter.createElement(W.TEMPLATE,ae.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ae.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(L.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:gR,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ae.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ae.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=Dt.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)===W.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ae.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Dt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Dt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Dt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Dt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&pe(M({},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,ae.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ae.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(W.HTML,ae.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol: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,o=this.treeAdapter.getTagName(t),a=n.type===Ke.END_TAG&&o===n.tagName?{endTag:M({},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)===W.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ae.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ae.HTML)}_processToken(t){switch(t.type){case Ke.CHARACTER:{this.onCharacter(t);break}case Ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ke.COMMENT:{this.onComment(t);break}case Ke.DOCTYPE:{this.onDoctype(t);break}case Ke.START_TAG:{this._processStartTag(t);break}case Ke.END_TAG:{this.onEndTag(t);break}case Ke.EOF:{this.onEof(t);break}case Ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return fR(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Lr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=L.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(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=L.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=L.IN_TABLE;return}case g.BODY:{this.insertionMode=L.IN_BODY;return}case g.FRAMESET:{this.insertionMode=L.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?L.AFTER_HEAD:L.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return Uy.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)===ae.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 M3[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){YL(this,t);return}switch(this.insertionMode){case L.INITIAL:{La(this,t);break}case L.BEFORE_HTML:{Da(this,t);break}case L.BEFORE_HEAD:{Ma(this,t);break}case L.IN_HEAD:{Fa(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Ba(this,t);break}case L.AFTER_HEAD:{Ua(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{$y(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ah(this,t);break}case L.IN_TABLE_TEXT:{Qy(this,t);break}case L.IN_COLUMN_GROUP:{Ul(this,t);break}case L.AFTER_BODY:{jl(this,t);break}case L.AFTER_AFTER_BODY:{$l(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){qL(this,t);return}switch(this.insertionMode){case L.INITIAL:{La(this,t);break}case L.BEFORE_HTML:{Da(this,t);break}case L.BEFORE_HEAD:{Ma(this,t);break}case L.IN_HEAD:{Fa(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Ba(this,t);break}case L.AFTER_HEAD:{Ua(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ah(this,t);break}case L.IN_COLUMN_GROUP:{Ul(this,t);break}case L.AFTER_BODY:{jl(this,t);break}case L.AFTER_AFTER_BODY:{$l(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){wh(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{wh(this,t);break}case L.IN_TABLE_TEXT:{ja(this,t);break}case L.AFTER_BODY:{xR(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{wR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{CR(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,ee.misplacedDoctype);break}case L.IN_TABLE_TEXT:{ja(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)?WL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{La(this,t);break}case L.BEFORE_HTML:{AR(this,t);break}case L.BEFORE_HEAD:{kR(this,t);break}case L.IN_HEAD:{gr(this,t);break}case L.IN_HEAD_NO_SCRIPT:{OR(this,t);break}case L.AFTER_HEAD:{RR(this,t);break}case L.IN_BODY:{mn(this,t);break}case L.IN_TABLE:{us(this,t);break}case L.IN_TABLE_TEXT:{ja(this,t);break}case L.IN_CAPTION:{PL(this,t);break}case L.IN_COLUMN_GROUP:{vh(this,t);break}case L.IN_TABLE_BODY:{Hl(this,t);break}case L.IN_ROW:{zl(this,t);break}case L.IN_CELL:{IL(this,t);break}case L.IN_SELECT:{eb(this,t);break}case L.IN_SELECT_IN_TABLE:{LL(this,t);break}case L.IN_TEMPLATE:{ML(this,t);break}case L.AFTER_BODY:{BL(this,t);break}case L.IN_FRAMESET:{UL(this,t);break}case L.AFTER_FRAMESET:{zL(this,t);break}case L.AFTER_AFTER_BODY:{$L(this,t);break}case L.AFTER_AFTER_FRAMESET:{VL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?GL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{La(this,t);break}case L.BEFORE_HTML:{vR(this,t);break}case L.BEFORE_HEAD:{PR(this,t);break}case L.IN_HEAD:{NR(this,t);break}case L.IN_HEAD_NO_SCRIPT:{IR(this,t);break}case L.AFTER_HEAD:{LR(this,t);break}case L.IN_BODY:{Bl(this,t);break}case L.TEXT:{bL(this,t);break}case L.IN_TABLE:{Ha(this,t);break}case L.IN_TABLE_TEXT:{ja(this,t);break}case L.IN_CAPTION:{NL(this,t);break}case L.IN_COLUMN_GROUP:{OL(this,t);break}case L.IN_TABLE_BODY:{kh(this,t);break}case L.IN_ROW:{Zy(this,t);break}case L.IN_CELL:{RL(this,t);break}case L.IN_SELECT:{tb(this,t);break}case L.IN_SELECT_IN_TABLE:{DL(this,t);break}case L.IN_TEMPLATE:{FL(this,t);break}case L.AFTER_BODY:{rb(this,t);break}case L.IN_FRAMESET:{HL(this,t);break}case L.AFTER_FRAMESET:{jL(this,t);break}case L.AFTER_AFTER_BODY:{$l(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{La(this,t);break}case L.BEFORE_HTML:{Da(this,t);break}case L.BEFORE_HEAD:{Ma(this,t);break}case L.IN_HEAD:{Fa(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Ba(this,t);break}case L.AFTER_HEAD:{Ua(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{Xy(this,t);break}case L.TEXT:{TL(this,t);break}case L.IN_TABLE_TEXT:{ja(this,t);break}case L.IN_TEMPLATE:{nb(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{Ch(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{jy(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ah(this,t);break}case L.IN_TABLE_TEXT:{Ky(this,t);break}}}}function ER(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):Gy(e,t),n}function yR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function bR(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=mR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=TR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function TR(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 _R(e,t,n){const r=e.treeAdapter.getTagName(t),o=as(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===ae.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function SR(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function xh(e,t){for(let n=0;n<pR;n++){const r=ER(e,t);if(!r)break;const o=yR(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=bR(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&_R(e,u,a),SR(e,o,r)}}function wh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function xR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function wR(e,t){e._appendCommentNode(t,e.document)}function Ch(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function CR(e,t){e._setDocumentType(t);const n=t.forceQuirks?rr.QUIRKS:tR(t);eR(t)||e._err(t,ee.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function La(e,t){e._err(t,ee.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,rr.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function AR(e,t){t.tagID===g.HTML?(e._insertElement(t,ae.HTML),e.insertionMode=L.BEFORE_HEAD):Da(e,t)}function vR(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=L.BEFORE_HEAD,e._processToken(t)}function kR(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.HEAD:{e._insertElement(t,ae.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Ma(e,t)}}function PR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Ma(e,t):e._err(t,ee.endTagWithoutMatchingOpenElement)}function Ma(e,t){e._insertFakeElement(W.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function gr(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Dt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Dt.RAWTEXT):(e._insertElement(t,ae.HTML),e.insertionMode=L.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Dt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Dt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:Fa(e,t)}}function NR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Fa(e,t);break}case g.TEMPLATE:{po(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function po(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 Fa(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function OR(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{gr(e,t);break}case g.NOSCRIPT:{e._err(t,ee.nestedNoscriptInHead);break}default:Ba(e,t)}}function IR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case g.BR:{Ba(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function Ba(e,t){const n=t.type===Ke.EOF?ee.openElementsLeftAfterEof:ee.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function RR(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.BODY:{e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ae.HTML),e.insertionMode=L.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),gr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:Ua(e,t)}}function LR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ua(e,t);break}case g.TEMPLATE:{po(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function Ua(e,t){e._insertFakeElement(W.BODY,g.BODY),e.insertionMode=L.IN_BODY,Fl(e,t)}function Fl(e,t){switch(t.type){case Ke.CHARACTER:{$y(e,t);break}case Ke.WHITESPACE_CHARACTER:{jy(e,t);break}case Ke.COMMENT:{wh(e,t);break}case Ke.START_TAG:{mn(e,t);break}case Ke.END_TAG:{Bl(e,t);break}case Ke.EOF:{Xy(e,t);break}}}function jy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function $y(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function DR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function MR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function FR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_FRAMESET)}function BR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ae.HTML)}function UR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Th.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ae.HTML)}function HR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function zR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ae.HTML),n||(e.formElement=e.openElements.current))}function jR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===g.LI&&o===g.LI||(n===g.DD||n===g.DT)&&(o===g.DD||o===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==g.ADDRESS&&o!==g.DIV&&o!==g.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ae.HTML)}function $R(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.tokenizer.state=Dt.PLAINTEXT}function VR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1}function qR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(W.A);n&&(xh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function YR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function WR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(xh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function GR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function XR(e,t){e.treeAdapter.getDocumentMode(e.document)!==rr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function Vy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function qy(e){const t=xy(e,ho.TYPE);return t!=null&&t.toLowerCase()===hR}function KR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),qy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function QR(e,t){e._appendElement(t,ae.HTML),t.ackSelfClosing=!0}function JR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ZR(e,t){t.tagName=W.IMG,t.tagID=g.IMG,Vy(e,t)}function eL(e,t){e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Dt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function tL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Dt.RAWTEXT)}function nL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Dt.RAWTEXT)}function Yy(e,t){e._switchToTextParsing(t,Dt.RAWTEXT)}function rL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function iL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function oL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ae.HTML)}function sL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ae.HTML)}function aL(e,t){e._reconstructActiveFormattingElements(),Fy(t),Sh(t),t.selfClosing?e._appendElement(t,ae.MATHML):e._insertElement(t,ae.MATHML),t.ackSelfClosing=!0}function uL(e,t){e._reconstructActiveFormattingElements(),By(t),Sh(t),t.selfClosing?e._appendElement(t,ae.SVG):e._insertElement(t,ae.SVG),t.ackSelfClosing=!0}function Wy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function mn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{YR(e,t);break}case g.A:{qR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{UR(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:{BR(e,t);break}case g.LI:case g.DD:case g.DT:{jR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Vy(e,t);break}case g.HR:{JR(e,t);break}case g.RB:case g.RTC:{oL(e,t);break}case g.RT:case g.RP:{sL(e,t);break}case g.PRE:case g.LISTING:{HR(e,t);break}case g.XMP:{tL(e,t);break}case g.SVG:{uL(e,t);break}case g.HTML:{DR(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:{gr(e,t);break}case g.BODY:{MR(e,t);break}case g.FORM:{zR(e,t);break}case g.NOBR:{WR(e,t);break}case g.MATH:{aL(e,t);break}case g.TABLE:{XR(e,t);break}case g.INPUT:{KR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{QR(e,t);break}case g.IMAGE:{ZR(e,t);break}case g.BUTTON:{VR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{GR(e,t);break}case g.IFRAME:{nL(e,t);break}case g.SELECT:{rL(e,t);break}case g.OPTION:case g.OPTGROUP:{iL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Yy(e,t);break}case g.FRAMESET:{FR(e,t);break}case g.TEXTAREA:{eL(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Yy(e,t):Wy(e,t);break}case g.PLAINTEXT:{$R(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:Wy(e,t)}}function lL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function cL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=L.AFTER_BODY,rb(e,t))}function dL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function fL(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 hL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(W.P,g.P),e._closePElement()}function pL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function mL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function gL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function EL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function yL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(W.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Gy(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Bl(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:{xh(e,t);break}case g.P:{hL(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:{dL(e,t);break}case g.LI:{pL(e);break}case g.DD:case g.DT:{mL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{gL(e);break}case g.BR:{yL(e);break}case g.BODY:{lL(e,t);break}case g.HTML:{cL(e,t);break}case g.FORM:{fL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{EL(e,t);break}case g.TEMPLATE:{po(e,t);break}default:Gy(e,t)}}function Xy(e,t){e.tmplInsertionModeStack.length>0?nb(e,t):Ch(e,t)}function bL(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 TL(e,t){e._err(t,ee.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ah(e,t){if(e.openElements.currentTagId!==void 0&&Uy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{Qy(e,t);break}case Ke.WHITESPACE_CHARACTER:{Ky(e,t);break}}else za(e,t)}function _L(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_CAPTION}function SL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function xL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(W.COLGROUP,g.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,vh(e,t)}function wL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_TABLE_BODY}function CL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(W.TBODY,g.TBODY),e.insertionMode=L.IN_TABLE_BODY,Hl(e,t)}function AL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function vL(e,t){qy(t)?e._appendElement(t,ae.HTML):za(e,t),t.ackSelfClosing=!0}function kL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ae.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function us(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{CL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{gr(e,t);break}case g.COL:{xL(e,t);break}case g.FORM:{kL(e,t);break}case g.TABLE:{AL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{wL(e,t);break}case g.INPUT:{vL(e,t);break}case g.CAPTION:{_L(e,t);break}case g.COLGROUP:{SL(e,t);break}default:za(e,t)}}function Ha(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{po(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:za(e,t)}}function za(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Fl(e,t),e.fosterParentingEnabled=n}function Ky(e,t){e.pendingCharacterTokens.push(t)}function Qy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ja(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)za(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Jy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function PL(e,t){const n=t.tagID;Jy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,us(e,t)):mn(e,t)}function NL(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=L.IN_TABLE,n===g.TABLE&&Ha(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:Bl(e,t)}}function vh(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.COL:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{gr(e,t);break}default:Ul(e,t)}}function OL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case g.TEMPLATE:{po(e,t);break}case g.COL:break;default:Ul(e,t)}}function Ul(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function Hl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(W.TR,g.TR),e.insertionMode=L.IN_ROW,zl(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=L.IN_TABLE,us(e,t));break}default:us(e,t)}}function kh(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=L.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Ha(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:Ha(e,t)}}function zl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.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=L.IN_TABLE_BODY,Hl(e,t));break}default:us(e,t)}}function Zy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,kh(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=L.IN_TABLE_BODY,kh(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:Ha(e,t)}}function IL(e,t){const n=t.tagID;Jy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),zl(e,t)):mn(e,t)}function RL(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=L.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Zy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Bl(e,t)}}function eb(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ae.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:{gr(e,t);break}}}function tb(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:{po(e,t);break}}}function LL(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)):eb(e,t)}function DL(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)):tb(e,t)}function ML(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:{gr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,us(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,vh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,Hl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,zl(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,mn(e,t)}}function FL(e,t){t.tagID===g.TEMPLATE&&po(e,t)}function nb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ch(e,t)}function BL(e,t){t.tagID===g.HTML?mn(e,t):jl(e,t)}function rb(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=L.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 jl(e,t)}function jl(e,t){e.insertionMode=L.IN_BODY,Fl(e,t)}function UL(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.FRAMESET:{e._insertElement(t,ae.HTML);break}case g.FRAME:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{gr(e,t);break}}}function HL(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function zL(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.NOFRAMES:{gr(e,t);break}}}function jL(e,t){t.tagID===g.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function $L(e,t){t.tagID===g.HTML?mn(e,t):$l(e,t)}function $l(e,t){e.insertionMode=L.IN_BODY,Fl(e,t)}function VL(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.NOFRAMES:{gr(e,t);break}}}function qL(e,t){t.chars=wt,e._insertCharacters(t)}function YL(e,t){e._insertCharacters(t),e.framesetOk=!1}function ib(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ae.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function WL(e,t){if(uR(t))ib(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ae.MATHML?Fy(t):r===ae.SVG&&(lR(t),By(t)),Sh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function GL(e,t){if(t.tagID===g.P||t.tagID===g.BR){ib(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)===ae.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}W.AREA,W.BASE,W.BASEFONT,W.BGSOUND,W.BR,W.COL,W.EMBED,W.FRAME,W.HR,W.IMG,W.INPUT,W.KEYGEN,W.LINK,W.META,W.PARAM,W.SOURCE,W.TRACK,W.WBR;const XL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,KL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ob={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function sb(e,t){const n=s6(e),r=yy("type",{handlers:{root:QL,element:JL,text:ZL,comment:ub,doctype:e6,raw:n6},unknown:r6}),o={parser:n?new zy(ob):zy.getFragmentParser(void 0,ob),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),ls(o,Ir());const a=n?o.parser.document:o.parser.getFragment(),u=QI(a,{file:o.options.file});return o.stitches&&Il(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 ab(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function QL(e,t){ab(e.children,t)}function JL(e,t){i6(e,t),ab(e.children,t),o6(e,t)}function ZL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:$a(e)};ls(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function e6(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:$a(e)};ls(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function t6(e,t){t.stitches=!0;const n=a6(e);if("children"in e&&"children"in n){const r=sb({type:"root",children:e.children},t.options);n.children=r.children}ub({type:"comment",value:{stitch:n}},t)}function ub(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:$a(e)};ls(t,Ir(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function n6(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,lb(t,Ir(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(XL,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function r6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))t6(n,t);else{let r="";throw KL.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 ls(e,t){lb(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=Dt.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 lb(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 i6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Dt.PLAINTEXT)return;ls(t,Ir(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:co.html;o===co.html&&n==="svg"&&(o=co.svg);const a=f3(pe(M({},e),{children:[]}),{space:o===co.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:as(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:$a(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function o6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&T3.includes(n)||t.parser.tokenizer.state===Dt.PLAINTEXT)return;ls(t,_l(e));const r={type:Ke.END_TAG,tagName:n,tagID:as(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:$a(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Dt.RCDATA||t.parser.tokenizer.state===Dt.RAWTEXT||t.parser.tokenizer.state===Dt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Dt.DATA)}function s6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function $a(e){const t=Ir(e)||{line:void 0,column:void 0,offset:void 0},n=_l(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 a6(e){return"children"in e?lo(pe(M({},e),{children:[]})):lo(e)}function cb(e){return function(t,n){return sb(t,pe(M({},e),{file:n}))}}const mo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],db={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...mo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...mo],h2:[["className","sr-only"]],img:[...mo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...mo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...mo],table:[...mo],ul:[...mo,["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"]},Ni={}.hasOwnProperty;function u6(e,t){let n={type:"root",children:[]};const r={schema:t?M(M({},db),t):db,stack:[]},o=fb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function fb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return l6(e,n);case"doctype":return c6(e,n);case"element":return d6(e,n);case"root":return f6(e,n);case"text":return h6(e,n)}}}function l6(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 Va(a,t),a}}function c6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Va(n,t),n}}function d6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=hb(e,t.children),o=p6(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&&Ni.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Va(u,t),u}function f6(e,t){const r={type:"root",children:hb(e,t.children)};return Va(r,t),r}function h6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Va(r,t),r}function hb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=fb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function p6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ni.call(r,n)?r[n]:void 0,u=r&&Ni.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ni.call(c,f)){const p=c[f];let m=pb(e,gb(a,f),f,p);m==null&&(m=pb(e,gb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Ni.call(o,n)){const p=o[n];for(f in p)Ni.call(p,f)&&!Ni.call(d,f)&&(d[f]=p[f])}return d}function pb(e,t,n,r){return t?Array.isArray(r)?m6(e,t,n,r):mb(e,t,n,r):void 0}function m6(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=mb(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function mb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&g6(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function g6(e,t,n){const r=e.schema.protocols&&Ni.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function Va(e,t){const n=Q1(t);t.data&&(e.data=lo(t.data)),n&&(e.position=n)}function gb(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function E6(e){return function(t){return u6(t,e)}}const Eb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",pe(M(M({className:G(e,`${j}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},y6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=at();return!e&&!t?null:w.jsx("div",{className:G(n,`${j}-disclaimer`),children:t?w.jsx(JE,{rehypePlugins:[cb,E6],components:{ul:({children:r})=>w.jsx("ul",{className:G(n,`${j}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:G(n,`${j}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:G(n,`${j}-li`),children:r}),a:({href:r,title:o,children:a})=>w.jsx(Eb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>w.jsx("img",{className:G(n,`${j}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>w.jsx("p",{className:G(n,`${j}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:G(n,`${j}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:G(n,`${j}-disclaimer-text`),children:e})})},Ph=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=er(),{setImageFile:u}=Wo(),{logger:c,globalClassName:d,searchConfig:f,features:p}=at(),m=F.useRef(null),T=F.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",S=!!o||!1,A=S?"connected":"disconnected",v=t||!S,N=()=>a?new Promise((B,q)=>{const ie=new FileReader;ie.readAsDataURL(a),ie.onload=()=>B(ie.result),ie.onerror=me=>q(me)}):Promise.resolve(""),k=B=>et(null,null,function*(){var me;if(v)return;const q=10*1024*1024,ie=(me=B.target.files)==null?void 0:me[0];if(ie){if(ie.size>q){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ie)}}),H=()=>{u(null),T.current&&(T.current.value="")},X=B=>et(null,null,function*(){var me;B.preventDefault();const q=(((me=m.current)==null?void 0:me.value)||"").trim();let ie="";try{ie=yield N()}catch($){c==null||c.error("Error converting file to base64:",$),alert("There was an error processing the file. Please try again.");return}q&&(H(),m.current.value="",r(q,ie))});return w.jsxs("div",{className:G(d,e,`cim-${n}-component`,a&&"with-attachments",`${j}-search-bar-wrapper`),children:[a&&w.jsxs("div",{className:G(d,`cim-${n}-component`,`${j}-image-file-preview`),children:[w.jsx("img",{className:G(d,`cim-${n}-component`,`${j}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),w.jsx("span",{className:G(d,`cim-${n}-component`,`${j}-image-file-name`),title:_,children:_}),w.jsx(N1,{className:G(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:H})]}),w.jsxs("form",{className:G(d,e,`cim-${n}-component`,`${j}-search-bar`),name:`${j}-search-form`,onSubmit:X,children:[w.jsx("span",{role:"status",className:G(`${j}-connection-status-icon`,A)}),y&&w.jsxs("div",{role:"button",className:G(d,e,`cim-${n}-component`,v&&"disabled",`${j}-image-upload-button`),"aria-disabled":v,tabIndex:0,children:[w.jsx("label",{className:G(d,e,`cim-${n}-component`,v&&"disabled",`${j}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:w.jsx(Lk,{})}),w.jsx("input",{className:G(d,e,`cim-${n}-component`,`${j}-file-input`),type:"file",ref:T,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${j}-file-input`,disabled:v,onInput:k})]}),w.jsx("input",{className:G(d,e,`cim-${n}-component`,`${j}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,name:`${j}-user-input`}),w.jsx(Hk,{isLoading:v}),w.jsx(Fk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:v})]}),w.jsx(y6,{})]})};function b6(e){return Lt({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 yb=F.createContext({isOpen:!1}),Nh=F.createContext(null),bb=F.createContext(null),qa=()=>{var n,r;const e=F.useContext(Nh),t=F.useContext(bb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Tb=({onClearChat:e,componentType:t})=>{const n=qa(),r=()=>{e(),n()};return w.jsxs("button",{className:G(`${j}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(b6,{}),"Clear chat"]})};function T6(e){return e==null?[]:Array.isArray(e)?e:[e]}var _6=(e,...t)=>e.concat(t),S6=(e,...t)=>e.filter(n=>!t.includes(n)),x6=e=>Array.from(new Set(e));function _b(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function w6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return _b(e,t,{step:-r,loop:o})}var C6=e=>Array.isArray(e),Sb=e=>e!=null&&typeof e=="object",A6=e=>Sb(e)&&!C6(e),Vl=e=>typeof e=="string",cs=e=>typeof e=="function",v6=e=>e==null,k6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),P6=e=>Object.prototype.toString.call(e),xb=Function.prototype.toString,N6=xb.call(Object),O6=e=>{if(!Sb(e)||P6(e)!="[object Object]"||L6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=k6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&xb.call(n)==N6},I6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,R6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,L6=e=>I6(e)||R6(e),D6=e=>e(),M6=()=>{},Oh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function F6(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:B6,max:U6}=Math,H6=e=>Number.isNaN(e),z6=e=>H6(e)?0:e,wb=(e,t,n)=>B6(U6(z6(e),t),n);function Ih(e){if(!O6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Ih(o))}return n}function Rh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function j6(e,t){if(e==null)throw new Error(t())}function $6(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var V6=Object.defineProperty,q6=(e,t,n)=>t in e?V6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lh=(e,t,n)=>q6(e,typeof t!="symbol"?t+"":t,n),Cb=()=>{},ql=e=>typeof e=="object"&&e!==null,ds=e=>e?"":void 0,Ab=e=>e?"true":void 0,Y6=1,W6=9,G6=11,Zt=e=>ql(e)&&e.nodeType===Y6&&typeof e.nodeName=="string",Yl=e=>ql(e)&&e.nodeType===W6,X6=e=>ql(e)&&e===e.window,vb=e=>Zt(e)?e.localName||"":"#document";function K6(e){return["html","body","#document"].includes(vb(e))}var Q6=e=>ql(e)&&e.nodeType!==void 0,go=e=>Q6(e)&&e.nodeType===G6&&"host"in e,J6=e=>Zt(e)&&e.localName==="input",Z6=e=>Zt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ya(e){if(!e)return!1;const t=e.getRootNode();return ps(t)===e}var e4=/(textarea|select)/;function t4(e){if(e==null||!Zt(e))return!1;try{return J6(e)&&e.selectionStart!=null||e4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function fs(e,t){var r;if(!e||!t||!Zt(e)||!Zt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&go(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Dr(e){var t;return Yl(e)?e:X6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function n4(e){return Dr(e).documentElement}function hs(e){var t,n,r;return go(e)?hs(e.host):Yl(e)?(t=e.defaultView)!=null?t:window:Zt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ps(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 r4(e){if(vb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||go(e)&&e.host||n4(e);return go(t)?t.host:t}function Dh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Yl(t)||go(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Mh=new WeakMap;function ms(e){return Mh.has(e)||Mh.set(e,hs(e).getComputedStyle(e)),Mh.get(e)}var Fh=new Set(["menu","listbox","dialog","grid","tree","region"]),i4=e=>Fh.has(e),kb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Pb(e,t){const n=new Set,r=Dh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=kb(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&&i4(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Nb(e,t){const n=Dh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=kb(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&&Fh.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function o4(e){const t=new Set;return Nb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function s4(e){const t=e.getAttribute("role");return!!(t&&Fh.has(t))}function a4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function u4(e){var t;return a4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function l4(e){if(!e.id)return!1;const t=Dh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&s4(e))}var Bh=()=>typeof document!="undefined";function c4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Uh=e=>Bh()&&e.test(c4()),d4=e=>Bh()&&e.test(navigator.vendor),Ob=()=>Bh()&&!!navigator.maxTouchPoints,f4=()=>Uh(/^iPhone/i),h4=()=>Uh(/^iPad/i)||Hh()&&navigator.maxTouchPoints>1,Wl=()=>f4()||h4(),p4=()=>Hh()||Wl(),Hh=()=>Uh(/^Mac/i),m4=()=>p4()&&d4(/apple/i);function g4(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Er(e){var n;const t=g4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Ib=e=>e.button===0,E4=e=>e.button===2||Hh()&&e.ctrlKey&&e.button===0,y4=e=>"touches"in e&&e.touches.length>0,b4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Rb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function T4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=b4[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in Rb&&(o=Rb[o]),o}function Lb(e,t="client"){const n=y4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var en=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},Db=e=>Zt(e)&&e.tagName==="IFRAME",_4=/^(audio|video|details)$/;function Mb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var S4=e=>!Number.isNaN(Mb(e)),x4=e=>Mb(e)<0;function w4(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 Fb(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const f=w4(d,t);if(f){const p=Array.from(f.querySelectorAll(Gl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,_)=>{u.set(y,T+_)});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,_)=>{u.set(y,T+_)})}o.push(...p)}}return r}var Gl="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",Bb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Gl));(n==!0||n=="if-empty"&&o.length===0)&&Zt(e)&&Mr(e)&&o.unshift(e);const u=[];for(const c of o)if(Mr(c)){if(Db(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Bb(d,{getShadowRoot:r}));continue}u.push(c)}return r?Fb(u,r,Mr):u};function Mr(e){return!Zt(e)||e.closest("[inert]")?!1:e.matches(Gl)&&Z6(e)}function gs(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Gl));n&&Eo(e)&&o.unshift(e);const a=[];for(const u of o)if(Eo(u)){if(Db(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...gs(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Fb(a,r,Eo);return!u.length&&n?o:u}return!a.length&&n?o:a}function Eo(e){return Zt(e)&&e.tabIndex>0?!0:Mr(e)&&!x4(e)}function C4(e,t={}){const n=gs(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function A4(e,t={}){const{current:n,getShadowRoot:r}=t,o=gs(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:ps(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Wa(e){return e.tabIndex<0&&(_4.test(e.localName)||t4(e))&&!S4(e)?0:e.tabIndex}function Ub(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=gs(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var v4=class j2{constructor(){Lh(this,"id",null),Lh(this,"fn_cleanup"),Lh(this,"cleanup",()=>{this.cancel()})}static create(){return new j2}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 Vt(e){const t=v4.create();return t.request(e),t.cleanup}function Hb(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function zh(e){const t=r4(e);return K6(t)?Dr(t).body:Zt(t)&&N4(t)?t:zh(t)}var k4=/auto|scroll|overlay|hidden|clip/,P4=new Set(["inline","contents"]);function N4(e){const t=hs(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return k4.test(n+o+r)&&!P4.has(a)}var Es="default",jh="",Xl=new WeakMap;function O4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Wl()?(Es==="default"&&(jh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Es="disabled"):t&&(Xl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>I4({target:t,doc:r})}function I4(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Wl()){if(Es!=="disabled")return;Es="restoring",setTimeout(()=>{Hb(()=>{Es==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=jh||""),jh="",Es="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 R4(e={}){const u=e,{defer:t,target:n}=u,r=cn(u,["defer","target"]),o=t?Vt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(O4(pe(M({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function L4(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=Lb(c),f=Math.sqrt(ta(d.x,2)+ta(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=Lb(c);r({point:d,event:c})},u=[en(e,"pointermove",o,!1),en(e,"pointerup",a,!1),en(e,"pointercancel",a,!1),en(e,"contextmenu",a,!1),R4({doc:e})];return()=>{u.forEach(c=>c())}}function D4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=C4(e,{includeContainer:!0,getShadowRoot:a}),y=A4(c,{current:n,getShadowRoot:a}),_=!m&&!T;f.shiftKey&&Ya(y)?(o==null||o(),p=T):f.shiftKey&&(Ya(m)||_)?p=n:!f.shiftKey&&Ya(n)?(o==null||o(),p=m):!f.shiftKey&&(Ya(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return en(u,"keydown",d,!0)}function M4(e,t){const c=t,{defer:n,triggerElement:r}=c,o=cn(c,["defer","triggerElement"]),a=n?Vt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(D4(d,M({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function F4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Kl(e,t){if(!e)return Cb;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function B4(e,t,n){if(!e)return Cb;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 U4(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 H4(e,t){const{timeout:n,rootNode:r}=t,o=hs(r),a=Dr(r),u=new o.AbortController;return U4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var z4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),j4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,zb=e=>{const t={};let n;for(;n=j4.exec(e);)t[n[1]]=n[2];return t},$4=(e,t)=>{if(Vl(e)){if(Vl(t))return`${e};${t}`;e=zb(e)}else Vl(t)&&(t=zb(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function qt(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Oh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=z4(t[o],n[o]);continue}if(o==="style"){t[o]=$4(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function bU(e){return e}var ys=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(ys||{}),$h="__init__";function V4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Dr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>ps(t()),a=u=>t().getElementById(u);return pe(M({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Ya,getById:a})}function q4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var bs=()=>e=>Array.from(new Set(e)),jb=typeof globalThis.document!="undefined"?F.useLayoutEffect:F.useEffect;function Ql(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=F.useState(t),[o,a]=F.useState(r),u=e().value!==void 0,c=F.useRef(o);c.current=u?e().value:o;const d=F.useRef(c.current);jb(()=>{d.current=c.current},[o,e().value]);const f=y=>{var A,v;const _=d.current,S=cs(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),u||a(S),n(S,_)||(v=(A=e()).onChange)==null||v.call(A,S,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Go.flushSync:D6)(()=>f(y))},invoke(y,_){var S,A;(A=(S=e()).onChange)==null||A.call(S,y,_)},hash(y){var _,S,A;return(A=(S=(_=e()).hash)==null?void 0:S.call(_,y))!=null?A:String(y)}}}Ql.cleanup=e=>{F.useEffect(()=>e,[])},Ql.ref=e=>{const t=F.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function Y4(e){const t=F.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var W4=(e,t)=>{const n=F.useRef(!1),r=F.useRef(!1);F.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),F.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Jl(e,t={}){var oe,de,le,ne,Te,Oe;const n=F.useMemo(()=>{const{id:ue,ids:Q,getRootNode:re}=t;return V4({id:ue,ids:Q,getRootNode:re})},[t]),r=(...ue)=>{e.debug&&console.log(...ue)},o=(de=(oe=e.props)==null?void 0:oe.call(e,{props:Ih(t),scope:n}))!=null?de:t,a=G4(o),u=(le=e.context)==null?void 0:le.call(e,{prop:a,bindable:Ql,scope:n,flush:Vb,getContext(){return d},getComputed(){return X},getRefs(){return S},getEvent(){return y()}}),c=$b(u),d={get(ue){var Q;return(Q=c.current)==null?void 0:Q[ue].ref.current},set(ue,Q){var re;(re=c.current)==null||re[ue].set(Q)},initial(ue){var Q;return(Q=c.current)==null?void 0:Q[ue].initial},hash(ue){var re,C;const Q=(re=c.current)==null?void 0:re[ue].get();return(C=c.current)==null?void 0:C[ue].hash(Q)}},f=F.useRef(new Map),p=F.useRef(null),m=F.useRef(null),T=F.useRef({type:""}),y=()=>pe(M({},T.current),{current(){return T.current},previous(){return m.current}}),_=()=>pe(M({},B),{matches(...ue){return ue.includes(B.ref.current)},hasTag(ue){var Q,re;return!!((re=(Q=e.states[B.ref.current])==null?void 0:Q.tags)!=null&&re.includes(ue))}}),S=Y4((Te=(ne=e.refs)==null?void 0:ne.call(e,{prop:a,context:d}))!=null?Te:{}),A=()=>({state:_(),context:d,event:y(),prop:a,send:$,action:v,guard:N,track:W4,refs:S,computed:X,flush:Vb,scope:n,choose:H}),v=ue=>{const Q=cs(ue)?ue(A()):ue;if(!Q)return;const re=Q.map(C=>{var te,O;const D=(O=(te=e.implementations)==null?void 0:te.actions)==null?void 0:O[C];return D||Rh(`[zag-js] No implementation found for action "${JSON.stringify(C)}"`),D});for(const C of re)C==null||C(A())},N=ue=>{var Q,re;return cs(ue)?ue(A()):(re=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:re[ue](A())},k=ue=>{const Q=cs(ue)?ue(A()):ue;if(!Q)return;const re=Q.map(D=>{var O,_e;const te=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[D];return te||Rh(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),te}),C=[];for(const D of re){const te=D==null?void 0:D(A());te&&C.push(te)}return()=>C.forEach(D=>D==null?void 0:D())},H=ue=>T6(ue).find(Q=>{let re=!Q.guard;return Vl(Q.guard)?re=!!N(Q.guard):cs(Q.guard)&&(re=Q.guard(A())),re}),X=ue=>{j6(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[ue];return Q({context:d,event:y(),prop:a,refs:S,scope:n,computed:X})},B=Ql(()=>({defaultValue:e.initialState({prop:a}),onChange(ue,Q){var C,D,te,O;if(Q){const _e=f.current.get(Q);_e==null||_e(),f.current.delete(Q)}Q&&v((C=e.states[Q])==null?void 0:C.exit),v((D=p.current)==null?void 0:D.actions);const re=k((te=e.states[ue])==null?void 0:te.effects);if(re&&f.current.set(ue,re),Q===$h){v(e.entry);const _e=k(e.effects);_e&&f.current.set($h,_e)}v((O=e.states[ue])==null?void 0:O.entry)}})),q=F.useRef(void 0),ie=F.useRef(ys.NotStarted);jb(()=>{queueMicrotask(()=>{var D;const re=ie.current===ys.Started;ie.current=ys.Started,r(re?"rehydrating...":"initializing...");const C=(D=q.current)!=null?D:B.initial;B.invoke(C,re?B.get():$h)});const ue=f.current,Q=B.ref.current;return()=>{r("unmounting..."),q.current=Q,ie.current=ys.Stopped,ue.forEach(re=>re==null?void 0:re()),f.current=new Map,p.current=null,queueMicrotask(()=>{v(e.exit)})}},[]);const me=()=>"ref"in B?B.ref.current:B.get(),$=ue=>{queueMicrotask(()=>{var O,_e,De,ke,ze;if(ie.current!==ys.Started)return;m.current=T.current,T.current=ue;let Q=me();const re=(De=(O=e.states[Q].on)==null?void 0:O[ue.type])!=null?De:(_e=e.on)==null?void 0:_e[ue.type],C=H(re);if(!C)return;p.current=C;const D=(ke=C.target)!=null?ke:Q;r("transition",ue.type,C.target||Q,`(${C.actions})`);const te=D!==Q;te?Go.flushSync(()=>B.set(D)):C.reenter&&!te?B.invoke(Q,Q):v((ze=C.actions)!=null?ze:[])})};return(Oe=e.watch)==null||Oe.call(e,A()),{state:_(),send:$,context:d,prop:a,scope:n,refs:S,computed:X,event:y(),getStatus:()=>ie.current}}function $b(e){const t=F.useRef(e);return t.current=e,t}function G4(e){const t=$b(e);return function(r){return t.current[r]}}function Vb(e){queueMicrotask(()=>{Go.flushSync(()=>e())})}var Vh=q4(e=>e);function Zl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function X4(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const qh=e=>{const t=F.memo(F.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=cn(f,["asChild","children"]);if(!o)return F.createElement(e,pe(M({},u),{ref:r}),a);if(!F.isValidElement(a))return null;const c=F.Children.only(a),d=X4(c);return F.cloneElement(c,pe(M({},qt(u,c.props)),{ref:r?Zl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},gn=(()=>{const e=new Map;return new Proxy(qh,{apply(t,n,r){return qh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,qh(r)),e.get(r)}})})();function K4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function yo(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=F.createContext(u);c.displayName=t;function d(){var p;const f=F.useContext(c);if(!f&&n){const m=new Error(a!=null?a:K4(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[Q4,Yh]=yo({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[qb,Ga]=yo({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),Yb=F.forwardRef((e,t)=>{const n=Yh(),r=Ga(),o=qt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(gn.div,pe(M({},o),{ref:Zl(r.ref,t)}))});Yb.displayName="PopoverContent";const Wb=F.forwardRef((e,t)=>{const n=Yh(),r=Ga(),o=qt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(gn.div,pe(M({},o),{ref:t}))});Wb.displayName="PopoverPositioner";const Xa=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},M({},e)]),Gb=e=>Xa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function J4(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var Z4={props({props:e}){return pe(M({},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",ms(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Vt(()=>{var c,d;const u=ec(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})=>{Vt(()=>{e.set("prevAnimationName",ec(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===o&&e.set("prevAnimationName",ec(t.get("styles")))},u=d=>{const f=ec(t.get("styles"));Er(d)===o&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=Kl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),Hb(()=>c())}}}}};function ec(e){return(e==null?void 0:e.animationName)||"none"}bs()(["onExitComplete","present","immediate"]);function eD(e,t={}){const{sync:n=!1}=t,r=tD(e);return F.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function tD(e){const t=F.useRef(e);return t.current=e,t}const Wh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=cn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=F.useRef(!1),c=pe(M({},a),{present:r,onExitComplete:eD(e.onExitComplete)}),d=Jl(Z4,c),f=J4(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var bo=(e,t=[])=>({parts:(...n)=>{if(nD(t))return bo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>bo(e,[...t,...n]),omit:(...n)=>bo(e,t.filter(r=>!n.includes(r))),rename:n=>bo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Ts(e)}"][data-part="${Ts(r)}"]`,`& [data-scope="${Ts(e)}"][data-part="${Ts(r)}"]`].join(", "),attrs:{"data-scope":Ts(e),"data-part":Ts(r)}}}),{})}),Ts=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),nD=e=>e.length===0;const rD=["top","right","bottom","left"],Oi=Math.min,$n=Math.max,tc=Math.round,nc=Math.floor,Fr=e=>({x:e,y:e}),iD={left:"right",right:"left",bottom:"top",top:"bottom"},oD={start:"end",end:"start"};function Gh(e,t,n){return $n(e,Oi(t,n))}function si(e,t){return typeof e=="function"?e(t):e}function ai(e){return e.split("-")[0]}function _s(e){return e.split("-")[1]}function Xh(e){return e==="x"?"y":"x"}function Kh(e){return e==="y"?"height":"width"}const sD=new Set(["top","bottom"]);function Br(e){return sD.has(ai(e))?"y":"x"}function Qh(e){return Xh(Br(e))}function aD(e,t,n){n===void 0&&(n=!1);const r=_s(e),o=Qh(e),a=Kh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=rc(u)),[u,rc(u)]}function uD(e){const t=rc(e);return[Jh(e),t,Jh(t)]}function Jh(e){return e.replace(/start|end/g,t=>oD[t])}const Xb=["left","right"],Kb=["right","left"],lD=["top","bottom"],cD=["bottom","top"];function dD(e,t,n){switch(e){case"top":case"bottom":return n?t?Kb:Xb:t?Xb:Kb;case"left":case"right":return t?lD:cD;default:return[]}}function fD(e,t,n,r){const o=_s(e);let a=dD(ai(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Jh)))),a}function rc(e){return e.replace(/left|right|bottom|top/g,t=>iD[t])}function hD(e){return M({top:0,right:0,bottom:0,left:0},e)}function Qb(e){return typeof e!="number"?hD(e):{top:e,right:e,bottom:e,left:e}}function ic(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Jb(e,t,n){let{reference:r,floating:o}=e;const a=Br(t),u=Qh(t),c=Kh(u),d=ai(t),f=a==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-o.width,y:m};break;default:y={x:r.x,y:r.y}}switch(_s(t)){case"start":y[u]-=T*(n&&f?-1:1);break;case"end":y[u]+=T*(n&&f?-1:1);break}return y}const pD=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=Jb(f,r,d),T=r,y={},_=0;for(let S=0;S<c.length;S++){const{name:A,fn:v}=c[S],{x:N,y:k,data:H,reset:X}=yield v({x:p,y:m,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});p=N!=null?N:p,m=k!=null?k:m,y=pe(M({},y),{[A]:M(M({},y[A]),H)}),X&&_<=50&&(_++,typeof X=="object"&&(X.placement&&(T=X.placement),X.rects&&(f=X.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):X.rects),{x:p,y:m}=Jb(f,T,d)),S=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:y}});function Ka(e,t){return et(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=si(t,e),_=Qb(y),A=c[T?m==="floating"?"reference":"floating":m],v=ic(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})),N=m==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,k=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),H=(yield a.isElement==null?void 0:a.isElement(k))?(yield a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},X=ic(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:k,strategy:d}):N);return{top:(v.top-X.top+_.top)/H.y,bottom:(X.bottom-v.bottom+_.bottom)/H.y,left:(v.left-X.left+_.left)/H.x,right:(X.right-v.right+_.right)/H.x}})}const mD=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=si(e,n)||{};if(p==null)return{};const T=Qb(m),y={x:r,y:o},_=Qh(a),S=Kh(_),A=yield c.getDimensions(p),v=_==="y",N=v?"top":"left",k=v?"bottom":"right",H=v?"clientHeight":"clientWidth",X=u.reference[S]+u.reference[_]-y[_]-u.floating[S],B=y[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ie=q?q[H]:0;(!ie||!(yield c.isElement==null?void 0:c.isElement(q)))&&(ie=d.floating[H]||u.floating[S]);const me=X/2-B/2,$=ie/2-A[S]/2-1,oe=Oi(T[N],$),de=Oi(T[k],$),le=oe,ne=ie-A[S]-de,Te=ie/2-A[S]/2+me,Oe=Gh(le,Te,ne),ue=!f.arrow&&_s(a)!=null&&Te!==Oe&&u.reference[S]/2-(Te<le?oe:de)-A[S]/2<0,Q=ue?Te<le?Te-le:Te-ne:0;return{[_]:y[_]+Q,data:M({[_]:Oe,centerOffset:Te-Oe-Q},ue&&{alignmentOffset:Q}),reset:ue}})}}),gD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,Te=si(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:A=!0}=Te,v=cn(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const N=ai(a),k=Br(d),H=ai(d)===d,X=yield f.isRTL==null?void 0:f.isRTL(p.floating),B=y||(H||!A?[rc(d)]:uD(d)),q=S!=="none";!y&&q&&B.push(...fD(d,A,S,X));const ie=[d,...B],me=yield Ka(n,v),$=[];let oe=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&$.push(me[N]),T){const Oe=aD(a,c,X);$.push(me[Oe[0]],me[Oe[1]])}if(oe=[...oe,{placement:a,overflows:$}],!$.every(Oe=>Oe<=0)){var de,le;const Oe=(((de=u.flip)==null?void 0:de.index)||0)+1,ue=ie[Oe];if(ue&&(!(T==="alignment"?k!==Br(ue):!1)||oe.every(C=>Br(C.placement)===k?C.overflows[0]>0:!0)))return{data:{index:Oe,overflows:oe},reset:{placement:ue}};let Q=(le=oe.filter(re=>re.overflows[0]<=0).sort((re,C)=>re.overflows[1]-C.overflows[1])[0])==null?void 0:le.placement;if(!Q)switch(_){case"bestFit":{var ne;const re=(ne=oe.filter(C=>{if(q){const D=Br(C.placement);return D===k||D==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(D=>D>0).reduce((D,te)=>D+te,0)]).sort((C,D)=>C[1]-D[1])[0])==null?void 0:ne[0];re&&(Q=re);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function Zb(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 rD.some(t=>e[t]>=0)}const ED=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r}=n,u=si(e,n),{strategy:o="referenceHidden"}=u,a=cn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Ka(n,pe(M({},a),{elementContext:"reference"})),d=Zb(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:eT(d)}}}case"escaped":{const c=yield Ka(n,pe(M({},a),{altBoundary:!0})),d=Zb(c,r.floating);return{data:{escapedOffsets:d,escaped:eT(d)}}}default:return{}}})}}},tT=new Set(["left","top"]);function yD(e,t){return et(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=ai(n),c=_s(n),d=Br(n)==="y",f=tT.has(u)?-1:1,p=a&&d?-1:1,m=si(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const bD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return et(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield yD(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:pe(M({},f),{placement:c})}})}}},TD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a}=n,v=si(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:N=>{let{x:k,y:H}=N;return{x:k,y:H}}}}=v,f=cn(v,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},m=yield Ka(n,f),T=Br(ai(a)),y=Xh(T);let _=p[y],S=p[T];if(u){const N=y==="y"?"top":"left",k=y==="y"?"bottom":"right",H=_+m[N],X=_-m[k];_=Gh(H,_,X)}if(c){const N=T==="y"?"top":"left",k=T==="y"?"bottom":"right",H=S+m[N],X=S-m[k];S=Gh(H,S,X)}const A=d.fn(pe(M({},n),{[y]:_,[T]:S}));return pe(M({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[y]:u,[T]:c}}})})}}},_D=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=si(e,t),p={x:n,y:r},m=Br(o),T=Xh(m);let y=p[T],_=p[m];const S=si(c,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:M({mainAxis:0,crossAxis:0},S);if(d){const k=T==="y"?"height":"width",H=a.reference[T]-a.floating[k]+A.mainAxis,X=a.reference[T]+a.reference[k]-A.mainAxis;y<H?y=H:y>X&&(y=X)}if(f){var v,N;const k=T==="y"?"width":"height",H=tT.has(ai(o)),X=a.reference[m]-a.floating[k]+(H&&((v=u.offset)==null?void 0:v[m])||0)+(H?0:A.crossAxis),B=a.reference[m]+a.reference[k]+(H?0:((N=u.offset)==null?void 0:N[m])||0)-(H?A.crossAxis:0);_<X?_=X:_>B&&(_=B)}return{[T]:y,[m]:_}}}},SD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,oe=si(e,n),{apply:f=()=>{}}=oe,p=cn(oe,["apply"]),m=yield Ka(n,p),T=ai(a),y=_s(a),_=Br(a)==="y",{width:S,height:A}=u.floating;let v,N;T==="top"||T==="bottom"?(v=T,N=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(N=T,v=y==="end"?"top":"bottom");const k=A-m.top-m.bottom,H=S-m.left-m.right,X=Oi(A-m[v],k),B=Oi(S-m[N],H),q=!n.middlewareData.shift;let ie=X,me=B;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(me=H),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ie=k),q&&!y){const de=$n(m.left,0),le=$n(m.right,0),ne=$n(m.top,0),Te=$n(m.bottom,0);_?me=S-2*(de!==0||le!==0?de+le:$n(m.left,m.right)):ie=A-2*(ne!==0||Te!==0?ne+Te:$n(m.top,m.bottom))}yield f(pe(M({},n),{availableWidth:me,availableHeight:ie}));const $=yield c.getDimensions(d.floating);return S!==$.width||A!==$.height?{reset:{rects:!0}}:{}})}}};function oc(){return typeof window!="undefined"}function Ss(e){return nT(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ur(e){var t;return(t=(nT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nT(e){return oc()?e instanceof Node||e instanceof Vn(e).Node:!1}function yr(e){return oc()?e instanceof Element||e instanceof Vn(e).Element:!1}function Hr(e){return oc()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function rT(e){return!oc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}const xD=new Set(["inline","contents"]);function Qa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!xD.has(o)}const wD=new Set(["table","td","th"]);function CD(e){return wD.has(Ss(e))}const AD=[":popover-open",":modal"];function sc(e){return AD.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const vD=["transform","translate","scale","rotate","perspective"],kD=["transform","translate","scale","rotate","perspective","filter"],PD=["paint","layout","strict","content"];function Zh(e){const t=ep(),n=yr(e)?br(e):e;return vD.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||kD.some(r=>(n.willChange||"").includes(r))||PD.some(r=>(n.contain||"").includes(r))}function ND(e){let t=Ii(e);for(;Hr(t)&&!xs(t);){if(Zh(t))return t;if(sc(t))return null;t=Ii(t)}return null}function ep(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const OD=new Set(["html","body","#document"]);function xs(e){return OD.has(Ss(e))}function br(e){return Vn(e).getComputedStyle(e)}function ac(e){return yr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ii(e){if(Ss(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rT(e)&&e.host||Ur(e);return rT(t)?t.host:t}function iT(e){const t=Ii(e);return xs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hr(t)&&Qa(t)?t:iT(t)}function Ja(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=iT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Vn(o);if(a){const c=tp(u);return t.concat(u,u.visualViewport||[],Qa(o)?o:[],c&&n?Ja(c):[])}return t.concat(o,Ja(o,[],n))}function tp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oT(e){const t=br(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Hr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=tc(n)!==a||tc(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function np(e){return yr(e)?e:e.contextElement}function ws(e){const t=np(e);if(!Hr(t))return Fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=oT(t);let u=(a?tc(n.width):n.width)/r,c=(a?tc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const ID=Fr(0);function sT(e){const t=Vn(e);return!ep()||!t.visualViewport?ID:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function To(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=np(e);let u=Fr(1);t&&(r?yr(r)&&(u=ws(r)):u=ws(e));const c=RD(a,n,r)?sT(a):Fr(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,m=o.height/u.y;if(a){const T=Vn(a),y=r&&yr(r)?Vn(r):r;let _=T,S=tp(_);for(;S&&r&&y!==_;){const A=ws(S),v=S.getBoundingClientRect(),N=br(S),k=v.left+(S.clientLeft+parseFloat(N.paddingLeft))*A.x,H=v.top+(S.clientTop+parseFloat(N.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,m*=A.y,d+=k,f+=H,_=Vn(S),S=tp(_)}}return ic({width:p,height:m,x:d,y:f})}function uc(e,t){const n=ac(e).scrollLeft;return t?t.left+n:To(Ur(e)).left+n}function aT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-uc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function LD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Ur(r),c=t?sc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Fr(1);const p=Fr(0),m=Hr(r);if((m||!m&&!a)&&((Ss(r)!=="body"||Qa(u))&&(d=ac(r)),Hr(r))){const y=To(r);f=ws(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?aT(u,d):Fr(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 DD(e){return Array.from(e.getClientRects())}function MD(e){const t=Ur(e),n=ac(e),r=e.ownerDocument.body,o=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+uc(e);const c=-n.scrollTop;return br(r).direction==="rtl"&&(u+=$n(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const uT=25;function FD(e,t){const n=Vn(e),r=Ur(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=ep();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=uc(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,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=uT&&(a-=_)}else f<=uT&&(a+=f);return{width:a,height:u,x:c,y:d}}const BD=new Set(["absolute","fixed"]);function UD(e,t){const n=To(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Hr(e)?ws(e):Fr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function lT(e,t,n){let r;if(t==="viewport")r=FD(e,n);else if(t==="document")r=MD(Ur(e));else if(yr(t))r=UD(t,n);else{const o=sT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ic(r)}function cT(e,t){const n=Ii(e);return n===t||!yr(n)||xs(n)?!1:br(n).position==="fixed"||cT(n,t)}function HD(e,t){const n=t.get(e);if(n)return n;let r=Ja(e,[],!1).filter(c=>yr(c)&&Ss(c)!=="body"),o=null;const a=br(e).position==="fixed";let u=a?Ii(e):e;for(;yr(u)&&!xs(u);){const c=br(u),d=Zh(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&BD.has(o.position)||Qa(u)&&!d&&cT(e,u))?r=r.filter(p=>p!==u):o=c,u=Ii(u)}return t.set(e,r),r}function zD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?sc(t)?[]:HD(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=lT(t,p,o);return f.top=$n(m.top,f.top),f.right=Oi(m.right,f.right),f.bottom=Oi(m.bottom,f.bottom),f.left=$n(m.left,f.left),f},lT(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function jD(e){const{width:t,height:n}=oT(e);return{width:t,height:n}}function $D(e,t,n){const r=Hr(t),o=Ur(t),a=n==="fixed",u=To(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Fr(0);function f(){d.x=uc(o)}if(r||!r&&!a)if((Ss(t)!=="body"||Qa(o))&&(c=ac(t)),r){const y=To(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?aT(o,c):Fr(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 rp(e){return br(e).position==="static"}function dT(e,t){if(!Hr(e)||br(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ur(e)===n&&(n=n.ownerDocument.body),n}function fT(e,t){const n=Vn(e);if(sc(e))return n;if(!Hr(e)){let o=Ii(e);for(;o&&!xs(o);){if(yr(o)&&!rp(o))return o;o=Ii(o)}return n}let r=dT(e,t);for(;r&&CD(r)&&rp(r);)r=dT(r,t);return r&&xs(r)&&rp(r)&&!Zh(r)?n:r||ND(e)||n}const VD=function(e){return et(this,null,function*(){const t=this.getOffsetParent||fT,n=this.getDimensions,r=yield n(e.floating);return{reference:$D(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function qD(e){return br(e).direction==="rtl"}const YD={convertOffsetParentRelativeRectToViewportRelativeRect:LD,getDocumentElement:Ur,getClippingRect:zD,getOffsetParent:fT,getElementRects:VD,getClientRects:DD,getDimensions:jD,getScale:ws,isElement:yr,isRTL:qD};function hT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function WD(e,t){let n=null,r;const o=Ur(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 _=nc(m),S=nc(o.clientWidth-(p+T)),A=nc(o.clientHeight-(m+y)),v=nc(p),k={rootMargin:-_+"px "+-S+"px "+-A+"px "+-v+"px",threshold:$n(0,Oi(1,d))||1};let H=!0;function X(B){const q=B[0].intersectionRatio;if(q!==d){if(!H)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!hT(f,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(X,pe(M({},k),{root:o.ownerDocument}))}catch(B){n=new IntersectionObserver(X,k)}n.observe(e)}return u(!0),a}function GD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=np(e),p=o||a?[...f?Ja(f):[],...Ja(t)]:[];p.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const m=f&&c?WD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(v=>{let[N]=v;N&&N.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,S=d?To(e):null;d&&A();function A(){const v=To(e);S&&!hT(S,v)&&n(),S=v,_=requestAnimationFrame(A)}return n(),()=>{var v;p.forEach(N=>{o&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),m==null||m(),(v=y)==null||v.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const XD=bD,KD=TD,QD=gD,JD=SD,ZD=ED,e5=mD,t5=_D,n5=(e,t,n)=>{const r=new Map,o=M({platform:YD},n),a=pe(M({},o.platform),{_c:r});return pD(e,t,pe(M({},o),{platform:a}))};function pT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return pe(M({},o),{toJSON:()=>o})}function r5(e){if(!e)return pT();const{x:t,y:n,width:r,height:o}=e;return pT(t,n,r,o)}function i5(e,t){return{contextElement:Zt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?r5(r):n.getBoundingClientRect()}}}var Za=e=>({variable:e,reference:`var(${e})`}),ui={arrowSize:Za("--arrow-size"),arrowSizeHalf:Za("--arrow-size-half"),arrowBg:Za("--arrow-background"),transformOrigin:Za("--transform-origin"),arrowOffset:Za("--arrow-offset")},o5=e=>e==="top"||e==="bottom"?"y":"x";function s5(e,t){return{name:"transformOrigin",fn(n){var me,$,oe,de,le;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=o5(d),p=((me=o.arrow)==null?void 0:me.x)||0,m=(($=o.arrow)==null?void 0:$.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+T/2,S=m+y/2,A=Math.abs(((oe=o.shift)==null?void 0:oe.y)||0),v=u.reference.height/2,N=y/2,k=(le=(de=e.offset)==null?void 0:de.mainAxis)!=null?le:e.gutter,H=typeof k=="number"?k+N:k!=null?k:N,X=A>H,B={top:`${_}px calc(100% + ${H}px)`,bottom:`${_}px ${-H}px`,left:`calc(100% + ${H}px) ${S}px`,right:`${-H}px ${S}px`}[d],q=`${_}px ${u.reference.y+v-c}px`,ie=!!e.overlap&&f==="y"&&X;return r.floating.style.setProperty(ui.transformOrigin.variable,ie?q:B),{data:{transformOrigin:ie?q:B}}}}}var a5={name:"rects",fn({rects:e}){return{data:e}}},u5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${ui.arrowOffset.reference})`}),{}}}};function l5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var c5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function mT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function ip(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function d5(e,t,n){const r=e||t.createElement("div");return e5({element:r,padding:n.arrowPadding})}function f5(e,t){var n;if(!v6((n=t.offset)!=null?n:t.gutter))return XD(({placement:r})=>{var p,m,T,y;const o=((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+o:a!=null?a:o,{hasAlign:c}=l5(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 h5(e){if(!e.flip)return;const t=ip(e.boundary);return QD(pe(M({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function p5(e){if(!e.slide&&!e.overlap)return;const t=ip(e.boundary);return KD(pe(M({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:t5()}))}function m5(e){return JD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function g5(e){var t;if(e.hideWhenDetached)return ZD({strategy:"referenceHidden",boundary:(t=ip(e.boundary))!=null?t:"clippingAncestors"})}function E5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function y5(e,t,n={}){const r=i5(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},c5,n),a=t.querySelector("[data-part=arrow]"),u=[f5(a,o),h5(o),p5(o),d5(a,t.ownerDocument,o),u5(a),s5({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),m5(o),g5(o),a5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>et(null,null,function*(){var H;if(!r||!t)return;const S=yield n5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(S),p==null||p({placed:!0});const A=hs(t),v=mT(A,S.x),N=mT(A,S.y);t.style.setProperty("--x",`${v}px`),t.style.setProperty("--y",`${N}px`),o.hideWhenDetached&&(((H=S.middlewareData.hide)==null?void 0:H.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const k=t.firstElementChild;if(k){const X=ms(k);t.style.setProperty("--z-index",X.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=E5(o.listeners),_=o.listeners?GD(r,t,T,y):M6;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function gT(e,t,n={}){const c=n,{defer:r}=c,o=cn(c,["defer"]),a=r?Vt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(y5(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var b5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function T5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:ui.arrowSize.reference,height:ui.arrowSize.reference,[ui.arrowSizeHalf.variable]:`calc(${ui.arrowSize.reference} / 2)`,[ui.arrowOffset.variable]:`calc(${ui.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?b5[t.split("-")[0]]:void 0,background:ui.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var Cs=new WeakMap,lc=new WeakMap,cc={},op=0,ET=e=>e&&(e.host||ET(e.parentNode)),_5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ET(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),S5=new Set(["script","output","status","next-route-announcer"]),x5=e=>S5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),w5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=_5(n,Array.isArray(e)?e:[e]);cc[r]||(cc[r]=new WeakMap);const c=cc[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&&Zt(y)&&Nb(y,_=>{m(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(x5(_))return;const A=_.getAttribute(o)==="true",v=(Cs.get(_)||0)+1,N=(c.get(_)||0)+1;Cs.set(_,v),c.set(_,N),d.push(_),v===1&&A&&lc.set(_,!0),N===1&&_.setAttribute(r,""),A||_.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return T(n),f.clear(),op++,()=>{d.forEach(y=>{const _=Cs.get(y)-1,S=c.get(y)-1;Cs.set(y,_),c.set(y,S),_||(lc.has(y)||y.removeAttribute(o),lc.delete(y)),S||y.removeAttribute(r)}),op--,op||(Cs=new WeakMap,Cs=new WeakMap,lc=new WeakMap,cc={})}},C5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,A5=(e,t=C5(e),n="data-aria-hidden",r=!0)=>{if(t)return w5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},v5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function yT(e,t={}){const{defer:n=!0}=t,r=n?v5:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(A5(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function k5(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function P5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var bT="pointerdown.outside",TT="focus.outside";function N5(e){for(const t of e)if(Zt(t)&&Mr(t))return!0;return!1}var _T=e=>"clientY"in e;function O5(e,t){if(!_T(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 I5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function ST(e,t){if(!t||!_T(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return I5(u,c)?r||a:!1}function R5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Dr(e),f=hs(e),p=k5(f),m=P5(f);function T(k,H){if(!Zt(H)||!H.isConnected||fs(e,H)||O5(e,k)||c&&Pb(e,H))return!1;const X=d.querySelector(`[aria-controls="${e.id}"]`);if(X){const q=zh(X);if(ST(k,q))return!1}const B=zh(e);return ST(k,B)?!1:!(n!=null&&n(H))}const y=new Set,_=go(e==null?void 0:e.getRootNode());function S(k){function H(X){var me,$;const B=u&&!Ob()?Vt:oe=>oe(),q=X!=null?X:k,ie=($=(me=q==null?void 0:q.composedPath)==null?void 0:me.call(q))!=null?$:[q==null?void 0:q.target];B(()=>{const oe=_?ie[0]:Er(k);if(!(!e||!T(k,oe))){if(o||a){const de=Oh(o,a);e.addEventListener(bT,de,{once:!0})}xT(e,bT,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:E4(q),focusable:N5(ie),target:oe}})}})}k.pointerType==="touch"?(y.forEach(X=>X()),y.add(en(d,"click",H,{once:!0})),y.add(m.addEventListener("click",H,{once:!0})),y.add(p.addEventListener("click",H,{once:!0}))):H()}const A=new Set,v=setTimeout(()=>{A.add(en(d,"pointerdown",S,!0)),A.add(m.addEventListener("pointerdown",S,!0)),A.add(p.addEventListener("pointerdown",S,!0))},0);function N(k){(u?Vt:X=>X())(()=>{var q,ie;const X=(ie=(q=k==null?void 0:k.composedPath)==null?void 0:q.call(k))!=null?ie:[k==null?void 0:k.target],B=_?X[0]:Er(k);if(!(!e||!T(k,B))){if(r||a){const me=Oh(r,a);e.addEventListener(TT,me,{once:!0})}xT(e,TT,{bubbles:!1,cancelable:!0,detail:{originalEvent:k,contextmenu:!1,focusable:Mr(B),target:B}})}})}return Ob()||(A.add(en(d,"focusin",N,!0)),A.add(m.addEventListener("focusin",N,!0)),A.add(p.addEventListener("focusin",N,!0))),()=>{clearTimeout(v),y.forEach(k=>k()),A.forEach(k=>k())}}function L5(e,t){const{defer:n}=t,r=n?Vt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(R5(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function xT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function D5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return en(Dr(e),"keydown",n,{capture:!0})}var wT="layer:request-dismiss",ir={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=>fs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>fs(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=>ir.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];F5(e,wT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),M5(e,wT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function M5(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function F5(e,t,n){e.addEventListener(t,n,{once:!0})}var CT;function AT(){ir.layers.forEach(({node:e})=>{e.style.pointerEvents=ir.isBelowPointerBlockingLayer(e)?"none":"auto"})}function B5(e){e.style.pointerEvents=""}function U5(e,t){const n=Dr(e),r=[];return ir.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(CT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=H4(()=>{const c=o();return Zt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Kl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{ir.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=CT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function H5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Rh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};ir.add(f),AT();function p(S){var v,N;const A=Er(S.detail.originalEvent);ir.isBelowPointerBlockingLayer(e)||ir.isInBranch(A)||((v=t.onPointerDownOutside)==null||v.call(t,S),(N=t.onInteractOutside)==null||N.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function m(S){var v,N;const A=Er(S.detail.originalEvent);ir.isInBranch(A)||((v=t.onFocusOutside)==null||v.call(t,S),(N=t.onInteractOutside)==null||N.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function T(S){var A;ir.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var k;if(!e)return!1;const A=typeof u=="function"?u():u,v=Array.isArray(A)?A:[A],N=(k=t.persistentElements)==null?void 0:k.map(H=>H()).filter(Zt);return N&&v.push(...N),v.some(H=>fs(H,S))||ir.isInNestedLayer(e,S)}const _=[a?U5(e,t.persistentElements):void 0,D5(e,T),L5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{ir.remove(e),AT(),B5(e),_.forEach(S=>S==null?void 0:S())}}function vT(e,t){const{defer:n}=t,r=n?Vt:a=>a(),o=[];return o.push(r(()=>{const a=cs(e)?e():e;o.push(H5(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var z5=Object.defineProperty,j5=(e,t,n)=>t in e?z5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>j5(e,typeof t!="symbol"?t+"":t,n),kT={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=[],V5=class{constructor(e,t){Ct(this,"trapStack"),Ct(this,"config"),Ct(this,"doc"),Ct(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ct(this,"portalContainers",new Set),Ct(this,"listenerCleanups",[]),Ct(this,"handleFocus",r=>{const o=Er(r),a=this.findContainerIndex(o,r)>=0;if(a||Yl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Wa(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=>Wa(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}),Ct(this,"handlePointerDown",r=>{const o=Er(r);if(!(this.findContainerIndex(o,r)>=0)){if(tu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}tu(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const o=Er(r);this.findContainerIndex(o,r)>=0||tu(this.config.clickOutsideDeactivates,r)||tu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ct(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;eu(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{q5(r)&&tu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ct(this,"_mutationObserver"),Ct(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return u4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?l4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ct(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),Ct(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Mr(r)){const o=ps(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Ct(this,"tryFocus",r=>{if(r!==!1&&r!==ps(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,Y5(r)&&r.select()}}),Ct(this,"deactivate",r=>{if(!this.state.active)return this;const o=M({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(),kT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{PT(()=>{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}),Ct(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ct(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),Ct(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),Ct(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),Ct(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Er(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),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||Mr(u)&&!Eo(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=Wa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else eu(o)||(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||Mr(u)&&!Eo(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=Wa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else eu(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||$5;const n=M({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return eu(r)&&!r.shiftKey},isKeyBackward(r){return eu(r)&&r.shiftKey}},t);this.doc=n.document||Dr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{o4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Pb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=gs(e,{getShadowRoot:this.config.getShadowRoot}),n=Bb(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let f=0;f<t.length;f++)if(Wa(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(Eo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(Eo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return kT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?PT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(en(this.doc,"focusin",this.handleFocus,!0),en(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),en(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),en(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),en(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),en(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=ps(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},eu=e=>e.key==="Tab",tu=(e,...t)=>typeof e=="function"?e(...t):e,q5=e=>!e.isComposing&&e.key==="Escape",PT=e=>setTimeout(e,0),Y5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function NT(e,t={}){let n;const r=Vt(()=>{const o=typeof e=="function"?e():e;if(o){n=new V5(o,pe(M({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Dr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var sp="data-scroll-lock";function W5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function OT(e){const t=ms(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function IT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(sp))return;const u=OT(r)||OT(o),c=n.innerWidth-r.clientWidth;o.setAttribute(sp,"");const d=()=>B4(r,"--scrollbar-width",`${c}px`),f=W5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Kl(o,_)},m=()=>{var X,B;const{scrollX:_,scrollY:S,visualViewport:A}=n,v=(X=A==null?void 0:A.offsetLeft)!=null?X:0,N=(B=A==null?void 0:A.offsetTop)!=null?B:0,k={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(N))}px`,left:`${-(_-Math.floor(v))}px`,right:"0"};!u&&c>0&&(k[f]=`${c}px`);const H=Kl(o,k);return()=>{H==null||H(),n.scrollTo({left:_,top:S,behavior:"instant"})}},T=[d(),Wl()?m():p()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(sp)}}var G5=bo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),zr=G5.build(),RT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},LT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},DT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},X5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},lp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},K5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},MT=e=>e.getById(RT(e)),As=e=>e.getById(LT(e)),vs=e=>e.getById(ap(e)),FT=e=>e.getById(DT(e)),Q5=e=>e.getById(up(e)),J5=e=>e.getById(lp(e));function Z5(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=T5(pe(M({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(pe(M({id:X5(c)},zr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(pe(M({},zr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(pe(M({},zr.anchor.attrs),{dir:u("dir"),id:RT(c)}))},getTriggerProps(){return t.button(pe(M({},zr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:LT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ap(c),onPointerDown(y){Ib(y)&&m4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(pe(M({},zr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(M({id:DT(c)},zr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(pe(M({},zr.content.attrs),{dir:u("dir"),id:ap(c),tabIndex:-1,role:"dialog","aria-modal":Ab(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ds(d),"aria-labelledby":m.title?up(c):void 0,"aria-describedby":m.description?lp(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(pe(M({},zr.title.attrs),{id:up(c),dir:u("dir")}))},getDescriptionProps(){return t.element(pe(M({},zr.description.attrs),{id:lp(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(pe(M({},zr.closeTrigger.attrs),{dir:u("dir"),id:K5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var eM={props({props:e}){return pe(M({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:M({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=MT(n))!=null?a:As(n);return gT(r,()=>FT(n),pe(M({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>vs(n);let o=!0;return vT(r,{type:"popover",pointerBlocking:t("modal"),exclude:As(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:M4(()=>vs(t),{triggerElement:As(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?yT(()=>[vs(t),As(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return IT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?NT(()=>vs(t),{initialFocus:()=>Ub({root:vs(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=MT(n))!=null?u:As(n);gT(o,()=>FT(n),pe(M(M({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Vt(()=>{Object.assign(e.get("renderedElements"),{title:!!Q5(t),description:!!J5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Vt(()=>{const n=Ub({root:vs(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Vt(()=>{const a=As(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})}}}};bs()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[_U,dc]=yo({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[SU,cp]=yo({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),tM=e=>{const t=F.useId(),{getRootNode:n}=dc(),{dir:r}=cp(),o=M({id:t,dir:r,getRootNode:n},e),a=Jl(eM,o);return Z5(a,Vh)},nM=e=>{const[t,u]=Gb(e),c=u,{children:n}=c,r=cn(c,["children"]),o=tM(r),a=Wh(qt({present:o.open},t));return w.jsx(Q4,{value:o,children:w.jsx(qb,{value:a,children:n})})},BT=F.forwardRef((e,t)=>{const n=Yh(),r=Ga(),o=qt(pe(M({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(gn.button,pe(M({},o),{ref:t}))});BT.displayName="PopoverTrigger";function rM(e){return Lt({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 iM(e){return Lt({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 oM(e){return Lt({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 sM(e){return Lt({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 aM(e){return Lt({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 UT(e){return Lt({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 uM=({className:e,componentType:t,children:n})=>{const[r,o]=F.useState(!1),{globalClassName:a}=at(),u=f=>{o(f.open)},c=F.useCallback(()=>{o(!1)},[]),d=F.useMemo(()=>({closeMenu:c}),[c]);return w.jsxs(nM,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(BT,{"aria-label":`Overflow menu for ${t}`,className:G(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(UT,{})}),w.jsx(Wb,{children:w.jsx(Yb,{className:G(`${j}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(bb.Provider,{value:d,children:n})})})]})};function HT(e){return Lt({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 zT(e){return Lt({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[lM,_o]=yo({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),jT=F.forwardRef((e,t)=>{const n=_o(),r=qt(n.getControlProps(),e);return w.jsx(gn.div,pe(M(M({},r),e),{ref:t}))});jT.displayName="CarouselControl";const $T=F.forwardRef((e,t)=>{const[n,r]=Xa()(e,["readOnly","index"]),o=_o(),a=qt(o.getIndicatorProps(n),r);return w.jsx(gn.button,pe(M({},a),{ref:t}))});$T.displayName="CarouselIndicator";const VT=F.forwardRef((e,t)=>{const n=_o(),r=qt(n.getIndicatorGroupProps(),e);return w.jsx(gn.div,pe(M({},r),{ref:t}))});VT.displayName="CarouselIndicatorGroup";const qT=F.forwardRef((e,t)=>{const[n,r]=Xa()(e,["index","snapAlign"]),o=_o(),a=qt(o.getItemProps(n),r);return w.jsx(gn.div,pe(M({},a),{ref:t}))});qT.displayName="CarouselItem";const YT=F.forwardRef((e,t)=>{const n=_o(),r=qt(n.getItemGroupProps(),e);return w.jsx(gn.div,pe(M({},r),{ref:t}))});YT.displayName="CarouselItemGroup";const WT=F.forwardRef((e,t)=>{const n=_o(),r=qt(n.getNextTriggerProps(),e);return w.jsx(gn.button,pe(M({},r),{ref:t}))});WT.displayName="CarouselNextTrigger";const GT=F.forwardRef((e,t)=>{const n=_o(),r=qt(n.getPrevTriggerProps(),e);return w.jsx(gn.button,pe(M({},r),{ref:t}))});GT.displayName="CarouselPrevTrigger";function cM(e){const t=ms(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(o,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function dM(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 XT(e){let t=[];for(const n of e.children)t=t.concat(n,XT(n));return t}function KT(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?XT(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 o){const m=p.getBoundingClientRect();if(!dM(n,m,u))continue;const T=ms(p);let[y,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const S=a==="x"?_:y,A=m[c]-n[c]+e[f];switch(S){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+m[d]/2});break;case"end":r[a].end.push({node:p,position:A+m[d]});break}}}return r}function QT(e){const t=e.getBoundingClientRect(),n=cM(e),r=KT(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:JT([...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(ZT(0,o.x))),y:JT([...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(ZT(0,o.y)))}}function fM(e,t,n){const r=KT(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var JT=e=>[...new Set(e)],ZT=(e,t)=>n=>Math.max(e,Math.min(t,n)),hM=bo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),li=hM.build(),pM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},mM=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},fc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},gM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},EM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},yM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},e_=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},In=e=>e.getById(fc(e)),t_=e=>F4(In(e),"[data-part=item]"),bM=(e,t)=>e.getById(e_(e,t)),n_=e=>{const t=In(e);if(!t)return;const n=gs(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function TM(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),m=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),S=c("slidesPerPage"),A=c("padding"),v=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/y.length},scrollToIndex(N,k){a({type:"INDEX.SET",index:N,instant:k})},scrollTo(N,k){a({type:"PAGE.SET",index:N,instant:k})},scrollNext(N){a({type:"PAGE.NEXT",instant:N})},scrollPrev(N){a({type:"PAGE.PREV",instant:N})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(N){return Array.from(r.get("slidesInView")).includes(N)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(pe(M({},li.root.attrs),{id:pM(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":S,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(pe(M({},li.itemGroup.attrs),{id:fc(u),"data-orientation":c("orientation"),"data-dragging":ds(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(N){fs(N.currentTarget,Er(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){fs(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!c("allowMouseDrag")||!Ib(N))return;const k=Er(N);Mr(k)&&k!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:F6(N=>{const k=c("orientation")==="horizontal"?"deltaX":"deltaY";N[k]<0&&!o("canScrollPrev")||N[k]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:A,[T?"paddingInline":"paddingBlock"]:A,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(N){const k=r.get("slidesInView").includes(N.index);return t.element(pe(M({},li.item.attrs),{id:mM(u,N.index),dir:c("dir"),role:"group","data-index":N.index,"data-inview":ds(k),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":v.item(N.index,c("slideCount")),"aria-hidden":Ab(!k),style:{scrollSnapAlign:(()=>{var ie;const H=(ie=N.snapAlign)!=null?ie:"start",X=c("slidesPerMove"),B=X==="auto"?Math.floor(c("slidesPerPage")):X;return(N.index+B)%B===0?H:void 0})()}}))},getControlProps(){return t.element(pe(M({},li.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(pe(M({},li.prevTrigger.attrs),{id:EM(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":v.prevTrigger,"data-orientation":c("orientation"),"aria-controls":fc(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(pe(M({},li.nextTrigger.attrs),{dir:c("dir"),id:gM(u),type:"button","aria-label":v.nextTrigger,"data-orientation":c("orientation"),"aria-controls":fc(u),disabled:!p,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(pe(M({},li.indicatorGroup.attrs),{dir:c("dir"),id:yM(u),"data-orientation":c("orientation"),onKeyDown(N){if(N.defaultPrevented)return;const k="indicator",H={ArrowDown(q){T||(a({type:"PAGE.NEXT",src:k}),q.preventDefault())},ArrowUp(q){T||(a({type:"PAGE.PREV",src:k}),q.preventDefault())},ArrowRight(q){T&&(a({type:"PAGE.NEXT",src:k}),q.preventDefault())},ArrowLeft(q){T&&(a({type:"PAGE.PREV",src:k}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:k}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:k}),q.preventDefault()}},X=T4(N,{dir:c("dir"),orientation:c("orientation")}),B=H[X];B==null||B(N)}}))},getIndicatorProps(N){return t.button(pe(M({},li.indicator.attrs),{dir:c("dir"),id:e_(u,N.index),type:"button","data-orientation":c("orientation"),"data-index":N.index,"data-readonly":ds(N.readOnly),"data-current":ds(N.index===_),"aria-label":v.indicator(N.index),onClick(k){k.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(pe(M({},li.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":ds(d),"aria-label":d?v.autoplayStop:v.autoplayStart,onClick(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var _M={props({props:e}){return $6(e,["slideCount"],"carousel"),pe(M({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:M({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:SM(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 A6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(In(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=In(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),n_(e)});return n_(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!In(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Vt(()=>{o(),Vt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return t_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=In(e),o=e.getWin(),a=new o.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?_6(d,m):S6(d,m)},n.get("slidesInView"));n.set("slidesInView",x6(c))},{root:r,threshold:t("inViewThreshold")});return t_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=In(n);return r?en(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return en(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return L4(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return en(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var f;const a=t.instant?"instant":"smooth",u=wb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=In(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=In(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=_b(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=w6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=In(r);if(!o)return;const a=fM(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=wb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=In(n);if(!r)return;const o=QT(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=In(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=In(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=In(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=QT(r),c=u.x.reduce((f,p)=>Math.abs(p-o)<Math.abs(f-o)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);Vt(()=>{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=bM(n,e.get("page"));r&&Vt(()=>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 SM(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}bs()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),bs()(["index","readOnly"]),bs()(["index","snapAlign"]);const xM=e=>{const t=F.useId(),{getRootNode:n}=dc(),{dir:r}=cp(),o=M({id:t,dir:r,getRootNode:n},e),a=Jl(_M,o);return TM(a,Vh)},r_=F.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"]),o=xM(n),a=qt(o.getRootProps(),r);return w.jsx(lM,{value:o,children:w.jsx(gn.div,pe(M({},a),{ref:t}))})});r_.displayName="CarouselRoot";const wM=180,CM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},AM=({globalClassName:e,className:t,itemMinWidth:n=wM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p),T=m.length,y=F.useRef(null),[_,S]=F.useState(0),{width:A}=Sv();F.useLayoutEffect(()=>{y.current&&S(y.current.getBoundingClientRect().width)},[A,T]);const v=CM(r),N=n+v,k=_>0?(_+v)/N:1,H=Math.max(1,Math.floor(k));if(T===0)return null;const X=T>H,B=Math.ceil(T/H),q=X?Math.max(1,k):H;return w.jsxs(r_,{ref:y,className:G(e,t,`${j}-carousel`),slidesPerPage:q,slidesPerMove:H,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[w.jsx(YT,{className:G(e,`${j}-carousel__item-group`,{"carousel-row-container":!X}),children:m.map((ie,me)=>w.jsx(qT,{index:me,className:G(e,`${j}-carousel__item`),children:ie},me))}),c&&X&&w.jsxs(jT,{className:G(e,`${j}-carousel__control`),children:[w.jsx(GT,{className:G(e,`${j}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(oM,{size:"16px"})}),w.jsx(WT,{className:G(e,`${j}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(sM,{size:"16px"})})]}),u&&X&&w.jsx(VT,{className:G(e,`${j}-carousel__indicator-group`),children:Array.from({length:B},(ie,me)=>w.jsx($T,{index:me,className:G(e,`${j}-carousel__indicator`),"aria-label":`Go to slide group ${me+1}`},me))})]})},[vM,kM]=yo({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),PM=e=>Xa()(e,["lazyMount","unmountOnExit"]),[NM,nu]=yo({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),i_=F.forwardRef((e,t)=>{const n=nu(),r=kM(),o=Wh(pe(M({},r),{present:n.open})),a=qt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:w.jsx(gn.div,pe(M({},a),{ref:Zl(o.ref,t)}))});i_.displayName="DialogBackdrop";const dp=F.forwardRef((e,t)=>{const n=nu(),r=Ga(),o=qt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(gn.div,pe(M({},o),{ref:Zl(r.ref,t)}))});dp.displayName="DialogContent";const fp=F.forwardRef((e,t)=>{const n=nu(),r=qt(n.getDescriptionProps(),e);return w.jsx(gn.div,pe(M({},r),{ref:t}))});fp.displayName="DialogDescription";const hp=F.forwardRef((e,t)=>{const n=nu(),r=qt(n.getPositionerProps(),e);return Ga().unmounted?null:w.jsx(gn.div,pe(M({},r),{ref:t}))});hp.displayName="DialogPositioner";var OM=bo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),So=OM.build(),o_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},s_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},pp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},a_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},mp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},gp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},u_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},hc=e=>e.getById(pp(e)),IM=e=>e.getById(o_(e)),RM=e=>e.getById(s_(e)),LM=e=>e.getById(a_(e)),DM=e=>e.getById(mp(e)),MM=e=>e.getById(gp(e)),FM=e=>e.getById(u_(e));function BM(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(pe(M({},So.trigger.attrs),{dir:a("dir"),id:a_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":pp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(pe(M({},So.backdrop.attrs),{dir:a("dir"),hidden:!d,id:s_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(M({},So.positioner.attrs),{dir:a("dir"),id:o_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(pe(M({},So.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:pp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:mp(u),"aria-describedby":f.description?gp(u):void 0}))},getTitleProps(){return t.element(pe(M({},So.title.attrs),{dir:a("dir"),id:mp(u)}))},getDescriptionProps(){return t.element(pe(M({},So.description.attrs),{dir:a("dir"),id:gp(u)}))},getCloseTriggerProps(){return t.button(pe(M({},So.closeTrigger.attrs),{dir:a("dir"),id:u_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var UM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>FM(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return M({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return vT(()=>hc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[LM(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return IT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?NT(()=>hc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?yT(()=>[hc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Vt(()=>{e.set("rendered",{title:!!DM(t),description:!!MM(t)})})},syncZIndex({scope:e}){Vt(()=>{const t=hc(e);if(!t)return;const n=ms(t);[IM(e),RM(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};bs()(["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 HM=e=>{const t=F.useId(),{getRootNode:n}=dc(),{dir:r}=cp(),o=M({id:t,getRootNode:n,dir:r},e),a=Jl(UM,o);return BM(a,Vh)},l_=e=>{const[t,c]=Gb(e),d=c,{children:n}=d,r=cn(d,["children"]),[o]=PM(t),a=HM(r),u=Wh(qt({present:a.open},t));return w.jsx(NM,{value:a,children:w.jsx(vM,{value:o,children:w.jsx(qb,{value:u,children:n})})})},c_=F.forwardRef((e,t)=>{const n=nu(),r=qt(n.getTitleProps(),e);return w.jsx(gn.h2,pe(M({},r),{ref:t}))});c_.displayName="DialogTitle";const zM=({children:e})=>{const[t,n]=F.useState(!1),r=F.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=F.useMemo(()=>({isOpen:t}),[t]);return w.jsx(Nh.Provider,{value:r,children:w.jsx(yb.Provider,{value:o,children:e})})},d_=()=>F.useContext(yb),f_=()=>{const e=F.useContext(Nh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},jM=`${j}-overflow-menu-button-trigger`,$M=({componentType:e,children:t})=>{const{isOpen:n}=d_(),{closeMenu:r}=f_(),{globalClassName:o}=at(),a=F.useRef(null);return F.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${jM}`)||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?w.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:G(`${j}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},VM=({componentType:e,className:t})=>{const{toggleMenu:n}=f_(),{isOpen:r}=d_(),{globalClassName:o}=at();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:G(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:w.jsx(UT,{})})},Ep=()=>{const{status:e,entryType:t}=Zn(),{messages:n}=er(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},qM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),{previousComponentType:r}=Zn(),o=qa(),a=()=>{ml(r||"dialog"),o()};return t?w.jsx(ii,{className:G(n,`${j}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(HT,{})}):w.jsxs("button",{className:G(n,`${j}-overflow-menu-button`,`${j}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(HT,{}),"Show ",r||"dialog"]})},YM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),{isModalFullscreen:r}=Zn(),o=qa(),a=()=>{wf(!r),o()},u=r?Ik:Rk,c="Toggle Fullscreen";return t?w.jsx(ii,{ariaLabel:c,title:c,className:G(n,`${j}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:G(n,`${j}-overflow-menu-button`,`${j}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),c]})},WM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),{dialogPosition:r}=Zn(),o=qa(),a=r==="bottom-left",u=()=>{Cf(a?"bottom-right":"bottom-left"),o()},c=a?iM:rM,d=a?"Move right":"Move left";return t?w.jsx(ii,{className:G(n,`${j}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(c,{})}):w.jsxs("button",{className:G(n,`${j}-overflow-menu-button`,`${j}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(c,{}),d]})},h_=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=at(),{mode:a}=Zn(),u=a==="standalone",c=e==="modal",d=c?qM:p_,f=c?YM:WM,p=F.useMemo(()=>r?Dk(r):{},[r]);return w.jsx(zM,{children:w.jsxs("div",{className:G(o,`${j}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:G(o,`${j}-${e}-header`,{standalone:u,embedded:!u}),style:p,children:[(r==null?void 0:r.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:G(o,`${j}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),w.jsx(c_,{className:G(o,`${j}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),w.jsxs("div",{className:G(o,`${j}-${e}-controls`),children:[w.jsx(d,{componentType:e,isIcon:!0}),w.jsx(VM,{componentType:e}),w.jsx(N1,{className:G(o,`cim-${e}-component`),onClick:n})]})]}),w.jsxs($M,{componentType:e,children:[w.jsx(f,{componentType:e}),w.jsx(XM,{componentType:e}),w.jsx(Tb,{componentType:e,onClearChat:t})]})]})})},GM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return w.jsx("div",{className:G(t,`${j}-suggestion-container ${u}`,e),children:n.map(d=>o?w.jsx(bl,{disabled:r,className:G(t,`${j}-suggestion-button standalone`),onClick:c(d),children:d},d):w.jsx("button",{disabled:r,className:G(t,`${j}-suggestion-button embedded`),onClick:c(d),children:d},d))})},XM=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=at();if(!r)return null;const o=()=>{ri(!1),pl(!0)};return t?w.jsx(ii,{className:G(n,`${j}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:w.jsx(k1,{})}):w.jsxs("button",{className:G(n,`${j}-overflow-menu-button`,`${j}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(k1,{}),"Minimize"]})},p_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),r=qa(),o=()=>{ml("modal"),r()};return t?w.jsx(ii,{className:G(n,`${j}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:w.jsx(zT,{})}):w.jsxs("button",{className:G(n,`${j}-overflow-menu-button`,`${j}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(zT,{}),"Show modal"]})},KM=({isWidgetStandalone:e})=>{var m;const{globalClassName:t,entryMessage:n,resetConversationMessage:r}=at(),{askCimPrompts:o,messages:a}=er(),{isLoading:u,handleSuggestion:c}=Or(),d=F.useMemo(()=>{const T=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return a.some(_=>_.name==="conversation_reset")&&r||T},[a,n,r]),f=((m=o.message)==null?void 0:m.suggestions)||[],p=(T,y)=>()=>{c(T,y)};return w.jsxs("div",{className:G(t,`${j}-ask-cim-entry-message`,`${j}-message-group`,e?"standalone":"embedded"),children:[w.jsx("p",{className:G(t,`${j}-ask-cim-entry-text`),children:d}),!!(f!=null&&f.length)&&w.jsx("div",{className:G(t,`${j}-ask-cim-suggestions-container`,`${j}-suggestion-container`,e?"standalone":"embedded"),children:f.map(T=>{var y;return w.jsx(bl,{disabled:u,className:G(t,`${j}-ask-cim-suggestion-button`,`${j}-suggestion-button`,e?"standalone":"embedded"),onClick:p(T,((y=o.message)==null?void 0:y.eventSourceId)||""),children:T.displayText},T.displayText)})})]})},QM=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=at();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),m=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return w.jsxs("div",{className:G(r,`${j}-product-tile`,{embedded:!e,standalone:e}),children:[m?w.jsx("a",{href:`${m}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:w.jsx("img",{className:G(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):w.jsx("img",{className:G(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),w.jsxs("div",{className:G(r,`${j}-product-tile-details`,{embedded:!e,standalone:e}),children:[w.jsxs("div",{className:G(r,`${j}-product-tile-content`),children:[u&&w.jsx("p",{className:`${j}-product-tile-brand`,children:u}),m?w.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:G(r,`${j}-product-tile-pdp`),href:`${m}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",w.jsx("span",{className:G(r,`${j}-product-tile-pdp-arrow`),children:"→"})]}):w.jsx("p",{className:G(r,`${j}-product-tile-name`),title:a,children:a})]}),w.jsx("div",{className:G(r,`${j}-product-tile-footer`),children:w.jsx("p",{className:G(r,`${j}-product-tile-price`),children:c})})]})]})},JM=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=at(),o=t;return n?w.jsxs("div",{className:G(r,`${j}-display-products`),children:[w.jsx("p",{children:o.message}),o.products&&o.products.length>0&&w.jsx(AM,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:o.products.map(a=>{const u=n.getPid(a);return w.jsx(QM,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},ZM=({globalClassName:e,message:t,isWidgetStandalone:n})=>w.jsx("div",{className:G(e,`${j}-error-message`,{standalone:n,embedded:!n}),children:w.jsxs("p",{className:G(e,`${j}-error-message-text`,{standalone:n,embedded:!n}),children:[w.jsx(Pk,{})," ",t.message||"An error occurred while processing your request."]})}),e8=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var _;const{isLoading:a}=Or(),{messages:u}=er(),c=u.find(S=>S.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?pC(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=S=>{const A=n.suggestions.find(v=>v.displayText===S);A&&o(A,n.eventSourceId||n.id)};return w.jsxs("div",{className:G(e,`${j}-follow-up`),children:[w.jsx("p",{className:G(e,`${j}-text`),children:n.message}),w.jsx(GM,{suggestions:n.suggestions.map(S=>S.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function m_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function t8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function n8(e,t,n){const o=Nl((n||{}).ignore||[]),a=r8(t);let u=-1;for(;++u<a.length;)zE(e,"text",c);function c(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],_=T?T.children:void 0;if(o(y,_?_.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 _=0;const A=m.children.indexOf(f);let v=!1,N=[];T.lastIndex=0;let k=T.exec(f.value);for(;k;){const H=k.index,X={index:k.index,input:k.input,stack:[...p,f]};let B=y(...k,X);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?T.lastIndex=H+1:(_!==H&&N.push({type:"text",value:f.value.slice(_,H)}),Array.isArray(B)?N.push(...B):B&&N.push(B),_=H+k[0].length,v=!0),!T.global)break;k=T.exec(f.value)}return v?(_<f.value.length&&N.push({type:"text",value:f.value.slice(_)}),m.children.splice(A,1,...N)):N=[f],A+N.length}}function r8(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([i8(o[0]),o8(o[1])])}return t}function i8(e){return typeof e=="string"?new RegExp(t8(e),"g"):e}function o8(e){return typeof e=="function"?e:function(){return e}}const yp="phrasing",bp=["autolink","link","image","label"];function s8(){return{transforms:[h8],enter:{literalAutolink:u8,literalAutolinkEmail:Tp,literalAutolinkHttp:Tp,literalAutolinkWww:Tp},exit:{literalAutolink:f8,literalAutolinkEmail:d8,literalAutolinkHttp:l8,literalAutolinkWww:c8}}}function a8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:yp,notInConstruct:bp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:yp,notInConstruct:bp},{character:":",before:"[ps]",after:"\\/",inConstruct:yp,notInConstruct:bp}]}}function u8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Tp(e){this.config.enter.autolinkProtocol.call(this,e)}function l8(e){this.config.exit.autolinkProtocol.call(this,e)}function c8(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function d8(e){this.config.exit.autolinkEmail.call(this,e)}function f8(e){this.exit(e)}function h8(e){n8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,p8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),m8]],{ignore:["link","linkReference"]})}function p8(e,t,n,r,o){let a="";if(!g_(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!g8(n)))return!1;const u=E8(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function m8(e,t,n,r){return!g_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function g8(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function E8(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=m_(e,"(");let a=m_(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function g_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||uo(n)||xl(n))&&(!t||n!==47)}E_.peek=A8;function y8(){this.buffer()}function b8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function T8(){this.buffer()}function _8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function S8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function x8(e){this.exit(e)}function w8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function C8(e){this.exit(e)}function A8(){return"["}function E_(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function v8(){return{enter:{gfmFootnoteCallString:y8,gfmFootnoteCall:b8,gfmFootnoteDefinitionLabelString:T8,gfmFootnoteDefinition:_8},exit:{gfmFootnoteCallString:S8,gfmFootnoteCall:x8,gfmFootnoteDefinitionLabelString:w8,gfmFootnoteDefinition:C8}}}function k8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:E_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,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?`
32
- `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?y_:P8))),f(),d}}function P8(e,t,n){return t===0?e:y_(e,t,n)}function y_(e,t,n){return(n?"":" ")+e}const N8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];b_.peek=D8;function O8(){return{canContainEols:["delete"],enter:{strikethrough:R8},exit:{strikethrough:L8}}}function I8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:N8}],handlers:{delete:b_}}}function R8(e){this.enter({type:"delete",children:[]},e)}function L8(e){this.exit(e)}function b_(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,pe(M({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function D8(){return"~"}function M8(e){return e.length}function F8(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||M8,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const S=[],A=[];let v=-1;for(e[p].length>f&&(f=e[p].length);++v<e[p].length;){const N=B8(e[p][v]);if(n.alignDelimiters!==!1){const k=o(N);A[v]=k,(d[v]===void 0||k>d[v])&&(d[v]=k)}S.push(N)}u[p]=S,c[p]=A}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=T_(r[m]);else{const S=T_(r);for(;++m<f;)a[m]=S}m=-1;const T=[],y=[];for(;++m<f;){const S=a[m];let A="",v="";S===99?(A=":",v=":"):S===108?A=":":S===114&&(v=":");let N=n.alignDelimiters===!1?1:Math.max(1,d[m]-A.length-v.length);const k=A+"-".repeat(N)+v;n.alignDelimiters!==!1&&(N=A.length+N+v.length,N>d[m]&&(d[m]=N),y[m]=N),T[m]=k}u.splice(1,0,T),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const S=u[p],A=c[p];m=-1;const v=[];for(;++m<f;){const N=S[m]||"";let k="",H="";if(n.alignDelimiters!==!1){const X=d[m]-(A[m]||0),B=a[m];B===114?k=" ".repeat(X):B===99?X%2?(k=" ".repeat(X/2+.5),H=" ".repeat(X/2-.5)):(k=" ".repeat(X/2),H=k):H=" ".repeat(X)}n.delimiterStart!==!1&&!m&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||m)&&v.push(" "),n.alignDelimiters!==!1&&v.push(k),v.push(N),n.alignDelimiters!==!1&&v.push(H),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&v.push("|")}_.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return _.join(`
33
- `)}function B8(e){return e==null?"":String(e)}function T_(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function U8(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),H8);return o(),u}function H8(e,t,n){return">"+(n?"":" ")+e}function z8(e,t){return __(e,t.inConstruct,!0)&&!__(e,t.notInConstruct,!1)}function __(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 S_(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
34
- `&&z8(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
- `}function j8(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function $8(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function V8(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function q8(e,t,n,r){const o=V8(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if($8(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,Y8);return m(),T}const c=n.createTracker(r),d=o.repeat(Math.max(j8(a,o)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,M({before:p,after:" ",encode:["`"]},c.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,M({before:p,after:`
29
+ `}),n}function VE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function qE(e,t){const n=dI(e,t),r=n.one(e,void 0),o=tI(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
30
+ `},o),a}function gI(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const o=qE(n,M({file:r},t));yield e.run(o,r)})}:function(n,r){return qE(n,M({file:r},e||t))}}function YE(e){if(e)throw e}var th,WE;function EI(){if(WE)return th;WE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=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 th=function d(){var f,p,m,T,y,_,S=arguments[0],A=1,C=arguments.length,N=!1;for(typeof S=="boolean"&&(N=S,S=arguments[1]||{},A=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});A<C;++A)if(f=arguments[A],f!=null)for(p in f)m=c(S,p),T=c(f,p),S!==T&&(N&&T&&(a(T)||(y=o(T)))?(y?(y=!1,_=m&&o(m)?m:[]):_=m&&a(m)?m:{},u(S,{name:p,newValue:d(N,_,T)})):typeof T!="undefined"&&u(S,{name:p,newValue:T}));return S},th}var yI=EI();const nh=Qe(yI);function rh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function bI(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<o.length;)(f[m]===null||f[m]===void 0)&&(f[m]=o[m]);o=f,p?TI(p,c)(...f):u(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function TI(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return o(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const Lr={basename:_I,dirname:SI,extname:xI,join:wI,sep:"/"};function _I(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,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function SI(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 xI(e){Oa(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function wI(...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?".":AI(n)}function AI(e){Oa(e);const t=e.codePointAt(0)===47;let n=CI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function CI(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function Oa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const vI={cwd:kI};function kI(){return"/"}function ih(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function PI(e){if(typeof e=="string")e=new URL(e);else if(!ih(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return NI(e)}function NI(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const oh=["history","path","basename","stem","extname","dirname"];class GE{constructor(t){let n;t?ih(t)?n={path:t}:typeof t=="string"||OI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":vI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<oh.length;){const a=oh[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)oh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Lr.basename(this.path):void 0}set basename(t){ah(t,"basename"),sh(t,"basename"),this.path=Lr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Lr.dirname(this.path):void 0}set dirname(t){XE(this.basename,"dirname"),this.path=Lr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Lr.extname(this.path):void 0}set extname(t){if(sh(t,"extname"),XE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Lr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ih(t)&&(t=PI(t)),ah(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Lr.basename(this.path,this.extname):void 0}set stem(t){ah(t,"stem"),sh(t,"stem"),this.path=Lr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new hn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function sh(e,t){if(e&&e.includes(Lr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Lr.sep+"`")}function ah(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function XE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function OI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const II=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),RI={}.hasOwnProperty;class uh extends II{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=bI()}copy(){const t=new uh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(nh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(dh("data",this.frozen),this.namespace[t]=n,this):RI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(dh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Rl(t),r=this.parser||this.Parser;return lh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),lh("process",this.parser||this.Parser),ch("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=Rl(t),d=r.parse(c);r.run(d,c,function(p,m,T){if(p||!m||!T)return f(p);const y=m,_=r.stringify(y,T);MI(_)?T.value=_:T.result=_,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(),lh("processSync",this.parser||this.Parser),ch("processSync",this.compiler||this.Compiler),this.process(t,o),QE("processSync","process",n),r;function o(a,u){n=!0,YE(a),r=u}}run(t,n,r){KE(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=Rl(n);o.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,o;return this.run(t,n,a),QE("runSync","run",r),o;function a(u,c){YE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=Rl(n),o=this.compiler||this.Compiler;return ch("stringify",o),KE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(dh("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&&(o.settings=nh(!0,o.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,..._]=p;const S=r[T][1];rh(S)&&rh(y)&&(y=nh(!0,S,y)),r[T]=[f,y,..._]}}}}const LI=new uh().freeze();function lh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ch(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function KE(e){if(!rh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function QE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Rl(e){return DI(e)?e:new GE(e)}function DI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function MI(e){return typeof e=="string"||FI(e)}function FI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",JE=[],ZE={allowDangerousHtml:!0},UI=/^(https?|ircs?|mailto|xmpp)$/i,HI=[{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 ey(e){const t=zI(e),n=jI(e);return $I(t.runSync(t.parse(n),n),e)}function zI(e){const t=e.rehypePlugins||JE,n=e.remarkPlugins||JE,r=e.remarkRehypeOptions?M(M({},e.remarkRehypeOptions),ZE):ZE;return LI().use(SO).use(n).use(gI,r).use(t)}function jI(e){const t=e.children||"",n=new GE;return typeof t=="string"&&(n.value=t),n}function $I(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||VI;for(const p of HI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+BI+p.id,void 0);return Il(e,f),pP(e,{Fragment:w.Fragment,components:o,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.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 zf)if(Object.hasOwn(zf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],S=zf[y];(S===null||S.includes(p.tagName))&&(p.properties[y]=d(String(_||""),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 VI(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||UI.test(e.slice(0,t))?e:""}const ty=/[#.]/g;function qI(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){ty.lastIndex=o;const c=ty.exec(n),d=n.slice(o,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function ny(e,t,n){const r=n?XI(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=qI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,YI(u))c.unshift(u);else for(const[m,T]of Object.entries(u))WI(e,d.properties,m,T)}for(const f of c)fh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function YI(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function WI(e,t,n,r){const o=Df(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?o.spaceSeparated?a=Y1(r):o.commaSeparated?a=R1(r):o.commaOrSpaceSeparated?a=Y1(R1(r).join(" ")):a=ry(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?GI(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(ry(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function fh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)fh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?fh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ry(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||_a(n)===_a(t)))return!0}return n}function GI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function XI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const KI=["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"],QI=ny(Tl,"div"),JI=ny(Jo,"g",KI);function ZI(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=iy(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=iy(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 iy(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
31
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const co={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/"},oy={}.hasOwnProperty,e3=Object.prototype;function t3(e,t){const n=t||{};return hh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Jo:Tl,verbose:n.verbose||!1},e)}function hh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ll(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:sy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=ZI(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"},Ll(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ll(e,r,n),n}default:return n=n3(e,t),n}}function sy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=hh(e,t[n]);r.push(o)}return r}function n3(e,t){const n=e.schema;e.schema=t.namespaceURI===co.svg?Jo:Tl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;oy.call(e3,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?JI:QI)(t.tagName,o,sy(e,t.childNodes));if(Ll(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&rs(d.startTag),p=d&&d.endTag&&rs(d.endTag),m=hh(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Ll(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=r3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function r3(e,t,n){const r=rs(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)oy.call(n.attrs,u)&&(a[Df(e.schema,u).property]=rs(n.attrs[u]));n.startTag;const c=rs(n.startTag),d=n.endTag?rs(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function rs(e){const t=ay({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ay({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ay(e){return e.line&&e.column?e:void 0}class Ia{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ia.prototype.property={},Ia.prototype.normal={},Ia.prototype.space=null;function uy(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Ia(n,r,t)}function ph(e){return e.toLowerCase()}class rr{constructor(t,n){this.property=t,this.attribute=n}}rr.prototype.space=null,rr.prototype.boolean=!1,rr.prototype.booleanish=!1,rr.prototype.overloadedBoolean=!1,rr.prototype.number=!1,rr.prototype.commaSeparated=!1,rr.prototype.spaceSeparated=!1,rr.prototype.commaOrSpaceSeparated=!1,rr.prototype.mustUseProperty=!1,rr.prototype.defined=!1;let i3=0;const Ge=fo(),zt=fo(),ly=fo(),ye=fo(),yt=fo(),is=fo(),$n=fo();function fo(){return ta(2,++i3)}const mh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:zt,commaOrSpaceSeparated:$n,commaSeparated:is,number:ye,overloadedBoolean:ly,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),gh=Object.keys(mh);class Eh extends rr{constructor(t,n,r,o){let a=-1;if(super(t,n),cy(this,"space",o),typeof r=="number")for(;++a<gh.length;){const u=gh[a];cy(this,gh[a],(r&mh[u])===mh[u])}}}Eh.prototype.defined=!0;function cy(e,t,n){n&&(e[t]=n)}const o3={}.hasOwnProperty;function os(e){const t={},n={};let r;for(r in e.properties)if(o3.call(e.properties,r)){const o=e.properties[r],a=new Eh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ph(r)]=r,n[ph(a.attribute)]=r}return new Ia(t,n,e.space)}const dy=os({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),fy=os({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function hy(e,t){return t in e?e[t]:t}function py(e,t){return hy(e,t.toLowerCase())}const my=os({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:py,properties:{xmlns:null,xmlnsXLink:null}}),gy=os({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:yt,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:ye,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:yt,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:zt,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null}}),s3=os({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:py,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:is,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:yt,autoFocus:Ge,autoPlay:Ge,blocking:yt,capture:null,charSet:null,checked:Ge,cite:null,className:yt,cols:ye,colSpan:null,content:null,contentEditable:zt,controls:Ge,controlsList:yt,coords:ye|is,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:ly,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:yt,height:ye,hidden:Ge,high:ye,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:yt,itemRef:yt,itemScope:Ge,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:ye,pattern:null,ping:yt,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:yt,required:Ge,reversed:Ge,rows:ye,rowSpan:ye,sandbox:yt,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:zt,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:ye,security:null,unselectable:null}}),a3=os({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:hy,properties:{about:$n,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:is,g2:is,glyphName:is,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:$n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$n,rev:$n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$n,requiredFeatures:$n,requiredFonts:$n,requiredFormats:$n,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:$n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$n,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),u3=/^data[-\w.:]+$/i,Ey=/-[a-z]/g,l3=/[A-Z]/g;function c3(e,t){const n=ph(t);let r=t,o=rr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&u3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ey,f3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ey.test(a)){let u=a.replace(l3,d3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Eh}return new o(r,t)}function d3(e){return"-"+e.toLowerCase()}function f3(e){return e.charAt(1).toUpperCase()}const h3=uy([fy,dy,my,gy,s3],"html"),yy=uy([fy,dy,my,gy,a3],"svg"),by={}.hasOwnProperty;function Ty(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&by.call(o,e)){const d=String(o[e]);u=by.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const p3={},m3={}.hasOwnProperty,_y=Ty("type",{handlers:{root:E3,element:S3,text:T3,comment:_3,doctype:b3}});function g3(e,t){const r=(t||p3).space;return _y(e,r==="svg"?yy:h3)}function E3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=yh(e.children,n,t),ss(e,n),n}function y3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=yh(e.children,n,t),ss(e,n),n}function b3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ss(e,t),t}function T3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ss(e,t),t}function _3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ss(e,t),t}function S3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=yy);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&m3.call(e.properties,a)){const d=x3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:co[u],childNodes:[],parentNode:null};return c.childNodes=yh(e.children,c,r),ss(e,c),e.tagName==="template"&&e.content&&(c.content=y3(e.content,r)),c}function x3(e,t,n){const r=c3(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?L1(n):W1(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=co[r.space]}return o}function yh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=_y(e[r],n);a.parentNode=t,o.push(a)}return o}function ss(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 w3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],A3=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]),wt="�";var P;(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"})(P||(P={}));const On={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Sy(e){return e>=55296&&e<=57343}function C3(e){return e>=56320&&e<=57343}function v3(e,t){return(e-55296)*1024+9216+t}function xy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function wy(e){return e>=64976&&e<=65007||A3.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 k3=65536;class P3{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=k3,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(C3(n))return this.pos++,this._addGap(),v3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.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,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.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,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Sy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){xy(t)?this._err(ne.controlCharacterInInputStream):wy(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 Ke;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ke||(Ke={}));function Ay(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 N3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),O3=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 I3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=O3.get(e))!==null&&t!==void 0?t:e}var Qt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Qt||(Qt={}));const R3=32;var vi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(vi||(vi={}));function bh(e){return e>=Qt.ZERO&&e<=Qt.NINE}function L3(e){return e>=Qt.UPPER_A&&e<=Qt.UPPER_F||e>=Qt.LOWER_A&&e<=Qt.LOWER_F}function D3(e){return e>=Qt.UPPER_A&&e<=Qt.UPPER_Z||e>=Qt.LOWER_A&&e<=Qt.LOWER_Z||bh(e)}function M3(e){return e===Qt.EQUALS||D3(e)}var Jt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Jt||(Jt={}));var si;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(si||(si={}));class F3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Jt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=si.Strict}startEntity(t){this.decodeMode=t,this.state=Jt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Jt.EntityStart:return t.charCodeAt(n)===Qt.NUM?(this.state=Jt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Jt.NamedEntity,this.stateNamedEntity(t,n));case Jt.NumericStart:return this.stateNumericStart(t,n);case Jt.NumericDecimal:return this.stateNumericDecimal(t,n);case Jt.NumericHex:return this.stateNumericHex(t,n);case Jt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|R3)===Qt.LOWER_X?(this.state=Jt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Jt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(bh(o)||L3(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(bh(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Qt.SEMI)this.consumed+=1;else if(this.decodeMode===si.Strict)return 0;return this.emitCodePoint(I3(this.result),this.consumed),this.errors&&(t!==Qt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&vi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=B3(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===si.Attribute&&(a===0||M3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&vi.VALUE_LENGTH)>>14,a!==0){if(u===Qt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==si.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&vi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~vi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Jt.NamedEntity:return this.result!==0&&(this.decodeMode!==si.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Jt.NumericDecimal:return this.emitNumericEntity(0,2);case Jt.NumericHex:return this.emitNumericEntity(0,3);case Jt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Jt.EntityStart:return 0}}}function B3(e,t,n,r){const o=(t&vi.BRANCH_LENGTH)>>7,a=t&vi.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+o]}return-1}var ue;(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/"})(ue||(ue={}));var ho;(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"})(ho||(ho={}));var ir;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ir||(ir={}));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 U3=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 as(e){var t;return(t=U3.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const de=g,H3={[ue.HTML]:new Set([de.ADDRESS,de.APPLET,de.AREA,de.ARTICLE,de.ASIDE,de.BASE,de.BASEFONT,de.BGSOUND,de.BLOCKQUOTE,de.BODY,de.BR,de.BUTTON,de.CAPTION,de.CENTER,de.COL,de.COLGROUP,de.DD,de.DETAILS,de.DIR,de.DIV,de.DL,de.DT,de.EMBED,de.FIELDSET,de.FIGCAPTION,de.FIGURE,de.FOOTER,de.FORM,de.FRAME,de.FRAMESET,de.H1,de.H2,de.H3,de.H4,de.H5,de.H6,de.HEAD,de.HEADER,de.HGROUP,de.HR,de.HTML,de.IFRAME,de.IMG,de.INPUT,de.LI,de.LINK,de.LISTING,de.MAIN,de.MARQUEE,de.MENU,de.META,de.NAV,de.NOEMBED,de.NOFRAMES,de.NOSCRIPT,de.OBJECT,de.OL,de.P,de.PARAM,de.PLAINTEXT,de.PRE,de.SCRIPT,de.SECTION,de.SELECT,de.SOURCE,de.STYLE,de.SUMMARY,de.TABLE,de.TBODY,de.TD,de.TEMPLATE,de.TEXTAREA,de.TFOOT,de.TH,de.THEAD,de.TITLE,de.TR,de.TRACK,de.UL,de.WBR,de.XMP]),[ue.MATHML]:new Set([de.MI,de.MO,de.MN,de.MS,de.MTEXT,de.ANNOTATION_XML]),[ue.SVG]:new Set([de.TITLE,de.FOREIGN_OBJECT,de.DESC]),[ue.XLINK]:new Set,[ue.XML]:new Set,[ue.XMLNS]:new Set},Th=new Set([de.H1,de.H2,de.H3,de.H4,de.H5,de.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var I;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(I||(I={}));const Dt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function z3(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Ra(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function j3(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function ki(e){return j3(e)||Ra(e)}function Cy(e){return ki(e)||z3(e)}function Dl(e){return e+32}function vy(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function ky(e){return vy(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function $3(e){return e===P.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:Sy(e)?ne.surrogateCharacterReference:wy(e)?ne.noncharacterCharacterReference:xy(e)||e===P.CARRIAGE_RETURN?ne.controlCharacterReference:null}class V3{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new P3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new F3(N3,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ne.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ne.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=$3(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ke.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ke.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Ay(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ne.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=as(t.tagName),t.type===Ke.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 Ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ke.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ke.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=vy(t)?Ke.WHITESPACE_CHARACTER:t===P.NULL?Ke.NULL_CHARACTER:Ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?si.Attribute:si.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ki(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(ne.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ki(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(ne.missingEndTagName),this.state=I.DATA;break}case P.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(ne.unexpectedNullCharacter),n.tagName+=wt;break}case P.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ra(t)?Dl(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ki(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ki(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ki(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ki(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ki(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(On.SCRIPT,!1)&&ky(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(On.SCRIPT,!1)&&ky(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(ne.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(ne.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.name+=wt;break}default:this.currentAttr.name+=String.fromCodePoint(Ra(t)?Dl(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ne.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(ne.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=wt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(On.DASH_DASH,!0)?(this._createCommentToken(On.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(On.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(On.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(On.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(On.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ne.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=wt;break}case P.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 P.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(ne.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case P.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(ne.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ra(t))this._createDoctypeToken(String.fromCharCode(Dl(t))),this.state=I.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(ne.unexpectedNullCharacter),this._createDoctypeToken(wt),this.state=I.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(ne.unexpectedNullCharacter),n.name+=wt;break}case P.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ra(t)?Dl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(On.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(On.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ne.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.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 P.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.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 P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.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 P.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.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 P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.NULL:{this._err(ne.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(ne.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Cy(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Cy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Py=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Ny=new Set([...Py,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Ml=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),q3=new Set([...Ml,g.OL,g.UL]),Y3=new Set([...Ml,g.BUTTON]),Oy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Iy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),W3=new Set([g.TR,g.TEMPLATE,g.HTML]),G3=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),X3=new Set([g.TABLE,g.TEMPLATE,g.HTML]),K3=new Set([g.TD,g.TH]);class Q3{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)===ue.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==ue.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(Th,ue.HTML)}popUntilTableCellPopped(){this.popUntilPopped(K3,ue.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(X3,ue.HTML)}clearBackToTableBodyContext(){this.clearBackTo(G3,ue.HTML)}clearBackToTableRowContext(){this.clearBackTo(W3,ue.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 o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ue.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ue.SVG:{if(Iy.has(o))return!1;break}case ue.MATHML:{if(Oy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ml)}hasInListItemScope(t){return this.hasInDynamicScope(t,q3)}hasInButtonScope(t){return this.hasInDynamicScope(t,Y3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ue.HTML:{if(Th.has(n))return!0;if(Ml.has(n))return!1;break}case ue.SVG:{if(Iy.has(n))return!1;break}case ue.MATHML:{if(Oy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ue.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])===ue.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])===ue.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&&Py.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ny.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ny.has(this.currentTagId);)this.pop()}}const _h=3;var Dr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Dr||(Dr={}));const Ry={type:Dr.Marker};class J3{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Dr.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===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<_h)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<_h)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=_h&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Ry)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Dr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Dr.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(Ry);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Dr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Dr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Dr.Element&&n.element===t)}}const Pi={createDocument(){return{nodeName:"#document",mode:ir.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Pi.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(Pi.isTextNode(n)){n.value+=t;return}}Pi.appendChild(e,Pi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Pi.isTextNode(r)?r.value+=t:Pi.insertBefore(e,Pi.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=M(M({},e.sourceCodeLocation),t)}},Ly="html",Z3="about:legacy-compat",eR="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Dy=["+//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//"],tR=[...Dy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],nR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),My=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],rR=[...My,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Fy(e,t){return t.some(n=>e.startsWith(n))}function iR(e){return e.name===Ly&&e.publicId===null&&(e.systemId===null||e.systemId===Z3)}function oR(e){if(e.name!==Ly)return ir.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===eR)return ir.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),nR.has(n))return ir.QUIRKS;let r=t===null?tR:Dy;if(Fy(n,r))return ir.QUIRKS;if(r=t===null?My:rR,Fy(n,r))return ir.LIMITED_QUIRKS}return ir.NO_QUIRKS}const By={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},sR="definitionurl",aR="definitionURL",uR=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])),lR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ue.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ue.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ue.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ue.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ue.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ue.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ue.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ue.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ue.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ue.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ue.XMLNS}]]),cR=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])),dR=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 fR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ho.COLOR||r===ho.SIZE||r===ho.FACE)||dR.has(t)}function Uy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===sR){e.attrs[t].name=aR;break}}function Hy(e){for(let t=0;t<e.attrs.length;t++){const n=uR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Sh(e){for(let t=0;t<e.attrs.length;t++){const n=lR.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 hR(e){const t=cR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=as(e.tagName))}function pR(e,t){return t===ue.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function mR(e,t,n){if(t===ue.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ho.ENCODING){const o=n[r].value.toLowerCase();return o===By.TEXT_HTML||o===By.APPLICATION_XML}}return t===ue.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function gR(e,t,n,r){return(!r||r===ue.HTML)&&mR(e,t,n)||(!r||r===ue.MATHML)&&pR(e,t)}const ER="hidden",yR=8,bR=3;var L;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(L||(L={}));const TR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},zy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),jy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Pi,onParseError:null};class $y{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=M(M({},jy),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 V3(this.options,this),this.activeFormattingElements=new J3(this.treeAdapter),this.fragmentContextID=r?as(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new Q3(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=M(M({},jy),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,ue.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ue.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(L.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:TR,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ue.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ue.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=Dt.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)!==ue.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Dt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Dt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Dt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Dt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&pe(M({},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,ue.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ue.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,ue.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol: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,o=this.treeAdapter.getTagName(t),a=n.type===Ke.END_TAG&&o===n.tagName?{endTag:M({},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)===ue.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ue.HTML)}_processToken(t){switch(t.type){case Ke.CHARACTER:{this.onCharacter(t);break}case Ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ke.COMMENT:{this.onComment(t);break}case Ke.DOCTYPE:{this.onDoctype(t);break}case Ke.START_TAG:{this._processStartTag(t);break}case Ke.END_TAG:{this.onEndTag(t);break}case Ke.EOF:{this.onEof(t);break}case Ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return gR(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Dr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=L.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(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=L.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=L.IN_TABLE;return}case g.BODY:{this.insertionMode=L.IN_BODY;return}case g.FRAMESET:{this.insertionMode=L.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?L.AFTER_HEAD:L.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return zy.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)===ue.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 H3[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){KL(this,t);return}switch(this.insertionMode){case L.INITIAL:{La(this,t);break}case L.BEFORE_HTML:{Da(this,t);break}case L.BEFORE_HEAD:{Ma(this,t);break}case L.IN_HEAD:{Fa(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Ba(this,t);break}case L.AFTER_HEAD:{Ua(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{qy(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_TABLE_TEXT:{Zy(this,t);break}case L.IN_COLUMN_GROUP:{Ul(this,t);break}case L.AFTER_BODY:{jl(this,t);break}case L.AFTER_AFTER_BODY:{$l(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){XL(this,t);return}switch(this.insertionMode){case L.INITIAL:{La(this,t);break}case L.BEFORE_HTML:{Da(this,t);break}case L.BEFORE_HEAD:{Ma(this,t);break}case L.IN_HEAD:{Fa(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Ba(this,t);break}case L.AFTER_HEAD:{Ua(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_COLUMN_GROUP:{Ul(this,t);break}case L.AFTER_BODY:{jl(this,t);break}case L.AFTER_AFTER_BODY:{$l(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){wh(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{wh(this,t);break}case L.IN_TABLE_TEXT:{ja(this,t);break}case L.AFTER_BODY:{vR(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{kR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{PR(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,ne.misplacedDoctype);break}case L.IN_TABLE_TEXT:{ja(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)?QL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{La(this,t);break}case L.BEFORE_HTML:{NR(this,t);break}case L.BEFORE_HEAD:{IR(this,t);break}case L.IN_HEAD:{Er(this,t);break}case L.IN_HEAD_NO_SCRIPT:{DR(this,t);break}case L.AFTER_HEAD:{FR(this,t);break}case L.IN_BODY:{mn(this,t);break}case L.IN_TABLE:{us(this,t);break}case L.IN_TABLE_TEXT:{ja(this,t);break}case L.IN_CAPTION:{RL(this,t);break}case L.IN_COLUMN_GROUP:{vh(this,t);break}case L.IN_TABLE_BODY:{Hl(this,t);break}case L.IN_ROW:{zl(this,t);break}case L.IN_CELL:{ML(this,t);break}case L.IN_SELECT:{nb(this,t);break}case L.IN_SELECT_IN_TABLE:{BL(this,t);break}case L.IN_TEMPLATE:{HL(this,t);break}case L.AFTER_BODY:{jL(this,t);break}case L.IN_FRAMESET:{$L(this,t);break}case L.AFTER_FRAMESET:{qL(this,t);break}case L.AFTER_AFTER_BODY:{WL(this,t);break}case L.AFTER_AFTER_FRAMESET:{GL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?JL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{La(this,t);break}case L.BEFORE_HTML:{OR(this,t);break}case L.BEFORE_HEAD:{RR(this,t);break}case L.IN_HEAD:{LR(this,t);break}case L.IN_HEAD_NO_SCRIPT:{MR(this,t);break}case L.AFTER_HEAD:{BR(this,t);break}case L.IN_BODY:{Bl(this,t);break}case L.TEXT:{xL(this,t);break}case L.IN_TABLE:{Ha(this,t);break}case L.IN_TABLE_TEXT:{ja(this,t);break}case L.IN_CAPTION:{LL(this,t);break}case L.IN_COLUMN_GROUP:{DL(this,t);break}case L.IN_TABLE_BODY:{kh(this,t);break}case L.IN_ROW:{tb(this,t);break}case L.IN_CELL:{FL(this,t);break}case L.IN_SELECT:{rb(this,t);break}case L.IN_SELECT_IN_TABLE:{UL(this,t);break}case L.IN_TEMPLATE:{zL(this,t);break}case L.AFTER_BODY:{ob(this,t);break}case L.IN_FRAMESET:{VL(this,t);break}case L.AFTER_FRAMESET:{YL(this,t);break}case L.AFTER_AFTER_BODY:{$l(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{La(this,t);break}case L.BEFORE_HTML:{Da(this,t);break}case L.BEFORE_HEAD:{Ma(this,t);break}case L.IN_HEAD:{Fa(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Ba(this,t);break}case L.AFTER_HEAD:{Ua(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{Qy(this,t);break}case L.TEXT:{wL(this,t);break}case L.IN_TABLE_TEXT:{ja(this,t);break}case L.IN_TEMPLATE:{ib(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{Ah(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{Vy(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_TABLE_TEXT:{Jy(this,t);break}}}}function _R(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Ky(e,t),n}function SR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function xR(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=bR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=wR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function wR(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function AR(e,t,n){const r=e.treeAdapter.getTagName(t),o=as(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===ue.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function CR(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function xh(e,t){for(let n=0;n<yR;n++){const r=_R(e,t);if(!r)break;const o=SR(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=xR(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&AR(e,u,a),CR(e,o,r)}}function wh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function vR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function kR(e,t){e._appendCommentNode(t,e.document)}function Ah(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function PR(e,t){e._setDocumentType(t);const n=t.forceQuirks?ir.QUIRKS:oR(t);iR(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function La(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ir.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function NR(e,t){t.tagID===g.HTML?(e._insertElement(t,ue.HTML),e.insertionMode=L.BEFORE_HEAD):Da(e,t)}function OR(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=L.BEFORE_HEAD,e._processToken(t)}function IR(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.HEAD:{e._insertElement(t,ue.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Ma(e,t)}}function RR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Ma(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Ma(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function Er(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Dt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Dt.RAWTEXT):(e._insertElement(t,ue.HTML),e.insertionMode=L.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Dt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Dt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:Fa(e,t)}}function LR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Fa(e,t);break}case g.TEMPLATE:{po(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function po(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 Fa(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function DR(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Er(e,t);break}case g.NOSCRIPT:{e._err(t,ne.nestedNoscriptInHead);break}default:Ba(e,t)}}function MR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case g.BR:{Ba(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Ba(e,t){const n=t.type===Ke.EOF?ne.openElementsLeftAfterEof:ne.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function FR(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.BODY:{e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ue.HTML),e.insertionMode=L.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),Er(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:Ua(e,t)}}function BR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ua(e,t);break}case g.TEMPLATE:{po(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Ua(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=L.IN_BODY,Fl(e,t)}function Fl(e,t){switch(t.type){case Ke.CHARACTER:{qy(e,t);break}case Ke.WHITESPACE_CHARACTER:{Vy(e,t);break}case Ke.COMMENT:{wh(e,t);break}case Ke.START_TAG:{mn(e,t);break}case Ke.END_TAG:{Bl(e,t);break}case Ke.EOF:{Qy(e,t);break}}}function Vy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function qy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function UR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function HR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function zR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ue.HTML),e.insertionMode=L.IN_FRAMESET)}function jR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML)}function $R(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Th.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ue.HTML)}function VR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function qR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),n||(e.formElement=e.openElements.current))}function YR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===g.LI&&o===g.LI||(n===g.DD||n===g.DT)&&(o===g.DD||o===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==g.ADDRESS&&o!==g.DIV&&o!==g.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML)}function WR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.tokenizer.state=Dt.PLAINTEXT}function GR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.framesetOk=!1}function XR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(xh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function KR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function QR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(xh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function JR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function ZR(e,t){e.treeAdapter.getDocumentMode(e.document)!==ir.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function Yy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ue.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Wy(e){const t=Ay(e,ho.TYPE);return t!=null&&t.toLowerCase()===ER}function eL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ue.HTML),Wy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function tL(e,t){e._appendElement(t,ue.HTML),t.ackSelfClosing=!0}function nL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ue.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function rL(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Yy(e,t)}function iL(e,t){e._insertElement(t,ue.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Dt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function oL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Dt.RAWTEXT)}function sL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Dt.RAWTEXT)}function Gy(e,t){e._switchToTextParsing(t,Dt.RAWTEXT)}function aL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function uL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML)}function lL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ue.HTML)}function cL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ue.HTML)}function dL(e,t){e._reconstructActiveFormattingElements(),Uy(t),Sh(t),t.selfClosing?e._appendElement(t,ue.MATHML):e._insertElement(t,ue.MATHML),t.ackSelfClosing=!0}function fL(e,t){e._reconstructActiveFormattingElements(),Hy(t),Sh(t),t.selfClosing?e._appendElement(t,ue.SVG):e._insertElement(t,ue.SVG),t.ackSelfClosing=!0}function Xy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML)}function mn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{KR(e,t);break}case g.A:{XR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{$R(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:{jR(e,t);break}case g.LI:case g.DD:case g.DT:{YR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Yy(e,t);break}case g.HR:{nL(e,t);break}case g.RB:case g.RTC:{lL(e,t);break}case g.RT:case g.RP:{cL(e,t);break}case g.PRE:case g.LISTING:{VR(e,t);break}case g.XMP:{oL(e,t);break}case g.SVG:{fL(e,t);break}case g.HTML:{UR(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:{Er(e,t);break}case g.BODY:{HR(e,t);break}case g.FORM:{qR(e,t);break}case g.NOBR:{QR(e,t);break}case g.MATH:{dL(e,t);break}case g.TABLE:{ZR(e,t);break}case g.INPUT:{eL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{tL(e,t);break}case g.IMAGE:{rL(e,t);break}case g.BUTTON:{GR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{JR(e,t);break}case g.IFRAME:{sL(e,t);break}case g.SELECT:{aL(e,t);break}case g.OPTION:case g.OPTGROUP:{uL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Gy(e,t);break}case g.FRAMESET:{zR(e,t);break}case g.TEXTAREA:{iL(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Gy(e,t):Xy(e,t);break}case g.PLAINTEXT:{WR(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:Xy(e,t)}}function hL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function pL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=L.AFTER_BODY,ob(e,t))}function mL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function gL(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 EL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function yL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function bL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function TL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function _L(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function SL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Ky(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Bl(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:{xh(e,t);break}case g.P:{EL(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:{mL(e,t);break}case g.LI:{yL(e);break}case g.DD:case g.DT:{bL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{TL(e);break}case g.BR:{SL(e);break}case g.BODY:{hL(e,t);break}case g.HTML:{pL(e,t);break}case g.FORM:{gL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{_L(e,t);break}case g.TEMPLATE:{po(e,t);break}default:Ky(e,t)}}function Qy(e,t){e.tmplInsertionModeStack.length>0?ib(e,t):Ah(e,t)}function xL(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 wL(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ch(e,t){if(e.openElements.currentTagId!==void 0&&zy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{Zy(e,t);break}case Ke.WHITESPACE_CHARACTER:{Jy(e,t);break}}else za(e,t)}function AL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ue.HTML),e.insertionMode=L.IN_CAPTION}function CL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ue.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function vL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,vh(e,t)}function kL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ue.HTML),e.insertionMode=L.IN_TABLE_BODY}function PL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=L.IN_TABLE_BODY,Hl(e,t)}function NL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function OL(e,t){Wy(t)?e._appendElement(t,ue.HTML):za(e,t),t.ackSelfClosing=!0}function IL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ue.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function us(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{PL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Er(e,t);break}case g.COL:{vL(e,t);break}case g.FORM:{IL(e,t);break}case g.TABLE:{NL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{kL(e,t);break}case g.INPUT:{OL(e,t);break}case g.CAPTION:{AL(e,t);break}case g.COLGROUP:{CL(e,t);break}default:za(e,t)}}function Ha(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{po(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:za(e,t)}}function za(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Fl(e,t),e.fosterParentingEnabled=n}function Jy(e,t){e.pendingCharacterTokens.push(t)}function Zy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ja(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)za(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const eb=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function RL(e,t){const n=t.tagID;eb.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,us(e,t)):mn(e,t)}function LL(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=L.IN_TABLE,n===g.TABLE&&Ha(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:Bl(e,t)}}function vh(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.COL:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Er(e,t);break}default:Ul(e,t)}}function DL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case g.TEMPLATE:{po(e,t);break}case g.COL:break;default:Ul(e,t)}}function Ul(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function Hl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ue.HTML),e.insertionMode=L.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=L.IN_ROW,zl(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=L.IN_TABLE,us(e,t));break}default:us(e,t)}}function kh(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=L.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Ha(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:Ha(e,t)}}function zl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ue.HTML),e.insertionMode=L.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=L.IN_TABLE_BODY,Hl(e,t));break}default:us(e,t)}}function tb(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,kh(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=L.IN_TABLE_BODY,kh(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:Ha(e,t)}}function ML(e,t){const n=t.tagID;eb.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),zl(e,t)):mn(e,t)}function FL(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=L.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),tb(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Bl(e,t)}}function nb(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,ue.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ue.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ue.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:{Er(e,t);break}}}function rb(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:{po(e,t);break}}}function BL(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)):nb(e,t)}function UL(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)):rb(e,t)}function HL(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:{Er(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,us(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,vh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,Hl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,zl(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,mn(e,t)}}function zL(e,t){t.tagID===g.TEMPLATE&&po(e,t)}function ib(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ah(e,t)}function jL(e,t){t.tagID===g.HTML?mn(e,t):jl(e,t)}function ob(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=L.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 jl(e,t)}function jl(e,t){e.insertionMode=L.IN_BODY,Fl(e,t)}function $L(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.FRAMESET:{e._insertElement(t,ue.HTML);break}case g.FRAME:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Er(e,t);break}}}function VL(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function qL(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.NOFRAMES:{Er(e,t);break}}}function YL(e,t){t.tagID===g.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function WL(e,t){t.tagID===g.HTML?mn(e,t):$l(e,t)}function $l(e,t){e.insertionMode=L.IN_BODY,Fl(e,t)}function GL(e,t){switch(t.tagID){case g.HTML:{mn(e,t);break}case g.NOFRAMES:{Er(e,t);break}}}function XL(e,t){t.chars=wt,e._insertCharacters(t)}function KL(e,t){e._insertCharacters(t),e.framesetOk=!1}function sb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ue.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function QL(e,t){if(fR(t))sb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ue.MATHML?Uy(t):r===ue.SVG&&(hR(t),Hy(t)),Sh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function JL(e,t){if(t.tagID===g.P||t.tagID===g.BR){sb(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)===ue.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,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 ZL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,e6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ab={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function ub(e,t){const n=c6(e),r=Ty("type",{handlers:{root:t6,element:n6,text:r6,comment:cb,doctype:i6,raw:s6},unknown:a6}),o={parser:n?new $y(ab):$y.getFragmentParser(void 0,ab),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),ls(o,Rr());const a=n?o.parser.document:o.parser.getFragment(),u=t3(a,{file:o.options.file});return o.stitches&&Il(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 lb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function t6(e,t){lb(e.children,t)}function n6(e,t){u6(e,t),lb(e.children,t),l6(e,t)}function r6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:$a(e)};ls(t,Rr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function i6(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:$a(e)};ls(t,Rr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function o6(e,t){t.stitches=!0;const n=d6(e);if("children"in e&&"children"in n){const r=ub({type:"root",children:e.children},t.options);n.children=r.children}cb({type:"comment",value:{stitch:n}},t)}function cb(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:$a(e)};ls(t,Rr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function s6(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,db(t,Rr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ZL,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function a6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))o6(n,t);else{let r="";throw e6.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 ls(e,t){db(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=Dt.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 db(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 u6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Dt.PLAINTEXT)return;ls(t,Rr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:co.html;o===co.html&&n==="svg"&&(o=co.svg);const a=g3(pe(M({},e),{children:[]}),{space:o===co.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:as(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:$a(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function l6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&w3.includes(n)||t.parser.tokenizer.state===Dt.PLAINTEXT)return;ls(t,_l(e));const r={type:Ke.END_TAG,tagName:n,tagID:as(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:$a(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Dt.RCDATA||t.parser.tokenizer.state===Dt.RAWTEXT||t.parser.tokenizer.state===Dt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Dt.DATA)}function c6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function $a(e){const t=Rr(e)||{line:void 0,column:void 0,offset:void 0},n=_l(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 d6(e){return"children"in e?lo(pe(M({},e),{children:[]})):lo(e)}function fb(e){return function(t,n){return ub(t,pe(M({},e),{file:n}))}}const mo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],hb={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...mo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...mo],h2:[["className","sr-only"]],img:[...mo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...mo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...mo],table:[...mo],ul:[...mo,["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"]},Ni={}.hasOwnProperty;function f6(e,t){let n={type:"root",children:[]};const r={schema:t?M(M({},hb),t):hb,stack:[]},o=pb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function pb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return h6(e,n);case"doctype":return p6(e,n);case"element":return m6(e,n);case"root":return g6(e,n);case"text":return E6(e,n)}}}function h6(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 Va(a,t),a}}function p6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Va(n,t),n}}function m6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=mb(e,t.children),o=y6(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&&Ni.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Va(u,t),u}function g6(e,t){const r={type:"root",children:mb(e,t.children)};return Va(r,t),r}function E6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Va(r,t),r}function mb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=pb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function y6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ni.call(r,n)?r[n]:void 0,u=r&&Ni.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ni.call(c,f)){const p=c[f];let m=gb(e,yb(a,f),f,p);m==null&&(m=gb(e,yb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Ni.call(o,n)){const p=o[n];for(f in p)Ni.call(p,f)&&!Ni.call(d,f)&&(d[f]=p[f])}return d}function gb(e,t,n,r){return t?Array.isArray(r)?b6(e,t,n,r):Eb(e,t,n,r):void 0}function b6(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Eb(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Eb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&T6(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function T6(e,t,n){const r=e.schema.protocols&&Ni.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function Va(e,t){const n=Z1(t);t.data&&(e.data=lo(t.data)),n&&(e.position=n)}function yb(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function _6(e){return function(t){return f6(t,e)}}const bb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",pe(M(M({className:G(e,`${z}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},S6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=nt();return!e&&!t?null:w.jsx("div",{className:G(n,`${z}-disclaimer`),children:t?w.jsx(ey,{rehypePlugins:[fb,_6],components:{ul:({children:r})=>w.jsx("ul",{className:G(n,`${z}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:G(n,`${z}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:G(n,`${z}-li`),children:r}),a:({href:r,title:o,children:a})=>w.jsx(bb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>w.jsx("img",{className:G(n,`${z}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>w.jsx("p",{className:G(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:G(n,`${z}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:G(n,`${z}-disclaimer-text`),children:e})})},Ph=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=tr(),{setImageFile:u}=Wo(),{logger:c,globalClassName:d,searchConfig:f,features:p}=nt(),m=B.useRef(null),T=B.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",S=!!o||!1,A=S?"connected":"disconnected",C=t||!S,N=()=>a?new Promise((F,q)=>{const ie=new FileReader;ie.readAsDataURL(a),ie.onload=()=>F(ie.result),ie.onerror=ge=>q(ge)}):Promise.resolve(""),k=F=>et(null,null,function*(){var ge;if(C)return;const q=10*1024*1024,ie=(ge=F.target.files)==null?void 0:ge[0];if(ie){if(ie.size>q){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ie)}}),H=()=>{u(null),T.current&&(T.current.value="")},V=F=>et(null,null,function*(){var ge;F.preventDefault();const q=(((ge=m.current)==null?void 0:ge.value)||"").trim();let ie="";try{ie=yield N()}catch($){c==null||c.error("Error converting file to base64:",$),alert("There was an error processing the file. Please try again.");return}q&&(H(),m.current.value="",r(q,ie))});return w.jsxs("div",{className:G(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&w.jsxs("div",{className:G(d,`cim-${n}-component`,`${z}-image-file-preview`),children:[w.jsx("img",{className:G(d,`cim-${n}-component`,`${z}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),w.jsx("span",{className:G(d,`cim-${n}-component`,`${z}-image-file-name`),title:_,children:_}),w.jsx(I1,{className:G(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:H})]}),w.jsxs("form",{className:G(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:V,children:[w.jsx("span",{role:"status",className:G(`${z}-connection-status-icon`,A)}),y&&w.jsxs("div",{role:"button",className:G(d,e,`cim-${n}-component`,C&&"disabled",`${z}-image-upload-button`),"aria-disabled":C,tabIndex:0,children:[w.jsx("label",{className:G(d,e,`cim-${n}-component`,C&&"disabled",`${z}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:w.jsx(Bk,{})}),w.jsx("input",{className:G(d,e,`cim-${n}-component`,`${z}-file-input`),type:"file",ref:T,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${z}-file-input`,disabled:C,onInput:k})]}),w.jsx("input",{className:G(d,e,`cim-${n}-component`,`${z}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,name:`${z}-user-input`}),w.jsx(Vk,{isLoading:C}),w.jsx(zk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:C})]}),w.jsx(S6,{})]})};function x6(e){return kt({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 Tb=B.createContext({isOpen:!1}),Nh=B.createContext(null),_b=B.createContext(null),qa=()=>{var n,r;const e=B.useContext(Nh),t=B.useContext(_b);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Sb=({onClearChat:e,componentType:t})=>{const n=qa(),r=()=>{e(),n()};return w.jsxs("button",{className:G(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(x6,{}),"Clear chat"]})};function w6(e){return e==null?[]:Array.isArray(e)?e:[e]}var A6=(e,...t)=>e.concat(t),C6=(e,...t)=>e.filter(n=>!t.includes(n)),v6=e=>Array.from(new Set(e));function xb(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function k6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return xb(e,t,{step:-r,loop:o})}var P6=e=>Array.isArray(e),wb=e=>e!=null&&typeof e=="object",N6=e=>wb(e)&&!P6(e),Vl=e=>typeof e=="string",cs=e=>typeof e=="function",O6=e=>e==null,I6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),R6=e=>Object.prototype.toString.call(e),Ab=Function.prototype.toString,L6=Ab.call(Object),D6=e=>{if(!wb(e)||R6(e)!="[object Object]"||B6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=I6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ab.call(n)==L6},M6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,F6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,B6=e=>M6(e)||F6(e),U6=e=>e(),H6=()=>{},Oh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function z6(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:j6,max:$6}=Math,V6=e=>Number.isNaN(e),q6=e=>V6(e)?0:e,Cb=(e,t,n)=>j6($6(q6(e),t),n);function Ih(e){if(!D6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Ih(o))}return n}function Rh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function Y6(e,t){if(e==null)throw new Error(t())}function W6(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var G6=Object.defineProperty,X6=(e,t,n)=>t in e?G6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lh=(e,t,n)=>X6(e,typeof t!="symbol"?t+"":t,n),vb=()=>{},ql=e=>typeof e=="object"&&e!==null,ds=e=>e?"":void 0,kb=e=>e?"true":void 0,K6=1,Q6=9,J6=11,Zt=e=>ql(e)&&e.nodeType===K6&&typeof e.nodeName=="string",Yl=e=>ql(e)&&e.nodeType===Q6,Z6=e=>ql(e)&&e===e.window,Pb=e=>Zt(e)?e.localName||"":"#document";function e4(e){return["html","body","#document"].includes(Pb(e))}var t4=e=>ql(e)&&e.nodeType!==void 0,go=e=>t4(e)&&e.nodeType===J6&&"host"in e,n4=e=>Zt(e)&&e.localName==="input",r4=e=>Zt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ya(e){if(!e)return!1;const t=e.getRootNode();return ps(t)===e}var i4=/(textarea|select)/;function o4(e){if(e==null||!Zt(e))return!1;try{return n4(e)&&e.selectionStart!=null||i4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function fs(e,t){var r;if(!e||!t||!Zt(e)||!Zt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&go(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Mr(e){var t;return Yl(e)?e:Z6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function s4(e){return Mr(e).documentElement}function hs(e){var t,n,r;return go(e)?hs(e.host):Yl(e)?(t=e.defaultView)!=null?t:window:Zt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ps(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 a4(e){if(Pb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||go(e)&&e.host||s4(e);return go(t)?t.host:t}function Dh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Yl(t)||go(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Mh=new WeakMap;function ms(e){return Mh.has(e)||Mh.set(e,hs(e).getComputedStyle(e)),Mh.get(e)}var Fh=new Set(["menu","listbox","dialog","grid","tree","region"]),u4=e=>Fh.has(e),Nb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Ob(e,t){const n=new Set,r=Dh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Nb(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&&u4(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Ib(e,t){const n=Dh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Nb(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&&Fh.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function l4(e){const t=new Set;return Ib(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function c4(e){const t=e.getAttribute("role");return!!(t&&Fh.has(t))}function d4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function f4(e){var t;return d4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function h4(e){if(!e.id)return!1;const t=Dh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&c4(e))}var Bh=()=>typeof document!="undefined";function p4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Uh=e=>Bh()&&e.test(p4()),m4=e=>Bh()&&e.test(navigator.vendor),Rb=()=>Bh()&&!!navigator.maxTouchPoints,g4=()=>Uh(/^iPhone/i),E4=()=>Uh(/^iPad/i)||Hh()&&navigator.maxTouchPoints>1,Wl=()=>g4()||E4(),y4=()=>Hh()||Wl(),Hh=()=>Uh(/^Mac/i),b4=()=>y4()&&m4(/apple/i);function T4(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function yr(e){var n;const t=T4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Lb=e=>e.button===0,_4=e=>e.button===2||Hh()&&e.ctrlKey&&e.button===0,S4=e=>"touches"in e&&e.touches.length>0,x4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Db={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function w4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=x4[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in Db&&(o=Db[o]),o}function Mb(e,t="client"){const n=S4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var en=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},Fb=e=>Zt(e)&&e.tagName==="IFRAME",A4=/^(audio|video|details)$/;function Bb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var C4=e=>!Number.isNaN(Bb(e)),v4=e=>Bb(e)<0;function k4(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 Ub(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const f=k4(d,t);if(f){const p=Array.from(f.querySelectorAll(Gl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,_)=>{u.set(y,T+_)});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,_)=>{u.set(y,T+_)})}o.push(...p)}}return r}var Gl="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",Hb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Gl));(n==!0||n=="if-empty"&&o.length===0)&&Zt(e)&&Fr(e)&&o.unshift(e);const u=[];for(const c of o)if(Fr(c)){if(Fb(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Hb(d,{getShadowRoot:r}));continue}u.push(c)}return r?Ub(u,r,Fr):u};function Fr(e){return!Zt(e)||e.closest("[inert]")?!1:e.matches(Gl)&&r4(e)}function gs(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Gl));n&&Eo(e)&&o.unshift(e);const a=[];for(const u of o)if(Eo(u)){if(Fb(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...gs(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Ub(a,r,Eo);return!u.length&&n?o:u}return!a.length&&n?o:a}function Eo(e){return Zt(e)&&e.tabIndex>0?!0:Fr(e)&&!v4(e)}function P4(e,t={}){const n=gs(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function N4(e,t={}){const{current:n,getShadowRoot:r}=t,o=gs(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:ps(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Wa(e){return e.tabIndex<0&&(A4.test(e.localName)||o4(e))&&!C4(e)?0:e.tabIndex}function zb(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=gs(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var O4=class Y2{constructor(){Lh(this,"id",null),Lh(this,"fn_cleanup"),Lh(this,"cleanup",()=>{this.cancel()})}static create(){return new Y2}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 Vt(e){const t=O4.create();return t.request(e),t.cleanup}function jb(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function zh(e){const t=a4(e);return e4(t)?Mr(t).body:Zt(t)&&L4(t)?t:zh(t)}var I4=/auto|scroll|overlay|hidden|clip/,R4=new Set(["inline","contents"]);function L4(e){const t=hs(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return I4.test(n+o+r)&&!R4.has(a)}var Es="default",jh="",Xl=new WeakMap;function D4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Wl()?(Es==="default"&&(jh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Es="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,o=(n!=null?n:document).documentElement;if(Wl()){if(Es!=="disabled")return;Es="restoring",setTimeout(()=>{jb(()=>{Es==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=jh||""),jh="",Es="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 F4(e={}){const u=e,{defer:t,target:n}=u,r=cn(u,["defer","target"]),o=t?Vt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(D4(pe(M({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function B4(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=Mb(c),f=Math.sqrt(ta(d.x,2)+ta(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=Mb(c);r({point:d,event:c})},u=[en(e,"pointermove",o,!1),en(e,"pointerup",a,!1),en(e,"pointercancel",a,!1),en(e,"contextmenu",a,!1),F4({doc:e})];return()=>{u.forEach(c=>c())}}function U4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=P4(e,{includeContainer:!0,getShadowRoot:a}),y=N4(c,{current:n,getShadowRoot:a}),_=!m&&!T;f.shiftKey&&Ya(y)?(o==null||o(),p=T):f.shiftKey&&(Ya(m)||_)?p=n:!f.shiftKey&&Ya(n)?(o==null||o(),p=m):!f.shiftKey&&(Ya(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return en(u,"keydown",d,!0)}function H4(e,t){const c=t,{defer:n,triggerElement:r}=c,o=cn(c,["defer","triggerElement"]),a=n?Vt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(U4(d,M({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function z4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Kl(e,t){if(!e)return vb;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function j4(e,t,n){if(!e)return vb;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 $4(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 V4(e,t){const{timeout:n,rootNode:r}=t,o=hs(r),a=Mr(r),u=new o.AbortController;return $4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var q4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),Y4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,$b=e=>{const t={};let n;for(;n=Y4.exec(e);)t[n[1]]=n[2];return t},W4=(e,t)=>{if(Vl(e)){if(Vl(t))return`${e};${t}`;e=$b(e)}else Vl(t)&&(t=$b(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function qt(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Oh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=q4(t[o],n[o]);continue}if(o==="style"){t[o]=W4(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function PU(e){return e}var ys=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(ys||{}),$h="__init__";function G4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Mr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>ps(t()),a=u=>t().getElementById(u);return pe(M({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Ya,getById:a})}function X4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var bs=()=>e=>Array.from(new Set(e)),Vb=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Ql(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=B.useState(t),[o,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(o);c.current=u?e().value:o;const d=B.useRef(c.current);Vb(()=>{d.current=c.current},[o,e().value]);const f=y=>{var A,C;const _=d.current,S=cs(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),u||a(S),n(S,_)||(C=(A=e()).onChange)==null||C.call(A,S,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Go.flushSync:U6)(()=>f(y))},invoke(y,_){var S,A;(A=(S=e()).onChange)==null||A.call(S,y,_)},hash(y){var _,S,A;return(A=(S=(_=e()).hash)==null?void 0:S.call(_,y))!=null?A:String(y)}}}Ql.cleanup=e=>{B.useEffect(()=>e,[])},Ql.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function K4(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var Q4=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Jl(e,t={}){var oe,ce,fe,te,be,ve;const n=B.useMemo(()=>{const{id:se,ids:Q,getRootNode:re}=t;return G4({id:se,ids:Q,getRootNode:re})},[t]),r=(...se)=>{e.debug&&console.log(...se)},o=(ce=(oe=e.props)==null?void 0:oe.call(e,{props:Ih(t),scope:n}))!=null?ce:t,a=J4(o),u=(fe=e.context)==null?void 0:fe.call(e,{prop:a,bindable:Ql,scope:n,flush:Yb,getContext(){return d},getComputed(){return V},getRefs(){return S},getEvent(){return y()}}),c=qb(u),d={get(se){var Q;return(Q=c.current)==null?void 0:Q[se].ref.current},set(se,Q){var re;(re=c.current)==null||re[se].set(Q)},initial(se){var Q;return(Q=c.current)==null?void 0:Q[se].initial},hash(se){var re,v;const Q=(re=c.current)==null?void 0:re[se].get();return(v=c.current)==null?void 0:v[se].hash(Q)}},f=B.useRef(new Map),p=B.useRef(null),m=B.useRef(null),T=B.useRef({type:""}),y=()=>pe(M({},T.current),{current(){return T.current},previous(){return m.current}}),_=()=>pe(M({},F),{matches(...se){return se.includes(F.ref.current)},hasTag(se){var Q,re;return!!((re=(Q=e.states[F.ref.current])==null?void 0:Q.tags)!=null&&re.includes(se))}}),S=K4((be=(te=e.refs)==null?void 0:te.call(e,{prop:a,context:d}))!=null?be:{}),A=()=>({state:_(),context:d,event:y(),prop:a,send:$,action:C,guard:N,track:Q4,refs:S,computed:V,flush:Yb,scope:n,choose:H}),C=se=>{const Q=cs(se)?se(A()):se;if(!Q)return;const re=Q.map(v=>{var ee,O;const D=(O=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:O[v];return D||Rh(`[zag-js] No implementation found for action "${JSON.stringify(v)}"`),D});for(const v of re)v==null||v(A())},N=se=>{var Q,re;return cs(se)?se(A()):(re=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:re[se](A())},k=se=>{const Q=cs(se)?se(A()):se;if(!Q)return;const re=Q.map(D=>{var O,_e;const ee=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[D];return ee||Rh(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),ee}),v=[];for(const D of re){const ee=D==null?void 0:D(A());ee&&v.push(ee)}return()=>v.forEach(D=>D==null?void 0:D())},H=se=>w6(se).find(Q=>{let re=!Q.guard;return Vl(Q.guard)?re=!!N(Q.guard):cs(Q.guard)&&(re=Q.guard(A())),re}),V=se=>{Y6(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[se];return Q({context:d,event:y(),prop:a,refs:S,scope:n,computed:V})},F=Ql(()=>({defaultValue:e.initialState({prop:a}),onChange(se,Q){var v,D,ee,O;if(Q){const _e=f.current.get(Q);_e==null||_e(),f.current.delete(Q)}Q&&C((v=e.states[Q])==null?void 0:v.exit),C((D=p.current)==null?void 0:D.actions);const re=k((ee=e.states[se])==null?void 0:ee.effects);if(re&&f.current.set(se,re),Q===$h){C(e.entry);const _e=k(e.effects);_e&&f.current.set($h,_e)}C((O=e.states[se])==null?void 0:O.entry)}})),q=B.useRef(void 0),ie=B.useRef(ys.NotStarted);Vb(()=>{queueMicrotask(()=>{var D;const re=ie.current===ys.Started;ie.current=ys.Started,r(re?"rehydrating...":"initializing...");const v=(D=q.current)!=null?D:F.initial;F.invoke(v,re?F.get():$h)});const se=f.current,Q=F.ref.current;return()=>{r("unmounting..."),q.current=Q,ie.current=ys.Stopped,se.forEach(re=>re==null?void 0:re()),f.current=new Map,p.current=null,queueMicrotask(()=>{C(e.exit)})}},[]);const ge=()=>"ref"in F?F.ref.current:F.get(),$=se=>{queueMicrotask(()=>{var O,_e,De,Pe,ze;if(ie.current!==ys.Started)return;m.current=T.current,T.current=se;let Q=ge();const re=(De=(O=e.states[Q].on)==null?void 0:O[se.type])!=null?De:(_e=e.on)==null?void 0:_e[se.type],v=H(re);if(!v)return;p.current=v;const D=(Pe=v.target)!=null?Pe:Q;r("transition",se.type,v.target||Q,`(${v.actions})`);const ee=D!==Q;ee?Go.flushSync(()=>F.set(D)):v.reenter&&!ee?F.invoke(Q,Q):C((ze=v.actions)!=null?ze:[])})};return(ve=e.watch)==null||ve.call(e,A()),{state:_(),send:$,context:d,prop:a,scope:n,refs:S,computed:V,event:y(),getStatus:()=>ie.current}}function qb(e){const t=B.useRef(e);return t.current=e,t}function J4(e){const t=qb(e);return function(r){return t.current[r]}}function Yb(e){queueMicrotask(()=>{Go.flushSync(()=>e())})}var Vh=X4(e=>e);function Zl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function Z4(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const qh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=cn(f,["asChild","children"]);if(!o)return B.createElement(e,pe(M({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=Z4(c);return B.cloneElement(c,pe(M({},qt(u,c.props)),{ref:r?Zl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},gn=(()=>{const e=new Map;return new Proxy(qh,{apply(t,n,r){return qh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,qh(r)),e.get(r)}})})();function eD(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function yo(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const m=new Error(a!=null?a:eD(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[tD,Yh]=yo({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[Wb,Ga]=yo({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),Gb=B.forwardRef((e,t)=>{const n=Yh(),r=Ga(),o=qt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(gn.div,pe(M({},o),{ref:Zl(r.ref,t)}))});Gb.displayName="PopoverContent";const Xb=B.forwardRef((e,t)=>{const n=Yh(),r=Ga(),o=qt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(gn.div,pe(M({},o),{ref:t}))});Xb.displayName="PopoverPositioner";const Xa=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},M({},e)]),Kb=e=>Xa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function nD(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var rD={props({props:e}){return pe(M({},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",ms(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Vt(()=>{var c,d;const u=ec(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})=>{Vt(()=>{e.set("prevAnimationName",ec(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===o&&e.set("prevAnimationName",ec(t.get("styles")))},u=d=>{const f=ec(t.get("styles"));yr(d)===o&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=Kl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),jb(()=>c())}}}}};function ec(e){return(e==null?void 0:e.animationName)||"none"}bs()(["onExitComplete","present","immediate"]);function iD(e,t={}){const{sync:n=!1}=t,r=oD(e);return B.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function oD(e){const t=B.useRef(e);return t.current=e,t}const Wh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=cn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=pe(M({},a),{present:r,onExitComplete:iD(e.onExitComplete)}),d=Jl(rD,c),f=nD(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var bo=(e,t=[])=>({parts:(...n)=>{if(sD(t))return bo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>bo(e,[...t,...n]),omit:(...n)=>bo(e,t.filter(r=>!n.includes(r))),rename:n=>bo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Ts(e)}"][data-part="${Ts(r)}"]`,`& [data-scope="${Ts(e)}"][data-part="${Ts(r)}"]`].join(", "),attrs:{"data-scope":Ts(e),"data-part":Ts(r)}}}),{})}),Ts=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),sD=e=>e.length===0;const aD=["top","right","bottom","left"],Oi=Math.min,Vn=Math.max,tc=Math.round,nc=Math.floor,Br=e=>({x:e,y:e}),uD={left:"right",right:"left",bottom:"top",top:"bottom"},lD={start:"end",end:"start"};function Gh(e,t,n){return Vn(e,Oi(t,n))}function ai(e,t){return typeof e=="function"?e(t):e}function ui(e){return e.split("-")[0]}function _s(e){return e.split("-")[1]}function Xh(e){return e==="x"?"y":"x"}function Kh(e){return e==="y"?"height":"width"}const cD=new Set(["top","bottom"]);function Ur(e){return cD.has(ui(e))?"y":"x"}function Qh(e){return Xh(Ur(e))}function dD(e,t,n){n===void 0&&(n=!1);const r=_s(e),o=Qh(e),a=Kh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=rc(u)),[u,rc(u)]}function fD(e){const t=rc(e);return[Jh(e),t,Jh(t)]}function Jh(e){return e.replace(/start|end/g,t=>lD[t])}const Qb=["left","right"],Jb=["right","left"],hD=["top","bottom"],pD=["bottom","top"];function mD(e,t,n){switch(e){case"top":case"bottom":return n?t?Jb:Qb:t?Qb:Jb;case"left":case"right":return t?hD:pD;default:return[]}}function gD(e,t,n,r){const o=_s(e);let a=mD(ui(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Jh)))),a}function rc(e){return e.replace(/left|right|bottom|top/g,t=>uD[t])}function ED(e){return M({top:0,right:0,bottom:0,left:0},e)}function Zb(e){return typeof e!="number"?ED(e):{top:e,right:e,bottom:e,left:e}}function ic(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function eT(e,t,n){let{reference:r,floating:o}=e;const a=Ur(t),u=Qh(t),c=Kh(u),d=ui(t),f=a==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-o.width,y:m};break;default:y={x:r.x,y:r.y}}switch(_s(t)){case"start":y[u]-=T*(n&&f?-1:1);break;case"end":y[u]+=T*(n&&f?-1:1);break}return y}const yD=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=eT(f,r,d),T=r,y={},_=0;for(let S=0;S<c.length;S++){const{name:A,fn:C}=c[S],{x:N,y:k,data:H,reset:V}=yield C({x:p,y:m,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});p=N!=null?N:p,m=k!=null?k:m,y=pe(M({},y),{[A]:M(M({},y[A]),H)}),V&&_<=50&&(_++,typeof V=="object"&&(V.placement&&(T=V.placement),V.rects&&(f=V.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):V.rects),{x:p,y:m}=eT(f,T,d)),S=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:y}});function Ka(e,t){return et(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=ai(t,e),_=Zb(y),A=c[T?m==="floating"?"reference":"floating":m],C=ic(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})),N=m==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,k=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),H=(yield a.isElement==null?void 0:a.isElement(k))?(yield a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},V=ic(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:k,strategy:d}):N);return{top:(C.top-V.top+_.top)/H.y,bottom:(V.bottom-C.bottom+_.bottom)/H.y,left:(C.left-V.left+_.left)/H.x,right:(V.right-C.right+_.right)/H.x}})}const bD=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=ai(e,n)||{};if(p==null)return{};const T=Zb(m),y={x:r,y:o},_=Qh(a),S=Kh(_),A=yield c.getDimensions(p),C=_==="y",N=C?"top":"left",k=C?"bottom":"right",H=C?"clientHeight":"clientWidth",V=u.reference[S]+u.reference[_]-y[_]-u.floating[S],F=y[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ie=q?q[H]:0;(!ie||!(yield c.isElement==null?void 0:c.isElement(q)))&&(ie=d.floating[H]||u.floating[S]);const ge=V/2-F/2,$=ie/2-A[S]/2-1,oe=Oi(T[N],$),ce=Oi(T[k],$),fe=oe,te=ie-A[S]-ce,be=ie/2-A[S]/2+ge,ve=Gh(fe,be,te),se=!f.arrow&&_s(a)!=null&&be!==ve&&u.reference[S]/2-(be<fe?oe:ce)-A[S]/2<0,Q=se?be<fe?be-fe:be-te:0;return{[_]:y[_]+Q,data:M({[_]:ve,centerOffset:be-ve-Q},se&&{alignmentOffset:Q}),reset:se}})}}),TD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,be=ai(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:A=!0}=be,C=cn(be,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const N=ui(a),k=Ur(d),H=ui(d)===d,V=yield f.isRTL==null?void 0:f.isRTL(p.floating),F=y||(H||!A?[rc(d)]:fD(d)),q=S!=="none";!y&&q&&F.push(...gD(d,A,S,V));const ie=[d,...F],ge=yield Ka(n,C),$=[];let oe=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&$.push(ge[N]),T){const ve=dD(a,c,V);$.push(ge[ve[0]],ge[ve[1]])}if(oe=[...oe,{placement:a,overflows:$}],!$.every(ve=>ve<=0)){var ce,fe;const ve=(((ce=u.flip)==null?void 0:ce.index)||0)+1,se=ie[ve];if(se&&(!(T==="alignment"?k!==Ur(se):!1)||oe.every(v=>Ur(v.placement)===k?v.overflows[0]>0:!0)))return{data:{index:ve,overflows:oe},reset:{placement:se}};let Q=(fe=oe.filter(re=>re.overflows[0]<=0).sort((re,v)=>re.overflows[1]-v.overflows[1])[0])==null?void 0:fe.placement;if(!Q)switch(_){case"bestFit":{var te;const re=(te=oe.filter(v=>{if(q){const D=Ur(v.placement);return D===k||D==="y"}return!0}).map(v=>[v.placement,v.overflows.filter(D=>D>0).reduce((D,ee)=>D+ee,0)]).sort((v,D)=>v[1]-D[1])[0])==null?void 0:te[0];re&&(Q=re);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function tT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nT(e){return aD.some(t=>e[t]>=0)}const _D=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r}=n,u=ai(e,n),{strategy:o="referenceHidden"}=u,a=cn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Ka(n,pe(M({},a),{elementContext:"reference"})),d=tT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:nT(d)}}}case"escaped":{const c=yield Ka(n,pe(M({},a),{altBoundary:!0})),d=tT(c,r.floating);return{data:{escapedOffsets:d,escaped:nT(d)}}}default:return{}}})}}},rT=new Set(["left","top"]);function SD(e,t){return et(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=ui(n),c=_s(n),d=Ur(n)==="y",f=rT.has(u)?-1:1,p=a&&d?-1:1,m=ai(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const xD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return et(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield SD(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:pe(M({},f),{placement:c})}})}}},wD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a}=n,C=ai(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:N=>{let{x:k,y:H}=N;return{x:k,y:H}}}}=C,f=cn(C,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},m=yield Ka(n,f),T=Ur(ui(a)),y=Xh(T);let _=p[y],S=p[T];if(u){const N=y==="y"?"top":"left",k=y==="y"?"bottom":"right",H=_+m[N],V=_-m[k];_=Gh(H,_,V)}if(c){const N=T==="y"?"top":"left",k=T==="y"?"bottom":"right",H=S+m[N],V=S-m[k];S=Gh(H,S,V)}const A=d.fn(pe(M({},n),{[y]:_,[T]:S}));return pe(M({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[y]:u,[T]:c}}})})}}},AD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=ai(e,t),p={x:n,y:r},m=Ur(o),T=Xh(m);let y=p[T],_=p[m];const S=ai(c,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:M({mainAxis:0,crossAxis:0},S);if(d){const k=T==="y"?"height":"width",H=a.reference[T]-a.floating[k]+A.mainAxis,V=a.reference[T]+a.reference[k]-A.mainAxis;y<H?y=H:y>V&&(y=V)}if(f){var C,N;const k=T==="y"?"width":"height",H=rT.has(ui(o)),V=a.reference[m]-a.floating[k]+(H&&((C=u.offset)==null?void 0:C[m])||0)+(H?0:A.crossAxis),F=a.reference[m]+a.reference[k]+(H?0:((N=u.offset)==null?void 0:N[m])||0)-(H?A.crossAxis:0);_<V?_=V:_>F&&(_=F)}return{[T]:y,[m]:_}}}},CD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,oe=ai(e,n),{apply:f=()=>{}}=oe,p=cn(oe,["apply"]),m=yield Ka(n,p),T=ui(a),y=_s(a),_=Ur(a)==="y",{width:S,height:A}=u.floating;let C,N;T==="top"||T==="bottom"?(C=T,N=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(N=T,C=y==="end"?"top":"bottom");const k=A-m.top-m.bottom,H=S-m.left-m.right,V=Oi(A-m[C],k),F=Oi(S-m[N],H),q=!n.middlewareData.shift;let ie=V,ge=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(ge=H),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ie=k),q&&!y){const ce=Vn(m.left,0),fe=Vn(m.right,0),te=Vn(m.top,0),be=Vn(m.bottom,0);_?ge=S-2*(ce!==0||fe!==0?ce+fe:Vn(m.left,m.right)):ie=A-2*(te!==0||be!==0?te+be:Vn(m.top,m.bottom))}yield f(pe(M({},n),{availableWidth:ge,availableHeight:ie}));const $=yield c.getDimensions(d.floating);return S!==$.width||A!==$.height?{reset:{rects:!0}}:{}})}}};function oc(){return typeof window!="undefined"}function Ss(e){return iT(e)?(e.nodeName||"").toLowerCase():"#document"}function qn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hr(e){var t;return(t=(iT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function iT(e){return oc()?e instanceof Node||e instanceof qn(e).Node:!1}function br(e){return oc()?e instanceof Element||e instanceof qn(e).Element:!1}function zr(e){return oc()?e instanceof HTMLElement||e instanceof qn(e).HTMLElement:!1}function oT(e){return!oc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof qn(e).ShadowRoot}const vD=new Set(["inline","contents"]);function Qa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!vD.has(o)}const kD=new Set(["table","td","th"]);function PD(e){return kD.has(Ss(e))}const ND=[":popover-open",":modal"];function sc(e){return ND.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const OD=["transform","translate","scale","rotate","perspective"],ID=["transform","translate","scale","rotate","perspective","filter"],RD=["paint","layout","strict","content"];function Zh(e){const t=ep(),n=br(e)?Tr(e):e;return OD.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ID.some(r=>(n.willChange||"").includes(r))||RD.some(r=>(n.contain||"").includes(r))}function LD(e){let t=Ii(e);for(;zr(t)&&!xs(t);){if(Zh(t))return t;if(sc(t))return null;t=Ii(t)}return null}function ep(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const DD=new Set(["html","body","#document"]);function xs(e){return DD.has(Ss(e))}function Tr(e){return qn(e).getComputedStyle(e)}function ac(e){return br(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ii(e){if(Ss(e)==="html")return e;const t=e.assignedSlot||e.parentNode||oT(e)&&e.host||Hr(e);return oT(t)?t.host:t}function sT(e){const t=Ii(e);return xs(t)?e.ownerDocument?e.ownerDocument.body:e.body:zr(t)&&Qa(t)?t:sT(t)}function Ja(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=sT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=qn(o);if(a){const c=tp(u);return t.concat(u,u.visualViewport||[],Qa(o)?o:[],c&&n?Ja(c):[])}return t.concat(o,Ja(o,[],n))}function tp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function aT(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=zr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=tc(n)!==a||tc(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function np(e){return br(e)?e:e.contextElement}function ws(e){const t=np(e);if(!zr(t))return Br(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=aT(t);let u=(a?tc(n.width):n.width)/r,c=(a?tc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const MD=Br(0);function uT(e){const t=qn(e);return!ep()||!t.visualViewport?MD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function FD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qn(e)?!1:t}function To(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=np(e);let u=Br(1);t&&(r?br(r)&&(u=ws(r)):u=ws(e));const c=FD(a,n,r)?uT(a):Br(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,m=o.height/u.y;if(a){const T=qn(a),y=r&&br(r)?qn(r):r;let _=T,S=tp(_);for(;S&&r&&y!==_;){const A=ws(S),C=S.getBoundingClientRect(),N=Tr(S),k=C.left+(S.clientLeft+parseFloat(N.paddingLeft))*A.x,H=C.top+(S.clientTop+parseFloat(N.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,m*=A.y,d+=k,f+=H,_=qn(S),S=tp(_)}}return ic({width:p,height:m,x:d,y:f})}function uc(e,t){const n=ac(e).scrollLeft;return t?t.left+n:To(Hr(e)).left+n}function lT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-uc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function BD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Hr(r),c=t?sc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Br(1);const p=Br(0),m=zr(r);if((m||!m&&!a)&&((Ss(r)!=="body"||Qa(u))&&(d=ac(r)),zr(r))){const y=To(r);f=ws(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?lT(u,d):Br(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 UD(e){return Array.from(e.getClientRects())}function HD(e){const t=Hr(e),n=ac(e),r=e.ownerDocument.body,o=Vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+uc(e);const c=-n.scrollTop;return Tr(r).direction==="rtl"&&(u+=Vn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const cT=25;function zD(e,t){const n=qn(e),r=Hr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=ep();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=uc(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,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=cT&&(a-=_)}else f<=cT&&(a+=f);return{width:a,height:u,x:c,y:d}}const jD=new Set(["absolute","fixed"]);function $D(e,t){const n=To(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=zr(e)?ws(e):Br(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function dT(e,t,n){let r;if(t==="viewport")r=zD(e,n);else if(t==="document")r=HD(Hr(e));else if(br(t))r=$D(t,n);else{const o=uT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ic(r)}function fT(e,t){const n=Ii(e);return n===t||!br(n)||xs(n)?!1:Tr(n).position==="fixed"||fT(n,t)}function VD(e,t){const n=t.get(e);if(n)return n;let r=Ja(e,[],!1).filter(c=>br(c)&&Ss(c)!=="body"),o=null;const a=Tr(e).position==="fixed";let u=a?Ii(e):e;for(;br(u)&&!xs(u);){const c=Tr(u),d=Zh(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&jD.has(o.position)||Qa(u)&&!d&&fT(e,u))?r=r.filter(p=>p!==u):o=c,u=Ii(u)}return t.set(e,r),r}function qD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?sc(t)?[]:VD(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=dT(t,p,o);return f.top=Vn(m.top,f.top),f.right=Oi(m.right,f.right),f.bottom=Oi(m.bottom,f.bottom),f.left=Vn(m.left,f.left),f},dT(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function YD(e){const{width:t,height:n}=aT(e);return{width:t,height:n}}function WD(e,t,n){const r=zr(t),o=Hr(t),a=n==="fixed",u=To(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Br(0);function f(){d.x=uc(o)}if(r||!r&&!a)if((Ss(t)!=="body"||Qa(o))&&(c=ac(t)),r){const y=To(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?lT(o,c):Br(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 rp(e){return Tr(e).position==="static"}function hT(e,t){if(!zr(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Hr(e)===n&&(n=n.ownerDocument.body),n}function pT(e,t){const n=qn(e);if(sc(e))return n;if(!zr(e)){let o=Ii(e);for(;o&&!xs(o);){if(br(o)&&!rp(o))return o;o=Ii(o)}return n}let r=hT(e,t);for(;r&&PD(r)&&rp(r);)r=hT(r,t);return r&&xs(r)&&rp(r)&&!Zh(r)?n:r||LD(e)||n}const GD=function(e){return et(this,null,function*(){const t=this.getOffsetParent||pT,n=this.getDimensions,r=yield n(e.floating);return{reference:WD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function XD(e){return Tr(e).direction==="rtl"}const KD={convertOffsetParentRelativeRectToViewportRelativeRect:BD,getDocumentElement:Hr,getClippingRect:qD,getOffsetParent:pT,getElementRects:GD,getClientRects:UD,getDimensions:YD,getScale:ws,isElement:br,isRTL:XD};function mT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function QD(e,t){let n=null,r;const o=Hr(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 _=nc(m),S=nc(o.clientWidth-(p+T)),A=nc(o.clientHeight-(m+y)),C=nc(p),k={rootMargin:-_+"px "+-S+"px "+-A+"px "+-C+"px",threshold:Vn(0,Oi(1,d))||1};let H=!0;function V(F){const q=F[0].intersectionRatio;if(q!==d){if(!H)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!mT(f,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(V,pe(M({},k),{root:o.ownerDocument}))}catch(F){n=new IntersectionObserver(V,k)}n.observe(e)}return u(!0),a}function JD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=np(e),p=o||a?[...f?Ja(f):[],...Ja(t)]:[];p.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),a&&C.addEventListener("resize",n)});const m=f&&c?QD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(C=>{let[N]=C;N&&N.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,S=d?To(e):null;d&&A();function A(){const C=To(e);S&&!mT(S,C)&&n(),S=C,_=requestAnimationFrame(A)}return n(),()=>{var C;p.forEach(N=>{o&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),m==null||m(),(C=y)==null||C.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const ZD=xD,e5=wD,t5=TD,n5=CD,r5=_D,i5=bD,o5=AD,s5=(e,t,n)=>{const r=new Map,o=M({platform:KD},n),a=pe(M({},o.platform),{_c:r});return yD(e,t,pe(M({},o),{platform:a}))};function gT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return pe(M({},o),{toJSON:()=>o})}function a5(e){if(!e)return gT();const{x:t,y:n,width:r,height:o}=e;return gT(t,n,r,o)}function u5(e,t){return{contextElement:Zt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?a5(r):n.getBoundingClientRect()}}}var Za=e=>({variable:e,reference:`var(${e})`}),li={arrowSize:Za("--arrow-size"),arrowSizeHalf:Za("--arrow-size-half"),arrowBg:Za("--arrow-background"),transformOrigin:Za("--transform-origin"),arrowOffset:Za("--arrow-offset")},l5=e=>e==="top"||e==="bottom"?"y":"x";function c5(e,t){return{name:"transformOrigin",fn(n){var ge,$,oe,ce,fe;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=l5(d),p=((ge=o.arrow)==null?void 0:ge.x)||0,m=(($=o.arrow)==null?void 0:$.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+T/2,S=m+y/2,A=Math.abs(((oe=o.shift)==null?void 0:oe.y)||0),C=u.reference.height/2,N=y/2,k=(fe=(ce=e.offset)==null?void 0:ce.mainAxis)!=null?fe:e.gutter,H=typeof k=="number"?k+N:k!=null?k:N,V=A>H,F={top:`${_}px calc(100% + ${H}px)`,bottom:`${_}px ${-H}px`,left:`calc(100% + ${H}px) ${S}px`,right:`${-H}px ${S}px`}[d],q=`${_}px ${u.reference.y+C-c}px`,ie=!!e.overlap&&f==="y"&&V;return r.floating.style.setProperty(li.transformOrigin.variable,ie?q:F),{data:{transformOrigin:ie?q:F}}}}}var d5={name:"rects",fn({rects:e}){return{data:e}}},f5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${li.arrowOffset.reference})`}),{}}}};function h5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var p5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function ET(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function ip(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function m5(e,t,n){const r=e||t.createElement("div");return i5({element:r,padding:n.arrowPadding})}function g5(e,t){var n;if(!O6((n=t.offset)!=null?n:t.gutter))return ZD(({placement:r})=>{var p,m,T,y;const o=((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+o:a!=null?a:o,{hasAlign:c}=h5(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 E5(e){if(!e.flip)return;const t=ip(e.boundary);return t5(pe(M({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function y5(e){if(!e.slide&&!e.overlap)return;const t=ip(e.boundary);return e5(pe(M({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:o5()}))}function b5(e){return n5({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function T5(e){var t;if(e.hideWhenDetached)return r5({strategy:"referenceHidden",boundary:(t=ip(e.boundary))!=null?t:"clippingAncestors"})}function _5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function S5(e,t,n={}){const r=u5(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},p5,n),a=t.querySelector("[data-part=arrow]"),u=[g5(a,o),E5(o),y5(o),m5(a,t.ownerDocument,o),f5(a),c5({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),b5(o),T5(o),d5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>et(null,null,function*(){var H;if(!r||!t)return;const S=yield s5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(S),p==null||p({placed:!0});const A=hs(t),C=ET(A,S.x),N=ET(A,S.y);t.style.setProperty("--x",`${C}px`),t.style.setProperty("--y",`${N}px`),o.hideWhenDetached&&(((H=S.middlewareData.hide)==null?void 0:H.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const k=t.firstElementChild;if(k){const V=ms(k);t.style.setProperty("--z-index",V.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=_5(o.listeners),_=o.listeners?JD(r,t,T,y):H6;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function yT(e,t,n={}){const c=n,{defer:r}=c,o=cn(c,["defer"]),a=r?Vt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(S5(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var x5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function w5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:li.arrowSize.reference,height:li.arrowSize.reference,[li.arrowSizeHalf.variable]:`calc(${li.arrowSize.reference} / 2)`,[li.arrowOffset.variable]:`calc(${li.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?x5[t.split("-")[0]]:void 0,background:li.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var As=new WeakMap,lc=new WeakMap,cc={},op=0,bT=e=>e&&(e.host||bT(e.parentNode)),A5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=bT(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),C5=new Set(["script","output","status","next-route-announcer"]),v5=e=>C5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),k5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=A5(n,Array.isArray(e)?e:[e]);cc[r]||(cc[r]=new WeakMap);const c=cc[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&&Zt(y)&&Ib(y,_=>{m(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(v5(_))return;const A=_.getAttribute(o)==="true",C=(As.get(_)||0)+1,N=(c.get(_)||0)+1;As.set(_,C),c.set(_,N),d.push(_),C===1&&A&&lc.set(_,!0),N===1&&_.setAttribute(r,""),A||_.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return T(n),f.clear(),op++,()=>{d.forEach(y=>{const _=As.get(y)-1,S=c.get(y)-1;As.set(y,_),c.set(y,S),_||(lc.has(y)||y.removeAttribute(o),lc.delete(y)),S||y.removeAttribute(r)}),op--,op||(As=new WeakMap,As=new WeakMap,lc=new WeakMap,cc={})}},P5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,N5=(e,t=P5(e),n="data-aria-hidden",r=!0)=>{if(t)return k5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},O5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function TT(e,t={}){const{defer:n=!0}=t,r=n?O5:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(N5(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function I5(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function R5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var _T="pointerdown.outside",ST="focus.outside";function L5(e){for(const t of e)if(Zt(t)&&Fr(t))return!0;return!1}var xT=e=>"clientY"in e;function D5(e,t){if(!xT(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 M5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function wT(e,t){if(!t||!xT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return M5(u,c)?r||a:!1}function F5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Mr(e),f=hs(e),p=I5(f),m=R5(f);function T(k,H){if(!Zt(H)||!H.isConnected||fs(e,H)||D5(e,k)||c&&Ob(e,H))return!1;const V=d.querySelector(`[aria-controls="${e.id}"]`);if(V){const q=zh(V);if(wT(k,q))return!1}const F=zh(e);return wT(k,F)?!1:!(n!=null&&n(H))}const y=new Set,_=go(e==null?void 0:e.getRootNode());function S(k){function H(V){var ge,$;const F=u&&!Rb()?Vt:oe=>oe(),q=V!=null?V:k,ie=($=(ge=q==null?void 0:q.composedPath)==null?void 0:ge.call(q))!=null?$:[q==null?void 0:q.target];F(()=>{const oe=_?ie[0]:yr(k);if(!(!e||!T(k,oe))){if(o||a){const ce=Oh(o,a);e.addEventListener(_T,ce,{once:!0})}AT(e,_T,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:_4(q),focusable:L5(ie),target:oe}})}})}k.pointerType==="touch"?(y.forEach(V=>V()),y.add(en(d,"click",H,{once:!0})),y.add(m.addEventListener("click",H,{once:!0})),y.add(p.addEventListener("click",H,{once:!0}))):H()}const A=new Set,C=setTimeout(()=>{A.add(en(d,"pointerdown",S,!0)),A.add(m.addEventListener("pointerdown",S,!0)),A.add(p.addEventListener("pointerdown",S,!0))},0);function N(k){(u?Vt:V=>V())(()=>{var q,ie;const V=(ie=(q=k==null?void 0:k.composedPath)==null?void 0:q.call(k))!=null?ie:[k==null?void 0:k.target],F=_?V[0]:yr(k);if(!(!e||!T(k,F))){if(r||a){const ge=Oh(r,a);e.addEventListener(ST,ge,{once:!0})}AT(e,ST,{bubbles:!1,cancelable:!0,detail:{originalEvent:k,contextmenu:!1,focusable:Fr(F),target:F}})}})}return Rb()||(A.add(en(d,"focusin",N,!0)),A.add(m.addEventListener("focusin",N,!0)),A.add(p.addEventListener("focusin",N,!0))),()=>{clearTimeout(C),y.forEach(k=>k()),A.forEach(k=>k())}}function B5(e,t){const{defer:n}=t,r=n?Vt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(F5(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function AT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function U5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return en(Mr(e),"keydown",n,{capture:!0})}var CT="layer:request-dismiss",or={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=>fs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>fs(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=>or.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];z5(e,CT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),H5(e,CT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function H5(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function z5(e,t,n){e.addEventListener(t,n,{once:!0})}var vT;function kT(){or.layers.forEach(({node:e})=>{e.style.pointerEvents=or.isBelowPointerBlockingLayer(e)?"none":"auto"})}function j5(e){e.style.pointerEvents=""}function $5(e,t){const n=Mr(e),r=[];return or.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(vT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=V4(()=>{const c=o();return Zt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Kl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{or.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=vT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function V5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Rh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};or.add(f),kT();function p(S){var C,N;const A=yr(S.detail.originalEvent);or.isBelowPointerBlockingLayer(e)||or.isInBranch(A)||((C=t.onPointerDownOutside)==null||C.call(t,S),(N=t.onInteractOutside)==null||N.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function m(S){var C,N;const A=yr(S.detail.originalEvent);or.isInBranch(A)||((C=t.onFocusOutside)==null||C.call(t,S),(N=t.onInteractOutside)==null||N.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function T(S){var A;or.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var k;if(!e)return!1;const A=typeof u=="function"?u():u,C=Array.isArray(A)?A:[A],N=(k=t.persistentElements)==null?void 0:k.map(H=>H()).filter(Zt);return N&&C.push(...N),C.some(H=>fs(H,S))||or.isInNestedLayer(e,S)}const _=[a?$5(e,t.persistentElements):void 0,U5(e,T),B5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{or.remove(e),kT(),j5(e),_.forEach(S=>S==null?void 0:S())}}function PT(e,t){const{defer:n}=t,r=n?Vt:a=>a(),o=[];return o.push(r(()=>{const a=cs(e)?e():e;o.push(V5(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var q5=Object.defineProperty,Y5=(e,t,n)=>t in e?q5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,At=(e,t,n)=>Y5(e,typeof t!="symbol"?t+"":t,n),NT={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()}},W5=[],G5=class{constructor(e,t){At(this,"trapStack"),At(this,"config"),At(this,"doc"),At(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),At(this,"portalContainers",new Set),At(this,"listenerCleanups",[]),At(this,"handleFocus",r=>{const o=yr(r),a=this.findContainerIndex(o,r)>=0;if(a||Yl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Wa(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=>Wa(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}),At(this,"handlePointerDown",r=>{const o=yr(r);if(!(this.findContainerIndex(o,r)>=0)){if(tu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}tu(this.config.allowOutsideClick,r)||r.preventDefault()}}),At(this,"handleClick",r=>{const o=yr(r);this.findContainerIndex(o,r)>=0||tu(this.config.clickOutsideDeactivates,r)||tu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),At(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;eu(r)&&r.preventDefault(),this.tryFocus(a)}}),At(this,"handleEscapeKey",r=>{X5(r)&&tu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),At(this,"_mutationObserver"),At(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return f4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?h4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),At(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),At(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Fr(r)){const o=ps(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),At(this,"tryFocus",r=>{if(r!==!1&&r!==ps(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,K5(r)&&r.select()}}),At(this,"deactivate",r=>{if(!this.state.active)return this;const o=M({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(),NT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{OT(()=>{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}),At(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),At(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),At(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),At(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),At(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),At(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),At(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||yr(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),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||Fr(u)&&!Eo(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=Wa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else eu(o)||(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||Fr(u)&&!Eo(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=Wa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else eu(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||W5;const n=M({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return eu(r)&&!r.shiftKey},isKeyBackward(r){return eu(r)&&r.shiftKey}},t);this.doc=n.document||Mr(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=>{l4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Ob(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=gs(e,{getShadowRoot:this.config.getShadowRoot}),n=Hb(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let f=0;f<t.length;f++)if(Wa(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(Eo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(Eo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return NT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?OT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(en(this.doc,"focusin",this.handleFocus,!0),en(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),en(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),en(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),en(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),en(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=ps(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},eu=e=>e.key==="Tab",tu=(e,...t)=>typeof e=="function"?e(...t):e,X5=e=>!e.isComposing&&e.key==="Escape",OT=e=>setTimeout(e,0),K5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function IT(e,t={}){let n;const r=Vt(()=>{const o=typeof e=="function"?e():e;if(o){n=new G5(o,pe(M({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Mr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var sp="data-scroll-lock";function Q5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function RT(e){const t=ms(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function LT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(sp))return;const u=RT(r)||RT(o),c=n.innerWidth-r.clientWidth;o.setAttribute(sp,"");const d=()=>j4(r,"--scrollbar-width",`${c}px`),f=Q5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Kl(o,_)},m=()=>{var V,F;const{scrollX:_,scrollY:S,visualViewport:A}=n,C=(V=A==null?void 0:A.offsetLeft)!=null?V:0,N=(F=A==null?void 0:A.offsetTop)!=null?F:0,k={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(N))}px`,left:`${-(_-Math.floor(C))}px`,right:"0"};!u&&c>0&&(k[f]=`${c}px`);const H=Kl(o,k);return()=>{H==null||H(),n.scrollTo({left:_,top:S,behavior:"instant"})}},T=[d(),Wl()?m():p()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(sp)}}var J5=bo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),jr=J5.build(),DT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},MT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},FT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},Z5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},lp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},eM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},BT=e=>e.getById(DT(e)),Cs=e=>e.getById(MT(e)),vs=e=>e.getById(ap(e)),UT=e=>e.getById(FT(e)),tM=e=>e.getById(up(e)),nM=e=>e.getById(lp(e));function rM(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=w5(pe(M({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(pe(M({id:Z5(c)},jr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(pe(M({},jr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(pe(M({},jr.anchor.attrs),{dir:u("dir"),id:DT(c)}))},getTriggerProps(){return t.button(pe(M({},jr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:MT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ap(c),onPointerDown(y){Lb(y)&&b4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(pe(M({},jr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(M({id:FT(c)},jr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(pe(M({},jr.content.attrs),{dir:u("dir"),id:ap(c),tabIndex:-1,role:"dialog","aria-modal":kb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ds(d),"aria-labelledby":m.title?up(c):void 0,"aria-describedby":m.description?lp(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(pe(M({},jr.title.attrs),{id:up(c),dir:u("dir")}))},getDescriptionProps(){return t.element(pe(M({},jr.description.attrs),{id:lp(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(pe(M({},jr.closeTrigger.attrs),{dir:u("dir"),id:eM(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var iM={props({props:e}){return pe(M({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:M({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=BT(n))!=null?a:Cs(n);return yT(r,()=>UT(n),pe(M({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>vs(n);let o=!0;return PT(r,{type:"popover",pointerBlocking:t("modal"),exclude:Cs(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:H4(()=>vs(t),{triggerElement:Cs(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?TT(()=>[vs(t),Cs(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return LT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?IT(()=>vs(t),{initialFocus:()=>zb({root:vs(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=BT(n))!=null?u:Cs(n);yT(o,()=>UT(n),pe(M(M({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Vt(()=>{Object.assign(e.get("renderedElements"),{title:!!tM(t),description:!!nM(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Vt(()=>{const n=zb({root:vs(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Vt(()=>{const a=Cs(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})}}}};bs()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[OU,dc]=yo({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[IU,cp]=yo({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),oM=e=>{const t=B.useId(),{getRootNode:n}=dc(),{dir:r}=cp(),o=M({id:t,dir:r,getRootNode:n},e),a=Jl(iM,o);return rM(a,Vh)},sM=e=>{const[t,u]=Kb(e),c=u,{children:n}=c,r=cn(c,["children"]),o=oM(r),a=Wh(qt({present:o.open},t));return w.jsx(tD,{value:o,children:w.jsx(Wb,{value:a,children:n})})},HT=B.forwardRef((e,t)=>{const n=Yh(),r=Ga(),o=qt(pe(M({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(gn.button,pe(M({},o),{ref:t}))});HT.displayName="PopoverTrigger";function aM(e){return kt({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 uM(e){return kt({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 lM(e){return kt({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 cM(e){return kt({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 dM(e){return kt({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 fM(e){return kt({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 dp(e){return kt({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 zT(e){return kt({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 hM=({className:e,componentType:t,children:n})=>{const[r,o]=B.useState(!1),{globalClassName:a}=nt(),u=f=>{o(f.open)},c=B.useCallback(()=>{o(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return w.jsxs(sM,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(HT,{"aria-label":`Overflow menu for ${t}`,className:G(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(zT,{})}),w.jsx(Xb,{children:w.jsx(Gb,{className:G(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(_b.Provider,{value:d,children:n})})})]})};function jT(e){return kt({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 $T(e){return kt({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[pM,_o]=yo({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),VT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getControlProps(),e);return w.jsx(gn.div,pe(M(M({},r),e),{ref:t}))});VT.displayName="CarouselControl";const qT=B.forwardRef((e,t)=>{const[n,r]=Xa()(e,["readOnly","index"]),o=_o(),a=qt(o.getIndicatorProps(n),r);return w.jsx(gn.button,pe(M({},a),{ref:t}))});qT.displayName="CarouselIndicator";const YT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getIndicatorGroupProps(),e);return w.jsx(gn.div,pe(M({},r),{ref:t}))});YT.displayName="CarouselIndicatorGroup";const WT=B.forwardRef((e,t)=>{const[n,r]=Xa()(e,["index","snapAlign"]),o=_o(),a=qt(o.getItemProps(n),r);return w.jsx(gn.div,pe(M({},a),{ref:t}))});WT.displayName="CarouselItem";const GT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getItemGroupProps(),e);return w.jsx(gn.div,pe(M({},r),{ref:t}))});GT.displayName="CarouselItemGroup";const XT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getNextTriggerProps(),e);return w.jsx(gn.button,pe(M({},r),{ref:t}))});XT.displayName="CarouselNextTrigger";const KT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getPrevTriggerProps(),e);return w.jsx(gn.button,pe(M({},r),{ref:t}))});KT.displayName="CarouselPrevTrigger";function mM(e){const t=ms(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(o,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function gM(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 QT(e){let t=[];for(const n of e.children)t=t.concat(n,QT(n));return t}function JT(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?QT(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 o){const m=p.getBoundingClientRect();if(!gM(n,m,u))continue;const T=ms(p);let[y,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const S=a==="x"?_:y,A=m[c]-n[c]+e[f];switch(S){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+m[d]/2});break;case"end":r[a].end.push({node:p,position:A+m[d]});break}}}return r}function ZT(e){const t=e.getBoundingClientRect(),n=mM(e),r=JT(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:e_([...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(t_(0,o.x))),y:e_([...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(t_(0,o.y)))}}function EM(e,t,n){const r=JT(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var e_=e=>[...new Set(e)],t_=(e,t)=>n=>Math.max(e,Math.min(t,n)),yM=bo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ci=yM.build(),bM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},TM=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},fc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},_M=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},SM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},xM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},n_=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},In=e=>e.getById(fc(e)),r_=e=>z4(In(e),"[data-part=item]"),wM=(e,t)=>e.getById(n_(e,t)),i_=e=>{const t=In(e);if(!t)return;const n=gs(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function AM(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),m=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),S=c("slidesPerPage"),A=c("padding"),C=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/y.length},scrollToIndex(N,k){a({type:"INDEX.SET",index:N,instant:k})},scrollTo(N,k){a({type:"PAGE.SET",index:N,instant:k})},scrollNext(N){a({type:"PAGE.NEXT",instant:N})},scrollPrev(N){a({type:"PAGE.PREV",instant:N})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(N){return Array.from(r.get("slidesInView")).includes(N)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(pe(M({},ci.root.attrs),{id:bM(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":S,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(pe(M({},ci.itemGroup.attrs),{id:fc(u),"data-orientation":c("orientation"),"data-dragging":ds(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(N){fs(N.currentTarget,yr(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){fs(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!c("allowMouseDrag")||!Lb(N))return;const k=yr(N);Fr(k)&&k!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:z6(N=>{const k=c("orientation")==="horizontal"?"deltaX":"deltaY";N[k]<0&&!o("canScrollPrev")||N[k]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:A,[T?"paddingInline":"paddingBlock"]:A,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(N){const k=r.get("slidesInView").includes(N.index);return t.element(pe(M({},ci.item.attrs),{id:TM(u,N.index),dir:c("dir"),role:"group","data-index":N.index,"data-inview":ds(k),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":C.item(N.index,c("slideCount")),"aria-hidden":kb(!k),style:{scrollSnapAlign:(()=>{var ie;const H=(ie=N.snapAlign)!=null?ie:"start",V=c("slidesPerMove"),F=V==="auto"?Math.floor(c("slidesPerPage")):V;return(N.index+F)%F===0?H:void 0})()}}))},getControlProps(){return t.element(pe(M({},ci.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(pe(M({},ci.prevTrigger.attrs),{id:SM(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":C.prevTrigger,"data-orientation":c("orientation"),"aria-controls":fc(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(pe(M({},ci.nextTrigger.attrs),{dir:c("dir"),id:_M(u),type:"button","aria-label":C.nextTrigger,"data-orientation":c("orientation"),"aria-controls":fc(u),disabled:!p,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(pe(M({},ci.indicatorGroup.attrs),{dir:c("dir"),id:xM(u),"data-orientation":c("orientation"),onKeyDown(N){if(N.defaultPrevented)return;const k="indicator",H={ArrowDown(q){T||(a({type:"PAGE.NEXT",src:k}),q.preventDefault())},ArrowUp(q){T||(a({type:"PAGE.PREV",src:k}),q.preventDefault())},ArrowRight(q){T&&(a({type:"PAGE.NEXT",src:k}),q.preventDefault())},ArrowLeft(q){T&&(a({type:"PAGE.PREV",src:k}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:k}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:k}),q.preventDefault()}},V=w4(N,{dir:c("dir"),orientation:c("orientation")}),F=H[V];F==null||F(N)}}))},getIndicatorProps(N){return t.button(pe(M({},ci.indicator.attrs),{dir:c("dir"),id:n_(u,N.index),type:"button","data-orientation":c("orientation"),"data-index":N.index,"data-readonly":ds(N.readOnly),"data-current":ds(N.index===_),"aria-label":C.indicator(N.index),onClick(k){k.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(pe(M({},ci.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":ds(d),"aria-label":d?C.autoplayStop:C.autoplayStart,onClick(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var CM={props({props:e}){return W6(e,["slideCount"],"carousel"),pe(M({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:M({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:vM(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 N6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(In(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=In(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),i_(e)});return i_(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!In(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Vt(()=>{o(),Vt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return r_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=In(e),o=e.getWin(),a=new o.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?A6(d,m):C6(d,m)},n.get("slidesInView"));n.set("slidesInView",v6(c))},{root:r,threshold:t("inViewThreshold")});return r_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=In(n);return r?en(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return en(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return B4(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return en(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var f;const a=t.instant?"instant":"smooth",u=Cb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=In(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=In(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=xb(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=k6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=In(r);if(!o)return;const a=EM(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=Cb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=In(n);if(!r)return;const o=ZT(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=In(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=In(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=In(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=ZT(r),c=u.x.reduce((f,p)=>Math.abs(p-o)<Math.abs(f-o)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);Vt(()=>{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=wM(n,e.get("page"));r&&Vt(()=>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 vM(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}bs()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),bs()(["index","readOnly"]),bs()(["index","snapAlign"]);const kM=e=>{const t=B.useId(),{getRootNode:n}=dc(),{dir:r}=cp(),o=M({id:t,dir:r,getRootNode:n},e),a=Jl(CM,o);return AM(a,Vh)},o_=B.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"]),o=kM(n),a=qt(o.getRootProps(),r);return w.jsx(pM,{value:o,children:w.jsx(gn.div,pe(M({},a),{ref:t}))})});o_.displayName="CarouselRoot";const PM=180,NM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},OM=({globalClassName:e,className:t,itemMinWidth:n=PM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p),T=m.length,y=B.useRef(null),[_,S]=B.useState(0),{width:A}=Cv();B.useLayoutEffect(()=>{y.current&&S(y.current.getBoundingClientRect().width)},[A,T]);const C=NM(r),N=n+C,k=_>0?(_+C)/N:1,H=Math.max(1,Math.floor(k));if(T===0)return null;const V=T>H,F=Math.ceil(T/H),q=V?Math.max(1,k):H;return w.jsxs(o_,{ref:y,className:G(e,t,`${z}-carousel`),slidesPerPage:q,slidesPerMove:H,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[w.jsx(GT,{className:G(e,`${z}-carousel__item-group`,{"carousel-row-container":!V}),children:m.map((ie,ge)=>w.jsx(WT,{index:ge,className:G(e,`${z}-carousel__item`),children:ie},ge))}),c&&V&&w.jsxs(VT,{className:G(e,`${z}-carousel__control`),children:[w.jsx(KT,{className:G(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(lM,{size:"16px"})}),w.jsx(XT,{className:G(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(cM,{size:"16px"})})]}),u&&V&&w.jsx(YT,{className:G(e,`${z}-carousel__indicator-group`),children:Array.from({length:F},(ie,ge)=>w.jsx(qT,{index:ge,className:G(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${ge+1}`},ge))})]})},[IM,RM]=yo({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),LM=e=>Xa()(e,["lazyMount","unmountOnExit"]),[DM,nu]=yo({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),s_=B.forwardRef((e,t)=>{const n=nu(),r=RM(),o=Wh(pe(M({},r),{present:n.open})),a=qt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:w.jsx(gn.div,pe(M({},a),{ref:Zl(o.ref,t)}))});s_.displayName="DialogBackdrop";const fp=B.forwardRef((e,t)=>{const n=nu(),r=Ga(),o=qt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(gn.div,pe(M({},o),{ref:Zl(r.ref,t)}))});fp.displayName="DialogContent";const hp=B.forwardRef((e,t)=>{const n=nu(),r=qt(n.getDescriptionProps(),e);return w.jsx(gn.div,pe(M({},r),{ref:t}))});hp.displayName="DialogDescription";const pp=B.forwardRef((e,t)=>{const n=nu(),r=qt(n.getPositionerProps(),e);return Ga().unmounted?null:w.jsx(gn.div,pe(M({},r),{ref:t}))});pp.displayName="DialogPositioner";var MM=bo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),So=MM.build(),a_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},u_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},mp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},l_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},gp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},c_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},hc=e=>e.getById(mp(e)),FM=e=>e.getById(a_(e)),BM=e=>e.getById(u_(e)),UM=e=>e.getById(l_(e)),HM=e=>e.getById(gp(e)),zM=e=>e.getById(Ep(e)),jM=e=>e.getById(c_(e));function $M(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(pe(M({},So.trigger.attrs),{dir:a("dir"),id:l_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":mp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(pe(M({},So.backdrop.attrs),{dir:a("dir"),hidden:!d,id:u_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(M({},So.positioner.attrs),{dir:a("dir"),id:a_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(pe(M({},So.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:mp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:gp(u),"aria-describedby":f.description?Ep(u):void 0}))},getTitleProps(){return t.element(pe(M({},So.title.attrs),{dir:a("dir"),id:gp(u)}))},getDescriptionProps(){return t.element(pe(M({},So.description.attrs),{dir:a("dir"),id:Ep(u)}))},getCloseTriggerProps(){return t.button(pe(M({},So.closeTrigger.attrs),{dir:a("dir"),id:c_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var VM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>jM(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return M({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return PT(()=>hc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[UM(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return LT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?IT(()=>hc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?TT(()=>[hc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Vt(()=>{e.set("rendered",{title:!!HM(t),description:!!zM(t)})})},syncZIndex({scope:e}){Vt(()=>{const t=hc(e);if(!t)return;const n=ms(t);[FM(e),BM(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};bs()(["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 qM=e=>{const t=B.useId(),{getRootNode:n}=dc(),{dir:r}=cp(),o=M({id:t,getRootNode:n,dir:r},e),a=Jl(VM,o);return $M(a,Vh)},d_=e=>{const[t,c]=Kb(e),d=c,{children:n}=d,r=cn(d,["children"]),[o]=LM(t),a=qM(r),u=Wh(qt({present:a.open},t));return w.jsx(DM,{value:a,children:w.jsx(IM,{value:o,children:w.jsx(Wb,{value:u,children:n})})})},f_=B.forwardRef((e,t)=>{const n=nu(),r=qt(n.getTitleProps(),e);return w.jsx(gn.h2,pe(M({},r),{ref:t}))});f_.displayName="DialogTitle";const YM=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=B.useMemo(()=>({isOpen:t}),[t]);return w.jsx(Nh.Provider,{value:r,children:w.jsx(Tb.Provider,{value:o,children:e})})},h_=()=>B.useContext(Tb),p_=()=>{const e=B.useContext(Nh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},WM=`${z}-overflow-menu-button-trigger`,GM=({componentType:e,children:t})=>{const{isOpen:n}=h_(),{closeMenu:r}=p_(),{globalClassName:o}=nt(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${WM}`)||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?w.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:G(`${z}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},XM=({componentType:e,className:t})=>{const{toggleMenu:n}=p_(),{isOpen:r}=h_(),{globalClassName:o}=nt();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:G(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:w.jsx(zT,{})})},yp=()=>{const{status:e,entryType:t}=er(),{messages:n}=tr(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},KM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=nt(),{previousComponentType:r}=er(),o=qa(),a=()=>{ml(r||"dialog"),o()};return t?w.jsx(oi,{className:G(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(jT,{})}):w.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(jT,{}),"Show ",r||"dialog"]})},QM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=nt(),{isModalFullscreen:r}=er(),o=qa(),a=()=>{wf(!r),o()},u=r?Mk:Fk,c="Toggle Fullscreen";return t?w.jsx(oi,{ariaLabel:c,title:c,className:G(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),c]})},JM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=nt(),{dialogPosition:r}=er(),o=qa(),a=r==="bottom-left",u=()=>{Af(a?"bottom-right":"bottom-left"),o()},c=a?uM:aM,d=a?"Move right":"Move left";return t?w.jsx(oi,{className:G(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(c,{})}):w.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(c,{}),d]})},m_=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=nt(),{mode:a}=er(),u=a==="standalone",c=e==="modal",d=c?KM:g_,f=c?QM:JM,p=B.useMemo(()=>r?Uk(r):{},[r]);return w.jsx(YM,{children:w.jsxs("div",{className:G(o,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:G(o,`${z}-${e}-header`,{standalone:u,embedded:!u}),style:p,children:[(r==null?void 0:r.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:G(o,`${z}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),w.jsx(f_,{className:G(o,`${z}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),w.jsxs("div",{className:G(o,`${z}-${e}-controls`),children:[w.jsx(d,{componentType:e,isIcon:!0}),w.jsx(XM,{componentType:e}),w.jsx(I1,{className:G(o,`cim-${e}-component`),onClick:n})]})]}),w.jsxs(GM,{componentType:e,children:[w.jsx(f,{componentType:e}),w.jsx(t8,{componentType:e}),w.jsx(Sb,{componentType:e,onClearChat:t})]})]})})},ZM={sparkle:dp,plus:dM,"paper-plane":fM},bp=({icon:e,className:t})=>{const n=ZM[e];return n?w.jsx(n,{className:t,"aria-hidden":"true"}):null},e8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=nt(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=o?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},T=_=>w.jsxs(w.Fragment,{children:[c&&w.jsx(bp,{icon:c,className:`${z}-suggestion-button-icon`}),w.jsx("span",{children:_})]});return w.jsx("div",{className:G(t,`${z}-suggestion-container ${f}`,e),children:n.map(_=>o?w.jsx(bl,{disabled:r,className:G(t,`${z}-suggestion-button standalone`,m),onClick:p(_),children:T(_)},_):w.jsx("button",{disabled:r,className:G(t,`${z}-suggestion-button embedded`,m),onClick:p(_),children:T(_)},_))})},t8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=nt();if(!r)return null;const o=()=>{ri(!1),pl(!0)};return t?w.jsx(oi,{className:G(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:w.jsx(N1,{})}):w.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(N1,{}),"Minimize"]})},g_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=nt(),r=qa(),o=()=>{ml("modal"),r()};return t?w.jsx(oi,{className:G(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:w.jsx($T,{})}):w.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[w.jsx($T,{}),"Show modal"]})},n8=({isWidgetStandalone:e})=>{var _,S;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o}=nt(),{askCimPrompts:a,messages:u}=tr(),{isLoading:c,handleSuggestion:d}=Ir(),f=o==null?void 0:o.icon,p=(_=o==null?void 0:o.iconPosition)!=null?_:"left",m=B.useMemo(()=>{const A=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return u.some(N=>N.name==="conversation_reset")&&r||A},[u,n,r]),T=((S=a.message)==null?void 0:S.suggestions)||[],y=(A,C)=>()=>{d(A,C)};return w.jsxs("div",{className:G(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[w.jsx("p",{className:G(t,`${z}-ask-cim-entry-text`),children:m}),!!(T!=null&&T.length)&&w.jsx("div",{className:G(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:T.map(A=>{var C;return w.jsxs(bl,{disabled:c,className:G(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!f,"icon-right":!!f&&p==="right"}),onClick:y(A,((C=a.message)==null?void 0:C.eventSourceId)||""),children:[f&&w.jsx(bp,{icon:f,className:`${z}-suggestion-button-icon`}),w.jsx("span",{children:A.displayText})]},A.displayText)})})]})},r8=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=nt();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),m=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return w.jsxs("div",{className:G(r,`${z}-product-tile`,{embedded:!e,standalone:e}),children:[m?w.jsx("a",{href:`${m}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:w.jsx("img",{className:G(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):w.jsx("img",{className:G(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),w.jsxs("div",{className:G(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[w.jsxs("div",{className:G(r,`${z}-product-tile-content`),children:[u&&w.jsx("p",{className:`${z}-product-tile-brand`,children:u}),m?w.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:G(r,`${z}-product-tile-pdp`),href:`${m}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",w.jsx("span",{className:G(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):w.jsx("p",{className:G(r,`${z}-product-tile-name`),title:a,children:a})]}),w.jsx("div",{className:G(r,`${z}-product-tile-footer`),children:w.jsx("p",{className:G(r,`${z}-product-tile-price`),children:c})})]})]})},i8=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=nt(),o=t;return n?w.jsxs("div",{className:G(r,`${z}-display-products`),children:[w.jsx("p",{children:o.message}),o.products&&o.products.length>0&&w.jsx(OM,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:o.products.map(a=>{const u=n.getPid(a);return w.jsx(r8,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},o8=({globalClassName:e,message:t,isWidgetStandalone:n})=>w.jsx("div",{className:G(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:w.jsxs("p",{className:G(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[w.jsx(Rk,{})," ",t.message||"An error occurred while processing your request."]})}),s8=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var _;const{isLoading:a}=Ir(),{messages:u}=tr(),c=u.find(S=>S.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?yA(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=S=>{const A=n.suggestions.find(C=>C.displayText===S);A&&o(A,n.eventSourceId||n.id)};return w.jsxs("div",{className:G(e,`${z}-follow-up`),children:[w.jsx("p",{className:G(e,`${z}-text`),children:n.message}),w.jsx(e8,{suggestions:n.suggestions.map(S=>S.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function E_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function a8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function u8(e,t,n){const o=Nl((n||{}).ignore||[]),a=l8(t);let u=-1;for(;++u<a.length;)$E(e,"text",c);function c(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],_=T?T.children:void 0;if(o(y,_?_.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 _=0;const A=m.children.indexOf(f);let C=!1,N=[];T.lastIndex=0;let k=T.exec(f.value);for(;k;){const H=k.index,V={index:k.index,input:k.input,stack:[...p,f]};let F=y(...k,V);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?T.lastIndex=H+1:(_!==H&&N.push({type:"text",value:f.value.slice(_,H)}),Array.isArray(F)?N.push(...F):F&&N.push(F),_=H+k[0].length,C=!0),!T.global)break;k=T.exec(f.value)}return C?(_<f.value.length&&N.push({type:"text",value:f.value.slice(_)}),m.children.splice(A,1,...N)):N=[f],A+N.length}}function l8(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([c8(o[0]),d8(o[1])])}return t}function c8(e){return typeof e=="string"?new RegExp(a8(e),"g"):e}function d8(e){return typeof e=="function"?e:function(){return e}}const Tp="phrasing",_p=["autolink","link","image","label"];function f8(){return{transforms:[b8],enter:{literalAutolink:p8,literalAutolinkEmail:Sp,literalAutolinkHttp:Sp,literalAutolinkWww:Sp},exit:{literalAutolink:y8,literalAutolinkEmail:E8,literalAutolinkHttp:m8,literalAutolinkWww:g8}}}function h8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Tp,notInConstruct:_p},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Tp,notInConstruct:_p},{character:":",before:"[ps]",after:"\\/",inConstruct:Tp,notInConstruct:_p}]}}function p8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sp(e){this.config.enter.autolinkProtocol.call(this,e)}function m8(e){this.config.exit.autolinkProtocol.call(this,e)}function g8(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 E8(e){this.config.exit.autolinkEmail.call(this,e)}function y8(e){this.exit(e)}function b8(e){u8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,T8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),_8]],{ignore:["link","linkReference"]})}function T8(e,t,n,r,o){let a="";if(!y_(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!S8(n)))return!1;const u=x8(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 _8(e,t,n,r){return!y_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function S8(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 x8(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=E_(e,"(");let a=E_(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function y_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||uo(n)||xl(n))&&(!t||n!==47)}b_.peek=I8;function w8(){this.buffer()}function A8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function C8(){this.buffer()}function v8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function k8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function P8(e){this.exit(e)}function N8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function O8(e){this.exit(e)}function I8(){return"["}function b_(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function R8(){return{enter:{gfmFootnoteCallString:w8,gfmFootnoteCall:A8,gfmFootnoteDefinitionLabelString:C8,gfmFootnoteDefinition:v8},exit:{gfmFootnoteCallString:k8,gfmFootnoteCall:P8,gfmFootnoteDefinitionLabelString:N8,gfmFootnoteDefinition:O8}}}function L8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:b_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,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?`
32
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?T_:D8))),f(),d}}function D8(e,t,n){return t===0?e:T_(e,t,n)}function T_(e,t,n){return(n?"":" ")+e}const M8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];__.peek=z8;function F8(){return{canContainEols:["delete"],enter:{strikethrough:U8},exit:{strikethrough:H8}}}function B8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:M8}],handlers:{delete:__}}}function U8(e){this.enter({type:"delete",children:[]},e)}function H8(e){this.exit(e)}function __(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,pe(M({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function z8(){return"~"}function j8(e){return e.length}function $8(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||j8,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const S=[],A=[];let C=-1;for(e[p].length>f&&(f=e[p].length);++C<e[p].length;){const N=V8(e[p][C]);if(n.alignDelimiters!==!1){const k=o(N);A[C]=k,(d[C]===void 0||k>d[C])&&(d[C]=k)}S.push(N)}u[p]=S,c[p]=A}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=S_(r[m]);else{const S=S_(r);for(;++m<f;)a[m]=S}m=-1;const T=[],y=[];for(;++m<f;){const S=a[m];let A="",C="";S===99?(A=":",C=":"):S===108?A=":":S===114&&(C=":");let N=n.alignDelimiters===!1?1:Math.max(1,d[m]-A.length-C.length);const k=A+"-".repeat(N)+C;n.alignDelimiters!==!1&&(N=A.length+N+C.length,N>d[m]&&(d[m]=N),y[m]=N),T[m]=k}u.splice(1,0,T),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const S=u[p],A=c[p];m=-1;const C=[];for(;++m<f;){const N=S[m]||"";let k="",H="";if(n.alignDelimiters!==!1){const V=d[m]-(A[m]||0),F=a[m];F===114?k=" ".repeat(V):F===99?V%2?(k=" ".repeat(V/2+.5),H=" ".repeat(V/2-.5)):(k=" ".repeat(V/2),H=k):H=" ".repeat(V)}n.delimiterStart!==!1&&!m&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||m)&&C.push(" "),n.alignDelimiters!==!1&&C.push(k),C.push(N),n.alignDelimiters!==!1&&C.push(H),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&C.push("|")}_.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return _.join(`
33
+ `)}function V8(e){return e==null?"":String(e)}function S_(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 q8(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),Y8);return o(),u}function Y8(e,t,n){return">"+(n?"":" ")+e}function W8(e,t){return x_(e,t.inConstruct,!0)&&!x_(e,t.notInConstruct,!1)}function x_(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 w_(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
34
+ `&&W8(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
+ `}function G8(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function X8(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 K8(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Q8(e,t,n,r){const o=K8(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(X8(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,J8);return m(),T}const c=n.createTracker(r),d=o.repeat(Math.max(G8(a,o)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,M({before:p,after:" ",encode:["`"]},c.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,M({before:p,after:`
36
36
  `,encode:["`"]},c.current()))),m()}return p+=c.move(`
37
37
  `),a&&(p+=c.move(a+`
38
- `)),p+=c.move(d),f(),p}function Y8(e,t,n){return(n?"":" ")+e}function _p(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function W8(e,t,n,r){const o=_p(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),M({before:f,after:"]"},d.current()))),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,M({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,M({before:f,after:e.title?" ":`
39
- `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,M({before:f,after:o},d.current()))),f+=d.move(o),c()),u(),f}function G8(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ru(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pc(e,t,n){const r=ts(e),o=ts(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}x_.peek=X8;function x_(e,t,n,r){const o=G8(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let d=u.move(n.containerPhrasing(e,M({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=pc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=ru(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=pc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+ru(m));const y=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function X8(e,t,n){return n.options.emphasis||"*"}function K8(e,t){let n=!1;return Il(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Zf}),!!((!e.depth||e.depth<3)&&jf(e)&&(t.options.setext||n))}function Q8(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(K8(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,pe(M({},a.current()),{before:`
38
+ `)),p+=c.move(d),f(),p}function J8(e,t,n){return(n?"":" ")+e}function xp(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 Z8(e,t,n,r){const o=xp(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),M({before:f,after:"]"},d.current()))),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,M({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,M({before:f,after:e.title?" ":`
39
+ `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,M({before:f,after:o},d.current()))),f+=d.move(o),c()),u(),f}function eF(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 ru(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pc(e,t,n){const r=ts(e),o=ts(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}A_.peek=tF;function A_(e,t,n,r){const o=eF(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let d=u.move(n.containerPhrasing(e,M({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=pc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=ru(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=pc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+ru(m));const y=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function tF(e,t,n){return n.options.emphasis||"*"}function nF(e,t){let n=!1;return Il(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Zf}),!!((!e.depth||e.depth<3)&&jf(e)&&(t.options.setext||n))}function rF(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(nF(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,pe(M({},a.current()),{before:`
40
40
  `,after:`
41
41
  `}));return m(),p(),T+`
42
42
  `+(o===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
43
43
  `))+1))}const u="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,M({before:"# ",after:`
44
- `},a.current()));return/^[\t ]/.test(f)&&(f=ru(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}w_.peek=J8;function w_(e){return e.value||""}function J8(){return"<"}C_.peek=Z8;function C_(e,t,n,r){const o=_p(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,M({before:f,after:"]"},d.current()))),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,M({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,M({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,M({before:f,after:o},d.current()))),f+=d.move(o),c()),f+=d.move(")"),u(),f}function Z8(){return"!"}A_.peek=eF;function A_(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,M({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),M({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==m?d+=c.move(m+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function eF(){return"!"}v_.peek=tF;function v_(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return o+r+o}function tF(){return"`"}function k_(e,t){const n=jf(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))}P_.peek=nF;function P_(e,t,n,r){const o=_p(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(k_(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,M({before:m,after:">"},u.current()))),m+=u.move(">"),c(),n.stack=p,m}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,M({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,M({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,M({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+o),f+=u.move(n.safe(e.title,M({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),c(),f}function nF(e,t,n){return k_(e,n)?"<":"["}N_.peek=rF;function N_(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,M({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),M({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==m?d+=c.move(m+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function rF(){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 iF(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 oF(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 O_(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 sF(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?oF(n):Sp(n);const c=e.ordered?u==="."?")":".":iF(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),O_(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=c),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),f}function aF(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 uF(e,t,n,r){const o=aF(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;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.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 lF(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const cF=Nl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function dF(e,t,n,r){return(e.children.some(function(u){return cF(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function fF(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}I_.peek=hF;function I_(e,t,n,r){const o=fF(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,M({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=pc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=ru(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=pc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+ru(m));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function hF(e,t,n){return n.options.strong||"*"}function pF(e,t,n,r){return n.safe(e.value,r)}function mF(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 gF(e,t,n){const r=(O_(n)+(n.options.ruleSpaces?" ":"")).repeat(mF(n));return n.options.ruleSpaces?r.slice(0,-1):r}const R_={blockquote:U8,break:S_,code:q8,definition:W8,emphasis:x_,hardBreak:S_,heading:Q8,html:w_,image:C_,imageReference:A_,inlineCode:v_,link:P_,linkReference:N_,list:sF,listItem:uF,paragraph:lF,root:dF,strong:I_,text:pF,thematicBreak:gF};function EF(){return{enter:{table:yF,tableData:L_,tableHeader:L_,tableRow:TF},exit:{codeText:_F,table:bF,tableData:xp,tableHeader:xp,tableRow:xp}}}function yF(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 bF(e){this.exit(e),this.data.inTable=void 0}function TF(e){this.enter({type:"tableRow",children:[]},e)}function xp(e){this.exit(e)}function L_(e){this.enter({type:"tableCell",children:[]},e)}function _F(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,SF));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function SF(e,t){return t==="|"?t:e}function xF(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
45
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:c}};function u(y,_,S,A){return f(p(y,S,A),y.align)}function c(y,_,S,A){const v=m(y,S,A),N=f([v]);return N.slice(0,N.indexOf(`
46
- `))}function d(y,_,S,A){const v=S.enter("tableCell"),N=S.enter("phrasing"),k=S.containerPhrasing(y,pe(M({},A),{before:a,after:a}));return N(),v(),k}function f(y,_){return F8(y,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function p(y,_,S){const A=y.children;let v=-1;const N=[],k=_.enter("table");for(;++v<A.length;)N[v]=m(A[v],_,S);return k(),N}function m(y,_,S){const A=y.children;let v=-1;const N=[],k=_.enter("tableRow");for(;++v<A.length;)N[v]=d(A[v],y,_,S);return k(),N}function T(y,_,S){let A=R_.inlineCode(y,_,S);return S.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function wF(){return{exit:{taskListCheckValueChecked:D_,taskListCheckValueUnchecked:D_,paragraph:AF}}}function CF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:vF}}}function D_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function AF(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function vF(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=R_.listItem(e,t,n,M(M({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function kF(){return[s8(),v8(),O8(),EF(),wF()]}function PF(e){return{extensions:[a8(),k8(e),I8(),xF(e),CF()]}}const NF={tokenize:MF,partial:!0},M_={tokenize:FF,partial:!0},F_={tokenize:BF,partial:!0},B_={tokenize:UF,partial:!0},OF={tokenize:HF,partial:!0},U_={name:"wwwAutolink",tokenize:LF,previous:z_},H_={name:"protocolAutolink",tokenize:DF,previous:j_},ci={name:"emailAutolink",tokenize:RF,previous:$_},jr={};function IF(){return{text:jr}}let xo=48;for(;xo<123;)jr[xo]=ci,xo++,xo===58?xo=65:xo===91&&(xo=97);jr[43]=ci,jr[45]=ci,jr[46]=ci,jr[95]=ci,jr[72]=[ci,H_],jr[104]=[ci,H_],jr[87]=[ci,U_],jr[119]=[ci,U_];function RF(e,t,n){const r=this;let o,a;return u;function u(m){return!wp(m)||!$_.call(r,r.previous)||Cp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return wp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(OF,p,f)(m):m===45||m===95||pn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),o=!0,d}function p(m){return a&&o&&xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function LF(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!z_.call(r,r.previous)||Cp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(NF,e.attempt(M_,e.attempt(F_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function DF(e,t,n){const r=this;let o="",a=!1;return u;function u(m){return(m===72||m===104)&&j_.call(r,r.previous)&&!Cp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(xn(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const T=o.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||Sl(m)||ht(m)||uo(m)||xl(m)?n(m):e.attempt(M_,e.attempt(F_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function MF(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function FF(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(B_,d,c)(f):f===null||ht(f)||uo(f)||f!==45&&xl(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),u}function d(f){return o||r||!a?n(f):t(f)}}function BF(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(B_,t,a)(u):u===null||ht(u)||uo(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function UF(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||ht(c)||uo(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ht(c)||uo(c)?t(c):r(c)}function a(c){return xn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):xn(c)?(e.consume(c),u):n(c)}}function HF(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return pn(a)?n(a):t(a)}}function z_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function j_(e){return!xn(e)}function $_(e){return!(e===47||wp(e))}function wp(e){return e===43||e===45||e===46||e===95||pn(e)}function Cp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const zF={tokenize:XF,partial:!0};function jF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:YF,continuation:{tokenize:WF},exit:GF}},text:{91:{name:"gfmFootnoteCall",tokenize:qF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$F,resolveTo:VF}}}}function $F(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=mr(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 VF(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function qF(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||ht(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(mr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ht(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function YF(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!c||_===null||_===91||ht(_))return n(_);if(_===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=mr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return ht(_)||(c=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function T(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),nt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function WF(e,t,n){return e.check(Aa,t,e.attempt(zF,t,n))}function GF(e){e.exit("gfmFootnoteDefinition")}function XF(e,t,n){const r=this;return nt(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function KF(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let 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&&zn(T,T.length,0,wl(y,u.slice(f+1,d),c)),zn(T,T.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),zn(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(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const S=ts(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const A=u.exit("strikethroughSequenceTemporary"),v=ts(_);return A._open=!v||v===2&&!!S,A._close=!S||S===2&&!!v,c(_)}}}class QF{constructor(){this.map=[]}add(t,n,r){JF(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function JF(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function ZF(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function e9(){return{flow:{null:{name:"table",tokenize:t9,resolveAll:n9}}}}function t9(e,t,n){const r=this;let o=0,a=0,u;return c;function c($){let oe=r.events.length-1;for(;oe>-1;){const ne=r.events[oe][1].type;if(ne==="lineEnding"||ne==="linePrefix")oe--;else break}const de=oe>-1?r.events[oe][1].type:null,le=de==="tableHead"||de==="tableRow"?B:d;return le===B&&r.parser.lazy[r.now().line]?n($):le($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):He($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):Ze($)?nt(e,p,"whitespace")($):(a+=1,u&&(u=!1,o+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m($)))}function m($){return $===null||$===124||ht($)?(e.exit("data"),p($)):(e.consume($),$===92?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,Ze($)?nt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):_($))}function _($){return $===45||$===58?A($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),S):X($)}function S($){return Ze($)?nt(e,A,"whitespace")($):A($)}function A($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),v):$===45?(a+=1,v($)):$===null||He($)?H($):X($)}function v($){return $===45?(e.enter("tableDelimiterFiller"),N($)):X($)}function N($){return $===45?(e.consume($),N):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k($))}function k($){return Ze($)?nt(e,H,"whitespace")($):H($)}function H($){return $===124?_($):$===null||He($)?!u||o!==a?X($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):X($)}function X($){return n($)}function B($){return e.enter("tableRow"),q($)}function q($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),q):$===null||He($)?(e.exit("tableRow"),t($)):Ze($)?nt(e,q,"whitespace")($):(e.enter("data"),ie($))}function ie($){return $===null||$===124||ht($)?(e.exit("data"),q($)):(e.consume($),$===92?me:ie)}function me($){return $===92||$===124?(e.consume($),ie):ie($)}}function n9(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const T=new QF;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(V_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",p,t]])),o=_.type==="tableDelimiterRow"?2:p?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=mc(T,t,a,o,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=mc(T,t,a,o,void 0,m)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=mc(T,t,a,o,n,m)):u[1]!==0&&(m=mc(T,t,u,o,n,m)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&V_(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=ZF(t.events,n))}return e}function mc(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},ks(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=ks(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=ks(t.events,n[2]),p=ks(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 _=n[2]+1,S=n[3]-n[2]-1;e.add(_,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return o!==void 0&&(a.end=Object.assign({},ks(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function V_(e,t,n,r,o){const a=[],u=ks(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function ks(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const r9={name:"tasklistCheck",tokenize:o9};function i9(){return{text:{91:r9}}}function o9(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return ht(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return He(d)?t(d):Ze(d)?e.check({tokenize:s9},t,n)(d):n(d)}}function s9(e,t,n){return nt(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function a9(e){return uE([IF(),jF(),KF(e),e9(),i9()])}const u9={};function l9(e){const t=this,n=e||u9,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(a9(n)),a.push(kF()),u.push(PF(n))}const gc=()=>w.jsx("span",{className:`${j}-blinking-cursor`,children:w.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Ap=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(JE,{remarkPlugins:[l9],rehypePlugins:[cb],components:{h1:({children:o})=>w.jsx("h1",{className:G(e,`${j}-header h1`),children:o}),h2:({children:o})=>w.jsx("h2",{className:G(e,`${j}-header h2`),children:o}),h3:({children:o})=>w.jsx("h3",{className:G(e,`${j}-header h3`),children:o}),ul:({children:o})=>w.jsx("ul",{className:G(e,`${j}-ul`),children:o}),ol:({children:o})=>w.jsx("ol",{className:G(e,`${j}-ol`),children:o}),li:({children:o})=>w.jsx("li",{className:G(e,`${j}-li`),children:o}),a:({href:o,children:a})=>w.jsx(Eb,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>w.jsx("div",{className:G(e,`${j}-table-container`),children:w.jsx("table",{className:G(e,`${j}-table`),children:o})}),thead:({children:o})=>w.jsx("thead",{className:G(e,`${j}-thead`),children:o}),tbody:({children:o})=>w.jsx("tbody",{className:G(e,`${j}-tbody`),children:o}),tr:({children:o})=>w.jsx("tr",{className:G(e,`${j}-tr`),children:o}),th:({children:o})=>w.jsx("th",{className:G(e,`${j}-th`),children:o}),td:({children:o})=>w.jsx("td",{className:G(e,`${j}-td`),children:o}),span:({className:o,children:a})=>o===`${j}-blinking-cursor`?w.jsx(gc,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${j}-blinking-cursor'></span>`:"")}),c9=({globalClassName:e,message:t})=>{const[n,r]=F.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(d=>!d)};return w.jsxs("div",{children:[w.jsxs("div",{className:G(e,`${j}-progress-message`,"standalone"),children:[w.jsx("span",{className:G(e,`${j}-message-icon`,"progress-icon","standalone"),children:w.jsx(v1,{})}),w.jsx("p",{className:G(e,`${j}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&w.jsxs(w.Fragment,{children:[w.jsx(bl,{className:G(e,`${j}-thought-context-button`),onClick:c,children:n?w.jsxs(w.Fragment,{children:["Hide ",w.jsx(Nk,{})]}):w.jsxs(w.Fragment,{children:["Context ",w.jsx(Ok,{})]})}),n&&w.jsx("div",{className:G(e,`${j}-thought-container`),children:a&&w.jsx("p",{className:G(e,`${j}-progress-thought`),children:t.thought})})]})]})},d9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?w.jsx(c9,{globalClassName:e,message:t}):w.jsxs("div",{className:G(e,`${j}-progress-message`,"embedded"),title:t.message,children:[w.jsx("span",{className:G(e,`${j}-message-icon`,"progress-icon","embedded"),children:w.jsx(v1,{})}),w.jsx("i",{className:G(e,`${j}-progress-text`,"embedded"),children:t.message})]}),f9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return w.jsxs("div",{className:G(e,`${j}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&w.jsxs("div",{className:G(e,`${j}-refined-event-query`,{embedded:!n,standalone:n}),children:[w.jsx("span",{className:G(e,`${j}-message-icon`,`${j}-refined-event-icon`,{embedded:!n,standalone:n}),children:w.jsx(Xo,{role:"img"})}),w.jsx("p",{className:G(e,`${j}-text`,`${j}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),w.jsx(Ap,{text:t.message})]})},q_=e=>{var d,f;const{configModule:t}=at(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).filter(([p])=>!r.includes(p))),u=Object.keys(a),c=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:c}},Ec=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>w.jsx("span",{className:G(t,`${j}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),Y_=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=o[c])==null?void 0:f.join(", "))||"";return w.jsxs("div",{className:G(e,`${j}-facets`),children:[w.jsx("p",{className:G(e,`${j}-facet-category`),children:c}),w.jsx("p",{className:G(e,`${j}-facet-values`),children:d})]},c)})},iu=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>w.jsx("span",{className:G(e,`${j}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),h9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=q_(t),c=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?w.jsxs("div",{className:G(e,`${j}-user-message standalone`),children:[w.jsxs("div",{className:G(e,`${j}-user-message-row standalone`),children:[d?w.jsx("img",{className:G(e,`${j}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:G(e,`${j}-message-icon user-message-icon standalone`),children:w.jsx(P1,{})}),w.jsx("p",{className:G(e,`${j}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&w.jsx(Ec,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),w.jsx(Y_,{globalClassName:e,facetFiltersList:a,message:t}),w.jsx(iu,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):w.jsxs("div",{className:G(e,`${j}-user-message embedded`),children:[w.jsxs("div",{className:G(e,`${j}-user-message-row embedded`),children:[d?w.jsx("img",{className:G(e,`${j}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:G(e,`${j}-message-icon user-message-icon embedded`),children:w.jsx(P1,{})}),w.jsx("p",{className:G(e,`${j}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&w.jsx(Ec,{isWidgetStandalone:!1,filterCount:u})]}),w.jsx(iu,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},p9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>w.jsxs("div",{className:G(e,`${j}-user-search standalone`),children:[w.jsxs("div",{children:[w.jsxs("div",{className:G(e,`${j}-user-search-query standalone`),children:[d?w.jsx("img",{className:G(e,`${j}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):w.jsx("span",{className:G(e,`${j}-message-icon user-search-icon standalone`),children:w.jsx(Xo,{})}),w.jsx("p",{className:G(e,`${j}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&w.jsx(Ec,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),w.jsx(Y_,{globalClassName:e,facetFiltersList:u,message:a})]}),w.jsx(iu,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),m9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=q_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:m,queryLabel:T}=F.useMemo(()=>{var S,A,v;const _=typeof((S=r==null?void 0:r.clientContext)==null?void 0:S.cimLabel)=="string"?(A=r==null?void 0:r.clientContext)==null?void 0:A.cimLabel:r==null?void 0:r.label;switch(o){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(v=r==null?void 0:r.browseParams)==null?void 0:v.categoryId,queryLabel:_||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:_||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[o,r]);return m?n?w.jsx(p9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:c}):w.jsxs("div",{className:G(e,`${j}-user-search embedded`),children:[w.jsxs("div",{className:G(e,`${j}-user-search-query embedded`),children:[f?w.jsx("img",{className:G(e,`${j}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):w.jsx("span",{className:G(e,`${j}-message-icon user-search-icon embedded`),children:w.jsx(Xo,{})}),w.jsx("p",{className:G(e,`${j}-text bold embedded`),children:T||m}),u.length>0&&w.jsx(Ec,{isWidgetStandalone:!1,filterCount:c})]}),w.jsx(iu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},W_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var T;const{isLoading:c,isResponseLoading:d}=Or(),f=c&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const p=e.name,m=!!((T=e.request)!=null&&T.userPrompt);switch(p){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return m?w.jsx(h9,{globalClassName:t,isWidgetStandalone:a,message:e}):w.jsx(m9,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return w.jsx(f9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return w.jsx(e8,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return w.jsx(Ap,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return w.jsx(ZM,{message:e,isWidgetStandalone:a});case"display_products":return w.jsx(JM,{message:e,isWidgetStandalone:a});case"progress":return w.jsx(d9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:w.jsxs(w.Fragment,{children:[w.jsx("p",{className:G(t,`${j}-reset-message`),children:"This conversation has been reset."}),w.jsx("p",{className:G(t,`${j}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},g9=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=at(),{groupedMessages:a}=er(),{entryType:u}=Zn();return w.jsxs(w.Fragment,{children:[u==="ask_cim"&&w.jsx(KM,{isWidgetStandalone:e}),a.map(c=>{if(c.messages&&c.type==="group"){let d=new Date(c.createdAt).toLocaleString();const f=c.messages[c.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),w.jsxs("div",{className:G(n,`${j}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>w.jsx("div",{className:`${j}-message-group-child`,children:w.jsx(W_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),w.jsx(iu,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return w.jsx("div",{className:G(n,`${j}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:w.jsx(W_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},E9=({isOpen:e}={})=>{const{messages:t}=Or(),n=F.useRef(null);return F.useEffect(()=>{n.current&&n.current.scrollIntoView({behavior:"smooth",block:"end"})},[t]),F.useEffect(()=>{e&&n.current&&n.current.scrollIntoView(!0)},[e]),n},y9={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},vp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=E9({isOpen:e});return w.jsxs(w.Fragment,{children:[w.jsx(g9,{isWidgetStandalone:t,handleSuggestionClick:r}),n&&w.jsx("div",{style:M(M({},y9),o),children:w.jsx(gc,{})}),w.jsx("div",{ref:a})]})},G_=()=>{const{globalClassName:e,themeVariables:t}=at(),{copilot:n,isLoading:r,handleUserInput:o,handleSuggestion:a,resetConversation:u}=Or();return Ep()?n?w.jsxs("div",{className:G(e,`${j}-container`,`${j}-embedded-chat`),style:t,children:[w.jsx("div",{className:G(e,`${j}-message-container`,"embedded"),children:w.jsx(vp,{isWidgetStandalone:!1,isLoading:r,handleSuggestionClick:a})}),w.jsx(Ph,{componentType:"chat",className:"embedded-chat",isLoading:r,onSubmit:o}),w.jsx("div",{className:G(`${j}-embedded-chat-menu`),children:w.jsxs(uM,{componentType:"chat",children:[w.jsx(p_,{componentType:"chat"}),w.jsx(Tb,{componentType:"chat",onClearChat:u})]})})]}):w.jsx("div",{children:"Loading Copilot..."}):null},X_=e=>{var d;const{children:t,disabled:n}=e,[r,o]=F.useState((d=e.container)==null?void 0:d.current),a=F.useSyncExternalStore(T9,()=>!1,()=>!0),{getRootNode:u}=dc();if(F.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return w.jsx(w.Fragment,{children:t});const c=r!=null?r:b9(u);return w.jsx(w.Fragment,{children:F.Children.map(t,f=>Go.createPortal(f,c))})},b9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return go(n)?n:Dr(t).body},T9=()=>()=>{},K_=()=>{const{globalClassName:e,themeVariables:t}=at(),{mode:n,status:r,dialogPosition:o,isDialogFullHeight:a,dialogWidth:u}=Zn(),{copilot:c,isLoading:d,handleUserInput:f,handleSuggestion:p,resetConversation:m}=Or(),T=Ep(),{isOpen:y}=r||{},_=n==="standalone",S=()=>{ri(!1)};return c?w.jsx(l_,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:T,children:w.jsx(X_,{children:w.jsx(hp,{className:G(e,`${j}-container`,`${j}-dialog`,o,a&&"full-height"),style:M(M({},t),u&&{width:u}),children:w.jsxs(dp,{className:G(e,`${j}-dialog-content`,{standalone:_,embedded:!_}),children:[w.jsx(h_,{componentType:"dialog",onClearChat:m,onClose:S}),w.jsx(fp,{className:G(e,`${j}-message-container`,{standalone:_,embedded:!_}),children:w.jsx(vp,{isWidgetStandalone:_,isLoading:d,isOpen:y,handleSuggestionClick:p})}),w.jsx(Ph,{componentType:"dialog",isLoading:d,onSubmit:f})]})})})}):w.jsx("div",{children:"Loading Copilot..."})},Q_=()=>{const{globalClassName:e,themeVariables:t}=at(),{mode:n,status:r,isModalFullscreen:o}=Zn(),{copilot:a,isLoading:u,handleUserInput:c,handleSuggestion:d,resetConversation:f}=Or(),{isOpen:p}=r||{},m=n==="standalone",T=Ep(),y=({open:S})=>{ri(S)},_=()=>{ri(!1)};return T?a?w.jsx(l_,{lazyMount:!0,unmountOnExit:!0,open:T,onOpenChange:y,children:w.jsx(X_,{children:w.jsxs("div",{className:G(e,`${j}-modal-container`),style:t,children:[w.jsx(i_,{className:G(e,`${j}-modal-backdrop`)}),w.jsx(hp,{className:G(e,`${j}-container`,`${j}-modal`,{fullscreen:o,standalone:m,embedded:!m}),children:w.jsxs(dp,{className:G(e,`${j}-modal-content`,{standalone:m,embedded:!m}),children:[w.jsx(h_,{componentType:"modal",onClearChat:f,onClose:_}),w.jsx(fp,{className:G(e,`${j}-message-container`,{standalone:m,embedded:!m}),children:w.jsx(vp,{isWidgetStandalone:m,isLoading:u,isOpen:p,handleSuggestionClick:d,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),w.jsx(Ph,{componentType:"modal",isLoading:u,onSubmit:c})]})})]})})}):w.jsx("div",{children:"Loading Copilot..."}):null},_9=()=>{const e=Zn(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx(kk,{}):t==="dialog"?w.jsx(K_,{}):t==="modal"?w.jsx(Q_,{}):w.jsx(G_,{})},S9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=vf();F.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"&&o(d))};return Bv(a),()=>{Uv(a)}},[e,t,n,r,o])},x9=()=>{const{copilot:e}=er(),{entryType:t,activePromptsId:n,params:r}=wi(),{setIsInitialized:o,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:c,setIsResponseLoading:d}=vf(),{getCopilotSuggestions:f}=m1();S9();const p=F.useCallback(_=>{if(!t||!_)return;f(_,t,A=>{a(A.id)})},[t,f,a]);F.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=F.useCallback(_=>{_.eventSourceId===n&&(u(_),a(_.id),o(!0))},[n,u,a,o]),T=F.useCallback(_=>{(_==null?void 0:_.eventSourceId)===n&&(c(_),d(!1))},[n,c,d]),y=F.useCallback(()=>{o(!0),d(!1)},[o,d]);return F.useEffect(()=>{if(e)return e.on("follow_up",m),e.on("inquiry",T),e.on("error",y),()=>{e.off("follow_up",m),e.off("inquiry",T),e.off("error",y)}},[e,m,T,y]),null},w9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n}=at(),{placeholder:r,isResponseLoading:o}=wi(),[a,u]=F.useState(""),c=t||o,d=f=>{const p=a.trim();p&&(f.preventDefault(),e(p),u(""))};return w.jsxs("form",{className:G(n,`${j}-prompts-input-container`),name:`${j}-prompts-form`,onSubmit:d,children:[w.jsx("label",{htmlFor:`${j}-prompts-input`,"aria-label":r||"Ask Copilot",children:w.jsx(aM,{className:G(n,`${j}-prompts-input-icon`)})}),w.jsx("input",{id:`${j}-prompts-input`,className:G(n,`${j}-prompts-input`),name:`${j}-prompts-input`,placeholder:r||"Ask Copilot",type:"text",disabled:c,value:a,onChange:f=>u(f.target.value)}),w.jsx(ii,{className:G(n,`${j}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(Xo,{}),disabled:c})]})},C9=({sendCopilotPrompt:e})=>{var p,m;const{globalClassName:t}=at(),{promptsMessage:n,isResponseLoading:r,isInitialized:o,isInline:a,askElseButtonLabel:u}=wi(),c=T=>()=>{const y=T.displayText.trim();y&&e(y)},d=()=>{ri(!0)},f=!!(n!=null&&n.suggestions&&((p=n==null?void 0:n.suggestions)!=null&&p.length));return w.jsxs("div",{className:G(t,`${j}-prompts-button-group`),children:[!o&&w.jsx(gc,{}),o&&f&&((m=n==null?void 0:n.suggestions)==null?void 0:m.map(T=>w.jsx("button",{className:G(t,`${j}-prompts-button`),disabled:r,onClick:c(T),children:T.displayText},T.displayText))),o&&f&&!a&&w.jsx("button",{className:G(t,`${j}-prompts-button`),disabled:r,onClick:d,children:u||"Ask me something else"})]})},A9=()=>{const{globalClassName:e}=at(),{isInline:t,userPrompt:n}=wi();return!n||!t?null:w.jsx("div",{className:G(e,`${j}-prompts-user-message-container`),children:w.jsx("p",{className:G(e,`${j}-prompts-user-message`),children:n})})},v9=()=>{const{globalClassName:e,openLinksInNewTab:t}=at(),{isInline:n,responseMessage:r,isResponseLoading:o}=wi();return!n||!r&&!o?null:o?w.jsx(gc,{}):r?w.jsx("div",{className:G(e,`${j}-prompts-response-container`,`${j}-message-container`),children:w.jsx(Ap,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},k9=()=>{const{globalClassName:e,themeVariables:t}=at(),{connected:n,copilot:r}=er(),{handleCopilotRequestAck:o}=Wo(),{status:{isOpen:a}}=Zn(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p}=wi(),{setActivePromptsId:m,setUserPrompt:T,setResponseMessage:y,setIsResponseLoading:_}=vf(),[S,A]=F.useState(null);F.useEffect(()=>{if(!d||S)return;const N=document.getElementById(d);N&&A(N)},[d,S]);const v=F.useCallback(N=>{if(!r||!f||!p)return;const k=X=>{c?(y(null),T(N),m(X.id),_(!0)):(a||ri(!0),o(X))},H={userPrompt:N,clientContext:M({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(H,k);break;case"search":r.search(M({searchParams:p},H),k);break;case"browse":r.browse(M({browseParams:p},H),k);break;case"pdp":r.productView(M(M({},p),H),k);break}},[r,c,f,p,a,m,y,T,_,o]);return!n||!u||!S||!f?null:Go.createPortal(w.jsxs("div",{className:G(e,`${j}-prompts-extension-container`),style:t,children:[w.jsx(w9,{onSubmit:v}),w.jsx(C9,{sendCopilotPrompt:v}),w.jsxs("div",{className:G(e,`${j}-prompts-extension-messages-container`),children:[w.jsx(A9,{}),w.jsx(v9,{})]})]}),S)},P9=()=>w.jsxs(w.Fragment,{children:[w.jsx(x9,{}),w.jsx(k9,{})]}),kp=e=>w.jsxs(g1,pe(M({},e),{children:[w.jsx(_9,{}),w.jsx(P9,{})]}));var yc={},J_;function N9(){if(J_)return yc;J_=1;var e=_1();return yc.createRoot=e.createRoot,yc.hydrateRoot=e.hydrateRoot,yc}var Z_=N9();const O9=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=cn(o,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const m of d)if(m.type==="childList"&&m.addedNodes.length)for(const T of m.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Yo(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=Z_.createRoot(T))==null||p.render(w.jsx(kp,M({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Yo(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},I9=r=>{var o=r,{timeout:e,elementId:t}=o,n=cn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Yo(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Yo(!0,"warn","Container element not found for id:",t),Yo(!0,"warn","Beginning observation for element"),O9(M({elementId:t,timeout:e},n));return}Z_.createRoot(a).render(w.jsx(kp,M({},n)))},R9={search:Qv,browse:Rv,pdp:{setPdpContext:e1,updatePdpProductId:Dv,updatePdpLink:Mv},components:{setEntryType:Ea,toggleWidgetOpen:ri,toggleWidgetMinimized:pl,toggleModalFullscreen:wf,setWidgetType:ml,setWidgetDialogPosition:Cf,togglePromptsExtensionOpen:n1,togglePromptsExtensionInline:r1,loadPromptsComponent:Vv,getAskCimPrompts:Hv,getSearchPrompts:zv,getBrowsePrompts:jv,getProductViewPrompts:$v},session:qv},L9=()=>Object.freeze({search:Object.freeze(Tt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(pr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType});Fe.CopilotDialog=K_,Fe.CopilotEmbed=G_,Fe.CopilotModal=Q_,Fe.CopilotWidget=kp,Fe.CopilotWidgetProvider=g1,Fe.eventHandlers=R9,Fe.injectCopilotWidget=I9,Fe.state=L9,Fe.useCopilot=Or,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));
44
+ `},a.current()));return/^[\t ]/.test(f)&&(f=ru(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}C_.peek=iF;function C_(e){return e.value||""}function iF(){return"<"}v_.peek=oF;function v_(e,t,n,r){const o=xp(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,M({before:f,after:"]"},d.current()))),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,M({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,M({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,M({before:f,after:o},d.current()))),f+=d.move(o),c()),f+=d.move(")"),u(),f}function oF(){return"!"}k_.peek=sF;function k_(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,M({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),M({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==m?d+=c.move(m+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function sF(){return"!"}P_.peek=aF;function P_(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return o+r+o}function aF(){return"`"}function N_(e,t){const n=jf(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))}O_.peek=uF;function O_(e,t,n,r){const o=xp(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(N_(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,M({before:m,after:">"},u.current()))),m+=u.move(">"),c(),n.stack=p,m}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,M({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,M({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,M({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+o),f+=u.move(n.safe(e.title,M({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),c(),f}function uF(e,t,n){return N_(e,n)?"<":"["}I_.peek=lF;function I_(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,M({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),M({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==m?d+=c.move(m+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function lF(){return"["}function wp(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 cF(e){const t=wp(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 dF(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 R_(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 fF(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?dF(n):wp(n);const c=e.ordered?u==="."?")":".":cF(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),R_(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=c),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),f}function hF(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 pF(e,t,n,r){const o=hF(n);let a=n.bulletCurrent||wp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.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 mF(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const gF=Nl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function EF(e,t,n,r){return(e.children.some(function(u){return gF(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function yF(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}L_.peek=bF;function L_(e,t,n,r){const o=yF(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,M({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=pc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=ru(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=pc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+ru(m));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function bF(e,t,n){return n.options.strong||"*"}function TF(e,t,n,r){return n.safe(e.value,r)}function _F(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 SF(e,t,n){const r=(R_(n)+(n.options.ruleSpaces?" ":"")).repeat(_F(n));return n.options.ruleSpaces?r.slice(0,-1):r}const D_={blockquote:q8,break:w_,code:Q8,definition:Z8,emphasis:A_,hardBreak:w_,heading:rF,html:C_,image:v_,imageReference:k_,inlineCode:P_,link:O_,linkReference:I_,list:fF,listItem:pF,paragraph:mF,root:EF,strong:L_,text:TF,thematicBreak:SF};function xF(){return{enter:{table:wF,tableData:M_,tableHeader:M_,tableRow:CF},exit:{codeText:vF,table:AF,tableData:Ap,tableHeader:Ap,tableRow:Ap}}}function wF(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 AF(e){this.exit(e),this.data.inTable=void 0}function CF(e){this.enter({type:"tableRow",children:[]},e)}function Ap(e){this.exit(e)}function M_(e){this.enter({type:"tableCell",children:[]},e)}function vF(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,kF));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function kF(e,t){return t==="|"?t:e}function PF(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
45
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:c}};function u(y,_,S,A){return f(p(y,S,A),y.align)}function c(y,_,S,A){const C=m(y,S,A),N=f([C]);return N.slice(0,N.indexOf(`
46
+ `))}function d(y,_,S,A){const C=S.enter("tableCell"),N=S.enter("phrasing"),k=S.containerPhrasing(y,pe(M({},A),{before:a,after:a}));return N(),C(),k}function f(y,_){return $8(y,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function p(y,_,S){const A=y.children;let C=-1;const N=[],k=_.enter("table");for(;++C<A.length;)N[C]=m(A[C],_,S);return k(),N}function m(y,_,S){const A=y.children;let C=-1;const N=[],k=_.enter("tableRow");for(;++C<A.length;)N[C]=d(A[C],y,_,S);return k(),N}function T(y,_,S){let A=D_.inlineCode(y,_,S);return S.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function NF(){return{exit:{taskListCheckValueChecked:F_,taskListCheckValueUnchecked:F_,paragraph:IF}}}function OF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:RF}}}function F_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function IF(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function RF(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=D_.listItem(e,t,n,M(M({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function LF(){return[f8(),R8(),F8(),xF(),NF()]}function DF(e){return{extensions:[h8(),L8(e),B8(),PF(e),OF()]}}const MF={tokenize:jF,partial:!0},B_={tokenize:$F,partial:!0},U_={tokenize:VF,partial:!0},H_={tokenize:qF,partial:!0},FF={tokenize:YF,partial:!0},z_={name:"wwwAutolink",tokenize:HF,previous:$_},j_={name:"protocolAutolink",tokenize:zF,previous:V_},di={name:"emailAutolink",tokenize:UF,previous:q_},$r={};function BF(){return{text:$r}}let xo=48;for(;xo<123;)$r[xo]=di,xo++,xo===58?xo=65:xo===91&&(xo=97);$r[43]=di,$r[45]=di,$r[46]=di,$r[95]=di,$r[72]=[di,j_],$r[104]=[di,j_],$r[87]=[di,z_],$r[119]=[di,z_];function UF(e,t,n){const r=this;let o,a;return u;function u(m){return!Cp(m)||!q_.call(r,r.previous)||vp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return Cp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(FF,p,f)(m):m===45||m===95||pn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),o=!0,d}function p(m){return a&&o&&xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function HF(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!$_.call(r,r.previous)||vp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(MF,e.attempt(B_,e.attempt(U_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function zF(e,t,n){const r=this;let o="",a=!1;return u;function u(m){return(m===72||m===104)&&V_.call(r,r.previous)&&!vp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(xn(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const T=o.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||Sl(m)||ht(m)||uo(m)||xl(m)?n(m):e.attempt(B_,e.attempt(U_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function jF(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function $F(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(H_,d,c)(f):f===null||ht(f)||uo(f)||f!==45&&xl(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),u}function d(f){return o||r||!a?n(f):t(f)}}function VF(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(H_,t,a)(u):u===null||ht(u)||uo(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function qF(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||ht(c)||uo(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ht(c)||uo(c)?t(c):r(c)}function a(c){return xn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):xn(c)?(e.consume(c),u):n(c)}}function YF(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return pn(a)?n(a):t(a)}}function $_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function V_(e){return!xn(e)}function q_(e){return!(e===47||Cp(e))}function Cp(e){return e===43||e===45||e===46||e===95||pn(e)}function vp(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 WF={tokenize:t9,partial:!0};function GF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:JF,continuation:{tokenize:ZF},exit:e9}},text:{91:{name:"gfmFootnoteCall",tokenize:QF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:XF,resolveTo:KF}}}}function XF(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=gr(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 KF(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function QF(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||ht(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(gr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ht(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function JF(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!c||_===null||_===91||ht(_))return n(_);if(_===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=gr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return ht(_)||(c=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function T(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),rt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function ZF(e,t,n){return e.check(Ca,t,e.attempt(WF,t,n))}function e9(e){e.exit("gfmFootnoteDefinition")}function t9(e,t,n){const r=this;return rt(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function n9(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let 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&&jn(T,T.length,0,wl(y,u.slice(f+1,d),c)),jn(T,T.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),jn(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(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const S=ts(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const A=u.exit("strikethroughSequenceTemporary"),C=ts(_);return A._open=!C||C===2&&!!S,A._close=!S||S===2&&!!C,c(_)}}}class r9{constructor(){this.map=[]}add(t,n,r){i9(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function i9(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function o9(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function s9(){return{flow:{null:{name:"table",tokenize:a9,resolveAll:u9}}}}function a9(e,t,n){const r=this;let o=0,a=0,u;return c;function c($){let oe=r.events.length-1;for(;oe>-1;){const te=r.events[oe][1].type;if(te==="lineEnding"||te==="linePrefix")oe--;else break}const ce=oe>-1?r.events[oe][1].type:null,fe=ce==="tableHead"||ce==="tableRow"?F:d;return fe===F&&r.parser.lazy[r.now().line]?n($):fe($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):He($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):Ze($)?rt(e,p,"whitespace")($):(a+=1,u&&(u=!1,o+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m($)))}function m($){return $===null||$===124||ht($)?(e.exit("data"),p($)):(e.consume($),$===92?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,Ze($)?rt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):_($))}function _($){return $===45||$===58?A($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),S):V($)}function S($){return Ze($)?rt(e,A,"whitespace")($):A($)}function A($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),C):$===45?(a+=1,C($)):$===null||He($)?H($):V($)}function C($){return $===45?(e.enter("tableDelimiterFiller"),N($)):V($)}function N($){return $===45?(e.consume($),N):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k($))}function k($){return Ze($)?rt(e,H,"whitespace")($):H($)}function H($){return $===124?_($):$===null||He($)?!u||o!==a?V($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):V($)}function V($){return n($)}function F($){return e.enter("tableRow"),q($)}function q($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),q):$===null||He($)?(e.exit("tableRow"),t($)):Ze($)?rt(e,q,"whitespace")($):(e.enter("data"),ie($))}function ie($){return $===null||$===124||ht($)?(e.exit("data"),q($)):(e.consume($),$===92?ge:ie)}function ge($){return $===92||$===124?(e.consume($),ie):ie($)}}function u9(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const T=new r9;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(Y_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",p,t]])),o=_.type==="tableDelimiterRow"?2:p?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=mc(T,t,a,o,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=mc(T,t,a,o,void 0,m)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=mc(T,t,a,o,n,m)):u[1]!==0&&(m=mc(T,t,u,o,n,m)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&Y_(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=o9(t.events,n))}return e}function mc(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},ks(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=ks(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=ks(t.events,n[2]),p=ks(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 _=n[2]+1,S=n[3]-n[2]-1;e.add(_,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return o!==void 0&&(a.end=Object.assign({},ks(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function Y_(e,t,n,r,o){const a=[],u=ks(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function ks(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const l9={name:"tasklistCheck",tokenize:d9};function c9(){return{text:{91:l9}}}function d9(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return ht(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return He(d)?t(d):Ze(d)?e.check({tokenize:f9},t,n)(d):n(d)}}function f9(e,t,n){return rt(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function h9(e){return cE([BF(),GF(),n9(e),s9(),c9()])}const p9={};function m9(e){const t=this,n=e||p9,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(h9(n)),a.push(LF()),u.push(DF(n))}const gc=()=>w.jsx("span",{className:`${z}-blinking-cursor`,children:w.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),kp=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(ey,{remarkPlugins:[m9],rehypePlugins:[fb],components:{h1:({children:o})=>w.jsx("h1",{className:G(e,`${z}-header h1`),children:o}),h2:({children:o})=>w.jsx("h2",{className:G(e,`${z}-header h2`),children:o}),h3:({children:o})=>w.jsx("h3",{className:G(e,`${z}-header h3`),children:o}),ul:({children:o})=>w.jsx("ul",{className:G(e,`${z}-ul`),children:o}),ol:({children:o})=>w.jsx("ol",{className:G(e,`${z}-ol`),children:o}),li:({children:o})=>w.jsx("li",{className:G(e,`${z}-li`),children:o}),a:({href:o,children:a})=>w.jsx(bb,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>w.jsx("div",{className:G(e,`${z}-table-container`),children:w.jsx("table",{className:G(e,`${z}-table`),children:o})}),thead:({children:o})=>w.jsx("thead",{className:G(e,`${z}-thead`),children:o}),tbody:({children:o})=>w.jsx("tbody",{className:G(e,`${z}-tbody`),children:o}),tr:({children:o})=>w.jsx("tr",{className:G(e,`${z}-tr`),children:o}),th:({children:o})=>w.jsx("th",{className:G(e,`${z}-th`),children:o}),td:({children:o})=>w.jsx("td",{className:G(e,`${z}-td`),children:o}),span:({className:o,children:a})=>o===`${z}-blinking-cursor`?w.jsx(gc,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${z}-blinking-cursor'></span>`:"")}),g9=({globalClassName:e,message:t})=>{const[n,r]=B.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(d=>!d)};return w.jsxs("div",{children:[w.jsxs("div",{className:G(e,`${z}-progress-message`,"standalone"),children:[w.jsx("span",{className:G(e,`${z}-message-icon`,"progress-icon","standalone"),children:w.jsx(P1,{})}),w.jsx("p",{className:G(e,`${z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&w.jsxs(w.Fragment,{children:[w.jsx(bl,{className:G(e,`${z}-thought-context-button`),onClick:c,children:n?w.jsxs(w.Fragment,{children:["Hide ",w.jsx(Lk,{})]}):w.jsxs(w.Fragment,{children:["Context ",w.jsx(Dk,{})]})}),n&&w.jsx("div",{className:G(e,`${z}-thought-container`),children:a&&w.jsx("p",{className:G(e,`${z}-progress-thought`),children:t.thought})})]})]})},E9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?w.jsx(g9,{globalClassName:e,message:t}):w.jsxs("div",{className:G(e,`${z}-progress-message`,"embedded"),title:t.message,children:[w.jsx("span",{className:G(e,`${z}-message-icon`,"progress-icon","embedded"),children:w.jsx(P1,{})}),w.jsx("i",{className:G(e,`${z}-progress-text`,"embedded"),children:t.message})]}),y9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return w.jsxs("div",{className:G(e,`${z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&w.jsxs("div",{className:G(e,`${z}-refined-event-query`,{embedded:!n,standalone:n}),children:[w.jsx("span",{className:G(e,`${z}-message-icon`,`${z}-refined-event-icon`,{embedded:!n,standalone:n}),children:w.jsx(Xo,{role:"img"})}),w.jsx("p",{className:G(e,`${z}-text`,`${z}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),w.jsx(kp,{text:t.message})]})},W_=e=>{var d,f;const{configModule:t}=nt(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).filter(([p])=>!r.includes(p))),u=Object.keys(a),c=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:c}},Ec=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>w.jsx("span",{className:G(t,`${z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),G_=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=o[c])==null?void 0:f.join(", "))||"";return w.jsxs("div",{className:G(e,`${z}-facets`),children:[w.jsx("p",{className:G(e,`${z}-facet-category`),children:c}),w.jsx("p",{className:G(e,`${z}-facet-values`),children:d})]},c)})},iu=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>w.jsx("span",{className:G(e,`${z}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),b9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=W_(t),c=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?w.jsxs("div",{className:G(e,`${z}-user-message standalone`),children:[w.jsxs("div",{className:G(e,`${z}-user-message-row standalone`),children:[d?w.jsx("img",{className:G(e,`${z}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:G(e,`${z}-message-icon user-message-icon standalone`),children:w.jsx(O1,{})}),w.jsx("p",{className:G(e,`${z}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&w.jsx(Ec,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),w.jsx(G_,{globalClassName:e,facetFiltersList:a,message:t}),w.jsx(iu,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):w.jsxs("div",{className:G(e,`${z}-user-message embedded`),children:[w.jsxs("div",{className:G(e,`${z}-user-message-row embedded`),children:[d?w.jsx("img",{className:G(e,`${z}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:G(e,`${z}-message-icon user-message-icon embedded`),children:w.jsx(O1,{})}),w.jsx("p",{className:G(e,`${z}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&w.jsx(Ec,{isWidgetStandalone:!1,filterCount:u})]}),w.jsx(iu,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},T9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>w.jsxs("div",{className:G(e,`${z}-user-search standalone`),children:[w.jsxs("div",{children:[w.jsxs("div",{className:G(e,`${z}-user-search-query standalone`),children:[d?w.jsx("img",{className:G(e,`${z}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):w.jsx("span",{className:G(e,`${z}-message-icon user-search-icon standalone`),children:w.jsx(Xo,{})}),w.jsx("p",{className:G(e,`${z}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&w.jsx(Ec,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),w.jsx(G_,{globalClassName:e,facetFiltersList:u,message:a})]}),w.jsx(iu,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),_9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=W_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:m,queryLabel:T}=B.useMemo(()=>{var S,A,C;const _=typeof((S=r==null?void 0:r.clientContext)==null?void 0:S.cimLabel)=="string"?(A=r==null?void 0:r.clientContext)==null?void 0:A.cimLabel:r==null?void 0:r.label;switch(o){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(C=r==null?void 0:r.browseParams)==null?void 0:C.categoryId,queryLabel:_||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:_||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[o,r]);return m?n?w.jsx(T9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:c}):w.jsxs("div",{className:G(e,`${z}-user-search embedded`),children:[w.jsxs("div",{className:G(e,`${z}-user-search-query embedded`),children:[f?w.jsx("img",{className:G(e,`${z}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):w.jsx("span",{className:G(e,`${z}-message-icon user-search-icon embedded`),children:w.jsx(Xo,{})}),w.jsx("p",{className:G(e,`${z}-text bold embedded`),children:T||m}),u.length>0&&w.jsx(Ec,{isWidgetStandalone:!1,filterCount:c})]}),w.jsx(iu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},X_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var T;const{isLoading:c,isResponseLoading:d}=Ir(),f=c&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const p=e.name,m=!!((T=e.request)!=null&&T.userPrompt);switch(p){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return m?w.jsx(b9,{globalClassName:t,isWidgetStandalone:a,message:e}):w.jsx(_9,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return w.jsx(y9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return w.jsx(s8,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return w.jsx(kp,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return w.jsx(o8,{message:e,isWidgetStandalone:a});case"display_products":return w.jsx(i8,{message:e,isWidgetStandalone:a});case"progress":return w.jsx(E9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:w.jsxs(w.Fragment,{children:[w.jsx("p",{className:G(t,`${z}-reset-message`),children:"This conversation has been reset."}),w.jsx("p",{className:G(t,`${z}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},S9=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=nt(),{groupedMessages:a}=tr(),{entryType:u}=er();return w.jsxs(w.Fragment,{children:[u==="ask_cim"&&w.jsx(n8,{isWidgetStandalone:e}),a.map(c=>{if(c.messages&&c.type==="group"){let d=new Date(c.createdAt).toLocaleString();const f=c.messages[c.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),w.jsxs("div",{className:G(n,`${z}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>w.jsx("div",{className:`${z}-message-group-child`,children:w.jsx(X_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),w.jsx(iu,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return w.jsx("div",{className:G(n,`${z}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:w.jsx(X_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},x9=({isOpen:e}={})=>{const{messages:t}=Ir(),{autoScroll:n}=nt(),r=B.useRef(null);return B.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),B.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},w9={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Pp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=x9({isOpen:e});return w.jsxs(w.Fragment,{children:[w.jsx(S9,{isWidgetStandalone:t,handleSuggestionClick:r}),n&&w.jsx("div",{style:M(M({},w9),o),children:w.jsx(gc,{})}),w.jsx("div",{ref:a})]})},K_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=nt(),{copilot:r,isLoading:o,handleUserInput:a,handleSuggestion:u,resetConversation:c}=Ir();return yp()?r?w.jsxs("div",{className:G(e,`${z}-container`,`${z}-embedded-chat`),style:t,children:[w.jsx("div",{className:G(e,`${z}-message-container`,`container-${n}`,"embedded"),children:w.jsx(Pp,{isWidgetStandalone:!1,isLoading:o,handleSuggestionClick:u})}),w.jsx(Ph,{componentType:"chat",className:"embedded-chat",isLoading:o,onSubmit:a}),w.jsx("div",{className:G(`${z}-embedded-chat-menu`),children:w.jsxs(hM,{componentType:"chat",children:[w.jsx(g_,{componentType:"chat"}),w.jsx(Sb,{componentType:"chat",onClearChat:c})]})})]}):w.jsx("div",{children:"Loading Copilot..."}):null},Q_=e=>{var d;const{children:t,disabled:n}=e,[r,o]=B.useState((d=e.container)==null?void 0:d.current),a=B.useSyncExternalStore(C9,()=>!1,()=>!0),{getRootNode:u}=dc();if(B.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return w.jsx(w.Fragment,{children:t});const c=r!=null?r:A9(u);return w.jsx(w.Fragment,{children:B.Children.map(t,f=>Go.createPortal(f,c))})},A9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return go(n)?n:Mr(t).body},C9=()=>()=>{},J_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=nt(),{mode:r,status:o,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=er(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:T}=Ir(),y=yp(),{isOpen:_}=o||{},S=r==="standalone",A=()=>{ri(!1)};return y?d?w.jsx(d_,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,children:w.jsx(Q_,{children:w.jsx(pp,{className:G(e,`${z}-container`,`${z}-dialog`,a,u&&"full-height"),style:M(M({},t),c&&{width:c}),children:w.jsxs(fp,{className:G(e,`${z}-dialog-content`,{standalone:S,embedded:!S}),children:[w.jsx(m_,{componentType:"dialog",onClearChat:T,onClose:A}),w.jsx(hp,{className:G(e,`${z}-message-container`,`container-${n}`,{standalone:S,embedded:!S}),children:w.jsx(Pp,{isWidgetStandalone:S,isLoading:f,isOpen:_,handleSuggestionClick:m})}),w.jsx(Ph,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):w.jsx("div",{children:"Loading Copilot..."}):null},Z_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=nt(),{mode:r,status:o,isModalFullscreen:a}=er(),{copilot:u,isLoading:c,handleUserInput:d,handleSuggestion:f,resetConversation:p}=Ir(),{isOpen:m}=o||{},T=r==="standalone",y=yp(),_=({open:A})=>{ri(A)},S=()=>{ri(!1)};return y?u?w.jsx(d_,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:_,children:w.jsx(Q_,{children:w.jsxs("div",{className:G(e,`${z}-modal-container`),style:t,children:[w.jsx(s_,{className:G(e,`${z}-modal-backdrop`)}),w.jsx(pp,{className:G(e,`${z}-container`,`${z}-modal`,{fullscreen:a,standalone:T,embedded:!T}),children:w.jsxs(fp,{className:G(e,`${z}-modal-content`,{standalone:T,embedded:!T}),children:[w.jsx(m_,{componentType:"modal",onClearChat:p,onClose:S}),w.jsx(hp,{className:G(e,`${z}-message-container`,`container-${n}`,{standalone:T,embedded:!T}),children:w.jsx(Pp,{isWidgetStandalone:T,isLoading:c,isOpen:m,handleSuggestionClick:f,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),w.jsx(Ph,{componentType:"modal",isLoading:c,onSubmit:d})]})})]})})}):w.jsx("div",{children:"Loading Copilot..."}):null},v9=()=>{const e=er(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx(Ik,{}):t==="dialog"?w.jsx(J_,{}):t==="modal"?w.jsx(Z_,{}):w.jsx(K_,{})},k9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=vf();B.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&o(d))};return jv(a),()=>{$v(a)}},[e,t,n,r,o])},P9=()=>{const{copilot:e}=tr(),{entryType:t,activePromptsId:n,params:r}=ii(),{setIsInitialized:o,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:c,setIsResponseLoading:d}=vf(),{getCopilotSuggestions:f}=E1();k9();const p=B.useCallback(_=>{if(!t||!_)return;f(_,t,A=>{a(A.id)})},[t,f,a]);B.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=B.useCallback(_=>{_.eventSourceId===n&&(u(_),a(_.id),o(!0))},[n,u,a,o]),T=B.useCallback(_=>{(_==null?void 0:_.eventSourceId)===n&&(c(_),d(!1))},[n,c,d]),y=B.useCallback(()=>{o(!0),d(!1)},[o,d]);return B.useEffect(()=>{if(e)return e.on("follow_up",m),e.on("inquiry",T),e.on("error",y),()=>{e.off("follow_up",m),e.off("inquiry",T),e.off("error",y)}},[e,m,T,y]),null},eS={copilot:"Ask Copilot",messaging:"Ask a question"},N9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=nt(),{placeholder:o,isResponseLoading:a}=ii(),u=o||eS[r],[c,d]=B.useState(""),f=t||a,p=m=>{const T=c.trim();T&&(m.preventDefault(),e(T),d(""))};return w.jsxs("form",{className:G(n,`${z}-prompts-input-container`),name:`${z}-prompts-form`,onSubmit:p,children:[w.jsx("label",{htmlFor:`${z}-prompts-input`,"aria-label":u,children:w.jsx(dp,{className:G(n,`${z}-prompts-input-icon`)})}),w.jsx("input",{id:`${z}-prompts-input`,className:G(n,`${z}-prompts-input`),name:`${z}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),w.jsx(oi,{className:G(n,`${z}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(Xo,{}),disabled:f})]})},O9=()=>{const{globalClassName:e,mode:t}=nt(),{placeholder:n}=ii(),r=n||eS[t];return w.jsxs("div",{className:G(e,`${z}-prompts-header`),children:[w.jsx(dp,{className:G(e,`${z}-prompts-input-icon`),"aria-hidden":"true"}),w.jsx("span",{className:G(e,`${z}-prompts-header-text`),children:r})]})},tS=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:o}=nt(),a=o==null?void 0:o.icon,u=(c=o==null?void 0:o.iconPosition)!=null?c:"left";return w.jsxs("button",{className:G(r,`${z}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&w.jsx(bp,{icon:a,className:`${z}-suggestion-button-icon`}),w.jsx("span",{children:e})]})},I9="Ask me something else",R9=({label:e,disabled:t=!1})=>w.jsx(tS,{label:e||I9,disabled:t,onClick:()=>ri(!0)}),L9=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),D9=({sendCopilotPrompt:e})=>{var k,H;const{globalClassName:t}=nt(),{promptsMessage:n,isResponseLoading:r,isInitialized:o,isInline:a,askElseButtonLabel:u,staticQuestions:c,staticQuestionsStrategy:d,disableAskElseButton:f}=ii(),p=L9(c),m=d==="override"&&p.length>0,T=o?(H=(k=n==null?void 0:n.suggestions)==null?void 0:k.map(V=>V.displayText.trim()).filter(Boolean))!=null?H:[]:[];let y;m?y=p:d==="prepend"?y=[...p,...T]:y=[...T,...p];const _=o?Array.from(new Set(y)):[],S=!o,C=_.length>0&&!a&&!f,N=V=>()=>{const F=V.trim();F&&e(F)};return w.jsxs("div",{className:G(t,`${z}-prompts-button-group`),children:[S&&w.jsx(gc,{}),_.map(V=>w.jsx(tS,{label:V,disabled:r,onClick:N(V)},V)),C&&w.jsx(R9,{label:u,disabled:r})]})},M9=()=>{const{globalClassName:e}=nt(),{isInline:t,userPrompt:n}=ii();return!n||!t?null:w.jsx("div",{className:G(e,`${z}-prompts-user-message-container`),children:w.jsx("p",{className:G(e,`${z}-prompts-user-message`),children:n})})},F9=()=>{const{globalClassName:e,openLinksInNewTab:t}=nt(),{isInline:n,responseMessage:r,isResponseLoading:o}=ii();return!n||!r&&!o?null:o?w.jsx(gc,{}):r?w.jsx("div",{className:G(e,`${z}-prompts-response-container`,`${z}-message-container`),children:w.jsx(kp,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},B9=()=>{const{globalClassName:e,themeVariables:t}=nt(),{connected:n,copilot:r}=tr(),{handleCopilotRequestAck:o}=Wo(),{status:{isOpen:a}}=er(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p,promptsDisplay:m}=ii(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:_,setUserPrompt:S,setResponseMessage:A,setIsResponseLoading:C}=vf(),[N,k]=B.useState(null);B.useEffect(()=>{if(!d||N)return;const V=document.getElementById(d);V&&k(V)},[d,N]);const H=B.useCallback(V=>{if(!r||!f||!p)return;const F=ie=>{c?(A(null),S(V),_(ie.id),C(!0)):(a||ri(!0),o(ie))},q={userPrompt:V,clientContext:M({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(q,F);break;case"search":r.search(M({searchParams:p},q),F);break;case"browse":r.browse(M({browseParams:p},q),F);break;case"pdp":r.productView(M(M({},p),q),F);break}},[r,c,f,p,a,_,A,S,C,o]);return!n||!u||!N||!f?null:Go.createPortal(w.jsxs("div",{className:G(e,`${z}-prompts-extension-container`),style:t,children:[T&&w.jsx(N9,{onSubmit:H}),!T&&w.jsx(O9,{}),y&&w.jsx(D9,{sendCopilotPrompt:H}),w.jsxs("div",{className:G(e,`${z}-prompts-extension-messages-container`),children:[w.jsx(M9,{}),w.jsx(F9,{})]})]}),N)},U9=()=>w.jsxs(w.Fragment,{children:[w.jsx(P9,{}),w.jsx(B9,{})]}),Np=e=>w.jsxs(y1,pe(M({},e),{children:[w.jsx(v9,{}),w.jsx(U9,{})]}));var yc={},nS;function H9(){if(nS)return yc;nS=1;var e=x1();return yc.createRoot=e.createRoot,yc.hydrateRoot=e.hydrateRoot,yc}var rS=H9();const z9=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=cn(o,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const m of d)if(m.type==="childList"&&m.addedNodes.length)for(const T of m.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Yo(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=rS.createRoot(T))==null||p.render(w.jsx(Np,M({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Yo(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},j9=r=>{var o=r,{timeout:e,elementId:t}=o,n=cn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Yo(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Yo(!0,"warn","Container element not found for id:",t),Yo(!0,"warn","Beginning observation for element"),z9(M({elementId:t,timeout:e},n));return}rS.createRoot(a).render(w.jsx(Np,M({},n)))},$9={search:tk,browse:Fv,pdp:{setPdpContext:n1,updatePdpProductId:Uv,updatePdpLink:Hv},components:{setEntryType:Ea,toggleWidgetOpen:ri,toggleWidgetMinimized:pl,toggleModalFullscreen:wf,setWidgetType:ml,setWidgetDialogPosition:Af,togglePromptsExtensionOpen:i1,togglePromptsExtensionInline:o1,loadPromptsComponent:Gv,getAskCimPrompts:Vv,getSearchPrompts:qv,getBrowsePrompts:Yv,getProductViewPrompts:Wv},session:Xv},V9=()=>Object.freeze({search:Object.freeze(Tt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(mr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType});Fe.CopilotDialog=J_,Fe.CopilotEmbed=K_,Fe.CopilotModal=Z_,Fe.CopilotWidget=Np,Fe.CopilotWidgetProvider=y1,Fe.eventHandlers=$9,Fe.injectCopilotWidget=j9,Fe.state=V9,Fe.useCopilot=Ir,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));